diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 1682b92a7a7..4ac9fa8f5b9 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -6,9 +6,13 @@ on: - cron: "0 21 * * *" issue_comment: types: [created] + +permissions: {} # none jobs: stale: + permissions: + issues: write runs-on: ubuntu-latest steps: - uses: Dolibarr/stale@staleunstale @@ -21,4 +25,4 @@ jobs: days-before-close: 10 operations-per-run: 100 dry-run: false - \ No newline at end of file + diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 67b4b346b6c..c1cb2e853f1 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -6,8 +6,9 @@ build: analysis: tests: override: - - php-scrutinizer-run - + - command: php-scrutinizer-run + idle_timeout: 8000 + imports: - javascript - php @@ -39,9 +40,11 @@ tools: - build/* - dev/* - doc/* - - test/* + - documents/* - htdocs/includes/* - htdocs/core/class/lessc.class.php + - node_modules/* + - test/* paths: - htdocs/ - scripts/ @@ -181,8 +184,10 @@ tools: - 'build/*' - 'dev/*' - 'doc/*' - - 'test/*' + - 'documents/*' - 'htdocs/includes/*' + - 'node_modules/*' + - 'test/*' paths: { } # Similar code detection @@ -194,8 +199,10 @@ tools: - 'build/*' - 'dev/*' - 'doc/*' - - 'test/*' + - 'documents/*' - 'htdocs/includes/*' + - 'node_modules/*' + - 'test/*' paths: { } # Coding-Style / Bug Detection @@ -209,8 +216,10 @@ tools: - 'build/*' - 'dev/*' - 'doc/*' - - 'test/*' + - 'documents/*' - 'htdocs/includes/*' + - 'node_modules/*' + - 'test/*' paths: { } config: { } path_configs: { } diff --git a/.travis.yml b/.travis.yml index a260c31e3f3..6422e33a7e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,9 @@ # from Dolibarr GitHub repository. # For syntax, see https://docs.travis-ci.com/user/languages/php/ -# We use dist: xenial to have php 5.6+ available +# We use dist: bionic = 18.04 os: linux -dist: xenial -#dist: bionic +dist: bionic language: php @@ -18,22 +17,43 @@ services: - mysql - postgresql + +before_install: +- | + echo "Add ondrej PPA" + sudo add-apt-repository -y ppa:ondrej/php + sudo apt-get update + echo "Disabling Xdebug for composer" + export PHP_VERSION_NAME=$(phpenv version-name) + echo $PHP_VERSION_NAME + ls ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/ + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini + phpenv config-rm xdebug.ini + phpenv rehash + echo + addons: - # Force postgresql to 9.4 (the oldest availablable on xenial) - postgresql: '9.4' + # Force postgresql version + postgresql: '10' apt: sources: - # To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/ - - pgdg-xenial + - sourceline: 'ppa:ondrej/php' packages: # We need a webserver to test the webservices # Let's install Apache with. - apache2 - # mod_php is not supported by Travis. Add fcgi. We install FPM later on. - - libapache2-mod-fastcgi # We need pgloader for import mysql database into pgsql - pgloader - + - php + - php7.1-pgsql + - php7.1-mysqli + - php7.1-xml + - php7.1-intl + - php8.1-pgsql + - php8.1-mysqli + - php8.1-xml + - php8.1-intl + env: global: # Set to true for very verbose output @@ -44,21 +64,21 @@ jobs: #allow_failures: #- php: nightly include: - - stage: PHP 5.6-7.4 + - stage: PHP 7.0-8.1 if: type = push - php: '5.6' + php: '7.1' env: DB=postgresql - - stage: PHP 5.6-7.4 + - stage: PHP 7.0-8.1 if: type = pull_request OR type = push - php: '7.4.22' + php: '8.1' env: DB=mysql - stage: PHP Dev if: type = push AND branch = develop - php: nightly + php: nightly env: DB=mysql - stage: PHP Dev - if: type = push AND branch = 15.0 - php: nightly + if: type = push AND branch = 17.0 + php: nightly env: DB=mysql notifications: @@ -72,13 +92,6 @@ notifications: on_failure: always use_notice: true -before_install: -- | - echo "Disabling Xdebug for composer" - export PHP_VERSION_NAME=$(phpenv version-name) - cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini - phpenv config-rm xdebug.ini - echo install: - | @@ -94,13 +107,6 @@ install: - | echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION" - if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then - composer -n require phpunit/phpunit ^5 \ - php-parallel-lint/php-parallel-lint ^1 \ - php-parallel-lint/php-console-highlighter ^0 \ - php-parallel-lint/php-var-dump-check ~0.4 \ - squizlabs/php_codesniffer ^3 - fi if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then composer -n require phpunit/phpunit ^6 \ php-parallel-lint/php-parallel-lint ^1 \ @@ -108,7 +114,7 @@ install: php-parallel-lint/php-var-dump-check ~0.4 \ squizlabs/php_codesniffer ^3 fi - if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then + if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then composer -n require phpunit/phpunit ^7 \ php-parallel-lint/php-parallel-lint ^1.2 \ php-parallel-lint/php-console-highlighter ^0 \ @@ -116,8 +122,8 @@ install: squizlabs/php_codesniffer ^3 fi # phpunit 9 is required for php 8 - if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then - composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \ + if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \ php-parallel-lint/php-parallel-lint ^1.2 \ php-parallel-lint/php-console-highlighter ^0 \ php-parallel-lint/php-var-dump-check ~0.4 \ @@ -246,17 +252,22 @@ before_script: - echo "Setting up Apache + FPM" + # setup link for php legacy + - sudo ln -s ~/.phpenv/versions/$(phpenv version-name)/bin/php /bin/php + # install apache web server + - sudo apt-get install apache2 php-fpm php-mysql php-pgsql php-gd php-ldap php-xml php-mbstring libapache2-mod-php # enable php-fpm - 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" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$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 + - sudo a2enmod proxy_fcgi rewrite setenvif cgi 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 + #- sudo chown -R travis:travis /var/lib/apache2/fastcgi + # start php-fpm - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm # configure apache virtual hosts - sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf @@ -284,12 +295,12 @@ script: set -e #parallel-lint --exclude htdocs/includes --blame . # Exclusions are defined in the ruleset.xml file - if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then + if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \ --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \ --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \ --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \ - --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame . + --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame . fi set +e echo @@ -299,7 +310,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then + if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi set +e @@ -310,7 +321,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then + if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php . fi set +e @@ -436,6 +447,9 @@ script: php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log + php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log + php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log + php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log ls -alrt $TRAVIS_BUILD_DIR/ - | @@ -468,6 +482,9 @@ after_script: ls $TRAVIS_BUILD_DIR/documents #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log + echo "After script - Output last lines of apache error.log" + sudo ls /var/log/apache2 + sudo tail -n 50 /var/log/apache2/travis_error_log after_success: - | @@ -476,16 +493,16 @@ after_success: after_failure: - | echo Failure detected, so we show samples of log to help diagnose - # This part of code is executed only if previous command that fails are enclosed with set +e - # Upgrade log files + # This part of code is executed only if the command that fails are enclosed with set +e + # Show upgrade log files for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` do echo "Debugging informations for file $ficlog" #cat $ficlog done - # Apache log file + # Show Apache log file echo "Debugging informations for file apache error.log" - sudo cat /var/log/apache2/travis_error_log + sudo tail -n 50 /var/log/apache2/travis_error_log if [ "$DEBUG" = true ]; then # Dolibarr log file echo "Debugging informations for file dolibarr.log (latest 50 lines)" diff --git a/.tx/config b/.tx/config index ca169bfcc50..494ba41613d 100644 --- a/.tx/config +++ b/.tx/config @@ -98,6 +98,12 @@ source_file = htdocs/langs/en_US/cron.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.datapolicy] +file_filter = htdocs/langs//datapolicy.lang +source_file = htdocs/langs/en_US/datapolicy.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.deliveries] file_filter = htdocs/langs//deliveries.lang source_file = htdocs/langs/en_US/deliveries.lang diff --git a/COPYRIGHT b/COPYRIGHT index 45b3047a375..d980219c420 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -13,7 +13,7 @@ The Dolibarr images resources (available in the doc directory) is distributed un The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr -for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22 +for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22 The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22 @@ -23,7 +23,6 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib Component Version License GPL Compatible Usage ------------------------------------------------------------------------------------- PHP libraries: -ADOdb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package) EvalMath 1.0 BSD Yes Safe math expressions evaluation Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert @@ -31,10 +30,11 @@ Mobiledetect 2.8.39 MIT License Yes NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency ParseDown 1.6 MIT License Yes Markdown parser -PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files +PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers +PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files -php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP +php-iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar) @@ -52,7 +52,7 @@ Ace 1.4.14 BSD Yes ChartJS 3.7.1 MIT License Yes JS library for graph CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG jQuery 3.6.0 MIT License Yes JS library -jQuery UI 1.13.1 GPL and MIT License Yes JS library plugin UI +jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors diff --git a/ChangeLog b/ChangeLog index 1abc487eff1..1697b668934 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,211 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 17.0.0 compared to 16.0.0 ***** + +For users: +--------------- + +NEW: Minimal PHP version is now PHP 7.0 instead of PHP 5.6 +NEW: #21780 Add pid field to Cronjob class and store PID on job execution +NEW: #19680 Add option PRODUCT_ALLOW_EXTERNAL_DOWNLOAD to automatically have uploaded files shared publicly by a link +NEW: #20650 can move the checkbox column on left (experimental option) +NEW: #21000 Added columns 'alias_name' on project, supplier invoice, supplier order, supplier proposals and task list +NEW: #21395 Added option for dark theme mode in display - color and theme +NEW: #21397 added option to auto define barcode numbers for third-parties in barcode module setup +NEW: #21399 +NEW: #21442 Enhancement of module builder init +NEW: #21654 add bank account number used on invoices for debit +NEW: #22048 Added notes to productlot module +NEW: #22298 Bank - Add salaries & vat in the tab of planned entries of a bank account +NEW: #22328 +NEW: #22424 +NEW: #22500 member module set up made easier +NEW: #22527 projects and thirdparties can be viewed as conversation ("Message" view), like events/agenda. +NEW: #22546 can now set user supervisors using mass action in htdocs/user +NEW: #22594 can chose if VAT ID is unique or not for third parties +NEW: #22622 all partnerships displayed on tab partnership of a thirdparty and member +NEW: #22676 massaction for updating product prices +NEW: #22735 Massaction to affect users on projects +NEW: #25594 can chose if VAT ID is unique or not for third parties +NEW: #4482 adding js to hide/show advanced option on the export data page +NEW: Accountancy - Add a graphic option to enable lettering function - FPC21 +NEW: Accountancy - Add a way to clean some words when you generate thirdparty accounting account +NEW: Accountancy - Added an option during export to export or not the lettering FPC21 +NEW: Accountancy - Manage supplier deposit with specific account +NEW: Accountancy - Model Digitaria - Add a way to clean some words when you generate thirdparty accounting account FPC22 +NEW: Add a button "Test collect" in email collector +NEW: Add a constant to disallow modification of the product reference. +NEW: Add a method doAutoRenewContracts that can be used as a cron task. +NEW: Add " as enclosure by default for CSV export. Keep removing CR/LF. +NEW: add attached file in presend email form of thirdparty card +NEW: Add a way to enter LICENSE file content in property of website +NEW: Add badge in admin extrafields setup +NEW: add constant PROPAL_BYPASS_VALIDATED_STATUS +NEW: Add date event (!= date project) and location on event organization +NEW: Add employment anniversary in birthday box +NEW: Add extrafield type "IP" to store IP addresses +NEW: Add fail2ban rules examples to limit access to /public pages +NEW: Add filter "Product subject to lot/Serial" in stock per lot/serial +NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (feature abandonned by mailers) +NEW: Add IMAP port setting on email collector module +NEW: Adding JAPAN Chart-of-Account and regions/departments +NEW: Adding NIF verification for Algeria +NEW: Add link to create an element from the category page +NEW: add margin infos to takepos invoice lines +NEW: Add max size send for "backup and link to mail" option +NEW: Add method httponly_accessforbidden() +NEW: Add more advices into the Setup security page +NEW: Add new global variable for keeping the previous signature information on proposale (case of reopen a proposale) +NEW: Add objectLink on expedition +NEW: Add oldcopy to Ticket so triggers intercepting TICKET_MODIFY have access to old values of the updated properties +NEW: Add option FICHINTER_ALLOW_EXTERNAL_DOWNLOAD +NEW: Add option --force on CLI cron_run_jobs.php +NEW: Add option "Show price on the generated documents for receptions" +NEW: Add performance index (name for company and contact) and llx_bank_url(url_id) +NEW: Add picto property on sub-module for password generation +NEW: add redirect on action confirm addconsumedline and addproduceline +NEW: Add a new advanced permission "read price" +NEW: Add substitution key __SENDEREMAIL_SIGNATURE__ +NEW: Add the referrer-policy to "same-origin" by default on all public pages. +NEW: Add the SMTP header References on ticket email created by email +NEW: Add the thirdparty column to the time list (projet/tasks/time.php) +NEW: Add trigger to record the event of sending an email from a project #20912 +NEW: Allow download link option in module configuration (propal,invoice,supplier proposal, order) +NEW: Bank - Add salaries & vat in tab planned entries +NEW: Bulk action to remove a category in list/search website pages +NEW: Can copy/paste images into emails sent. +NEW: Can edit label of an emailing even once sent +NEW: Can edit property css, cssview, csslist on extrafields +NEW: Can enter the unit price including the vat +NEW: Can invoice task time per different services +NEW: Can join several files by default on email form +NEW: Can send an email on scheduled job error +NEW: Can set a commercial discount by entering amount including VAT +NEW: Can set a monthly frequency (or multiple) in cron tasks. +NEW: Can set start and end dates and comment on button "Activate all services" +NEW: can sort and preselected best supplier price +NEW: Can use products categories to make inventory +NEW: Change filter type on tickets list into a multiselect combo +NEW: conf TIMESPENT_ALWAYS_UPDATE_THM, when it's on we always check current thm of user to update it in task time line +NEW: constant PROPAL_NEW_AS_SIGNED +NEW: show date delivery planned on orders linked to company and product +NEW: Default template of contract is not mandatory +NEW: Default values in extrafields are not more limited to 255 char. +NEW: display currency in takepos menu +NEW: Enable online signature for interventions +NEW: Encrypt all sensitive constants in llx_const +NEW: extrafield price with currency +NEW: filter on reception dates (from / to) in cheque paiement card +NEW: Members: default_lang for members +NEW: Members: Table of membership types +NEW: Members: add free membership amounts at the membership type level +NEW: TakePOS: Header Scroll in TakePOS +NEW: TakePOS: add price to product box in TakePOS +NEW: TakePOS: add setup parameters, can setup terminal name +NEW: TakePOS: support of Stripe Terminal with TakePOS +NEW: TakePOS: Receipt preview in TakePOS setup +NEW: TakePOS: different product list on smartphone +NEW: Website: can delete a whole website if disabled +NEW: Website: can remove a website template +NEW: Website: can set header "Strict-Transport-Security" in web sites. +NEW: Website: can switch status of website and page from the website toolbar +NEW: Website: Templates of websites are now directories and not zip into core repo +NEW: Website: add 4 other templates in website module +NEW: If we select another view list mode, we keep it +NEW: Init module bookcal +NEW: Introduce dolEncrypt and dolDecrypt to be able to encrypt data in db +NEW: Invoice - Add french mention on pdf when vat debit option is on +NEW: invoice export : add accounting affectation +NEW: label on products categories filter +NEW: The link "add to bookmark" is always on top in the bookmark popup +NEW: MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS const to show category customer filter +NEW: Make module WebservicesClient deprecated. Use module WebHook instead. +NEW: manage no email with thirdparties (better for GDPR) +NEW: Manage Position (Rank) on Contract Lines +NEW: Manage VAT on all lines on purchases cycle +NEW: manage virtual stock at a future date +NEW: On a bank reconciled line, we can modify the bank receipt +NEW: On a form to send an email, we show all emails of all contacts of object +NEW: Option PRODUCTBATCH_SHOW_WAREHOUSE_ON_SHIPMENT showing wh on PDF +NEW: Option PRODUIT_DESC_IN_FORM accept (desktop only or +smartphone) +NEW: Page for mass stock transfer can be used with no source stock +NEW: parent company column and filter in invoice and order list +NEW: Add show "Sales rep" option for PDF +NEW: Picto for shared link is clickable +NEW: possibility to select scopes with checkbox for Oauth tokens +NEW: private and public note on user, thirdparty and contact list +NEW: product categories filter on inventory list +NEW: Product supplier price: autofill default supplier VAT +NEW: Project - Add author on list +NEW: Public counters feature +NEW: Reception - Add a from/to on search on date field +NEW: Start a simple support of recurrent events on agenda +NEW: Resize parent company column in order list +NEW: Saved token of OAUTH module are now encrypted into llx_oauth_token +NEW: Save one click to select on delivery ack, on emails. +NEW: scheduled job to send unpaid invoice reminder can now use the cc and bcc from email template +NEW: set thirdparty type with company modify trigger +NEW: Show also scheduled task never finished in scheduled task widget +NEW: show badge with number of extrafields in setup +NEW: show category tree in sellist and chkbxlst for common object +NEW: Show picto and color into combo for selection of tags +NEW: show product label on inventory +NEW: show sell-by and eat-by dates only if not empty +NEW: show SellBy/EatBy dates for each batch product in shipment card +NEW: skip accept/refuse process for proposals (option PROPAL_SKIP_ACCEPT_REFUSE) +NEW: SMTP using oauth2 authentication +NEW: can substitue project title in mail template +NEW: Supplier order list - Add column private and public note +NEW: Support IP type in extrafields +NEW: The purge of files can purge only if older than a number of seconds +NEW: Update ActionComm type_code on email message ticket +NEW: VAT - Admin - Add information on deadline day for submission of VAT declaration +NEW: expand/collapse permissions on user permission page +NEW: Show delivery mode on PDF for proposals +NEW: Add the target to select attendees of event for emailings + + Modules +NEW: Experimental module Asset + +For developers or integrators: +------------------------------ + +NEW: ModuleBuilder can generate code of class from an existing SQL table +NEW: #22370 Modulebuilder supports 'alwayseditable' (like extrafields) +NEW: #20912 Add trigger to record the event of sending an email from a project +NEW: #21750 Added "Get lines and Post lines from BOM" at the REST Service +NEW: Removed completely the need for the library adodbtime +NEW: hook on agenda pages +NEW: hook to complete payment in TakePOS +NEW: hook "changeHelpURL" to modify target of the help button +NEW: hook formConfirm on action comm card +NEW: hook to modify supplier product html select +NEW: Add new hook for show virtual stock details on product stock card +NEW: Add new hooks for actioncomm +NEW: conf->global->SYSLOG_FILE_ONEPERSESSION accept a string +NEW: translate for contact type API, setup/ticket API, shipping method API +NEW: All ajax pages have now a top_httphead() +NEW: support multilang in Civilities API +NEW: Add API for the partnership module +NEW: Add "Get lines and Post lines from BOM" in the API +NEW: Replace fk_categories_product with categories_product in inventory +NEW: Rewrite of SQL request. Removed the join on category (for filter on categ), replaced with a EXISTS/NOT + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* Minimal PHP version is now PHP 7.0 instead of PHP 5.6 +* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product +* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead. +* All functions fetch_all() have been set to deprecated for naming consitency, use fetchAll() instead. +* Code standardization: '$user->rights->propale' is now '$user->rights->propal' everywhere. +* Deprecated method set_billed() on shipment and reception class has been removed. Use setBilled() instead. +* Tables llx_prelevement_facture and llx_prelevement_facture_demande have been renamed into llx_prelevement and llx_prelevement_demande. +* Rename MAIN_LIST_ALLOW_NOTES into MAIN_LIST_HIDE_NOTES and rename MAIN_LIST_ALLOW_PRIVATE_NOTES into MAIN_LIST_HIDE_PRIVATE_NOTES +* Rename the substitution for project label instead of project title in substitution variables + ***** ChangeLog for 16.0.3 compared to 16.0.2 ***** @@ -160,118 +365,115 @@ NEW: PHP 8.0 and 8.1 compatibility: log files (depending on your PHP setup). Removal of all PHP warnings on server side is planned for v17. NEW: Support for recurring purchase invoices. NEW: #20292 Include German public holidays -NEW: Can show ZATCA QRCode on PDFs -NEW: Can show Swiss QR Code on PDFs +NEW: Can show ZATCA QR-Code on PDFs +NEW: Can show Swiss QR-Code on PDFs NEW: #17123 added ExtraFields for Stock Mouvement -NEW: #20609 : new massaction to assign a sale representatives on a selection of thirdparties +NEW: #20609 new massaction to assign a sale representatives on a selection of thirdparties NEW: #20653 edit discount pourcentage for all lines in one shot NEW: Accept 'auto' for ref of object on import of purchase order/proposal NEW: Accountancy - Add more filters and info on page to bind accounting accounts -NEW: Accountancy - Add subledger account when we generate a transaction with a deposit invoice +NEW: Accountancy - Add subledger account when generate a transaction with a deposit invoice NEW: Accountancy - Add a massaction to preselect an account (customer and supplier list) +NEW: Accountancy - Add hidden feature for accounting reconciliation NEW: ACE Editor is restored at same cursor position after a save. NEW: Add "addMoreActionsButtons" hook to subscription form NEW: Add an option in GUI to show a Quick add button into top menu bar -NEW: Module Recruitment - Add a public page with all list of open job positions. -NEW: Module Recruitment - Add a tab with list of application on the jobposition file. NEW: Add a workflow to auto link contract on a ticket -NEW: Add column date of Signature on proposal list NEW: Add column template invoice in invoice list NEW: Add column "Total HT" to products array on document creation card -NEW: ADD configuration for text color of button action -NEW: Add constant to hide categories in TakePos -NEW: Add constant to show category description in TakePos -NEW: Add constant to show only the products in stock in TakePos -NEW: Add entity filter in exports +NEW: Add configuration for text color of button action NEW: Show the event block on recurring invoices #20870 -NEW: Add filter "opportunity status" on statistics of projects. NEW: Add firstname, lastname and max number of attendees for module "Event Organization" -NEW: add margin info in proposal and order list -NEW: Add massaction "Edit Extrafield" for Product +NEW: Add margin info in proposal and order list NEW: Add more fields to detect duplicate during import of thirdparties NEW: Add option to foce delivery on email for purchase order receipt to yes -NEW: Add param boder table for md theme -NEW: Add param color button action NEW: Add possibility to create contract from invoice NEW: Add possibility with constant MAIN_LOGIN_BADCHARUNAUTHORIZED to define bad character unauthorized into login name -NEW: Add private and public notes on tax files. -NEW: Add status "Obsolete" to KM articles +NEW: Add private and public notes on tax files NEW: Add substitutions "user numbers" -NEW: Add the possibility to add sub-BOMs to BOM -NEW: allow a ticket to be automatically marked as read when created from backend. NEW: allow cut&paste as real numeric value to excel NEW: A public form to send a message and create a lead is available NEW: automatically set totally received status in reception NEW: Auto set invoice paid when adding credit not and remain to pay is 0 -NEW: Availibility dictionnary has a new column unit and number -NEW: barcode rule to insert product in takepos -NEW: Can change value of AWP during the inventory +NEW: Backup tool has an "lowmemory" option for mysqldump on large database NEW: Can enter price with tax for predefined products on purchase objects -NEW: Can filter on a thirdparty on product statistics NEW: Can removed doc templates from setup page of thirdparty -NEW: Can set the parent company during the creation of thirdparty (action=add of societe/card.php) NEW: Can use ! to make a search that exclude a string -NEW: Change in theme colors does not need to use the refresh button NEW: clean values and amount in FEC import NEW: const MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND for mailing mass action NEW: Contact filter project list NEW: Create contract from invoice -NEW: create third-party with contact if not found on public ticket +NEW: Database: Can store the session into database (instead of beeing managed by PHP) +NEW: Database: Some core tables are created only at module activation NEW: Default value for MAIN_SECURITY_CSRF_WITH_TOKEN is now 2 (GET are also protected agains CSRF attacks) -NEW: deposit payment terms: add field into dictionary admin page to define default percentage of deposit. +NEW: deposit payment terms: add field into dictionary admin page to define default percentage of deposit. NEW: Dictionaries - add possibility to manage countries in EEC -NEW: display errors in a message box after generating documents -NEW: Display physical and virtual stock of the products when creating OF from a BOM -NEW: Display product ref in "Object link" product tab for BOM +NEW: Dictionaries - Availibility dictionnary has a new column unit and number +NEW: Display errors in a message box after generating documents NEW: Enhance the import. Can use 'auto' for the ref (import of orders) NEW: Events on Proposal to Return to Draft +NEW: Exports - add entity filter in exports NEW: Page to list expense report payments NEW: JS inventory autocalc input NEW: language support for more emailing target selectors NEW: leave requests: add field into type dictionary to block request if balance is negative -NEW: MAIN_MAIL_AUTOCOPY_TO can accept several email and special keys -NEW: MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category NEW: Mass action "Close shipments" -NEW: Module website now supports the multicompany module -NEW: More mode for THEME_TOPMENU_DISABLE_IMAGE (2, 3, ...) +NEW: Module BOM - add tabs for nets BOM +NEW: Module BOM - add the possibility to add sub-BOMs to BOM +NEW: Module Recruitment - Add a public page with list of all open job positions. +NEW: Module Recruitment - Add a tab with list of application on the jobposition file. NEW: Add option to move checkbox column as first column on Thirdparty list (only few screens) -NEW: Add tabs for nets Bom -NEW: on redirect of page in website module, GET parameters are kept. -NEW: optional display warning icons on ticket list -NEW: option to default check "notify tier at creation" in ticket module -NEW: option update prices on proposal cloning NEW: payment conditions enabling semi-automatic deposit creation (Issue #18439) NEW: possibility to consume multiple batch NEW: Reverse movement product consumption NEW: Send email to the supplier order contact -NEW: New permission to report time on timesheet. +NEW: add permission to report time on timesheet +NEW: Knowledge Management - add status "Obsolete" to KM articles +NEW: MRP - split consumption line on MO +NEW: MRP - display physical and virtual stock of the products when creating OF from a BOM +NEW: MRP - display product ref in "Object link" product tab for BOM +NEW: Orders - support user_modif in order +NEW: Products - add massaction "Edit Extrafield" for Product +NEW: Products - List - add thumbnail field in product list +NEW: Products - Statistics - can filter on a thirdparty +NEW: Projects - add filter "opportunity status" on statistics of projects. +NEW: Proposals - option update prices on proposal cloning +NEW: Proposals - List - add column date of Signature on proposal list NEW: SEPA XML - option to place payment Type Info at Credit transfer Transaction level -NEW: Show number of votes into the label of tab "Results" of a survey -NEW: Show product reference in Takepos -NEW: Some core tables are created only at module activation -NEW: split consumption line on MO -NEW: stock filter in reassort lists -NEW: stock limit in stock export CSV -NEW: Sub-bom are availables +NEW: Stocks - stock filter in reassort lists +NEW: Stocks - stock limit in stock export CSV +NEW: Stocks - Inventory - can change value of AWP during the inventory NEW: Supplier order - Show ref supplier of reception in linked object block -NEW: support user_modif in order -NEW: TakePos - pagination on search results -NEW: The backup tools has an "lowmemory" option for mysqldump on large database +NEW: Surveys - Show number of votes into the label of tab "Results" of a survey +NEW: TakePOS - barcode rule to insert product in TakePOS +NEW: TakePOS - pagination on search results +NEW: TakePOS - show product reference +NEW: TakePOS - add constant to hide categories +NEW: TakePOS - add constant to show category description +NEW: TakePOS - add constant to show only the products in stock +NEW: Themes - add param color button action +NEW: Themes - Change in theme colors does not need to use the refresh button +NEW: Themes - more modes for THEME_TOPMENU_DISABLE_IMAGE (2, 3, ...) +NEW: Themes - MD - add param border table for md theme +NEW: Third-Parties - add rules "customer accountancy code" is mandatory to validate invoice +NEW: Third-Parties - can set the parent company during the creation of thirdparty (action=add of societe/card.php) +NEW: Tickets - allow a Ticket to be automatically marked as read when created from backend +NEW: Tickets - create Third-party with contact if not found on public ticket +NEW: Tickets - option to default check "notify tier at creation" +NEW: Tickets - Trigger: allow to automatically send messages on new tickets +NEW: Tickets - optional display warning icons on ticket list +NEW: Websites Module - supports now the multicompany module +NEW: Websites Module - on redirect of page in website module, GET parameters are kept. NEW: The 'reposition' class works on ajax constantonoff that make redirects -NEW: Thirdparty - Add rules "customer accountancy code" is mandatory to validate invoice -NEW: thumbnail field in product list NEW: total mark rate in list NEW: uncheck "send message" by default on a ticket when private messages has been checked NEW: VAT Report by month - Show detail by rate and also by code -NEW: Ticket triggers: allow to automatically send messages on new tickets -NEW: Accountancy - Add hidden feature for accounting reconciliation -NEW: Can store the session into database (instead of beeing managed by PHP) NEW: Added MMK currency (Myanmar Kyat) NEW: On a form to send an email, we show all emails of contacts of object - Modules -NEW: Module Partnership Management -NEW: Module Event Organization Management + Modules state +NEW: Module Partnership Management - stable +NEW: Module Event Organization Management - stable For developers or integrators: @@ -279,48 +481,46 @@ For developers or integrators: NEW: dol_uncompress() supports more extensions (.gz, .bz2, .zstd). Only .zip was supported before. NEW: Implement a generic method for Kaban views NEW: Upgrade chartjs library to 3.7.1 -NEW: update rank line is possible on API for customer invoices, sales orders and supplier invoice NEW: stripe element with more gateways NEW: solde() function evolution to be able to get solde until a chosen date NEW: Suggest a way to run upgrade per entities. NEW: Support html content for multiselect component. NEW: ModuleBuilder - Add tabs view in module builder NEW: ModuleBuilder - More feature that can be modifed after module generation -NEW: Hook getNomUrl available everywhere in tooltip of ref links NEW: Identification of tr is possible with by attribute data-id on some pages NEW: Import with select boxes V2 -NEW: Can update rank of invoice, proposal and order lines with API update NEW: Can use current entity filter on 'chkbxlst' NEW: Creation of the function select_bom() used to display bom select list -NEW: add printFieldListWhere hook in product reassort card NEW: Add trigger and event on completely received status change NEW: Add utility function send backup by mail NEW: add WordPress OAuth to save a token (not SSO) -NEW: A module can embed a sql script run at each Dolibarr upgrade -NEW: API Proposals - Add POST lines -NEW: API REST filter states by country -NEW: Add option INVOICEREC_SET_AUTOFILL_DATE_START/END -NEW: Add option MAIN_API_DEBUG to save API logs into a file +NEW: A module can embed a SQL script run at each Dolibarr upgrade NEW: Add param to keep the robot=index meta tag on public pages NEW: Add method hintindex() in database handlers. NEW: add modifications for new function "$db->prefix()" NEW: addMoreActionsButtonsList hook for button in list -NEW: Add API to get a template invoice NEW: Standardize a lot of code. -NEW: #20736 Allow extrafields SQL filters on REST API product lookup -NEW: #19294 implement detailed timespent in task of project API NEW: Add a protection into PHPunit to avoid to forget a var_dump + + +API: +NEW: API Proposals - Add POST lines +NEW: API REST filter states by country +NEW: Add API to get a template invoice NEW: Add datem and type parameters to API to create movements -NEW: Add hidden option on contract PDF line to hide qty and price -NEW: Option MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND to send last document in mass mailing action -NEW: Add hooks: selectContactListWhere hook, selectThirdpartyListWhere hook -NEW: TakePos - add hooks complete product display -NEW: TakePos - add hooks for cart display -NEW: TakePos - add hooks to complete ajax return array +NEW: #19294 implement detailed timespent in task of project API +NEW: #20736 Allow extrafields SQL filters on REST API product lookup +NEW: Can update rank of invoice, proposal and order lines with API update +NEW: update rank line is possible on API for customer invoices, sales orders and supplier invoice +NEW: Add option MAIN_API_DEBUG to save API logs into a file + +Hooks: +NEW: Hook getNomUrl available everywhere in tooltip of ref links +NEW: Add hooks: selectContactListWhere hook, selectThirdpartyListWhere hook NEW: Add hook before the public ticket list -NEW: Add hook doaction in takepos invoice -NEW: Add Hook for Notif +NEW: Add hook for Notif NEW: Add hook for more buttons +NEW: add hook printFieldListWhere in product ressort card NEW: Add hook printFieldListWhere in "show_contacts" function NEW: Add hook printFieldWhere in load_state_board function NEW: Add hooks contact tab badge and hooks parameter for avoid conflicts @@ -332,15 +532,28 @@ NEW: Add hooks on project task time page NEW: Add hooks on salaries and sociales card NEW: Add hooks select product list and select thirdparty list function NEW: Add hook to getSellPrice function +NEW: TakePos - add hooks complete product display +NEW: TakePos - add hooks for cart display +NEW: TakePos - add hooks to complete ajax return array +NEW: TakePOS - add hook doaction in TakePOS invoice +Config Options: +NEW: Add hidden option on contract PDF line to hide qty and price +NEW: Option MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND to send last document in mass mailing action +NEW: Option MAIN_API_DEBUG to save API logs into a file +NEW: Option MAIN_MAIL_AUTOCOPY_TO can accept several email and special keys +NEW: Option MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category +NEW: Option INVOICEREC_SET_AUTOFILL_DATE_START/END + +WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* There is a new specific permission to be allowed to enter timesheets. If you use timesheet, don't forget to give the new permission (disable and +* There is a new specific permission to be allowed to enter timesheets. If you use timesheet, don't forget to give the new permission (disable and enable the module project if it is not visible). * The default value for MAIN_SECURITY_CSRF_WITH_TOKEN has been set to 2. It means any POST and any GET request that contains the "action" or "massaction" with a value of a sensitive action must also a valid token parameter (With previous value 1, only POST was concerned). Note: With value 3, any URL with parameter "action" or "massaction" need the token, whatever is the value of the action. -* verifCond('stringtoevaluate') now return false when string contains a bad syntax content instead of true. +* verifCond('stringtoevaluate') now return false when string contains a bad syntax content instead of true. * The deprecated method thirdparty_doc_create() has been removed. You can use the generateDocument() instead. * All triggers with a name XXX_UPDATE have been renamed with name XXX_MODIFY for code consistency purpose. * Rename build_path_from_id_categ() into buildPathFromId() and set method to private. @@ -360,10 +573,8 @@ FIX: #18704 FIX: #20444 FIX: #20448 missing preg_replace for vat rate when adding a free line FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type -FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_… FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution -FIX: #20527 Accountancy Unbalanced entry proposed when an employee are declared on social contribution FIX: #20621 signature online with proposal with n page. FIX: #20696 FIX: #20828 @@ -399,7 +610,7 @@ FIX: fourn/commande/card.php Added "$object" parameter to $formfile->showdocumen FIX: french traductions for payment methods FIX: hook for dol_format_address FIX: Index page for "Sales" give wrong URL link to Intervention -FIX: issue Dolibarr#21495 for v15 +FIX: issue Dolibarr #21495 for v15 FIX: label and get_substitutionarray_each_var_object on ODT generation FIX: load product stock in inventory lines FIX: missing morecss for multiselectarray @@ -559,7 +770,7 @@ For users: NEW: Online proposal signature NEW: Can define some max limit on expense report (per period, per type or expense, ...) -NEW: Provide a special pages for bookmarks and multicompany for a better use of some mobile applications (like DoliDroid) +NEW: Provide a special pages for bookmarks and multicompany for a better use of some mobile applications (like DoliDroid) NEW: Allow the use of __NEWREF__ to get for example the new reference a draft order will get after validation. NEW: Add option to disable globaly some notifications emails. NEW: #18401 Add __NEWREF__ subtitute to get new object reference. @@ -608,7 +819,7 @@ NEW: can enable/disable external calendar by default NEW: Can hide sender name on PDF documents NEW: Can select lot from a combo list of existing batch numbers (in MRP consumtion) NEW: Can set the default BOM on a product -NEW: Can set/unset the usual working day of the week (friday, saturday, sunday) +NEW: Can set/unset the usual working day of the week (friday, saturday, sunday) NEW: Can show progression of task into combo list of tasks NEW: can upload the odt file for the product doc template NEW: Contract - Add From/to input on search date @@ -672,7 +883,7 @@ For developers: API: NEW: #18319 REST API - Shipment: Add 'close' action / endpoint / POST method. -NEW: add API /approve and /makeOrder for purchase orders +NEW: add API /approve and /makeOrder for purchase orders NEW: API for knowledgemanagement NEW: API get list of legal form of business NEW: API list of staff units @@ -707,21 +918,23 @@ NEW: we need to be able to put more filters on deleteByParentField() function NEW: make it easier to set the `keyword`, `keywords` and `description` attributes of an ecm file object NEW: Experimental feature to manage user sessions in database - + +WARNING: + Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* ALL EXTERNAL MODULES THAT WERE NOT CORRECTLY DEVELOPPED WILL NOT WORK ON V15 (All modules that forgot to manage the security token field +* ALL EXTERNAL MODULES THAT WERE NOT CORRECTLY DEVELOPPED WILL NOT WORK ON V15 (All modules that forgot to manage the security token field into forms will be broken. The security token field is expected since Dolibarr v9 but a lot of external modules did not implement it). * Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook. * Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale. -* The method static ActionComm::getActions($db, ...) is no more static. Use $actioncomm->getActions(...) instead (without $db param). +* The method static ActionComm::getActions($db, ...) is no more static. Use $actioncomm->getActions(...) instead (without $db param). * The 'action=delete&file=...' has been replaced with 'action=deletefile&file=...' to avoid confusion with deletion of object lines. * Method getDictvalue has been renamed into getDictionaryValue to match camel case rule. -* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in - method executeCLI() available into core/class/utils.class.php +* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in + method executeCLI() available into core/class/utils.class.php * Class file expeditionbatch.class.php renamed to expeditionlinebatch.class.php * ExpeditionLineBatch::fetchAll is not static anymore and first parameter $db is removed * ExtraFields->showOutputField parameter 4 'extrafieldsobjectkey' is now required -* CommonObject method add_object_linked now sets targettype to 'mymodule_myobject' instead of 'myobject', +* CommonObject method add_object_linked now sets targettype to 'mymodule_myobject' instead of 'myobject', you can use hook 'setLinkedObjectSourceTargetType' to set your usual targettype @@ -1010,10 +1223,10 @@ For users: ---------- NEW: Module Recruitment to follow application to job positions is now stable. NEW: Feature to make Stock Inventories -NEW: Several security issues after a second private bug hunting campaign. +NEW: Several security issues after a second private bug hunting campaign. NEW: A lot of fix into english text after a small proofreading campaign (still not perfect, but really better) NEW: All main menu entries are using the picto of the module -NEW: Add a copy to clipboard button on some fields +NEW: Add a copy to clipboard button on some fields NEW: Add an example of scheduled job to send email reminder for unpaid invoices NEW: Add some color and picto for the direction of movement NEW: add the column "Channel" into the list of orders @@ -1084,7 +1297,7 @@ NEW: can show the leave dates/holidays on the agenda view NEW: Support color for types of event Bank -NEW: Bank Entries : display user linked to a salary or a taxes +NEW: Bank Entries : display user linked to a salary or a taxes NEW: Add bulk actions for Bank Transfer ECM/GED @@ -1107,7 +1320,7 @@ NEW: option to automatically create a login/user when a new subscription of a me NEW: option to select membership type on the online payment page for membership subscription or renewal Products -NEW: Add price min and price min including tax into product export +NEW: Add price min and price min including tax into product export NEW: Add a ref in product customer price NEW: customer ref for product customer prices NEW: Set status of all variants when changing status of parent @@ -1160,8 +1373,8 @@ NEW: add option in Workflow module to set a shipment as closed for Admins -NEW: Add a security center page with all information and advices related to the security of your instance -NEW: Add a performance center page with all information and advices related to the performance of your instance +NEW: Add a security center page with all information and advices related to the security of your instance +NEW: Add a performance center page with all information and advices related to the performance of your instance Modules NEW: Module Recruitment is now stable @@ -1207,7 +1420,7 @@ NEW: API get the list of product ids only NEW: add link to OpenAPI specifications XML file in REST API module setup: swagger.json file can be included into external tools like redoc NEW: add native compression in REST APIs NEW: Product Variants API, add variant stock to response by parameter -NEW: Product API route added to get product stock and product with or without variants #13739 #17390 +NEW: Product API route added to get product stock and product with or without variants #13739 #17390 Hooks NEW: hook printFieldListTitle for cabyprodserv.php @@ -1232,8 +1445,8 @@ Following changes may create regressions for some external modules, but were nec * Removed deprecated substitution key __REFCLIENT__ (replaced with __REF_CLIENT__) * Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries. * v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8. -* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in - method executeCLI() available into core/class/utils.class.php +* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in + method executeCLI() available into core/class/utils.class.php ***** ChangeLog for 13.0.5 compared to 13.0.4 ***** @@ -1460,7 +1673,7 @@ NEW: Module "Credit transfer SEPA" to manage payment of vendors using bank credi NEW: Module Intracomm report NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable. NEW: Module Recruitment to manage Job position and applications. -NEW: Several security issues after a private bug bounty campaign. +NEW: Several security issues after a private bug bounty campaign. NEW: Accountancy - add chart of sub accounts NEW: Accountancy - add options to disable binding on sales, purchases & expense reports independently of the modules NEW: Accountancy balance - add a menu entry to show subtotal by group @@ -1596,7 +1809,7 @@ NEW: show user on external calender events (when found) NEW: subject title with company name instead of application title in ticket message NEW: Support for Samba4 AD NEW: TakePOS appearance tab with more visual parameters -NEW: TakePOS add alert before changing thirdparty +NEW: TakePOS add alert before changing thirdparty NEW: TakePOS add third order printer NEW: TakePOS can change thirdparty with barcode scan NEW: TakePOS can create a thirdparty customer from TakePOS frontend @@ -1607,9 +1820,9 @@ NEW: TakePOS display resiliate status for members NEW: TakePOS Gift Receipt NEW: TakePOS multicurrency compatibility NEW: TakePOS multicurrency total -NEW: TakePOS print payment method and change +NEW: TakePOS print payment method and change NEW: TakePOS restrict thirdparty to customer -NEW: TakePOS show available stock +NEW: TakePOS show available stock NEW: TakePOS Weighing Scale compatibility with TakePOS connector #14725 NEW: Thirdparty Import new fields: mother company,outstanding debt limit,bank account,incoterms NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late @@ -1622,8 +1835,8 @@ NEW: VAT report - Invert constant to show by default zero VAT in reports NEW: website page fields selection NEW: website - global header of a website can also have dynamic content NEW: when creating a user from a member linked to a thirdparty, you can choose to create it as external or internal user -NEW: add clone button on miscellaneous payment -NEW: add option to put the product label in bold in the PDF templates if configured #15065 +NEW: add clone button on miscellaneous payment +NEW: add option to put the product label in bold in the PDF templates if configured #15065 NEW: add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF." diff --git a/README-FR.md b/README-FR.md index a67bf204076..74be3f1754c 100644 --- a/README-FR.md +++ b/README-FR.md @@ -56,6 +56,10 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: +- Faites une sauvegarde de votre instance [voir ce tutorial](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr) + +- Vérifiez que la nouvelle version est compatible avec la version PHP de votre serveur [voir PHP support](https://wiki.dolibarr.org/index.php/Releases). + - Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers fournis dans ce nouveau package. diff --git a/SECURITY.md b/SECURITY.md index cd3156bece9..b121b606180 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,9 +6,8 @@ This file contains some policies about the security reports on Dolibarr ERP CRM | Version | Supported | | ---------- | ---------------------- | -| <= 15.0.0 | :x: | -| >= 15.0.1+ | :white_check_mark: except CSRF attacks| -| >= 16.0.0 | :white_check_mark: | +| <= 16.0.2 | :x: | +| >= 16.0.3 | :white_check_mark: | | >= develop | :white_check_mark: | ## Reporting a Vulnerability diff --git a/build/debian/control b/build/debian/control index 059325eecb9..b2890253b32 100755 --- a/build/debian/control +++ b/build/debian/control @@ -19,7 +19,6 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php-pear, php-mail-mime, # php-tcpdf, # libfpdf-tpl-php, php-fpdf, -# libphp-adodb, # libnusoap-php, # libphp-pclzip, # Required javascript libraries diff --git a/build/debian/copyright b/build/debian/copyright index 403763544a5..b99b8a65b5d 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -61,31 +61,6 @@ License: GPL-3+ ------------------------------------------------------------ -Files: htdocs/includes/adodbtime/* -Copyright: 2003-2005, John Lim - unknown, jackbbs -License: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - . - Neither the name of the John Lim nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. -Comment: - Those files are not shipped in the binary package since we use - the library as packaged in "libphp-adodb". - - ------------------------------------------------------------- - Files: htdocs/includes/ckeditor/* Copyright: 2003-2012 CKSource - Frederico Knabben License: GPL-2+ diff --git a/build/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index 26a08a55826..6ba9123ede4 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -146,7 +146,6 @@ case "$1" in #else # File already exist. We add params not found. #echo Add new params to overwrite path to use shared libraries/fonts - #grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config ##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config #grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config #grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config diff --git a/build/debian/install.forced.php.install b/build/debian/install.forced.php.install index 1d10699f1d4..801b1b372af 100644 --- a/build/debian/install.forced.php.install +++ b/build/debian/install.forced.php.install @@ -31,7 +31,6 @@ $force_install_distrib='debian'; // - not removed from package (see rm in rules file), // - declared into dependencies (see Depends in control file) //$force_dolibarr_lib_TCPDF_PATH=''; -//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; //$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; //$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; diff --git a/build/debian/rules b/build/debian/rules index dab5d84fd11..b63fcffde93 100755 --- a/build/debian/rules +++ b/build/debian/rules @@ -89,7 +89,6 @@ override_dh_install: rm -fr build/zip # clean from all PHP embedded libraries (we use package dependencies instead) -# rm -fr htdocs/includes/adodbtime # rm -fr htdocs/includes/geoip # rm -fr htdocs/includes/nusoap # rm -fr htdocs/includes/odtphp/zip/pclzip diff --git a/build/debian/source/include-binaries b/build/debian/source/include-binaries deleted file mode 100644 index 021641d5c04..00000000000 --- a/build/debian/source/include-binaries +++ /dev/null @@ -1,2 +0,0 @@ -htdocs/install/doctemplates/websites/website_template-corporate.zip -htdocs/install/doctemplates/websites/website_template-stellar.zip \ No newline at end of file diff --git a/build/exe/doliwamp/README.md b/build/exe/doliwamp/README.md index be8cf1f3ac5..8f9878bfa29 100644 --- a/build/exe/doliwamp/README.md +++ b/build/exe/doliwamp/README.md @@ -9,3 +9,5 @@ The build of .exe files need to have some windows executable files already insta If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). + +!!! See file ../makepack-howto.txt diff --git a/build/exe/doliwamp/config.inc.php.install b/build/exe/doliwamp/config.inc.php.install index 6ad04752766..544cb116c7e 100644 --- a/build/exe/doliwamp/config.inc.php.install +++ b/build/exe/doliwamp/config.inc.php.install @@ -1,5 +1,4 @@ = 4.1.2, in libraries/tbl_properties.inc.php $cfg['AttributeTypes'] = array( diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 7065e20f92b..b122f9b0305 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -55,14 +55,24 @@ if (empty($argv[1])) { $i=0; +$result=array(); while ($i < $argc) { - if (! empty($argv[$i])) { - parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ... + if (!empty($argv[$i])) { + parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ... } - if (preg_match('/includeconstant=/', $argv[$i])) { - $tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str() + if (!empty($result["release"])) { + $release = $result["release"]; + } + if (!empty($result["includecustom"])) { + $includecustom = $result["includecustom"]; + } + if (!empty($result["includeconstant"])) { + $includeconstants[$i] = $result["includeconstant"]; + } + if (preg_match('/includeconstant=/', strval($argv[$i]))) { + $tmp=explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str() if (count($tmp) != 3) { - print "Error: Bad parameter includeconstant=".$includeconstant."\n"; + print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n"; exit -1; } $includeconstants[$tmp[0]][$tmp[1]] = $tmp[2]; @@ -71,7 +81,7 @@ while ($i < $argc) { } if (empty($release)) { - print "Error: Missing release paramater\n"; + print "Error: Missing release parameter\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-dolibarrmodule.pl b/build/makepack-dolibarrmodule.pl index 4a9a217b570..8fbb28dc35f 100755 --- a/build/makepack-dolibarrmodule.pl +++ b/build/makepack-dolibarrmodule.pl @@ -293,6 +293,7 @@ foreach my $PROJECT (@PROJECTLIST) { } print "Clean $BUILDROOT\n"; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`; + $ret=`rm -fr $BUILDROOT/$PROJECTLC/.git`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`; diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index be88302cd1d..7bc42a0bf88 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -8,13 +8,13 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi Prerequisites to build tgz, debian and rpm packages: > apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli -Prerequisites to build autoexe DoliWamp package: +Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04): > apt-get install wine q4wine > Launch "wine cmd" to check a drive Z: pointing to / exists. > Install InnoSetup For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/ > Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB - For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com). + For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com). See file build/exe/doliwamp.iss to know the doliwamp version currently setup. > Add path to ISCC into PATH windows var: Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH @@ -25,9 +25,21 @@ Prerequisites to build autoexe DoliWamp package: ***** Prerequisites For Windows ***** -Install Perl -Install WampServer-3.2.*-64.exe -isetup-5.5.8.exe +Prerequisites to build autoexe DoliWamp package from Windows: + +> Install Perl for Windwos (https://strawberryperl.com/) +> Install isetup-5.5.8.exe (https://www.jrsoftware.org) +> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss) +> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is") +> Install Dolibarr verions: + git clone https://github.com/dolibarr/dolibarr + +> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows. + +> Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content + = 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts +Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts Requires: mysql-server, mysql #BuildRequires: desktop-file-utils @@ -104,7 +104,6 @@ cui hai bisogno ed essere facile da usare. %{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name} %{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name} %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts @@ -165,6 +164,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/bookmarks +%_datadir/dolibarr/htdocs/bookcal %_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/collab @@ -274,7 +274,6 @@ if [ -s $config ] && grep -q "File generated by" $config then # File already exist. We add params not found. echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index a992c84f0f9..9cb8b71984d 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -46,7 +46,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} Group: Applications/Productivity -Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml +Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml Requires: mysql-server, mysql BuildRequires: desktop-file-utils %else @@ -169,7 +169,6 @@ cui hai bisogno ed essere facile da usare. %{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name} %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts %else @@ -246,6 +245,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/bookmarks +%_datadir/dolibarr/htdocs/bookcal %_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/collab @@ -425,7 +425,6 @@ if [ -s $config ] && grep -q "File generated by" $config then # File already exist. We add params not found. echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index a371e3ab02f..11c4fead2db 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -162,6 +162,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/bookmarks +%_datadir/dolibarr/htdocs/bookcal %_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/collab @@ -271,7 +272,6 @@ if [ -s $config ] && grep -q "File generated by" $config then # File already exist. We add params not found. echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index c7113828632..912aa28f8e8 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -67,7 +67,7 @@ Programmo web, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. -#---- prep +#---- prepo %prep %setup -q %patch0 -p0 -b .patch @@ -172,6 +172,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/bookmarks +%_datadir/dolibarr/htdocs/bookcal %_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/collab @@ -281,7 +282,6 @@ if [ -s $config ] && grep -q "File generated by" $config then # File already exist. We add params not found. echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config diff --git a/build/rpm/install.forced.php.fedora b/build/rpm/install.forced.php.fedora index a8bc0d390c6..636514260cf 100644 --- a/build/rpm/install.forced.php.fedora +++ b/build/rpm/install.forced.php.fedora @@ -20,7 +20,6 @@ $force_install_lockinstall='444'; $force_install_distrib='rpmfedora'; // Value to overwrite path to use shared libraries/fonts instead of embedded one -$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_GEOIP_PATH=''; $force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; diff --git a/build/rpm/install.forced.php.mandriva b/build/rpm/install.forced.php.mandriva index a254eebbf7b..5471d146391 100644 --- a/build/rpm/install.forced.php.mandriva +++ b/build/rpm/install.forced.php.mandriva @@ -20,7 +20,6 @@ $force_install_lockinstall='444'; $force_install_distrib='rpmmandriva'; // Value to overwrite path to use shared libraries/fonts instead of embedded one -$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_GEOIP_PATH=''; $force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; diff --git a/build/rpm/install.forced.php.opensuse b/build/rpm/install.forced.php.opensuse index 24da4417121..ea50180caf4 100644 --- a/build/rpm/install.forced.php.opensuse +++ b/build/rpm/install.forced.php.opensuse @@ -20,7 +20,6 @@ $force_install_lockinstall='444'; $force_install_distrib='rpmopensuse'; // Value to overwrite path to use shared libraries/fonts instead of embedded one -//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index cbfecbbc19f..461db52f959 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -283,6 +283,9 @@ RESTLER: elseif (count($value) && isset($value[0]) && is_numeric($value[0])) +* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1 + empty($value[0]) ? null : + empty($value[1]) ? null : +With swagger 2 provided into /explorer: ---------------------------------------- diff --git a/dev/examples/ldap/ldapsearch_sample1.txt b/dev/examples/ldap/ldapsearch_sample1.txt index a02ad632cd0..2a30f19ab22 100644 --- a/dev/examples/ldap/ldapsearch_sample1.txt +++ b/dev/examples/ldap/ldapsearch_sample1.txt @@ -1,28 +1,29 @@ # ldapsearch_sample1.txt # ldapsearch is into package ldap-utils on debian. # -# Use this sample to search into a ldap +# Use this samples to test a ldap_bind or to make a search into a ldap # # Anonymous access -# ldapsearch -h hostname -p 389 +# ldapsearch -h hostname -p 389 # # Login access (using a Bind DN) -# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password +# Such access must succeed to use LDAP as login module. +# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password +# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password +# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password +# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password # # Login access in SSL (using a Bind DN) -# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local +# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local" # If it fails, you may try to use "hostname" that is real name of certificate. # You must also check that /etc/ldap/ldap.conf contains the line TLS_CACERT /etc/ssl/certs/ca-certificates.crt # What to search -# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local" -# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra" -# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)" +# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local" +# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra" +# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)" # # Example to test a ldap search: -# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password +# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password diff --git a/dev/examples/zapier/triggers/action.js b/dev/examples/zapier/triggers/action.js index 0e152473869..86e4b747185 100644 --- a/dev/examples/zapier/triggers/action.js +++ b/dev/examples/zapier/triggers/action.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -84,7 +84,7 @@ const getFallbackRealAction = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/actions', +// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/actions', // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/contact.js b/dev/examples/zapier/triggers/contact.js index 2ba3bd226f8..ef83970e0b5 100644 --- a/dev/examples/zapier/triggers/contact.js +++ b/dev/examples/zapier/triggers/contact.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -76,7 +76,7 @@ const getFallbackRealContact = (z, bundle) => { // const getModulesChoices = (z/*, bundle*/) => { // // For the test poll, you should get some real data, to aid the setup process. // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices', // }; // return z.request(options).then((response) => JSON.parse(response.content)); @@ -94,7 +94,7 @@ const getFallbackRealContact = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`, // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/member.js b/dev/examples/zapier/triggers/member.js index 3385cdca625..68f80b30009 100644 --- a/dev/examples/zapier/triggers/member.js +++ b/dev/examples/zapier/triggers/member.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -76,7 +76,7 @@ const getFallbackRealMember = (z, bundle) => { // const getModulesChoices = (z/*, bundle*/) => { // // For the test poll, you should get some real data, to aid the setup process. // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices', // }; // return z.request(options).then((response) => JSON.parse(response.content)); @@ -94,7 +94,7 @@ const getFallbackRealMember = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`, // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/order.js b/dev/examples/zapier/triggers/order.js index 061ce218d10..2265c4da288 100644 --- a/dev/examples/zapier/triggers/order.js +++ b/dev/examples/zapier/triggers/order.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -74,7 +74,7 @@ const getFallbackRealOrder = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/orders', +// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/orders', // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/thirdparty.js b/dev/examples/zapier/triggers/thirdparty.js index 76194acbc9a..6c477b1174f 100644 --- a/dev/examples/zapier/triggers/thirdparty.js +++ b/dev/examples/zapier/triggers/thirdparty.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -83,7 +83,7 @@ const getFallbackRealThirdparty = (z, bundle) => { // const getModulesChoices = (z/*, bundle*/) => { // // For the test poll, you should get some real data, to aid the setup process. // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices', // }; // return z.request(options).then((response) => JSON.parse(response.content)); @@ -102,7 +102,7 @@ const getFallbackRealThirdparty = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`, // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/ticket.js b/dev/examples/zapier/triggers/ticket.js index c642099bd55..ee5a3f8efd7 100644 --- a/dev/examples/zapier/triggers/ticket.js +++ b/dev/examples/zapier/triggers/ticket.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -76,7 +76,7 @@ const getFallbackRealTicket = (z, bundle) => { // const getModulesChoices = (z/*, bundle*/) => { // // For the test poll, you should get some real data, to aid the setup process. // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices', // }; // return z.request(options).then((response) => JSON.parse(response.content)); @@ -97,7 +97,7 @@ const getFallbackRealTicket = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`, // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/examples/zapier/triggers/user.js b/dev/examples/zapier/triggers/user.js index 92209bb8651..a706bb9a3d6 100644 --- a/dev/examples/zapier/triggers/user.js +++ b/dev/examples/zapier/triggers/user.js @@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => { action: bundle.inputData.action }; - const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + const url = bundle.authData.url + '/api/index.php/zapier/hook'; // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. @@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => { // You can build requests and our client will helpfully inject all the variables // you need to complete. You can also register middleware to control this. const options = { - url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id, method: 'DELETE', }; @@ -73,7 +73,7 @@ const getFallbackRealUser = (z, bundle) => { // const getModulesChoices = (z/*, bundle*/) => { // // For the test poll, you should get some real data, to aid the setup process. // const options = { -// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices', // }; // return z.request(options).then((response) => JSON.parse(response.content)); @@ -93,7 +93,7 @@ const getFallbackRealUser = (z, bundle) => { // // For the test poll, you should get some real data, to aid the setup process. // const module = bundle.inputData.module; // const options = { -// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`, // }; // return z.request(options).then((response) => JSON.parse(response.content)); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 0b1c24dc139..8af71d441a1 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -152,7 +152,7 @@ $user->rights->propal->creer=1; $user->rights->propal->propal_advance->validate=1; -if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) { +if (!empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"; } diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 9214f34d810..d75c9fae8b2 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -218,7 +218,7 @@ if ($date == 'all') { } // Replace database handler -if (! empty($argv[4])) { +if (!empty($argv[4])) { $db->close(); unset($db); $db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]); diff --git a/dev/initdemo/mysqldump_dolibarr_16.0.0.sql b/dev/initdemo/mysqldump_dolibarr_17.0.0.sql similarity index 89% rename from dev/initdemo/mysqldump_dolibarr_16.0.0.sql rename to dev/initdemo/mysqldump_dolibarr_17.0.0.sql index 04bbc0288c3..1aa89804288 100644 --- a/dev/initdemo/mysqldump_dolibarr_16.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_17.0.0.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.19 Distrib 10.6.7-MariaDB, for debian-linux-gnu (x86_64) +-- MariaDB dump 10.19 Distrib 10.6.11-MariaDB, for debian-linux-gnu (x86_64) -- --- Host: localhost Database: dolibarr_16 +-- Host: localhost Database: dolibarr_17 -- ------------------------------------------------------ --- Server version 10.6.7-MariaDB-2ubuntu1 +-- Server version 10.6.11-MariaDB-0ubuntu0.22.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -27,19 +27,19 @@ 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(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `pcg_type` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL, - `account_number` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_pcg_version` varchar(32) NOT NULL, + `pcg_type` varchar(20) NOT NULL, + `account_number` varchar(20) DEFAULT NULL, `account_parent` int(11) DEFAULT 0, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `labelshort` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `labelshort` varchar(255) 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, `reconcilable` tinyint(4) NOT NULL DEFAULT 0, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_account` (`account_number`,`entity`,`fk_pcg_version`), KEY `idx_accountingaccount_fk_pcg_version` (`fk_pcg_version`), @@ -69,26 +69,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) COLLATE utf8mb3_unicode_ci NOT NULL, - `doc_ref` varchar(300) COLLATE utf8mb3_unicode_ci NOT NULL, + `doc_type` varchar(30) NOT NULL, + `doc_ref` varchar(300) NOT NULL, `fk_doc` int(11) NOT NULL, `fk_docdet` int(11) NOT NULL, - `thirdparty_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `numero_compte` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label_compte` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label_operation` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `thirdparty_code` varchar(32) DEFAULT NULL, + `numero_compte` varchar(20) DEFAULT NULL, + `label_compte` varchar(255) DEFAULT NULL, + `label_operation` varchar(255) DEFAULT NULL, `debit` double(24,8) DEFAULT NULL, `credit` double(24,8) DEFAULT NULL, `montant` double(24,8) DEFAULT NULL, - `sens` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `sens` varchar(1) DEFAULT NULL, `multicurrency_amount` double(24,8) DEFAULT NULL, - `multicurrency_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lettering_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(255) DEFAULT NULL, + `lettering_code` varchar(255) DEFAULT NULL, `date_lettering` datetime DEFAULT NULL, `fk_user_author` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_journal` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `journal_label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `code_journal` varchar(32) DEFAULT NULL, + `journal_label` varchar(255) DEFAULT NULL, `piece_num` int(11) NOT NULL, `date_validated` datetime DEFAULT NULL, `date_export` datetime DEFAULT NULL, @@ -96,9 +96,9 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `subledger_label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `subledger_account` varchar(32) DEFAULT NULL, + `subledger_label` varchar(255) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `date_lim_reglement` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -132,34 +132,34 @@ CREATE TABLE `llx_accounting_bookkeeping_tmp` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, `doc_date` date NOT NULL, - `doc_type` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, - `doc_ref` varchar(300) COLLATE utf8mb3_unicode_ci NOT NULL, + `doc_type` varchar(30) NOT NULL, + `doc_ref` varchar(300) NOT NULL, `fk_doc` int(11) NOT NULL, `fk_docdet` int(11) NOT NULL, - `thirdparty_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `subledger_account` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `subledger_label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `numero_compte` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label_compte` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `label_operation` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `thirdparty_code` varchar(32) DEFAULT NULL, + `subledger_account` varchar(32) DEFAULT NULL, + `subledger_label` varchar(255) DEFAULT NULL, + `numero_compte` varchar(32) DEFAULT NULL, + `label_compte` varchar(255) NOT NULL, + `label_operation` varchar(255) DEFAULT NULL, `debit` double(24,8) NOT NULL, `credit` double(24,8) NOT NULL, `montant` double(24,8) NOT NULL, - `sens` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `sens` varchar(1) DEFAULT NULL, `multicurrency_amount` double(24,8) DEFAULT NULL, - `multicurrency_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lettering_code` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(255) DEFAULT NULL, + `lettering_code` varchar(255) DEFAULT NULL, `date_lettering` datetime DEFAULT NULL, `fk_user_author` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_journal` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `journal_label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `code_journal` varchar(32) NOT NULL, + `journal_label` varchar(255) DEFAULT NULL, `piece_num` int(11) NOT NULL, `date_validated` datetime DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `date_lim_reglement` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -188,7 +188,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(128) NOT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, `statut` tinyint(4) NOT NULL DEFAULT 0, @@ -243,8 +243,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(20) DEFAULT NULL, + `label` varchar(128) NOT NULL, `nature` smallint(6) NOT NULL DEFAULT 0, `active` smallint(6) DEFAULT 0, `entity` int(11) DEFAULT 1, @@ -272,8 +272,8 @@ 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(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `pcg_version` varchar(32) NOT NULL, + `label` varchar(128) NOT NULL, `active` smallint(6) DEFAULT 0, `fk_country` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -300,14 +300,14 @@ DROP TABLE IF EXISTS `llx_actioncomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_actioncomm` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) NOT NULL, + `ref_ext` varchar(255) 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(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(50) DEFAULT NULL, + `label` varchar(255) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_author` int(11) DEFAULT NULL, @@ -322,31 +322,32 @@ CREATE TABLE `llx_actioncomm` ( `priority` smallint(6) DEFAULT NULL, `fulldayevent` smallint(6) NOT NULL DEFAULT 0, `percent` smallint(6) NOT NULL DEFAULT 0, - `location` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location` varchar(128) DEFAULT NULL, `durationp` double DEFAULT NULL, `durationa` double DEFAULT NULL, - `note` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` mediumtext DEFAULT NULL, `fk_element` int(11) DEFAULT NULL, - `elementtype` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_msgid` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_subject` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_from` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_sender` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_to` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_tocc` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_tobcc` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `errors_to` varchar(256) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `recurid` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `recurrule` varchar(128) COLLATE utf8mb3_unicode_ci 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, `recurdateend` datetime DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `calling_duration` int(11) DEFAULT NULL, - `visibility` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT 'default', - `reply_to` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `visibility` varchar(12) DEFAULT 'default', + `reply_to` varchar(255) DEFAULT NULL, `num_vote` int(11) DEFAULT NULL, `event_paid` smallint(6) NOT NULL DEFAULT 0, `status` smallint(6) NOT NULL DEFAULT 0, + `ip` varchar(250) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_actioncomm_ref` (`ref`,`entity`), KEY `idx_actioncomm_fk_soc` (`fk_soc`), @@ -358,7 +359,8 @@ CREATE TABLE `llx_actioncomm` ( KEY `idx_actioncomm_datep` (`datep`), KEY `idx_actioncomm_datep2` (`datep2`), KEY `idx_actioncomm_recurid` (`recurid`), - KEY `idx_actioncomm_ref_ext` (`ref_ext`) + KEY `idx_actioncomm_ref_ext` (`ref_ext`), + KEY `idx_actioncomm_percent` (`percent`) ) ENGINE=InnoDB AUTO_INCREMENT=608 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -368,7 +370,7 @@ CREATE TABLE `llx_actioncomm` ( LOCK TABLES `llx_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_actioncomm` VALUES (1,'1',NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(2,'2',NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(3,'3',NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(4,'4',NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(5,'5',NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2021-04-15 10:22:55',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(6,'6',NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(7,'7',NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(8,'8',NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2021-04-15 10:22:55',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(9,'9',NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(10,'10',NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(11,'11',NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(12,'12',NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(13,'13',NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(14,'14',NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(15,'15',NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(16,'16',NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(17,'17',NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(18,'18',NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(19,'19',NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(20,'20',NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(21,'21',NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(22,'22',NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(23,'23',NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(24,'24',NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(25,'25',NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2021-04-15 10:22:55',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(26,'26',NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2021-04-15 10:22:55',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(27,'27',NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(28,'28',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(29,'29',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(30,'30',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(31,'31',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(38,'38',NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(40,'40',NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(41,'41',NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(42,'42',NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(43,'43',NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(44,'44',NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(45,'45',NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(46,'46',NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(47,'47',NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(48,'48',NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(49,'49',NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(50,'50',NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(51,'51',NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(52,'52',NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(53,'53',NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(54,'54',NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(55,'55',NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(56,'56',NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(121,'121',NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2021-04-15 10:22:55',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(122,'122',NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(123,'123',NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(124,'124',NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(125,'125',NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2021-04-15 10:22:55',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(127,'127',NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(128,'128',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(129,'129',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(130,'130',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(131,'131',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(132,'132',NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(133,'133',NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2021-04-15 10:22:55',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(134,'134',NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2021-04-15 10:22:55',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(135,'135',NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2021-04-15 10:22:55',1,1,NULL,7,NULL,0,1,NULL,1,0,0,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(136,'136',NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(137,'137',NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(138,'138',NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(139,'139',NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(140,'140',NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(141,'141',NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(142,'142',NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2021-04-15 10:22:55',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(143,'143',NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(144,'144',NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(145,'145',NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(146,'146',NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(147,'147',NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(148,'148',NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(149,'149',NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(150,'150',NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(151,'151',NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2021-04-15 10:22:55',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(152,'152',NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(203,'203',NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(204,'204',NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2021-04-15 10:22:55',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(205,'205',NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(206,'206',NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(207,'207',NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(208,'208',NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(209,'209',NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(210,'210',NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(211,'211',NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(212,'212',NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(213,'213',NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2021-04-15 10:22:55',1,NULL,NULL,27,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(214,'214',NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2021-04-15 10:22:55',1,NULL,NULL,28,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(215,'215',NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2021-04-15 10:22:55',1,NULL,NULL,29,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(216,'216',NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2021-04-15 10:22:55',1,NULL,NULL,30,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(217,'217',NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2021-04-15 10:22:55',1,NULL,NULL,31,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(218,'218',NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2021-04-15 10:22:55',1,NULL,NULL,32,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(219,'219',NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2021-04-15 10:22:55',1,NULL,NULL,33,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(220,'220',NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(221,'221',NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(222,'222',NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(223,'223',NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(224,'224',NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(225,'225',NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(226,'226',NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(227,'227',NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(228,'228',NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(229,'229',NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(230,'230',NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(231,'231',NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(232,'232',NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(233,'233',NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(234,'234',NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(235,'235',NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2021-04-15 10:22:55',12,NULL,4,NULL,2,0,12,1,NULL,0,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(236,'236',NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(237,'237',NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2021-04-15 10:22:55',12,NULL,6,4,NULL,0,13,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(238,'238',NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2021-04-15 10:22:55',12,NULL,8,10,10,0,12,1,NULL,0,0,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(239,'239',NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(240,'240',NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2021-04-15 10:22:55',12,12,6,NULL,NULL,0,12,1,NULL,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(242,'242',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(243,'243',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(245,'245',NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(249,'249',NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(250,'250',NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(251,'251',NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2021-04-15 10:22:55',12,NULL,5,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(252,'252',NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(253,'253',NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(254,'254',NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(255,'255',NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(256,'256',NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(257,'257',NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(263,'263',NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(264,'264',NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2021-04-15 10:22:55',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(265,'265',NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(266,'266',NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(267,'267',NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(268,'268',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(269,'269',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(270,'270',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(271,'271',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(272,'272',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(273,'273',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(274,'274',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(275,'275',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(277,'277',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(278,'278',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(279,'279',NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(281,'281',NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(282,'282',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(283,'283',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(284,'284',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(285,'285',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(286,'286',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(287,'287',NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(288,'288',NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(294,'294',NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(295,'295',NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(296,'296',NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(297,'297',NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(298,'298',NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(299,'299',NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(300,'300',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(301,'301',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(302,'302',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(303,'303',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(304,'304',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(305,'305',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(306,'306',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(307,'307',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(308,'308',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(309,'309',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(310,'310',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(311,'311',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(312,'312',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(313,'313',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(314,'314',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(315,'315',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(316,'316',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(317,'317',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(318,'318',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(319,'319',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(320,'320',NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(321,'321',NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(322,'322',NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(323,'323',NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(324,'324',NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(325,'325',NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(326,'326',NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(327,'327',NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2021-04-15 10:22:55',12,NULL,NULL,11,12,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(328,'328',NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(329,'329',NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(330,'330',NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(331,'331',NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(333,'333',NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2021-04-15 10:22:55',12,NULL,4,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(335,'335',NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(337,'337',NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(338,'338',NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(339,'339',NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(340,'340',NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(341,'341',NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(342,'342',NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(343,'343',NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(344,'344',NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(345,'345',NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(346,'346',NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(347,'347',NULL,1,'2019-09-30 15:49:52',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(348,'348',NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(349,'349',NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(350,'350',NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(351,'351',NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(352,'352',NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(353,'353',NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(354,'354',NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(355,'355',NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(356,'356',NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(357,'357',NULL,1,'2019-10-04 16:56:21',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(358,'358',NULL,1,'2019-10-04 17:08:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(359,'359',NULL,1,'2019-10-04 17:25:05',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(360,'360',NULL,1,'2019-10-04 17:26:14',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(361,'361',NULL,1,'2019-10-04 17:30:10',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(362,'362',NULL,1,'2019-10-04 17:51:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(363,'363',NULL,1,'2019-10-04 17:52:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(364,'364',NULL,1,'2019-10-04 17:52:17',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(365,'365',NULL,1,'2019-10-04 17:52:39',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(366,'366',NULL,1,'2019-10-04 17:52:53',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(367,'367',NULL,1,'2019-10-04 17:53:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(368,'368',NULL,1,'2019-10-04 17:53:26',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(369,'369',NULL,1,'2019-10-04 17:53:48',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(370,'370',NULL,1,'2019-10-04 17:54:09',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(371,'371',NULL,1,'2019-10-04 17:54:28',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(372,'372',NULL,1,'2019-10-04 17:55:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(373,'373',NULL,1,'2019-10-04 17:56:01',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(374,'374',NULL,1,'2019-10-04 18:00:32',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(375,'375',NULL,1,'2019-10-04 18:00:58',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(376,'376',NULL,1,'2019-10-04 18:11:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(377,'377',NULL,1,'2019-10-04 18:12:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(378,'378',NULL,1,'2019-10-04 18:49:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(379,'379',NULL,1,'2019-10-04 19:00:22',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(380,'380',NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(381,'381',NULL,1,'2019-10-04 19:30:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(382,'382',NULL,1,'2019-10-04 19:32:55',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(383,'383',NULL,1,'2019-10-04 19:37:16',NULL,50,'TICKET_MSG','','2019-10-04 19:37:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(384,'384',NULL,1,'2019-10-04 19:39:07',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(385,'385',NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(386,'386',NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(387,'387',NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(388,'388',NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(389,'389',NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(390,'390',NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(391,'391',NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(392,'392',NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(393,'393',NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(394,'394',NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(395,'395',NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(396,'396',NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(397,'397',NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(398,'398',NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(399,'399',NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(400,'400',NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(401,'401',NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(402,'402',NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(403,'403',NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(404,'404',NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(405,'405',NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(406,'406',NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(407,'407',NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(408,'408',NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(409,'409',NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(410,'410',NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(411,'411',NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(412,'412',NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(413,'413',NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(414,'414',NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(415,'415',NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(416,'416',NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(417,'417',NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(418,'418',NULL,1,'2019-11-29 12:47:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(419,'419',NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(420,'420',NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(421,'421',NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(422,'422',NULL,1,'2019-11-29 12:54:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(423,'423',NULL,1,'2019-11-29 12:54:46',NULL,50,'TICKET_MSG','','2019-11-29 12:54:46','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(424,'424',NULL,1,'2019-11-29 12:55:42',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(425,'425',NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(426,'426',NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(427,'427',NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(428,'428',NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(429,'429',NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(430,'430',NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(431,'431',NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2021-04-15 10:22:55',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(432,'432',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(433,'433',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(434,'434',NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(435,'435',NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(436,'436',NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(437,'437',NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(438,'438',NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(439,'439',NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(440,'440',NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(441,'441',NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(442,'442',NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(443,'443',NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(444,'444',NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(445,'445',NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(446,'446',NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(447,'447',NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(448,'448',NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(449,'449',NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(450,'450',NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(451,'451',NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(452,'452',NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(453,'453',NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(454,'454',NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(455,'455',NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2021-04-15 10:22:55',12,NULL,10,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(456,'456',NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(457,'457',NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2021-04-15 10:22:55',12,NULL,12,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(458,'458',NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2021-04-15 10:22:55',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(459,'459',NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2021-04-15 10:22:55',12,NULL,13,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(460,'460',NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(461,'461',NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(462,'462',NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(463,'463',NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(464,'464',NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(465,'465',NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(466,'466',NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(467,'467',NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(468,'468',NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(469,'469',NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(470,'470',NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(471,'471',NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(472,'472',NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(473,'473',NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(478,'478',NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(483,'483',NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(484,'484',NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(485,'485',NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(486,'486',NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(487,'487',NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(488,'488',NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(489,'489',NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(490,'490',NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(491,'491',NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(492,'492',NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(493,'493',NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(494,'494',NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(495,'495',NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(496,'496',NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(497,'497',NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(498,'498',NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(499,'499',NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(500,'500',NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(501,'501',NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(502,'502',NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(503,'503',NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(504,'504',NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(505,'505',NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(506,'506',NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(507,'507',NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(508,'508',NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(509,'509',NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(511,'511',NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(512,'512',NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(513,'513',NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(514,'514',NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(515,'515',NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(516,'516',NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(517,'517',NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(518,'518',NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(519,'519',NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(520,'520',NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(521,'521',NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(522,'522',NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(523,'523',NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(524,'524',NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(525,'525',NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(526,'526',NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(527,'527',NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(528,'528',NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(529,'529',NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(530,'530',NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(531,'531',NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(532,'532',NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(533,'533',NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(534,'534',NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(535,'535',NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(536,'536',NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(537,'537',NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(538,'538',NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(539,'539',NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(540,'540',NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(541,'541',NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(542,'542',NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(543,'543',NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(544,'544',NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(545,'545',NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(546,'546',NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(547,'547',NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(548,'548',NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(549,'549',NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(550,'550',NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(551,'551',NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(552,'552',NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(553,'553',NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(554,'554',NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(555,'555',NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(556,'556',NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(557,'557',NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(558,'558',NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(559,'559',NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(560,'560',NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(561,'561',NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(562,'562',NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2021-04-15 10:22:55',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(563,'563',NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2021-04-15 10:22:55',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(564,'564',NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2021-04-15 10:22:55',12,NULL,3,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(565,'565',NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(566,'566',NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(567,'567',NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(568,'568',NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(569,'569',NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(570,'570',NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(571,'571',NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(572,'572',NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(573,'573',NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(574,'574',NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(575,'575',NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(576,'576',NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(577,'577',NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(578,'578',NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(579,'579',NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(580,'580',NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(581,'581',NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(582,'582',NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(583,'583',NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(584,'584',NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(585,'585',NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(586,'586',NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(588,'588',NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(589,'589',NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(590,'590',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(591,'591',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(592,'592',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(593,'593',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(594,'594',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(595,'595',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(596,'596',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(597,'597',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(598,'598',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(599,'599',NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(600,'600',NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(601,'601',NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(602,'602',NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(603,'603',NULL,1,'2020-06-12 10:00:00','2020-06-12 11:30:00',5,'AC_RDV','Meetings','2020-06-12 19:26:44','2021-04-15 10:22:55',12,NULL,3,NULL,NULL,0,12,1,NULL,0,0,-1,'Room 24',5400,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(604,'604',NULL,1,'2020-06-01 10:00:00','2020-06-01 10:27:00',1,'AC_TEL','Called Mr X','2020-06-12 19:28:13','2021-04-15 10:22:55',12,12,3,NULL,NULL,0,12,1,NULL,0,0,100,NULL,1620,NULL,'Customer ask another call.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(605,'605',NULL,1,'2020-04-15 05:00:00','2020-04-15 06:00:00',5,'AC_RDV','Meet A2','2021-04-15 07:36:31','2021-04-15 10:36:31',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(606,'606',NULL,1,'2021-04-15 08:38:02','2021-04-15 08:38:02',40,'AC_PRODUCT_CREATE','Product PRODSER created','2021-04-15 08:38:02','2021-04-15 11:38:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PRODSER created',31,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(607,'607',NULL,1,'2022-02-07 13:54:11','2022-02-07 13:54:11',40,'AC_BOM_VALIDATE','BOM validated','2022-02-07 13:54:11','2022-02-07 13:54:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0); +INSERT INTO `llx_actioncomm` VALUES (1,'1',NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(2,'2',NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(3,'3',NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(4,'4',NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(5,'5',NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2021-04-15 10:22:55',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(6,'6',NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(7,'7',NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(8,'8',NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2021-04-15 10:22:55',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(9,'9',NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(10,'10',NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(11,'11',NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(12,'12',NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(13,'13',NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(14,'14',NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(15,'15',NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(16,'16',NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(17,'17',NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(18,'18',NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(19,'19',NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(20,'20',NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(21,'21',NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(22,'22',NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(23,'23',NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(24,'24',NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(25,'25',NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2021-04-15 10:22:55',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(26,'26',NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2021-04-15 10:22:55',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(27,'27',NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(28,'28',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(29,'29',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(30,'30',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(31,'31',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(38,'38',NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(40,'40',NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(41,'41',NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(42,'42',NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(43,'43',NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(44,'44',NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(45,'45',NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(46,'46',NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(47,'47',NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(48,'48',NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(49,'49',NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(50,'50',NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(51,'51',NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(52,'52',NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(53,'53',NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(54,'54',NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(55,'55',NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(56,'56',NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(121,'121',NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2021-04-15 10:22:55',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(122,'122',NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(123,'123',NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(124,'124',NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(125,'125',NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2021-04-15 10:22:55',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(127,'127',NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(128,'128',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(129,'129',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(130,'130',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(131,'131',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(132,'132',NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(133,'133',NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2021-04-15 10:22:55',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(134,'134',NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2021-04-15 10:22:55',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(135,'135',NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2021-04-15 10:22:55',1,1,NULL,7,NULL,0,1,NULL,1,0,0,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(136,'136',NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(137,'137',NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(138,'138',NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(139,'139',NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(140,'140',NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(141,'141',NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(142,'142',NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2021-04-15 10:22:55',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(143,'143',NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(144,'144',NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(145,'145',NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(146,'146',NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(147,'147',NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(148,'148',NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(149,'149',NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(150,'150',NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(151,'151',NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2021-04-15 10:22:55',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(152,'152',NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(203,'203',NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(204,'204',NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2021-04-15 10:22:55',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(205,'205',NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(206,'206',NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(207,'207',NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(208,'208',NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(209,'209',NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(210,'210',NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(211,'211',NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(212,'212',NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(213,'213',NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2021-04-15 10:22:55',1,NULL,NULL,27,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(214,'214',NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2021-04-15 10:22:55',1,NULL,NULL,28,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(215,'215',NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2021-04-15 10:22:55',1,NULL,NULL,29,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(216,'216',NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2021-04-15 10:22:55',1,NULL,NULL,30,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(217,'217',NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2021-04-15 10:22:55',1,NULL,NULL,31,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(218,'218',NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2021-04-15 10:22:55',1,NULL,NULL,32,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(219,'219',NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2021-04-15 10:22:55',1,NULL,NULL,33,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(220,'220',NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(221,'221',NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(222,'222',NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(223,'223',NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(224,'224',NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(225,'225',NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(226,'226',NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(227,'227',NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(228,'228',NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(229,'229',NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(230,'230',NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(231,'231',NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(232,'232',NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(233,'233',NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(234,'234',NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(235,'235',NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2021-04-15 10:22:55',12,NULL,4,NULL,2,0,12,1,NULL,0,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(236,'236',NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(237,'237',NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2021-04-15 10:22:55',12,NULL,6,4,NULL,0,13,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(238,'238',NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2021-04-15 10:22:55',12,NULL,8,10,10,0,12,1,NULL,0,0,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(239,'239',NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(240,'240',NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2021-04-15 10:22:55',12,12,6,NULL,NULL,0,12,1,NULL,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(242,'242',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(243,'243',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(245,'245',NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(249,'249',NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(250,'250',NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(251,'251',NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2021-04-15 10:22:55',12,NULL,5,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(252,'252',NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(253,'253',NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(254,'254',NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(255,'255',NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(256,'256',NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(257,'257',NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(263,'263',NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(264,'264',NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2021-04-15 10:22:55',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(265,'265',NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(266,'266',NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(267,'267',NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(268,'268',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(269,'269',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(270,'270',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(271,'271',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(272,'272',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(273,'273',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(274,'274',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(275,'275',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(277,'277',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(278,'278',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(279,'279',NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(281,'281',NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(282,'282',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(283,'283',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(284,'284',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(285,'285',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(286,'286',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(287,'287',NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(288,'288',NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(294,'294',NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(295,'295',NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(296,'296',NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(297,'297',NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(298,'298',NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(299,'299',NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(300,'300',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(301,'301',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(302,'302',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(303,'303',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(304,'304',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(305,'305',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(306,'306',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(307,'307',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(308,'308',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(309,'309',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(310,'310',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(311,'311',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(312,'312',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(313,'313',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(314,'314',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(315,'315',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(316,'316',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(317,'317',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(318,'318',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(319,'319',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(320,'320',NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(321,'321',NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(322,'322',NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(323,'323',NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(324,'324',NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(325,'325',NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(326,'326',NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(327,'327',NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2021-04-15 10:22:55',12,NULL,NULL,11,12,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(328,'328',NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(329,'329',NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(330,'330',NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(331,'331',NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(333,'333',NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2021-04-15 10:22:55',12,NULL,4,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(335,'335',NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(337,'337',NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(338,'338',NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(339,'339',NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(340,'340',NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(341,'341',NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(342,'342',NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(343,'343',NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(344,'344',NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(345,'345',NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(346,'346',NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(347,'347',NULL,1,'2019-09-30 15:49:52',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(348,'348',NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(349,'349',NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(350,'350',NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(351,'351',NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(352,'352',NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(353,'353',NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(354,'354',NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(355,'355',NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(356,'356',NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(357,'357',NULL,1,'2019-10-04 16:56:21',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(358,'358',NULL,1,'2019-10-04 17:08:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(359,'359',NULL,1,'2019-10-04 17:25:05',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(360,'360',NULL,1,'2019-10-04 17:26:14',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(361,'361',NULL,1,'2019-10-04 17:30:10',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(362,'362',NULL,1,'2019-10-04 17:51:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(363,'363',NULL,1,'2019-10-04 17:52:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(364,'364',NULL,1,'2019-10-04 17:52:17',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(365,'365',NULL,1,'2019-10-04 17:52:39',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(366,'366',NULL,1,'2019-10-04 17:52:53',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(367,'367',NULL,1,'2019-10-04 17:53:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(368,'368',NULL,1,'2019-10-04 17:53:26',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(369,'369',NULL,1,'2019-10-04 17:53:48',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(370,'370',NULL,1,'2019-10-04 17:54:09',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(371,'371',NULL,1,'2019-10-04 17:54:28',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(372,'372',NULL,1,'2019-10-04 17:55:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(373,'373',NULL,1,'2019-10-04 17:56:01',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(374,'374',NULL,1,'2019-10-04 18:00:32',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(375,'375',NULL,1,'2019-10-04 18:00:58',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(376,'376',NULL,1,'2019-10-04 18:11:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(377,'377',NULL,1,'2019-10-04 18:12:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(378,'378',NULL,1,'2019-10-04 18:49:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(379,'379',NULL,1,'2019-10-04 19:00:22',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(380,'380',NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(381,'381',NULL,1,'2019-10-04 19:30:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(382,'382',NULL,1,'2019-10-04 19:32:55',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(383,'383',NULL,1,'2019-10-04 19:37:16',NULL,50,'TICKET_MSG','','2019-10-04 19:37:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(384,'384',NULL,1,'2019-10-04 19:39:07',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(385,'385',NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(386,'386',NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(387,'387',NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(388,'388',NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(389,'389',NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(390,'390',NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(391,'391',NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(392,'392',NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(393,'393',NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(394,'394',NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(395,'395',NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(396,'396',NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(397,'397',NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(398,'398',NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(399,'399',NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(400,'400',NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(401,'401',NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(402,'402',NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(403,'403',NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(404,'404',NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(405,'405',NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(406,'406',NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(407,'407',NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(408,'408',NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(409,'409',NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(410,'410',NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(411,'411',NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(412,'412',NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(413,'413',NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(414,'414',NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(415,'415',NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(416,'416',NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(417,'417',NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(418,'418',NULL,1,'2019-11-29 12:47:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(419,'419',NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(420,'420',NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(421,'421',NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(422,'422',NULL,1,'2019-11-29 12:54:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(423,'423',NULL,1,'2019-11-29 12:54:46',NULL,50,'TICKET_MSG','','2019-11-29 12:54:46','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(424,'424',NULL,1,'2019-11-29 12:55:42',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(425,'425',NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(426,'426',NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(427,'427',NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(428,'428',NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(429,'429',NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(430,'430',NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(431,'431',NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2021-04-15 10:22:55',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(432,'432',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(433,'433',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(434,'434',NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(435,'435',NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(436,'436',NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(437,'437',NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(438,'438',NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(439,'439',NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(440,'440',NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(441,'441',NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(442,'442',NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(443,'443',NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(444,'444',NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(445,'445',NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(446,'446',NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(447,'447',NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(448,'448',NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(449,'449',NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(450,'450',NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(451,'451',NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(452,'452',NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(453,'453',NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(454,'454',NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(455,'455',NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2021-04-15 10:22:55',12,NULL,10,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(456,'456',NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(457,'457',NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2021-04-15 10:22:55',12,NULL,12,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(458,'458',NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2021-04-15 10:22:55',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(459,'459',NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2021-04-15 10:22:55',12,NULL,13,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(460,'460',NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(461,'461',NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(462,'462',NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(463,'463',NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(464,'464',NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(465,'465',NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(466,'466',NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(467,'467',NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(468,'468',NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(469,'469',NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(470,'470',NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(471,'471',NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(472,'472',NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(473,'473',NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(478,'478',NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(483,'483',NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(484,'484',NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(485,'485',NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(486,'486',NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(487,'487',NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(488,'488',NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(489,'489',NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(490,'490',NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(491,'491',NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(492,'492',NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(493,'493',NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(494,'494',NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(495,'495',NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(496,'496',NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(497,'497',NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(498,'498',NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(499,'499',NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(500,'500',NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(501,'501',NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(502,'502',NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(503,'503',NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(504,'504',NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(505,'505',NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(506,'506',NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(507,'507',NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(508,'508',NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(509,'509',NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(511,'511',NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(512,'512',NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(513,'513',NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(514,'514',NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(515,'515',NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(516,'516',NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(517,'517',NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(518,'518',NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(519,'519',NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(520,'520',NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(521,'521',NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(522,'522',NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(523,'523',NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(524,'524',NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(525,'525',NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(526,'526',NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(527,'527',NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(528,'528',NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(529,'529',NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(530,'530',NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(531,'531',NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(532,'532',NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(533,'533',NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(534,'534',NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(535,'535',NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(536,'536',NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(537,'537',NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(538,'538',NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(539,'539',NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(540,'540',NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(541,'541',NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(542,'542',NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(543,'543',NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(544,'544',NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(545,'545',NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(546,'546',NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(547,'547',NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(548,'548',NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(549,'549',NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(550,'550',NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(551,'551',NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(552,'552',NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(553,'553',NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(554,'554',NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(555,'555',NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(556,'556',NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(557,'557',NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(558,'558',NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(559,'559',NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(560,'560',NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(561,'561',NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(562,'562',NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2021-04-15 10:22:55',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(563,'563',NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2021-04-15 10:22:55',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(564,'564',NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2021-04-15 10:22:55',12,NULL,3,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(565,'565',NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(566,'566',NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(567,'567',NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(568,'568',NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(569,'569',NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(570,'570',NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(571,'571',NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(572,'572',NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(573,'573',NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(574,'574',NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(575,'575',NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(576,'576',NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(577,'577',NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(578,'578',NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(579,'579',NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(580,'580',NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(581,'581',NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(582,'582',NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(583,'583',NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(584,'584',NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(585,'585',NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(586,'586',NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(588,'588',NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(589,'589',NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(590,'590',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(591,'591',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(592,'592',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(593,'593',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(594,'594',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(595,'595',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(596,'596',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(597,'597',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(598,'598',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(599,'599',NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(600,'600',NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(601,'601',NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(602,'602',NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(603,'603',NULL,1,'2020-06-12 10:00:00','2020-06-12 11:30:00',5,'AC_RDV','Meetings','2020-06-12 19:26:44','2021-04-15 10:22:55',12,NULL,3,NULL,NULL,0,12,1,NULL,0,0,-1,'Room 24',5400,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(604,'604',NULL,1,'2020-06-01 10:00:00','2020-06-01 10:27:00',1,'AC_TEL','Called Mr X','2020-06-12 19:28:13','2021-04-15 10:22:55',12,12,3,NULL,NULL,0,12,1,NULL,0,0,100,NULL,1620,NULL,'Customer ask another call.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(605,'605',NULL,1,'2020-04-15 05:00:00','2020-04-15 06:00:00',5,'AC_RDV','Meet A2','2021-04-15 07:36:31','2021-04-15 10:36:31',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(606,'606',NULL,1,'2021-04-15 08:38:02','2021-04-15 08:38:02',40,'AC_PRODUCT_CREATE','Product PRODSER created','2021-04-15 08:38:02','2021-04-15 11:38:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PRODSER created',31,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL),(607,'607',NULL,1,'2022-02-07 13:54:11','2022-02-07 13:54:11',40,'AC_BOM_VALIDATE','BOM validated','2022-02-07 13:54:11','2022-02-07 13:54:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0,NULL); /*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -383,7 +385,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_actioncomm_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -408,15 +410,15 @@ DROP TABLE IF EXISTS `llx_actioncomm_reminder`; CREATE TABLE `llx_actioncomm_reminder` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `dateremind` datetime NOT NULL, - `typeremind` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `typeremind` varchar(32) NOT NULL, `fk_user` int(11) NOT NULL, `offsetvalue` int(11) NOT NULL, - `offsetunit` varchar(1) COLLATE utf8mb3_unicode_ci NOT NULL, + `offsetunit` varchar(1) NOT NULL, `status` int(11) NOT NULL DEFAULT 0, `entity` int(11) NOT NULL DEFAULT 1, `fk_actioncomm` int(11) NOT NULL, `fk_email_template` int(11) DEFAULT NULL, - `lasterror` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lasterror` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_reminder_unique` (`fk_user`,`typeremind`,`offsetvalue`,`offsetunit`,`fk_actioncomm`), KEY `idx_actioncomm_reminder_rowid` (`rowid`), @@ -445,9 +447,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `element_type` varchar(50) NOT NULL, `fk_element` int(11) NOT NULL, - `answer_status` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `answer_status` varchar(50) DEFAULT NULL, `mandatory` smallint(6) DEFAULT NULL, `transparency` smallint(6) DEFAULT 1, PRIMARY KEY (`rowid`), @@ -475,47 +477,49 @@ DROP TABLE IF EXISTS `llx_adherent`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `civility` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `firstname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `login` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass_crypted` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, `fk_adherent_type` int(11) NOT NULL, - `morphy` varchar(3) COLLATE utf8mb3_unicode_ci NOT NULL, - `societe` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `morphy` varchar(3) NOT NULL, + `societe` varchar(128) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `address` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `address` text DEFAULT NULL, + `zip` varchar(10) DEFAULT NULL, + `town` varchar(50) DEFAULT NULL, `state_id` int(11) DEFAULT NULL, `country` int(11) DEFAULT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone_perso` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone_mobile` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `socialnetworks` text DEFAULT NULL, + `phone` varchar(30) DEFAULT NULL, + `phone_perso` varchar(30) DEFAULT NULL, + `phone_mobile` varchar(30) DEFAULT NULL, `birth` date DEFAULT NULL, - `photo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `photo` varchar(255) DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT 0, `public` smallint(6) NOT NULL DEFAULT 0, `datefin` datetime DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_lang` varchar(6) DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `gender` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `gender` varchar(10) DEFAULT NULL, + `ip` varchar(250) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_adherent_ref` (`ref`,`entity`), UNIQUE KEY `uk_adherent_login` (`login`,`entity`), @@ -532,7 +536,7 @@ CREATE TABLE `llx_adherent` ( LOCK TABLES `llx_adherent` WRITE; /*!40000 ALTER TABLE `llx_adherent` DISABLE KEYS */; -INSERT INTO `llx_adherent` VALUES (1,'1',1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com',NULL,'[]',NULL,NULL,NULL,'1960-07-07','person5.jpeg',0,0,'2014-07-09 00:00:00',NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2021-04-15 10:22:54',1,12,12,NULL,NULL,NULL,'woman'),(2,'2',1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com',NULL,'[]',NULL,NULL,NULL,NULL,'pierrecurie.jpg',1,1,'2020-07-17 00:00:00',NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL),(3,'3',1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com',NULL,'[]',NULL,NULL,NULL,NULL,'person9.jpeg',1,0,'2014-07-17 00:00:00',NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL),(4,'4',1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com',NULL,'[]',NULL,NULL,NULL,NULL,'person2.jpeg',1,0,'2018-07-17 00:00:00',NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL); +INSERT INTO `llx_adherent` VALUES (1,'1',1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com',NULL,'[]',NULL,NULL,NULL,'1960-07-07','person5.jpeg',0,0,'2014-07-09 00:00:00',NULL,NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2021-04-15 10:22:54',1,12,12,NULL,NULL,NULL,'woman',NULL),(2,'2',1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com',NULL,'[]',NULL,NULL,NULL,NULL,'pierrecurie.jpg',1,1,'2020-07-17 00:00:00',NULL,NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL),(3,'3',1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com',NULL,'[]',NULL,NULL,NULL,NULL,'person9.jpeg',1,0,'2014-07-17 00:00:00',NULL,NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL),(4,'4',1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com',NULL,'[]',NULL,NULL,NULL,NULL,'person2.jpeg',1,0,'2018-07-17 00:00:00',NULL,NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_adherent` ENABLE KEYS */; UNLOCK TABLES; @@ -547,10 +551,10 @@ 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, - `aaa` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `sssss` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extradatamember` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `aaa` varchar(255) DEFAULT NULL, + `sssss` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extradatamember` varchar(10) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_options` (`fk_object`), KEY `idx_adherent_extrafields` (`fk_object`) @@ -579,14 +583,15 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `subscription` varchar(3) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '1', + `libelle` varchar(50) NOT NULL, + `subscription` varchar(3) NOT NULL DEFAULT '1', `amount` double(24,8) DEFAULT NULL, - `vote` varchar(3) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '1', - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `mail_valid` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `morphy` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `duration` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `caneditamount` int(11) DEFAULT 0, + `vote` varchar(3) NOT NULL DEFAULT '1', + `note` text DEFAULT NULL, + `mail_valid` text DEFAULT NULL, + `morphy` varchar(3) DEFAULT NULL, + `duration` varchar(6) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_adherent_type_libelle` (`libelle`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -598,7 +603,7 @@ CREATE TABLE `llx_adherent_type` ( LOCK TABLES `llx_adherent_type` WRITE; /*!40000 ALTER TABLE `llx_adherent_type` DISABLE KEYS */; -INSERT INTO `llx_adherent_type` VALUES (1,1,'2020-06-12 17:20:50',1,'Board members','1',NULL,'1','','','','1y'),(2,1,'2020-06-12 17:21:21',1,'Standard members','1',NULL,'1','','','','y'); +INSERT INTO `llx_adherent_type` VALUES (1,1,'2020-06-12 17:20:50',1,'Board members','1',NULL,0,'1','','','','1y'),(2,1,'2020-06-12 17:21:21',1,'Standard members','1',NULL,0,'1','','','','y'); /*!40000 ALTER TABLE `llx_adherent_type` ENABLE KEYS */; UNLOCK TABLES; @@ -613,8 +618,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extradatamembertype` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extradatamembertype` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_type_extrafields` (`fk_object`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -640,11 +645,11 @@ DROP TABLE IF EXISTS `llx_adherent_type_lang`; CREATE TABLE `llx_adherent_type_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_type` int(11) NOT NULL DEFAULT 0, - `lang` varchar(5) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(5) NOT NULL DEFAULT '0', + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `email` text DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -668,22 +673,22 @@ DROP TABLE IF EXISTS `llx_asset`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_asset` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `fk_asset_model` int(11) DEFAULT NULL, `reversal_amount_ht` double(24,8) DEFAULT NULL, `acquisition_value_ht` double(24,8) NOT NULL, `fk_soc` int(11) DEFAULT NULL, - `note_public` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` mediumtext DEFAULT NULL, + `note_private` mediumtext DEFAULT NULL, `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, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `status` int(11) NOT NULL, `recovered_vat` double(24,8) DEFAULT NULL, `reversal_date` date DEFAULT NULL, @@ -734,14 +739,14 @@ CREATE TABLE `llx_asset_accountancy_codes_economic` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_asset` int(11) DEFAULT NULL, `fk_asset_model` int(11) DEFAULT NULL, - `asset` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `depreciation_asset` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `depreciation_expense` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `value_asset_sold` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `receivable_on_assignment` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `proceeds_from_sales` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `vat_collected` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `vat_deductible` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `asset` varchar(32) DEFAULT NULL, + `depreciation_asset` varchar(32) DEFAULT NULL, + `depreciation_expense` varchar(32) DEFAULT NULL, + `value_asset_sold` varchar(32) DEFAULT NULL, + `receivable_on_assignment` varchar(32) DEFAULT NULL, + `proceeds_from_sales` varchar(32) DEFAULT NULL, + `vat_collected` varchar(32) DEFAULT NULL, + `vat_deductible` varchar(32) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -775,9 +780,9 @@ CREATE TABLE `llx_asset_accountancy_codes_fiscal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_asset` int(11) DEFAULT NULL, `fk_asset_model` int(11) DEFAULT NULL, - `accelerated_depreciation` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `endowment_accelerated_depreciation` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `provision_accelerated_depreciation` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accelerated_depreciation` varchar(32) DEFAULT NULL, + `endowment_accelerated_depreciation` varchar(32) DEFAULT NULL, + `provision_accelerated_depreciation` varchar(32) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -810,13 +815,13 @@ DROP TABLE IF EXISTS `llx_asset_depreciation`; CREATE TABLE `llx_asset_depreciation` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_asset` int(11) NOT NULL, - `depreciation_mode` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `depreciation_mode` varchar(255) NOT NULL, + `ref` varchar(255) NOT NULL, `depreciation_date` datetime NOT NULL, `depreciation_ht` double(24,8) NOT NULL, `cumulative_depreciation_ht` double(24,8) NOT NULL, - `accountancy_code_debit` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_credit` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code_debit` varchar(32) DEFAULT NULL, + `accountancy_code_credit` varchar(32) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -932,7 +937,7 @@ CREATE TABLE `llx_asset_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_asset_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -957,17 +962,17 @@ DROP TABLE IF EXISTS `llx_asset_model`; CREATE TABLE `llx_asset_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, + `label` varchar(255) NOT NULL, `asset_type` smallint(6) NOT NULL, `fk_pays` int(11) DEFAULT 0, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` smallint(6) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_asset_model` (`entity`,`ref`), @@ -1002,7 +1007,7 @@ CREATE TABLE `llx_asset_model_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_asset_model_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1028,7 +1033,7 @@ CREATE TABLE `llx_asset_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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_asset_type_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1057,24 +1062,25 @@ CREATE TABLE `llx_bank` ( `datev` date DEFAULT NULL, `dateo` date DEFAULT NULL, `amount` double(24,8) NOT NULL DEFAULT 0.00000000, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `num_releve` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `num_chq` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_type` varchar(6) DEFAULT NULL, + `num_releve` varchar(50) DEFAULT NULL, + `num_chq` varchar(50) DEFAULT NULL, `rappro` tinyint(4) DEFAULT 0, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bordereau` int(11) DEFAULT 0, - `banque` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `emetteur` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `author` varchar(40) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `numero_compte` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `banque` varchar(255) DEFAULT NULL, + `emetteur` varchar(255) DEFAULT NULL, + `author` varchar(40) DEFAULT NULL, + `numero_compte` varchar(32) DEFAULT NULL, `origin_id` int(11) DEFAULT NULL, - `origin_type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `origin_type` varchar(64) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `amount_main_currency` double(24,8) DEFAULT NULL, + `position` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_bank_datev` (`datev`), KEY `idx_bank_dateo` (`dateo`), @@ -1090,7 +1096,7 @@ CREATE TABLE `llx_bank` ( LOCK TABLES `llx_bank` WRITE; /*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; -INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2021-07-11 17:49:28','2021-07-08','2021-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2021-07-11 17:49:28','2021-07-09','2021-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2021-07-11 17:49:28','2021-07-10','2021-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2021-07-11 17:49:28','2021-07-08','2021-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2021-07-11 17:49:28','2021-07-08','2021-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2022-02-07 13:37:54','2021-08-15','2021-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2022-02-07 13:37:54','2021-08-12','2021-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2022-02-07 13:37:54','2021-08-06','2021-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2022-02-07 13:37:54','2021-08-08','2021-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2022-02-07 13:37:54','2021-08-08','2021-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2022-02-07 13:37:54','2021-12-09','2021-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2022-02-07 13:37:54','2021-12-09','2021-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2022-02-07 13:37:54','2021-12-09','2021-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2022-02-07 13:37:54','2021-12-09','2021-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2022-02-07 13:37:54','2021-12-09','2021-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2022-02-07 13:37:54','2021-12-12','2021-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2022-07-04 01:11:35','2022-03-06','2022-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2022-07-04 01:11:35','2022-03-20','2022-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2021-07-11 17:49:28','2021-07-09','2021-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL,NULL,NULL,NULL,NULL),(26,'2016-03-02 20:01:39','2022-07-04 01:11:35','2022-03-19','2022-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2022-07-04 01:11:35','2022-03-21','2022-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL,NULL,NULL,NULL,NULL),(28,'2016-03-03 19:22:32','2022-02-07 13:37:54','2021-10-03','2021-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2022-07-04 01:11:35','2022-03-10','2022-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2022-02-07 13:37:54','2022-01-22','2022-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2022-02-07 13:37:54','2021-07-30','2021-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2022-02-07 13:37:54','2022-02-01','2022-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2022-07-04 01:11:35','2022-03-22','2022-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL,NULL,NULL,NULL,NULL),(34,'2017-02-06 08:10:50','2022-07-04 01:11:35','2022-03-25','2022-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,'2017-02-16 02:22:09','2022-07-04 01:11:35','2022-02-16','2022-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2022-07-04 01:11:35','2022-02-21','2022-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2022-02-07 13:37:54','2021-09-06','2021-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(39,'2018-03-16 13:59:31','2022-07-04 01:11:35','2022-03-16','2022-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,'',NULL,NULL,NULL,NULL),(41,'2019-10-04 10:28:14','2022-02-07 13:37:54','2022-01-19','2022-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(42,'2019-10-08 13:18:50','2022-02-07 13:37:54','2021-10-08','2021-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(43,'2019-12-26 01:48:30','2022-02-07 13:37:54','2021-12-25','2021-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(44,'2019-12-26 01:48:46','2022-02-07 13:37:54','2021-12-25','2021-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(47,'2020-01-01 20:28:49','2022-02-07 13:37:54','2022-01-01','2022-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(48,'2020-01-06 20:52:28','2022-02-07 13:37:54','2022-01-06','2022-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,'',NULL,NULL,NULL,NULL),(49,'2020-01-10 04:42:47','2022-02-07 13:37:54','2022-01-10','2022-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL),(50,'2020-01-16 02:36:48','2022-02-07 13:37:54','2022-01-16','2022-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,'',NULL,NULL,NULL,NULL),(51,'2020-01-21 01:02:14','2022-02-07 13:37:54','2021-07-18','2021-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,'',NULL,NULL,NULL,NULL),(52,'2020-01-21 10:22:37','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,'',NULL,NULL,NULL,NULL),(53,'2020-01-21 10:23:17','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL,NULL),(54,'2020-01-21 10:23:28','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL,NULL),(55,'2020-01-21 10:23:49','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL); +INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2022-12-11 21:23:22','2022-07-08','2022-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(2,'2012-07-09 00:00:24','2022-12-11 21:23:22','2022-07-09','2022-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(3,'2012-07-10 13:33:42','2022-12-11 21:23:22','2022-07-10','2022-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(5,'2013-07-18 20:50:24','2022-12-11 21:23:22','2022-07-08','2022-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(6,'2013-07-18 20:50:47','2022-12-11 21:23:22','2022-07-08','2022-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(8,'2013-08-01 03:34:11','2022-12-11 21:23:22','2022-08-15','2022-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(12,'2013-08-05 23:11:37','2022-12-11 21:23:22','2022-08-12','2022-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(13,'2013-08-06 20:33:54','2022-12-11 21:23:22','2022-08-06','2022-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(14,'2013-08-08 02:53:40','2022-12-11 21:23:22','2022-08-08','2022-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(15,'2013-08-08 02:55:58','2022-12-11 21:23:22','2022-08-08','2022-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(16,'2014-12-09 15:28:44','2022-12-11 21:23:22','2022-12-09','2022-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(17,'2014-12-09 15:28:53','2022-12-11 21:23:22','2022-12-09','2022-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(18,'2014-12-09 17:35:55','2022-12-11 21:23:22','2022-12-09','2022-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(19,'2014-12-09 17:37:02','2022-12-11 21:23:22','2022-12-09','2022-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(20,'2014-12-09 18:35:07','2022-12-11 21:23:22','2022-12-09','2022-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(21,'2014-12-12 18:54:33','2022-02-07 13:37:54','2021-12-12','2021-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(22,'2015-03-06 16:48:16','2022-07-04 01:11:35','2022-03-06','2022-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(23,'2015-03-20 14:30:11','2022-07-04 01:11:35','2022-03-20','2022-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(24,'2016-03-02 19:57:58','2022-12-11 21:23:22','2022-07-09','2022-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL,NULL,NULL,NULL,NULL,0),(26,'2016-03-02 20:01:39','2022-07-04 01:11:35','2022-03-19','2022-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(27,'2016-03-02 20:02:06','2022-07-04 01:11:35','2022-03-21','2022-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL,NULL,NULL,NULL,NULL,0),(28,'2016-03-03 19:22:32','2022-12-11 21:23:22','2022-10-03','2022-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(29,'2016-03-03 19:23:16','2022-07-04 01:11:35','2022-03-10','2022-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(30,'2018-01-22 18:56:34','2022-02-07 13:37:54','2022-01-22','2022-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(31,'2018-07-30 22:42:14','2022-12-11 21:23:22','2022-07-30','2022-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(32,'2017-02-01 19:02:44','2022-02-07 13:37:54','2022-02-01','2022-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(33,'2017-02-06 08:10:24','2022-07-04 01:11:35','2022-03-22','2022-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL,NULL,NULL,NULL,NULL,0),(34,'2017-02-06 08:10:50','2022-07-04 01:11:35','2022-03-25','2022-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(36,'2017-02-16 02:22:09','2022-07-04 01:11:35','2022-02-16','2022-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(37,'2017-02-21 16:07:43','2022-07-04 01:11:35','2022-02-21','2022-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(38,'2017-09-06 20:08:36','2022-12-11 21:23:22','2022-09-06','2022-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(39,'2018-03-16 13:59:31','2022-07-04 01:11:35','2022-03-16','2022-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,'',NULL,NULL,NULL,NULL,0),(41,'2019-10-04 10:28:14','2022-02-07 13:37:54','2022-01-19','2022-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(42,'2019-10-08 13:18:50','2022-12-11 21:23:22','2022-10-08','2022-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(43,'2019-12-26 01:48:30','2022-02-07 13:37:54','2021-12-25','2021-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(44,'2019-12-26 01:48:46','2022-02-07 13:37:54','2021-12-25','2021-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(47,'2020-01-01 20:28:49','2022-02-07 13:37:54','2022-01-01','2022-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(48,'2020-01-06 20:52:28','2022-02-07 13:37:54','2022-01-06','2022-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,'',NULL,NULL,NULL,NULL,0),(49,'2020-01-10 04:42:47','2022-02-07 13:37:54','2022-01-10','2022-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0),(50,'2020-01-16 02:36:48','2022-02-07 13:37:54','2022-01-16','2022-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,'',NULL,NULL,NULL,NULL,0),(51,'2020-01-21 01:02:14','2022-12-11 21:23:22','2022-07-18','2022-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,'',NULL,NULL,NULL,NULL,0),(52,'2020-01-21 10:22:37','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,'',NULL,NULL,NULL,NULL,0),(53,'2020-01-21 10:23:17','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL,NULL,0),(54,'2020-01-21 10:23:28','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL,NULL,0),(55,'2020-01-21 10:23:49','2022-02-07 13:37:54','2022-01-21','2022-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,0); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -1105,43 +1111,43 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(12) NOT NULL, + `label` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `bank` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_banque` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_guichet` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_rib` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bic` varchar(11) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `iban_prefix` varchar(34) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `country_iban` varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_iban` varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `domiciliation` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, `pti_in_ctti` smallint(6) DEFAULT 0, `state_id` int(11) DEFAULT NULL, `fk_pays` int(11) NOT NULL, - `proprio` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `owner_address` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `proprio` varchar(60) DEFAULT NULL, + `owner_address` text DEFAULT NULL, `courant` smallint(6) NOT NULL DEFAULT 0, `clos` smallint(6) NOT NULL DEFAULT 0, `rappro` smallint(6) DEFAULT 1, - `url` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `account_number` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_journal` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `currency_code` varchar(3) COLLATE utf8mb3_unicode_ci NOT NULL, + `url` varchar(128) DEFAULT NULL, + `account_number` varchar(32) DEFAULT NULL, + `accountancy_journal` varchar(20) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, `min_allowed` int(11) DEFAULT 0, `min_desired` int(11) DEFAULT 0, - `comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `comment` text DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_accountancy_journal` int(11) DEFAULT NULL, - `ics` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ics_transfer` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ics` varchar(32) DEFAULT NULL, + `ics_transfer` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_account_label` (`label`,`entity`), KEY `idx_fk_accountancy_journal` (`fk_accountancy_journal`), @@ -1170,7 +1176,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_bank_account_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1194,7 +1200,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1233,6 +1239,32 @@ LOCK TABLES `llx_bank_class` WRITE; /*!40000 ALTER TABLE `llx_bank_class` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_bank_extrafields` +-- + +DROP TABLE IF EXISTS `llx_bank_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_bank_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, + PRIMARY KEY (`rowid`), + KEY `idx_bank_extrafields` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_bank_extrafields` +-- + +LOCK TABLES `llx_bank_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_bank_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_bank_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_bank_url` -- @@ -1244,11 +1276,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type` varchar(24) COLLATE utf8mb3_unicode_ci NOT NULL, + `url` varchar(255) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `type` varchar(24) NOT NULL, PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_bank_url` (`fk_bank`,`url_id`,`type`) + UNIQUE KEY `uk_bank_url` (`fk_bank`,`url_id`,`type`), + KEY `idx_bank_url_url_id` (`url_id`) ) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1272,21 +1305,21 @@ DROP TABLE IF EXISTS `llx_blockedlog`; CREATE TABLE `llx_blockedlog` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `action` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `action` varchar(50) DEFAULT NULL, `amounts` double(24,8) DEFAULT NULL, - `signature` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL, - `signature_line` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL, - `element` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `signature` varchar(100) NOT NULL, + `signature_line` varchar(100) NOT NULL, + `element` varchar(50) DEFAULT NULL, `fk_object` int(11) DEFAULT NULL, - `ref_object` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_object` varchar(255) DEFAULT NULL, `date_object` datetime DEFAULT NULL, - `object_data` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `object_data` mediumtext DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `certified` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, - `user_fullname` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `object_version` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT '', + `user_fullname` varchar(255) DEFAULT NULL, + `object_version` varchar(32) DEFAULT '', PRIMARY KEY (`rowid`), KEY `signature` (`signature`), KEY `fk_object_element` (`fk_object`,`element`), @@ -1316,8 +1349,8 @@ DROP TABLE IF EXISTS `llx_blockedlog_authority`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_blockedlog_authority` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `blockchain` longtext COLLATE utf8mb3_unicode_ci NOT NULL, - `signature` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL, + `blockchain` longtext NOT NULL, + `signature` varchar(100) NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), KEY `signature` (`signature`) @@ -1343,11 +1376,11 @@ DROP TABLE IF EXISTS `llx_bom_bom`; CREATE TABLE `llx_bom_bom` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) NOT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `qty` double(24,8) DEFAULT NULL, `efficiency` double(8,4) DEFAULT 1.0000, @@ -1357,11 +1390,11 @@ CREATE TABLE `llx_bom_bom` ( `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) NOT NULL, `duration` double(24,8) DEFAULT NULL, `fk_warehouse` int(11) DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `bomtype` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bom_bom_ref` (`ref`,`entity`), @@ -1395,7 +1428,7 @@ CREATE TABLE `llx_bom_bom_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_bom_bom_extrafields_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1422,13 +1455,14 @@ CREATE TABLE `llx_bom_bomline` ( `fk_bom` int(11) NOT NULL, `fk_product` int(11) NOT NULL, `fk_bom_child` int(11) DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `qty` double(24,8) NOT NULL, `efficiency` double(8,4) NOT NULL DEFAULT 1.0000, `position` int(11) NOT NULL, `qty_frozen` smallint(6) DEFAULT 0, `disable_stock_change` smallint(6) DEFAULT 0, + `fk_unit` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_bom_bomline_rowid` (`rowid`), KEY `idx_bom_bomline_fk_product` (`fk_product`), @@ -1443,7 +1477,7 @@ CREATE TABLE `llx_bom_bomline` ( LOCK TABLES `llx_bom_bomline` WRITE; /*!40000 ALTER TABLE `llx_bom_bomline` DISABLE KEYS */; -INSERT INTO `llx_bom_bomline` VALUES (4,6,25,NULL,NULL,NULL,4.00000000,1.0000,1,0,0),(5,6,3,NULL,NULL,NULL,1.00000000,1.0000,3,0,1),(6,6,2,NULL,NULL,NULL,1.00000000,1.0000,2,1,0),(9,6,1,NULL,NULL,NULL,3.00000000,1.0000,0,0,0),(10,7,30,NULL,NULL,NULL,1.00000000,1.0000,2,0,0),(11,7,29,NULL,NULL,NULL,1.00000000,1.0000,4,0,0); +INSERT INTO `llx_bom_bomline` VALUES (4,6,25,NULL,NULL,NULL,4.00000000,1.0000,1,0,0,NULL),(5,6,3,NULL,NULL,NULL,1.00000000,1.0000,3,0,1,NULL),(6,6,2,NULL,NULL,NULL,1.00000000,1.0000,2,1,0,NULL),(9,6,1,NULL,NULL,NULL,3.00000000,1.0000,0,0,0,NULL),(10,7,30,NULL,NULL,NULL,1.00000000,1.0000,2,0,0,NULL),(11,7,29,NULL,NULL,NULL,1.00000000,1.0000,4,0,0,NULL); /*!40000 ALTER TABLE `llx_bom_bomline` ENABLE KEYS */; UNLOCK TABLES; @@ -1458,7 +1492,7 @@ CREATE TABLE `llx_bom_bomline_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1483,10 +1517,10 @@ CREATE TABLE `llx_bookmark` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL, `dateb` datetime DEFAULT NULL, - `url` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `target` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `title` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `favicon` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url` text DEFAULT NULL, + `target` varchar(16) DEFAULT NULL, + `title` varchar(64) DEFAULT NULL, + `favicon` varchar(24) DEFAULT NULL, `position` int(11) DEFAULT 0, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), @@ -1515,15 +1549,15 @@ CREATE TABLE `llx_bordereau_cheque` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime NOT NULL, `date_bordereau` date DEFAULT NULL, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT 0, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bordereau_cheque` (`ref`,`entity`) @@ -1552,16 +1586,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `box_order` varchar(3) NOT NULL, `fk_user` int(11) NOT NULL DEFAULT 0, `maxline` int(11) DEFAULT NULL, - `params` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `params` varchar(255) 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=1468 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1476 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1570,7 +1604,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,'A27',0,NULL,NULL),(315,1,348,0,'B20',0,NULL,NULL),(316,1,349,0,'B10',0,NULL,NULL),(317,1,350,0,'B18',0,NULL,NULL),(344,1,374,0,'B08',0,NULL,NULL),(347,1,377,0,'B16',0,NULL,NULL),(348,1,378,0,'B06',0,NULL,NULL),(358,1,388,0,'B38',0,NULL,NULL),(359,1,389,0,'A13',0,NULL,NULL),(360,1,390,0,'B36',0,NULL,NULL),(362,1,392,0,'A35',0,NULL,NULL),(363,1,393,0,'A11',0,NULL,NULL),(366,1,396,0,'B12',0,NULL,NULL),(387,1,403,0,'B22',0,NULL,NULL),(392,1,409,0,'A15',0,NULL,NULL),(393,1,410,0,'A33',0,NULL,NULL),(394,1,411,0,'A25',0,NULL,NULL),(395,1,412,0,'B30',0,NULL,NULL),(396,1,413,0,'A23',0,NULL,NULL),(397,1,414,0,'B28',0,NULL,NULL),(398,1,415,0,'A21',0,NULL,NULL),(399,1,416,0,'B26',0,NULL,NULL),(400,1,417,0,'A19',0,NULL,NULL),(401,1,418,0,'B24',0,NULL,NULL),(501,1,419,0,'A17',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,'A29',0,NULL,NULL),(1037,1,425,0,'B32',0,NULL,NULL),(1038,1,426,0,'B34',0,NULL,NULL),(1150,1,430,0,'A37',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,'A07',0,NULL,NULL),(1183,1,433,0,'A09',0,NULL,NULL),(1235,1,404,0,'B01',1,NULL,NULL),(1236,1,404,0,'B01',2,NULL,NULL),(1237,1,404,0,'B01',11,NULL,NULL),(1239,1,404,0,'A31',0,NULL,NULL),(1407,1,412,0,'A01',12,NULL,NULL),(1408,1,378,0,'A02',12,NULL,NULL),(1409,1,404,0,'A03',12,NULL,NULL),(1410,1,377,0,'A04',12,NULL,NULL),(1411,1,392,0,'B01',12,NULL,NULL),(1412,1,429,0,'B02',12,NULL,NULL),(1414,1,414,0,'B04',12,NULL,NULL),(1415,1,413,0,'B05',12,NULL,NULL),(1416,1,426,0,'B06',12,NULL,NULL),(1418,1,445,0,'B02',0,NULL,NULL),(1426,1,450,2,'A01',0,NULL,NULL),(1427,1,451,2,'B01',0,NULL,NULL),(1428,1,452,2,'A01',0,NULL,NULL),(1429,1,453,2,'B01',0,NULL,NULL),(1430,1,454,11,'A01',0,NULL,NULL),(1431,1,455,11,'B01',0,NULL,NULL),(1432,1,456,11,'A01',0,NULL,NULL),(1433,1,457,11,'B01',0,NULL,NULL),(1434,1,461,11,'A01',0,NULL,NULL),(1435,1,462,11,'B01',0,NULL,NULL),(1436,1,448,0,'A01',1,NULL,NULL),(1437,1,448,0,'B01',2,NULL,NULL),(1438,1,448,0,'A01',11,NULL,NULL),(1439,1,448,0,'A01',12,NULL,NULL),(1440,1,448,0,'A01',0,NULL,NULL),(1441,1,449,0,'B01',1,NULL,NULL),(1442,1,449,0,'A01',2,NULL,NULL),(1443,1,449,0,'B01',11,NULL,NULL),(1444,1,449,0,'A01',12,NULL,NULL),(1445,1,449,0,'B01',0,NULL,NULL),(1449,1,452,2,'A01',12,NULL,NULL),(1450,1,451,2,'B01',12,NULL,NULL),(1451,1,450,2,'B02',12,NULL,NULL),(1452,1,453,2,'B03',12,NULL,NULL),(1465,1,483,0,'0',0,NULL,NULL),(1466,1,484,0,'0',0,NULL,NULL),(1467,1,485,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,'A15',0,NULL,NULL),(315,1,348,0,'A29',0,NULL,NULL),(316,1,349,0,'A25',0,NULL,NULL),(317,1,350,0,'B28',0,NULL,NULL),(344,1,374,0,'B24',0,NULL,NULL),(347,1,377,0,'A27',0,NULL,NULL),(348,1,378,0,'A23',0,NULL,NULL),(358,1,388,0,'B38',0,NULL,NULL),(359,1,389,0,'B08',0,NULL,NULL),(360,1,390,0,'A37',0,NULL,NULL),(362,1,392,0,'A19',0,NULL,NULL),(363,1,393,0,'A07',0,NULL,NULL),(366,1,396,0,'B26',0,NULL,NULL),(387,1,403,0,'B30',0,NULL,NULL),(392,1,409,0,'A09',0,NULL,NULL),(393,1,410,0,'B18',0,NULL,NULL),(394,1,411,0,'B14',0,NULL,NULL),(395,1,412,0,'B34',0,NULL,NULL),(396,1,413,0,'A13',0,NULL,NULL),(397,1,414,0,'A33',0,NULL,NULL),(398,1,415,0,'B12',0,NULL,NULL),(399,1,416,0,'B32',0,NULL,NULL),(400,1,417,0,'A11',0,NULL,NULL),(401,1,418,0,'A31',0,NULL,NULL),(501,1,419,0,'B10',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,'B16',0,NULL,NULL),(1037,1,425,0,'A35',0,NULL,NULL),(1038,1,426,0,'B36',0,NULL,NULL),(1150,1,430,0,'B20',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,'A05',0,NULL,NULL),(1183,1,433,0,'B06',0,NULL,NULL),(1235,1,404,0,'B01',1,NULL,NULL),(1236,1,404,0,'B01',2,NULL,NULL),(1237,1,404,0,'B01',11,NULL,NULL),(1239,1,404,0,'A17',0,NULL,NULL),(1407,1,412,0,'A01',12,NULL,NULL),(1408,1,378,0,'A02',12,NULL,NULL),(1409,1,404,0,'A03',12,NULL,NULL),(1410,1,377,0,'A04',12,NULL,NULL),(1411,1,392,0,'B01',12,NULL,NULL),(1412,1,429,0,'B02',12,NULL,NULL),(1414,1,414,0,'B04',12,NULL,NULL),(1415,1,413,0,'B05',12,NULL,NULL),(1416,1,426,0,'B06',12,NULL,NULL),(1418,1,445,0,'B22',0,NULL,NULL),(1426,1,450,2,'B40',0,NULL,NULL),(1427,1,451,2,'A41',0,NULL,NULL),(1428,1,452,2,'A39',0,NULL,NULL),(1429,1,453,2,'B42',0,NULL,NULL),(1430,1,454,11,'B44',0,NULL,NULL),(1431,1,455,11,'B48',0,NULL,NULL),(1432,1,456,11,'A43',0,NULL,NULL),(1433,1,457,11,'A47',0,NULL,NULL),(1434,1,461,11,'A45',0,NULL,NULL),(1435,1,462,11,'B46',0,NULL,NULL),(1436,1,448,0,'A01',1,NULL,NULL),(1437,1,448,0,'B01',2,NULL,NULL),(1438,1,448,0,'A01',11,NULL,NULL),(1439,1,448,0,'A01',12,NULL,NULL),(1440,1,448,0,'B04',0,NULL,NULL),(1441,1,449,0,'B01',1,NULL,NULL),(1442,1,449,0,'A01',2,NULL,NULL),(1443,1,449,0,'B01',11,NULL,NULL),(1444,1,449,0,'A01',12,NULL,NULL),(1445,1,449,0,'A21',0,NULL,NULL),(1449,1,452,2,'A01',12,NULL,NULL),(1450,1,451,2,'B01',12,NULL,NULL),(1451,1,450,2,'B02',12,NULL,NULL),(1452,1,453,2,'B03',12,NULL,NULL),(1468,1,486,0,'A03',0,NULL,NULL),(1469,1,487,0,'B02',0,NULL,NULL),(1470,1,488,0,'A01',0,NULL,NULL),(1471,1,438,0,'A01',1,NULL,NULL),(1472,1,438,0,'B01',2,NULL,NULL),(1473,1,438,0,'A01',11,NULL,NULL),(1474,1,438,0,'B01',12,NULL,NULL),(1475,1,438,0,'A01',0,NULL,NULL); /*!40000 ALTER TABLE `llx_boxes` ENABLE KEYS */; UNLOCK TABLES; @@ -1583,14 +1617,14 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `file` varchar(200) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `note` varchar(130) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` varchar(130) DEFAULT NULL, `fk_user` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) -) ENGINE=InnoDB AUTO_INCREMENT=486 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=489 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1599,7 +1633,7 @@ CREATE TABLE `llx_boxes_def` ( LOCK TABLES `llx_boxes_def` WRITE; /*!40000 ALTER TABLE `llx_boxes_def` DISABLE KEYS */; -INSERT INTO `llx_boxes_def` VALUES (323,'box_actions.php',2,'2015-03-13 15:29:19',NULL,0),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL,0),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL,0),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL,0),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)',0),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL,0),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL,0),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL,0),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL,0),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL,0),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL,0),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL,0),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL,0),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL,0),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)',0),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL,0),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL,0),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL,0),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL,0),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL,0),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL,0),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL,0),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL,0),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL,0),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)',0),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)',0),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL,0),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL,0),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL,0),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL,0),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL,0),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL,0),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL,0),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL,0),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL,0),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL,0),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL,0),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL,0),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL,0),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL,0),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL,0),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL,0),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL,0),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL,0),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL,0),(446,'box_funnel_of_prospection.php',1,'2020-12-10 12:24:40',NULL,0),(447,'box_customers_outstanding_bill_reached.php',1,'2020-12-10 12:24:40',NULL,0),(448,'box_scheduled_jobs.php',1,'2021-04-15 10:22:49',NULL,0),(449,'box_dolibarr_state_board.php',1,'2021-04-15 10:22:54',NULL,0),(450,'box_members_last_modified.php',1,'2021-04-15 10:22:54',NULL,0),(451,'box_members_last_subscriptions.php',1,'2021-04-15 10:22:54',NULL,0),(452,'box_members_subscriptions_by_year.php',1,'2021-04-15 10:22:54',NULL,0),(453,'box_members_by_type.php',1,'2021-04-15 10:22:54',NULL,0),(454,'box_graph_ticket_by_severity.php',1,'2021-04-15 10:22:55',NULL,0),(455,'box_graph_nb_ticket_last_x_days.php',1,'2021-04-15 10:22:55',NULL,0),(456,'box_graph_nb_tickets_type.php',1,'2021-04-15 10:22:55',NULL,0),(457,'box_graph_new_vs_close_ticket.php',1,'2021-04-15 10:22:55',NULL,0),(461,'box_last_ticket.php',1,'2021-04-15 10:23:01',NULL,0),(462,'box_last_modified_ticket.php',1,'2021-04-15 10:23:01',NULL,0),(470,'box_ticket_by_severity.php',1,'2021-07-11 17:49:47',NULL,0),(471,'box_nb_ticket_last_x_days.php',1,'2021-07-11 17:49:47',NULL,0),(472,'box_nb_tickets_type.php',1,'2021-07-11 17:49:47',NULL,0),(473,'box_new_vs_close_ticket.php',1,'2021-07-11 17:49:47',NULL,0),(483,'box_boms.php',1,'2022-07-05 08:07:11',NULL,0),(484,'box_comptes.php',1,'2022-07-05 08:07:11',NULL,0),(485,'box_mos.php',1,'2022-07-05 08:07:11',NULL,0); +INSERT INTO `llx_boxes_def` VALUES (323,'box_actions.php',2,'2015-03-13 15:29:19',NULL,0),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL,0),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL,0),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL,0),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)',0),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL,0),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL,0),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL,0),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL,0),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL,0),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL,0),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL,0),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL,0),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL,0),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)',0),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL,0),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL,0),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL,0),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL,0),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL,0),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL,0),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL,0),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL,0),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL,0),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)',0),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)',0),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL,0),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL,0),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL,0),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL,0),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL,0),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL,0),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL,0),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL,0),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL,0),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL,0),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL,0),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL,0),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL,0),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL,0),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL,0),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL,0),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL,0),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL,0),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL,0),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL,0),(446,'box_funnel_of_prospection.php',1,'2020-12-10 12:24:40',NULL,0),(447,'box_customers_outstanding_bill_reached.php',1,'2020-12-10 12:24:40',NULL,0),(448,'box_scheduled_jobs.php',1,'2021-04-15 10:22:49',NULL,0),(449,'box_dolibarr_state_board.php',1,'2021-04-15 10:22:54',NULL,0),(450,'box_members_last_modified.php',1,'2021-04-15 10:22:54',NULL,0),(451,'box_members_last_subscriptions.php',1,'2021-04-15 10:22:54',NULL,0),(452,'box_members_subscriptions_by_year.php',1,'2021-04-15 10:22:54',NULL,0),(453,'box_members_by_type.php',1,'2021-04-15 10:22:54',NULL,0),(454,'box_graph_ticket_by_severity.php',1,'2021-04-15 10:22:55',NULL,0),(455,'box_graph_nb_ticket_last_x_days.php',1,'2021-04-15 10:22:55',NULL,0),(456,'box_graph_nb_tickets_type.php',1,'2021-04-15 10:22:55',NULL,0),(457,'box_graph_new_vs_close_ticket.php',1,'2021-04-15 10:22:55',NULL,0),(461,'box_last_ticket.php',1,'2021-04-15 10:23:01',NULL,0),(462,'box_last_modified_ticket.php',1,'2021-04-15 10:23:01',NULL,0),(470,'box_ticket_by_severity.php',1,'2021-07-11 17:49:47',NULL,0),(471,'box_nb_ticket_last_x_days.php',1,'2021-07-11 17:49:47',NULL,0),(472,'box_nb_tickets_type.php',1,'2021-07-11 17:49:47',NULL,0),(473,'box_new_vs_close_ticket.php',1,'2021-07-11 17:49:47',NULL,0),(486,'box_boms.php',1,'2022-12-11 21:23:42',NULL,0),(487,'box_comptes.php',1,'2022-12-11 21:23:42',NULL,0),(488,'box_mos.php',1,'2022-12-11 21:23:43',NULL,0); /*!40000 ALTER TABLE `llx_boxes_def` ENABLE KEYS */; UNLOCK TABLES; @@ -1613,9 +1647,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(255) NOT NULL, `status` int(11) DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, `datec` datetime DEFAULT NULL, @@ -1646,7 +1680,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `fk_project_ids` varchar(255) NOT NULL, `amount` double(24,8) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -1678,12 +1712,12 @@ DROP TABLE IF EXISTS `llx_c_accounting_category`; CREATE TABLE `llx_c_accounting_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `range_account` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(255) NOT NULL, + `range_account` varchar(255) NOT NULL, `sens` tinyint(4) NOT NULL DEFAULT 0, `category_type` tinyint(4) NOT NULL DEFAULT 0, - `formula` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `formula` varchar(255) NOT NULL, `position` int(11) DEFAULT 0, `fk_country` int(11) DEFAULT NULL, `active` int(11) DEFAULT 1, @@ -1711,15 +1745,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(64) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `elementtype` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(128) DEFAULT NULL, + `label` varchar(128) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `elementtype` varchar(64) DEFAULT 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=455 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=595 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1728,7 +1762,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),(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','expensereport',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203),(187,'EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',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),(225,'COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1),(226,'PROPAL_DELETE','Customer proposal deleted','Executed when a customer proposal is deleted','propal',2),(227,'ORDER_DELETE','Customer order deleted','Executed when a customer order is deleted','commande',5),(228,'BILL_DELETE','Customer invoice deleted','Executed when a customer invoice is deleted','facture',9),(229,'PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10),(230,'ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14),(231,'BILL_SUPPLIER_DELETE','Supplier invoice deleted','Executed when a supplier invoice is deleted','invoice_supplier',17),(232,'CONTRACT_DELETE','Contract deleted','Executed when a contract is deleted','contrat',18),(233,'FICHINTER_DELETE','Intervention is deleted','Executed when a intervention is deleted','ficheinter',35),(234,'EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',204),(249,'TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161),(250,'TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163),(251,'TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is assigned to another user','ticket',164),(252,'TICKET_CLOSE','Ticket closed','Executed when a ticket is closed','ticket',165),(253,'TICKET_SENTBYMAIL','Ticket message sent by email','Executed when a message is sent from the ticket record','ticket',166),(254,'TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',167),(261,'USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300),(262,'BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',650),(263,'BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',651),(264,'BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652),(265,'BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653),(266,'BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654),(351,'MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660),(352,'MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661),(353,'MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662),(354,'MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663),(365,'CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50),(366,'CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51),(367,'CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52),(368,'RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500),(369,'RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502),(370,'RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504),(371,'RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506),(372,'RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510),(373,'RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512),(374,'RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514),(375,'RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516),(392,'COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1),(393,'CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51),(394,'ORDER_SUPPLIER_CANCEL','Supplier order request canceled','Executed when a supplier order is canceled','order_supplier',13),(395,'MEMBER_EXCLUDE','Member excluded','Executed when a member is excluded','member',27),(396,'USER_CREATE','User created','Executed when a user is created','user',301),(397,'USER_MODIFY','User update','Executed when a user is updated','user',302),(398,'USER_DELETE','User update','Executed when a user is deleted','user',303),(399,'USER_NEW_PASSWORD','User update','Executed when a user is change password','user',304),(400,'USER_ENABLEDISABLE','User update','Executed when a user is enable or disable','user',305),(402,'HOLIDAY_MODIFY','Holiday modified','Executed when a holiday is modified','holiday',801),(405,'HOLIDAY_CANCEL','Holiday canceled','Executed when a holiday is canceled','holiday',802),(406,'HOLIDAY_DELETE','Holiday deleted','Executed when a holiday is deleted','holiday',804),(407,'PROPAL_MODIFY','Customer proposal modified','Executed when a customer proposal is modified','propal',2),(408,'ORDER_MODIFY','Customer order modified','Executed when a customer order is set modified','commande',5),(409,'BILL_MODIFY','Customer invoice modified','Executed when a customer invoice is modified','facture',7),(410,'PROPOSAL_SUPPLIER_MODIFY','Price request modified','Executed when a commercial proposal is modified','proposal_supplier',10),(411,'ORDER_SUPPLIER_MODIFY','Supplier order request modified','Executed when a supplier order is modified','order_supplier',13),(412,'BILL_SUPPLIER_MODIFY','Supplier invoice modified','Executed when a supplier invoice is modified','invoice_supplier',15),(413,'CONTRACT_MODIFY','Contract modified','Executed when a contract is modified','contrat',18),(414,'SHIPPING_MODIFY','Shipping modified','Executed when a shipping is modified','shipping',20),(415,'FICHINTER_MODIFY','Intervention modify','Executed when a intervention is modify','ficheinter',30),(417,'EXPENSE_REPORT_MODIFY','Expense report modified','Executed when an expense report is modified','expensereport',202); +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','expensereport',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203),(187,'EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',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),(225,'COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1),(226,'PROPAL_DELETE','Customer proposal deleted','Executed when a customer proposal is deleted','propal',2),(227,'ORDER_DELETE','Customer order deleted','Executed when a customer order is deleted','commande',5),(228,'BILL_DELETE','Customer invoice deleted','Executed when a customer invoice is deleted','facture',9),(229,'PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10),(230,'ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14),(231,'BILL_SUPPLIER_DELETE','Supplier invoice deleted','Executed when a supplier invoice is deleted','invoice_supplier',17),(232,'CONTRACT_DELETE','Contract deleted','Executed when a contract is deleted','contrat',18),(233,'FICHINTER_DELETE','Intervention is deleted','Executed when a intervention is deleted','ficheinter',35),(234,'EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',204),(249,'TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161),(250,'TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163),(251,'TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is assigned to another user','ticket',164),(252,'TICKET_CLOSE','Ticket closed','Executed when a ticket is closed','ticket',165),(253,'TICKET_SENTBYMAIL','Ticket message sent by email','Executed when a message is sent from the ticket record','ticket',166),(254,'TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',167),(261,'USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300),(262,'BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',650),(263,'BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',651),(264,'BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652),(265,'BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653),(266,'BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654),(351,'MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660),(352,'MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661),(353,'MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662),(354,'MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663),(365,'CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50),(366,'CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51),(367,'CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52),(368,'RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500),(369,'RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502),(370,'RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504),(371,'RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506),(372,'RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510),(373,'RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512),(374,'RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514),(375,'RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516),(392,'COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1),(393,'CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51),(394,'ORDER_SUPPLIER_CANCEL','Supplier order request canceled','Executed when a supplier order is canceled','order_supplier',13),(395,'MEMBER_EXCLUDE','Member excluded','Executed when a member is excluded','member',27),(396,'USER_CREATE','User created','Executed when a user is created','user',301),(397,'USER_MODIFY','User update','Executed when a user is updated','user',302),(398,'USER_DELETE','User update','Executed when a user is deleted','user',303),(399,'USER_NEW_PASSWORD','User update','Executed when a user is change password','user',304),(400,'USER_ENABLEDISABLE','User update','Executed when a user is enable or disable','user',305),(402,'HOLIDAY_MODIFY','Holiday modified','Executed when a holiday is modified','holiday',801),(405,'HOLIDAY_CANCEL','Holiday canceled','Executed when a holiday is canceled','holiday',802),(406,'HOLIDAY_DELETE','Holiday deleted','Executed when a holiday is deleted','holiday',804),(407,'PROPAL_MODIFY','Customer proposal modified','Executed when a customer proposal is modified','propal',2),(408,'ORDER_MODIFY','Customer order modified','Executed when a customer order is set modified','commande',5),(409,'BILL_MODIFY','Customer invoice modified','Executed when a customer invoice is modified','facture',7),(410,'PROPOSAL_SUPPLIER_MODIFY','Price request modified','Executed when a commercial proposal is modified','proposal_supplier',10),(411,'ORDER_SUPPLIER_MODIFY','Supplier order request modified','Executed when a supplier order is modified','order_supplier',13),(412,'BILL_SUPPLIER_MODIFY','Supplier invoice modified','Executed when a supplier invoice is modified','invoice_supplier',15),(413,'CONTRACT_MODIFY','Contract modified','Executed when a contract is modified','contrat',18),(414,'SHIPPING_MODIFY','Shipping modified','Executed when a shipping is modified','shipping',20),(415,'FICHINTER_MODIFY','Intervention modify','Executed when a intervention is modify','ficheinter',30),(417,'EXPENSE_REPORT_MODIFY','Expense report modified','Executed when an expense report is modified','expensereport',202),(455,'PROJECT_SENTBYMAIL','Project sent by mail','Executed when a project is sent by email','project',144),(511,'SHIPPING_DELETE','Shipping sent is deleted','Executed when a shipping is deleted','shipping',21),(512,'RECEPTION_VALIDATE','Reception validated','Executed when a reception is validated','reception',22),(513,'RECEPTION_SENTBYMAIL','Reception sent by mail','Executed when a reception is sent by mail','reception',22),(543,'PROJECT_VALIDATE','Project validation','Executed when a project is validated','project',141),(584,'ACTION_CREATE','Action added','Executed when an action is added to the agenda','agenda',700),(591,'BILLREC_CREATE','Template invoices created','Executed when a Template invoices is created','facturerec',900),(592,'BILLREC_MODIFY','Template invoices update','Executed when a Template invoices is updated','facturerec',901),(593,'BILLREC_DELETE','Template invoices deleted','Executed when a Template invoices is deleted','facturerec',902),(594,'BILLREC_AUTOCREATEBILL','Template invoices use to create invoices with auto batch','Executed when a Template invoices is use to create invoice with auto batch','facturerec',903); /*!40000 ALTER TABLE `llx_c_action_trigger` ENABLE KEYS */; UNLOCK TABLES; @@ -1741,15 +1775,15 @@ 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(50) COLLATE utf8mb3_unicode_ci NOT NULL, - `type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'system', - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(50) NOT NULL, + `type` varchar(50) NOT NULL DEFAULT 'system', + `libelle` varchar(128) DEFAULT NULL, + `module` varchar(50) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, `todo` tinyint(4) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, - `color` varchar(9) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `picto` varchar(48) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `color` varchar(9) DEFAULT NULL, + `picto` varchar(48) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_actioncomm` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1775,8 +1809,8 @@ DROP TABLE IF EXISTS `llx_c_asset_disposal_type`; CREATE TABLE `llx_c_asset_disposal_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(50) NOT NULL, `active` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_asset_disposal_type` (`code`,`entity`) @@ -1801,11 +1835,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(30) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, `position` int(11) NOT NULL DEFAULT 0, - `type_duration` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type_duration` varchar(1) DEFAULT NULL, `qty` double DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_availability` (`code`) @@ -1831,14 +1865,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(16) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `coder` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `example` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, + `libelle` varchar(128) DEFAULT NULL, + `coder` varchar(16) NOT NULL, + `example` varchar(16) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_barcode_type` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1860,13 +1894,13 @@ 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(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(128) DEFAULT NULL, `deductible` smallint(6) NOT NULL DEFAULT 0, `active` tinyint(4) NOT NULL DEFAULT 1, - `code` varchar(12) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(12) NOT NULL, `fk_pays` int(11) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, + `accountancy_code` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4110 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1890,10 +1924,10 @@ DROP TABLE IF EXISTS `llx_c_civility`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_civility` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(6) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(6) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_civility` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -1918,9 +1952,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `code_iso` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(2) NOT NULL, + `code_iso` varchar(3) DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, `favorite` tinyint(4) NOT NULL DEFAULT 0, `eec` tinyint(4) NOT NULL DEFAULT 0, @@ -1949,9 +1983,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `unicode` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code_iso` varchar(3) NOT NULL, + `label` varchar(128) DEFAULT NULL, + `unicode` varchar(32) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`code_iso`), UNIQUE KEY `uk_c_currencies_code_iso` (`code_iso`) @@ -1977,12 +2011,12 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `code_departement` varchar(6) NOT NULL, `fk_region` int(11) DEFAULT NULL, - `cheflieu` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `cheflieu` varchar(50) DEFAULT NULL, `tncc` int(11) DEFAULT NULL, - `ncc` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `nom` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ncc` varchar(50) DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_departements` (`code_departement`,`fk_region`), @@ -2011,10 +2045,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(64) NOT NULL, + `label` varchar(255) DEFAULT NULL, `price` double(24,8) DEFAULT NULL, - `organization` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `organization` varchar(255) DEFAULT NULL, `fk_pays` int(11) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), @@ -2041,10 +2075,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_effectif` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2056,7 +2090,7 @@ CREATE TABLE `llx_c_effectif` ( LOCK TABLES `llx_c_effectif` WRITE; /*!40000 ALTER TABLE `llx_c_effectif` DISABLE KEYS */; -INSERT INTO `llx_c_effectif` VALUES (0,'EF0','-',1,NULL),(1,'EF1-5','1 - 5',1,NULL),(2,'EF6-10','6 - 10',1,NULL),(3,'EF11-50','11 - 50',1,NULL),(4,'EF51-100','51 - 100',1,NULL),(5,'EF100-500','100 - 500',1,NULL),(6,'EF500-','> 500',1,NULL); +INSERT INTO `llx_c_effectif` VALUES (0,'EF0','-',1,NULL),(1,'EF1-5','1 - 5',1,NULL),(2,'EF6-10','6 - 10',1,NULL),(3,'EF11-50','11 - 50',1,NULL),(4,'EF51-100','51 - 100',1,NULL),(5,'EF101-500','101 - 500',1,NULL),(6,'EF500-','> 500',1,NULL); /*!40000 ALTER TABLE `llx_c_effectif` ENABLE KEYS */; UNLOCK TABLES; @@ -2073,9 +2107,9 @@ CREATE TABLE `llx_c_email_senderprofile` ( `private` smallint(6) NOT NULL DEFAULT 0, `date_creation` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `signature` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `email` varchar(255) NOT NULL, + `signature` text DEFAULT NULL, `position` smallint(6) DEFAULT 0, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), @@ -2102,21 +2136,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type_template` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, + `type_template` varchar(32) DEFAULT NULL, + `lang` varchar(6) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `position` smallint(6) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `topic` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `content` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `content_lines` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `enabled` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT '1', - `joinfiles` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT '1', + `topic` text DEFAULT NULL, + `content` mediumtext DEFAULT NULL, + `content_lines` text DEFAULT NULL, + `enabled` varchar(255) DEFAULT '1', + `joinfiles` varchar(255) DEFAULT '1', + `email_from` varchar(255) DEFAULT NULL, + `email_to` varchar(255) DEFAULT NULL, + `email_tocc` varchar(255) DEFAULT NULL, + `email_tobcc` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_email_templates` (`entity`,`label`,`lang`), KEY `idx_type` (`type_template`) @@ -2129,7 +2167,7 @@ CREATE TABLE `llx_c_email_templates` ( LOCK TABLES `llx_c_email_templates` WRITE; /*!40000 ALTER TABLE `llx_c_email_templates` DISABLE KEYS */; -INSERT INTO `llx_c_email_templates` VALUES (1,1,NULL,'propal_send','',1,NULL,NULL,'2018-01-19 11:17:48','My Private email template for proposals',1,1,'Hello __FIRSTNAME__','We wish you a happy new year
__USER_SIGNATURE__',NULL,'1','1'),(2,0,'adherent','member','',0,NULL,NULL,'2018-01-19 11:17:48','(SendAnEMailToMember)',1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1'),(3,0,'banque','thirdparty','',0,NULL,NULL,'2018-01-19 11:17:48','(YourSEPAMandate)',1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',NULL,'1','1'),(6,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnAutoSubscription)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(7,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnMemberValidation)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(8,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnNewSubscription)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1'),(9,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingReminderForExpiredSubscription)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(10,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnCancelation)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(11,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingAnEMailToMember)',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(12,0,'recruitment','recruitmentcandidature_send','',0,NULL,NULL,'2020-12-10 12:24:39','(AnswerCandidature)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__','__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswer)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'$conf->recruitment->enabled','0'),(14,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskConf',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(15,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskBooth',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(16,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsBooth',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(17,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsEvent',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(18,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailAttendees',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(19,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailSpeakers',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(20,0,'partnership','member',NULL,0,NULL,NULL,'2021-04-15 10:22:55','(AlertStatusPartnershipExpiration)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourMembershipWillSoonExpireTopic)__','\n

Dear __MEMBER_FULLNAME__,

\n__(YourMembershipWillSoonExpireContent)__

\n
\n\n __(Sincerely)__
\n __[PARTNERSHIP_SOCIETE_NOM]__
\n \n',NULL,'1','0'),(27,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipWillSoonBeCanceled)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__','\n

Hello,

\n__(YourPartnershipWillSoonBeCanceledContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0'),(28,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipCanceled)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipCanceledTopic)__','\n

Hello,

\n__(YourPartnershipCanceledContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0'),(29,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipRefused)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipRefusedTopic)__','\n

Hello,

\n__(YourPartnershipRefusedContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0'),(30,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipAccepted)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipAcceptedTopic)__','\n

Hello,

\n__(YourPartnershipAcceptedContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0'),(31,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailAskConf)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__','__(Hello)__,

__(OrganizationEventConfRequestWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(32,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailAskBooth)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__','__(Hello)__,

__(OrganizationEventBoothRequestWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(33,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailBoothPayment)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__','__(Hello)__,

__(OrganizationEventPaymentOfBoothWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(34,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailRegistrationPayment)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__','__(Hello)__,

__(OrganizationEventPaymentOfRegistrationWasReceived)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(35,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationMassEmailAttendees)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__','__(Hello)__,

__(OrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(36,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationMassEmailSpeakers)',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__','__(Hello)__,

__(OrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL); +INSERT INTO `llx_c_email_templates` VALUES (1,1,NULL,'propal_send','',1,NULL,NULL,'2018-01-19 11:17:48','My Private email template for proposals',1,1,'Hello __FIRSTNAME__','We wish you a happy new year
__USER_SIGNATURE__',NULL,'1','1',NULL,NULL,NULL,NULL),(2,0,'adherent','member','',0,NULL,NULL,'2018-01-19 11:17:48','(SendAnEMailToMember)',1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1',NULL,NULL,NULL,NULL),(3,0,'banque','thirdparty','',0,NULL,NULL,'2018-01-19 11:17:48','(YourSEPAMandate)',1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',NULL,'1','1',NULL,NULL,NULL,NULL),(6,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnAutoSubscription)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0',NULL,NULL,NULL,NULL),(7,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnMemberValidation)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0',NULL,NULL,NULL,NULL),(8,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnNewSubscription)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1',NULL,NULL,NULL,NULL),(9,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingReminderForExpiredSubscription)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0',NULL,NULL,NULL,NULL),(10,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnCancelation)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0',NULL,NULL,NULL,NULL),(11,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingAnEMailToMember)',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0',NULL,NULL,NULL,NULL),(12,0,'recruitment','recruitmentcandidature_send','',0,NULL,NULL,'2020-12-10 12:24:39','(AnswerCandidature)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__','__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswer)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'$conf->recruitment->enabled','0',NULL,NULL,NULL,NULL),(14,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskConf',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(15,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskBooth',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(16,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsBooth',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(17,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsEvent',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(18,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailAttendees',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(19,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailSpeakers',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(20,0,'partnership','member',NULL,0,NULL,NULL,'2021-04-15 10:22:55','(AlertStatusPartnershipExpiration)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourMembershipWillSoonExpireTopic)__','\n

Dear __MEMBER_FULLNAME__,

\n__(YourMembershipWillSoonExpireContent)__

\n
\n\n __(Sincerely)__
\n __[PARTNERSHIP_SOCIETE_NOM]__
\n \n',NULL,'1','0',NULL,NULL,NULL,NULL),(27,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipWillSoonBeCanceled)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__','\n

Hello,

\n__(YourPartnershipWillSoonBeCanceledContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0',NULL,NULL,NULL,NULL),(28,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipCanceled)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipCanceledTopic)__','\n

Hello,

\n__(YourPartnershipCanceledContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0',NULL,NULL,NULL,NULL),(29,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipRefused)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipRefusedTopic)__','\n

Hello,

\n__(YourPartnershipRefusedContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0',NULL,NULL,NULL,NULL),(30,0,'partnership','partnership_send','',0,NULL,NULL,'2021-07-11 17:49:44','(SendingEmailOnPartnershipAccepted)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipAcceptedTopic)__','\n

Hello,

\n__(YourPartnershipAcceptedContent)__

\n
\n\n
\n\n __(Sincerely)__
\n __[MAIN_INFO_SOCIETE_NOM]__
\n \n',NULL,'1','0',NULL,NULL,NULL,NULL),(31,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailAskConf)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__','__(Hello)__,

__(OrganizationEventConfRequestWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(32,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailAskBooth)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__','__(Hello)__,

__(OrganizationEventBoothRequestWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(33,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailBoothPayment)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__','__(Hello)__,

__(OrganizationEventPaymentOfBoothWasReceived)__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(34,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationEmailRegistrationPayment)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__','__(Hello)__,

__(OrganizationEventPaymentOfRegistrationWasReceived)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(35,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationMassEmailAttendees)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__','__(Hello)__,

__(OrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL),(36,0,'','conferenceorbooth','',0,NULL,NULL,'2022-02-07 13:38:10','(EventOrganizationMassEmailSpeakers)',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__','__(Hello)__,

__(OrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_c_email_templates` ENABLE KEYS */; UNLOCK TABLES; @@ -2142,7 +2180,7 @@ DROP TABLE IF EXISTS `llx_c_exp_tax_cat`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_exp_tax_cat` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `active` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -2196,16 +2234,16 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `element` varchar(64) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `name` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `alias` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `title` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `align` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT 'left', + `name` varchar(32) NOT NULL, + `alias` varchar(32) NOT NULL, + `title` varchar(32) NOT NULL, + `align` varchar(6) DEFAULT 'left', `sort` tinyint(4) NOT NULL DEFAULT 1, `search` tinyint(4) NOT NULL DEFAULT 0, `visible` tinyint(4) NOT NULL DEFAULT 1, - `enabled` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT '1', + `enabled` varchar(255) DEFAULT '1', `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2230,11 +2268,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) COLLATE utf8mb3_unicode_ci NOT NULL, - `name` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, - `paper_size` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL, - `orientation` varchar(1) COLLATE utf8mb3_unicode_ci NOT NULL, - `metric` varchar(5) COLLATE utf8mb3_unicode_ci NOT NULL, + `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, `leftmargin` double(24,8) NOT NULL, `topmargin` double(24,8) NOT NULL, `nx` int(11) NOT NULL, @@ -2272,10 +2310,10 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(255) DEFAULT NULL, `isvatexempted` tinyint(4) NOT NULL DEFAULT 0, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_forme_juridique` (`code`) @@ -2301,8 +2339,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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(255) NOT NULL, `affect` int(11) NOT NULL, `delay` int(11) NOT NULL, `newbymonth` double(8,5) NOT NULL DEFAULT 0.00000, @@ -2334,8 +2372,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2361,8 +2399,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(128) DEFAULT NULL, `c_level` tinyint(4) NOT NULL DEFAULT 0, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -2390,17 +2428,17 @@ CREATE TABLE `llx_c_hrm_public_holiday` ( `id` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 0, `fk_country` int(11) DEFAULT NULL, - `code` varchar(62) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `dayrule` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT '', + `code` varchar(62) DEFAULT NULL, + `dayrule` varchar(64) DEFAULT '', `day` int(11) DEFAULT NULL, `month` int(11) DEFAULT NULL, `year` int(11) DEFAULT NULL, `active` int(11) DEFAULT 1, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_hrm_public_holiday` (`entity`,`code`), UNIQUE KEY `uk_c_hrm_public_holiday2` (`entity`,`fk_country`,`dayrule`,`day`,`month`,`year`) -) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2409,7 +2447,7 @@ CREATE TABLE `llx_c_hrm_public_holiday` ( LOCK TABLES `llx_c_hrm_public_holiday` WRITE; /*!40000 ALTER TABLE `llx_c_hrm_public_holiday` DISABLE KEYS */; -INSERT INTO `llx_c_hrm_public_holiday` VALUES (1,0,0,'NEWYEARDAY1','',1,1,0,1,NULL),(2,0,0,'LABORDAY1','',1,5,0,1,NULL),(3,0,0,'ASSOMPTIONDAY1','',15,8,0,1,NULL),(4,0,0,'CHRISTMASDAY1','',25,12,0,1,NULL),(5,0,1,'FR-VICTORYDAY','',8,5,0,1,NULL),(6,0,1,'FR-NATIONALDAY','',14,7,0,1,NULL),(7,0,1,'FR-ASSOMPTION','',15,8,0,1,NULL),(8,0,1,'FR-TOUSSAINT','',1,11,0,1,NULL),(9,0,1,'FR-ARMISTICE','',11,11,0,1,NULL),(10,0,1,'FR-EASTER','eastermonday',0,0,0,1,NULL),(11,0,1,'FR-ASCENSION','ascension',0,0,0,1,NULL),(12,0,1,'FR-PENTECOST','pentecost',0,0,0,1,NULL),(13,0,3,'IT-LIBEAZIONE','',25,4,0,1,NULL),(14,0,3,'IT-EPIPHANY','',1,6,0,1,NULL),(15,0,3,'IT-REPUBBLICA','',2,6,0,1,NULL),(16,0,3,'IT-TUTTISANTIT','',1,11,0,1,NULL),(17,0,3,'IT-IMMACULE','',8,12,0,1,NULL),(18,0,3,'IT-SAINTSTEFAN','',26,12,0,1,NULL),(19,0,4,'ES-EASTER','easter',0,0,0,1,NULL),(20,0,4,'ES-REYE','',1,6,0,1,NULL),(21,0,4,'ES-HISPANIDAD','',12,10,0,1,NULL),(22,0,4,'ES-TOUSSAINT','',1,11,0,1,NULL),(23,0,4,'ES-CONSTITUIZION','',6,12,0,1,NULL),(24,0,4,'ES-IMMACULE','',8,12,0,1,NULL),(25,0,41,'AT-EASTER','eastermonday',0,0,0,1,NULL),(26,0,41,'AT-ASCENSION','ascension',0,0,0,1,NULL),(27,0,41,'AT-PENTECOST','pentecost',0,0,0,1,NULL),(28,0,41,'AT-FRONLEICHNAM','fronleichnam',0,0,0,1,NULL),(29,0,41,'AT-KONEGIE','',1,6,0,1,NULL),(30,0,41,'AT-26OKT','',26,10,0,1,NULL),(31,0,41,'AT-TOUSSAINT','',1,11,0,1,NULL),(32,0,41,'AT-IMMACULE','',8,12,0,1,NULL),(33,0,41,'AT-24DEC','',24,12,0,1,NULL),(34,0,41,'AT-SAINTSTEFAN','',26,12,0,1,NULL),(35,0,41,'AT-Silvester','',31,12,0,1,NULL),(36,0,117,'IN-REPUBLICDAY','',26,1,0,1,NULL),(37,0,117,'IN-GANDI','',2,10,0,1,NULL); +INSERT INTO `llx_c_hrm_public_holiday` VALUES (1,0,0,'NEWYEARDAY1','',1,1,0,1,NULL),(2,0,0,'LABORDAY1','',1,5,0,1,NULL),(3,0,0,'ASSOMPTIONDAY1','',15,8,0,1,NULL),(4,0,0,'CHRISTMASDAY1','',25,12,0,1,NULL),(5,0,1,'FR-VICTORYDAY','',8,5,0,1,NULL),(6,0,1,'FR-NATIONALDAY','',14,7,0,1,NULL),(7,0,1,'FR-ASSOMPTION','',15,8,0,1,NULL),(8,0,1,'FR-TOUSSAINT','',1,11,0,1,NULL),(9,0,1,'FR-ARMISTICE','',11,11,0,1,NULL),(10,0,1,'FR-EASTER','eastermonday',0,0,0,1,NULL),(11,0,1,'FR-ASCENSION','ascension',0,0,0,1,NULL),(12,0,1,'FR-PENTECOST','pentecost',0,0,0,1,NULL),(13,0,3,'IT-LIBEAZIONE','',25,4,0,1,NULL),(14,0,3,'IT-EPIPHANY','',1,6,0,1,NULL),(15,0,3,'IT-REPUBBLICA','',2,6,0,1,NULL),(16,0,3,'IT-TUTTISANTIT','',1,11,0,1,NULL),(17,0,3,'IT-IMMACULE','',8,12,0,1,NULL),(18,0,3,'IT-SAINTSTEFAN','',26,12,0,1,NULL),(19,0,4,'ES-EASTER','easter',0,0,0,1,NULL),(20,0,4,'ES-REYE','',1,6,0,1,NULL),(21,0,4,'ES-HISPANIDAD','',12,10,0,1,NULL),(22,0,4,'ES-TOUSSAINT','',1,11,0,1,NULL),(23,0,4,'ES-CONSTITUIZION','',6,12,0,1,NULL),(24,0,4,'ES-IMMACULE','',8,12,0,1,NULL),(25,0,41,'AT-EASTER','eastermonday',0,0,0,1,NULL),(26,0,41,'AT-ASCENSION','ascension',0,0,0,1,NULL),(27,0,41,'AT-PENTECOST','pentecost',0,0,0,1,NULL),(28,0,41,'AT-FRONLEICHNAM','fronleichnam',0,0,0,1,NULL),(29,0,41,'AT-KONEGIE','',1,6,0,1,NULL),(30,0,41,'AT-26OKT','',26,10,0,1,NULL),(31,0,41,'AT-TOUSSAINT','',1,11,0,1,NULL),(32,0,41,'AT-IMMACULE','',8,12,0,1,NULL),(33,0,41,'AT-24DEC','',24,12,0,1,NULL),(34,0,41,'AT-SAINTSTEFAN','',26,12,0,1,NULL),(35,0,41,'AT-Silvester','',31,12,0,1,NULL),(36,0,117,'IN-REPUBLICDAY','',26,1,0,1,NULL),(37,0,117,'IN-GANDI','',2,10,0,1,NULL),(75,0,2,'BE-VICTORYDAY','',8,5,0,1,NULL),(76,0,2,'BE-NATIONALDAY','',21,7,0,1,NULL),(77,0,2,'BE-ASSOMPTION','',15,8,0,1,NULL),(78,0,2,'BE-TOUSSAINT','',1,11,0,1,NULL),(79,0,2,'BE-ARMISTICE','',11,11,0,1,NULL),(80,0,2,'BE-EASTER','eastermonday',0,0,0,1,NULL),(81,0,2,'BE-ASCENSION','ascension',0,0,0,1,NULL),(82,0,2,'BE-PENTECOST','pentecost',0,0,0,1,NULL); /*!40000 ALTER TABLE `llx_c_hrm_public_holiday` ENABLE KEYS */; UNLOCK TABLES; @@ -2422,10 +2460,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(3) NOT NULL, + `libelle` varchar(255) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `label` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(100) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_incoterms` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2450,10 +2488,10 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(30) DEFAULT NULL, + `libelle` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`), UNIQUE KEY `uk_c_input_method` (`code`) @@ -2479,10 +2517,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(30) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_input_reason` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2507,8 +2545,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(10) DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, `position` int(11) DEFAULT NULL, `percent` double(5,2) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, @@ -2537,12 +2575,12 @@ DROP TABLE IF EXISTS `llx_c_paiement`; CREATE TABLE `llx_c_paiement` ( `id` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(6) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(6) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, `type` smallint(6) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `accountancy_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code` varchar(32) DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_paiement_code` (`entity`,`code`) @@ -2555,7 +2593,7 @@ CREATE TABLE `llx_c_paiement` ( LOCK TABLES `llx_c_paiement` WRITE; /*!40000 ALTER TABLE `llx_c_paiement` DISABLE KEYS */; -INSERT INTO `llx_c_paiement` VALUES (1,1,'TIP','TIP',2,0,NULL,NULL,0),(2,1,'VIR','Virement',2,1,NULL,NULL,0),(3,1,'PRE','Prélèvement',2,1,NULL,NULL,0),(4,1,'LIQ','Espèces',2,1,NULL,NULL,0),(6,1,'CB','Carte Bancaire',2,1,NULL,NULL,0),(7,1,'CHQ','Chèque',2,1,NULL,NULL,0),(50,1,'VAD','Paiement en ligne',2,0,NULL,NULL,0),(51,1,'TRA','Traite',2,0,NULL,NULL,0),(52,1,'LCR','LCR',2,0,NULL,NULL,0),(53,1,'FAC','Factor',2,0,NULL,NULL,0),(100,1,'KLA','Klarna',1,0,NULL,NULL,0),(101,1,'SOF','Sofort',1,0,NULL,NULL,0),(102,1,'BAN','Bancontact',1,0,NULL,NULL,0),(103,1,'IDE','iDeal',1,0,NULL,NULL,0),(104,1,'GIR','Giropay',1,0,NULL,NULL,0); +INSERT INTO `llx_c_paiement` VALUES (1,1,'TIP','TIP',2,0,NULL,NULL,0),(2,1,'VIR','Virement',2,1,NULL,NULL,0),(3,1,'PRE','Prélèvement',2,1,NULL,NULL,0),(4,1,'LIQ','Espèces',2,1,NULL,NULL,0),(6,1,'CB','Carte Bancaire',2,1,NULL,NULL,0),(7,1,'CHQ','Chèque',2,1,NULL,NULL,0),(50,1,'VAD','Paiement en ligne',2,0,NULL,NULL,0),(51,1,'TRA','Traite',2,0,NULL,NULL,0),(52,1,'LCR','LCR',2,0,NULL,NULL,0),(53,1,'FAC','Factor',2,0,NULL,NULL,0),(100,1,'KLA','Klarna',1,0,NULL,NULL,0),(101,1,'SOF','Sofort',1,0,NULL,NULL,0),(102,1,'BANCON','Bancontact',1,0,NULL,NULL,0),(103,1,'IDE','iDeal',1,0,NULL,NULL,0),(104,1,'GIR','Giropay',1,0,NULL,NULL,0); /*!40000 ALTER TABLE `llx_c_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -2568,13 +2606,13 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(128) DEFAULT NULL, `width` float(6,2) DEFAULT 0.00, `height` float(6,2) DEFAULT 0.00, - `unit` varchar(5) COLLATE utf8mb3_unicode_ci NOT NULL, + `unit` varchar(5) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2599,10 +2637,10 @@ DROP TABLE IF EXISTS `llx_c_partnership_type`; CREATE TABLE `llx_c_partnership_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(32) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `keyword` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `keyword` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_partnership_type` (`entity`,`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2627,16 +2665,16 @@ DROP TABLE IF EXISTS `llx_c_payment_term`; CREATE TABLE `llx_c_payment_term` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(16) DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, `active` tinyint(4) DEFAULT 1, - `libelle` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `libelle_facture` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(255) DEFAULT NULL, + `libelle_facture` text DEFAULT NULL, `type_cdr` tinyint(4) DEFAULT NULL, `nbjour` smallint(6) DEFAULT NULL, `decalage` smallint(6) DEFAULT NULL, - `deposit_percent` varchar(63) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `deposit_percent` varchar(63) DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_payment_term_code` (`entity`,`code`) @@ -2662,8 +2700,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `expression` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `title` varchar(20) NOT NULL, + `expression` varchar(255) NOT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2686,8 +2724,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(20) NOT NULL, + `description` text DEFAULT NULL, `value` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2712,12 +2750,12 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `parameters` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, + `parameters` text DEFAULT NULL, `fk_variable` int(11) NOT NULL, `update_interval` int(11) DEFAULT 0, `next_update` int(11) DEFAULT 0, - `last_status` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_status` text DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2741,7 +2779,7 @@ DROP TABLE IF EXISTS `llx_c_product_nature`; CREATE TABLE `llx_c_product_nature` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` tinyint(4) NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_product_nature` (`code`) @@ -2768,8 +2806,8 @@ DROP TABLE IF EXISTS `llx_c_productbatch_qcstatus`; CREATE TABLE `llx_c_productbatch_qcstatus` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(16) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_productbatch_qcstatus` (`code`,`entity`) @@ -2795,8 +2833,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_propalst` (`code`) @@ -2821,11 +2859,11 @@ DROP TABLE IF EXISTS `llx_c_prospectcontactlevel`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_prospectcontactlevel` ( - `code` varchar(12) CHARACTER SET utf8mb4 NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `label` varchar(128) DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, `active` smallint(6) NOT NULL DEFAULT 1, - `module` varchar(32) CHARACTER SET utf8mb4 DEFAULT NULL, + `module` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2848,11 +2886,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) NOT NULL, + `label` varchar(128) DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, `active` smallint(6) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2876,8 +2914,8 @@ DROP TABLE IF EXISTS `llx_c_recruitment_origin`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_recruitment_origin` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) CHARACTER SET utf8mb4 NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -2903,9 +2941,9 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `cheflieu` varchar(50) DEFAULT NULL, `tncc` int(11) DEFAULT NULL, - `nom` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `code_region` (`code_region`), @@ -2935,11 +2973,11 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `revenuestamp_type` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'fixed', + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, + `revenuestamp_type` varchar(16) NOT NULL DEFAULT 'fixed', PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2964,12 +3002,12 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `tracking` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(30) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, + `description` text DEFAULT NULL, + `tracking` varchar(255) DEFAULT NULL, `active` tinyint(4) DEFAULT 0, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_shipment_mode` (`code`,`entity`) @@ -2995,8 +3033,8 @@ DROP TABLE IF EXISTS `llx_c_shipment_package_type`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_shipment_package_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, `active` int(11) NOT NULL DEFAULT 1, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -3022,10 +3060,10 @@ DROP TABLE IF EXISTS `llx_c_socialnetworks`; CREATE TABLE `llx_c_socialnetworks` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(150) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `url` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `icon` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(100) DEFAULT NULL, + `label` varchar(150) DEFAULT NULL, + `url` text DEFAULT NULL, + `icon` varchar(20) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_c_socialnetworks_code` (`code`) @@ -3051,10 +3089,10 @@ 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(24) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(24) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `picto` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `picto` varchar(128) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_stcomm` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3079,9 +3117,9 @@ DROP TABLE IF EXISTS `llx_c_stcommcontact`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_stcommcontact` ( `id` int(11) NOT NULL, - `code` varchar(12) CHARACTER SET utf8mb4 NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `picto` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL, + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `libelle` varchar(128) DEFAULT NULL, + `picto` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_stcommcontact` (`code`) @@ -3108,14 +3146,14 @@ DROP TABLE IF EXISTS `llx_c_ticket_category`; CREATE TABLE `llx_c_ticket_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(32) NOT NULL, `pos` int(11) NOT NULL DEFAULT 0, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(128) NOT NULL, `active` int(11) DEFAULT 1, `use_default` int(11) DEFAULT 1, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, `fk_parent` int(11) NOT NULL DEFAULT 0, - `force_severity` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `force_severity` varchar(32) DEFAULT NULL, `public` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) @@ -3142,12 +3180,12 @@ DROP TABLE IF EXISTS `llx_c_ticket_resolution`; CREATE TABLE `llx_c_ticket_resolution` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `pos` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(32) NOT NULL, + `pos` varchar(32) NOT NULL, + `label` varchar(128) NOT NULL, `active` int(11) DEFAULT 1, `use_default` int(11) DEFAULT 1, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3173,13 +3211,13 @@ DROP TABLE IF EXISTS `llx_c_ticket_severity`; CREATE TABLE `llx_c_ticket_severity` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `pos` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `color` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(32) NOT NULL, + `pos` varchar(32) NOT NULL, + `label` varchar(128) NOT NULL, + `color` varchar(10) DEFAULT NULL, `active` int(11) DEFAULT 1, `use_default` int(11) DEFAULT 1, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3205,12 +3243,12 @@ DROP TABLE IF EXISTS `llx_c_ticket_type`; CREATE TABLE `llx_c_ticket_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `pos` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(32) NOT NULL, + `pos` varchar(32) NOT NULL, + `label` varchar(128) NOT NULL, `active` int(11) DEFAULT 1, `use_default` int(11) DEFAULT 1, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3236,8 +3274,8 @@ DROP TABLE IF EXISTS `llx_c_transport_mode`; CREATE TABLE `llx_c_transport_mode` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `code` varchar(3) CHARACTER SET utf8mb4 NOT NULL, - `label` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=321 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3263,17 +3301,18 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT '', + `code` varchar(10) DEFAULT '', `taux` double NOT NULL, - `localtax1` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `localtax2` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `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', `recuperableonly` int(11) NOT NULL DEFAULT 0, - `note` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, + `use_default` tinyint(4) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_tva_id` (`fk_pays`,`code`,`taux`,`recuperableonly`) ) ENGINE=InnoDB AUTO_INCREMENT=2478 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3285,7 +3324,7 @@ CREATE TABLE `llx_c_tva` ( LOCK TABLES `llx_c_tva` WRITE; /*!40000 ALTER TABLE `llx_c_tva` DISABLE KEYS */; -INSERT INTO `llx_c_tva` VALUES (11,1,'',20,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(12,1,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(13,1,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(14,1,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL),(15,1,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(16,1,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(17,1,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(21,2,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(22,2,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(23,2,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(24,2,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(31,3,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(32,3,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(33,3,'',4,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(34,3,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(41,4,'',21,'5.2','3','-19:-15:-9','5',0,'VAT standard rate',1,NULL,NULL),(42,4,'',10,'1.4','3','-19:-15:-9','5',0,'VAT reduced rate',1,NULL,NULL),(43,4,'',4,'0.5','3','-19:-15:-9','5',0,'VAT super-reduced rate',1,NULL,NULL),(44,4,'',0,'0','3','-19:-15:-9','5',0,'VAT Rate 0',1,NULL,NULL),(51,5,'',19,NULL,'0',NULL,'0',0,'allgemeine Ust.',1,NULL,NULL),(52,5,'',7,NULL,'0',NULL,'0',0,'ermäßigte USt.',1,NULL,NULL),(53,5,'',0,NULL,'0',NULL,'0',0,'keine USt.',1,NULL,NULL),(54,5,'',5.5,NULL,'0',NULL,'0',0,'USt. Forst',0,NULL,NULL),(55,5,'',10.7,NULL,'0',NULL,'0',0,'USt. Landwirtschaft',0,NULL,NULL),(61,6,'',8,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(62,6,'',3.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(63,6,'',2.5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(64,6,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(71,7,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(72,7,'',17.5,NULL,'0',NULL,'0',0,'VAT standard rate before 2011',1,NULL,NULL),(73,7,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(74,7,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(81,8,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(82,8,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(83,8,'',13.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(84,8,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(85,8,'',4.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(91,9,'',17,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(92,9,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate 0',1,NULL,NULL),(93,9,'',3,NULL,'0',NULL,'0',0,'VAT super reduced rate 0',1,NULL,NULL),(94,9,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(101,10,'',6,'1','4','0','0',0,'VAT 6%',1,NULL,NULL),(102,10,'',12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL),(103,10,'',18,'1','4','0','0',0,'VAT 18%',1,NULL,NULL),(104,10,'',7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL),(105,10,'',15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL),(106,10,'',22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL),(107,10,'',0,'1','4','0','0',0,'VAT Rate 0',1,NULL,NULL),(111,11,'',0,NULL,'0',NULL,'0',0,'No Sales Tax',1,NULL,NULL),(112,11,'',4,NULL,'0',NULL,'0',0,'Sales Tax 4%',1,NULL,NULL),(113,11,'',6,NULL,'0',NULL,'0',0,'Sales Tax 6%',1,NULL,NULL),(121,12,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(122,12,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(123,12,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(124,12,'',7,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(125,12,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(141,14,'',7,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(142,14,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(143,14,'',5,'9.975','1',NULL,'0',0,'GST/TPS and PST/TVQ rate for Province',1,NULL,NULL),(171,17,'',19,NULL,'0',NULL,'0',0,'Algemeen BTW tarief',1,NULL,NULL),(172,17,'',6,NULL,'0',NULL,'0',0,'Verlaagd BTW tarief',1,NULL,NULL),(173,17,'',0,NULL,'0',NULL,'0',0,'0 BTW tarief',1,NULL,NULL),(174,17,'',21,NULL,'0',NULL,'0',0,'Algemeen BTW tarief (vanaf 1 oktober 2012)',0,NULL,NULL),(201,20,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(202,20,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(203,20,'',6,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(204,20,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(211,21,'',0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(212,21,'',18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL),(221,22,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(222,22,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(223,22,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(231,23,'',21,NULL,'0',NULL,'0',0,'IVA standard rate',1,NULL,NULL),(232,23,'',10.5,NULL,'0',NULL,'0',0,'IVA reduced rate',1,NULL,NULL),(233,23,'',0,NULL,'0',NULL,'0',0,'IVA Rate 0',1,NULL,NULL),(241,24,'',19.25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(242,24,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(251,25,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(252,25,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(253,25,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(254,25,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(261,26,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(271,27,'',19.6,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(272,27,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(273,27,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(274,27,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL),(275,27,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(276,27,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(277,27,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(281,28,'',10,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(282,28,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(411,41,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(412,41,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(413,41,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(461,46,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(462,46,'',15,NULL,'0',NULL,'0',0,'VAT 15%',1,NULL,NULL),(463,46,'',7.5,NULL,'0',NULL,'0',0,'VAT 7.5%',1,NULL,NULL),(561,56,'',0,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(591,59,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(592,59,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(593,59,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(671,67,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(672,67,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(801,80,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(802,80,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(861,86,'',13,NULL,'0',NULL,'0',0,'IVA 13',1,NULL,NULL),(862,86,'',0,NULL,'0',NULL,'0',0,'SIN IVA',1,NULL,NULL),(1141,114,'',0,NULL,'0',NULL,'0',0,'No ISV',1,NULL,NULL),(1142,114,'',12,NULL,'0',NULL,'0',0,'ISV 12%',1,NULL,NULL),(1161,116,'',25.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1162,116,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1163,116,'',0,NULL,'0',NULL,'0',0,'VAT rate 0',1,NULL,NULL),(1171,117,'',12.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1172,117,'',4,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1173,117,'',1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1174,117,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1176,117,'CGST+SGST',0,'9','1','9','1',0,'CGST+SGST - Same state sales',1,NULL,NULL),(1177,117,'IGST',18,'0','0','0','0',0,'IGST',1,NULL,NULL),(1231,123,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1232,123,'',5,NULL,'0',NULL,'0',0,'VAT Rate 5',1,NULL,NULL),(1401,140,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1402,140,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1403,140,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1404,140,'',3,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1405,140,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1481,148,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1482,148,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1483,148,'',5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1484,148,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1511,151,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1512,151,'',14,NULL,'0',NULL,'0',0,'VAT Rate 14',1,NULL,NULL),(1521,152,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1522,152,'',15,NULL,'0',NULL,'0',0,'VAT Rate 15',1,NULL,NULL),(1541,154,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(1542,154,'',16,NULL,'0',NULL,'0',0,'VAT 16%',1,NULL,NULL),(1543,154,'',10,NULL,'0',NULL,'0',0,'VAT Frontero',1,NULL,NULL),(1662,166,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1663,166,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1692,169,'',5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1693,169,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1731,173,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1732,173,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1733,173,'',8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1734,173,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1781,178,'',7,NULL,'0',NULL,'0',0,'ITBMS standard rate',1,NULL,NULL),(1782,178,'',0,NULL,'0',NULL,'0',0,'ITBMS Rate 0',1,NULL,NULL),(1811,181,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1812,181,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1841,184,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1842,184,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1843,184,'',3,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1844,184,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1881,188,'',24,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1882,188,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1883,188,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1884,188,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1931,193,'',0,NULL,'0',NULL,'0',0,'No VAT in SPM',1,NULL,NULL),(2011,201,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2012,201,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2013,201,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2021,202,'',22,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2022,202,'',9.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2023,202,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2051,205,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2052,205,'',14,NULL,'0',NULL,'0',0,'VAT 14%',1,NULL,NULL),(2131,213,'',5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL),(2261,226,'',20,NULL,'0',NULL,'0',0,'VAT standart rate',1,NULL,NULL),(2262,226,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2321,232,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2322,232,'',12,NULL,'0',NULL,'0',0,'VAT 12%',1,NULL,NULL),(2323,232,'',8,NULL,'0',NULL,'0',0,'VAT 8%',1,NULL,NULL),(2461,246,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2462,102,'',23,'0','0','0','0',0,'Κανονικός Φ.Π.Α.',1,NULL,NULL),(2463,102,'',0,'0','0','0','0',0,'Μηδενικό Φ.Π.Α.',1,NULL,NULL),(2464,102,'',13,'0','0','0','0',0,'Μειωμένος Φ.Π.Α.',1,NULL,NULL),(2465,102,'',6.5,'0','0','0','0',0,'Υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2466,102,'',16,'0','0','0','0',0,'Νήσων κανονικός Φ.Π.Α.',1,NULL,NULL),(2467,102,'',9,'0','0','0','0',0,'Νήσων μειωμένος Φ.Π.Α.',1,NULL,NULL),(2468,102,'',5,'0','0','0','0',0,'Νήσων υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2469,1,'85',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(2470,1,'85NPR',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(2471,1,'85NPROM',8.5,'2','3',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0,NULL,NULL),(2472,1,'85NPROMOMR',8.5,'2','3','2.5','3',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0,NULL,NULL),(2477,117,'',19.6,'0','0','0','0',0,'aaa',1,'101','10'); +INSERT INTO `llx_c_tva` VALUES (11,1,'',20,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL,0),(12,1,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL,0),(13,1,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL,0),(14,1,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL,0),(15,1,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL,0),(16,1,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(17,1,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(21,2,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(22,2,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(23,2,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL,0),(24,2,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(31,3,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(32,3,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(33,3,'',4,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(34,3,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(41,4,'',21,'5.2','3','-19:-15:-9','5',0,'VAT standard rate',1,NULL,NULL,0),(42,4,'',10,'1.4','3','-19:-15:-9','5',0,'VAT reduced rate',1,NULL,NULL,0),(43,4,'',4,'0.5','3','-19:-15:-9','5',0,'VAT super-reduced rate',1,NULL,NULL,0),(44,4,'',0,'0','3','-19:-15:-9','5',0,'VAT Rate 0',1,NULL,NULL,0),(51,5,'',19,NULL,'0',NULL,'0',0,'allgemeine Ust.',1,NULL,NULL,0),(52,5,'',7,NULL,'0',NULL,'0',0,'ermäßigte USt.',1,NULL,NULL,0),(53,5,'',0,NULL,'0',NULL,'0',0,'keine USt.',1,NULL,NULL,0),(54,5,'',5.5,NULL,'0',NULL,'0',0,'USt. Forst',0,NULL,NULL,0),(55,5,'',10.7,NULL,'0',NULL,'0',0,'USt. Landwirtschaft',0,NULL,NULL,0),(61,6,'',8,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(62,6,'',3.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(63,6,'',2.5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(64,6,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(71,7,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(72,7,'',17.5,NULL,'0',NULL,'0',0,'VAT standard rate before 2011',1,NULL,NULL,0),(73,7,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(74,7,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(81,8,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(82,8,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(83,8,'',13.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(84,8,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(85,8,'',4.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(91,9,'',17,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(92,9,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate 0',1,NULL,NULL,0),(93,9,'',3,NULL,'0',NULL,'0',0,'VAT super reduced rate 0',1,NULL,NULL,0),(94,9,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(101,10,'',6,'1','4','0','0',0,'VAT 6%',1,NULL,NULL,0),(102,10,'',12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL,0),(103,10,'',18,'1','4','0','0',0,'VAT 18%',1,NULL,NULL,0),(104,10,'',7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL,0),(105,10,'',15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL,0),(106,10,'',22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL,0),(107,10,'',0,'1','4','0','0',0,'VAT Rate 0',1,NULL,NULL,0),(111,11,'',0,NULL,'0',NULL,'0',0,'No Sales Tax',1,NULL,NULL,0),(112,11,'',4,NULL,'0',NULL,'0',0,'Sales Tax 4%',1,NULL,NULL,0),(113,11,'',6,NULL,'0',NULL,'0',0,'Sales Tax 6%',1,NULL,NULL,0),(121,12,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(122,12,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(123,12,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(124,12,'',7,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(125,12,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(141,14,'',7,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(142,14,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(143,14,'',5,'9.975','1',NULL,'0',0,'GST/TPS and PST/TVQ rate for Province',1,NULL,NULL,0),(171,17,'',19,NULL,'0',NULL,'0',0,'Algemeen BTW tarief',1,NULL,NULL,0),(172,17,'',6,NULL,'0',NULL,'0',0,'Verlaagd BTW tarief',1,NULL,NULL,0),(173,17,'',0,NULL,'0',NULL,'0',0,'0 BTW tarief',1,NULL,NULL,0),(174,17,'',21,NULL,'0',NULL,'0',0,'Algemeen BTW tarief (vanaf 1 oktober 2012)',0,NULL,NULL,0),(201,20,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(202,20,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(203,20,'',6,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(204,20,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(211,21,'',0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL,0),(212,21,'',18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL,0),(221,22,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(222,22,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(223,22,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(231,23,'',21,NULL,'0',NULL,'0',0,'IVA standard rate',1,NULL,NULL,0),(232,23,'',10.5,NULL,'0',NULL,'0',0,'IVA reduced rate',1,NULL,NULL,0),(233,23,'',0,NULL,'0',NULL,'0',0,'IVA Rate 0',1,NULL,NULL,0),(241,24,'',19.25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(242,24,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(251,25,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(252,25,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(253,25,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(254,25,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(261,26,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(271,27,'',19.6,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL,0),(272,27,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL,0),(273,27,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL,0),(274,27,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL,0),(275,27,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL,0),(276,27,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(277,27,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(281,28,'',10,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(282,28,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(411,41,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(412,41,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(413,41,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(461,46,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL,0),(462,46,'',15,NULL,'0',NULL,'0',0,'VAT 15%',1,NULL,NULL,0),(463,46,'',7.5,NULL,'0',NULL,'0',0,'VAT 7.5%',1,NULL,NULL,0),(561,56,'',0,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(591,59,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(592,59,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(593,59,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(671,67,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(672,67,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(801,80,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(802,80,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(861,86,'',13,NULL,'0',NULL,'0',0,'IVA 13',1,NULL,NULL,0),(862,86,'',0,NULL,'0',NULL,'0',0,'SIN IVA',1,NULL,NULL,0),(1141,114,'',0,NULL,'0',NULL,'0',0,'No ISV',1,NULL,NULL,0),(1142,114,'',12,NULL,'0',NULL,'0',0,'ISV 12%',1,NULL,NULL,0),(1161,116,'',25.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1162,116,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1163,116,'',0,NULL,'0',NULL,'0',0,'VAT rate 0',1,NULL,NULL,0),(1171,117,'',12.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1172,117,'',4,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1173,117,'',1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(1174,117,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1176,117,'CGST+SGST',0,'9','1','9','1',0,'CGST+SGST - Same state sales',1,NULL,NULL,0),(1177,117,'IGST',18,'0','0','0','0',0,'IGST',1,NULL,NULL,0),(1231,123,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1232,123,'',5,NULL,'0',NULL,'0',0,'VAT Rate 5',1,NULL,NULL,0),(1401,140,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1402,140,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1403,140,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1404,140,'',3,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(1405,140,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1481,148,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1482,148,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1483,148,'',5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL,0),(1484,148,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1511,151,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1512,151,'',14,NULL,'0',NULL,'0',0,'VAT Rate 14',1,NULL,NULL,0),(1521,152,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1522,152,'',15,NULL,'0',NULL,'0',0,'VAT Rate 15',1,NULL,NULL,0),(1541,154,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL,0),(1542,154,'',16,NULL,'0',NULL,'0',0,'VAT 16%',1,NULL,NULL,0),(1543,154,'',10,NULL,'0',NULL,'0',0,'VAT Frontero',1,NULL,NULL,0),(1662,166,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1663,166,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1692,169,'',5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1693,169,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1731,173,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1732,173,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1733,173,'',8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1734,173,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1781,178,'',7,NULL,'0',NULL,'0',0,'ITBMS standard rate',1,NULL,NULL,0),(1782,178,'',0,NULL,'0',NULL,'0',0,'ITBMS Rate 0',1,NULL,NULL,0),(1811,181,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1812,181,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1841,184,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1842,184,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1843,184,'',3,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1844,184,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1881,188,'',24,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(1882,188,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1883,188,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(1884,188,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(1931,193,'',0,NULL,'0',NULL,'0',0,'No VAT in SPM',1,NULL,NULL,0),(2011,201,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(2012,201,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(2013,201,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(2021,202,'',22,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL,0),(2022,202,'',9.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL,0),(2023,202,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(2051,205,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL,0),(2052,205,'',14,NULL,'0',NULL,'0',0,'VAT 14%',1,NULL,NULL,0),(2131,213,'',5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL,0),(2261,226,'',20,NULL,'0',NULL,'0',0,'VAT standart rate',1,NULL,NULL,0),(2262,226,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(2321,232,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL,0),(2322,232,'',12,NULL,'0',NULL,'0',0,'VAT 12%',1,NULL,NULL,0),(2323,232,'',8,NULL,'0',NULL,'0',0,'VAT 8%',1,NULL,NULL,0),(2461,246,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL,0),(2462,102,'',23,'0','0','0','0',0,'Κανονικός Φ.Π.Α.',1,NULL,NULL,0),(2463,102,'',0,'0','0','0','0',0,'Μηδενικό Φ.Π.Α.',1,NULL,NULL,0),(2464,102,'',13,'0','0','0','0',0,'Μειωμένος Φ.Π.Α.',1,NULL,NULL,0),(2465,102,'',6.5,'0','0','0','0',0,'Υπερμειωμένος Φ.Π.Α.',1,NULL,NULL,0),(2466,102,'',16,'0','0','0','0',0,'Νήσων κανονικός Φ.Π.Α.',1,NULL,NULL,0),(2467,102,'',9,'0','0','0','0',0,'Νήσων μειωμένος Φ.Π.Α.',1,NULL,NULL,0),(2468,102,'',5,'0','0','0','0',0,'Νήσων υπερμειωμένος Φ.Π.Α.',1,NULL,NULL,0),(2469,1,'85',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL,0),(2470,1,'85NPR',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL,0),(2471,1,'85NPROM',8.5,'2','3',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0,NULL,NULL,0),(2472,1,'85NPROMOMR',8.5,'2','3','2.5','3',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0,NULL,NULL,0),(2477,117,'',19.6,'0','0','0','0',0,'aaa',1,'101','10',0); /*!40000 ALTER TABLE `llx_c_tva` ENABLE KEYS */; UNLOCK TABLES; @@ -3298,12 +3337,12 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `source` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'external', - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `element` varchar(30) NOT NULL, + `source` varchar(8) NOT NULL DEFAULT 'external', + `code` varchar(32) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_contact_id` (`element`,`source`,`code`) @@ -3329,11 +3368,11 @@ DROP TABLE IF EXISTS `llx_c_type_container`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_type_container` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(32) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_container_id` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3358,11 +3397,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) NOT NULL, + `label` varchar(128) DEFAULT NULL, + `accountancy_code` varchar(32) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, `type` int(11) DEFAULT 0, PRIMARY KEY (`id`), @@ -3389,8 +3428,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(32) NOT NULL, + `label` varchar(128) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_resource_id` (`label`,`code`) @@ -3416,11 +3455,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `libelle` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(12) NOT NULL, + `libelle` varchar(128) DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, - `module` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `module` varchar(32) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_typent` (`code`) @@ -3446,13 +3485,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(3) DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `short_label` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(128) DEFAULT NULL, + `short_label` varchar(5) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, `scale` int(11) DEFAULT NULL, - `unit_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `unit_type` varchar(10) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_units_code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3477,11 +3516,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(5) DEFAULT NULL, `fk_county` int(11) DEFAULT NULL, `fk_pays` int(11) NOT NULL DEFAULT 0, - `zip` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL, - `town` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `zip` varchar(10) NOT NULL, + `town` varchar(255) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ziptown_fk_pays` (`zip`,`town`,`fk_pays`), @@ -3514,8 +3553,8 @@ DROP TABLE IF EXISTS `llx_cabinetmed_c_banques`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_c_banques` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3539,8 +3578,8 @@ DROP TABLE IF EXISTS `llx_cabinetmed_c_examconclusion`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_c_examconclusion` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, `position` int(11) DEFAULT 10, `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -3568,24 +3607,24 @@ CREATE TABLE `llx_cabinetmed_cons` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) DEFAULT NULL, `datecons` date NOT NULL, - `typepriseencharge` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `motifconsprinc` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `diaglesprinc` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `motifconssec` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `diaglessec` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `hdm` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `examenclinique` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `examenprescrit` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `traitementprescrit` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `typevisit` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `infiltration` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `codageccam` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `typepriseencharge` varchar(8) DEFAULT NULL, + `motifconsprinc` varchar(64) DEFAULT NULL, + `diaglesprinc` varchar(64) DEFAULT NULL, + `motifconssec` text DEFAULT NULL, + `diaglessec` text DEFAULT NULL, + `hdm` text DEFAULT NULL, + `examenclinique` text DEFAULT NULL, + `examenprescrit` text DEFAULT NULL, + `traitementprescrit` text DEFAULT NULL, + `comment` text DEFAULT NULL, + `typevisit` varchar(8) NOT NULL, + `infiltration` varchar(255) DEFAULT NULL, + `codageccam` varchar(16) DEFAULT NULL, `montant_cheque` double(24,8) DEFAULT NULL, `montant_espece` double(24,8) DEFAULT NULL, `montant_carte` double(24,8) DEFAULT NULL, `montant_tiers` double(24,8) DEFAULT NULL, - `banque` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `banque` varchar(128) DEFAULT NULL, `date_c` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user` int(11) DEFAULT NULL, @@ -3620,8 +3659,8 @@ CREATE TABLE `llx_cabinetmed_cons_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 utf8mb3_unicode_ci DEFAULT NULL, - `aaa` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `aaa` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_cabinetmed_cons_extrafields` (`fk_object`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3646,12 +3685,12 @@ DROP TABLE IF EXISTS `llx_cabinetmed_diaglec`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_diaglec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, `active` smallint(6) NOT NULL DEFAULT 1, - `icd` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `icd` varchar(12) DEFAULT NULL, `position` int(11) DEFAULT 10, - `lang` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(12) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3678,10 +3717,10 @@ CREATE TABLE `llx_cabinetmed_examaut` ( `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `dateexam` date NOT NULL, - `examprinc` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `examsec` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `concprinc` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `concsec` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `examprinc` varchar(64) DEFAULT NULL, + `examsec` text DEFAULT NULL, + `concprinc` varchar(64) DEFAULT NULL, + `concsec` text DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -3709,9 +3748,9 @@ CREATE TABLE `llx_cabinetmed_exambio` ( `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `dateexam` date NOT NULL, - `resultat` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `conclusion` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `resultat` text DEFAULT NULL, + `conclusion` text DEFAULT NULL, + `comment` text DEFAULT NULL, `suivipr_ad` int(11) DEFAULT NULL, `suivipr_ag` int(11) DEFAULT NULL, `suivipr_vs` int(11) DEFAULT NULL, @@ -3748,9 +3787,9 @@ DROP TABLE IF EXISTS `llx_cabinetmed_examenprescrit`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_examenprescrit` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, - `biorad` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, + `biorad` varchar(8) NOT NULL, `position` int(11) DEFAULT 10, `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -3776,8 +3815,8 @@ DROP TABLE IF EXISTS `llx_cabinetmed_motifcons`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_motifcons` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(8) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `code` varchar(8) NOT NULL, + `label` varchar(64) NOT NULL, `position` int(11) DEFAULT 10, `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) @@ -3803,15 +3842,15 @@ DROP TABLE IF EXISTS `llx_cabinetmed_patient`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_patient` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `note_antemed` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_antechirgen` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_antechirortho` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_anterhum` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_other` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_traitclass` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_traitallergie` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_traitintol` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_traitspec` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_antemed` text DEFAULT NULL, + `note_antechirgen` text DEFAULT NULL, + `note_antechirortho` text DEFAULT NULL, + `note_anterhum` text DEFAULT NULL, + `note_other` text DEFAULT NULL, + `note_traitclass` text DEFAULT NULL, + `note_traitallergie` text DEFAULT NULL, + `note_traitintol` text DEFAULT NULL, + `note_traitspec` text DEFAULT NULL, `alert_antemed` smallint(6) DEFAULT NULL, `alert_antechirgen` smallint(6) DEFAULT NULL, `alert_antechirortho` smallint(6) DEFAULT NULL, @@ -3845,48 +3884,48 @@ DROP TABLE IF EXISTS `llx_cabinetmed_societe`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_societe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `nom` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `nom` varchar(60) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(128) DEFAULT NULL, + `ref_int` varchar(60) DEFAULT NULL, `statut` smallint(6) DEFAULT 0, `parent` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `datea` datetime DEFAULT NULL, `status` smallint(6) DEFAULT 1, - `code_client` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_fournisseur` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_compta` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_compta_fournisseur` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cp` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ville` varchar(50) COLLATE utf8mb3_unicode_ci 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, + `cp` varchar(10) DEFAULT NULL, + `ville` varchar(50) DEFAULT NULL, `fk_departement` int(11) DEFAULT 0, `fk_pays` int(11) DEFAULT 0, - `tel` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fax` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `tel` varchar(20) DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, `fk_effectif` int(11) DEFAULT 0, `fk_typent` int(11) DEFAULT 0, `fk_forme_juridique` int(11) DEFAULT 0, `fk_currency` int(11) DEFAULT 0, - `siren` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `siret` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ape` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof4` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof5` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof6` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `tva_intra` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `siren` varchar(128) DEFAULT NULL, + `siret` varchar(128) DEFAULT NULL, + `ape` varchar(128) DEFAULT NULL, + `idprof4` varchar(128) DEFAULT NULL, + `idprof5` varchar(128) DEFAULT NULL, + `idprof6` varchar(128) DEFAULT NULL, + `tva_intra` varchar(20) DEFAULT NULL, `capital` double DEFAULT NULL, `fk_stcomm` int(11) NOT NULL DEFAULT 0, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `prefix_comm` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, + `prefix_comm` varchar(5) DEFAULT NULL, `client` smallint(6) DEFAULT 0, `fournisseur` smallint(6) DEFAULT 0, - `supplier_account` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fk_prospectlevel` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `supplier_account` varchar(32) DEFAULT NULL, + `fk_prospectlevel` varchar(12) DEFAULT NULL, `customer_bad` smallint(6) DEFAULT 0, `customer_rate` double DEFAULT 0, `supplier_rate` double DEFAULT 0, @@ -3898,13 +3937,13 @@ CREATE TABLE `llx_cabinetmed_societe` ( `tva_assuj` smallint(6) DEFAULT 1, `localtax1_assuj` smallint(6) DEFAULT 0, `localtax2_assuj` smallint(6) DEFAULT 0, - `barcode` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `barcode` varchar(255) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT 0, `price_level` int(11) DEFAULT NULL, - `default_lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `logo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `canvas` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_lang` varchar(6) DEFAULT NULL, + `logo` varchar(255) DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3928,15 +3967,15 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(255) NOT NULL, `type` int(11) NOT NULL DEFAULT 1, `entity` int(11) NOT NULL DEFAULT 1, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `visible` tinyint(4) NOT NULL DEFAULT 1, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `color` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `color` varchar(8) DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, @@ -3945,7 +3984,7 @@ CREATE TABLE `llx_categorie` ( UNIQUE KEY `uk_categorie_ref` (`entity`,`fk_parent`,`label`,`type`), KEY `idx_categorie_type` (`type`), KEY `idx_categorie_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3954,7 +3993,7 @@ CREATE TABLE `llx_categorie` ( LOCK TABLES `llx_categorie` WRITE; /*!40000 ALTER TABLE `llx_categorie` DISABLE KEYS */; -INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f','',NULL,'2020-06-12 17:12:24',NULL,NULL),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00','',NULL,'2020-06-12 17:12:24',NULL,NULL),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(38,0,'Main center',9,1,'',NULL,0,NULL,'bf5f00',NULL,'2020-06-12 19:17:30','2020-06-12 17:17:30',12,NULL),(39,0,'Center B',9,1,'Center B',NULL,0,NULL,'ff7f00',NULL,'2020-06-12 19:17:55','2020-06-12 17:17:55',12,NULL),(40,0,'Bank foreign',5,1,'',NULL,0,NULL,'00bfbf',NULL,'2021-04-15 10:26:42','2021-04-15 13:26:42',12,NULL),(41,0,'Bank old company',5,1,'',NULL,0,NULL,'7f7f00',NULL,'2021-04-15 10:26:52','2021-04-15 13:26:52',12,NULL),(42,0,'Event Urgent',10,1,'',NULL,0,NULL,'7f003f',NULL,'2021-04-15 10:42:53','2021-04-15 13:42:53',12,NULL),(43,0,'Event hidden',10,1,'',NULL,0,NULL,'cccccc',NULL,'2021-04-15 10:43:06','2021-04-15 13:43:06',12,NULL),(44,0,'Event Managers',10,1,'',NULL,0,NULL,'007f7f',NULL,'2021-04-15 10:43:34','2021-04-15 13:43:34',12,NULL); +INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f','',NULL,'2020-06-12 17:12:24',NULL,NULL),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00','',NULL,'2020-06-12 17:12:24',NULL,NULL),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(38,0,'Main center',9,1,'',NULL,0,NULL,'bf5f00',NULL,'2020-06-12 19:17:30','2020-06-12 17:17:30',12,NULL),(39,0,'Center B',9,1,'Center B',NULL,0,NULL,'ff7f00',NULL,'2020-06-12 19:17:55','2020-06-12 17:17:55',12,NULL),(40,0,'Bank foreign',5,1,'',NULL,0,NULL,'00bfbf',NULL,'2021-04-15 10:26:42','2021-04-15 13:26:42',12,NULL),(41,0,'Bank old company',5,1,'',NULL,0,NULL,'7f7f00',NULL,'2021-04-15 10:26:52','2021-04-15 13:26:52',12,NULL),(42,0,'Event Urgent',10,1,'',NULL,0,NULL,'7f003f',NULL,'2021-04-15 10:42:53','2021-04-15 13:42:53',12,NULL),(43,0,'Event hidden',10,1,'',NULL,0,NULL,'cccccc',NULL,'2021-04-15 10:43:06','2021-04-15 13:43:06',12,NULL),(44,0,'Event Managers',10,1,'',NULL,0,NULL,'007f7f',NULL,'2021-04-15 10:43:34','2021-04-15 13:43:34',12,NULL),(45,0,'Admin',13,1,'',NULL,0,NULL,'bf5f00',NULL,'2022-12-11 21:26:18','2022-12-11 21:26:18',12,NULL),(46,0,'Production',13,1,'',NULL,0,NULL,'007f7f',NULL,'2022-12-11 21:26:35','2022-12-11 21:26:35',12,NULL),(47,0,'Customers',12,1,'',NULL,0,NULL,'bf5f00',NULL,'2022-12-11 21:27:30','2022-12-11 21:27:30',12,NULL),(48,0,'Sales Representatives',12,1,'',NULL,0,NULL,'7f3f00',NULL,'2022-12-11 21:27:47','2022-12-11 21:27:47',12,NULL),(49,0,'Security',12,1,'',NULL,0,NULL,'bf0000',NULL,'2022-12-11 21:28:06','2022-12-11 21:28:06',12,NULL); /*!40000 ALTER TABLE `llx_categorie` ENABLE KEYS */; UNLOCK TABLES; @@ -3968,7 +4007,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_account`), KEY `idx_categorie_account_fk_categorie` (`fk_categorie`), KEY `idx_categorie_account_fk_account` (`fk_account`), @@ -3997,7 +4036,7 @@ DROP TABLE IF EXISTS `llx_categorie_actioncomm`; CREATE TABLE `llx_categorie_actioncomm` ( `fk_categorie` int(11) NOT NULL, `fk_actioncomm` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_actioncomm`), KEY `idx_categorie_actioncomm_fk_categorie` (`fk_categorie`), KEY `idx_categorie_actioncomm_fk_actioncomm` (`fk_actioncomm`), @@ -4025,7 +4064,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_socpeople`), KEY `idx_categorie_contact_fk_categorie` (`fk_categorie`), KEY `idx_categorie_contact_fk_socpeople` (`fk_socpeople`), @@ -4054,7 +4093,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_soc`), KEY `idx_categorie_fournisseur_fk_categorie` (`fk_categorie`), KEY `idx_categorie_fournisseur_fk_societe` (`fk_soc`), @@ -4083,7 +4122,7 @@ DROP TABLE IF EXISTS `llx_categorie_knowledgemanagement`; CREATE TABLE `llx_categorie_knowledgemanagement` ( `fk_categorie` int(11) NOT NULL, `fk_knowledgemanagement` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_knowledgemanagement`), KEY `idx_categorie_knowledgemanagement_fk_categorie` (`fk_categorie`), KEY `idx_categorie_knowledgemanagement_fk_knowledgemanagement` (`fk_knowledgemanagement`), @@ -4111,9 +4150,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(5) NOT NULL DEFAULT '0', + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, 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`) @@ -4167,7 +4206,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_product`), KEY `idx_categorie_product_fk_categorie` (`fk_categorie`), KEY `idx_categorie_product_fk_product` (`fk_product`), @@ -4196,7 +4235,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_project`), KEY `idx_categorie_project_fk_categorie` (`fk_categorie`), KEY `idx_categorie_project_fk_project` (`fk_project`), @@ -4226,7 +4265,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_soc`), KEY `idx_categorie_societe_fk_categorie` (`fk_categorie`), KEY `idx_categorie_societe_fk_societe` (`fk_soc`), @@ -4255,7 +4294,7 @@ DROP TABLE IF EXISTS `llx_categorie_ticket`; CREATE TABLE `llx_categorie_ticket` ( `fk_categorie` int(11) NOT NULL, `fk_ticket` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_ticket`), KEY `idx_categorie_ticket_fk_categorie` (`fk_categorie`), KEY `idx_categorie_ticket_fk_ticket` (`fk_ticket`), @@ -4283,7 +4322,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_user`), KEY `idx_categorie_user_fk_categorie` (`fk_categorie`), KEY `idx_categorie_user_fk_user` (`fk_user`), @@ -4311,7 +4350,7 @@ DROP TABLE IF EXISTS `llx_categorie_warehouse`; CREATE TABLE `llx_categorie_warehouse` ( `fk_categorie` int(11) NOT NULL, `fk_warehouse` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_warehouse`), KEY `idx_categorie_warehouse_fk_categorie` (`fk_categorie`), KEY `idx_categorie_warehouse_fk_warehouse` (`fk_warehouse`), @@ -4340,7 +4379,7 @@ DROP TABLE IF EXISTS `llx_categorie_website_page`; CREATE TABLE `llx_categorie_website_page` ( `fk_categorie` int(11) NOT NULL, `fk_website_page` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`fk_categorie`,`fk_website_page`), KEY `idx_categorie_website_page_fk_categorie` (`fk_categorie`), KEY `idx_categorie_website_page_fk_website_page` (`fk_website_page`), @@ -4371,7 +4410,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_categories_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4396,7 +4435,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `libelle` varchar(80) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_type` int(11) NOT NULL, `fk_account` int(11) DEFAULT NULL, @@ -4407,15 +4446,15 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(16) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4442,11 +4481,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_client` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, @@ -4464,16 +4503,17 @@ CREATE TABLE `llx_commande` ( `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, + `revenuestamp` 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `facture` tinyint(4) DEFAULT 0, `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_currency` varchar(3) DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, - `deposit_percent` varchar(63) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `deposit_percent` varchar(63) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `date_livraison` datetime DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, @@ -4481,19 +4521,19 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module_source` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pos_source` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `module_source` varchar(32) DEFAULT NULL, + `pos_source` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_commande_ref` (`ref`,`entity`), KEY `idx_commande_fk_soc` (`fk_soc`), @@ -4517,7 +4557,7 @@ CREATE TABLE `llx_commande` ( LOCK TABLES `llx_commande` WRITE; /*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; -INSERT INTO `llx_commande` VALUES (1,'2022-02-07 13:37:54',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2021-08-08 13:59:09',NULL,'2021-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2022-02-07 13:37:54',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2021-02-12 17:06:51',NULL,'2021-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2022-02-07 13:37:54',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2021-02-17 18:27:56',NULL,'2021-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2022-02-07 13:37:54',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2021-08-08 03:04:21',NULL,'2021-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2022-07-04 01:11:35',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2022-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2022-07-04 01:11:35',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2021-02-15 23:50:34',NULL,'2022-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2022-02-07 13:37:54',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2021-02-15 23:51:23',NULL,'2022-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2022-07-04 01:11:35',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2021-02-15 23:55:52',NULL,'2022-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2022-07-04 01:11:35',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2022-02-16 00:03:44',NULL,'2022-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2022-02-07 13:37:54',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2022-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2022-02-07 13:37:54',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2022-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2022-02-07 13:37:54',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2021-02-16 00:05:11',NULL,'2022-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2022-07-04 01:11:35',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2022-02-16 00:05:11',NULL,'2022-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2022-02-07 13:37:54',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2021-02-16 00:05:11',NULL,'2021-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2022-02-07 13:37:54',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2021-02-16 00:05:11',NULL,'2021-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2022-02-07 13:37:54',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2022-02-16 00:05:26',NULL,'2021-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2022-07-04 01:11:35',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2021-02-16 00:05:26','2021-02-16 03:05:56','2022-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2022-02-07 13:37:54',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2021-02-16 00:05:26',NULL,'2021-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2022-07-04 01:11:35',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2021-02-16 00:05:35','2021-12-20 20:48:55','2022-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2022-07-04 01:11:35',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2021-02-16 00:05:35',NULL,'2022-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2022-02-07 13:37:54',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2021-02-16 00:05:36','2022-01-16 02:42:56','2021-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2022-07-04 01:11:35',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2021-02-16 04:14:20',NULL,'2022-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2022-02-07 13:37:54',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2021-02-16 00:05:37',NULL,'2021-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2022-07-04 01:11:35',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2022-02-16 00:05:38',NULL,'2022-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2022-07-04 01:11:35',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-02-16 00:05:38',NULL,'2022-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2022-07-04 01:11:35',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2022-02-16 00:05:38',NULL,'2022-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2022-02-07 13:37:54',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-02-16 00:05:38',NULL,'2022-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2022-02-07 13:37:54',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-12-20 20:42:42',NULL,'2021-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2022-07-04 01:11:35',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2022-07-04 01:11:35',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2022-07-04 01:11:35',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2022-02-07 13:37:54',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2021-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2022-02-07 13:37:54',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2021-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2022-02-07 13:37:54',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2021-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2022-02-07 13:37:54',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2022-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2022-02-07 13:37:54',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2022-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2022-02-07 13:37:54',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2022-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2022-02-07 13:37:54',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2022-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); +INSERT INTO `llx_commande` VALUES (1,'2022-12-11 21:23:22',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2022-08-08 13:59:09',NULL,'2022-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2022-12-11 21:23:22',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2022-02-12 17:06:51',NULL,'2022-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2022-12-11 21:23:22',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2022-02-17 18:27:56',NULL,'2022-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2022-12-11 21:23:22',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2022-08-08 03:04:21',NULL,'2022-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2022-07-04 01:11:35',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2022-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2022-07-04 01:11:35',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2021-02-15 23:50:34',NULL,'2022-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2022-02-07 13:37:54',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2021-02-15 23:51:23',NULL,'2022-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2022-07-04 01:11:35',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2021-02-15 23:55:52',NULL,'2022-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2022-07-04 01:11:35',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2022-02-16 00:03:44',NULL,'2022-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2022-02-07 13:37:54',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2022-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2022-02-07 13:37:54',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2022-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2022-02-07 13:37:54',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2021-02-16 00:05:11',NULL,'2022-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2022-07-04 01:11:35',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2022-02-16 00:05:11',NULL,'2022-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2022-12-11 21:23:22',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2022-02-16 00:05:11',NULL,'2022-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2022-12-11 21:23:22',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2022-02-16 00:05:11',NULL,'2022-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2022-02-07 13:37:54',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2022-02-16 00:05:26',NULL,'2021-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2022-07-04 01:11:35',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2021-02-16 00:05:26','2021-02-16 03:05:56','2022-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2022-12-11 21:23:22',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2022-02-16 00:05:26',NULL,'2022-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2022-07-04 01:11:35',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2021-02-16 00:05:35','2021-12-20 20:48:55','2022-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2022-07-04 01:11:35',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2021-02-16 00:05:35',NULL,'2022-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2022-12-11 21:23:22',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2022-02-16 00:05:36','2022-01-16 02:42:56','2022-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2022-07-04 01:11:35',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2021-02-16 04:14:20',NULL,'2022-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2022-12-11 21:23:22',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2022-02-16 00:05:37',NULL,'2022-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2022-07-04 01:11:35',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2022-02-16 00:05:38',NULL,'2022-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2022-07-04 01:11:35',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-02-16 00:05:38',NULL,'2022-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2022-07-04 01:11:35',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2022-02-16 00:05:38',NULL,'2022-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2022-02-07 13:37:54',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-02-16 00:05:38',NULL,'2022-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2022-02-07 13:37:54',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2021-12-20 20:42:42',NULL,'2021-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2022-07-04 01:11:35',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2022-07-04 01:11:35',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2022-07-04 01:11:35',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2022-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2022-12-11 21:23:22',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2022-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2022-02-07 13:37:54',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2021-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2022-02-07 13:37:54',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2021-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,NULL,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2022-02-07 13:37:54',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2022-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2022-02-07 13:37:54',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2022-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2022-02-07 13:37:54',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2022-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,0.00000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2022-02-07 13:37:54',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2022-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; UNLOCK TABLES; @@ -4532,8 +4572,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `custom1` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `custom1` varchar(10) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4559,10 +4599,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_supplier` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_supplier` varchar(255) DEFAULT NULL, `fk_projet` int(11) DEFAULT 0, `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -4585,25 +4625,25 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `date_livraison` datetime DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_commande_fournisseur_ref` (`ref`,`fk_soc`,`entity`), KEY `idx_commande_fournisseur_fk_soc` (`fk_soc`), @@ -4618,7 +4658,7 @@ CREATE TABLE `llx_commande_fournisseur` ( LOCK TABLES `llx_commande_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseur` VALUES (1,'2022-02-07 13:37:54',13,'CF1007-0001',1,NULL,NULL,NULL,'2021-07-11 17:13:40','2022-02-01 18:51:42','2022-02-01 18:52:04',NULL,'2022-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2021-07-11 17:49:28',1,'CF1007-0002',1,NULL,NULL,NULL,'2021-07-11 18:46:28','2021-07-11 18:47:33',NULL,NULL,'2021-07-11',1,NULL,1,NULL,NULL,0,4,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2022-07-04 01:11:35',1,'CF1303-0004',1,NULL,NULL,NULL,'2022-03-09 19:39:18','2022-03-09 19:39:27','2022-03-09 19:39:32',NULL,'2022-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); +INSERT INTO `llx_commande_fournisseur` VALUES (1,'2022-02-07 13:37:54',13,'CF1007-0001',1,NULL,NULL,NULL,'2021-07-11 17:13:40','2022-02-01 18:51:42','2022-02-01 18:52:04',NULL,'2022-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2022-12-11 21:23:22',1,'CF1007-0002',1,NULL,NULL,NULL,'2022-07-11 18:46:28','2022-07-11 18:47:33',NULL,NULL,'2022-07-11',1,NULL,1,NULL,NULL,0,4,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2022-07-04 01:11:35',1,'CF1303-0004',1,NULL,NULL,NULL,'2022-03-09 19:39:18','2022-03-09 19:39:27','2022-03-09 19:39:32',NULL,'2022-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); /*!40000 ALTER TABLE `llx_commande_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -4638,17 +4678,18 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, `status` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `batch` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `fk_reception` int(11) DEFAULT NULL, `cost_price` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), - KEY `idx_commande_fournisseur_dispatch_fk_commande` (`fk_commande`) + KEY `idx_commande_fournisseur_dispatch_fk_commande` (`fk_commande`), + KEY `idx_commande_fournisseur_dispatch_fk_product` (`fk_product`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4673,7 +4714,7 @@ CREATE TABLE `llx_commande_fournisseur_dispatch_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseur_dispatch_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4699,7 +4740,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseur_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4728,7 +4769,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4755,15 +4796,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `tva_tx` double(6,3) DEFAULT 0.000, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -4777,12 +4818,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) 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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -4816,7 +4857,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseurdet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4843,15 +4884,15 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT NULL, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT NULL, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -4871,11 +4912,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_commandefourndet` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -4912,7 +4953,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commandedet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4938,12 +4979,12 @@ CREATE TABLE `llx_comment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `description` text COLLATE utf8mb3_unicode_ci NOT NULL, + `description` text NOT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_element` int(11) DEFAULT NULL, - `element_type` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `element_type` varchar(50) DEFAULT NULL, `entity` int(11) DEFAULT 1, - `import_key` varchar(125) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(125) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -4967,16 +5008,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `name` varchar(255) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `value` text COLLATE utf8mb3_unicode_ci NOT NULL, - `type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT 'string', + `value` text NOT NULL, + `type` varchar(64) DEFAULT 'string', `visible` tinyint(4) NOT NULL DEFAULT 1, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=9451 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=9516 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4985,7 +5026,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)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-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','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(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','html',0,'Mail de validation','2018-11-23 11:56:07'),(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','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-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','2012-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','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'DELIVERY_ADDON_NUMBER',1,'mod_delivery_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2020-12-10 12:24:40'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-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','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-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','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-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','2015-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','2015-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','2014-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','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-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','2015-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','2015-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','2014-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','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.mydomain.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'ABCDEFWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-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','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-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','2015-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','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(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','2018-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','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',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'),(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'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',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'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(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'),(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'),(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'),(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'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(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'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'12;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'),(7122,'BOM_ADDON_PDF',1,'generic_bom_odt','chaine',0,'','2019-11-28 14:00:58'),(7195,'MAIN_AGENDA_ACTIONAUTO_MO_VALIDATE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7196,'MAIN_AGENDA_ACTIONAUTO_MO_PRODUCED',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7197,'MAIN_AGENDA_ACTIONAUTO_MO_DELETE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7198,'MAIN_AGENDA_ACTIONAUTO_MO_CANCEL',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7201,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'MyBigCompany public interface for Ticket','chaine',0,'','2019-11-29 08:49:36'),(7202,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-11-29 08:49:36'),(7203,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-11-29 08:49:36'),(7204,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-11-29 08:49:36'),(7220,'MRP_MO_ADDON',1,'mod_mo_standard','chaine',0,'Name of numbering rules of MO','2019-11-29 08:57:42'),(7221,'MRP_MO_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/mrps','chaine',0,NULL,'2019-11-29 08:57:42'),(7222,'MRP_MO_ADDON_PDF',1,'generic_mo_odt','chaine',0,'','2019-11-29 08:57:47'),(7254,'MAIN_INFO_OPENINGHOURS_MONDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7255,'MAIN_INFO_OPENINGHOURS_TUESDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7256,'MAIN_INFO_OPENINGHOURS_WEDNESDAY',1,'8-13','chaine',0,'','2019-12-19 11:14:21'),(7257,'MAIN_INFO_OPENINGHOURS_THURSDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7258,'MAIN_INFO_OPENINGHOURS_FRIDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7264,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookkeeper','chaine',0,'','2019-12-19 11:14:54'),(7265,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-12-19 11:14:54'),(7266,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-12-19 11:14:54'),(7267,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-12-19 11:14:54'),(7268,'MAIN_INFO_ACCOUNTANT_MAIL',1,'mybookkeeper@example.com','chaine',0,'','2019-12-19 11:14:54'),(7313,'MODULEBUILDER_ASCIIDOCTOR',1,'asciidoctor','chaine',0,'','2019-12-20 10:57:21'),(7314,'MODULEBUILDER_ASCIIDOCTORPDF',1,'asciidoctor-pdf','chaine',0,'','2019-12-20 10:57:21'),(7337,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2019-12-20 12:10:38'),(7338,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2019-12-20 12:10:38'),(7339,'EXPENSEREPORT_ADDON',1,'mod_expensereport_jade','chaine',0,'','2019-12-20 16:33:46'),(7378,'COMPANY_USE_SEARCH_TO_SELECT',1,'0','chaine',0,'','2019-12-21 15:54:22'),(7420,'CASHDESK_SERVICES',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7421,'TAKEPOS_ROOT_CATEGORY_ID',1,'31','chaine',0,'','2019-12-23 12:15:06'),(7422,'TAKEPOSCONNECTOR',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7423,'TAKEPOS_BAR_RESTAURANT',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7424,'TAKEPOS_TICKET_VAT_GROUPPED',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7425,'TAKEPOS_AUTO_PRINT_TICKETS',1,'0','int',0,'','2019-12-23 12:15:06'),(7426,'TAKEPOS_NUMPAD',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7427,'TAKEPOS_NUM_TERMINALS',1,'1','chaine',0,'','2019-12-23 12:15:06'),(7428,'TAKEPOS_DIRECT_PAYMENT',1,'0','int',0,'','2019-12-23 12:15:06'),(7429,'TAKEPOS_CUSTOM_RECEIPT',1,'0','int',0,'','2019-12-23 12:15:06'),(7430,'TAKEPOS_EMAIL_TEMPLATE_INVOICE',1,'-1','chaine',0,'','2019-12-23 12:15:06'),(7452,'MEMBER_ENABLE_PUBLIC',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7453,'MEMBER_NEWFORM_AMOUNT',1,'20','chaine',0,'','2020-01-01 10:31:46'),(7454,'MEMBER_NEWFORM_EDITAMOUNT',1,'0','chaine',0,'','2020-01-01 10:31:46'),(7455,'MEMBER_NEWFORM_PAYONLINE',1,'all','chaine',0,'','2020-01-01 10:31:46'),(7456,'MEMBER_NEWFORM_FORCETYPE',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7470,'STRIPE_TEST_PUBLISHABLE_KEY',1,'pk_test_123456789','chaine',0,'','2020-01-01 11:43:44'),(7471,'STRIPE_TEST_SECRET_KEY',1,'sk_test_123456','chaine',0,'','2020-01-01 11:43:44'),(7472,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2020-01-01 11:43:44'),(7473,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'1','chaine',0,'','2020-01-01 11:43:44'),(7489,'CAPTURESERVER_SECURITY_KEY',1,'securitykey123','chaine',0,'','2020-01-01 12:00:49'),(8136,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8190,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL_EXPORT','chaine',0,'','2020-01-06 01:23:30'),(8191,'MAIN_ENABLE_DEFAULT_VALUES',1,'1','chaine',0,'','2020-01-06 16:09:52'),(8210,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2020-01-06 16:51:43'),(8213,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2020-01-06 16:51:43'),(8214,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2020-01-06 16:51:43'),(8215,'DIAGNOSTIC_IS_NOT_MANDATORY',1,'1','texte',0,'','2020-01-06 16:51:43'),(8216,'USER_ADDON_PDF_ODT',1,'generic_user_odt','chaine',0,'','2020-01-07 13:45:19'),(8217,'USERGROUP_ADDON_PDF_ODT',1,'generic_usergroup_odt','chaine',0,'','2020-01-07 13:45:23'),(8230,'MAIN_MODULE_EMAILCOLLECTOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-12 20:13:55'),(8232,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:37:09'),(8233,'MAIN_MODULE_EXPEDITION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:38:20'),(8252,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2020-01-15 15:42:41'),(8259,'ACCOUNTING_REEXPORT',1,'1','yesno',0,'','2020-01-17 13:42:56'),(8291,'PRODUIT_MULTIPRICES_LIMIT',1,'5','chaine',0,'','2020-01-17 14:21:46'),(8293,'PRODUIT_CUSTOMER_PRICES_BY_QTY',1,'0','chaine',0,'','2020-01-17 14:21:46'),(8303,'PRODUCT_PRICE_UNIQ',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8304,'PRODUIT_MULTIPRICES',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8305,'PRODUIT_CUSTOMER_PRICES',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8306,'PRODUIT_SOUSPRODUITS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8307,'PRODUIT_DESC_IN_FORM',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8308,'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8309,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8310,'PRODUIT_FOURN_TEXTS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8313,'MAIN_MODULE_FCKEDITOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-18 17:13:27'),(8314,'FCKEDITOR_ENABLE_TICKET',1,'1','chaine',0,'','2020-01-18 19:39:54'),(8321,'FCKEDITOR_SKIN',1,'moono-lisa','chaine',0,'','2020-01-18 19:41:15'),(8322,'FCKEDITOR_TEST',1,'Test < aaa
\r\n
\r\n\"\"','chaine',0,'','2020-01-18 19:41:15'),(8486,'MAIN_MULTILANGS',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8491,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8492,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8496,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8498,'MAIN_HELPCENTER_DISABLELINK',0,'0','chaine',0,'','2020-01-21 09:40:00'),(8501,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8554,'MAIN_INFO_SOCIETE_FACEBOOK_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8555,'MAIN_INFO_SOCIETE_TWITTER_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8556,'MAIN_INFO_SOCIETE_LINKEDIN_URL',1,'https://www.linkedin.com/company/9400559/admin/','chaine',0,'','2020-06-12 17:24:42'),(8557,'MAIN_INFO_SOCIETE_INSTAGRAM_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8558,'MAIN_INFO_SOCIETE_YOUTUBE_URL',1,'DolibarrERPCRM','chaine',0,'','2020-06-12 17:24:42'),(8559,'MAIN_INFO_SOCIETE_GITHUB_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8577,'PRODUCT_PRICE_BASE_TYPE',0,'HT','string',0,NULL,'2020-12-10 12:24:38'),(8612,'MAIN_UPLOAD_DOC',1,'50000','chaine',0,'','2020-12-10 12:26:31'),(8613,'MAIN_UMASK',1,'0664','chaine',0,'','2020-12-10 12:26:31'),(8614,'MAIN_ANTIVIRUS_PARAM',1,'--fdpass','chaine',0,'','2020-12-10 12:26:31'),(8619,'WEBSITE_EDITINLINE',1,'0','chaine',0,'','2020-12-10 12:27:05'),(8633,'MAIN_MODULE_RECEPTION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:13'),(8634,'RECEPTION_ADDON_PDF',1,'squille','chaine',0,'Nom du gestionnaire de generation des bons receptions en PDF','2020-12-10 12:30:13'),(8635,'RECEPTION_ADDON_NUMBER',1,'mod_reception_beryl','chaine',0,'Name for numbering manager for receptions','2020-12-10 12:30:13'),(8636,'RECEPTION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/receptions','chaine',0,NULL,'2020-12-10 12:30:13'),(8637,'MAIN_SUBMODULE_RECEPTION',1,'1','chaine',0,'Enable receptions','2020-12-10 12:30:13'),(8638,'MAIN_MODULE_PAYMENTBYBANKTRANSFER',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:17'),(8640,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8641,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8644,'MAIN_MODULE_INCOTERM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:36'),(8645,'INCOTERM_ACTIVATE',1,'','chaine',0,'Description de INCOTERM_ACTIVATE','2020-12-10 12:31:36'),(8715,'SYSLOG_LEVEL',0,'5','chaine',0,'','2021-04-15 10:34:05'),(8716,'MAIN_SECURITY_HASH_ALGO',1,'password_hash','chaine',1,'','2021-04-15 10:38:33'),(8717,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2021-04-15 10:46:30'),(8718,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2021-04-15 10:46:30'),(8719,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street.','chaine',0,'','2021-04-15 10:46:30'),(8720,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2021-04-15 10:46:30'),(8721,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2021-04-15 10:46:30'),(8722,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2021-04-15 10:46:30'),(8723,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2021-04-15 10:46:30'),(8724,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2021-04-15 10:46:30'),(8725,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2021-04-15 10:46:30'),(8726,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2021-04-15 10:46:30'),(8727,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2021-04-15 10:46:30'),(8728,'MAIN_INFO_SOCIETE_LOGO_SQUARRED',1,'mybigcompany_squarred.png','chaine',0,'','2021-04-15 10:46:30'),(8729,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL',1,'mybigcompany_squarred_small.png','chaine',0,'','2021-04-15 10:46:30'),(8730,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI',1,'mybigcompany_squarred_mini.png','chaine',0,'','2021-04-15 10:46:30'),(8731,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8732,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8733,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2021-04-15 10:46:30'),(8734,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8735,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2021-04-15 10:46:30'),(8736,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2021-04-15 10:46:30'),(8737,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2021-04-15 10:46:30'),(8738,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2021-04-15 10:46:30'),(8739,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2021-04-15 10:46:30'),(8740,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2021-04-15 10:46:30'),(8741,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2021-04-15 10:46:30'),(8742,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2021-04-15 10:46:30'),(8743,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2021-04-15 10:46:30'),(8744,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8745,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8746,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8747,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8759,'MAIN_LOGIN_BACKGROUND',1,'background_dolibarr.jpg','chaine',0,'','2021-04-15 10:54:37'),(8760,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2021-04-15 10:56:30'),(8762,'MAIN_THEME',1,'eldy','chaine',0,'','2021-04-15 10:56:30'),(8763,'THEME_ELDY_USE_HOVER',1,'237,244,251','chaine',0,'','2021-04-15 10:56:30'),(8764,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2021-04-15 10:56:30'),(8765,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2021-04-15 10:56:30'),(8766,'MAIN_START_WEEK',1,'1','chaine',0,'','2021-04-15 10:56:30'),(8767,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2021-04-15 10:56:30'),(8768,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2021-04-15 10:56:30'),(8769,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2021-04-15 10:56:30'),(8770,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n__(SomeTranslationAreUncomplete)__','chaine',0,'','2021-04-15 10:56:30'),(8771,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2021-04-15 11:46:30'),(8877,'AGENDA_REMINDER_BROWSER',1,'1','chaine',0,'','2021-04-15 13:32:29'),(9008,'MAIN_MODULE_KNOWLEDGEMANAGEMENT',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-02-07 13:39:27'),(9009,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_TRIGGERS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9010,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_LOGIN',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9011,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9012,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MENUS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9013,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_TPL',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9014,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_BARCODE',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9015,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MODELS',1,'1','chaine',0,NULL,'2022-02-07 13:39:27'),(9016,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_PRINTING',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9017,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_THEME',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9018,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9021,'WEBSITE_SUBCONTAINERSINLINE',1,'1','chaine',0,'','2022-02-07 13:57:11'),(9022,'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT',1,'1','chaine',0,'','2022-02-07 14:17:28'),(9023,'PAYMENTBYBANKTRANSFER_USER',1,'13','chaine',0,'','2022-02-07 14:17:28'),(9025,'MAIN_MODULE_BLOCKEDLOG',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-02-07 14:32:50'),(9026,'MAIN_IHM_PARAMS_REV',1,'16','chaine',0,'','2022-02-07 14:32:50'),(9141,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9142,'MAIN_AGENDA_ACTIONAUTO_COMPANY_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9143,'MAIN_AGENDA_ACTIONAUTO_COMPANY_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9144,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9145,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9146,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9147,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9148,'MAIN_AGENDA_ACTIONAUTO_PROPAL_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9149,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9150,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9151,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9152,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9153,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9154,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9155,'MAIN_AGENDA_ACTIONAUTO_ORDER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9156,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9157,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9158,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9159,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9160,'MAIN_AGENDA_ACTIONAUTO_BILL_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9161,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9162,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9163,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9164,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9165,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_SIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9166,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_REFUSED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9167,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9168,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9169,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9170,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9171,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9172,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9173,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9174,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9175,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9176,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9177,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9178,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9179,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9180,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9181,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9182,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9183,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9184,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9185,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9186,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9187,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9188,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9189,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9190,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9191,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9192,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9193,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9194,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9195,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9196,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9197,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9198,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9199,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9200,'MAIN_AGENDA_ACTIONAUTO_MEMBER_EXCLUDE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9201,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9202,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9203,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9204,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9205,'MAIN_AGENDA_ACTIONAUTO_TASK_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9206,'MAIN_AGENDA_ACTIONAUTO_TASK_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9207,'MAIN_AGENDA_ACTIONAUTO_TASK_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9208,'MAIN_AGENDA_ACTIONAUTO_CONTACT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9209,'MAIN_AGENDA_ACTIONAUTO_CONTACT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9210,'MAIN_AGENDA_ACTIONAUTO_CONTACT_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9211,'MAIN_AGENDA_ACTIONAUTO_CONTACT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9212,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9213,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9214,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9215,'MAIN_AGENDA_ACTIONAUTO_TICKET_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9216,'MAIN_AGENDA_ACTIONAUTO_TICKET_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9217,'MAIN_AGENDA_ACTIONAUTO_TICKET_ASSIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9218,'MAIN_AGENDA_ACTIONAUTO_TICKET_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9219,'MAIN_AGENDA_ACTIONAUTO_TICKET_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9220,'MAIN_AGENDA_ACTIONAUTO_TICKET_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9221,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9222,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9223,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9224,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9225,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAID',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9226,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9227,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9228,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9229,'MAIN_AGENDA_ACTIONAUTO_USER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9230,'MAIN_AGENDA_ACTIONAUTO_USER_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9231,'MAIN_AGENDA_ACTIONAUTO_USER_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9232,'MAIN_AGENDA_ACTIONAUTO_USER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9233,'MAIN_AGENDA_ACTIONAUTO_USER_NEW_PASSWORD',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9234,'MAIN_AGENDA_ACTIONAUTO_USER_ENABLEDISABLE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9235,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9236,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9237,'MAIN_AGENDA_ACTIONAUTO_BOM_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9238,'MAIN_AGENDA_ACTIONAUTO_BOM_REOPEN',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9239,'MAIN_AGENDA_ACTIONAUTO_BOM_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9240,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9241,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_PRODUCED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9242,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9243,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9244,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9245,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9246,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9247,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9248,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9249,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9250,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9251,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9252,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9253,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9254,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9293,'RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON',1,'mod_recruitmentjobposition_standard','chaine',0,'Name of manager to generate recruitment job position ref number','2022-07-04 01:12:19'),(9294,'RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON',1,'mod_recruitmentcandidature_standard','chaine',0,'Name of manager to generate recruitment candidature ref number','2022-07-04 01:12:19'),(9383,'MAIN_VERSION_LAST_UPGRADE',0,'16.0.0','chaine',0,'Dolibarr version for last upgrade','2022-07-05 08:03:57'),(9387,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9388,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9389,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9390,'MAIN_MODULE_BANQUE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9391,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9392,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9393,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9394,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9395,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9396,'MAIN_MODULE_EXPENSEREPORT',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9397,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9398,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9399,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9400,'MAIN_MODULE_MARGIN',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9403,'MAIN_MODULE_MRP',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9404,'MAIN_MODULE_MRP_TRIGGERS',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9405,'MAIN_MODULE_MRP_LOGIN',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9406,'MAIN_MODULE_MRP_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9407,'MAIN_MODULE_MRP_MENUS',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9408,'MAIN_MODULE_MRP_TPL',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9409,'MAIN_MODULE_MRP_BARCODE',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9410,'MAIN_MODULE_MRP_MODELS',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9411,'MAIN_MODULE_MRP_THEME',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9412,'MAIN_MODULE_MRP_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-07-05 08:07:11'),(9413,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:11'),(9414,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9415,'MAIN_MODULE_RECRUITMENT',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9416,'MAIN_MODULE_RECRUITMENT_TRIGGERS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9417,'MAIN_MODULE_RECRUITMENT_LOGIN',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9418,'MAIN_MODULE_RECRUITMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9419,'MAIN_MODULE_RECRUITMENT_MENUS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9420,'MAIN_MODULE_RECRUITMENT_TPL',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9421,'MAIN_MODULE_RECRUITMENT_BARCODE',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9422,'MAIN_MODULE_RECRUITMENT_MODELS',1,'1','chaine',0,NULL,'2022-07-05 08:07:12'),(9423,'MAIN_MODULE_RECRUITMENT_THEME',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9424,'MAIN_MODULE_RECRUITMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9425,'MAIN_MODULE_RESOURCE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9426,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9427,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9428,'MAIN_MODULE_SYSLOG',0,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9429,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9430,'MAIN_MODULE_STRIPE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9431,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9432,'MAIN_MODULE_TICKET_TABS_0',1,'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__','chaine',0,NULL,'2022-07-05 08:07:12'),(9433,'MAIN_MODULE_TICKET_TABS_1',1,'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__','chaine',0,NULL,'2022-07-05 08:07:12'),(9434,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2022-07-05 08:07:12'),(9435,'TAKEPOS_PRINT_METHOD',1,'browser','chaine',0,'','2022-07-05 08:07:12'),(9436,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9437,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9438,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9439,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2022-07-05 08:07:12'),(9440,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9441,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9442,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9443,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9444,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2022-07-05 08:07:12'),(9445,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9446,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:12'),(9447,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":\"18\",\"ip\":\"192.168.0.254\",\"lastactivationversion\":\"dolibarr\"}','2022-07-05 08:07:13'),(9449,'MAIN_FIRST_PING_OK_DATE',1,'20220705080715','chaine',0,'','2022-07-05 08:07:15'),(9450,'MAIN_FIRST_PING_OK_ID',1,'0dd1a04e9becaaafb6fbb7a86e945a55','chaine',0,'','2022-07-05 08:07:15'); +INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-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','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(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','html',0,'Mail de validation','2018-11-23 11:56:07'),(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','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-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','2012-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','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMIN_PASSWORD',1,'','chaine',0,'Mot de passe Admin des liste mailman','2022-12-11 21:23:35'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'DELIVERY_ADDON_NUMBER',1,'mod_delivery_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2020-12-10 12:24:40'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-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','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-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','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-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','2015-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','2015-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','2014-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','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-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','2015-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','2015-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','2014-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','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-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','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.mydomain.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'ABCDEFWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-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','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-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','2015-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','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(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','2018-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','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',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'),(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'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',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'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(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'),(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'),(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'),(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'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(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'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'12;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'),(7122,'BOM_ADDON_PDF',1,'generic_bom_odt','chaine',0,'','2019-11-28 14:00:58'),(7195,'MAIN_AGENDA_ACTIONAUTO_MO_VALIDATE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7196,'MAIN_AGENDA_ACTIONAUTO_MO_PRODUCED',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7197,'MAIN_AGENDA_ACTIONAUTO_MO_DELETE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7198,'MAIN_AGENDA_ACTIONAUTO_MO_CANCEL',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7201,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'MyBigCompany public interface for Ticket','chaine',0,'','2019-11-29 08:49:36'),(7202,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-11-29 08:49:36'),(7203,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-11-29 08:49:36'),(7204,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-11-29 08:49:36'),(7220,'MRP_MO_ADDON',1,'mod_mo_standard','chaine',0,'Name of numbering rules of MO','2019-11-29 08:57:42'),(7221,'MRP_MO_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/mrps','chaine',0,NULL,'2019-11-29 08:57:42'),(7222,'MRP_MO_ADDON_PDF',1,'generic_mo_odt','chaine',0,'','2019-11-29 08:57:47'),(7254,'MAIN_INFO_OPENINGHOURS_MONDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7255,'MAIN_INFO_OPENINGHOURS_TUESDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7256,'MAIN_INFO_OPENINGHOURS_WEDNESDAY',1,'8-13','chaine',0,'','2019-12-19 11:14:21'),(7257,'MAIN_INFO_OPENINGHOURS_THURSDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7258,'MAIN_INFO_OPENINGHOURS_FRIDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7264,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookkeeper','chaine',0,'','2019-12-19 11:14:54'),(7265,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-12-19 11:14:54'),(7266,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-12-19 11:14:54'),(7267,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-12-19 11:14:54'),(7268,'MAIN_INFO_ACCOUNTANT_MAIL',1,'mybookkeeper@example.com','chaine',0,'','2019-12-19 11:14:54'),(7313,'MODULEBUILDER_ASCIIDOCTOR',1,'asciidoctor','chaine',0,'','2019-12-20 10:57:21'),(7314,'MODULEBUILDER_ASCIIDOCTORPDF',1,'asciidoctor-pdf','chaine',0,'','2019-12-20 10:57:21'),(7337,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2019-12-20 12:10:38'),(7338,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2019-12-20 12:10:38'),(7339,'EXPENSEREPORT_ADDON',1,'mod_expensereport_jade','chaine',0,'','2019-12-20 16:33:46'),(7378,'COMPANY_USE_SEARCH_TO_SELECT',1,'0','chaine',0,'','2019-12-21 15:54:22'),(7420,'CASHDESK_SERVICES',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7421,'TAKEPOS_ROOT_CATEGORY_ID',1,'31','chaine',0,'','2019-12-23 12:15:06'),(7422,'TAKEPOSCONNECTOR',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7423,'TAKEPOS_BAR_RESTAURANT',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7424,'TAKEPOS_TICKET_VAT_GROUPPED',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7425,'TAKEPOS_AUTO_PRINT_TICKETS',1,'0','int',0,'','2019-12-23 12:15:06'),(7426,'TAKEPOS_NUMPAD',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7427,'TAKEPOS_NUM_TERMINALS',1,'1','chaine',0,'','2019-12-23 12:15:06'),(7428,'TAKEPOS_DIRECT_PAYMENT',1,'0','int',0,'','2019-12-23 12:15:06'),(7429,'TAKEPOS_CUSTOM_RECEIPT',1,'0','int',0,'','2019-12-23 12:15:06'),(7430,'TAKEPOS_EMAIL_TEMPLATE_INVOICE',1,'-1','chaine',0,'','2019-12-23 12:15:06'),(7452,'MEMBER_ENABLE_PUBLIC',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7453,'MEMBER_NEWFORM_AMOUNT',1,'20','chaine',0,'','2020-01-01 10:31:46'),(7454,'MEMBER_NEWFORM_EDITAMOUNT',1,'0','chaine',0,'','2020-01-01 10:31:46'),(7455,'MEMBER_NEWFORM_PAYONLINE',1,'all','chaine',0,'','2020-01-01 10:31:46'),(7456,'MEMBER_NEWFORM_FORCETYPE',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7470,'STRIPE_TEST_PUBLISHABLE_KEY',1,'pk_test_123456789','chaine',0,'','2020-01-01 11:43:44'),(7471,'STRIPE_TEST_SECRET_KEY',1,'sk_test_123456','chaine',0,'','2020-01-01 11:43:44'),(7472,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2020-01-01 11:43:44'),(7473,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'1','chaine',0,'','2020-01-01 11:43:44'),(7489,'CAPTURESERVER_SECURITY_KEY',1,'securitykey123','chaine',0,'','2020-01-01 12:00:49'),(8136,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8190,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL_EXPORT','chaine',0,'','2020-01-06 01:23:30'),(8191,'MAIN_ENABLE_DEFAULT_VALUES',1,'1','chaine',0,'','2020-01-06 16:09:52'),(8210,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2020-01-06 16:51:43'),(8213,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2020-01-06 16:51:43'),(8214,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2020-01-06 16:51:43'),(8215,'DIAGNOSTIC_IS_NOT_MANDATORY',1,'1','texte',0,'','2020-01-06 16:51:43'),(8216,'USER_ADDON_PDF_ODT',1,'generic_user_odt','chaine',0,'','2020-01-07 13:45:19'),(8217,'USERGROUP_ADDON_PDF_ODT',1,'generic_usergroup_odt','chaine',0,'','2020-01-07 13:45:23'),(8230,'MAIN_MODULE_EMAILCOLLECTOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-12 20:13:55'),(8232,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:37:09'),(8233,'MAIN_MODULE_EXPEDITION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:38:20'),(8252,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2020-01-15 15:42:41'),(8259,'ACCOUNTING_REEXPORT',1,'1','yesno',0,'','2020-01-17 13:42:56'),(8291,'PRODUIT_MULTIPRICES_LIMIT',1,'5','chaine',0,'','2020-01-17 14:21:46'),(8293,'PRODUIT_CUSTOMER_PRICES_BY_QTY',1,'0','chaine',0,'','2020-01-17 14:21:46'),(8303,'PRODUCT_PRICE_UNIQ',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8304,'PRODUIT_MULTIPRICES',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8305,'PRODUIT_CUSTOMER_PRICES',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8306,'PRODUIT_SOUSPRODUITS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8307,'PRODUIT_DESC_IN_FORM',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8308,'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8309,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8310,'PRODUIT_FOURN_TEXTS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8313,'MAIN_MODULE_FCKEDITOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-18 17:13:27'),(8314,'FCKEDITOR_ENABLE_TICKET',1,'1','chaine',0,'','2020-01-18 19:39:54'),(8321,'FCKEDITOR_SKIN',1,'moono-lisa','chaine',0,'','2020-01-18 19:41:15'),(8322,'FCKEDITOR_TEST',1,'Test < aaa
\r\n
\r\n\"\"','chaine',0,'','2020-01-18 19:41:15'),(8486,'MAIN_MULTILANGS',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8491,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8492,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8496,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8498,'MAIN_HELPCENTER_DISABLELINK',0,'0','chaine',0,'','2020-01-21 09:40:00'),(8501,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8554,'MAIN_INFO_SOCIETE_FACEBOOK_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8555,'MAIN_INFO_SOCIETE_TWITTER_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8556,'MAIN_INFO_SOCIETE_LINKEDIN_URL',1,'https://www.linkedin.com/company/9400559/admin/','chaine',0,'','2020-06-12 17:24:42'),(8557,'MAIN_INFO_SOCIETE_INSTAGRAM_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8558,'MAIN_INFO_SOCIETE_YOUTUBE_URL',1,'DolibarrERPCRM','chaine',0,'','2020-06-12 17:24:42'),(8559,'MAIN_INFO_SOCIETE_GITHUB_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8577,'PRODUCT_PRICE_BASE_TYPE',0,'HT','string',0,NULL,'2020-12-10 12:24:38'),(8612,'MAIN_UPLOAD_DOC',1,'50000','chaine',0,'','2020-12-10 12:26:31'),(8613,'MAIN_UMASK',1,'0664','chaine',0,'','2020-12-10 12:26:31'),(8614,'MAIN_ANTIVIRUS_PARAM',1,'--fdpass','chaine',0,'','2020-12-10 12:26:31'),(8619,'WEBSITE_EDITINLINE',1,'0','chaine',0,'','2020-12-10 12:27:05'),(8633,'MAIN_MODULE_RECEPTION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:13'),(8634,'RECEPTION_ADDON_PDF',1,'squille','chaine',0,'Nom du gestionnaire de generation des bons receptions en PDF','2020-12-10 12:30:13'),(8635,'RECEPTION_ADDON_NUMBER',1,'mod_reception_beryl','chaine',0,'Name for numbering manager for receptions','2020-12-10 12:30:13'),(8636,'RECEPTION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/receptions','chaine',0,NULL,'2020-12-10 12:30:13'),(8637,'MAIN_SUBMODULE_RECEPTION',1,'1','chaine',0,'Enable receptions','2020-12-10 12:30:13'),(8638,'MAIN_MODULE_PAYMENTBYBANKTRANSFER',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:17'),(8640,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8641,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8644,'MAIN_MODULE_INCOTERM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:36'),(8645,'INCOTERM_ACTIVATE',1,'','chaine',0,'Description de INCOTERM_ACTIVATE','2020-12-10 12:31:36'),(8715,'SYSLOG_LEVEL',0,'5','chaine',0,'','2021-04-15 10:34:05'),(8716,'MAIN_SECURITY_HASH_ALGO',1,'password_hash','chaine',1,'','2021-04-15 10:38:33'),(8717,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2021-04-15 10:46:30'),(8718,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2021-04-15 10:46:30'),(8719,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street.','chaine',0,'','2021-04-15 10:46:30'),(8720,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2021-04-15 10:46:30'),(8721,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2021-04-15 10:46:30'),(8722,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2021-04-15 10:46:30'),(8723,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2021-04-15 10:46:30'),(8724,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2021-04-15 10:46:30'),(8725,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2021-04-15 10:46:30'),(8726,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2021-04-15 10:46:30'),(8727,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2021-04-15 10:46:30'),(8728,'MAIN_INFO_SOCIETE_LOGO_SQUARRED',1,'mybigcompany_squarred.png','chaine',0,'','2021-04-15 10:46:30'),(8729,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL',1,'mybigcompany_squarred_small.png','chaine',0,'','2021-04-15 10:46:30'),(8730,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI',1,'mybigcompany_squarred_mini.png','chaine',0,'','2021-04-15 10:46:30'),(8731,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8732,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8733,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2021-04-15 10:46:30'),(8734,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8735,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2021-04-15 10:46:30'),(8736,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2021-04-15 10:46:30'),(8737,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2021-04-15 10:46:30'),(8738,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2021-04-15 10:46:30'),(8739,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2021-04-15 10:46:30'),(8740,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2021-04-15 10:46:30'),(8741,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2021-04-15 10:46:30'),(8742,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2021-04-15 10:46:30'),(8743,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2021-04-15 10:46:30'),(8744,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8745,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8746,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8747,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8759,'MAIN_LOGIN_BACKGROUND',1,'background_dolibarr.jpg','chaine',0,'','2021-04-15 10:54:37'),(8760,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2021-04-15 10:56:30'),(8762,'MAIN_THEME',1,'eldy','chaine',0,'','2021-04-15 10:56:30'),(8763,'THEME_ELDY_USE_HOVER',1,'237,244,251','chaine',0,'','2021-04-15 10:56:30'),(8764,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2021-04-15 10:56:30'),(8765,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2021-04-15 10:56:30'),(8766,'MAIN_START_WEEK',1,'1','chaine',0,'','2021-04-15 10:56:30'),(8767,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2021-04-15 10:56:30'),(8768,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2021-04-15 10:56:30'),(8769,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2021-04-15 10:56:30'),(8770,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n__(SomeTranslationAreUncomplete)__','chaine',0,'','2021-04-15 10:56:30'),(8771,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2021-04-15 11:46:30'),(8877,'AGENDA_REMINDER_BROWSER',1,'1','chaine',0,'','2021-04-15 13:32:29'),(9008,'MAIN_MODULE_KNOWLEDGEMANAGEMENT',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-02-07 13:39:27'),(9009,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_TRIGGERS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9010,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_LOGIN',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9011,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9012,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MENUS',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9013,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_TPL',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9014,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_BARCODE',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9015,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MODELS',1,'1','chaine',0,NULL,'2022-02-07 13:39:27'),(9016,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_PRINTING',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9017,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_THEME',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9018,'MAIN_MODULE_KNOWLEDGEMANAGEMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-02-07 13:39:27'),(9021,'WEBSITE_SUBCONTAINERSINLINE',1,'1','chaine',0,'','2022-02-07 13:57:11'),(9022,'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT',1,'1','chaine',0,'','2022-02-07 14:17:28'),(9023,'PAYMENTBYBANKTRANSFER_USER',1,'13','chaine',0,'','2022-02-07 14:17:28'),(9025,'MAIN_MODULE_BLOCKEDLOG',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-02-07 14:32:50'),(9026,'MAIN_IHM_PARAMS_REV',1,'16','chaine',0,'','2022-02-07 14:32:50'),(9141,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9142,'MAIN_AGENDA_ACTIONAUTO_COMPANY_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9143,'MAIN_AGENDA_ACTIONAUTO_COMPANY_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9144,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9145,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9146,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9147,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9148,'MAIN_AGENDA_ACTIONAUTO_PROPAL_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9149,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9150,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9151,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9152,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9153,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9154,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9155,'MAIN_AGENDA_ACTIONAUTO_ORDER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9156,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9157,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9158,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9159,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9160,'MAIN_AGENDA_ACTIONAUTO_BILL_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9161,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9162,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9163,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9164,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9165,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_SIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9166,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_REFUSED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9167,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9168,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9169,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9170,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9171,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9172,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9173,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9174,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9175,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9176,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9177,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9178,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9179,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9180,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9181,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9182,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9183,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9184,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9185,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9186,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9187,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9188,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9189,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9190,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9191,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9192,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9193,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9194,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9195,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9196,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9197,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9198,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9199,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9200,'MAIN_AGENDA_ACTIONAUTO_MEMBER_EXCLUDE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9201,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9202,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9203,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9204,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9205,'MAIN_AGENDA_ACTIONAUTO_TASK_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9206,'MAIN_AGENDA_ACTIONAUTO_TASK_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9207,'MAIN_AGENDA_ACTIONAUTO_TASK_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9208,'MAIN_AGENDA_ACTIONAUTO_CONTACT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9209,'MAIN_AGENDA_ACTIONAUTO_CONTACT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9210,'MAIN_AGENDA_ACTIONAUTO_CONTACT_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9211,'MAIN_AGENDA_ACTIONAUTO_CONTACT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9212,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9213,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9214,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9215,'MAIN_AGENDA_ACTIONAUTO_TICKET_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9216,'MAIN_AGENDA_ACTIONAUTO_TICKET_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9217,'MAIN_AGENDA_ACTIONAUTO_TICKET_ASSIGNED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9218,'MAIN_AGENDA_ACTIONAUTO_TICKET_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9219,'MAIN_AGENDA_ACTIONAUTO_TICKET_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9220,'MAIN_AGENDA_ACTIONAUTO_TICKET_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9221,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9222,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9223,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9224,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9225,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAID',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9226,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9227,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9228,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9229,'MAIN_AGENDA_ACTIONAUTO_USER_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9230,'MAIN_AGENDA_ACTIONAUTO_USER_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9231,'MAIN_AGENDA_ACTIONAUTO_USER_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9232,'MAIN_AGENDA_ACTIONAUTO_USER_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9233,'MAIN_AGENDA_ACTIONAUTO_USER_NEW_PASSWORD',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9234,'MAIN_AGENDA_ACTIONAUTO_USER_ENABLEDISABLE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9235,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9236,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9237,'MAIN_AGENDA_ACTIONAUTO_BOM_CLOSE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9238,'MAIN_AGENDA_ACTIONAUTO_BOM_REOPEN',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9239,'MAIN_AGENDA_ACTIONAUTO_BOM_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9240,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_VALIDATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9241,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_PRODUCED',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9242,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9243,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9244,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9245,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CANCEL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9246,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9247,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9248,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9249,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9250,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9251,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_CREATE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9252,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_MODIFY',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9253,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_SENTBYMAIL',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9254,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_DELETE',1,'1','chaine',0,'','2022-02-07 14:37:16'),(9293,'RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON',1,'mod_recruitmentjobposition_standard','chaine',0,'Name of manager to generate recruitment job position ref number','2022-07-04 01:12:19'),(9294,'RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON',1,'mod_recruitmentcandidature_standard','chaine',0,'Name of manager to generate recruitment candidature ref number','2022-07-04 01:12:19'),(9451,'MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT',1,'1000','int',0,NULL,'2022-12-11 21:23:35'),(9452,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9453,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9454,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9455,'MAIN_MODULE_BANQUE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9456,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9457,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9458,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9459,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9460,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9461,'MAIN_MODULE_EXPENSEREPORT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9462,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9463,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:42'),(9464,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9465,'MAIN_MODULE_MARGIN',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9468,'MAIN_MODULE_MRP',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9469,'MAIN_MODULE_MRP_TRIGGERS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9470,'MAIN_MODULE_MRP_LOGIN',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9471,'MAIN_MODULE_MRP_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9472,'MAIN_MODULE_MRP_MENUS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9473,'MAIN_MODULE_MRP_TPL',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9474,'MAIN_MODULE_MRP_BARCODE',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9475,'MAIN_MODULE_MRP_MODELS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9476,'MAIN_MODULE_MRP_THEME',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9477,'MAIN_MODULE_MRP_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9478,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9479,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9480,'MAIN_MODULE_RECRUITMENT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9481,'MAIN_MODULE_RECRUITMENT_TRIGGERS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9482,'MAIN_MODULE_RECRUITMENT_LOGIN',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9483,'MAIN_MODULE_RECRUITMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9484,'MAIN_MODULE_RECRUITMENT_MENUS',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9485,'MAIN_MODULE_RECRUITMENT_TPL',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9486,'MAIN_MODULE_RECRUITMENT_BARCODE',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9487,'MAIN_MODULE_RECRUITMENT_MODELS',1,'1','chaine',0,NULL,'2022-12-11 21:23:43'),(9488,'MAIN_MODULE_RECRUITMENT_THEME',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9489,'MAIN_MODULE_RECRUITMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2022-12-11 21:23:43'),(9490,'MAIN_MODULE_RESOURCE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9491,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9492,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9493,'MAIN_MODULE_SYSLOG',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9494,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9495,'MAIN_MODULE_STRIPE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:43'),(9496,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:44'),(9497,'MAIN_MODULE_TICKET_TABS_0',1,'thirdparty:+ticket:Tickets:ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__','chaine',0,NULL,'2022-12-11 21:23:44'),(9498,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2022-12-11 21:23:44'),(9499,'TAKEPOS_PRINT_METHOD',1,'browser','chaine',0,'','2022-12-11 21:23:44'),(9500,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:44'),(9501,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9502,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9503,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2022-12-11 21:23:44'),(9504,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9505,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9506,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9507,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9508,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2022-12-11 21:23:44'),(9509,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:44'),(9510,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:44'),(9511,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2022-12-11 21:23:44'),(9512,'MAIN_VERSION_LAST_UPGRADE',0,'17.0.0-beta','chaine',0,'Dolibarr version for last upgrade','2022-12-11 21:23:48'),(9514,'MAIN_FIRST_PING_OK_DATE',1,'20221211212350','chaine',0,'','2022-12-11 21:23:50'),(9515,'MAIN_FIRST_PING_OK_ID',1,'disabled','chaine',0,'','2022-12-11 21:23:50'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -4998,9 +5039,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_supplier` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_supplier` varchar(50) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, @@ -5016,14 +5057,14 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_customer` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + `ref_customer` varchar(50) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_contrat_ref` (`ref`,`entity`), KEY `idx_contrat_fk_soc` (`fk_soc`), @@ -5054,7 +5095,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contrat_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5082,8 +5123,8 @@ CREATE TABLE `llx_contratdet` ( `fk_contrat` int(11) NOT NULL, `fk_product` int(11) DEFAULT NULL, `statut` smallint(6) DEFAULT 0, - `label` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` text DEFAULT NULL, + `description` text DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, `date_commande` datetime DEFAULT NULL, `date_ouverture_prevue` datetime DEFAULT NULL, @@ -5091,11 +5132,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) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double NOT NULL, `remise_percent` double DEFAULT 0, `subprice` double(24,8) DEFAULT 0.00000000, @@ -5114,10 +5155,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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `commentaire` text DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -5141,7 +5182,7 @@ CREATE TABLE `llx_contratdet` ( LOCK TABLES `llx_contratdet` WRITE; /*!40000 ALTER TABLE `llx_contratdet` DISABLE KEYS */; -INSERT INTO `llx_contratdet` VALUES (2,'2012-07-10 16:14:14',2,NULL,0,'','Abonnement annuel assurance',NULL,NULL,'2012-07-10 00:00:00',NULL,'2013-07-10 00:00:00',NULL,1.000,'',0.000,'',0.000,'',1,0,10.00000000,10,0,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,1,0,0,NULL,0.00000000,0,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,'2015-03-05 10:20:58',2,3,5,'','gdfg',NULL,NULL,'2012-07-10 00:00:00','2012-07-10 12:00:00','2013-07-09 00:00:00','2015-03-06 12:00:00',4.000,'',0.000,'',0.000,'',1,0,0.00000000,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,0,0,0,0.00000000,0,1,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,'2014-12-08 13:11:17',2,3,0,'','',NULL,NULL,'2012-07-10 00:00:00',NULL,NULL,NULL,0.000,'',0.000,'',0.000,'',1,10,40.00000000,40,NULL,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,0,0,NULL,0.00000000,0,NULL,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(5,'2015-03-06 09:05:40',3,NULL,4,'','gfdg',NULL,NULL,NULL,'2015-03-06 12:00:00','2015-03-07 12:00:00',NULL,0.000,'',0.000,'',0.000,'',1,0,10.00000000,10,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,0,0,0,0.00000000,0,1,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(15,'2020-01-13 14:56:58',1,NULL,0,'','aaa',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'CGST+SGST',9.000,'0',9.000,'0',1,0,10.00000000,10,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,0,0,NULL,0.00000000,0,NULL,12,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(16,'2020-01-13 14:56:53',1,NULL,0,'','aaa',NULL,NULL,NULL,NULL,NULL,NULL,18.000,'IGST',0.000,'1',0.000,'1',1,0,10.00000000,10,NULL,10.00000000,1.80000000,0.00000000,0.00000000,11.80000000,1,0,0,NULL,0.00000000,0,NULL,12,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000); +INSERT INTO `llx_contratdet` VALUES (2,'2022-12-11 21:23:42',2,NULL,0,'','Abonnement annuel assurance',NULL,NULL,'2012-07-10 00:00:00',NULL,'2013-07-10 00:00:00',NULL,1.000,'',0.000,'',0.000,'',1,0,10.00000000,10,0,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,1,0,1,NULL,0.00000000,0,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,'2022-12-11 21:23:42',2,3,5,'','gdfg',NULL,NULL,'2012-07-10 00:00:00','2012-07-10 12:00:00','2013-07-09 00:00:00','2015-03-06 12:00:00',4.000,'',0.000,'',0.000,'',1,0,0.00000000,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,0,2,0,0.00000000,0,1,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,'2022-12-11 21:23:42',2,3,0,'','',NULL,NULL,'2012-07-10 00:00:00',NULL,NULL,NULL,0.000,'',0.000,'',0.000,'',1,10,40.00000000,40,NULL,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,0,3,NULL,0.00000000,0,NULL,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(5,'2022-12-11 21:23:42',3,NULL,4,'','gfdg',NULL,NULL,NULL,'2015-03-06 12:00:00','2015-03-07 12:00:00',NULL,0.000,'',0.000,'',0.000,'',1,0,10.00000000,10,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,0,1,0,0.00000000,0,1,1,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(15,'2022-12-11 21:23:42',1,NULL,0,'','aaa',NULL,NULL,NULL,NULL,NULL,NULL,0.000,'CGST+SGST',9.000,'0',9.000,'0',1,0,10.00000000,10,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,0,1,NULL,0.00000000,0,NULL,12,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(16,'2022-12-11 21:23:42',1,NULL,0,'','aaa',NULL,NULL,NULL,NULL,NULL,NULL,18.000,'IGST',0.000,'1',0.000,'1',1,0,10.00000000,10,NULL,10.00000000,1.80000000,0.00000000,0.00000000,11.80000000,1,0,2,NULL,0.00000000,0,NULL,12,'',NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000); /*!40000 ALTER TABLE `llx_contratdet` ENABLE KEYS */; UNLOCK TABLES; @@ -5156,7 +5197,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contratdet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5185,7 +5226,7 @@ CREATE TABLE `llx_contratdet_log` ( `date` datetime NOT NULL, `statut` smallint(6) NOT NULL, `fk_user_author` int(11) NOT NULL, - `commentaire` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `commentaire` text DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contratdet_log_fk_contratdet` (`fk_contratdet`), KEY `idx_contratdet_log_date` (`date`), @@ -5213,41 +5254,42 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `command` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `classesname` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `objectname` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `methodename` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `params` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `md5params` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module_name` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `jobtype` varchar(10) NOT NULL, + `label` varchar(255) NOT NULL, + `command` varchar(255) DEFAULT NULL, + `classesname` varchar(255) DEFAULT NULL, + `objectname` varchar(255) DEFAULT NULL, + `methodename` varchar(255) DEFAULT NULL, + `params` text DEFAULT NULL, + `md5params` varchar(32) DEFAULT NULL, + `module_name` varchar(255) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastoutput` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `unitfrequency` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '3600', + `lastresult` text DEFAULT NULL, + `lastoutput` text DEFAULT NULL, + `unitfrequency` varchar(255) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `libname` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, + `libname` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT '1', + `test` varchar(255) DEFAULT '1', `processing` int(11) NOT NULL DEFAULT 0, - `email_alert` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email_alert` varchar(128) DEFAULT NULL, + `pid` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_cronjob` (`label`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5256,7 +5298,7 @@ CREATE TABLE `llx_cronjob` ( LOCK TABLES `llx_cronjob` WRITE; /*!40000 ALTER TABLE `llx_cronjob` DISABLE KEYS */; -INSERT INTO `llx_cronjob` VALUES (1,'2015-03-23 18:18:39','2015-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2015-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0,NULL),(40,'2018-11-23 11:58:15','2018-11-23 12:58:15','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-11-23 12:58:15',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'$conf->agenda->enabled',0,NULL),(41,'2018-11-23 11:58:16','2018-11-23 12:58:16','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-11-23 12:58:16',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,0,0,0,NULL,'1',0,NULL),(42,'2020-01-15 15:43:12','2018-11-23 12:58:16','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,'2020-01-15 19:43:12','2020-01-17 12:58:16','2018-11-23 12:58:16',NULL,'2020-01-15 19:43:12','-1','Failed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.\nFailed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.','604800',1,2,1,NULL,12,'MakeLocalDatabaseDump',NULL,0,0,0,NULL,'1',0,NULL),(43,'2022-07-04 01:11:54','2018-11-23 12:58:17','method','RecurringInvoicesJob',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-11-23 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'$conf->facture->enabled',0,NULL),(45,'2020-01-01 12:00:34','2020-01-01 16:00:34','method','MyJob label',NULL,'/captureserver/class/myobject.class.php','MyObject','doScheduledJob',NULL,NULL,'captureserver',0,NULL,NULL,'2020-01-01 16:00:34',NULL,NULL,NULL,NULL,'3600',2,NULL,0,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->captureserver->enabled',0,NULL),(46,'2020-01-12 20:13:55','2020-01-13 00:13:55','method','Email collector',NULL,'/emailcollector/class/emailcollector.class.php','EmailCollector','doCollect',NULL,NULL,'emailcollector',50,NULL,NULL,'2020-01-13 00:13:55',NULL,NULL,NULL,NULL,'60',5,NULL,1,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->emailcollector->enabled',0,NULL),(47,'2021-04-15 10:34:00','2021-04-15 07:34:00','method','CompressSyslogs',NULL,'core/class/utils.class.php','Utils','compressSyslogs',NULL,NULL,'syslog',50,NULL,NULL,'2021-04-15 07:34:00',NULL,NULL,NULL,NULL,'86400',1,NULL,0,NULL,NULL,'Compress and archive log files. The number of versions to keep is defined into the setup of module. Warning: Main application cron script must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission \"rws\" on this directory so log files will always have the group and permissions of the web server Operating System group.',NULL,1,0,0,NULL,'1',0,NULL),(48,'2021-07-11 17:49:46','2021-07-11 19:49:46','method','SendEmailsRemindersOnInvoiceDueDate',NULL,'compta/facture/class/facture.class.php','Facture','sendEmailsRemindersOnInvoiceDueDate','10,all,EmailTemplateCode',NULL,'facture',50,NULL,NULL,'2021-07-11 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,0,NULL,NULL,'Send an emails when the unpaid invoices reach a due date + n days = today. First param is the offset n of days, second parameter is \"all\" or a payment mode code, last paramater is the code of email template to use (an email template with EmailTemplateCode must exists. the version in the language of the thirdparty will be used in priority).',NULL,1,0,0,NULL,'$conf->facture->enabled',0,NULL),(49,'2022-02-07 13:38:17','2022-02-07 13:38:17','method','HolidayBalanceMonthlyUpdate',NULL,'holiday/class/holiday.class.php','Holiday','updateBalance',NULL,NULL,'holiday',50,NULL,NULL,'2022-02-07 04:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Update holiday balance every month',NULL,1,0,0,NULL,'$conf->holiday->enabled',0,NULL),(50,'2022-07-04 01:12:18','2022-07-04 01:12:18','method','MakeSendLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','sendDumpDatabase',',,,,,sql',NULL,'cron',91,NULL,NULL,'2022-07-04 01:12:18',NULL,NULL,NULL,NULL,'604800',1,NULL,0,NULL,NULL,'MakeSendLocalDatabaseDump',NULL,0,0,0,NULL,'!empty($conf->global->MAIN_ALLOW_BACKUP_BY_EMAIL) && in_array($conf->db->type, array(\'mysql\', \'mysqli\'))',0,NULL),(51,'2022-07-04 01:12:18','2022-07-04 01:12:18','method','RecurringSupplierInvoicesJob',NULL,'fourn/class/fournisseur.facture-rec.class.php','FactureFournisseurRec','createRecurringInvoices',NULL,NULL,'fournisseur',51,NULL,NULL,'2022-07-04 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring supplier invoices',NULL,1,0,0,NULL,'',0,NULL); +INSERT INTO `llx_cronjob` VALUES (1,'2015-03-23 18:18:39','2015-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2015-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0,NULL,NULL),(40,'2018-11-23 11:58:15','2018-11-23 12:58:15','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-11-23 12:58:15',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'$conf->agenda->enabled',0,NULL,NULL),(41,'2018-11-23 11:58:16','2018-11-23 12:58:16','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-11-23 12:58:16',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,0,0,0,NULL,'1',0,NULL,NULL),(42,'2020-01-15 15:43:12','2018-11-23 12:58:16','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,'2020-01-15 19:43:12','2020-01-17 12:58:16','2018-11-23 12:58:16',NULL,'2020-01-15 19:43:12','-1','Failed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.\nFailed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.','604800',1,2,1,NULL,12,'MakeLocalDatabaseDump',NULL,0,0,0,NULL,'1',0,NULL,NULL),(43,'2022-07-04 01:11:54','2018-11-23 12:58:17','method','RecurringInvoicesJob',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-11-23 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'$conf->facture->enabled',0,NULL,NULL),(45,'2020-01-01 12:00:34','2020-01-01 16:00:34','method','MyJob label',NULL,'/captureserver/class/myobject.class.php','MyObject','doScheduledJob',NULL,NULL,'captureserver',0,NULL,NULL,'2020-01-01 16:00:34',NULL,NULL,NULL,NULL,'3600',2,NULL,0,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->captureserver->enabled',0,NULL,NULL),(46,'2020-01-12 20:13:55','2020-01-13 00:13:55','method','Email collector',NULL,'/emailcollector/class/emailcollector.class.php','EmailCollector','doCollect',NULL,NULL,'emailcollector',50,NULL,NULL,'2020-01-13 00:13:55',NULL,NULL,NULL,NULL,'60',5,NULL,1,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->emailcollector->enabled',0,NULL,NULL),(47,'2021-04-15 10:34:00','2021-04-15 07:34:00','method','CompressSyslogs',NULL,'core/class/utils.class.php','Utils','compressSyslogs',NULL,NULL,'syslog',50,NULL,NULL,'2021-04-15 07:34:00',NULL,NULL,NULL,NULL,'86400',1,NULL,0,NULL,NULL,'Compress and archive log files. The number of versions to keep is defined into the setup of module. Warning: Main application cron script must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission \"rws\" on this directory so log files will always have the group and permissions of the web server Operating System group.',NULL,1,0,0,NULL,'1',0,NULL,NULL),(48,'2021-07-11 17:49:46','2021-07-11 19:49:46','method','SendEmailsRemindersOnInvoiceDueDate',NULL,'compta/facture/class/facture.class.php','Facture','sendEmailsRemindersOnInvoiceDueDate','10,all,EmailTemplateCode',NULL,'facture',50,NULL,NULL,'2021-07-11 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,0,NULL,NULL,'Send an emails when the unpaid invoices reach a due date + n days = today. First param is the offset n of days, second parameter is \"all\" or a payment mode code, last paramater is the code of email template to use (an email template with EmailTemplateCode must exists. the version in the language of the thirdparty will be used in priority).',NULL,1,0,0,NULL,'$conf->facture->enabled',0,NULL,NULL),(49,'2022-02-07 13:38:17','2022-02-07 13:38:17','method','HolidayBalanceMonthlyUpdate',NULL,'holiday/class/holiday.class.php','Holiday','updateBalance',NULL,NULL,'holiday',50,NULL,NULL,'2022-02-07 04:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Update holiday balance every month',NULL,1,0,0,NULL,'$conf->holiday->enabled',0,NULL,NULL),(50,'2022-07-04 01:12:18','2022-07-04 01:12:18','method','MakeSendLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','sendDumpDatabase',',,,,,sql',NULL,'cron',91,NULL,NULL,'2022-07-04 01:12:18',NULL,NULL,NULL,NULL,'604800',1,NULL,0,NULL,NULL,'MakeSendLocalDatabaseDump',NULL,0,0,0,NULL,'!empty($conf->global->MAIN_ALLOW_BACKUP_BY_EMAIL) && in_array($conf->db->type, array(\'mysql\', \'mysqli\'))',0,NULL,NULL),(51,'2022-07-04 01:12:18','2022-07-04 01:12:18','method','RecurringSupplierInvoicesJob',NULL,'fourn/class/fournisseur.facture-rec.class.php','FactureFournisseurRec','createRecurringInvoices',NULL,NULL,'fournisseur',51,NULL,NULL,'2022-07-04 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring supplier invoices',NULL,1,0,0,NULL,'',0,NULL,NULL),(52,'2022-12-11 21:23:42','2022-12-11 21:23:42','method','CleanUnfinishedCronjobShort',NULL,'core/class/utils.class.php','Utils','cleanUnfinishedCronjob',NULL,NULL,'cron',10,NULL,NULL,'2022-12-11 21:23:42',NULL,NULL,NULL,NULL,'60',5,NULL,0,NULL,NULL,'CleanUnfinishedCronjob',NULL,0,0,0,NULL,'getDolGlobalInt(\"MAIN_FEATURES_LEVEL\") >= 2',0,NULL,NULL),(53,'2022-12-11 21:23:43','2022-12-11 21:23:43','method','HolidayBalanceMonthlyUpdate:holiday',NULL,'holiday/class/holiday.class.php','Holiday','updateBalance',NULL,NULL,'holiday',50,NULL,NULL,'2022-12-11 04:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Update holiday balance every month',NULL,1,0,0,NULL,'$conf->holiday->enabled',0,NULL,NULL); /*!40000 ALTER TABLE `llx_cronjob` ENABLE KEYS */; UNLOCK TABLES; @@ -5270,11 +5312,11 @@ DROP TABLE IF EXISTS `llx_default_values`; CREATE TABLE `llx_default_values` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type` varchar(10) DEFAULT NULL, `user_id` int(11) NOT NULL DEFAULT 0, - `page` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `param` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `value` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `page` varchar(255) DEFAULT NULL, + `param` varchar(255) DEFAULT NULL, + `value` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_default_values` (`type`,`entity`,`user_id`,`page`,`param`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5300,12 +5342,12 @@ DROP TABLE IF EXISTS `llx_delivery`; CREATE TABLE `llx_delivery` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_customer` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_customer` varchar(30) DEFAULT NULL, `fk_soc` int(11) NOT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(30) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -5314,14 +5356,14 @@ CREATE TABLE `llx_delivery` ( `fk_address` int(11) DEFAULT NULL, `fk_statut` smallint(6) DEFAULT 0, `total_ht` double(24,8) DEFAULT 0.00000000, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci 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, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_delivery_uk_ref` (`ref`,`entity`), KEY `idx_delivery_fk_soc` (`fk_soc`), @@ -5353,7 +5395,7 @@ CREATE TABLE `llx_delivery_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_delivery_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5380,7 +5422,7 @@ CREATE TABLE `llx_deliverydet` ( `fk_delivery` int(11) DEFAULT NULL, `fk_origin_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `qty` double DEFAULT NULL, `subprice` double(24,8) DEFAULT 0.00000000, `total_ht` double(24,8) DEFAULT 0.00000000, @@ -5412,7 +5454,7 @@ CREATE TABLE `llx_deliverydet_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_deliverydet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5436,7 +5478,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), @@ -5444,14 +5486,14 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `type` varchar(12) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5475,14 +5517,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `nom` varchar(50) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `libelle` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type` varchar(64) DEFAULT NULL, + `libelle` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=442 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=450 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5491,7 +5533,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),(273,'beluga',1,'project','beluga',NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(393,'squille',1,'reception',NULL,NULL),(434,'einstein',1,'order',NULL,NULL),(435,'html_cerfafr',1,'donation',NULL,NULL),(436,'standard',1,'expensereport',NULL,NULL),(437,'crabe',1,'invoice',NULL,NULL),(438,'muscadet',1,'order_supplier',NULL,NULL),(439,'standard_recruitmentjobposition',1,'recruitmentjobposition',NULL,NULL),(440,'generic_recruitmentjobposition_odt',1,'recruitmentjobposition',NULL,NULL),(441,'TICKET_ADDON_PDF_ODT_PATH',1,'ticket',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),(273,'beluga',1,'project','beluga',NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(393,'squille',1,'reception',NULL,NULL),(442,'einstein',1,'order',NULL,NULL),(443,'html_cerfafr',1,'donation',NULL,NULL),(444,'standard',1,'expensereport',NULL,NULL),(445,'crabe',1,'invoice',NULL,NULL),(446,'muscadet',1,'order_supplier',NULL,NULL),(447,'standard_recruitmentjobposition',1,'recruitmentjobposition',NULL,NULL),(448,'generic_recruitmentjobposition_odt',1,'recruitmentjobposition',NULL,NULL),(449,'TICKET_ADDON_PDF_ODT_PATH',1,'ticket',NULL,NULL); /*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; UNLOCK TABLES; @@ -5504,7 +5546,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) 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, @@ -5513,30 +5555,35 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `societe` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `country` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `societe` varchar(50) DEFAULT NULL, + `address` text DEFAULT NULL, + `zip` varchar(10) DEFAULT NULL, + `town` varchar(50) DEFAULT NULL, + `country` varchar(50) DEFAULT NULL, `fk_country` int(11) NOT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone_mobile` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `phone` varchar(24) DEFAULT NULL, + `phone_mobile` varchar(24) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`) + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_don_uk_ref` (`ref`,`entity`), + KEY `idx_don_fk_soc` (`fk_soc`), + KEY `idx_don_fk_project` (`fk_projet`), + KEY `idx_don_fk_user_author` (`fk_user_author`), + KEY `idx_don_fk_user_valid` (`fk_user_valid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5561,7 +5608,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_don_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5585,20 +5632,20 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(64) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_parent` int(11) DEFAULT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `description` varchar(255) NOT NULL, `cachenbofdoc` int(11) NOT NULL DEFAULT 0, - `fullpath` varchar(750) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fullpath` varchar(750) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `date_c` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `acl` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `acl` text DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_directories` (`label`,`fk_parent`,`entity`), KEY `idx_ecm_directories_fk_user_c` (`fk_user_c`), @@ -5629,7 +5676,7 @@ CREATE TABLE `llx_ecm_directories_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) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ecm_directories_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5653,28 +5700,28 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `share` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) DEFAULT NULL, + `label` varchar(128) NOT NULL, + `share` varchar(128) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `filename` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `filepath` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fullpath_orig` varchar(750) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `keywords` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cover` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `gen_or_uploaded` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `filename` varchar(255) NOT NULL, + `filepath` varchar(255) DEFAULT NULL, + `fullpath_orig` varchar(750) DEFAULT NULL, + `description` text DEFAULT NULL, + `keywords` text DEFAULT NULL, + `cover` text DEFAULT NULL, + `gen_or_uploaded` varchar(12) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `date_c` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `acl` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `acl` text DEFAULT NULL, `position` int(11) DEFAULT NULL, - `keyword` varchar(750) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `src_object_type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `keyword` varchar(750) DEFAULT NULL, + `src_object_type` varchar(64) DEFAULT NULL, `src_object_id` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_files` (`filepath`,`filename`,`entity`), @@ -5703,7 +5750,7 @@ CREATE TABLE `llx_ecm_files_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) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ecm_files_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -5718,6 +5765,34 @@ LOCK TABLES `llx_ecm_files_extrafields` WRITE; /*!40000 ALTER TABLE `llx_ecm_files_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_element_categorie` +-- + +DROP TABLE IF EXISTS `llx_element_categorie`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_element_categorie` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_categorie` int(11) NOT NULL, + `fk_element` int(11) NOT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `idx_element_categorie_idx` (`fk_element`,`fk_categorie`), + KEY `fk_element_categorie_fk_categorie` (`fk_categorie`), + CONSTRAINT `fk_element_categorie_fk_categorie` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_element_categorie` +-- + +LOCK TABLES `llx_element_categorie` WRITE; +/*!40000 ALTER TABLE `llx_element_categorie` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_element_categorie` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_element_contact` -- @@ -5760,9 +5835,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `sourcetype` varchar(32) NOT NULL, `fk_target` int(11) NOT NULL, - `targettype` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `targettype` varchar(32) 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`) @@ -5789,9 +5864,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `element_type` varchar(64) DEFAULT NULL, `resource_id` int(11) DEFAULT NULL, - `resource_type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `resource_type` varchar(64) DEFAULT NULL, `busy` int(11) DEFAULT NULL, `mandatory` int(11) DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, @@ -5823,32 +5898,35 @@ DROP TABLE IF EXISTS `llx_emailcollector_emailcollector`; CREATE TABLE `llx_emailcollector_emailcollector` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `host` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `user` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `password` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `source_directory` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `filter` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `actiontodo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `target_directory` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) NOT NULL, + `label` varchar(255) DEFAULT NULL, + `description` mediumtext DEFAULT NULL, + `host` varchar(255) DEFAULT NULL, + `user` varchar(128) DEFAULT NULL, + `password` varchar(128) DEFAULT NULL, + `source_directory` varchar(255) DEFAULT NULL, + `filter` mediumtext DEFAULT NULL, + `actiontodo` varchar(255) DEFAULT NULL, + `target_directory` varchar(255) DEFAULT NULL, `datelastresult` datetime DEFAULT NULL, - `lastresult` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lastresult` text DEFAULT NULL, + `note_public` mediumtext DEFAULT NULL, + `note_private` mediumtext DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) NOT NULL, - `codelastresult` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `codelastresult` varchar(16) DEFAULT NULL, `position` int(11) DEFAULT 0, - `login` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `login` varchar(128) DEFAULT NULL, `datelastok` datetime DEFAULT NULL, `maxemailpercollect` int(11) DEFAULT 100, - `hostcharset` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT 'UTF-8', + `hostcharset` varchar(16) DEFAULT 'UTF-8', + `port` varchar(10) DEFAULT '993', + `acces_type` int(11) DEFAULT 0, + `oauth_service` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_emailcollector_emailcollector_ref` (`ref`,`entity`), KEY `idx_emailcollector_rowid` (`rowid`), @@ -5863,7 +5941,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (3,1,'Collect_Ticket_Requests','Example to collect ticket requests','This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-12-10 12:24:38',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'),(4,1,'Collect_Responses_In','Example to collect any email responses','This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-12-10 12:24:38',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'),(5,1,'Collect_Leads','Example to collect leads','This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can\'t be found in database (new customer), the lead will be attached to the thirdparty with ID 1.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (3,1,'Collect_Ticket_Requests','Example to collect ticket requests','This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-12-10 12:24:38',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8','993',0,NULL),(4,1,'Collect_Responses_In','Example to collect any email responses','This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-12-10 12:24:38',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8','993',0,NULL),(5,1,'Collect_Leads','Example to collect leads','This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can\'t be found in database (new customer), the lead will be attached to the thirdparty with ID 1.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8','993',0,NULL); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -5877,13 +5955,13 @@ DROP TABLE IF EXISTS `llx_emailcollector_emailcollectoraction`; CREATE TABLE `llx_emailcollector_emailcollectoraction` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_emailcollector` int(11) NOT NULL, - `type` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `actionparam` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type` varchar(128) NOT NULL, + `actionparam` text DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) NOT NULL, `position` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), @@ -5913,13 +5991,13 @@ DROP TABLE IF EXISTS `llx_emailcollector_emailcollectorfilter`; CREATE TABLE `llx_emailcollector_emailcollectorfilter` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_emailcollector` int(11) NOT NULL, - `type` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `rulevalue` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type` varchar(128) NOT NULL, + `rulevalue` varchar(255) DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_emailcollector_emailcollectorfilter` (`fk_emailcollector`,`type`,`rulevalue`), @@ -5950,25 +6028,25 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_project` int(11) DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lieu` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, + `lieu` varchar(64) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `zip` varchar(10) DEFAULT NULL, + `town` varchar(50) 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, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_parent` int(11) DEFAULT 0, - `fax` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `phone` varchar(20) DEFAULT NULL, `warehouse_usage` int(11) DEFAULT 1, - `barcode` varchar(180) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `barcode` varchar(180) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_entrepot_label` (`ref`,`entity`) @@ -5996,7 +6074,7 @@ CREATE TABLE `llx_entrepot_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_entrepot_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6021,23 +6099,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(25) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `zip` varchar(25) DEFAULT NULL, + `town` varchar(50) DEFAULT NULL, `fk_state` int(11) DEFAULT 0, `fk_country` int(11) DEFAULT 0, - `profid1` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `profid2` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `profid3` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `profid1` varchar(20) DEFAULT NULL, + `profid2` varchar(20) DEFAULT NULL, + `profid3` varchar(20) DEFAULT NULL, + `phone` varchar(20) 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, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) NOT NULL, + `label` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6062,7 +6140,7 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `targettype` varchar(32) NOT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6085,27 +6163,28 @@ DROP TABLE IF EXISTS `llx_eventorganization_conferenceorboothattendee`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_eventorganization_conferenceorboothattendee` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_actioncomm` int(11) DEFAULT NULL, - `email` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_company` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(100) DEFAULT NULL, + `email_company` varchar(128) DEFAULT NULL, `date_subscription` datetime DEFAULT NULL, `amount` double DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `date_creation` datetime NOT 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, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `status` smallint(6) NOT NULL, `fk_project` int(11) NOT NULL, `fk_invoice` int(11) DEFAULT NULL, - `firstname` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastname` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `firstname` varchar(100) DEFAULT NULL, + `lastname` varchar(100) DEFAULT NULL, + `ip` varchar(250) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_eventorganization_conferenceorboothattendee` (`fk_project`,`email`,`fk_actioncomm`), KEY `idx_eventorganization_conferenceorboothattendee_rowid` (`rowid`), @@ -6137,7 +6216,7 @@ CREATE TABLE `llx_eventorganization_conferenceorboothattendee_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_conferenceorboothattendee_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6162,16 +6241,16 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `type` varchar(32) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `dateevent` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `description` varchar(250) COLLATE utf8mb3_unicode_ci NOT NULL, - `ip` varchar(250) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `user_agent` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(250) NOT NULL, + `ip` varchar(250) DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, `fk_object` int(11) DEFAULT NULL, - `prefix_session` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `authentication_method` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `prefix_session` varchar(255) DEFAULT NULL, + `authentication_method` varchar(64) DEFAULT NULL, `fk_oauth_token` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_events_dateevent` (`dateevent`) @@ -6198,13 +6277,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_customer` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_customer` varchar(255) DEFAULT NULL, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(30) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -6213,7 +6292,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `tracking_number` varchar(50) DEFAULT NULL, `fk_statut` smallint(6) DEFAULT 0, `height` float DEFAULT NULL, `height_unit` int(11) DEFAULT NULL, @@ -6222,16 +6301,16 @@ CREATE TABLE `llx_expedition` ( `size` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `billed` smallint(6) DEFAULT 0, `fk_user_modif` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_expedition_uk_ref` (`ref`,`entity`), KEY `idx_expedition_fk_soc` (`fk_soc`), @@ -6266,7 +6345,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_expedition_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6291,7 +6370,7 @@ DROP TABLE IF EXISTS `llx_expedition_package`; CREATE TABLE `llx_expedition_package` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_expedition` int(11) NOT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, `value` double(24,8) DEFAULT 0.00000000, `fk_package_type` int(11) DEFAULT NULL, `height` float DEFAULT NULL, @@ -6359,7 +6438,7 @@ CREATE TABLE `llx_expeditiondet_batch` ( `fk_expeditiondet` int(11) NOT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, - `batch` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, `qty` double NOT NULL DEFAULT 0, `fk_origin_stock` int(11) NOT NULL, PRIMARY KEY (`rowid`), @@ -6388,7 +6467,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_expeditiondet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6412,7 +6491,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(50) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `ref_number_int` int(11) DEFAULT NULL, `ref_ext` int(11) DEFAULT NULL, @@ -6439,22 +6518,22 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `detail_refuse` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `detail_cancel` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, + `detail_refuse` varchar(255) DEFAULT NULL, + `detail_cancel` varchar(255) DEFAULT NULL, `integration_compta` int(11) DEFAULT NULL, `fk_bank_account` int(11) DEFAULT NULL, - `model_pdf` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `model_pdf` varchar(50) DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_expensereport_uk_ref` (`ref`,`entity`), @@ -6488,10 +6567,10 @@ DROP TABLE IF EXISTS `llx_expensereport_det`; CREATE TABLE `llx_expensereport_det` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_expensereport` int(11) NOT NULL, - `docnumber` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `docnumber` varchar(128) DEFAULT NULL, `fk_c_type_fees` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `comments` text COLLATE utf8mb3_unicode_ci NOT NULL, + `comments` text NOT NULL, `product_type` int(11) DEFAULT -1, `qty` double NOT NULL, `subprice` double(24,8) NOT NULL DEFAULT 0.00000000, @@ -6499,9 +6578,9 @@ CREATE TABLE `llx_expensereport_det` ( `remise_percent` double DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax1_type` varchar(10) DEFAULT NULL, `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(10) 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, @@ -6511,17 +6590,17 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT '', - `rule_warning_message` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `vat_src_code` varchar(10) DEFAULT '', + `rule_warning_message` text DEFAULT NULL, `fk_c_exp_tax_cat` int(11) DEFAULT NULL, `fk_ecm_files` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -6549,7 +6628,7 @@ CREATE TABLE `llx_expensereport_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_expensereport_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6612,7 +6691,7 @@ CREATE TABLE `llx_expensereport_rules` ( `fk_user` int(11) DEFAULT NULL, `fk_usergroup` int(11) DEFAULT NULL, `fk_c_type_fees` int(11) NOT NULL, - `code_expense_rules_type` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, + `code_expense_rules_type` varchar(50) NOT NULL, `is_for_all` tinyint(4) DEFAULT 0, `entity` int(11) DEFAULT 1, PRIMARY KEY (`rowid`) @@ -6637,10 +6716,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(12) NOT NULL, `date_export` datetime NOT NULL, `fk_user` int(11) NOT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6664,10 +6743,10 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `field` text COLLATE utf8mb3_unicode_ci NOT NULL, - `filter` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(50) NOT NULL, + `type` varchar(64) DEFAULT NULL, + `field` text NOT NULL, + `filter` text DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_export_model` (`label`,`type`) @@ -6693,34 +6772,34 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'member', - `name` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `elementtype` varchar(64) NOT NULL DEFAULT 'member', + `name` varchar(64) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `type` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `size` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) NOT NULL, + `type` varchar(8) DEFAULT NULL, + `size` varchar(8) DEFAULT NULL, `pos` int(11) DEFAULT 0, `alwayseditable` int(11) DEFAULT 0, - `param` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `param` text DEFAULT NULL, `fieldunique` int(11) DEFAULT 0, `fieldrequired` int(11) DEFAULT 0, - `perms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `list` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `perms` varchar(255) DEFAULT NULL, + `list` varchar(128) DEFAULT NULL, `totalizable` tinyint(1) DEFAULT 0, `ishidden` int(11) DEFAULT 0, - `fieldcomputed` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fielddefault` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `langs` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fieldcomputed` text DEFAULT NULL, + `fielddefault` text DEFAULT NULL, + `langs` varchar(64) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `enabled` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT '1', - `help` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `enabled` varchar(255) DEFAULT '1', + `help` text DEFAULT NULL, `printable` int(11) DEFAULT 0, - `css` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cssview` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `csslist` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `css` varchar(128) DEFAULT NULL, + `cssview` varchar(128) DEFAULT NULL, + `csslist` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_extrafields_name` (`name`,`entity`,`elementtype`) ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6745,13 +6824,13 @@ DROP TABLE IF EXISTS `llx_facture`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, `type` smallint(6) NOT NULL DEFAULT 0, - `ref_client` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `increment` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, + `increment` varchar(10) DEFAULT NULL, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `datef` date DEFAULT NULL, @@ -6763,8 +6842,9 @@ CREATE TABLE `llx_facture` ( `remise_percent` double DEFAULT 0, `remise_absolue` double DEFAULT 0, `remise` double DEFAULT 0, - `close_code` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `close_note` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `close_code` varchar(16) DEFAULT NULL, + `close_missing_amount` double(24,8) DEFAULT NULL, + `close_note` varchar(128) DEFAULT NULL, `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, @@ -6779,15 +6859,15 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_currency` varchar(3) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `situation_cycle_ref` smallint(6) DEFAULT NULL, `situation_counter` smallint(6) DEFAULT NULL, `situation_final` smallint(6) DEFAULT NULL, @@ -6795,19 +6875,19 @@ CREATE TABLE `llx_facture` ( `retained_warranty_date_limit` date DEFAULT NULL, `retained_warranty_fk_cond_reglement` int(11) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, `fk_transport_mode` int(11) DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module_source` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pos_source` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `module_source` varchar(32) DEFAULT NULL, + `pos_source` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_facture_ref` (`ref`,`entity`), KEY `idx_facture_fk_soc` (`fk_soc`), @@ -6833,7 +6913,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,'2012-07-10 18:20:13','2021-07-10',NULL,NULL,'2021-07-11 17:49:28',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,NULL,1,0,'2021-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2021-07-18',NULL,NULL,'2022-02-07 13:37:54',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,NULL,1,NULL,NULL,1,0,'2021-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2021-08-01',NULL,NULL,'2022-02-07 13:37:54',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,NULL,0,6,'2021-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2021-08-06',NULL,NULL,'2022-02-07 13:37:54',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,NULL,0,4,'2021-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2021-08-08',NULL,NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2021-08-08',NULL,NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2021-12-08','2021-12-08 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2021-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2021-12-08','2021-12-08 00:00:00',NULL,'2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2021-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2021-12-09','2021-02-12 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2021-12-11','2022-03-24 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2021-12-11','2022-03-03 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2021-12-11','2021-12-12 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-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,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,0,1,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2022-01-19','2021-08-29 00:00:00','2020-01-02 20:49:34','2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,'other','test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,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',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2022-01-19','2021-10-04 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2022-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,0,1,'2022-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2021-07-18','2021-03-06 00:00:00',NULL,'2022-02-07 13:37:54',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,NULL,1,0,'2021-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2021-07-10','2021-03-20 00:00:00',NULL,'2021-07-11 17:49:28',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,NULL,1,0,'2021-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,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2022-03-22','2021-03-02 00:00:00',NULL,'2022-07-04 01:11:35',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,NULL,1,3,'2022-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2022-03-03','2021-03-03 00:00:00',NULL,'2022-07-04 01:11:35',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2022-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2022-02-12',NULL,NULL,'2022-07-04 01:11:35',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,NULL,1,0,'2022-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2021-08-31',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2021-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2021-09-26','2021-09-26 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2021-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2021-11-28',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2021-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2022-01-16','2022-01-16 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2022-01-16','2022-01-16 00:00:00','2020-01-16 02:36:48','2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2022-01-19',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2021-07-18','2023-01-21 00:00:00','2020-01-21 10:23:17','2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2021-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2021-07-18','2022-01-21 00:00:00','2020-01-21 10:23:28','2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2021-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2021-07-18','2022-01-21 00:00:00','2020-01-21 10:23:49','2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2021-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2022-07-10',NULL,NULL,'2022-12-11 21:23:22',1,10.00000000,NULL,NULL,0,NULL,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2022-07-18',NULL,NULL,'2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,NULL,1,NULL,NULL,1,0,'2022-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2022-08-01',NULL,NULL,'2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,6,'2022-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2022-08-06',NULL,NULL,'2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,4,'2022-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2022-08-08',NULL,NULL,'2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2022-08-08',NULL,NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2022-12-08','2022-12-08 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2022-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2022-12-08','2022-12-08 00:00:00',NULL,'2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2022-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2022-12-09','2022-02-12 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2022-12-11','2022-03-24 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2022-12-11','2022-03-03 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,'abandon',NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2022-12-11','2021-12-12 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-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,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2022-01-19','2021-08-29 00:00:00','2020-01-02 20:49:34','2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,'other',NULL,'test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,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',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2022-01-19','2021-10-04 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2022-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2022-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2022-07-18','2022-03-06 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2022-07-10','2022-03-20 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2022-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,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2022-03-22','2021-03-02 00:00:00',NULL,'2022-07-04 01:11:35',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,3,'2022-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2022-03-03','2021-03-03 00:00:00',NULL,'2022-07-04 01:11:35',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2022-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2022-02-12',NULL,NULL,'2022-07-04 01:11:35',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2022-08-31',NULL,NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2022-09-26','2022-09-26 00:00:00',NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2022-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2022-11-28',NULL,NULL,'2022-12-11 21:23:22',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2022-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2022-01-16','2022-01-16 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2022-01-16','2022-01-16 00:00:00','2020-01-16 02:36:48','2022-02-07 13:37:54',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2022-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2022-01-16',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2022-01-19',NULL,NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2022-01-19','2022-01-19 00:00:00',NULL,'2022-02-07 13:37:54',0,0.00000000,NULL,NULL,0,NULL,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2022-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2022-07-18','2023-01-21 00:00:00','2020-01-21 10:23:17','2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2022-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2022-07-18','2022-01-21 00:00:00','2020-01-21 10:23:28','2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2022-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2022-07-18','2022-01-21 00:00:00','2020-01-21 10:23:49','2022-12-11 21:23:22',1,0.00000000,NULL,NULL,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2022-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -6848,7 +6928,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -6872,21 +6952,22 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref_supplier` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(255) NOT NULL, + `ref_supplier` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `close_note` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `close_code` varchar(16) DEFAULT NULL, + `close_missing_amount` double(24,8) DEFAULT NULL, + `close_note` varchar(128) DEFAULT NULL, `tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, @@ -6904,21 +6985,21 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, `fk_transport_mode` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `date_valid` date DEFAULT NULL, `date_closing` datetime DEFAULT NULL, @@ -6944,7 +7025,7 @@ CREATE TABLE `llx_facture_fourn` ( LOCK TABLES `llx_facture_fourn` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2019-10-04 08:31:30','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2019-10-04',NULL,NULL),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',NULL,0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL,NULL,NULL),(21,'SI1911-0005','NL-123',1,NULL,0,10,'2019-11-28 15:54:30','2019-11-28','2019-11-28 11:54:46','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,450.00000000,0.00000000,450.00000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2019-11-28','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,450.00000000,0.00000000,450.00000000,NULL,NULL,'2019-11-28',NULL,NULL),(22,'SI2001-0006','INV20200101',1,NULL,0,17,'2020-01-01 17:48:01','2020-01-01','2020-01-16 17:05:43','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,357.00000000,43.75000000,400.75000000,1,12,NULL,12,NULL,NULL,NULL,1,1,2,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,357.00000000,43.75000000,400.75000000,NULL,NULL,'2020-01-16',NULL,NULL),(27,'SA2001-0001','CN01',1,NULL,2,17,'2020-01-01 20:21:51','2020-01-01','2022-02-07 13:38:10','',1,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-350.00000000,-43.75000000,-393.75000000,2,12,12,12,NULL,22,NULL,NULL,1,NULL,NULL,'','ddd',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,-350.00000000,-43.75000000,-393.75000000,NULL,NULL,'2020-01-01',NULL,NULL),(28,'SI2001-0007','INV02',1,NULL,0,17,'2020-01-01 20:22:48','2020-01-01','2020-01-01 18:06:02','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,79.17000000,9.89000000,89.06000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,79.17000000,9.89000000,89.06000000,NULL,NULL,'2020-01-01',NULL,NULL),(30,'SA2001-0002','555',1,NULL,2,1,'2020-01-01 20:51:32','2020-01-01','2020-01-01 17:15:57','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-26.00000000,-5.10000000,-31.10000000,1,12,NULL,12,NULL,17,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2020-01-01',NULL,NULL); +INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2019-10-04 08:31:30','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2019-10-04',NULL,NULL),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',NULL,0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL,NULL,NULL),(21,'SI1911-0005','NL-123',1,NULL,0,10,'2019-11-28 15:54:30','2019-11-28','2019-11-28 11:54:46','',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,450.00000000,0.00000000,450.00000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2019-11-28','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,450.00000000,0.00000000,450.00000000,NULL,NULL,'2019-11-28',NULL,NULL),(22,'SI2001-0006','INV20200101',1,NULL,0,17,'2020-01-01 17:48:01','2020-01-01','2020-01-16 17:05:43','',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,357.00000000,43.75000000,400.75000000,1,12,NULL,12,NULL,NULL,NULL,1,1,2,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,357.00000000,43.75000000,400.75000000,NULL,NULL,'2020-01-16',NULL,NULL),(27,'SA2001-0001','CN01',1,NULL,2,17,'2020-01-01 20:21:51','2020-01-01','2022-02-07 13:38:10','',1,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,-350.00000000,-43.75000000,-393.75000000,2,12,12,12,NULL,22,NULL,NULL,1,NULL,NULL,'','ddd',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,-350.00000000,-43.75000000,-393.75000000,NULL,NULL,'2020-01-01',NULL,NULL),(28,'SI2001-0007','INV02',1,NULL,0,17,'2020-01-01 20:22:48','2020-01-01','2020-01-01 18:06:02','',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,79.17000000,9.89000000,89.06000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,79.17000000,9.89000000,89.06000000,NULL,NULL,'2020-01-01',NULL,NULL),(30,'SA2001-0002','555',1,NULL,2,1,'2020-01-01 20:51:32','2020-01-01','2020-01-01 17:15:57','',0,0.00000000,0.00000000,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,-26.00000000,-5.10000000,-31.10000000,1,12,NULL,12,NULL,17,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2020-01-01',NULL,NULL); /*!40000 ALTER TABLE `llx_facture_fourn` ENABLE KEYS */; UNLOCK TABLES; @@ -6960,20 +7041,20 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `pu_ht` double(24,8) DEFAULT NULL, `pu_ttc` double(24,8) DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) 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, @@ -6983,13 +7064,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) 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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -7026,7 +7107,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_det_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7053,20 +7134,20 @@ CREATE TABLE `llx_facture_fourn_det_rec` ( `fk_facture_fourn` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `ref` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `pu_ht` double(24,8) DEFAULT NULL, `pu_ttc` double(24,8) DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `tva_tx` double(7,4) DEFAULT NULL, `localtax1_tx` double(7,4) DEFAULT 0.0000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax1_type` varchar(10) DEFAULT NULL, `localtax2_tx` double(7,4) DEFAULT 0.0000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(10) DEFAULT NULL, `total_ht` double(24,8) DEFAULT NULL, `total_tva` double(24,8) DEFAULT NULL, `total_localtax1` double(24,8) DEFAULT 0.00000000, @@ -7079,11 +7160,11 @@ CREATE TABLE `llx_facture_fourn_det_rec` ( `special_code` int(10) unsigned DEFAULT 0, `rang` int(11) DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -7114,7 +7195,7 @@ CREATE TABLE `llx_facture_fourn_det_rec_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `llx_facture_fourn_det_rec_extrafields` (`fk_object`), KEY `idx_facture_fourn_det_rec_extrafields` (`fk_object`) @@ -7141,7 +7222,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7165,17 +7246,17 @@ DROP TABLE IF EXISTS `llx_facture_fourn_rec`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_fourn_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `titre` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref_supplier` varchar(180) COLLATE utf8mb3_unicode_ci NOT NULL, + `titre` varchar(200) NOT NULL, + `ref_supplier` varchar(180) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `suspended` int(11) DEFAULT 0, - `libelle` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(255) DEFAULT NULL, `amount` double(24,8) NOT NULL DEFAULT 0.00000000, `remise` double DEFAULT 0, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, `total_ht` double(24,8) DEFAULT 0.00000000, @@ -7188,18 +7269,18 @@ CREATE TABLE `llx_facture_fourn_rec` ( `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `date_lim_reglement` date DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `modelpdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `modelpdf` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, `usenewprice` int(11) DEFAULT 0, `frequency` int(11) DEFAULT NULL, - `unit_frequency` varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT 'm', + `unit_frequency` varchar(2) DEFAULT 'm', `date_when` datetime DEFAULT NULL, `date_last_gen` datetime DEFAULT NULL, `nb_gen_done` int(11) DEFAULT NULL, @@ -7239,7 +7320,7 @@ CREATE TABLE `llx_facture_fourn_rec_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_rec_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7263,7 +7344,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(200) COLLATE utf8mb3_unicode_ci NOT NULL, + `titre` varchar(200) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, @@ -7281,11 +7362,11 @@ CREATE TABLE `llx_facture_rec` ( `fk_cond_reglement` int(11) NOT NULL DEFAULT 1, `fk_mode_reglement` int(11) DEFAULT 0, `date_lim_reglement` date DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `modelpdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_gen` varchar(7) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `unit_frequency` varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT 'd', + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `modelpdf` varchar(255) DEFAULT NULL, + `last_gen` varchar(7) DEFAULT NULL, + `unit_frequency` varchar(2) DEFAULT 'd', `date_when` datetime DEFAULT NULL, `date_last_gen` datetime DEFAULT NULL, `nb_gen_done` int(11) DEFAULT NULL, @@ -7297,14 +7378,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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `suspended` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_facture_rec_uk_titre` (`titre`,`entity`), @@ -7338,7 +7419,7 @@ CREATE TABLE `llx_facture_rec_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_rec_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7365,14 +7446,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -7394,19 +7475,19 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `situation_percent` double DEFAULT 100, `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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_fk_remise_except` (`fk_remise_except`,`fk_facture`), KEY `idx_facturedet_fk_facture` (`fk_facture`), @@ -7439,7 +7520,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facturedet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7467,14 +7548,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -7490,9 +7571,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -7530,7 +7611,7 @@ CREATE TABLE `llx_facturedet_rec_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facturedet_rec_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7557,7 +7638,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, @@ -7571,15 +7652,15 @@ CREATE TABLE `llx_fichinter` ( `dateo` date DEFAULT NULL, `datee` date DEFAULT NULL, `datet` date DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_client` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_fichinter_ref` (`ref`,`entity`), KEY `idx_fichinter_fk_soc` (`fk_soc`), @@ -7608,7 +7689,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ficheinter_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7632,7 +7713,7 @@ DROP TABLE IF EXISTS `llx_fichinter_rec`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_fichinter_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `titre` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL, + `titre` varchar(50) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, @@ -7640,12 +7721,12 @@ CREATE TABLE `llx_fichinter_rec` ( `fk_user_author` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `duree` double DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `modelpdf` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, + `modelpdf` varchar(50) DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `frequency` int(11) DEFAULT NULL, - `unit_frequency` varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT 'm', + `unit_frequency` varchar(2) DEFAULT 'm', `date_when` datetime DEFAULT NULL, `date_last_gen` datetime DEFAULT NULL, `nb_gen_done` int(11) DEFAULT NULL, @@ -7682,7 +7763,7 @@ CREATE TABLE `llx_fichinterdet` ( `fk_fichinter` int(11) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `date` datetime DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `duree` int(11) DEFAULT NULL, `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), @@ -7712,7 +7793,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ficheinterdet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7738,22 +7819,21 @@ CREATE TABLE `llx_fichinterdet_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_fichinter` int(11) NOT NULL, `date` datetime DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `duree` int(11) DEFAULT NULL, `rang` int(11) DEFAULT 0, `total_ht` double(24,8) DEFAULT NULL, `subprice` double(24,8) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax1_type` varchar(1) DEFAULT NULL, `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(1) DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, - `remise` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, `price` double(24,8) DEFAULT NULL, `total_tva` double(24,8) DEFAULT NULL, @@ -7767,10 +7847,9 @@ CREATE TABLE `llx_fichinterdet_rec` ( `buy_price_ht` double(24,8) DEFAULT 0.00000000, `fk_product_fournisseur_price` int(11) DEFAULT NULL, `fk_code_ventilation` int(11) NOT NULL DEFAULT 0, - `fk_export_commpta` int(11) NOT NULL DEFAULT 0, `special_code` int(10) unsigned DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -7795,7 +7874,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `description` varchar(255) NOT NULL, `date_debut` date NOT NULL, `date_fin` date NOT NULL, `halfday` int(11) DEFAULT 0, @@ -7807,20 +7886,20 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `detail_refuse` varchar(250) DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note` text DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) NOT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `date_approve` datetime DEFAULT NULL, + `date_approval` datetime DEFAULT NULL, `fk_user_approve` int(11) DEFAULT NULL, `nb_open_day` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -7840,7 +7919,7 @@ CREATE TABLE `llx_holiday` ( LOCK TABLES `llx_holiday` WRITE; /*!40000 ALTER TABLE `llx_holiday` DISABLE KEYS */; -INSERT INTO `llx_holiday` VALUES (1,1,'2022-02-17 19:06:35','gdf','2022-02-10','2022-02-11',0,3,1,'2022-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2022-07-04 01:11:35',1,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,12,'2022-01-22 19:10:01','','2021-12-28','2022-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2022-02-07 13:37:54',1,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,13,'2022-01-22 19:10:29','','2022-01-11','2022-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2022-02-07 13:37:54',1,'3',NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_holiday` VALUES (1,1,'2022-02-17 19:06:35','gdf','2022-02-10','2022-02-11',0,3,1,'2022-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2022-12-11 21:23:35',1,'1',NULL,NULL,NULL,NULL,'2022-02-17 19:06:57',1,NULL),(2,12,'2022-01-22 19:10:01','','2021-12-28','2022-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2022-02-07 13:37:54',1,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,13,'2022-01-22 19:10:29','','2022-01-11','2022-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2022-02-07 13:37:54',1,'3',NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_holiday` ENABLE KEYS */; UNLOCK TABLES; @@ -7853,8 +7932,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `value` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `name` varchar(128) DEFAULT NULL, + `value` text DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `name` (`name`), UNIQUE KEY `idx_holiday_config` (`name`) @@ -7867,7 +7946,7 @@ CREATE TABLE `llx_holiday_config` ( LOCK TABLES `llx_holiday_config` WRITE; /*!40000 ALTER TABLE `llx_holiday_config` DISABLE KEYS */; -INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20220207142959'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); +INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20221211212543'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); /*!40000 ALTER TABLE `llx_holiday_config` ENABLE KEYS */; UNLOCK TABLES; @@ -7882,7 +7961,7 @@ CREATE TABLE `llx_holiday_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_holiday_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7909,9 +7988,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `prev_solde` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `new_solde` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `type_action` varchar(255) NOT NULL, + `prev_solde` varchar(255) NOT NULL, + `new_solde` varchar(255) NOT NULL, `fk_type` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -7961,16 +8040,16 @@ DROP TABLE IF EXISTS `llx_hrm_evaluation`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_hrm_evaluation` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '(PROV)', - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) NOT NULL DEFAULT '(PROV)', + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` smallint(6) NOT NULL, `date_eval` date DEFAULT NULL, `fk_user` int(11) NOT NULL, @@ -8004,7 +8083,7 @@ CREATE TABLE `llx_hrm_evaluation_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_evaluation_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8036,7 +8115,7 @@ CREATE TABLE `llx_hrm_evaluationdet` ( `fk_evaluation` int(11) NOT NULL, `rankorder` int(11) NOT NULL, `required_rank` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_hrm_evaluationdet_rowid` (`rowid`), KEY `llx_hrm_evaluationdet_fk_user_creat` (`fk_user_creat`), @@ -8066,7 +8145,7 @@ CREATE TABLE `llx_hrm_evaluationdet_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_evaluationdet_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8090,13 +8169,13 @@ DROP TABLE IF EXISTS `llx_hrm_job`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_hrm_job` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `deplacement` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `deplacement` varchar(255) DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -8125,7 +8204,7 @@ CREATE TABLE `llx_hrm_job_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_job_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8149,7 +8228,7 @@ DROP TABLE IF EXISTS `llx_hrm_job_user`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_hrm_job_user` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_contrat` int(11) DEFAULT NULL, @@ -8157,9 +8236,9 @@ CREATE TABLE `llx_hrm_job_user` ( `fk_job` int(11) NOT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, - `abort_comment` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `abort_comment` varchar(255) DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -8185,8 +8264,8 @@ DROP TABLE IF EXISTS `llx_hrm_skill`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_hrm_skill` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, @@ -8195,8 +8274,8 @@ CREATE TABLE `llx_hrm_skill` ( `date_validite` int(11) NOT NULL, `temps_theorique` double(24,8) NOT NULL, `skill_type` int(11) NOT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_hrm_skill_rowid` (`rowid`), KEY `llx_hrm_skill_fk_user_creat` (`fk_user_creat`), @@ -8225,7 +8304,7 @@ CREATE TABLE `llx_hrm_skill_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_skill_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8249,7 +8328,7 @@ DROP TABLE IF EXISTS `llx_hrm_skilldet`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_hrm_skilldet` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `description` text DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_skill` int(11) NOT NULL, @@ -8286,7 +8365,7 @@ CREATE TABLE `llx_hrm_skillrank` ( `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, - `objecttype` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `objecttype` varchar(128) NOT NULL, PRIMARY KEY (`rowid`), KEY `idx_hrm_skillrank_rowid` (`rowid`), KEY `idx_hrm_skillrank_fk_skill` (`fk_skill`), @@ -8314,9 +8393,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `type` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `field` text COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(50) NOT NULL, + `type` varchar(64) DEFAULT NULL, + `field` text NOT NULL, `entity` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_import_model` (`label`,`type`) @@ -8342,13 +8421,13 @@ DROP TABLE IF EXISTS `llx_intracommreport`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_intracommreport` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) CHARACTER SET utf8mb4 NOT NULL, + `ref` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `type_declaration` varchar(32) CHARACTER SET utf8mb4 DEFAULT NULL, - `periods` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `mode` varchar(32) CHARACTER SET utf8mb4 DEFAULT NULL, - `content_xml` text CHARACTER SET utf8mb4 DEFAULT NULL, - `type_export` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL, + `type_declaration` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `periods` varchar(32) DEFAULT NULL, + `mode` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `content_xml` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `type_export` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) @@ -8373,11 +8452,11 @@ DROP TABLE IF EXISTS `llx_inventory`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_inventory` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(64) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(64) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_warehouse` int(11) DEFAULT NULL, `date_inventory` date DEFAULT NULL, - `title` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, `status` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_validation` datetime DEFAULT NULL, @@ -8385,9 +8464,10 @@ CREATE TABLE `llx_inventory` ( `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `datec` datetime DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, + `categories_product` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_inventory_ref` (`ref`,`entity`), KEY `idx_inventory_rowid` (`rowid`), @@ -8407,7 +8487,7 @@ CREATE TABLE `llx_inventory` ( LOCK TABLES `llx_inventory` WRITE; /*!40000 ALTER TABLE `llx_inventory` DISABLE KEYS */; -INSERT INTO `llx_inventory` VALUES (1,'aaa',1,NULL,NULL,'aa aaa',0,'2020-01-10 01:41:10',NULL,'2020-01-09 21:41:10',12,12,NULL,NULL,NULL,4); +INSERT INTO `llx_inventory` VALUES (1,'aaa',1,NULL,NULL,'aa aaa',0,'2020-01-10 01:41:10',NULL,'2020-01-09 21:41:10',12,12,NULL,NULL,NULL,4,NULL); /*!40000 ALTER TABLE `llx_inventory` ENABLE KEYS */; UNLOCK TABLES; @@ -8422,7 +8502,7 @@ CREATE TABLE `llx_inventory_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_inventory_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8451,7 +8531,7 @@ CREATE TABLE `llx_inventorydet` ( `fk_inventory` int(11) DEFAULT 0, `fk_warehouse` int(11) DEFAULT 0, `fk_product` int(11) DEFAULT 0, - `batch` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(30) DEFAULT NULL, `qty_view` double DEFAULT NULL, `qty_stock` double DEFAULT NULL, `qty_regulated` double DEFAULT NULL, @@ -8484,22 +8564,22 @@ DROP TABLE IF EXISTS `llx_knowledgemanagement_knowledgerecord`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_knowledgemanagement_knowledgerecord` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `question` text COLLATE utf8mb3_unicode_ci NOT NULL, - `answer` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `question` text NOT NULL, + `answer` text DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, `fk_ticket` int(11) DEFAULT NULL, `fk_c_ticket_category` int(11) DEFAULT NULL, `status` int(11) NOT NULL, - `lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(6) DEFAULT NULL, `entity` int(11) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8526,7 +8606,7 @@ CREATE TABLE `llx_knowledgemanagement_knowledgerecord_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -8551,9 +8631,9 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `objecttype` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `url` varchar(255) NOT NULL, + `label` varchar(255) NOT NULL, + `objecttype` varchar(255) NOT NULL, `objectid` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_links` (`objectid`,`label`) @@ -8582,21 +8662,21 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `label` varchar(80) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `capital_position` double(24,8) DEFAULT NULL, `date_position` date DEFAULT NULL, `paid` smallint(6) NOT NULL DEFAULT 0, - `accountancy_account_capital` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_account_insurance` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_account_interest` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_account_capital` varchar(32) DEFAULT NULL, + `accountancy_account_insurance` varchar(32) DEFAULT NULL, + `accountancy_account_interest` varchar(32) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, @@ -8633,9 +8713,9 @@ CREATE TABLE `llx_loan_schedule` ( `amount_insurance` double(24,8) DEFAULT NULL, `amount_interest` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -8668,8 +8748,8 @@ CREATE TABLE `llx_localtax` ( `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `amount` double NOT NULL DEFAULT 0, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -8696,18 +8776,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `titre` varchar(128) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `sujet` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `body` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bgcolor` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bgimage` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cible` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `sujet` varchar(128) DEFAULT NULL, + `body` mediumtext DEFAULT NULL, + `bgcolor` varchar(8) DEFAULT NULL, + `bgimage` varchar(255) DEFAULT NULL, + `cible` varchar(60) DEFAULT NULL, `nbemail` int(11) DEFAULT NULL, - `email_from` varchar(160) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_replyto` varchar(160) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_errorsto` varchar(160) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `tag` varchar(128) COLLATE utf8mb3_unicode_ci 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, `date_creat` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_appro` datetime DEFAULT NULL, @@ -8715,11 +8795,11 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `joined_file2` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `joined_file3` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `joined_file4` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci 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, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing` (`titre`,`entity`) @@ -8745,15 +8825,15 @@ DROP TABLE IF EXISTS `llx_mailing_advtarget`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_mailing_advtarget` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL, + `name` varchar(200) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `filtervalue` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `filtervalue` text DEFAULT NULL, `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(), `fk_element` int(11) NOT NULL, - `type_element` varchar(180) COLLATE utf8mb3_unicode_ci NOT NULL, + `type_element` varchar(180) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_advtargetemailing_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8779,17 +8859,17 @@ 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(160) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `firstname` varchar(160) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(160) COLLATE utf8mb3_unicode_ci NOT NULL, - `other` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `tag` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lastname` varchar(160) DEFAULT NULL, + `firstname` varchar(160) DEFAULT NULL, + `email` varchar(160) NOT NULL, + `other` varchar(255) DEFAULT NULL, + `tag` varchar(64) DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT 0, - `source_url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `source_url` varchar(255) DEFAULT NULL, `source_id` int(11) DEFAULT NULL, - `source_type` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `source_type` varchar(32) DEFAULT NULL, `date_envoi` datetime DEFAULT NULL, - `error_text` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `error_text` varchar(255) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing_cibles` (`fk_mailing`,`email`), @@ -8818,9 +8898,9 @@ DROP TABLE IF EXISTS `llx_mailing_unsubscribe`; CREATE TABLE `llx_mailing_unsubscribe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `unsubscribegroup` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT '', - `ip` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `unsubscribegroup` varchar(128) DEFAULT '', + `ip` varchar(128) DEFAULT NULL, `date_creat` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), @@ -8846,30 +8926,30 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `menu_handler` varchar(16) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `module` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type` varchar(4) COLLATE utf8mb3_unicode_ci NOT NULL, - `mainmenu` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL, + `module` varchar(255) DEFAULT NULL, + `type` varchar(4) NOT NULL, + `mainmenu` varchar(100) NOT NULL, `fk_menu` int(11) NOT NULL, - `fk_leftmenu` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fk_mainmenu` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_leftmenu` varchar(100) DEFAULT NULL, + `fk_mainmenu` varchar(100) DEFAULT NULL, `position` int(11) NOT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `target` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `titre` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `prefix` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `langs` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url` varchar(255) NOT NULL, + `target` varchar(100) DEFAULT NULL, + `titre` varchar(255) NOT NULL, + `prefix` varchar(255) DEFAULT NULL, + `langs` varchar(100) DEFAULT NULL, `level` smallint(6) DEFAULT NULL, - `leftmenu` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `perms` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `enabled` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `leftmenu` varchar(100) DEFAULT NULL, + `perms` text DEFAULT NULL, + `enabled` text DEFAULT NULL, `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=167331 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=167380 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8878,7 +8958,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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys',NULL,'opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey',NULL,'opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey',NULL,'opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List',NULL,'opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home',NULL,'',-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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','PropalsDraft',NULL,'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&search_status=1','','PropalsOpened',NULL,'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&search_status=2','','PropalStatusSigned',NULL,'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&search_status=3','','PropalStatusNotSigned',NULL,'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&search_status=4','','PropalStatusBilled',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','StatusOrderDraftShort',NULL,'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&search_status=1','','StatusOrderValidated',NULL,'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&search_status=2','','StatusOrderOnProcessShort',NULL,'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&search_status=3','','StatusOrderToBill',NULL,'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&search_status=4','','StatusOrderProcessed',NULL,'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&search_status=-1','','StatusOrderCanceledShort',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=3','','MenuOrdersToBill',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'',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',NULL,'',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',NULL,'',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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','List',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(167182,'all',1,'knowledgemanagement','left','ticket',-1,NULL,'ticket',101,'/knowledgemanagement/knowledgerecord_list.php','','MenuKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_knowledgerecord','$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167183,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',111,'/knowledgemanagement/knowledgerecord_list.php','','ListKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_list','$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167184,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',110,'/knowledgemanagement/knowledgerecord_card.php?action=create','','NewKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_new','$user->rights->knowledgemanagement->knowledgerecord->write','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167185,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',112,'/categories/index.php?type=13','','Categories','','knowledgemanagement',NULL,NULL,'$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',0,'2022-02-07 13:39:27'),(167283,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read || $user->rights->resource->read','$conf->agenda->enabled || $conf->resource->enabled',2,'2022-07-05 08:07:11'),(167284,'all',1,'agenda','left','agenda',167283,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167285,'all',1,'agenda','left','agenda',167284,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,'2022-07-05 08:07:11'),(167286,'all',1,'agenda','left','agenda',167284,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167287,'all',1,'agenda','left','agenda',167286,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167288,'all',1,'agenda','left','agenda',167286,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167289,'all',1,'agenda','left','agenda',167286,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-07-05 08:07:11'),(167290,'all',1,'agenda','left','agenda',167286,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-07-05 08:07:11'),(167291,'all',1,'agenda','left','agenda',167284,NULL,NULL,110,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda','','List','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167292,'all',1,'agenda','left','agenda',167291,NULL,NULL,111,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167293,'all',1,'agenda','left','agenda',167291,NULL,NULL,112,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-07-05 08:07:11'),(167294,'all',1,'agenda','left','agenda',167291,NULL,NULL,113,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-07-05 08:07:11'),(167295,'all',1,'agenda','left','agenda',167291,NULL,NULL,114,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-07-05 08:07:11'),(167296,'all',1,'agenda','left','agenda',167284,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,'2022-07-05 08:07:11'),(167297,'all',1,'agenda','left','agenda',167284,NULL,NULL,170,'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10','','Categories','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->categorie->enabled',2,'2022-07-05 08:07:11'),(167298,'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',0,'2022-07-05 08:07:11'),(167299,'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|all)/\',$leftmenu)',0,'2022-07-05 08:07:11'),(167300,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2022-07-05 08:07:11'),(167301,'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,'2022-07-05 08:07:11'),(167302,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2022-07-05 08:07:11'),(167303,'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,'2022-07-05 08:07:11'),(167304,'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,'2022-07-05 08:07:11'),(167305,'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,'2022-07-05 08:07:11'),(167306,'all',1,'margins','left','billing',-1,NULL,'billing',100,'/margin/index.php','','Margins','','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2022-07-05 08:07:11'),(167307,'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,'2022-07-05 08:07:12'),(167308,'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,'2022-07-05 08:07:12'),(167309,'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,'2022-07-05 08:07:12'),(167310,'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 && preg_match(\'/^(admintools|all)/\', $leftmenu)',0,'2022-07-05 08:07:12'),(167311,'all',1,'recruitment','left','hrm',-1,NULL,'hrm',1001,'/recruitment/recruitmentindex.php','','Recruitment','','recruitment',NULL,'recruitmentjobposition','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-07-05 08:07:12'),(167312,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1002,'/recruitment/recruitmentjobposition_card.php?action=create','','NewPositionToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2022-07-05 08:07:12'),(167313,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1003,'/recruitment/recruitmentjobposition_list.php','','ListOfPositionsToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-07-05 08:07:12'),(167314,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1004,'/recruitment/recruitmentcandidature_card.php?action=create','','NewCandidature','','recruitment',NULL,'recruitment_recruitmentcandidature_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2022-07-05 08:07:12'),(167315,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1005,'/recruitment/recruitmentcandidature_list.php','','ListOfCandidatures','','recruitment',NULL,'recruitment_recruitmentcandidature_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-07-05 08:07:12'),(167316,'all',1,'resource','left','agenda',-1,NULL,'agenda',100,'/resource/list.php','','MenuResourceIndex','','resource',NULL,'resource','$user->rights->resource->read','1',0,'2022-07-05 08:07:12'),(167317,'all',1,'resource','left','agenda',-1,'resource','agenda',101,'/resource/card.php?action=create','','MenuResourceAdd','','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2022-07-05 08:07:12'),(167318,'all',1,'resource','left','agenda',-1,'resource','agenda',102,'/resource/list.php','','List','','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2022-07-05 08:07:12'),(167319,'all',1,'stripe','left','bank',-1,NULL,'bank',100,'','','StripeAccount','','stripe',NULL,'stripe','$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-07-05 08:07:12'),(167320,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/charge.php','','StripeChargeList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-07-05 08:07:12'),(167321,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/transaction.php','','StripeTransactionList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-07-05 08:07:12'),(167322,'all',1,'stripe','left','bank',-1,'stripe','bank',103,'/stripe/payout.php','','StripePayoutList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-07-05 08:07:12'),(167323,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2022-07-05 08:07:12'),(167324,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2022-07-05 08:07:12'),(167325,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2022-07-05 08:07:12'),(167326,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2022-07-05 08:07:12'),(167327,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2022-07-05 08:07:12'),(167328,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/categories/index.php?type=12','','Categories','','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->categorie->enabled',0,'2022-07-05 08:07:12'),(167329,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/index.php','takepos','PointOfSaleShort','','cashdesk',NULL,NULL,'$user->rights->takepos->run','$conf->takepos->enabled',2,'2022-07-05 08:07:12'),(167330,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2022-07-05 08:07:13'); +INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-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',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys',NULL,'opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey',NULL,'opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey',NULL,'opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List',NULL,'opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home',NULL,'',-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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','PropalsDraft',NULL,'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&search_status=1','','PropalsOpened',NULL,'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&search_status=2','','PropalStatusSigned',NULL,'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&search_status=3','','PropalStatusNotSigned',NULL,'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&search_status=4','','PropalStatusBilled',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','StatusOrderDraftShort',NULL,'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&search_status=1','','StatusOrderValidated',NULL,'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&search_status=2','','StatusOrderOnProcessShort',NULL,'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&search_status=3','','StatusOrderToBill',NULL,'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&search_status=4','','StatusOrderProcessed',NULL,'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&search_status=-1','','StatusOrderCanceledShort',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=3','','MenuOrdersToBill',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'',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',NULL,'',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',NULL,'',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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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&search_status=0','','List',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'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',NULL,'trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(167182,'all',1,'knowledgemanagement','left','ticket',-1,NULL,'ticket',101,'/knowledgemanagement/knowledgerecord_list.php','','MenuKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_knowledgerecord','$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167183,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',111,'/knowledgemanagement/knowledgerecord_list.php','','ListKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_list','$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167184,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',110,'/knowledgemanagement/knowledgerecord_card.php?action=create','','NewKnowledgeRecord','','knowledgemanagement',NULL,'knowledgemanagement_new','$user->rights->knowledgemanagement->knowledgerecord->write','$conf->knowledgemanagement->enabled',2,'2022-02-07 13:39:27'),(167185,'all',1,'knowledgemanagement','left','ticket',-1,'knowledgemanagement_knowledgerecord','ticket',112,'/categories/index.php?type=13','','Categories','','knowledgemanagement',NULL,NULL,'$user->rights->knowledgemanagement->knowledgerecord->read','$conf->knowledgemanagement->enabled',0,'2022-02-07 13:39:27'),(167331,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read || $user->rights->resource->read','$conf->agenda->enabled || $conf->resource->enabled',2,'2022-12-11 21:23:42'),(167332,'all',1,'agenda','left','agenda',167331,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167333,'all',1,'agenda','left','agenda',167332,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,'2022-12-11 21:23:42'),(167334,'all',1,'agenda','left','agenda',167332,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167335,'all',1,'agenda','left','agenda',167334,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167336,'all',1,'agenda','left','agenda',167334,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167337,'all',1,'agenda','left','agenda',167334,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-12-11 21:23:42'),(167338,'all',1,'agenda','left','agenda',167334,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-12-11 21:23:42'),(167339,'all',1,'agenda','left','agenda',167332,NULL,NULL,110,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda','','List','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167340,'all',1,'agenda','left','agenda',167339,NULL,NULL,111,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167341,'all',1,'agenda','left','agenda',167339,NULL,NULL,112,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2022-12-11 21:23:42'),(167342,'all',1,'agenda','left','agenda',167339,NULL,NULL,113,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-12-11 21:23:42'),(167343,'all',1,'agenda','left','agenda',167339,NULL,NULL,114,'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2022-12-11 21:23:42'),(167344,'all',1,'agenda','left','agenda',167332,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,'2022-12-11 21:23:42'),(167345,'all',1,'agenda','left','agenda',167332,NULL,NULL,170,'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10','','Categories','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->categorie->enabled',2,'2022-12-11 21:23:42'),(167346,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','','products',NULL,'barcodeprint','$user->hasRight(\"barcode\", \"read\")','isModEnabled(\"barcode\")',0,'2022-12-11 21:23:42'),(167347,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','','products',NULL,NULL,'$user->admin','isModEnabled(\"barcode\") && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2022-12-11 21:23:42'),(167348,'all',1,'cron','left','home',-1,'admintools','home',500,'/cron/list.php?leftmenu=admintools','','CronList','','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2022-12-11 21:23:42'),(167349,'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,'2022-12-11 21:23:42'),(167350,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2022-12-11 21:23:42'),(167351,'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,'2022-12-11 21:23:42'),(167352,'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,'2022-12-11 21:23:42'),(167353,'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) && getDolGlobalInt(\"ECM_AUTO_TREE_ENABLED\")',2,'2022-12-11 21:23:42'),(167354,'all',1,'ecm','left','ecm',-1,'ecm','ecm',104,'/ecm/index_medias.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsMedias','','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && getDolGlobalInt(\"MAIN_FEATURES_LEVEL\") == 2',2,'2022-12-11 21:23:42'),(167355,'all',1,'margins','left','billing',-1,NULL,'billing',100,'/margin/index.php','','Margins','','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2022-12-11 21:23:43'),(167356,'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,'2022-12-11 21:23:43'),(167357,'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,'2022-12-11 21:23:43'),(167358,'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,'2022-12-11 21:23:43'),(167359,'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 && preg_match(\'/^(admintools|all)/\', $leftmenu)',0,'2022-12-11 21:23:43'),(167360,'all',1,'recruitment','left','hrm',-1,NULL,'hrm',1001,'/recruitment/index.php','','Recruitment','','recruitment',NULL,'recruitmentjobposition','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-12-11 21:23:43'),(167361,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1002,'/recruitment/recruitmentjobposition_card.php?action=create','','NewPositionToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2022-12-11 21:23:43'),(167362,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1003,'/recruitment/recruitmentjobposition_list.php','','ListOfPositionsToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-12-11 21:23:43'),(167363,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1004,'/recruitment/recruitmentcandidature_card.php?action=create','','NewCandidature','','recruitment',NULL,'recruitment_recruitmentcandidature_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2022-12-11 21:23:43'),(167364,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1005,'/recruitment/recruitmentcandidature_list.php','','ListOfCandidatures','','recruitment',NULL,'recruitment_recruitmentcandidature_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2022-12-11 21:23:43'),(167365,'all',1,'resource','left','agenda',-1,NULL,'agenda',100,'/resource/list.php','','MenuResourceIndex','','resource',NULL,'resource','$user->rights->resource->read','1',0,'2022-12-11 21:23:43'),(167366,'all',1,'resource','left','agenda',-1,'resource','agenda',101,'/resource/card.php?action=create','','MenuResourceAdd','','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2022-12-11 21:23:43'),(167367,'all',1,'resource','left','agenda',-1,'resource','agenda',102,'/resource/list.php','','List','','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2022-12-11 21:23:43'),(167368,'all',1,'stripe','left','bank',-1,NULL,'bank',100,'','','StripeAccount','','stripe',NULL,'stripe','$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-12-11 21:23:43'),(167369,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/charge.php','','StripeChargeList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-12-11 21:23:43'),(167370,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/transaction.php','','StripeTransactionList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-12-11 21:23:43'),(167371,'all',1,'stripe','left','bank',-1,'stripe','bank',103,'/stripe/payout.php','','StripePayoutList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2022-12-11 21:23:43'),(167372,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2022-12-11 21:23:44'),(167373,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2022-12-11 21:23:44'),(167374,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2022-12-11 21:23:44'),(167375,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2022-12-11 21:23:44'),(167376,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2022-12-11 21:23:44'),(167377,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/categories/index.php?type=12','','Categories','','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->categorie->enabled',0,'2022-12-11 21:23:44'),(167378,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/index.php','takepos','PointOfSaleShort','','cashdesk',NULL,NULL,'$user->rights->takepos->run','$conf->takepos->enabled',2,'2022-12-11 21:23:44'),(167379,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2022-12-11 21:23:44'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; @@ -8891,20 +8971,20 @@ DROP TABLE IF EXISTS `llx_mrp_mo`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_mrp_mo` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '(PROV)', + `ref` varchar(128) NOT NULL DEFAULT '(PROV)', `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `qty` double NOT NULL, `fk_warehouse` int(11) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `status` int(11) NOT NULL, `fk_product` int(11) NOT NULL, `date_start_planned` datetime DEFAULT NULL, @@ -8913,7 +8993,7 @@ CREATE TABLE `llx_mrp_mo` ( `fk_project` int(11) DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `mrptype` int(11) DEFAULT 0, `fk_parent_line` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -8952,7 +9032,7 @@ CREATE TABLE `llx_mrp_mo_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_mrp_mo_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -8978,20 +9058,20 @@ CREATE TABLE `llx_mrp_production` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_mo` int(11) NOT NULL, `origin_id` int(11) DEFAULT NULL, - `origin_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `origin_type` varchar(10) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, `fk_product` int(11) NOT NULL, `fk_warehouse` int(11) DEFAULT NULL, `qty` double NOT NULL DEFAULT 1, - `batch` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `role` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, + `role` varchar(10) DEFAULT NULL, `fk_mrp_production` int(11) DEFAULT NULL, `fk_stock_movement` int(11) DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `qty_frozen` smallint(6) DEFAULT 0, `disable_stock_change` smallint(6) DEFAULT 0, PRIMARY KEY (`rowid`), @@ -9024,8 +9104,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `name` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `code` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, `entity` int(11) DEFAULT 1, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -9084,11 +9164,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `objet_type` varchar(24) NOT NULL, `objet_id` int(11) NOT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT 'email', - `type_target` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `type` varchar(16) DEFAULT 'email', + `type_target` varchar(16) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9117,7 +9197,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT 'email', + `type` varchar(16) DEFAULT 'email', PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9141,12 +9221,12 @@ DROP TABLE IF EXISTS `llx_notify_def_object`; CREATE TABLE `llx_notify_def_object` ( `id` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `objet_type` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `objet_type` varchar(16) DEFAULT NULL, `objet_id` int(11) NOT NULL, - `type_notif` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT 'browser', + `type_notif` varchar(16) DEFAULT 'browser', `date_notif` datetime DEFAULT NULL, `user_id` int(11) DEFAULT NULL, - `moreparam` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `moreparam` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9169,8 +9249,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `state` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `service` varchar(36) DEFAULT NULL, + `state` varchar(128) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, @@ -9196,14 +9276,15 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `token` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `service` varchar(36) DEFAULT NULL, + `token` text DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, - `tokenstring` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `restricted_ips` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `tokenstring` text DEFAULT NULL, + `state` text DEFAULT NULL, + `restricted_ips` varchar(200) DEFAULT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) @@ -9229,11 +9310,11 @@ DROP TABLE IF EXISTS `llx_object_lang`; CREATE TABLE `llx_object_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_object` int(11) NOT NULL DEFAULT 0, - `type_object` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `property` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, - `lang` varchar(5) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `value` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type_object` varchar(32) NOT NULL, + `property` varchar(32) NOT NULL, + `lang` varchar(5) NOT NULL DEFAULT '0', + `value` text DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_object_lang` (`fk_object`,`type_object`,`property`,`lang`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -9258,13 +9339,13 @@ DROP TABLE IF EXISTS `llx_onlinesignature`; CREATE TABLE `llx_onlinesignature` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `object_type` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `object_type` varchar(32) NOT NULL, `object_id` int(11) NOT NULL, `datec` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `ip` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pathoffile` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `name` varchar(255) NOT NULL, + `ip` varchar(128) DEFAULT NULL, + `pathoffile` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9287,9 +9368,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `comment` text COLLATE utf8mb3_unicode_ci NOT NULL, - `usercomment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `id_sondage` char(16) NOT NULL, + `comment` text NOT NULL, + `usercomment` text DEFAULT NULL, + `ip` varchar(250) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, PRIMARY KEY (`id_comment`), KEY `idx_id_comment` (`id_comment`), KEY `idx_id_sondage` (`id_sondage`) @@ -9302,7 +9385,7 @@ CREATE TABLE `llx_opensurvey_comments` ( LOCK TABLES `llx_opensurvey_comments` WRITE; /*!40000 ALTER TABLE `llx_opensurvey_comments` DISABLE KEYS */; -INSERT INTO `llx_opensurvey_comments` VALUES (2,'434dio8rxfljs3p1','aaa','aaa'),(5,'434dio8rxfljs3p1','aaa','aaa'),(6,'434dio8rxfljs3p1','gfh','jj'),(11,'434dio8rxfljs3p1','fsdf','fdsf'),(12,'3imby4hf7joiilsu','fsdf','aa'),(16,'3imby4hf7joiilsu','gdfg','gfdg'),(17,'3imby4hf7joiilsu','gfdgd','gdfgd'),(18,'om4e7azfiurnjtqe','fds','fdsf'),(26,'qgsfrgb922rqzocy','gfdg','gfdg'),(27,'qgsfrgb922rqzocy','gfdg','gfd'),(30,'ckanvbe7kt3rdb3h','hfgh','fdfds'); +INSERT INTO `llx_opensurvey_comments` VALUES (2,'434dio8rxfljs3p1','aaa','aaa',NULL,NULL),(5,'434dio8rxfljs3p1','aaa','aaa',NULL,NULL),(6,'434dio8rxfljs3p1','gfh','jj',NULL,NULL),(11,'434dio8rxfljs3p1','fsdf','fdsf',NULL,NULL),(12,'3imby4hf7joiilsu','fsdf','aa',NULL,NULL),(16,'3imby4hf7joiilsu','gdfg','gfdg',NULL,NULL),(17,'3imby4hf7joiilsu','gfdgd','gdfgd',NULL,NULL),(18,'om4e7azfiurnjtqe','fds','fdsf',NULL,NULL),(26,'qgsfrgb922rqzocy','gfdg','gfdg',NULL,NULL),(27,'qgsfrgb922rqzocy','gfdg','gfd',NULL,NULL),(30,'ckanvbe7kt3rdb3h','hfgh','fdfds',NULL,NULL); /*!40000 ALTER TABLE `llx_opensurvey_comments` ENABLE KEYS */; UNLOCK TABLES; @@ -9315,9 +9398,9 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `question` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `available_answers` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `id_sondage` varchar(16) DEFAULT NULL, + `question` text DEFAULT NULL, + `available_answers` text DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9339,21 +9422,21 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `commentaires` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `mail_admin` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `nom_admin` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `id_sondage` varchar(16) NOT NULL, + `commentaires` text DEFAULT NULL, + `mail_admin` varchar(128) DEFAULT NULL, + `nom_admin` varchar(64) DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, - `titre` text COLLATE utf8mb3_unicode_ci NOT NULL, + `titre` text NOT NULL, `date_fin` datetime DEFAULT NULL, `status` int(11) DEFAULT 1, - `format` varchar(2) COLLATE utf8mb3_unicode_ci NOT NULL, + `format` varchar(2) NOT NULL, `mailsonde` tinyint(4) NOT NULL DEFAULT 0, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `sujet` text DEFAULT NULL, PRIMARY KEY (`id_sondage`), KEY `idx_date_fin` (`date_fin`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -9379,7 +9462,7 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL + `reponses` text DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9401,9 +9484,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `id_sondage` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `reponses` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL, + `nom` varchar(64) NOT NULL, + `id_sondage` varchar(16) NOT NULL, + `reponses` varchar(200) NOT NULL, + `ip` varchar(250) DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, PRIMARY KEY (`id_users`), KEY `idx_id_users` (`id_users`), KEY `idx_nom` (`nom`), @@ -9420,7 +9505,7 @@ CREATE TABLE `llx_opensurvey_user_studs` ( LOCK TABLES `llx_opensurvey_user_studs` WRITE; /*!40000 ALTER TABLE `llx_opensurvey_user_studs` DISABLE KEYS */; -INSERT INTO `llx_opensurvey_user_studs` VALUES (1,'gfdgdf','om4e7azfiurnjtqe','01'),(2,'aa','3imby4hf7joiilsu','210'),(3,'fsdf','z2qcqjh5pm1q4p99','0110'),(5,'hfghf','z2qcqjh5pm1q4p99','1110'),(6,'qqqq','ah9xvaqu1ajjrqse','000111'),(7,'hjgh','ah9xvaqu1ajjrqse','000010'),(8,'bcvb','qgsfrgb922rqzocy','011000'),(9,'gdfg','ah9xvaqu1ajjrqse','001000'),(10,'ggg','ah9xvaqu1ajjrqse','000100'),(11,'gfdgd','ah9xvaqu1ajjrqse','001000'),(12,'hhhh','ah9xvaqu1ajjrqse','010000'),(13,'iii','ah9xvaqu1ajjrqse','000100'),(14,'kkk','ah9xvaqu1ajjrqse','001000'),(15,'lllll','ah9xvaqu1ajjrqse','000001'),(16,'kk','ah9xvaqu1ajjrqse','000001'),(17,'gggg','ah9xvaqu1ajjrqse','001000'),(18,'mmmm','ah9xvaqu1ajjrqse','000000'),(19,'jkjkj','ah9xvaqu1ajjrqse','000001'),(20,'azerty','8mcdnf2hgcntfibe','012'),(21,'hfghfg','8mcdnf2hgcntfibe','012'),(22,'fd','ckanvbe7kt3rdb3h','10'),(25,'John Doe','m4467s2mtk6khmxc','1'),(26,'Martial Bill','m4467s2mtk6khmxc','01'),(27,'Marissa Campbell','m4467s2mtk6khmxc','11'),(28,'Leonard Cast','m4467s2mtk6khmxc','01'),(29,'John Doe','tim1dye8x5eeetxu','01'),(30,'Eldy','tim1dye8x5eeetxu','11'); +INSERT INTO `llx_opensurvey_user_studs` VALUES (1,'gfdgdf','om4e7azfiurnjtqe','01',NULL,NULL),(2,'aa','3imby4hf7joiilsu','210',NULL,NULL),(3,'fsdf','z2qcqjh5pm1q4p99','0110',NULL,NULL),(5,'hfghf','z2qcqjh5pm1q4p99','1110',NULL,NULL),(6,'qqqq','ah9xvaqu1ajjrqse','000111',NULL,NULL),(7,'hjgh','ah9xvaqu1ajjrqse','000010',NULL,NULL),(8,'bcvb','qgsfrgb922rqzocy','011000',NULL,NULL),(9,'gdfg','ah9xvaqu1ajjrqse','001000',NULL,NULL),(10,'ggg','ah9xvaqu1ajjrqse','000100',NULL,NULL),(11,'gfdgd','ah9xvaqu1ajjrqse','001000',NULL,NULL),(12,'hhhh','ah9xvaqu1ajjrqse','010000',NULL,NULL),(13,'iii','ah9xvaqu1ajjrqse','000100',NULL,NULL),(14,'kkk','ah9xvaqu1ajjrqse','001000',NULL,NULL),(15,'lllll','ah9xvaqu1ajjrqse','000001',NULL,NULL),(16,'kk','ah9xvaqu1ajjrqse','000001',NULL,NULL),(17,'gggg','ah9xvaqu1ajjrqse','001000',NULL,NULL),(18,'mmmm','ah9xvaqu1ajjrqse','000000',NULL,NULL),(19,'jkjkj','ah9xvaqu1ajjrqse','000001',NULL,NULL),(20,'azerty','8mcdnf2hgcntfibe','012',NULL,NULL),(21,'hfghfg','8mcdnf2hgcntfibe','012',NULL,NULL),(22,'fd','ckanvbe7kt3rdb3h','10',NULL,NULL),(25,'John Doe','m4467s2mtk6khmxc','1',NULL,NULL),(26,'Martial Bill','m4467s2mtk6khmxc','01',NULL,NULL),(27,'Marissa Campbell','m4467s2mtk6khmxc','11',NULL,NULL),(28,'Leonard Cast','m4467s2mtk6khmxc','01',NULL,NULL),(29,'John Doe','tim1dye8x5eeetxu','01',NULL,NULL),(30,'Eldy','tim1dye8x5eeetxu','11',NULL,NULL); /*!40000 ALTER TABLE `llx_opensurvey_user_studs` ENABLE KEYS */; UNLOCK TABLES; @@ -9434,11 +9519,11 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `transkey` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `transvalue` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(5) DEFAULT NULL, + `transkey` varchar(128) DEFAULT NULL, + `transvalue` text DEFAULT NULL, PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_overwrite_trans` (`lang`,`transkey`) + UNIQUE KEY `uk_overwrite_trans` (`entity`,`lang`,`transkey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9462,7 +9547,7 @@ CREATE TABLE `llx_packages_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9485,16 +9570,16 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '', - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) NOT NULL DEFAULT '', + `ref_ext` varchar(255) DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) NOT NULL DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9502,8 +9587,8 @@ CREATE TABLE `llx_paiement` ( `fk_export_compta` int(11) NOT NULL DEFAULT 0, `pos_change` double(24,8) DEFAULT 0.00000000, `multicurrency_amount` double(24,8) DEFAULT 0.00000000, - `ext_payment_id` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ext_payment_site` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ext_payment_id` varchar(255) DEFAULT NULL, + `ext_payment_site` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9514,7 +9599,7 @@ CREATE TABLE `llx_paiement` ( LOCK TABLES `llx_paiement` WRITE; /*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; -INSERT INTO `llx_paiement` VALUES (3,'',NULL,1,'2013-07-18 20:50:47','2021-07-11 17:49:28','2021-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(5,'',NULL,1,'2013-08-01 03:34:11','2022-02-07 13:37:54','2021-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(6,'',NULL,1,'2013-08-06 20:33:54','2022-02-07 13:37:54','2021-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(8,'',NULL,1,'2013-08-08 02:53:40','2022-02-07 13:37:54','2021-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(9,'',NULL,1,'2013-08-08 02:55:58','2022-02-07 13:37:54','2021-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(17,'',NULL,1,'2014-12-09 15:28:44','2022-02-07 13:37:54','2021-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(18,'',NULL,1,'2014-12-09 15:28:53','2022-02-07 13:37:54','2021-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(19,'',NULL,1,'2014-12-09 17:35:55','2022-02-07 13:37:54','2021-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(20,'',NULL,1,'2014-12-09 17:37:02','2022-02-07 13:37:54','2021-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(21,'',NULL,1,'2014-12-09 18:35:07','2022-02-07 13:37:54','2021-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(23,'',NULL,1,'2014-12-12 18:54:33','2022-02-07 13:37:54','2021-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(24,'',NULL,1,'2015-03-06 16:48:16','2022-07-04 01:11:35','2022-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(25,'',NULL,1,'2015-03-20 14:30:11','2022-07-04 01:11:35','2022-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(26,'',NULL,1,'2016-03-02 19:57:58','2021-07-11 17:49:28','2021-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(29,'',NULL,1,'2016-03-02 20:01:39','2022-07-04 01:11:35','2022-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(30,'',NULL,1,'2016-03-02 20:02:06','2022-07-04 01:11:35','2022-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(32,'',NULL,1,'2016-03-03 19:22:32','2022-02-07 13:37:54','2021-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(33,'',NULL,1,'2016-03-03 19:23:16','2022-07-04 01:11:35','2022-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(34,'PAY1603-0001',NULL,1,'2017-02-06 08:10:24','2022-07-04 01:11:35','2022-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,0.00000000,150.00000000,NULL,NULL),(35,'PAY1603-0002',NULL,1,'2017-02-06 08:10:50','2022-07-04 01:11:35','2022-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,0.00000000,140.00000000,NULL,NULL),(36,'PAY1702-0003',NULL,1,'2017-02-21 16:07:43','2022-07-04 01:11:35','2022-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(38,'PAY1803-0004',NULL,1,'2018-03-16 13:59:31','2022-07-04 01:11:35','2022-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,0.00000000,10.00000000,NULL,NULL),(39,'PAY1801-0005',NULL,1,'2019-10-04 10:28:14','2022-02-07 13:37:54','2022-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,0.00000000,5.63000000,NULL,NULL),(40,'PAY2001-0006',NULL,1,'2020-01-16 02:36:48','2022-02-07 13:37:54','2022-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,0.00000000,20.50000000,NULL,NULL),(41,'PAY2001-0007',NULL,1,'2020-01-21 10:23:17','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(42,'PAY2001-0008',NULL,1,'2020-01-21 10:23:28','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(43,'PAY2001-0009',NULL,1,'2020-01-21 10:23:49','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL); +INSERT INTO `llx_paiement` VALUES (3,'',NULL,1,'2013-07-18 20:50:47','2022-12-11 21:23:22','2022-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(5,'',NULL,1,'2013-08-01 03:34:11','2022-12-11 21:23:22','2022-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(6,'',NULL,1,'2013-08-06 20:33:54','2022-12-11 21:23:22','2022-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(8,'',NULL,1,'2013-08-08 02:53:40','2022-12-11 21:23:22','2022-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(9,'',NULL,1,'2013-08-08 02:55:58','2022-12-11 21:23:22','2022-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(17,'',NULL,1,'2014-12-09 15:28:44','2022-12-11 21:23:22','2022-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(18,'',NULL,1,'2014-12-09 15:28:53','2022-12-11 21:23:22','2022-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(19,'',NULL,1,'2014-12-09 17:35:55','2022-12-11 21:23:22','2022-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(20,'',NULL,1,'2014-12-09 17:37:02','2022-12-11 21:23:22','2022-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(21,'',NULL,1,'2014-12-09 18:35:07','2022-12-11 21:23:22','2022-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(23,'',NULL,1,'2014-12-12 18:54:33','2022-02-07 13:37:54','2021-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(24,'',NULL,1,'2015-03-06 16:48:16','2022-07-04 01:11:35','2022-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(25,'',NULL,1,'2015-03-20 14:30:11','2022-07-04 01:11:35','2022-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(26,'',NULL,1,'2016-03-02 19:57:58','2022-12-11 21:23:22','2022-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(29,'',NULL,1,'2016-03-02 20:01:39','2022-07-04 01:11:35','2022-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(30,'',NULL,1,'2016-03-02 20:02:06','2022-07-04 01:11:35','2022-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(32,'',NULL,1,'2016-03-03 19:22:32','2022-12-11 21:23:22','2022-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(33,'',NULL,1,'2016-03-03 19:23:16','2022-07-04 01:11:35','2022-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(34,'PAY1603-0001',NULL,1,'2017-02-06 08:10:24','2022-07-04 01:11:35','2022-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,0.00000000,150.00000000,NULL,NULL),(35,'PAY1603-0002',NULL,1,'2017-02-06 08:10:50','2022-07-04 01:11:35','2022-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,0.00000000,140.00000000,NULL,NULL),(36,'PAY1702-0003',NULL,1,'2017-02-21 16:07:43','2022-07-04 01:11:35','2022-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(38,'PAY1803-0004',NULL,1,'2018-03-16 13:59:31','2022-07-04 01:11:35','2022-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,0.00000000,10.00000000,NULL,NULL),(39,'PAY1801-0005',NULL,1,'2019-10-04 10:28:14','2022-02-07 13:37:54','2022-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,0.00000000,5.63000000,NULL,NULL),(40,'PAY2001-0006',NULL,1,'2020-01-16 02:36:48','2022-02-07 13:37:54','2022-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,0.00000000,20.50000000,NULL,NULL),(41,'PAY2001-0007',NULL,1,'2020-01-21 10:23:17','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(42,'PAY2001-0008',NULL,1,'2020-01-21 10:23:28','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(43,'PAY2001-0009',NULL,1,'2020-01-21 10:23:49','2022-02-07 13:37:54','2022-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -9531,7 +9616,7 @@ CREATE TABLE `llx_paiement_facture` ( `fk_facture` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `multicurrency_amount` double(24,8) DEFAULT 0.00000000, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT 1.00000000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_paiement_facture` (`fk_paiement`,`fk_facture`), @@ -9567,8 +9652,8 @@ CREATE TABLE `llx_paiementcharge` ( `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepaiement` int(11) NOT NULL, - `num_paiement` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9595,7 +9680,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) DEFAULT NULL, `entity` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, @@ -9604,12 +9689,12 @@ CREATE TABLE `llx_paiementfourn` ( `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_paiement` int(11) NOT NULL, - `num_paiement` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9637,7 +9722,7 @@ CREATE TABLE `llx_paiementfourn_facturefourn` ( `fk_facturefourn` int(11) DEFAULT NULL, `amount` double DEFAULT 0, `multicurrency_amount` double(24,8) DEFAULT 0.00000000, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT 1.00000000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_paiementfourn_facturefourn` (`fk_paiementfourn`,`fk_facturefourn`), @@ -9665,27 +9750,28 @@ DROP TABLE IF EXISTS `llx_partnership`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_partnership` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '(PROV)', + `ref` varchar(128) NOT NULL DEFAULT '(PROV)', `status` smallint(6) NOT NULL DEFAULT 0, `fk_soc` int(11) DEFAULT NULL, `fk_member` int(11) DEFAULT NULL, `date_partnership_start` date NOT NULL, `date_partnership_end` date DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `reason_decline_or_cancel` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `reason_decline_or_cancel` text DEFAULT NULL, `date_creation` datetime NOT NULL, - `fk_user_creat` int(11) NOT NULL, + `fk_user_creat` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_modif` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `count_last_url_check_error` int(11) DEFAULT 0, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `last_check_backlink` datetime DEFAULT NULL, `fk_type` int(11) NOT NULL DEFAULT 0, - `url_to_check` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url_to_check` varchar(255) DEFAULT NULL, + `ip` varchar(250) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_fk_type_fk_soc` (`fk_type`,`fk_soc`,`date_partnership_start`), UNIQUE KEY `uk_fk_type_fk_member` (`fk_type`,`fk_member`,`date_partnership_start`), @@ -9719,7 +9805,7 @@ CREATE TABLE `llx_partnership_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_partnership_fk_object` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -9749,10 +9835,10 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ext_payment_id` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ext_payment_site` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, + `ext_payment_id` varchar(255) DEFAULT NULL, + `ext_payment_site` varchar(128) DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9785,8 +9871,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9821,9 +9907,9 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9849,7 +9935,7 @@ DROP TABLE IF EXISTS `llx_payment_salary`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_payment_salary` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, @@ -9859,12 +9945,12 @@ CREATE TABLE `llx_payment_salary` ( `amount` double(24,8) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `datesp` date DEFAULT NULL, `dateep` date DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9900,7 +9986,7 @@ CREATE TABLE `llx_payment_salary_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_payment_salary_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -9924,7 +10010,7 @@ DROP TABLE IF EXISTS `llx_payment_various`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_payment_various` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `datep` date DEFAULT NULL, @@ -9932,16 +10018,16 @@ CREATE TABLE `llx_payment_various` ( `sens` smallint(6) NOT NULL DEFAULT 0, `amount` double(24,8) NOT NULL DEFAULT 0.00000000, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `accountancy_code` varchar(32) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `subledger_account` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `subledger_account` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9971,8 +10057,8 @@ CREATE TABLE `llx_payment_vat` ( `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT 0.00000000, `fk_typepaiement` int(11) NOT NULL, - `num_paiement` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_paiement` varchar(50) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9999,8 +10085,8 @@ DROP TABLE IF EXISTS `llx_pos_cash_fence`; CREATE TABLE `llx_pos_cash_fence` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(64) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `opening` double(24,8) DEFAULT 0.00000000, `cash` double(24,8) DEFAULT 0.00000000, `card` double(24,8) DEFAULT 0.00000000, @@ -10011,12 +10097,12 @@ CREATE TABLE `llx_pos_cash_fence` ( `day_close` int(11) DEFAULT NULL, `month_close` int(11) DEFAULT NULL, `year_close` int(11) DEFAULT NULL, - `posmodule` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `posnumber` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `posmodule` varchar(30) DEFAULT NULL, + `posnumber` varchar(30) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -10031,6 +10117,35 @@ INSERT INTO `llx_pos_cash_fence` VALUES (1,1,'1',NULL,-324.29000000,400.00000000 /*!40000 ALTER TABLE `llx_pos_cash_fence` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_prelevement` +-- + +DROP TABLE IF EXISTS `llx_prelevement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_prelevement` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_facture` int(11) DEFAULT NULL, + `fk_prelevement_lignes` int(11) NOT NULL, + `fk_facture_fourn` int(11) DEFAULT NULL, + `fk_salary` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_prelevement_fk_prelevement_lignes` (`fk_prelevement_lignes`), + CONSTRAINT `fk_prelevement_fk_prelevement_lignes` FOREIGN KEY (`fk_prelevement_lignes`) REFERENCES `llx_prelevement_lignes` (`rowid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_prelevement` +-- + +LOCK TABLES `llx_prelevement` WRITE; +/*!40000 ALTER TABLE `llx_prelevement` DISABLE KEYS */; +INSERT INTO `llx_prelevement` VALUES (1,211,1,NULL,NULL); +/*!40000 ALTER TABLE `llx_prelevement` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_prelevement_bons` -- @@ -10040,19 +10155,19 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(12) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `date_trans` datetime DEFAULT NULL, `method_trans` smallint(6) DEFAULT NULL, `fk_user_trans` int(11) DEFAULT NULL, `date_credit` datetime DEFAULT NULL, `fk_user_credit` int(11) DEFAULT NULL, - `type` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT 'debit-order', + `type` varchar(16) DEFAULT 'debit-order', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_prelevement_bons_ref` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -10069,41 +10184,13 @@ INSERT INTO `llx_prelevement_bons` VALUES (1,'T170201',1,'2017-02-21 15:53:46',5 UNLOCK TABLES; -- --- Table structure for table `llx_prelevement_facture` +-- Table structure for table `llx_prelevement_demande` -- -DROP TABLE IF EXISTS `llx_prelevement_facture`; +DROP TABLE IF EXISTS `llx_prelevement_demande`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_prelevement_facture` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_facture` int(11) DEFAULT NULL, - `fk_prelevement_lignes` int(11) NOT NULL, - `fk_facture_fourn` int(11) DEFAULT NULL, - 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=utf8mb3 COLLATE=utf8mb3_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_prelevement_facture` --- - -LOCK TABLES `llx_prelevement_facture` WRITE; -/*!40000 ALTER TABLE `llx_prelevement_facture` DISABLE KEYS */; -INSERT INTO `llx_prelevement_facture` VALUES (1,211,1,NULL); -/*!40000 ALTER TABLE `llx_prelevement_facture` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_prelevement_facture_demande` --- - -DROP TABLE IF EXISTS `llx_prelevement_facture_demande`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_prelevement_facture_demande` ( +CREATE TABLE `llx_prelevement_demande` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_facture` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, @@ -10112,29 +10199,30 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_guichet` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_rib` varchar(5) COLLATE utf8mb3_unicode_ci 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, `entity` int(11) DEFAULT NULL, - `sourcetype` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ext_payment_id` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ext_payment_site` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `sourcetype` varchar(32) DEFAULT NULL, + `ext_payment_id` varchar(255) DEFAULT NULL, + `ext_payment_site` varchar(128) DEFAULT NULL, `fk_facture_fourn` int(11) DEFAULT NULL, + `fk_salary` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), - KEY `idx_prelevement_facture_demande_fk_facture` (`fk_facture`), - KEY `idx_prelevement_facture_demande_fk_facture_fourn` (`fk_facture_fourn`) + KEY `idx_prelevement_demande_fk_facture` (`fk_facture`), + KEY `idx_prelevement_demande_fk_facture_fourn` (`fk_facture_fourn`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `llx_prelevement_facture_demande` +-- Dumping data for table `llx_prelevement_demande` -- -LOCK TABLES `llx_prelevement_facture_demande` WRITE; -/*!40000 ALTER TABLE `llx_prelevement_facture_demande` DISABLE KEYS */; -INSERT INTO `llx_prelevement_facture_demande` VALUES (1,211,50.00000000,'2017-02-06 08:11:17',1,'2017-02-21 15:53:46',1,12,'','','','',NULL,NULL,NULL,NULL,NULL),(2,5,NULL,'2020-01-01 14:35:21',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4XtGr4FnPvt5gmHCi23hC','StripeTest',NULL),(3,6,NULL,'2020-01-01 14:50:42',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4mkGr4FnPvt5gaMAjhU23','StripeTest',NULL),(4,7,NULL,'2020-01-01 14:59:09',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4uvGr4FnPvt5gPJHfyUQt','StripeTest',NULL),(5,8,NULL,'2020-01-01 15:08:10',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw53eGr4FnPvt5gY0i3EWWR','StripeTest',NULL),(6,9,NULL,'2020-01-01 15:27:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5M6Gr4FnPvt5gyICZxNY7','StripeTest',NULL),(7,10,NULL,'2020-01-01 15:36:11',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5UlGr4FnPvt5gdsfT25YK','StripeTest',NULL),(8,11,NULL,'2020-01-01 15:44:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5cYGr4FnPvt5ggY1HBL2m','StripeTest',NULL),(9,12,NULL,'2020-01-01 16:52:06',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw6gDGr4FnPvt5gjuuxU6K3','StripeTest',NULL); -/*!40000 ALTER TABLE `llx_prelevement_facture_demande` ENABLE KEYS */; +LOCK TABLES `llx_prelevement_demande` WRITE; +/*!40000 ALTER TABLE `llx_prelevement_demande` DISABLE KEYS */; +INSERT INTO `llx_prelevement_demande` VALUES (1,211,50.00000000,'2017-02-06 08:11:17',1,'2017-02-21 15:53:46',1,12,'','','','',NULL,NULL,NULL,NULL,NULL,NULL),(2,5,NULL,'2020-01-01 14:35:21',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4XtGr4FnPvt5gmHCi23hC','StripeTest',NULL,NULL),(3,6,NULL,'2020-01-01 14:50:42',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4mkGr4FnPvt5gaMAjhU23','StripeTest',NULL,NULL),(4,7,NULL,'2020-01-01 14:59:09',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4uvGr4FnPvt5gPJHfyUQt','StripeTest',NULL,NULL),(5,8,NULL,'2020-01-01 15:08:10',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw53eGr4FnPvt5gY0i3EWWR','StripeTest',NULL,NULL),(6,9,NULL,'2020-01-01 15:27:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5M6Gr4FnPvt5gyICZxNY7','StripeTest',NULL,NULL),(7,10,NULL,'2020-01-01 15:36:11',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5UlGr4FnPvt5gdsfT25YK','StripeTest',NULL,NULL),(8,11,NULL,'2020-01-01 15:44:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5cYGr4FnPvt5ggY1HBL2m','StripeTest',NULL,NULL),(9,12,NULL,'2020-01-01 16:52:06',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw6gDGr4FnPvt5gjuuxU6K3','StripeTest',NULL,NULL); +/*!40000 ALTER TABLE `llx_prelevement_demande` ENABLE KEYS */; UNLOCK TABLES; -- @@ -10149,13 +10237,13 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `client_nom` varchar(255) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `code_banque` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_guichet` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_rib` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci 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 DEFAULT NULL, 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`) @@ -10186,7 +10274,7 @@ CREATE TABLE `llx_prelevement_rejet` ( `motif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_creation` int(11) DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `afacturer` tinyint(4) DEFAULT 0, `fk_facture` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -10213,12 +10301,12 @@ 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 COLLATE utf8mb3_unicode_ci NOT NULL, - `printer_location` text COLLATE utf8mb3_unicode_ci NOT NULL, - `printer_id` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `printer_name` text NOT NULL, + `printer_location` text NOT NULL, + `printer_id` varchar(255) NOT NULL, `copy` int(11) NOT NULL DEFAULT 1, - `module` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, - `driver` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL, + `module` varchar(16) NOT NULL, + `driver` varchar(16) NOT NULL, `userid` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -10246,44 +10334,45 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `customcode` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(128) DEFAULT NULL, + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `note` text DEFAULT NULL, + `customcode` varchar(32) 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) COLLATE utf8mb3_unicode_ci DEFAULT 'HT', + `price_base_type` varchar(3) 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `tosell` tinyint(4) DEFAULT 1, `tobuy` tinyint(4) DEFAULT 1, `onportal` smallint(6) DEFAULT 0, `tobatch` tinyint(4) NOT NULL DEFAULT 0, + `sell_or_eat_by_mandatory` tinyint(4) NOT NULL DEFAULT 0, `fk_product_type` int(11) DEFAULT 0, - `duration` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `duration` varchar(6) DEFAULT NULL, `seuil_stock_alerte` float DEFAULT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `barcode` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `barcode` varchar(255) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell_intra` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell_export` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy_intra` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy_export` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `partnumber` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_sell_intra` varchar(32) DEFAULT NULL, + `accountancy_code_sell_export` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, + `accountancy_code_buy_intra` varchar(32) DEFAULT NULL, + `accountancy_code_buy_export` varchar(32) DEFAULT NULL, + `partnumber` varchar(32) DEFAULT NULL, `weight` float DEFAULT NULL, `weight_units` tinyint(4) DEFAULT NULL, `length` float DEFAULT NULL, @@ -10296,18 +10385,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) COLLATE utf8mb3_unicode_ci DEFAULT 'default@product', + `canvas` varchar(32) DEFAULT 'default@product', `finished` tinyint(4) DEFAULT NULL, `hidden` tinyint(4) DEFAULT 0, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `desiredstock` float DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_vat_code` varchar(10) DEFAULT NULL, `price_autogen` smallint(6) DEFAULT 0, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT '', + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT '', `width` float DEFAULT NULL, `width_units` tinyint(4) DEFAULT NULL, `height` float DEFAULT NULL, @@ -10317,11 +10406,12 @@ CREATE TABLE `llx_product` ( `net_measure` float DEFAULT NULL, `net_measure_units` tinyint(4) DEFAULT NULL, `fk_state` int(11) DEFAULT NULL, - `batch_mask` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch_mask` varchar(32) DEFAULT NULL, `lifetime` int(11) DEFAULT NULL, `qc_frequency` int(11) DEFAULT NULL, `mandatory_period` tinyint(4) DEFAULT 0, `fk_default_bom` int(11) DEFAULT NULL, + `fk_default_workstation` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_ref` (`ref`,`entity`), UNIQUE KEY `uk_product_barcode` (`barcode`,`fk_barcode_type`,`entity`), @@ -10350,7 +10440,7 @@ CREATE TABLE `llx_product` ( LOCK TABLES `llx_product` WRITE; /*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; -INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2020-01-18 19:17:03',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,12,1,1,0,1,0,'',NULL,NULL,'123456789066',2,'','','','',NULL,NULL,NULL,670,-3,NULL,0,NULL,0,NULL,0,2.8,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,'2012-07-09 00:30:01','2019-11-28 15:09:50',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(4,'2012-07-10 14:44:06','2021-04-15 11:40:18',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,0,9.000,'1',9.000,'1',1,12,1,1,0,1,0,'',NULL,NULL,'123456789034',2,'701','','','601',NULL,NULL,NULL,500,-3,NULL,0,NULL,0,NULL,0,1021.2,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,'CGST+SGST',0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

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

\r\n\r\n

WARNING ! 

\r\n\r\n

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

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,NULL,NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(23,'2019-10-07 00:00:00','2019-11-28 13:51:35',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,NULL,0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(24,'2019-11-28 16:33:35','2019-11-28 15:02:01',0,0,'POS-CARROT',1,NULL,'Carrot','','','',NULL,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(25,'2019-11-28 16:37:36','2020-01-13 11:13:19',0,0,'POS-APPLE',1,NULL,'Apple','','','',NULL,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,15.599999999999994,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(26,'2019-11-28 16:38:44','2019-11-28 12:38:44',0,0,'POS-KIWI',1,NULL,'Kiwi','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(27,'2019-11-28 16:39:21','2019-11-28 14:57:44',0,0,'POS-PEACH',1,NULL,'Peach','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(28,'2019-11-28 16:39:58','2019-11-28 12:39:58',0,0,'POS-ORANGE',1,NULL,'Orange','','','',NULL,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(29,'2019-11-28 17:03:14','2019-11-28 13:03:14',0,0,'POS-Eggs',1,NULL,'Eggs','','','',NULL,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(30,'2019-11-28 17:09:14','2019-11-28 13:09:14',0,0,'POS-Chips',1,NULL,'Chips','','','',NULL,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,30,-3,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(31,'2021-04-15 08:38:02','2021-04-15 11:38:02',0,0,'PRODSER',1,NULL,'Product NFC - Unique','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',12,12,1,1,0,2,0,'',0,NULL,NULL,2,'','','','','','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,0,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL); +INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2020-01-18 19:17:03',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,12,1,1,0,1,0,0,'',NULL,NULL,'123456789066',2,'','','','',NULL,NULL,NULL,670,-3,NULL,0,NULL,0,NULL,0,2.8,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(2,'2012-07-09 00:30:01','2019-11-28 15:09:50',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,0,'',NULL,NULL,'123456789077',2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(4,'2012-07-10 14:44:06','2021-04-15 11:40:18',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,0,9.000,'1',9.000,'1',1,12,1,1,0,1,0,0,'',NULL,NULL,'123456789034',2,'701','','','601',NULL,NULL,NULL,500,-3,NULL,0,NULL,0,NULL,0,1021.2,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,'CGST+SGST',0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

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

\r\n\r\n

WARNING ! 

\r\n\r\n

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

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,NULL,NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(23,'2019-10-07 00:00:00','2019-11-28 13:51:35',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,NULL,0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(24,'2019-11-28 16:33:35','2019-11-28 15:02:01',0,0,'POS-CARROT',1,NULL,'Carrot','','','',NULL,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(25,'2019-11-28 16:37:36','2020-01-13 11:13:19',0,0,'POS-APPLE',1,NULL,'Apple','','','',NULL,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,15.599999999999994,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(26,'2019-11-28 16:38:44','2019-11-28 12:38:44',0,0,'POS-KIWI',1,NULL,'Kiwi','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(27,'2019-11-28 16:39:21','2019-11-28 14:57:44',0,0,'POS-PEACH',1,NULL,'Peach','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(28,'2019-11-28 16:39:58','2019-11-28 12:39:58',0,0,'POS-ORANGE',1,NULL,'Orange','','','',NULL,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(29,'2019-11-28 17:03:14','2019-11-28 13:03:14',0,0,'POS-Eggs',1,NULL,'Eggs','','','',NULL,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(30,'2019-11-28 17:09:14','2019-11-28 13:09:14',0,0,'POS-Chips',1,NULL,'Chips','','','',NULL,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,30,-3,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL),(31,'2021-04-15 08:38:02','2021-04-15 11:38:02',0,0,'PRODSER',1,NULL,'Product NFC - Unique','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',12,12,1,1,0,2,0,0,'',0,NULL,NULL,2,'','','','','','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,0,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL); /*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; UNLOCK TABLES; @@ -10394,9 +10484,9 @@ DROP TABLE IF EXISTS `llx_product_attribute`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_attribute` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(255) NOT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `label` varchar(255) NOT NULL, `position` int(11) NOT NULL DEFAULT 0, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), @@ -10429,7 +10519,7 @@ CREATE TABLE `llx_product_attribute_combination` ( `variation_price` float NOT NULL, `variation_price_percentage` int(11) DEFAULT NULL, `variation_weight` float NOT NULL, - `variation_ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `variation_ref_ext` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), KEY `idx_product_att_com_product_parent` (`fk_product_parent`), @@ -10557,8 +10647,8 @@ DROP TABLE IF EXISTS `llx_product_attribute_value`; CREATE TABLE `llx_product_attribute_value` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_product_attribute` int(11) NOT NULL, - `ref` varchar(180) COLLATE utf8mb3_unicode_ci NOT NULL, - `value` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(180) NOT NULL, + `value` varchar(255) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), @@ -10589,9 +10679,9 @@ CREATE TABLE `llx_product_batch` ( `fk_product_stock` int(11) NOT NULL, `eatby` datetime DEFAULT NULL, `sellby` datetime DEFAULT NULL, - `batch` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, `qty` double NOT NULL DEFAULT 0, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_batch` (`fk_product_stock`,`batch`), KEY `idx_fk_product_stock` (`fk_product_stock`), @@ -10628,17 +10718,17 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT 'HT', + `price_base_type` varchar(3) DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, - `default_vat_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_vat_code` varchar(10) DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT 0, `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_customer` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `ref_customer` varchar(128) 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`), @@ -10679,17 +10769,17 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT 'HT', + `price_base_type` varchar(3) 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `default_vat_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_customer` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `default_vat_code` varchar(10) DEFAULT NULL, + `ref_customer` varchar(30) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -10714,7 +10804,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_product_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -10742,8 +10832,8 @@ 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(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `desc_fourn` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_fourn` varchar(128) DEFAULT NULL, + `desc_fourn` text DEFAULT NULL, `fk_availability` int(11) DEFAULT NULL, `price` double(24,8) DEFAULT 0.00000000, `quantity` double DEFAULT NULL, @@ -10752,27 +10842,27 @@ CREATE TABLE `llx_product_fournisseur_price` ( `unitprice` double(24,8) DEFAULT 0.00000000, `charges` double(24,8) DEFAULT 0.00000000, `tva_tx` double(6,3) NOT NULL DEFAULT 0.000, - `default_vat_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_vat_code` varchar(10) DEFAULT NULL, `info_bits` int(11) NOT NULL DEFAULT 0, `fk_user` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `supplier_reputation` varchar(10) DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_unitprice` double(24,8) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) DEFAULT NULL, `multicurrency_price` double(24,8) DEFAULT NULL, `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `barcode` varchar(180) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', + `barcode` varchar(180) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, - `packaging` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `packaging` varchar(64) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_fournisseur_price_ref` (`ref_fourn`,`fk_soc`,`quantity`,`entity`), UNIQUE KEY `uk_product_barcode` (`barcode`,`fk_barcode_type`,`entity`), @@ -10808,7 +10898,7 @@ CREATE TABLE `llx_product_fournisseur_price_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_product_fournisseur_price_extrafields` (`fk_object`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -10839,7 +10929,7 @@ 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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) DEFAULT NULL, `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_unitprice` double(24,8) DEFAULT NULL, @@ -10867,11 +10957,11 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(5) NOT NULL DEFAULT '0', + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `note` text DEFAULT NULL, + `import_key` varchar(14) 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`) @@ -10899,7 +10989,9 @@ 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(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `datec` datetime DEFAULT NULL, @@ -10910,7 +11002,7 @@ CREATE TABLE `llx_product_lot` ( `eol_date` datetime DEFAULT NULL, `manufacturing_date` datetime DEFAULT NULL, `scrapping_date` datetime DEFAULT NULL, - `barcode` varchar(180) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `barcode` varchar(180) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lot` (`fk_product`,`batch`) @@ -10923,7 +11015,7 @@ CREATE TABLE `llx_product_lot` ( LOCK TABLES `llx_product_lot` WRITE; /*!40000 ALTER TABLE `llx_product_lot` DISABLE KEYS */; -INSERT INTO `llx_product_lot` VALUES (1,1,2,'123456','2018-07-07',NULL,'2018-07-21 20:55:19','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,1,2,'2222','2018-07-08','2018-07-07','2018-07-21 21:00:42','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,10,'5599887766452',NULL,NULL,'2018-07-30 17:39:31','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,1,10,'4494487766452',NULL,NULL,'2018-07-30 17:40:12','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(39,1,1,'000000',NULL,NULL,'2020-01-08 20:41:18','2020-01-08 16:41:18',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,1,4,'aaa','2020-01-01',NULL,'2020-01-08 20:41:18','2020-01-13 11:28:05',NULL,12,NULL,NULL,NULL,NULL,NULL,NULL),(46,1,1,'string',NULL,NULL,'2020-01-18 20:16:58','2020-01-18 19:16:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,1,4,'000000',NULL,NULL,'2020-01-08 16:40:27','2020-01-21 10:30:15',1,1,NULL,NULL,NULL,NULL,NULL,NULL),(50,1,4,'Lot 2021-02',NULL,NULL,'2021-04-15 08:40:18','2021-04-15 11:40:18',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_product_lot` VALUES (1,1,2,'123456',NULL,NULL,'2018-07-07',NULL,'2018-07-21 20:55:19','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,1,2,'2222',NULL,NULL,'2018-07-08','2018-07-07','2018-07-21 21:00:42','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,10,'5599887766452',NULL,NULL,NULL,NULL,'2018-07-30 17:39:31','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,1,10,'4494487766452',NULL,NULL,NULL,NULL,'2018-07-30 17:40:12','2018-12-12 10:53:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(39,1,1,'000000',NULL,NULL,NULL,NULL,'2020-01-08 20:41:18','2020-01-08 16:41:18',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,1,4,'aaa',NULL,NULL,'2020-01-01',NULL,'2020-01-08 20:41:18','2020-01-13 11:28:05',NULL,12,NULL,NULL,NULL,NULL,NULL,NULL),(46,1,1,'string',NULL,NULL,NULL,NULL,'2020-01-18 20:16:58','2020-01-18 19:16:58',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,1,4,'000000',NULL,NULL,NULL,NULL,'2020-01-08 16:40:27','2020-01-21 10:30:15',1,1,NULL,NULL,NULL,NULL,NULL,NULL),(50,1,4,'Lot 2021-02',NULL,NULL,NULL,NULL,'2021-04-15 08:40:18','2021-04-15 11:40:18',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_product_lot` ENABLE KEYS */; UNLOCK TABLES; @@ -10938,7 +11030,7 @@ CREATE TABLE `llx_product_lot_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_product_lot_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -10964,12 +11056,12 @@ CREATE TABLE `llx_product_perentity` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_product` int(11) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell_intra` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell_export` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy_intra` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy_export` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_sell_intra` varchar(32) DEFAULT NULL, + `accountancy_code_sell_export` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, + `accountancy_code_buy_intra` varchar(32) DEFAULT NULL, + `accountancy_code_buy_export` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_perentity` (`fk_product`,`entity`), KEY `idx_product_perentity_fk_product` (`fk_product`) @@ -11003,21 +11095,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) COLLATE utf8mb3_unicode_ci DEFAULT 'HT', + `price_base_type` varchar(3) DEFAULT 'HT', `tva_tx` double(6,3) NOT NULL DEFAULT 0.000, - `default_vat_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_vat_code` varchar(10) DEFAULT NULL, `recuperableonly` int(11) NOT NULL DEFAULT 0, `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_price_expression` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -11057,12 +11149,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `quantity` double DEFAULT NULL, `unitprice` double(24,8) DEFAULT 0.00000000, - `price_base_type` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT 'HT', + `price_base_type` varchar(3) DEFAULT 'HT', `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -11122,7 +11214,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_stock` (`fk_product`,`fk_entrepot`), KEY `idx_product_stock_fk_product` (`fk_product`), @@ -11154,7 +11246,7 @@ CREATE TABLE `llx_product_warehouse_properties` ( `fk_entrepot` int(11) NOT NULL, `seuil_stock_alerte` float DEFAULT 0, `desiredstock` float DEFAULT 0, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11182,36 +11274,40 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `title` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, `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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_main_doc` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `usage_bill_time` int(11) DEFAULT 0, `usage_opportunity` int(11) DEFAULT 0, `usage_task` int(11) DEFAULT 1, `usage_organize_event` int(11) DEFAULT 0, - `email_msgid` varchar(175) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email_msgid` varchar(175) DEFAULT NULL, `fk_opp_status_end` int(11) DEFAULT NULL, `accept_conference_suggestions` int(11) DEFAULT 0, `accept_booth_suggestions` int(11) DEFAULT 0, `price_registration` double(24,8) DEFAULT NULL, `price_booth` double(24,8) DEFAULT NULL, `max_attendees` int(11) DEFAULT 0, + `ip` varchar(250) DEFAULT NULL, + `date_start_event` datetime DEFAULT NULL, + `date_end_event` datetime DEFAULT NULL, + `location` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_ref` (`ref`,`entity`), KEY `idx_projet_fk_soc` (`fk_soc`), @@ -11225,7 +11321,7 @@ CREATE TABLE `llx_projet` ( LOCK TABLES `llx_projet` WRITE; /*!40000 ALTER TABLE `llx_projet` DISABLE KEYS */; -INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0),(3,1,'2012-07-09 00:00:00','2020-01-15 12:40:50','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0),(5,NULL,'2012-07-11 00:00:00','2020-01-15 12:27:15','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0),(6,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(7,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(8,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(9,4,'2018-07-31 00:00:00','2019-12-20 16:33:15','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,2,2,27.00,NULL,NULL,NULL,NULL,NULL,'2019-12-20 20:33:15',12,4000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(10,1,'2019-12-21 19:46:33','2019-12-21 15:48:06','2019-12-21',NULL,'PJ1912-0005',1,'Contact for a new shop in Delhi','',12,0,1,1,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18000.00000000,NULL,12,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(11,10,'2019-12-21 19:49:28','2019-12-21 16:10:21','2019-12-02','2019-12-13','PJ1912-0006',1,'Request for new development of logo','Request to redesign a new logo',12,0,1,4,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6500.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(12,4,'2019-12-21 19:52:12','2019-12-21 15:52:12','2019-12-21',NULL,'PJ1912-0007',1,'Adding new tool for Customer Relationship Management','',12,1,0,1,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16000.00000000,NULL,NULL,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0),(13,26,'2019-12-21 19:53:21','2019-12-21 15:53:59','2019-12-21',NULL,'PJ1912-0008',1,'Cooking 100 apple pie for chrsitmas','',12,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0); +INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(3,1,'2012-07-09 00:00:00','2020-01-15 12:40:50','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(5,NULL,'2012-07-11 00:00:00','2020-01-15 12:27:15','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(6,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(7,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(8,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(9,4,'2018-07-31 00:00:00','2019-12-20 16:33:15','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,2,2,27.00,NULL,NULL,NULL,NULL,NULL,'2019-12-20 20:33:15',12,4000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(10,1,'2019-12-21 19:46:33','2019-12-21 15:48:06','2019-12-21',NULL,'PJ1912-0005',1,'Contact for a new shop in Delhi','',12,0,1,1,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18000.00000000,NULL,12,0,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(11,10,'2019-12-21 19:49:28','2019-12-21 16:10:21','2019-12-02','2019-12-13','PJ1912-0006',1,'Request for new development of logo','Request to redesign a new logo',12,0,1,4,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6500.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(12,4,'2019-12-21 19:52:12','2019-12-21 15:52:12','2019-12-21',NULL,'PJ1912-0007',1,'Adding new tool for Customer Relationship Management','',12,1,0,1,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16000.00000000,NULL,NULL,1,1,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL),(13,26,'2019-12-21 19:53:21','2019-12-21 15:53:59','2019-12-21',NULL,'PJ1912-0008',1,'Cooking 100 apple pie for chrsitmas','',12,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL,0,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_projet` ENABLE KEYS */; UNLOCK TABLES; @@ -11240,8 +11336,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `priority` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `priority` mediumtext DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_projet_extrafields` (`fk_object`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11266,7 +11362,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_projet` int(11) NOT NULL, `fk_task_parent` int(11) NOT NULL DEFAULT 0, @@ -11275,8 +11371,8 @@ CREATE TABLE `llx_projet_task` ( `dateo` datetime DEFAULT NULL, `datee` datetime DEFAULT NULL, `datev` datetime DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) NOT NULL, + `description` text DEFAULT NULL, `duration_effective` double DEFAULT 0, `planned_workload` double DEFAULT 0, `progress` int(11) DEFAULT 0, @@ -11285,11 +11381,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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, `rang` int(11) DEFAULT 0, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_task_ref` (`ref`,`entity`), @@ -11323,7 +11419,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_projet_task_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11354,10 +11450,10 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `invoice_id` int(11) DEFAULT NULL, `invoice_line_id` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `intervention_id` int(11) DEFAULT NULL, @@ -11392,11 +11488,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_client` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) DEFAULT NULL, + `ref_client` varchar(255) DEFAULT NULL, `datec` datetime DEFAULT NULL, `datep` date DEFAULT NULL, `fin_validite` datetime DEFAULT NULL, @@ -11419,32 +11515,32 @@ CREATE TABLE `llx_propal` ( `localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_currency` varchar(3) DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, - `deposit_percent` varchar(63) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `deposit_percent` varchar(63) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, `fk_warehouse` 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `online_sign_ip` varchar(48) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `online_sign_name` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, + `online_sign_ip` varchar(48) DEFAULT NULL, + `online_sign_name` varchar(64) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_propal_ref` (`ref`,`entity`), KEY `idx_propal_fk_soc` (`fk_soc`), @@ -11471,7 +11567,7 @@ CREATE TABLE `llx_propal` ( LOCK TABLES `llx_propal` WRITE; /*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; -INSERT INTO `llx_propal` VALUES (1,2,NULL,'2021-07-11 17:49:28','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2021-07-09','2020-07-24 12:00:00','2020-08-08 14:24:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,1,NULL,'2021-07-11 17:49:28','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2021-07-10','2020-07-25 12:00:00','2021-07-10 02:12:55','2020-07-20 15:23:12','2020-07-20 15:23:12',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,1,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,4,NULL,'2022-02-07 13:37:54','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2021-07-18','2021-08-02 12:00:00','2021-07-18 11:36:18','2020-07-20 15:21:15','2021-07-20 15:21:15',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,19,NULL,'2022-07-04 01:11:35','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2022-02-17','2022-03-04 12:00:00','2021-11-15 23:27:10',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,19,NULL,'2022-07-04 01:11:35','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2022-02-17','2022-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(7,19,NULL,'2022-07-04 01:11:35','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2022-02-17','2022-03-04 12:00:00','2021-01-29 21:49:33',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL,NULL,NULL),(8,19,NULL,'2022-07-04 01:11:35','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2022-02-17','2022-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(10,7,4,'2022-02-07 13:37:54','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2021-11-15','2021-11-30 12:00:00','2022-09-27 16:54:30',NULL,NULL,12,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,3,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf',NULL,NULL),(11,1,NULL,'2022-07-04 01:11:35','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2022-05-13','2022-05-28 12:00:00','2022-02-16 01:44:58',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL,NULL,NULL),(12,7,NULL,'2022-07-04 01:11:35','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2022-06-24','2021-07-09 12:00:00','2022-02-16 01:45:44',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL,NULL,NULL),(13,26,NULL,'2022-07-04 01:11:35','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2022-04-03','2021-04-18 12:00:00','2022-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL,NULL,NULL),(14,3,NULL,'2022-07-04 01:11:35','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2022-06-19','2021-07-04 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL,NULL,NULL),(15,26,NULL,'2022-07-04 01:11:35','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2022-05-01','2022-05-16 12:00:00','2021-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL,NULL,NULL),(16,1,NULL,'2022-07-04 01:11:35','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2022-05-13','2022-05-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL,NULL,NULL),(17,1,NULL,'2022-02-07 13:37:54','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2021-07-23','2021-08-07 12:00:00','2021-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL,NULL,NULL),(18,26,NULL,'2022-07-04 01:11:35','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2022-02-13','2022-02-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(19,12,NULL,'2022-07-04 01:11:35','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2022-03-30','2022-04-14 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(20,26,NULL,'2022-02-07 13:37:54','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2021-11-13','2021-11-28 12:00:00','2021-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL,NULL,NULL),(21,1,NULL,'2022-02-07 13:37:54','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2021-09-23','2021-10-08 12:00:00','2021-02-16 04:47:09',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL,NULL,NULL),(22,26,NULL,'2022-02-07 13:37:54','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2021-11-13','2021-11-28 12:00:00','2021-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf',NULL,NULL),(23,12,NULL,'2022-07-04 01:11:35','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2022-04-03','2021-04-18 12:00:00','2021-02-17 16:07:18',NULL,NULL,2,NULL,12,NULL,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL,NULL,NULL),(24,7,NULL,'2022-02-07 13:37:54','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2021-11-13','2021-11-28 12:00:00','2021-02-16 01:46:17',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL,NULL,NULL),(25,3,NULL,'2021-07-11 17:49:28','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2021-07-09','2020-07-24 12:00:00','2021-02-16 01:46:17','2020-02-16 04:47:29','2021-02-16 04:47:29',1,NULL,1,12,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(26,1,NULL,'2022-07-04 01:11:35','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2022-04-03','2021-04-18 12:00:00','2021-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL,NULL,NULL),(27,6,NULL,'2022-02-07 13:37:54','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2021-11-12','2021-11-27 12:00:00','2021-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL,NULL,NULL),(28,19,NULL,'2022-02-07 13:37:54','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2021-07-30','2021-08-14 12:00:00','2021-02-16 01:46:18','2020-02-16 04:46:31','2021-02-16 04:46:31',2,NULL,2,12,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(29,1,NULL,'2022-02-07 13:37:54','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2021-07-23','2021-08-07 12:00:00','2021-02-16 01:46:18','2021-12-20 20:50:23','2022-12-20 20:50:23',2,NULL,2,12,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf',NULL,NULL),(30,1,NULL,'2022-07-04 01:11:35','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2022-05-01','2022-05-16 12:00:00','2021-02-16 01:46:18','2019-02-16 04:46:42','2021-02-16 04:46:42',2,NULL,2,12,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL,NULL,NULL),(31,11,NULL,'2022-07-04 01:11:35','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2022-06-24','2021-07-09 12:00:00','2022-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL,NULL,NULL),(32,19,NULL,'2022-02-07 13:37:54','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2021-11-12','2021-11-27 12:00:00','2021-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL,NULL,NULL),(33,10,6,'2022-02-07 13:37:54','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2021-09-27','2021-10-12 12:00:00','2021-09-27 17:08:59',NULL,NULL,12,12,12,NULL,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf',NULL,NULL),(34,10,6,'2022-02-07 13:37:54','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2021-09-27','2021-10-12 12:00:00','2021-09-27 17:13:13','2020-01-07 23:43:06','2022-01-07 23:43:06',12,12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf',NULL,NULL),(35,10,NULL,'2022-02-07 13:37:54','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2021-09-27','2021-10-12 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf',NULL,NULL),(36,1,NULL,'2022-02-07 13:37:54','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2022-01-01','2022-01-16 12:00:00','2022-01-19 14:24:22','2021-01-19 14:24:27','2022-01-19 14:24:27',12,NULL,12,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf',NULL,NULL),(37,10,NULL,'2022-02-07 13:37:54','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2022-01-05','2022-01-20 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf',NULL,NULL),(38,30,NULL,'2022-02-07 13:37:54','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2022-01-13','2022-01-28 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf',NULL,NULL); +INSERT INTO `llx_propal` VALUES (1,2,NULL,'2022-12-11 21:23:22','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2022-07-09','2021-07-24 12:00:00','2021-08-08 14:24:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,1,NULL,'2022-12-11 21:23:22','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2022-07-10','2021-07-25 12:00:00','2022-07-10 02:12:55','2020-07-20 15:23:12','2021-07-20 15:23:12',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,1,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,4,NULL,'2022-12-11 21:23:22','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2022-07-18','2022-08-02 12:00:00','2022-07-18 11:36:18','2020-07-20 15:21:15','2022-07-20 15:21:15',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,19,NULL,'2022-07-04 01:11:35','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2022-02-17','2022-03-04 12:00:00','2021-11-15 23:27:10',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,19,NULL,'2022-07-04 01:11:35','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2022-02-17','2022-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(7,19,NULL,'2022-07-04 01:11:35','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2022-02-17','2022-03-04 12:00:00','2021-01-29 21:49:33',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL,NULL,NULL),(8,19,NULL,'2022-07-04 01:11:35','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2022-02-17','2022-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,NULL,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(10,7,4,'2022-12-11 21:23:22','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2022-11-15','2022-11-30 12:00:00','2022-09-27 16:54:30',NULL,NULL,12,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,NULL,3,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf',NULL,NULL),(11,1,NULL,'2022-07-04 01:11:35','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2022-05-13','2022-05-28 12:00:00','2022-02-16 01:44:58',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL,NULL,NULL),(12,7,NULL,'2022-07-04 01:11:35','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2022-06-24','2021-07-09 12:00:00','2022-02-16 01:45:44',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL,NULL,NULL),(13,26,NULL,'2022-07-04 01:11:35','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2022-04-03','2021-04-18 12:00:00','2022-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL,NULL,NULL),(14,3,NULL,'2022-07-04 01:11:35','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2022-06-19','2021-07-04 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL,NULL,NULL),(15,26,NULL,'2022-07-04 01:11:35','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2022-05-01','2022-05-16 12:00:00','2021-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL,NULL,NULL),(16,1,NULL,'2022-07-04 01:11:35','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2022-05-13','2022-05-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL,NULL,NULL),(17,1,NULL,'2022-12-11 21:23:22','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2022-07-23','2022-08-07 12:00:00','2022-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL,NULL,NULL),(18,26,NULL,'2022-07-04 01:11:35','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2022-02-13','2022-02-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(19,12,NULL,'2022-07-04 01:11:35','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2022-03-30','2022-04-14 12:00:00','2022-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(20,26,NULL,'2022-12-11 21:23:22','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2022-11-13','2022-11-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL,NULL,NULL),(21,1,NULL,'2022-12-11 21:23:22','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2022-09-23','2022-10-08 12:00:00','2022-02-16 04:47:09',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL,NULL,NULL),(22,26,NULL,'2022-12-11 21:23:22','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2022-11-13','2022-11-28 12:00:00','2022-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf',NULL,NULL),(23,12,NULL,'2022-07-04 01:11:35','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2022-04-03','2021-04-18 12:00:00','2021-02-17 16:07:18',NULL,NULL,2,NULL,12,NULL,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL,NULL,NULL),(24,7,NULL,'2022-12-11 21:23:22','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2022-11-13','2022-11-28 12:00:00','2022-02-16 01:46:17',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL,NULL,NULL),(25,3,NULL,'2022-12-11 21:23:22','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2022-07-09','2021-07-24 12:00:00','2022-02-16 01:46:17','2020-02-16 04:47:29','2022-02-16 04:47:29',1,NULL,1,12,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(26,1,NULL,'2022-07-04 01:11:35','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2022-04-03','2021-04-18 12:00:00','2021-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL,NULL,NULL),(27,6,NULL,'2022-12-11 21:23:22','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2022-11-12','2022-11-27 12:00:00','2022-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL,NULL,NULL),(28,19,NULL,'2022-12-11 21:23:22','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2022-07-30','2022-08-14 12:00:00','2022-02-16 01:46:18','2020-02-16 04:46:31','2022-02-16 04:46:31',2,NULL,2,12,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(29,1,NULL,'2022-12-11 21:23:22','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2022-07-23','2022-08-07 12:00:00','2022-02-16 01:46:18','2021-12-20 20:50:23','2022-12-20 20:50:23',2,NULL,2,12,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf',NULL,NULL),(30,1,NULL,'2022-07-04 01:11:35','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2022-05-01','2022-05-16 12:00:00','2021-02-16 01:46:18','2019-02-16 04:46:42','2021-02-16 04:46:42',2,NULL,2,12,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL,NULL,NULL),(31,11,NULL,'2022-07-04 01:11:35','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2022-06-24','2021-07-09 12:00:00','2022-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL,NULL,NULL),(32,19,NULL,'2022-12-11 21:23:22','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2022-11-12','2022-11-27 12:00:00','2022-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,NULL,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL,NULL,NULL),(33,10,6,'2022-12-11 21:23:22','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2022-09-27','2022-10-12 12:00:00','2022-09-27 17:08:59',NULL,NULL,12,12,12,NULL,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf',NULL,NULL),(34,10,6,'2022-12-11 21:23:22','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2022-09-27','2022-10-12 12:00:00','2022-09-27 17:13:13','2020-01-07 23:43:06','2022-01-07 23:43:06',12,12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf',NULL,NULL),(35,10,NULL,'2022-12-11 21:23:22','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2022-09-27','2022-10-12 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf',NULL,NULL),(36,1,NULL,'2022-02-07 13:37:54','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2022-01-01','2022-01-16 12:00:00','2022-01-19 14:24:22','2021-01-19 14:24:27','2022-01-19 14:24:27',12,NULL,12,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf',NULL,NULL),(37,10,NULL,'2022-02-07 13:37:54','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2022-01-05','2022-01-20 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf',NULL,NULL),(38,30,NULL,'2022-02-07 13:37:54','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2022-01-13','2022-01-28 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf',NULL,NULL); /*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; UNLOCK TABLES; @@ -11486,7 +11582,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_propal_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11511,13 +11607,13 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `lang` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `file_name` varchar(200) NOT NULL, + `lang` varchar(5) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11543,15 +11639,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT 0.000, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax1_type` varchar(10) NOT NULL DEFAULT '0', `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '0', + `localtax2_type` varchar(10) NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -11572,7 +11668,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(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -11607,7 +11703,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_propaldet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11632,13 +11728,13 @@ DROP TABLE IF EXISTS `llx_reception`; CREATE TABLE `llx_reception` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `ref` varchar(30) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, - `ref_ext` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_supplier` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(30) DEFAULT NULL, + `ref_int` varchar(30) DEFAULT NULL, + `ref_supplier` varchar(128) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -11647,7 +11743,7 @@ CREATE TABLE `llx_reception` ( `date_delivery` datetime DEFAULT NULL, `date_reception` datetime DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, - `tracking_number` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `tracking_number` varchar(50) DEFAULT NULL, `fk_statut` smallint(6) DEFAULT 0, `billed` smallint(6) DEFAULT 0, `height` float DEFAULT NULL, @@ -11656,13 +11752,13 @@ CREATE TABLE `llx_reception` ( `size` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_reception_uk_ref` (`ref`,`entity`), KEY `idx_reception_fk_soc` (`fk_soc`), @@ -11697,7 +11793,7 @@ CREATE TABLE `llx_reception_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_reception_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11722,25 +11818,26 @@ DROP TABLE IF EXISTS `llx_recruitment_recruitmentcandidature`; CREATE TABLE `llx_recruitment_recruitmentcandidature` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_recruitmentjobposition` int(11) DEFAULT NULL, - `ref` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '(PROV)', - `description` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_public` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_private` text CHARACTER SET utf8mb4 DEFAULT NULL, + `ref` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '(PROV)', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `note_public` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `note_private` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `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) CHARACTER SET utf8mb4 DEFAULT NULL, - `model_pdf` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `model_pdf` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `status` smallint(6) NOT NULL, - `firstname` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL, - `lastname` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL, - `email` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `phone` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL, + `firstname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `lastname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `remuneration_requested` int(11) DEFAULT NULL, `remuneration_proposed` int(11) DEFAULT NULL, `fk_recruitment_origin` int(11) DEFAULT NULL, - `email_msgid` varchar(175) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email_msgid` varchar(175) DEFAULT NULL, + `email_date` datetime DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `date_birth` date DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -11759,7 +11856,7 @@ CREATE TABLE `llx_recruitment_recruitmentcandidature` ( LOCK TABLES `llx_recruitment_recruitmentcandidature` WRITE; /*!40000 ALTER TABLE `llx_recruitment_recruitmentcandidature` DISABLE KEYS */; -INSERT INTO `llx_recruitment_recruitmentcandidature` VALUES (118,3,'(PROV118)','',NULL,NULL,'2021-04-15 07:28:32','2021-04-15 10:28:32',12,NULL,NULL,NULL,0,'Stud','Studson','student1@myschool.com','',20000,NULL,NULL,NULL,1,'2005-04-15'),(119,4,'(PROV119)','',NULL,NULL,'2021-04-15 07:29:26','2021-04-15 10:29:26',12,NULL,NULL,NULL,3,'Garfield','Erika','egarfield@example.com','',40000,NULL,NULL,NULL,1,'1990-04-15'); +INSERT INTO `llx_recruitment_recruitmentcandidature` VALUES (118,3,'(PROV118)','',NULL,NULL,'2021-04-15 07:28:32','2021-04-15 10:28:32',12,NULL,NULL,NULL,0,'Stud','Studson','student1@myschool.com','',20000,NULL,NULL,NULL,NULL,1,'2005-04-15'),(119,4,'(PROV119)','',NULL,NULL,'2021-04-15 07:29:26','2021-04-15 10:29:26',12,NULL,NULL,NULL,3,'Garfield','Erika','egarfield@example.com','',40000,NULL,NULL,NULL,NULL,1,'1990-04-15'); /*!40000 ALTER TABLE `llx_recruitment_recruitmentcandidature` ENABLE KEYS */; UNLOCK TABLES; @@ -11774,8 +11871,8 @@ CREATE TABLE `llx_recruitment_recruitmentcandidature_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) CHARACTER SET utf8mb4 DEFAULT NULL, - `aa` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `aa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_fk_object` (`fk_object`), KEY `idx_recruitmentcandidature_fk_object` (`fk_object`) @@ -11801,8 +11898,8 @@ DROP TABLE IF EXISTS `llx_recruitment_recruitmentjobposition`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_recruitment_recruitmentjobposition` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '(PROV)', - `label` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `ref` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '(PROV)', + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `qty` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) DEFAULT NULL, `fk_project` int(11) DEFAULT NULL, @@ -11810,21 +11907,21 @@ CREATE TABLE `llx_recruitment_recruitmentjobposition` ( `fk_user_supervisor` int(11) DEFAULT NULL, `fk_establishment` int(11) DEFAULT NULL, `date_planned` date DEFAULT NULL, - `description` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_public` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_private` text CHARACTER SET utf8mb4 DEFAULT NULL, + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `note_public` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `note_private` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `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) CHARACTER SET utf8mb4 DEFAULT NULL, - `model_pdf` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `model_pdf` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `status` smallint(6) NOT NULL, - `last_main_doc` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `email_recruiter` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `last_main_doc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `email_recruiter` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `remuneration` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `remuneration_suggested` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `remuneration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `remuneration_suggested` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_recruitment_recruitmentjobposition_rowid` (`rowid`), KEY `idx_recruitment_recruitmentjobposition_ref` (`ref`), @@ -11863,7 +11960,7 @@ CREATE TABLE `llx_recruitment_recruitmentjobposition_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) CHARACTER SET utf8mb4 DEFAULT NULL, + `import_key` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `bbb` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_fk_object` (`fk_object`), @@ -11891,12 +11988,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `asset_number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fk_code_type_resource` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(255) DEFAULT NULL, + `asset_number` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `fk_code_type_resource` varchar(32) DEFAULT NULL, + `note_public` text DEFAULT NULL, + `note_private` text DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -11904,8 +12001,8 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_resource_ref` (`ref`,`entity`), @@ -11936,7 +12033,7 @@ CREATE TABLE `llx_resource_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_resource_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -11960,15 +12057,16 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `libelle` varchar(255) DEFAULT NULL, + `module` varchar(64) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `perms` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `subperms` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type` varchar(1) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `perms` varchar(50) DEFAULT NULL, + `subperms` varchar(50) DEFAULT NULL, + `type` varchar(1) DEFAULT NULL, `bydefault` tinyint(4) DEFAULT 0, `module_position` int(11) NOT NULL DEFAULT 0, `family_position` int(11) NOT NULL DEFAULT 0, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`id`,`entity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11979,7 +12077,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,0,0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,0,0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,0,0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,0,0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,0,0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,0,0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,0,0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',1,'propal_advance','close','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',2,'propal_advance','close','d',0,22,0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,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,14,0),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0),(81,'Read sales orders','commande',1,'lire',NULL,'r',0,0,0),(82,'Creeat/modify sales orders','commande',1,'creer',NULL,'w',0,0,0),(84,'Validate sales orders','commande',1,'order_advance','validate','d',0,0,0),(86,'Send sale orders by email','commande',1,'order_advance','send','d',0,0,0),(87,'Close sale orders','commande',1,'order_advance','close','d',0,0,0),(88,'Cancel sale orders','commande',1,'order_advance','annuler','d',0,0,0),(89,'Delete sales orders','commande',1,'supprimer',NULL,'d',0,0,0),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,40,0),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,40,0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,40,0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,40,0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,40,0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,40,0),(111,'Read bank account and transactions','banque',1,'lire',NULL,'r',0,0,0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,0,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,0,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,0,0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,0,0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,0,0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,0,0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0),(121,'Read third parties','societe',1,'lire',NULL,'r',0,0,0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,0,0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,0,0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0),(126,'Export third parties','societe',1,'export',NULL,'r',0,0,0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0),(130,'Modify thirdparty information payment','societe',1,'thirdparty_paymentinformation_advance','write','w',0,0,0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0),(251,'Read information of other users, groups and permissions','user',1,'user','lire','r',0,0,0),(252,'Read permissions of other users','user',1,'user_advance','readperms','r',0,0,0),(253,'Create/modify internal and external users, groups and permissions','user',1,'user','creer','w',0,0,0),(254,'Create/modify external users only','user',1,'user_advance','write','w',0,0,0),(255,'Modify the password of other users','user',1,'user','password','w',0,0,0),(256,'Delete or disable other users','user',1,'user','supprimer','d',0,0,0),(262,'Read all third parties (and their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,0,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,9,0),(281,'Read contacts','societe',1,'contact','lire','r',0,0,0),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0),(282,'Create and update contact','societe',1,'contact','creer','w',0,0,0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,0,0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0),(286,'Export contacts','societe',1,'contact','export','d',0,0,0),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0),(301,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0),(302,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0),(341,'Read its own permissions','user',1,'self_advance','readperms','r',0,0,0),(342,'Create/modify of its own user','user',1,'self','creer','w',0,0,0),(343,'Modify its own password','user',1,'self','password','w',0,0,0),(344,'Modify its own permissions','user',1,'self_advance','writeperms','w',0,0,0),(351,'Read groups','user',1,'group_advance','read','r',0,0,0),(352,'Read permissions of groups','user',1,'group_advance','readperms','r',0,0,0),(353,'Create/modify groups and permissions','user',1,'group_advance','write','w',0,0,0),(354,'Delete groups','user',1,'group_advance','delete','d',0,0,0),(358,'Export all users','user',1,'user','export','r',0,0,0),(511,'Read employee salaries and payments (yours and your subordinates)','salaries',1,'read',NULL,'r',0,0,0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,0,0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,0,0),(517,'Read salaries and payments of all employees','salaries',1,'readall',NULL,'r',0,0,0),(519,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,0,0),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0),(521,'Read loans','loan',1,'read',NULL,'r',0,50,0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0),(531,'Read services','service',1,'lire',NULL,'r',0,0,0),(532,'Create/modify services','service',1,'creer',NULL,'w',0,0,0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,0,0),(538,'Export services','service',1,'export',NULL,'r',0,0,0),(561,'Read bank transfer payment orders','paymentbybanktransfer',1,'read',NULL,'r',0,52,0),(562,'Create/modify a bank transfer payment order','paymentbybanktransfer',1,'create',NULL,'w',0,52,0),(563,'Send/Transmit bank transfer payment order','paymentbybanktransfer',1,'send',NULL,'a',0,52,0),(564,'Record Debits/Rejects of bank transfer payment order','paymentbybanktransfer',1,'debit',NULL,'a',0,52,0),(610,'Read attributes of variants','variants',1,'read',NULL,'w',0,0,0),(611,'Create/Update attributes of variants','variants',1,'write',NULL,'w',0,0,0),(612,'Delete attributes of variants','variants',1,'delete',NULL,'w',0,0,0),(651,'Read bom of Bom','bom',1,'read',NULL,'w',0,0,0),(652,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,0,0),(653,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,0,0),(661,'Read Manufacturing Order','mrp',1,'read',NULL,'w',0,0,0),(662,'Create/Update Manufacturing Order','mrp',1,'write',NULL,'w',0,0,0),(663,'Delete Manufacturing Order','mrp',1,'delete',NULL,'w',0,0,0),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0),(750,'Read job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','read','w',0,0,0),(751,'Create/Update job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','write','w',0,0,0),(752,'Delete Job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','delete','w',0,0,0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',0,0,0),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,0,0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,0,0),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,0,0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,0,0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',0,0,0),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,0,0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,0,0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0),(1011,'inventoryReadPermission','stock',1,'inventory_advance','read','w',0,39,0),(1012,'inventoryCreatePermission','stock',1,'inventory_advance','write','w',0,39,0),(1101,'Read delivery receipts','expedition',1,'delivery','lire','r',0,40,0),(1102,'Create/modify delivery receipts','expedition',1,'delivery','creer','w',0,40,0),(1104,'Validate delivery receipts','expedition',1,'delivery_advance','validate','d',0,40,0),(1109,'Delete delivery receipts','expedition',1,'delivery','supprimer','d',0,40,0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,35,0),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,35,0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,35,0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,35,0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,35,0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,35,0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,0,0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,0,0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,0,0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,0,0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,0,0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,0,0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,0,0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,0,0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,0,0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,0,0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,0,0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,0,0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,0,0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,0,0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,0,0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,0,0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,0,0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,0,0),(1421,'Export sales orders and attributes','commande',1,'commande','export','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,0,0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,0,0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,0,0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,0,0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,0,0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,0,0),(2501,'Read or download documents','ecm',1,'read',NULL,'r',0,0,0),(2503,'Upload a document','ecm',1,'upload',NULL,'w',0,0,0),(2515,'Administer directories of documents','ecm',1,'setup',NULL,'w',0,0,0),(2610,'Générer / modifier la clé API des utilisateurs','api',1,'apikey','generate','w',0,24,0),(3201,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0,76,0),(10001,'Read website content','website',1,'read',NULL,'w',0,0,0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,0,0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,0,0),(10005,'Delete website content','website',1,'delete',NULL,'w',0,0,0),(10008,'Export website content','website',1,'export',NULL,'w',0,0,0),(20001,'Read leave requests (yours and your subordinates)','holiday',1,'read',NULL,'w',0,0,0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0),(20002,'Create/modify leave requests','holiday',1,'write',NULL,'w',0,0,0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,0,0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0),(20004,'Read leave requests for everybody','holiday',1,'readall',NULL,'w',0,0,0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0),(20005,'Create/modify leave requests for everybody','holiday',1,'writeall',NULL,'w',0,0,0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,0,0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,0,0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,0,0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,0,0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,0,0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,0,0),(50151,'Use Point Of Sale (record a sale, add products, record payment)','takepos',1,'run',NULL,'a',0,0,0),(50152,'Can modify added sales lines (prices, discount)','takepos',1,'editlines',NULL,'a',0,0,0),(50153,'Edit ordered sales lines (useful only when option \"Order printers\" has been enabled). Allow to edit sales lines even after the order has been printed','takepos',1,'editorderedlines',NULL,'a',0,0,0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,0,0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,0,0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,0,0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,0,0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,0,0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,0,0),(57001,'Read articles','knowledgemanagement',1,'knowledgerecord','read','w',0,90,0),(57002,'Create/Update articles','knowledgemanagement',1,'knowledgerecord','write','w',0,90,0),(57003,'Delete articles','knowledgemanagement',1,'knowledgerecord','delete','w',0,90,0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0),(63001,'Read resources','resource',1,'read',NULL,'w',0,16,0),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,16,0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,16,0),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,16,0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0),(941601,'Lire les receptions','reception',1,'lire',NULL,'r',0,40,0),(941602,'Creer modifier les receptions','reception',1,'creer',NULL,'w',0,40,0),(941603,'Valider les receptions','reception',1,'reception_advance','validate','d',0,40,0),(941604,'Envoyer les receptions aux clients','reception',1,'reception_advance','send','d',0,40,0),(941605,'Exporter les receptions','reception',1,'reception','export','r',0,40,0),(941606,'Supprimer les receptions','reception',1,'supprimer',NULL,'d',0,40,0); +INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0,0,0,'2022-12-11 21:23:42'),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0,'2022-12-11 21:23:36'),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,0,0,'2022-12-11 21:23:42'),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0,'2022-12-11 21:23:36'),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,0,0,'2022-12-11 21:23:42'),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0,'2022-12-11 21:23:36'),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,0,0,'2022-12-11 21:23:42'),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0,'2022-12-11 21:23:36'),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,0,0,'2022-12-11 21:23:42'),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0,'2022-12-11 21:23:36'),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,0,0,'2022-12-11 21:23:42'),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0,'2022-12-11 21:23:36'),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,0,0,'2022-12-11 21:23:42'),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0,'2022-12-11 21:23:36'),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0,'2022-12-11 21:23:36'),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0,'2022-12-11 21:23:36'),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0,'2022-12-11 21:23:36'),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0,'2022-12-11 21:23:36'),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0,'2022-12-11 21:23:36'),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0,'2022-12-11 21:23:36'),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0,'2022-12-11 21:23:36'),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0,'2022-12-11 21:23:36'),(26,'Cloturer les propositions commerciales','propale',1,'propal_advance','close','d',0,22,0,'2022-12-11 21:23:36'),(26,'Cloturer les propositions commerciales','propale',2,'propal_advance','close','d',0,22,0,'2022-12-11 21:23:36'),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0,'2022-12-11 21:23:36'),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0,'2022-12-11 21:23:36'),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0,'2022-12-11 21:23:36'),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0,'2022-12-11 21:23:36'),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0,'2022-12-11 21:23:36'),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0,'2022-12-11 21:23:36'),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0,'2022-12-11 21:23:36'),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0,'2022-12-11 21:23:36'),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0,'2022-12-11 21:23:36'),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0,'2022-12-11 21:23:36'),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0,'2022-12-11 21:23:36'),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0,'2022-12-11 21:23:36'),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,0,'2022-12-11 21:23:36'),(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,14,0,'2022-12-11 21:23:36'),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0,'2022-12-11 21:23:36'),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0,'2022-12-11 21:23:36'),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0,'2022-12-11 21:23:36'),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0,'2022-12-11 21:23:36'),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0,'2022-12-11 21:23:36'),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0,'2022-12-11 21:23:36'),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0,'2022-12-11 21:23:36'),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0,'2022-12-11 21:23:36'),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0,'2022-12-11 21:23:36'),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0,'2022-12-11 21:23:36'),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0,'2022-12-11 21:23:36'),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0,'2022-12-11 21:23:36'),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0,'2022-12-11 21:23:36'),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0,'2022-12-11 21:23:36'),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0,'2022-12-11 21:23:36'),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0,'2022-12-11 21:23:36'),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0,'2022-12-11 21:23:36'),(81,'Read sales orders','commande',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(82,'Creeat/modify sales orders','commande',1,'creer',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(84,'Validate sales orders','commande',1,'order_advance','validate','d',0,0,0,'2022-12-11 21:23:42'),(85,'Generate the documents sales orders','commande',1,'order_advance','generetedoc','d',0,0,0,'2022-12-11 21:23:42'),(86,'Send sales orders by email','commande',1,'order_advance','send','d',0,0,0,'2022-12-11 21:23:42'),(87,'Close sale orders','commande',1,'order_advance','close','d',0,0,0,'2022-12-11 21:23:42'),(88,'Cancel sale orders','commande',1,'order_advance','annuler','d',0,0,0,'2022-12-11 21:23:42'),(89,'Delete sales orders','commande',1,'supprimer',NULL,'d',0,0,0,'2022-12-11 21:23:42'),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0,'2022-12-11 21:23:36'),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0,'2022-12-11 21:23:36'),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0,'2022-12-11 21:23:36'),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0,'2022-12-11 21:23:36'),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0,'2022-12-11 21:23:36'),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0,'2022-12-11 21:23:36'),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0,'2022-12-11 21:23:36'),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0,'2022-12-11 21:23:36'),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,40,0,'2022-12-11 21:23:36'),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,40,0,'2022-12-11 21:23:36'),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,40,0,'2022-12-11 21:23:36'),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,40,0,'2022-12-11 21:23:36'),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,40,0,'2022-12-11 21:23:36'),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,40,0,'2022-12-11 21:23:36'),(111,'Read bank account and transactions','banque',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0,'2022-12-11 21:23:36'),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0,'2022-12-11 21:23:36'),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,0,0,'2022-12-11 21:23:42'),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0,'2022-12-11 21:23:36'),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0,'2022-12-11 21:23:36'),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0,'2022-12-11 21:23:36'),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0,'2022-12-11 21:23:36'),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0,'2022-12-11 21:23:36'),(121,'Read third parties','societe',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0,'2022-12-11 21:23:36'),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0,'2022-12-11 21:23:36'),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,0,0,'2022-12-11 21:23:43'),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0,'2022-12-11 21:23:36'),(126,'Export third parties','societe',1,'export',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0,'2022-12-11 21:23:36'),(130,'Modify thirdparty information payment','societe',1,'thirdparty_paymentinformation_advance','write','w',0,0,0,'2022-12-11 21:23:43'),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0,'2022-12-11 21:23:36'),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0,'2022-12-11 21:23:36'),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0,'2022-12-11 21:23:36'),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0,'2022-12-11 21:23:36'),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0,'2022-12-11 21:23:36'),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0,'2022-12-11 21:23:36'),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0,'2022-12-11 21:23:36'),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0,'2022-12-11 21:23:36'),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0,'2022-12-11 21:23:36'),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0,'2022-12-11 21:23:36'),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0,'2022-12-11 21:23:36'),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0,'2022-12-11 21:23:36'),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0,'2022-12-11 21:23:36'),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0,'2022-12-11 21:23:36'),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0,'2022-12-11 21:23:36'),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0,'2022-12-11 21:23:36'),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0,'2022-12-11 21:23:36'),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0,'2022-12-11 21:23:36'),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0,'2022-12-11 21:23:36'),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0,'2022-12-11 21:23:36'),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0,'2022-12-11 21:23:36'),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0,'2022-12-11 21:23:36'),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0,'2022-12-11 21:23:36'),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0,'2022-12-11 21:23:36'),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0,'2022-12-11 21:23:36'),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0,'2022-12-11 21:23:36'),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0,'2022-12-11 21:23:36'),(251,'Read information of other users, groups and permissions','user',1,'user','lire','r',0,0,0,'2022-12-11 21:23:44'),(252,'Read permissions of other users','user',1,'user_advance','readperms','r',0,0,0,'2022-12-11 21:23:44'),(253,'Create/modify internal and external users, groups and permissions','user',1,'user','creer','w',0,0,0,'2022-12-11 21:23:44'),(254,'Create/modify external users only','user',1,'user_advance','write','w',0,0,0,'2022-12-11 21:23:44'),(255,'Modify the password of other users','user',1,'user','password','w',0,0,0,'2022-12-11 21:23:44'),(256,'Delete or disable other users','user',1,'user','supprimer','d',0,0,0,'2022-12-11 21:23:44'),(262,'Read all third parties (and their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,0,0,'2022-12-11 21:23:43'),(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,9,0,'2022-12-11 21:23:36'),(281,'Read contacts','societe',1,'contact','lire','r',0,0,0,'2022-12-11 21:23:43'),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0,'2022-12-11 21:23:36'),(282,'Create and update contact','societe',1,'contact','creer','w',0,0,0,'2022-12-11 21:23:43'),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0,'2022-12-11 21:23:36'),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,0,0,'2022-12-11 21:23:43'),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0,'2022-12-11 21:23:36'),(286,'Export contacts','societe',1,'contact','export','d',0,0,0,'2022-12-11 21:23:43'),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0,'2022-12-11 21:23:36'),(301,'Generate PDF sheets of barcodes','barcode',1,'read',NULL,'r',1,0,0,'2022-12-11 21:23:42'),(304,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0,'2022-12-11 21:23:42'),(305,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(341,'Read its own permissions','user',1,'self_advance','readperms','r',0,0,0,'2022-12-11 21:23:44'),(342,'Create/modify of its own user','user',1,'self','creer','w',0,0,0,'2022-12-11 21:23:44'),(343,'Modify its own password','user',1,'self','password','w',0,0,0,'2022-12-11 21:23:44'),(344,'Modify its own permissions','user',1,'self_advance','writeperms','w',0,0,0,'2022-12-11 21:23:44'),(351,'Read groups','user',1,'group_advance','read','r',0,0,0,'2022-12-11 21:23:44'),(352,'Read permissions of groups','user',1,'group_advance','readperms','r',0,0,0,'2022-12-11 21:23:44'),(353,'Create/modify groups and permissions','user',1,'group_advance','write','w',0,0,0,'2022-12-11 21:23:44'),(354,'Delete groups','user',1,'group_advance','delete','d',0,0,0,'2022-12-11 21:23:44'),(358,'Export all users','user',1,'user','export','r',0,0,0,'2022-12-11 21:23:44'),(511,'Read employee salaries and payments (yours and your subordinates)','salaries',1,'read',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,0,0,'2022-12-11 21:23:43'),(517,'Read salaries and payments of all employees','salaries',1,'readall',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(519,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(521,'Read loans','loan',1,'read',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0,'2022-12-11 21:23:36'),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0,'2022-12-11 21:23:36'),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0,'2022-12-11 21:23:36'),(531,'Read services','service',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(532,'Create/modify services','service',1,'creer',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(533,'Read prices services','service',1,'service_advance','read_prices','w',0,0,0,'2022-12-11 21:23:43'),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,0,0,'2022-12-11 21:23:43'),(538,'Export services','service',1,'export',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(561,'Read bank transfer payment orders','paymentbybanktransfer',1,'read',NULL,'r',0,52,0,'2022-12-11 21:23:36'),(562,'Create/modify a bank transfer payment order','paymentbybanktransfer',1,'create',NULL,'w',0,52,0,'2022-12-11 21:23:36'),(563,'Send/Transmit bank transfer payment order','paymentbybanktransfer',1,'send',NULL,'a',0,52,0,'2022-12-11 21:23:36'),(564,'Record Debits/Rejects of bank transfer payment order','paymentbybanktransfer',1,'debit',NULL,'a',0,52,0,'2022-12-11 21:23:36'),(610,'Read attributes of variants','variants',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:36'),(611,'Create/Update attributes of variants','variants',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:36'),(612,'Delete attributes of variants','variants',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:36'),(651,'Read bom of Bom','bom',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(652,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(653,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(661,'Read Manufacturing Order','mrp',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(662,'Create/Update Manufacturing Order','mrp',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(663,'Delete Manufacturing Order','mrp',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0,'2022-12-11 21:23:36'),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0,'2022-12-11 21:23:36'),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0,'2022-12-11 21:23:36'),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0,'2022-12-11 21:23:36'),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0,'2022-12-11 21:23:36'),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0,'2022-12-11 21:23:36'),(750,'Read job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','read','w',0,0,0,'2022-12-11 21:23:43'),(751,'Create/Update job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','write','w',0,0,0,'2022-12-11 21:23:43'),(752,'Delete Job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','delete','w',0,0,0,'2022-12-11 21:23:43'),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,0,0,'2022-12-11 21:23:42'),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0,'2022-12-11 21:23:36'),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0,'2022-12-11 21:23:36'),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0,'2022-12-11 21:23:36'),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0,'2022-12-11 21:23:36'),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0,'2022-12-11 21:23:36'),(1011,'inventoryReadPermission','stock',1,'inventory_advance','read','w',0,39,0,'2022-12-11 21:23:36'),(1012,'inventoryCreatePermission','stock',1,'inventory_advance','write','w',0,39,0,'2022-12-11 21:23:36'),(1101,'Read delivery receipts','expedition',1,'delivery','lire','r',0,40,0,'2022-12-11 21:23:36'),(1102,'Create/modify delivery receipts','expedition',1,'delivery','creer','w',0,40,0,'2022-12-11 21:23:36'),(1104,'Validate delivery receipts','expedition',1,'delivery_advance','validate','d',0,40,0,'2022-12-11 21:23:36'),(1109,'Delete delivery receipts','expedition',1,'delivery','supprimer','d',0,40,0,'2022-12-11 21:23:36'),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,35,0,'2022-12-11 21:23:36'),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,0,0,'2022-12-11 21:23:42'),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,0,0,'2022-12-11 21:23:42'),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,0,0,'2022-12-11 21:23:42'),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,0,0,'2022-12-11 21:23:42'),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,0,0,'2022-12-11 21:23:43'),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,0,0,'2022-12-11 21:23:43'),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,0,0,'2022-12-11 21:23:43'),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,0,0,'2022-12-11 21:23:43'),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,0,0,'2022-12-11 21:23:43'),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0,'2022-12-11 21:23:36'),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0,'2022-12-11 21:23:36'),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,0,0,'2022-12-11 21:23:43'),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,0,0,'2022-12-11 21:23:43'),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,0,0,'2022-12-11 21:23:43'),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,0,0,'2022-12-11 21:23:43'),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,0,0,'2022-12-11 21:23:43'),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,0,0,'2022-12-11 21:23:43'),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0,'2022-12-11 21:23:36'),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,0,0,'2022-12-11 21:23:42'),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0,'2022-12-11 21:23:36'),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,0,0,'2022-12-11 21:23:42'),(1421,'Export sales orders and attributes','commande',1,'commande','export','r',0,0,0,'2022-12-11 21:23:42'),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,0,0,'2022-12-11 21:23:42'),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0,'2022-12-11 21:23:36'),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,0,0,'2022-12-11 21:23:42'),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0,'2022-12-11 21:23:36'),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,0,0,'2022-12-11 21:23:42'),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0,'2022-12-11 21:23:36'),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,0,0,'2022-12-11 21:23:42'),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0,'2022-12-11 21:23:36'),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,0,0,'2022-12-11 21:23:42'),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0,'2022-12-11 21:23:36'),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,0,0,'2022-12-11 21:23:42'),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0,'2022-12-11 21:23:36'),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(2501,'Read or download documents','ecm',1,'read',NULL,'r',0,0,0,'2022-12-11 21:23:42'),(2503,'Upload a document','ecm',1,'upload',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(2515,'Administer directories of documents','ecm',1,'setup',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(2610,'Générer / modifier la clé API des utilisateurs','api',1,'apikey','generate','w',0,24,0,'2022-12-11 21:23:36'),(3201,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0,76,0,'2022-12-11 21:23:36'),(10001,'Read website content','website',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(10005,'Delete website content','website',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(10008,'Export website content','website',1,'export',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(20001,'Read leave requests (yours and your subordinates)','holiday',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0,'2022-12-11 21:23:36'),(20002,'Create/modify leave requests','holiday',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0,'2022-12-11 21:23:36'),(20004,'Read leave requests for everybody','holiday',1,'readall',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0,'2022-12-11 21:23:36'),(20005,'Create/modify leave requests for everybody','holiday',1,'writeall',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0,'2022-12-11 21:23:36'),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0,'2022-12-11 21:23:36'),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,0,0,'2022-12-11 21:23:42'),(50151,'Use Point Of Sale (record a sale, add products, record payment)','takepos',1,'run',NULL,'a',0,0,0,'2022-12-11 21:23:44'),(50152,'Can modify added sales lines (prices, discount)','takepos',1,'editlines',NULL,'a',0,0,0,'2022-12-11 21:23:44'),(50153,'Edit ordered sales lines (useful only when option \"Order printers\" has been enabled). Allow to edit sales lines even after the order has been printed','takepos',1,'editorderedlines',NULL,'a',0,0,0,'2022-12-11 21:23:44'),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0,'2022-12-11 21:23:36'),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0,'2022-12-11 21:23:36'),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0,'2022-12-11 21:23:36'),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0,'2022-12-11 21:23:36'),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0,'2022-12-11 21:23:36'),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0,'2022-12-11 21:23:36'),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0,'2022-12-11 21:23:36'),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0,'2022-12-11 21:23:36'),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0,'2022-12-11 21:23:36'),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,0,0,'2022-12-11 21:23:43'),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:43'),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,0,0,'2022-12-11 21:23:44'),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,0,0,'2022-12-11 21:23:44'),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,0,0,'2022-12-11 21:23:44'),(57001,'Read articles','knowledgemanagement',1,'knowledgerecord','read','w',0,90,0,'2022-12-11 21:23:36'),(57002,'Create/Update articles','knowledgemanagement',1,'knowledgerecord','write','w',0,90,0,'2022-12-11 21:23:36'),(57003,'Delete articles','knowledgemanagement',1,'knowledgerecord','delete','w',0,90,0,'2022-12-11 21:23:36'),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0,'2022-12-11 21:23:36'),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0,'2022-12-11 21:23:36'),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0,'2022-12-11 21:23:36'),(63001,'Read resources','resource',1,'read',NULL,'w',0,16,0,'2022-12-11 21:23:36'),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,16,0,'2022-12-11 21:23:36'),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,16,0,'2022-12-11 21:23:36'),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,16,0,'2022-12-11 21:23:36'),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0,'2022-12-11 21:23:36'),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0,'2022-12-11 21:23:36'),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0,'2022-12-11 21:23:36'),(941601,'Lire les receptions','reception',1,'lire',NULL,'r',0,40,0,'2022-12-11 21:23:36'),(941602,'Creer modifier les receptions','reception',1,'creer',NULL,'w',0,40,0,'2022-12-11 21:23:36'),(941603,'Valider les receptions','reception',1,'reception_advance','validate','d',0,40,0,'2022-12-11 21:23:36'),(941604,'Envoyer les receptions aux clients','reception',1,'reception_advance','send','d',0,40,0,'2022-12-11 21:23:36'),(941605,'Exporter les receptions','reception',1,'reception','export','r',0,40,0,'2022-12-11 21:23:36'),(941606,'Supprimer les receptions','reception',1,'supprimer',NULL,'d',0,40,0,'2022-12-11 21:23:36'); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; @@ -11992,7 +12090,7 @@ DROP TABLE IF EXISTS `llx_salary`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_salary` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(30) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_user` int(11) NOT NULL, @@ -12002,12 +12100,12 @@ CREATE TABLE `llx_salary` ( `amount` double(24,8) NOT NULL DEFAULT 0.00000000, `fk_projet` int(11) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, - `num_payment` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `datesp` date DEFAULT NULL, `dateep` date DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `paye` smallint(6) NOT NULL DEFAULT 0, `fk_account` int(11) DEFAULT NULL, @@ -12038,7 +12136,7 @@ CREATE TABLE `llx_salary_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_salary_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -12063,7 +12161,7 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistcontent`; CREATE TABLE `llx_sellyoursaas_blacklistcontent` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `content` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `content` varchar(128) NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` int(11) NOT NULL DEFAULT 1, @@ -12081,6 +12179,35 @@ LOCK TABLES `llx_sellyoursaas_blacklistcontent` WRITE; /*!40000 ALTER TABLE `llx_sellyoursaas_blacklistcontent` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_sellyoursaas_blacklistdir` +-- + +DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistdir`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_sellyoursaas_blacklistdir` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT 1, + `content` varchar(128) NOT NULL, + `noblacklistif` varchar(255) DEFAULT NULL, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `status` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_sellyoursaas_blacklistdir_content` (`content`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_sellyoursaas_blacklistdir` +-- + +LOCK TABLES `llx_sellyoursaas_blacklistdir` WRITE; +/*!40000 ALTER TABLE `llx_sellyoursaas_blacklistdir` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_sellyoursaas_blacklistdir` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_sellyoursaas_blacklistfrom` -- @@ -12091,12 +12218,12 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistfrom`; CREATE TABLE `llx_sellyoursaas_blacklistfrom` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `content` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `content` varchar(128) NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), - KEY `idx_sellyoursaas_blacklistfrom_content` (`content`) + UNIQUE KEY `uk_sellyoursaas_blacklistfrom_content` (`content`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12119,12 +12246,14 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistip`; CREATE TABLE `llx_sellyoursaas_blacklistip` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `content` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `content` varchar(128) NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` int(11) NOT NULL DEFAULT 1, + `date_use` datetime DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), - KEY `idx_sellyoursaas_blacklistip_content` (`content`) + UNIQUE KEY `uk_sellyoursaas_blacklistip_content` (`content`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12147,7 +12276,7 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistmail`; CREATE TABLE `llx_sellyoursaas_blacklistmail` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `content` text COLLATE utf8mb3_unicode_ci NOT NULL, + `content` text NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` int(11) NOT NULL DEFAULT 1, @@ -12175,12 +12304,12 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_blacklistto`; CREATE TABLE `llx_sellyoursaas_blacklistto` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `content` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `content` varchar(128) NOT NULL, `date_creation` datetime NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), - KEY `idx_sellyoursaas_blacklistto_content` (`content`) + UNIQUE KEY `uk_sellyoursaas_blacklistto_content` (`content`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12193,6 +12322,39 @@ LOCK TABLES `llx_sellyoursaas_blacklistto` WRITE; /*!40000 ALTER TABLE `llx_sellyoursaas_blacklistto` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_sellyoursaas_deploymentserver` +-- + +DROP TABLE IF EXISTS `llx_sellyoursaas_deploymentserver`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_sellyoursaas_deploymentserver` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) NOT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `note_private` text DEFAULT NULL, + `date_creation` datetime NOT NULL, + `date_modification` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `status` int(11) NOT NULL DEFAULT 0, + `fk_country` int(11) DEFAULT NULL, + `fromdomainname` varchar(128) DEFAULT NULL, + `ipaddress` varchar(128) NOT NULL, + `servercustomerannounce` text DEFAULT NULL, + `servercustomerannouncestatus` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_sellyoursaas_deploymentserver` +-- + +LOCK TABLES `llx_sellyoursaas_deploymentserver` WRITE; +/*!40000 ALTER TABLE `llx_sellyoursaas_deploymentserver` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_sellyoursaas_deploymentserver` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_session` -- @@ -12201,12 +12363,12 @@ DROP TABLE IF EXISTS `llx_session`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_session` ( - `session_id` varchar(50) CHARACTER SET utf8mb4 NOT NULL, - `session_variable` text CHARACTER SET utf8mb4 DEFAULT NULL, + `session_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `session_variable` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `last_accessed` datetime NOT NULL, `fk_user` int(11) NOT NULL, - `remote_ip` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL, - `user_agent` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `remote_ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, PRIMARY KEY (`session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12233,42 +12395,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `nom` varchar(128) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_client` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_fournisseur` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_compta` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_compta_fournisseur` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(25) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, `fk_departement` int(11) DEFAULT 0, `fk_pays` int(11) DEFAULT 0, - `phone` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fax` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `phone` varchar(20) DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, + `socialnetworks` text DEFAULT NULL, `fk_effectif` int(11) DEFAULT 0, `fk_typent` int(11) DEFAULT NULL, `fk_forme_juridique` int(11) DEFAULT 0, - `fk_currency` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `siren` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `siret` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ape` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof4` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `tva_intra` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, `capital` double(24,8) DEFAULT NULL, `fk_stcomm` int(11) NOT NULL DEFAULT 0, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `prefix_comm` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `prefix_comm` varchar(5) DEFAULT NULL, `client` tinyint(4) DEFAULT 0, `fournisseur` tinyint(4) DEFAULT 0, - `supplier_account` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fk_prospectlevel` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `supplier_account` varchar(32) DEFAULT NULL, + `fk_prospectlevel` varchar(12) DEFAULT NULL, `customer_bad` tinyint(4) DEFAULT 0, `customer_rate` double DEFAULT 0, `supplier_rate` double DEFAULT 0, @@ -12278,7 +12440,7 @@ CREATE TABLE `llx_societe` ( `remise_supplier` double DEFAULT 0, `mode_reglement` tinyint(4) DEFAULT NULL, `cond_reglement` tinyint(4) DEFAULT NULL, - `deposit_percent` varchar(63) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `deposit_percent` varchar(63) DEFAULT NULL, `transport_mode` tinyint(4) DEFAULT NULL, `mode_reglement_supplier` int(11) DEFAULT NULL, `outstanding_limit` double(24,8) DEFAULT NULL, @@ -12292,29 +12454,30 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `barcode` varchar(255) DEFAULT NULL, `price_level` int(11) DEFAULT NULL, - `default_lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `canvas` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `default_lang` varchar(6) DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` tinyint(4) DEFAULT 1, - `logo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof5` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idprof6` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `logo` varchar(255) DEFAULT NULL, + `idprof5` varchar(128) DEFAULT NULL, + `idprof6` varchar(128) DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT 0, - `webservices_url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `webservices_key` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `name_alias` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `webservices_url` varchar(255) DEFAULT NULL, + `webservices_key` varchar(128) DEFAULT NULL, + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, + `name_alias` varchar(128) DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, - `location_incoterms` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `location_incoterms` varchar(255) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_warehouse` int(11) DEFAULT NULL, - `logo_squarred` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `logo_squarred` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), UNIQUE KEY `uk_societe_code_client` (`code_client`,`entity`), @@ -12323,7 +12486,8 @@ 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`), - KEY `idx_societe_warehouse` (`fk_warehouse`) + KEY `idx_societe_warehouse` (`fk_warehouse`), + KEY `idx_societe_nom` (`nom`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12333,7 +12497,7 @@ CREATE TABLE `llx_societe` ( LOCK TABLES `llx_societe` WRITE; /*!40000 ALTER TABLE `llx_societe` DISABLE KEYS */; -INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(10,0,NULL,'2020-01-13 12:57:02','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011','411CU12120005','401SU16010011','',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,'aa < aa
\r\ndddd',NULL,1,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,NULL,NULL,'The OpenSource company',0,NULL,'generic_odt:/home/ldestailleur/git/dolibarr_11.0/documents/doctemplates/thirdparties/template_thirdparty.ods',0,'',NULL,0,NULL),(11,0,NULL,'2019-11-28 11:52:58','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','{\"skype\":\"corp1\"}',1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(13,0,NULL,'2019-10-08 09:57:51','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,'CU1910-00021','SU1510-0008','411CU191000021','401SU15100008','',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(17,0,NULL,'2019-11-28 15:02:49','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,'Paris',0,1,NULL,NULL,NULL,NULL,'[]',1,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,0,NULL),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(29,0,NULL,'2020-01-13 12:56:22','2020-01-06 00:39:58','Patient',1,NULL,NULL,'CU2001-00022',NULL,'411CU200100022',NULL,'',NULL,NULL,0,117,'01','02',NULL,NULL,'null',NULL,NULL,NULL,NULL,'','','','','',NULL,0,'aa < ddd',NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.000,NULL,0.000,NULL,NULL,NULL,'patient@cabinetmed',NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(30,0,NULL,'2020-01-17 14:21:26','2020-01-13 17:19:24','Italo',1,NULL,NULL,'CU2001-00023',NULL,'411CU200100023',NULL,'12 Alagio','123','Milano',777,3,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,0,0.000,NULL,4,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL); +INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,0,'',NULL,0,NULL),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(10,0,NULL,'2020-01-13 12:57:02','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011','411CU12120005','401SU16010011','',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,'aa < aa
\r\ndddd',NULL,1,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,NULL,NULL,'The OpenSource company',0,NULL,'generic_odt:/home/ldestailleur/git/dolibarr_11.0/documents/doctemplates/thirdparties/template_thirdparty.ods',NULL,0,'',NULL,0,NULL),(11,0,NULL,'2019-11-28 11:52:58','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','{\"skype\":\"corp1\"}',1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,0,'',NULL,0,NULL),(13,0,NULL,'2019-10-08 09:57:51','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,'CU1910-00021','SU1510-0008','411CU191000021','401SU15100008','',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL),(17,0,NULL,'2019-11-28 15:02:49','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,'Paris',0,1,NULL,NULL,NULL,NULL,'[]',1,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,NULL,0,NULL),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL),(29,0,NULL,'2020-01-13 12:56:22','2020-01-06 00:39:58','Patient',1,NULL,NULL,'CU2001-00022',NULL,'411CU200100022',NULL,'',NULL,NULL,0,117,'01','02',NULL,NULL,'null',NULL,NULL,NULL,NULL,'','','','','',NULL,0,'aa < ddd',NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.000,NULL,0.000,NULL,NULL,NULL,'patient@cabinetmed',NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,0,'',NULL,0,NULL),(30,0,NULL,'2020-01-17 14:21:26','2020-01-13 17:19:24','Italo',1,NULL,NULL,'CU2001-00023',NULL,'411CU200100023',NULL,'12 Alagio','123','Milano',777,3,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,0,0.000,NULL,4,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,1,'EUR',NULL,0,NULL); /*!40000 ALTER TABLE `llx_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -12347,24 +12511,24 @@ DROP TABLE IF EXISTS `llx_societe_account`; CREATE TABLE `llx_societe_account` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `login` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `pass_encoding` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass_crypted` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass_temp` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `login` varchar(128) NOT NULL, + `pass_encoding` varchar(24) DEFAULT NULL, + `pass_crypted` varchar(128) DEFAULT NULL, + `pass_temp` varchar(128) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `site` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `site` varchar(128) DEFAULT NULL, `fk_website` int(11) DEFAULT NULL, - `note_private` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` mediumtext DEFAULT NULL, `date_last_login` datetime DEFAULT NULL, `date_previous_login` datetime DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` int(11) DEFAULT NULL, - `key_account` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `site_account` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `key_account` varchar(128) DEFAULT NULL, + `site_account` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_account_login_website_soc` (`entity`,`fk_soc`,`login`,`site`,`fk_website`), UNIQUE KEY `uk_societe_account_key_account_soc` (`entity`,`fk_soc`,`key_account`,`site`,`fk_website`), @@ -12398,16 +12562,16 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(30) DEFAULT NULL, `fk_soc` int(11) DEFAULT 0, - `name` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `name` varchar(60) DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `zip` varchar(10) DEFAULT NULL, + `town` varchar(50) DEFAULT NULL, `fk_pays` int(11) DEFAULT 0, - `phone` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fax` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `phone` varchar(20) DEFAULT NULL, + `fax` varchar(20) DEFAULT NULL, + `note` text DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -12434,7 +12598,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_commerciaux` (`fk_soc`,`fk_user`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -12465,7 +12629,7 @@ CREATE TABLE `llx_societe_contacts` ( `fk_c_type_contact` int(11) NOT NULL, `fk_socpeople` int(11) NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_societe_contacts_idx1` (`entity`,`fk_soc`,`fk_c_type_contact`,`fk_socpeople`), KEY `fk_societe_contacts_fk_c_type_contact` (`fk_c_type_contact`), @@ -12497,10 +12661,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `height` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `weight` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `prof` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `height` varchar(128) DEFAULT NULL, + `weight` varchar(128) DEFAULT NULL, + `prof` varchar(128) DEFAULT NULL, `birthdate` date DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_extrafields` (`fk_object`) @@ -12528,10 +12692,10 @@ CREATE TABLE `llx_societe_perentity` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `accountancy_code_customer` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_supplier` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_sell` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code_buy` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `accountancy_code_customer` varchar(24) DEFAULT NULL, + `accountancy_code_supplier` varchar(24) DEFAULT NULL, + `accountancy_code_sell` varchar(32) DEFAULT NULL, + `accountancy_code_buy` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_perentity` (`fk_soc`,`entity`), KEY `idx_societe_perentity_fk_soc` (`fk_soc`) @@ -12590,7 +12754,7 @@ 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12625,14 +12789,16 @@ 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 COLLATE utf8mb3_unicode_ci NOT NULL, + `description` text 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, `fk_invoice_supplier_line` int(11) DEFAULT NULL, `fk_invoice_supplier` int(11) DEFAULT NULL, `fk_invoice_supplier_source` int(11) DEFAULT NULL, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', + `multicurrency_code` varchar(3) DEFAULT NULL, + `multicurrency_tx` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_societe_remise_except_fk_user` (`fk_user`), KEY `idx_societe_remise_except_fk_soc` (`fk_soc`), @@ -12661,7 +12827,7 @@ CREATE TABLE `llx_societe_remise_except` ( LOCK TABLES `llx_societe_remise_except` WRITE; /*!40000 ALTER TABLE `llx_societe_remise_except` DISABLE KEYS */; -INSERT INTO `llx_societe_remise_except` VALUES (2,1,19,0,'2015-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,NULL,NULL,NULL,'hfghgf',0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,''),(14,1,17,1,'2020-01-01 22:06:30',79.16444000,9.89556000,89.06000000,12.500,12,NULL,NULL,NULL,'(CREDIT_NOTE)',0.00000000,0.00000000,0.00000000,NULL,NULL,27,''),(15,1,19,0,'2020-01-16 02:34:47',20.50000000,0.00000000,20.50000000,0.000,12,1065,NULL,224,'(DEPOSIT)',20.50000000,0.00000000,20.50000000,NULL,NULL,NULL,''),(16,1,1,0,'2020-01-19 14:49:41',10.00000000,1.96000000,11.96000000,19.600,12,NULL,NULL,NULL,'111',10.00000000,1.96000000,11.96000000,NULL,NULL,NULL,''),(19,1,1,0,'2020-01-19 15:16:27',48.60000000,1.94000000,50.54000000,4.000,12,NULL,NULL,228,'(DEPOSIT)',48.60000000,1.94000000,50.54000000,NULL,NULL,NULL,''); +INSERT INTO `llx_societe_remise_except` VALUES (2,1,19,0,'2015-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,NULL,NULL,NULL,'hfghgf',0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,'',NULL,NULL),(14,1,17,1,'2020-01-01 22:06:30',79.16444000,9.89556000,89.06000000,12.500,12,NULL,NULL,NULL,'(CREDIT_NOTE)',0.00000000,0.00000000,0.00000000,NULL,NULL,27,'',NULL,NULL),(15,1,19,0,'2020-01-16 02:34:47',20.50000000,0.00000000,20.50000000,0.000,12,1065,NULL,224,'(DEPOSIT)',20.50000000,0.00000000,20.50000000,NULL,NULL,NULL,'',NULL,NULL),(16,1,1,0,'2020-01-19 14:49:41',10.00000000,1.96000000,11.96000000,19.600,12,NULL,NULL,NULL,'111',10.00000000,1.96000000,11.96000000,NULL,NULL,NULL,'',NULL,NULL),(19,1,1,0,'2020-01-19 15:16:27',48.60000000,1.94000000,50.54000000,4.000,12,NULL,NULL,228,'(DEPOSIT)',48.60000000,1.94000000,50.54000000,NULL,NULL,NULL,'',NULL,NULL); /*!40000 ALTER TABLE `llx_societe_remise_except` ENABLE KEYS */; UNLOCK TABLES; @@ -12680,7 +12846,7 @@ CREATE TABLE `llx_societe_remise_supplier` ( `datec` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `remise_supplier` double(6,3) NOT NULL DEFAULT 0.000, - `note` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` mediumtext DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12704,44 +12870,47 @@ DROP TABLE IF EXISTS `llx_societe_rib`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_rib` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `type` varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL, + `type` varchar(32) NOT NULL, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `label` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bank` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_banque` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_guichet` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_rib` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bic` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `iban_prefix` varchar(34) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `domiciliation` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `proprio` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `owner_address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(200) 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` varchar(255) DEFAULT NULL, `default_rib` smallint(6) NOT NULL DEFAULT 0, - `rum` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `state_id` int(11) DEFAULT NULL, + `fk_country` int(11) DEFAULT NULL, + `currency_code` varchar(3) DEFAULT NULL, + `rum` varchar(32) DEFAULT NULL, `date_rum` date DEFAULT NULL, - `frstrecur` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT 'FRST', - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `last_four` varchar(4) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `card_type` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cvn` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `frstrecur` varchar(16) DEFAULT 'FRST', + `import_key` varchar(14) DEFAULT NULL, + `last_four` varchar(4) DEFAULT NULL, + `card_type` varchar(255) DEFAULT NULL, + `cvn` varchar(255) DEFAULT NULL, `exp_date_month` int(11) DEFAULT NULL, `exp_date_year` int(11) DEFAULT NULL, - `country_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `country_code` varchar(10) DEFAULT NULL, `approved` int(11) DEFAULT 0, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, `ending_date` date DEFAULT NULL, `max_total_amount_of_all_payments` double(24,8) DEFAULT NULL, - `preapproval_key` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `preapproval_key` varchar(255) DEFAULT NULL, `starting_date` date DEFAULT NULL, `total_amount_of_all_payments` double(24,8) DEFAULT NULL, - `stripe_card_ref` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `stripe_card_ref` varchar(128) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT 1, - `comment` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ipaddress` varchar(68) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `stripe_account` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, + `ipaddress` varchar(68) DEFAULT NULL, + `stripe_account` varchar(128) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12752,7 +12921,7 @@ CREATE TABLE `llx_societe_rib` ( LOCK TABLES `llx_societe_rib` WRITE; /*!40000 ALTER TABLE `llx_societe_rib` DISABLE KEYS */; -INSERT INTO `llx_societe_rib` VALUES (1,'ban',19,'2017-02-21 15:50:32','2017-02-21 11:53:08','Morgan Bank','Morgan Bank','','','','','PSPBFIHH','ES80 2310 0001 1800 0001 2345','Royal via,\r\nMadrid','Mr Esposito','10 via ferrata,\r\nMadrid',1,'RUM1301-0008-0',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL); +INSERT INTO `llx_societe_rib` VALUES (1,'ban',19,'2017-02-21 15:50:32','2017-02-21 11:53:08','Morgan Bank','Morgan Bank','','','','','PSPBFIHH','ES80 2310 0001 1800 0001 2345','Royal via,\r\nMadrid','Mr Esposito','10 via ferrata,\r\nMadrid',1,NULL,NULL,NULL,'RUM1301-0008-0',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_societe_rib` ENABLE KEYS */; UNLOCK TABLES; @@ -12769,39 +12938,40 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `civility` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `firstname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(25) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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 DEFAULT NULL, `fk_departement` int(11) DEFAULT NULL, `fk_pays` int(11) DEFAULT 0, `birthday` date DEFAULT NULL, - `poste` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone_perso` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `phone_mobile` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fax` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `photo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `poste` varchar(255) 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, + `socialnetworks` text DEFAULT NULL, + `photo` varchar(255) DEFAULT NULL, `priv` smallint(6) NOT NULL DEFAULT 0, - `fk_prospectcontactlevel` varchar(12) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_prospectcontactlevel` varchar(12) DEFAULT NULL, `fk_stcommcontact` int(11) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `default_lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `canvas` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `default_lang` varchar(6) DEFAULT NULL, + `canvas` varchar(32) DEFAULT NULL, + `import_key` varchar(14) 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`), + KEY `idx_socpeople_lastname` (`lastname`), 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=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -12828,7 +12998,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_socpeople_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -12860,13 +13030,13 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `fk_origin` int(11) DEFAULT NULL, - `origintype` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `origintype` varchar(64) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `fk_projet` int(11) NOT NULL DEFAULT 0, - `inventorycode` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `batch` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `inventorycode` varchar(128) DEFAULT NULL, + `batch` varchar(128) DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `fk_project` int(11) DEFAULT NULL, @@ -12897,7 +13067,7 @@ CREATE TABLE `llx_stock_mouvement_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_stock_mouvement_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -12928,7 +13098,7 @@ CREATE TABLE `llx_subscription` ( `datef` datetime DEFAULT NULL, `subscription` double(24,8) DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `fk_type` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -12956,10 +13126,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) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(30) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_ext` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_int` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_ext` varchar(255) DEFAULT NULL, + `ref_int` varchar(255) 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(), @@ -12981,23 +13151,23 @@ CREATE TABLE `llx_supplier_proposal` ( `localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, - `fk_currency` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `fk_currency` varchar(3) DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, + `note_public` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `extraparams` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `extraparams` varchar(255) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13023,7 +13193,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_supplier_proposal_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13050,15 +13220,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, `tva_tx` double(6,3) DEFAULT 0.000, - `vat_src_code` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT '', + `vat_src_code` varchar(10) DEFAULT '', `localtax1_tx` double(6,3) DEFAULT 0.000, - `localtax1_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax1_type` varchar(10) DEFAULT NULL, `localtax2_tx` double(6,3) DEFAULT 0.000, - `localtax2_type` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `localtax2_type` varchar(10) DEFAULT NULL, `qty` double DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, @@ -13075,9 +13245,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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_fourn` varchar(30) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, - `multicurrency_code` varchar(3) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `multicurrency_code` varchar(3) 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, @@ -13115,7 +13285,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_supplier_proposaldet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13140,7 +13310,7 @@ DROP TABLE IF EXISTS `llx_takepos_floor_tables`; CREATE TABLE `llx_takepos_floor_tables` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `leftpos` float DEFAULT NULL, `toppos` float DEFAULT NULL, `floor` int(3) DEFAULT NULL, @@ -13171,30 +13341,32 @@ DROP TABLE IF EXISTS `llx_ticket`; CREATE TABLE `llx_ticket` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, - `track_id` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL, + `ref` varchar(128) NOT NULL, + `track_id` varchar(128) NOT NULL, `fk_soc` int(11) DEFAULT 0, `fk_project` int(11) DEFAULT 0, - `origin_email` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `origin_email` varchar(128) DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, `fk_user_assign` int(11) DEFAULT NULL, - `subject` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `message` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `subject` varchar(255) DEFAULT NULL, + `message` mediumtext DEFAULT NULL, `fk_statut` int(11) DEFAULT NULL, `resolution` int(11) DEFAULT NULL, `progress` int(11) DEFAULT NULL, - `timing` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `category_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `severity_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `timing` varchar(20) DEFAULT NULL, + `type_code` varchar(32) DEFAULT NULL, + `category_code` varchar(32) DEFAULT NULL, + `severity_code` varchar(32) DEFAULT NULL, `datec` datetime DEFAULT NULL, `date_read` datetime DEFAULT NULL, `date_last_msg_sent` datetime DEFAULT NULL, `date_close` datetime DEFAULT NULL, `notify_tiers_at_create` tinyint(4) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email_msgid` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `email_msgid` varchar(255) DEFAULT NULL, + `email_date` datetime DEFAULT NULL, + `ip` varchar(250) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ticket_track_id` (`track_id`), UNIQUE KEY `uk_ticket_ref` (`ref`,`entity`), @@ -13212,7 +13384,7 @@ CREATE TABLE `llx_ticket` ( LOCK TABLES `llx_ticket` WRITE; /*!40000 ALTER TABLE `llx_ticket` DISABLE KEYS */; -INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,0,NULL,'REQUEST','OTHER','NORMAL','2021-09-26 14:08:46',NULL,NULL,NULL,0,'2022-02-07 13:37:54',NULL,NULL),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,100,NULL,'ISSUE','OTHER','NORMAL','2021-09-26 14:10:31',NULL,NULL,'2021-10-04 13:05:55',0,'2022-02-07 13:37:54',NULL,NULL),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,0,NULL,'COM','OTHER','NORMAL','2021-10-04 12:58:04',NULL,NULL,NULL,0,'2022-02-07 13:37:54',NULL,NULL),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,0,NULL,'COM','OTHER','NORMAL','2021-11-29 12:46:29','2021-11-29 12:46:34',NULL,NULL,0,'2022-02-07 13:37:54',NULL,NULL),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,100,NULL,'COM','OTHER','NORMAL','2021-11-29 12:50:45','2021-11-29 12:52:32',NULL,'2021-11-29 12:55:48',1,'2022-02-07 13:37:54',NULL,NULL); +INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,0,NULL,'REQUEST','OTHER','NORMAL','2022-09-26 14:08:46',NULL,NULL,NULL,0,'2022-12-11 21:23:22',NULL,NULL,NULL,NULL),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,100,NULL,'ISSUE','OTHER','NORMAL','2022-09-26 14:10:31',NULL,NULL,'2022-10-04 13:05:55',0,'2022-12-11 21:23:22',NULL,NULL,NULL,NULL),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,0,NULL,'COM','OTHER','NORMAL','2022-10-04 12:58:04',NULL,NULL,NULL,0,'2022-12-11 21:23:22',NULL,NULL,NULL,NULL),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,0,NULL,'COM','OTHER','NORMAL','2022-11-29 12:46:29','2022-11-29 12:46:34',NULL,NULL,0,'2022-12-11 21:23:22',NULL,NULL,NULL,NULL),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,100,NULL,'COM','OTHER','NORMAL','2022-11-29 12:50:45','2022-11-29 12:52:32',NULL,'2022-11-29 12:55:48',1,'2022-12-11 21:23:22',NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_ticket` ENABLE KEYS */; UNLOCK TABLES; @@ -13227,7 +13399,7 @@ CREATE TABLE `llx_ticket_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `aaa` int(10) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_ticket_extrafields` (`fk_object`) @@ -13257,15 +13429,15 @@ CREATE TABLE `llx_tva` ( `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, `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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `num_payment` varchar(50) DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `paye` smallint(6) NOT NULL DEFAULT 0, `fk_account` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -13294,79 +13466,77 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `login` varchar(50) NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, - `ref_employee` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `civility` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref_employee` varchar(50) DEFAULT NULL, + `civility` varchar(6) DEFAULT NULL, + `ref_ext` varchar(50) DEFAULT NULL, `employee` smallint(6) DEFAULT 1, `fk_establishment` int(11) DEFAULT 0, - `pass` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass_crypted` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass_temp` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `api_key` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lastname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `firstname` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `job` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `office_phone` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `office_fax` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `user_mobile` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `personal_mobile` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `personal_email` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `signature` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, + `office_phone` varchar(20) DEFAULT NULL, + `office_fax` varchar(20) DEFAULT NULL, + `user_mobile` varchar(20) DEFAULT NULL, + `personal_mobile` varchar(20) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `personal_email` varchar(255) DEFAULT NULL, + `socialnetworks` text DEFAULT NULL, + `signature` text DEFAULT NULL, `admin` smallint(6) DEFAULT 0, `fk_soc` int(11) DEFAULT NULL, `fk_socpeople` int(11) DEFAULT NULL, `fk_member` int(11) DEFAULT NULL, - `note` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, `datelastlogin` datetime DEFAULT NULL, `datepreviouslogin` datetime DEFAULT NULL, `egroupware_id` int(11) DEFAULT NULL, - `ldap_sid` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ldap_sid` varchar(255) DEFAULT NULL, `statut` tinyint(4) DEFAULT 1, - `photo` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `openid` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `photo` varchar(255) DEFAULT NULL, + `lang` varchar(6) DEFAULT NULL, + `openid` varchar(255) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_user_expense_validator` int(11) DEFAULT NULL, `fk_user_holiday_validator` int(11) DEFAULT NULL, `thm` double(24,8) DEFAULT NULL, - `address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `zip` varchar(25) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `town` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `address` varchar(255) DEFAULT NULL, + `zip` varchar(25) DEFAULT NULL, + `town` varchar(50) DEFAULT NULL, `fk_state` int(11) DEFAULT 0, `fk_country` int(11) DEFAULT 0, - `color` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `accountancy_code` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `barcode` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `color` varchar(6) DEFAULT NULL, + `accountancy_code` varchar(32) DEFAULT NULL, + `barcode` varchar(255) 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `gender` varchar(10) DEFAULT NULL, + `note_public` text DEFAULT NULL, `dateemployment` datetime DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, `birth` date DEFAULT NULL, - `pass_encoding` varchar(24) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `pass_encoding` varchar(24) DEFAULT NULL, `default_range` int(11) DEFAULT NULL, `default_c_exp_tax_cat` int(11) DEFAULT NULL, `dateemploymentend` date DEFAULT NULL, `fk_warehouse` int(11) DEFAULT NULL, - `iplastlogin` varchar(250) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ippreviouslogin` varchar(250) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `iplastlogin` varchar(250) DEFAULT NULL, + `ippreviouslogin` varchar(250) DEFAULT NULL, `datelastpassvalidation` datetime DEFAULT NULL, `datestartvalidity` datetime DEFAULT NULL, `dateendvalidity` datetime DEFAULT NULL, - `idpers1` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idpers2` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `idpers3` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `national_registration_number` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `national_registration_number` varchar(50) DEFAULT NULL, + `birth_place` varchar(64) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_user_login` (`login`,`entity`), UNIQUE KEY `uk_user_fk_socpeople` (`fk_socpeople`), @@ -13383,7 +13553,7 @@ CREATE TABLE `llx_user` ( LOCK TABLES `llx_user` WRITE; /*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; -INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2021-04-15 10:42:13',NULL,NULL,'aeinstein',0,NULL,'',NULL,1,0,NULL,'$2y$10$lIvMb5RJjxqmd6OxnZLqvuLZGOXj3gxIQhZQUqcY8fQTyh0cTtUpa',NULL,NULL,'Einstein','Albert','','123456789','','','','aeinstein@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-08 13:54:48','2021-04-15 10:41:35',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Doe','David','Trainee','09123123','','','','daviddoe@example.com','','[]','',0,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-11 16:18:59','2021-04-15 10:41:35',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','','[]','',0,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2015-01-23 17:52:27','2021-04-15 10:41:35',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','bbookkeeper@example.com','','{\"skype\":\"skypebbookkeeper\"}','',0,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2017-10-03 11:47:41','2021-04-15 10:41:35',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'t3mnkbhs','Curie','Marie','','','','','','mcurie@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2017-10-05 09:07:52','2021-04-15 10:40:22',NULL,NULL,'zzeceo',1,NULL,'',NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','zzeceo@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,'','2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2017-10-05 09:09:46','2021-04-15 10:38:52',NULL,NULL,'admin',0,NULL,'',NULL,1,0,NULL,'$2y$10$5qk/U.aOy.7uBSNxpwiqkOfBlCUop9c2wKWuFZ/wZ2hAC9lriGqnG',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','aadminson@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','Alice - 123',1,NULL,NULL,NULL,'','2022-07-05 07:56:33','2021-04-15 07:59:04',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman','',NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,NULL,'192.168.0.254',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-10-05 21:29:35','2021-04-15 10:41:51',NULL,NULL,'ccommercy',1,NULL,'',NULL,1,0,NULL,'$2y$10$KTaKE0NyYyJSCogsxtwR.eADst17XYMrOWlsFfVLR60IbjANIVLHK',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','ccommercy@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman','','2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2017-10-05 21:33:33','2021-04-15 10:41:35',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','sscientol@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2017-10-05 22:47:52','2021-04-15 10:41:35',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','ccommerson@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2017-10-05 22:48:39','2021-04-15 10:41:35',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','aleerfok@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2018-01-22 17:27:02','2021-04-15 10:41:35',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',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,10,10,NULL,'More information on http://www.mydomain.com','2019-10-04 10:06:40','2017-09-06 11:55:30',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2021-04-15 10:41:35',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','','[]','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',0,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2021-04-15 10:42:13',NULL,NULL,'aeinstein',0,NULL,'',NULL,1,0,NULL,'$2y$10$lIvMb5RJjxqmd6OxnZLqvuLZGOXj3gxIQhZQUqcY8fQTyh0cTtUpa',NULL,NULL,'Einstein','Albert','','123456789','','','','aeinstein@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-08 13:54:48','2021-04-15 10:41:35',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Doe','David','Trainee','09123123','','','','daviddoe@example.com','','[]','',0,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-11 16:18:59','2021-04-15 10:41:35',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','','[]','',0,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2015-01-23 17:52:27','2021-04-15 10:41:35',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','bbookkeeper@example.com','','{\"skype\":\"skypebbookkeeper\"}','',0,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2017-10-03 11:47:41','2021-04-15 10:41:35',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'t3mnkbhs','Curie','Marie','','','','','','mcurie@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2017-10-05 09:07:52','2021-04-15 10:40:22',NULL,NULL,'zzeceo',1,NULL,'',NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','zzeceo@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,'','2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2017-10-05 09:09:46','2021-04-15 10:38:52',NULL,NULL,'admin',0,NULL,'',NULL,1,0,NULL,'$2y$10$5qk/U.aOy.7uBSNxpwiqkOfBlCUop9c2wKWuFZ/wZ2hAC9lriGqnG',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','aadminson@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','Alice - 123',1,NULL,NULL,NULL,'','2022-07-05 07:56:33','2021-04-15 07:59:04',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman','',NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,NULL,'192.168.0.254',NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-10-05 21:29:35','2021-04-15 10:41:51',NULL,NULL,'ccommercy',1,NULL,'',NULL,1,0,NULL,'$2y$10$KTaKE0NyYyJSCogsxtwR.eADst17XYMrOWlsFfVLR60IbjANIVLHK',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','ccommercy@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman','','2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2017-10-05 21:33:33','2021-04-15 10:41:35',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','sscientol@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2017-10-05 22:47:52','2021-04-15 10:41:35',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','ccommerson@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2017-10-05 22:48:39','2021-04-15 10:41:35',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','aleerfok@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2018-01-22 17:27:02','2021-04-15 10:41:35',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',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,10,10,NULL,'More information on http://www.mydomain.com','2019-10-04 10:06:40','2017-09-06 11:55:30',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2021-04-15 10:41:35',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','','[]','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',0,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; UNLOCK TABLES; @@ -13422,10 +13592,10 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `login` varchar(32) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `pass` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `poste` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `login` varchar(32) DEFAULT NULL, + `pass` varchar(64) DEFAULT NULL, + `poste` varchar(20) DEFAULT NULL, PRIMARY KEY (`fk_user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13449,14 +13619,14 @@ DROP TABLE IF EXISTS `llx_user_employment`; CREATE TABLE `llx_user_employment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `ref_ext` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(50) DEFAULT NULL, + `ref_ext` varchar(50) DEFAULT NULL, `fk_user` int(11) 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, - `job` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `job` varchar(128) DEFAULT NULL, `status` int(11) NOT NULL, `salary` double(24,8) DEFAULT NULL, `salaryextra` double(24,8) DEFAULT NULL, @@ -13490,7 +13660,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_user_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13515,8 +13685,8 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, - `value` text COLLATE utf8mb3_unicode_ci NOT NULL, + `param` varchar(255) NOT NULL, + `value` text NOT NULL, UNIQUE KEY `uk_user_param` (`fk_user`,`param`,`entity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13544,17 +13714,20 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bank` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_banque` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `code_guichet` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `number` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `cle_rib` varchar(5) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `bic` varchar(11) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `iban_prefix` varchar(34) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `domiciliation` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `proprio` varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `owner_address` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `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, + `state_id` int(11) DEFAULT NULL, + `fk_country` int(11) DEFAULT NULL, + `currency_code` varchar(3) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13584,7 +13757,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=21555 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=21798 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -13593,7 +13766,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),(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),(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),(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),(12718,1,11,23001),(12719,1,11,50101),(21411,1,12,11),(21405,1,12,12),(21406,1,12,13),(21407,1,12,14),(21408,1,12,15),(21410,1,12,16),(21412,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),(21375,1,12,81),(21370,1,12,82),(21371,1,12,84),(21372,1,12,86),(21373,1,12,87),(21374,1,12,88),(21376,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),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(21357,1,12,111),(21348,1,12,112),(21350,1,12,113),(21352,1,12,114),(21354,1,12,115),(21356,1,12,116),(21358,1,12,117),(21498,1,12,121),(21495,1,12,122),(21497,1,12,125),(21499,1,12,126),(21500,1,12,130),(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),(21539,1,12,251),(21520,1,12,252),(21522,1,12,253),(21523,1,12,254),(21525,1,12,255),(21527,1,12,256),(21501,1,12,262),(21507,1,12,281),(21504,1,12,282),(21506,1,12,283),(21508,1,12,286),(19877,1,12,300),(21359,1,12,301),(21360,1,12,302),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(21528,1,12,341),(21529,1,12,342),(21530,1,12,343),(21531,1,12,344),(21537,1,12,351),(21534,1,12,352),(21536,1,12,353),(21538,1,12,354),(21540,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(21484,1,12,511),(21479,1,12,512),(21481,1,12,514),(21483,1,12,517),(21485,1,12,519),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(21491,1,12,531),(21488,1,12,532),(21490,1,12,534),(21492,1,12,538),(20076,1,12,561),(20073,1,12,562),(20075,1,12,563),(20077,1,12,564),(21544,1,12,610),(21543,1,12,611),(21545,1,12,612),(16932,1,12,650),(21344,1,12,651),(21343,1,12,652),(21345,1,12,653),(17124,1,12,660),(21459,1,12,661),(21458,1,12,662),(21460,1,12,663),(13358,1,12,700),(21381,1,12,701),(21380,1,12,702),(21382,1,12,703),(21468,1,12,750),(21467,1,12,751),(21469,1,12,752),(21401,1,12,771),(21390,1,12,772),(21392,1,12,773),(15085,1,12,774),(21394,1,12,775),(21396,1,12,776),(21398,1,12,777),(21400,1,12,778),(21402,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(21415,1,12,1181),(21429,1,12,1182),(21418,1,12,1183),(21419,1,12,1184),(21421,1,12,1185),(21423,1,12,1186),(21425,1,12,1187),(21428,1,12,1188),(21426,1,12,1189),(21430,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(21438,1,12,1231),(21433,1,12,1232),(21434,1,12,1233),(21436,1,12,1234),(21437,1,12,1235),(21439,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(21413,1,12,1321),(21414,1,12,1322),(21377,1,12,1421),(21333,1,12,2401),(21332,1,12,2402),(21334,1,12,2403),(21338,1,12,2411),(21337,1,12,2412),(21339,1,12,2413),(21340,1,12,2414),(21386,1,12,2501),(21385,1,12,2503),(21387,1,12,2515),(20082,1,12,3200),(20840,1,12,3201),(20341,1,12,3301),(15435,1,12,5001),(15436,1,12,5002),(21553,1,12,10001),(21548,1,12,10002),(21550,1,12,10003),(21552,1,12,10005),(21554,1,12,10008),(21451,1,12,20001),(21442,1,12,20002),(21444,1,12,20003),(21448,1,12,20004),(21450,1,12,20005),(21452,1,12,20006),(21446,1,12,20007),(21366,1,12,23001),(21363,1,12,23002),(21365,1,12,23003),(21367,1,12,23004),(19019,1,12,50101),(21516,1,12,50151),(21517,1,12,50152),(21518,1,12,50153),(21318,1,12,50401),(21326,1,12,50411),(21321,1,12,50412),(21323,1,12,50414),(21325,1,12,50415),(21327,1,12,50418),(21328,1,12,50420),(21329,1,12,50430),(21317,1,12,50440),(21462,1,12,55001),(21463,1,12,55002),(21514,1,12,56001),(21511,1,12,56002),(21513,1,12,56003),(21515,1,12,56004),(16742,1,12,56005),(20838,1,12,57001),(20837,1,12,57002),(20839,1,12,57003),(21453,1,12,59001),(21454,1,12,59002),(21455,1,12,59003),(21475,1,12,63001),(21472,1,12,63002),(21474,1,12,63003),(21476,1,12,63004),(21464,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(20069,1,12,941601),(20065,1,12,941602),(20066,1,12,941603),(20067,1,12,941604),(20068,1,12,941605),(20070,1,12,941606),(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),(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),(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),(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),(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),(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),(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),(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),(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),(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),(12718,1,11,23001),(12719,1,11,50101),(21653,1,12,11),(21647,1,12,12),(21648,1,12,13),(21649,1,12,14),(21650,1,12,15),(21652,1,12,16),(21654,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),(21617,1,12,81),(21611,1,12,82),(21612,1,12,84),(21613,1,12,85),(21614,1,12,86),(21615,1,12,87),(21616,1,12,88),(21618,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),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(21595,1,12,111),(21586,1,12,112),(21588,1,12,113),(21590,1,12,114),(21592,1,12,115),(21594,1,12,116),(21596,1,12,117),(21741,1,12,121),(21738,1,12,122),(21740,1,12,125),(21742,1,12,126),(21743,1,12,130),(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),(21782,1,12,251),(21763,1,12,252),(21765,1,12,253),(21766,1,12,254),(21768,1,12,255),(21770,1,12,256),(21744,1,12,262),(21750,1,12,281),(21747,1,12,282),(21749,1,12,283),(21751,1,12,286),(19877,1,12,300),(21600,1,12,301),(21360,1,12,302),(21599,1,12,304),(21601,1,12,305),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(21771,1,12,341),(21772,1,12,342),(21773,1,12,343),(21774,1,12,344),(21780,1,12,351),(21777,1,12,352),(21779,1,12,353),(21781,1,12,354),(21783,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(21726,1,12,511),(21721,1,12,512),(21723,1,12,514),(21725,1,12,517),(21727,1,12,519),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(21734,1,12,531),(21730,1,12,532),(21731,1,12,533),(21733,1,12,534),(21735,1,12,538),(20076,1,12,561),(20073,1,12,562),(20075,1,12,563),(20077,1,12,564),(21787,1,12,610),(21786,1,12,611),(21788,1,12,612),(16932,1,12,650),(21582,1,12,651),(21581,1,12,652),(21583,1,12,653),(17124,1,12,660),(21701,1,12,661),(21700,1,12,662),(21702,1,12,663),(13358,1,12,700),(21623,1,12,701),(21622,1,12,702),(21624,1,12,703),(21710,1,12,750),(21709,1,12,751),(21711,1,12,752),(21643,1,12,771),(21632,1,12,772),(21634,1,12,773),(15085,1,12,774),(21636,1,12,775),(21638,1,12,776),(21640,1,12,777),(21642,1,12,778),(21644,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(21657,1,12,1181),(21671,1,12,1182),(21660,1,12,1183),(21661,1,12,1184),(21663,1,12,1185),(21665,1,12,1186),(21667,1,12,1187),(21670,1,12,1188),(21668,1,12,1189),(21672,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(21680,1,12,1231),(21675,1,12,1232),(21676,1,12,1233),(21678,1,12,1234),(21679,1,12,1235),(21681,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(21655,1,12,1321),(21656,1,12,1322),(21619,1,12,1421),(21571,1,12,2401),(21570,1,12,2402),(21572,1,12,2403),(21576,1,12,2411),(21575,1,12,2412),(21577,1,12,2413),(21578,1,12,2414),(21628,1,12,2501),(21627,1,12,2503),(21629,1,12,2515),(20082,1,12,3200),(20840,1,12,3201),(20341,1,12,3301),(15435,1,12,5001),(15436,1,12,5002),(21796,1,12,10001),(21791,1,12,10002),(21793,1,12,10003),(21795,1,12,10005),(21797,1,12,10008),(21693,1,12,20001),(21684,1,12,20002),(21686,1,12,20003),(21690,1,12,20004),(21692,1,12,20005),(21694,1,12,20006),(21688,1,12,20007),(21607,1,12,23001),(21604,1,12,23002),(21606,1,12,23003),(21608,1,12,23004),(19019,1,12,50101),(21759,1,12,50151),(21760,1,12,50152),(21761,1,12,50153),(21556,1,12,50401),(21564,1,12,50411),(21559,1,12,50412),(21561,1,12,50414),(21563,1,12,50415),(21565,1,12,50418),(21566,1,12,50420),(21567,1,12,50430),(21555,1,12,50440),(21704,1,12,55001),(21705,1,12,55002),(21757,1,12,56001),(21754,1,12,56002),(21756,1,12,56003),(21758,1,12,56004),(16742,1,12,56005),(20838,1,12,57001),(20837,1,12,57002),(20839,1,12,57003),(21695,1,12,59001),(21696,1,12,59002),(21697,1,12,59003),(21717,1,12,63001),(21714,1,12,63002),(21716,1,12,63003),(21718,1,12,63004),(21706,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(20069,1,12,941601),(20065,1,12,941602),(20066,1,12,941603),(20067,1,12,941604),(20068,1,12,941605),(20070,1,12,941606),(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),(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),(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),(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),(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),(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),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -13606,12 +13779,12 @@ 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) COLLATE utf8mb3_unicode_ci NOT NULL, + `nom` varchar(255) 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 COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `model_pdf` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note` text DEFAULT NULL, + `model_pdf` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_usergroup_name` (`nom`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13638,7 +13811,7 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_usergroup_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13723,22 +13896,22 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, `status` int(11) DEFAULT NULL, `fk_default_home` int(11) DEFAULT NULL, - `virtualhost` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `virtualhost` varchar(255) 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_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `maincolor` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `maincolorbis` varchar(16) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `maincolor` varchar(16) DEFAULT NULL, + `maincolorbis` varchar(16) DEFAULT NULL, `use_manifest` int(11) DEFAULT NULL, - `lang` varchar(8) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `otherlang` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `lang` varchar(8) DEFAULT NULL, + `otherlang` varchar(255) DEFAULT NULL, `position` int(11) DEFAULT 0, `lastaccess` datetime DEFAULT NULL, `pageviews_month` bigint(20) unsigned DEFAULT 0, @@ -13769,7 +13942,7 @@ CREATE TABLE `llx_website_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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_website_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; @@ -13794,29 +13967,29 @@ 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) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `aliasalt` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `title` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `description` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `keywords` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `content` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `pageurl` varchar(255) DEFAULT NULL, + `aliasalt` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `keywords` varchar(255) DEFAULT NULL, + `content` mediumtext DEFAULT NULL, `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_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `type_container` varchar(16) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'page', - `lang` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `type_container` varchar(16) NOT NULL DEFAULT 'page', + `lang` varchar(6) DEFAULT NULL, `fk_page` int(11) DEFAULT NULL, - `grabbed_from` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `htmlheader` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `image` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `author_alias` varchar(64) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `grabbed_from` varchar(255) DEFAULT NULL, + `htmlheader` mediumtext DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + `author_alias` varchar(64) DEFAULT NULL, `allowed_in_frames` int(11) DEFAULT 0, - `object_type` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `fk_object` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `object_type` varchar(255) DEFAULT NULL, + `fk_object` varchar(255) 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`) @@ -13842,17 +14015,17 @@ DROP TABLE IF EXISTS `llx_workstation_workstation`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_workstation_workstation` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '(PROV)', - `label` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `type` varchar(7) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `ref` varchar(128) NOT NULL DEFAULT '(PROV)', + `label` varchar(255) DEFAULT NULL, + `type` varchar(7) DEFAULT NULL, + `note_public` text DEFAULT NULL, `entity` int(11) DEFAULT 1, - `note_private` text COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `note_private` text DEFAULT NULL, `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 utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, `status` smallint(6) NOT NULL, `nb_operators_required` int(11) DEFAULT NULL, `thm_operator_estimated` double DEFAULT NULL, @@ -13935,15 +14108,15 @@ DROP TABLE IF EXISTS `llx_zapier_hook`; CREATE TABLE `llx_zapier_hook` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) NOT NULL DEFAULT 1, - `url` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `event` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `module` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `action` varchar(128) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `event` varchar(255) DEFAULT NULL, + `module` varchar(128) DEFAULT NULL, + `action` varchar(128) DEFAULT NULL, `status` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, `fk_user` int(11) NOT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13966,4 +14139,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2022-07-05 10:09:14 +-- Dump completed on 2022-12-11 22:30:04 diff --git a/dev/resources/iso-normes/accountancy/accountancy_rules.txt b/dev/resources/iso-normes/accountancy/accountancy_rules.txt index a265bcf4f54..918d0f01d3c 100644 --- a/dev/resources/iso-normes/accountancy/accountancy_rules.txt +++ b/dev/resources/iso-normes/accountancy/accountancy_rules.txt @@ -12,3 +12,11 @@ Le client règle rapidement et on lui accorde un escompte de 3% (120 € * 3% = 411xxx 3,60 € TTC Et ça marche à l’inverse avec un fournisseur sauf que l’on est en 775000 au lieu de 665000 pour escompte obtenus. + + + + +Un compte comptable de Tiers vente = Acount Receivable +Un compte comptable de Tiers achat = Acount Payable + + \ No newline at end of file diff --git a/dev/resources/iso-normes/banking/iban_registry_0.pdf b/dev/resources/iso-normes/banking/iban_registry_0.pdf new file mode 100644 index 00000000000..4c56961c2c5 Binary files /dev/null and b/dev/resources/iso-normes/banking/iban_registry_0.pdf differ diff --git a/dev/resources/iso-normes/vat_number_names.txt b/dev/resources/iso-normes/tax/vat_number_names.txt similarity index 71% rename from dev/resources/iso-normes/vat_number_names.txt rename to dev/resources/iso-normes/tax/vat_number_names.txt index b1e8d469ec8..77adda72e0d 100644 --- a/dev/resources/iso-normes/vat_number_names.txt +++ b/dev/resources/iso-normes/tax/vat_number_names.txt @@ -4,4 +4,5 @@ terms (en) VAT = Value Added Tax (fr) TVA = Taxe sur la Valeur Ajouté (es) NIF / CIF -(de) USt / MwSt +(de) USt / MwSt = UmsatzSteuer / Mehrwertsteuer +(it) IVA diff --git a/dev/resources/iso-normes/tax/world_tax_rates.txt b/dev/resources/iso-normes/tax/world_tax_rates.txt new file mode 100644 index 00000000000..0b3bc3f41e5 --- /dev/null +++ b/dev/resources/iso-normes/tax/world_tax_rates.txt @@ -0,0 +1,10 @@ +VAT Rates +--------- + +https://www.taxrates.cc/index.html +https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates + +For India: VAT=IGST / CGST=Localtax1 / SGST=Localtax2 +see: + https://cleartax.in/s/what-is-sgst-cgst-igst + https://www.mastersindia.co/blog/what-is-cgst-sgst-igst-and-ugst/ diff --git a/dev/resources/iso-normes/world_tax_rates.txt b/dev/resources/iso-normes/world_tax_rates.txt deleted file mode 100644 index 508446b618a..00000000000 --- a/dev/resources/iso-normes/world_tax_rates.txt +++ /dev/null @@ -1,8 +0,0 @@ -VAT Rates ---------- - -http://www.taxrates.cc/index.html -https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates - -For India: VAT=IGST/CGST=Localtax1/SGST=Localtax2: https://cleartax.in/s/what-is-sgst-cgst-igst - diff --git a/dev/setup/apache/virtualhost b/dev/setup/apache/virtualhost index 8c7682fe3d9..7508bbca171 100644 --- a/dev/setup/apache/virtualhost +++ b/dev/setup/apache/virtualhost @@ -3,7 +3,14 @@ #php_admin_value mail.force_extra_parameters "-f postmaster@mydomain.com" php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f postmaster@mydomain.com" php_admin_value open_basedir /tmp/:/home/.../htdocs:/home/.../dolibarr_documents: + + # Add this to use a custom apparmor profile when using apache php handler + + AADefaultHatName sellyoursaas-instances + + + ServerName myvirtualalias ServerAlias myvirtualalias @@ -82,9 +89,9 @@ # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. - SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem - SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem - SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem + #SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem + #SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem + #SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem #RewriteEngine on #RewriteCond %{SERVER_PORT} ^80$ diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index e78438d8791..e286450f73b 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -15,9 +15,10 @@ htdocs/install/doctemplates/websites htdocs/conf.php */nltechno* - */htdocs/includes source .git + htdocs/includes + htdocs/install/doctemplates/websites @@ -135,7 +136,7 @@ - + diff --git a/dev/setup/fail2ban/filter.d/web-accesslog-limit403.conf b/dev/setup/fail2ban/filter.d/web-accesslog-limit403.conf new file mode 100644 index 00000000000..1356df80115 --- /dev/null +++ b/dev/setup/fail2ban/filter.d/web-accesslog-limit403.conf @@ -0,0 +1,19 @@ +# Fail2Ban configuration file +# +# Regexp to detect forbidden access on pages (public or not) so we can add mitigation on IP making too much +# access to your a Dolibarr instance. + + +[Definition] + +# To test, you can inject this example into log +# echo `myvirtualhost.com:443 1.2.3.4 - - [15/Dec/2022:09:57:47 +0000] "GET /public/abc" 403 123 "-" "Mozilla" >> /var/log/apache2/access.log +# +# then +# fail2ban-client status web-accesslog-limit403 +# +# To test rule file on a existing log file +# fail2ban-regex /var/log/apache2/access.log /etc/fail2ban/filter.d/web-accesslog-limit403.conf + +failregex = - - .*HTTP/[0-9]+(.[0-9]+)?" 403 +ignoreregex = diff --git a/dev/setup/fail2ban/filter.d/web-dolibarr-limitpublic.conf b/dev/setup/fail2ban/filter.d/web-dolibarr-limitpublic.conf new file mode 100644 index 00000000000..2eedad18821 --- /dev/null +++ b/dev/setup/fail2ban/filter.d/web-dolibarr-limitpublic.conf @@ -0,0 +1,19 @@ +# Fail2Ban configuration file +# +# Regexp to detect access on public pages so we can add mitigation on IP making too much +# access to your a Dolibarr instance. + + +[Definition] + +# To test, you can inject this example into log +# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log +# +# then +# fail2ban-client status web-dolibarr-limitpublic +# +# To test rule file on a existing log file +# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf + +failregex = ^ [A-Z\s]+ \s+--- Access to .*/public/ +ignoreregex = diff --git a/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf b/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf index d5922909ba9..1e126c17693 100644 --- a/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf +++ b/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf @@ -1,8 +1,7 @@ # Fail2Ban configuration file # -# Regexp to catch known spambots and software alike. Please verify -# that it is your intent to block IPs which were driven by -# above mentioned bots. +# Regexp to detect try to check a couple login/password so we can add mitigation +# on IP making too much tries. [Definition] @@ -11,7 +10,7 @@ # echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log # # then -# fail2ban-client status web-dol-bruteforce +# fail2ban-client status web-dolibarr-rulesbruteforce # # To test rule file on a existing log file # fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf diff --git a/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf b/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf index edc2ca68092..8cc20dd4be4 100644 --- a/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf +++ b/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf @@ -1,8 +1,7 @@ # Fail2Ban configuration file # -# Regexp to catch known spambots and software alike. Please verify -# that it is your intent to block IPs which were driven by -# above mentioned bots. +# Regexp to detect access on passwordforgotten.php page so we can add mitigation on IP making too much +# access to this Dolibarr page. [Definition] @@ -11,7 +10,7 @@ # echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log # # then -# fail2ban-client status web-dol-passforgotten +# fail2ban-client status web-dolibarr-rulespassforgotten # # To test rule file on a existing log file # fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf diff --git a/dev/setup/fail2ban/jail.local b/dev/setup/fail2ban/jail.local index bd506e20812..733987aa45c 100644 --- a/dev/setup/fail2ban/jail.local +++ b/dev/setup/fail2ban/jail.local @@ -8,21 +8,35 @@ enabled = true port = http,https filter = web-dolibarr-rulespassforgotten -logpath = >> /mypath/documents/documents/dolibarr.log +logpath = /mypath/documents/documents/dolibarr.log action = %(action_mw)s bantime = 4320000 ; 50 days findtime = 86400 ; 1 day maxretry = 10 + [web-dol-bruteforce] ; rule against bruteforce hacking (login + api) enabled = true port = http,https filter = web-dolibarr-rulesbruteforce -logpath = >> /mypath/documents/documents/dolibarr.log +logpath = /mypath/documents/documents/dolibarr.log action = %(action_mw)s bantime = 86400 ; 1 day findtime = 3600 ; 1 hour maxretry = 10 + +[web-dol-limitpublic] + +; rule to add rate limit on some public pages +enabled = true +port = http,https +filter = web-dolibarr-limitpublic +logpath = /mypath/documents/documents/dolibarr.log +action = %(action_mw)s +bantime = 86400 ; 1 day +findtime = 86400 ; 1 day +maxretry = 500 + diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index 1a997ddc63c..76be3804f1a 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -487,7 +487,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $pkey = $line; $linenumber ++; - if (! empty($lines[$linenumber])) { + if (!empty($lines[$linenumber])) { $line = $lines[$linenumber]; } else { $line = ''; @@ -517,7 +517,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) if (substr($line, 0, 12) == "CREATE INDEX") { $matches = array(); preg_match('/CREATE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches); - if (! empty($matches[3])) { + if (!empty($matches[3])) { $indexname = $matches[1]; $tablename = str_replace('public.', '', $matches[2]); $columns = $matches[3]; @@ -529,7 +529,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) if (substr($line, 0, 19) == "CREATE UNIQUE INDEX") { $matches = array(); preg_match('/CREATE UNIQUE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches); - if (! empty($matches[3])) { + if (!empty($matches[3])) { $indexname = $matches[1]; $tablename = str_replace('public.', '', $matches[2]); $columns = str_replace('"', '', $matches[3]); diff --git a/dev/tools/github_authors_and_commits_peryear.sh b/dev/tools/github_authors_and_commits_peryear.sh index 7184d6c44ae..bdba2a2a6ed 100755 --- a/dev/tools/github_authors_and_commits_peryear.sh +++ b/dev/tools/github_authors_and_commits_peryear.sh @@ -1,5 +1,8 @@ #!/bin/sh - +# +# Count number of different contributors and number of commits for a given year. +# + if [ "x$1" = "x" ]; then echo "Usage: $0 YEAR" exit diff --git a/dev/tools/github_commits_perversion.sh b/dev/tools/github_commits_perversion.sh index bf76e68bc43..2f3020ff721 100755 --- a/dev/tools/github_commits_perversion.sh +++ b/dev/tools/github_commits_perversion.sh @@ -1,6 +1,10 @@ #/bin/bash -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") +# +# Count number of commits per user and per versions (using date for version detection) +# + +Releases=("16.0" "develop") +Dates=("2022-01-01" "2022-08-31" "2050-01-01") let "counter = 1" for i in "${Releases[@]}" diff --git a/dev/tools/github_lines_perusers.sh b/dev/tools/github_lines_perusers.sh new file mode 100755 index 00000000000..9a3fad09d62 --- /dev/null +++ b/dev/tools/github_lines_perusers.sh @@ -0,0 +1,16 @@ +#/bin/bash +# +# Count number of lines modified per user for a given branch +# + +if [ "x$2" = "x" ]; then + echo "Usage: $0 tagnamestart|START tagnameend|HEAD" + exit +fi + + +echo "git log $1..$2 --shortstat | grep ... | perl ... > /tmp/github_lines_perusers.tmp" +git log $1..$2 --shortstat | grep -e 'Author:' -e 'Date:' -e ' changed' -e ' insertion' -e ' deletion' | perl -n -e '/^(.*)$/; $line = $1; if ($line =~ /(changed|insertion|deletion)/) { $line =~ s/[^0-9\s]//g; my @arr=split /\s+/, $line; $tot=0; for (1..@arr) { $tot += $arr[$_]; }; print $tot."\n"; } else { print $line."\n"; };' > /tmp/github_lines_perusers.tmp + +cat /tmp/github_lines_perusers.tmp | awk 'BEGIN { FS="\n"; print "user and nb of lines"; lastuser=""; } { if ($1 ~ /Author:/) { lastuser=$1 }; if ($1 ~ /^[0-9]+$/) { aaa[lastuser]+=$1; } } END { for (var in aaa) print var," ",aaa[var]; } ' + diff --git a/dev/tools/optimize_images.sh b/dev/tools/optimize_images.sh index 89717063006..bfbe461b9d2 100755 --- a/dev/tools/optimize_images.sh +++ b/dev/tools/optimize_images.sh @@ -121,9 +121,11 @@ main() # Search of all jpg/jpeg/png in $INPUT # We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT - echo "Scan $INPUT to find images with find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v $OUTPUT" + echo "Scan $INPUT to find images with find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v '/documents/' | grep -v $OUTPUT" + #echo "Scan $INPUT to find images with find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/'" IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v '/documents/' | grep -v $OUTPUT) - + #IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/') + if [ "$QUIET" == "0" ]; then echo --- Optimizing $INPUT --- echo diff --git a/dev/tools/test/namespacemig/main.inc.php b/dev/tools/test/namespacemig/main.inc.php index d46d8e38c1c..e013e6af1da 100644 --- a/dev/tools/test/namespacemig/main.inc.php +++ b/dev/tools/test/namespacemig/main.inc.php @@ -1,5 +1,4 @@ $pages) { // Loop on each line keword was found into file. $listoffilesforthisentry=array(); foreach ($lines as $line => $translatedvalue) { - if (! empty($listoffilesforthisentry[$file])) { + if (!empty($listoffilesforthisentry[$file])) { $duplicateinsamefile=1; } $listoffilesforthisentry[$file]=1; @@ -300,7 +300,7 @@ if ($web) { // STEP 2 - Search key not used -if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) { +if ((!empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) { print "***** Strings in en_US that are never used:\n"; $unused=array(); diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index f0a0397cd6e..b2427c9f57a 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -303,8 +303,8 @@ foreach ($filesToProcess as $fileToProcess) { // String exists in both files and value into alternative language differs from main language but also from english files // so we keep it. - if ((! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key] - && ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key]) + if ((!empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key] + && !empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key]) || in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key) ) { //print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n"; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 4d74237e2e4..2a23ee5eb85 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -23,6 +23,7 @@ * \brief List accounting account */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -30,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries")); +$langs->loadLangs(array('accountancy', 'admin', 'bills', 'compta', 'salaries')); $mesg = ''; $action = GETPOST('action', 'aZ09'); @@ -52,14 +53,14 @@ $confirm = GETPOST('confirm', 'alpha'); $chartofaccounts = GETPOST('chartofaccounts', 'int'); -$permissiontoadd = !empty($user->rights->accounting->chartofaccount); -$permissiontodelete = !empty($user->rights->accounting->chartofaccount); +$permissiontoadd = $user->hasRight('accounting', 'chartofaccount'); +$permissiontodelete = $user->hasRight('accounting', 'chartofaccount'); // Security check if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -97,6 +98,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL < 2) { $accounting = new AccountingAccount($db); +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('accountancyadminaccount')); + /* * Actions @@ -109,8 +113,8 @@ if (!GETPOST('confirmmassaction', 'alpha')) { $massaction = ''; } -$parameters = array(); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been monowraponalldified by some hooks +$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $accounting, $action); // Note that $action and $object may have been monowraponalldified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } @@ -294,7 +298,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { } // List of mass actions available -if ($user->rights->accounting->chartofaccount) { +if ($user->hasRight('accounting', 'chartofaccount')) { $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete', 'closed'))) { @@ -398,6 +402,11 @@ if ($resql) { print ''; print '
'; + + $parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $accounting, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
'; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; @@ -590,7 +599,7 @@ if ($resql) { // Action print ''; - if ($user->rights->accounting->chartofaccount) { + if ($user->hasRight('accounting', 'chartofaccount')) { print ''; print img_edit(); print ''; diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 201898dedd1..02921a78cb2 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -32,6 +32,7 @@ * \brief Page to administer model of chart of accounts */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -44,7 +45,7 @@ if (isModEnabled('accounting')) { } // Load translation files required by the page -$langs->loadLangs(array("errors", "admin", "companies", "resource", "holiday", "compta", "accountancy", "hrm")); +$langs->loadLangs(array('accountancy', 'admin', 'companies', 'compta', 'errors', 'holiday', 'hrm', 'resource')); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; $confirm = GETPOST('confirm', 'alpha'); @@ -78,7 +79,7 @@ $search_country_id = GETPOST('search_country_id', 'int'); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 02b95cfd043..9eabd378e11 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -23,6 +23,7 @@ * \brief Card of accounting account */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; @@ -32,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; $error = 0; // Load translation files required by the page -$langs->loadLangs(array("bills", "accountancy", "compta")); +$langs->loadLangs(array('accountancy', 'bills', 'compta')); $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -48,7 +49,7 @@ $label = GETPOST('label', 'alpha'); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -66,7 +67,7 @@ if (GETPOST('cancel', 'alpha')) { exit; } -if ($action == 'add' && $user->rights->accounting->chartofaccount) { +if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) { if (!$cancel) { if (!$account_number) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors'); @@ -84,7 +85,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { // Clean code // To manage zero or not at the end of the accounting account - if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { + if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { $account_number = $account_number; } else { $account_number = clean_account($account_number); @@ -127,7 +128,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { } } } -} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'edit' && $user->hasRight('accounting', 'chartofaccount')) { if (!$cancel) { if (!$account_number) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors'); @@ -147,7 +148,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { // Clean code // To manage zero or not at the end of the accounting account - if (isset($conf->global->ACCOUNTING_MANAGE_ZERO) && $conf->global->ACCOUNTING_MANAGE_ZERO == 1) { + if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { $account_number = $account_number; } else { $account_number = clean_account($account_number); @@ -184,7 +185,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { header("Location: ".$urltogo); exit(); } -} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'delete' && $user->hasRight('accounting', 'chartofaccount')) { $result = $object->fetch($id); if (!empty($object->id)) { @@ -419,17 +420,15 @@ if ($action == 'create') { */ print '
'; - if (!empty($user->rights->accounting->chartofaccount)) { + if ($user->hasRight('accounting', 'chartofaccount')) { print 'id.'">'.$langs->trans('Modify').''; } else { print ''.$langs->trans('Modify').''; } - if (!empty($user->rights->accounting->chartofaccount)) { - print 'id.'">'.$langs->trans('Delete').''; - } else { - print ''.$langs->trans('Delete').''; - } + // Delete + $permissiontodelete = $user->hasRight('accounting', 'chartofaccount'); + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); print '
'; } diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index e65572eafd3..7b86902e009 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -22,6 +22,7 @@ * \brief Page to assign mass categories to accounts */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; @@ -44,7 +45,7 @@ if ($cat_id == 0) { } // Security check -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index aca2854df7f..3a6664b8b44 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -22,6 +22,7 @@ * \brief Page to administer data tables */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -42,7 +43,7 @@ $rowid = GETPOST('rowid', 'alpha'); $code = GETPOST('code', 'alpha'); // Security access -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 437ff1b7116..5ad23febb36 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -22,6 +22,7 @@ * \brief Setup page to configure accounting expert module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -31,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; $langs->loadLangs(array("compta", "admin", "accountancy")); // Security check -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index afd7724713d..9a3b63adcc3 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; $langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "loan")); // Security check -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -133,6 +133,12 @@ if ($action == 'update') { $error++; } + $constname = 'ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'; + $constvalue = GETPOST($constname, 'int'); + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -155,6 +161,20 @@ if ($action == 'setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT') { } } +if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') { + $setDisableAuxiliaryAccountOnSupplierDeposit = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT", $setDisableAuxiliaryAccountOnSupplierDeposit, 'yesno', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + /* * View @@ -281,6 +301,33 @@ if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_D print ''; } +// Supplier deposit account +print ''; +// Param +print ''; +print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'); +print ''; +// Value +print ''; // Do not force class=right, or it align also the content of the select box +print $formaccounting->select_account(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'), 'ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT', 1, '', 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 'accounts'); +print ''; +print ''; + +if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') != '-1') { + print ''; + print '' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . ''; + if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; +} + print "\n"; print "\n"; diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index d0a0ab671d4..23a16340c0b 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php'; $langs->loadLangs(array("compta", "bills", "admin", "accountancy")); // Security access -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 2eb77815b60..27226d388f6 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -21,6 +21,7 @@ * \brief Setup page to configure fiscal year */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; @@ -52,7 +53,7 @@ $langs->loadLangs(array("admin", "compta")); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->fiscalyear->write)) { // If we can read accounting records, we should be able to see fiscal year. +if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { // If we can read accounting records, we should be able to see fiscal year. accessforbidden(); } @@ -121,7 +122,7 @@ if ($result) { $i = 0; - $addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear->write); + $addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write')); $title = $langs->trans('AccountingPeriods'); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 2aa33f21645..38330a37e13 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -22,6 +22,7 @@ * \brief Page to show a fiscal year */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php'; @@ -34,7 +35,7 @@ $langs->loadLangs(array("admin", "compta")); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->fiscalyear->write)) { +if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { accessforbidden(); } @@ -299,12 +300,12 @@ if ($action == 'create') { /* * Action bar */ - if (!empty($user->rights->accounting->fiscalyear->write)) { + if ($user->hasRight('accounting', 'fiscalyear', 'write')) { print '
'; print ''.$langs->trans('Modify').''; - // print '' . $langs->trans('Delete') . ''; + //print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); print '
'; } diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 77ec988143a..bb265c89ecf 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -21,6 +21,7 @@ * \brief Page to show info of a fiscal year */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -33,7 +34,7 @@ $langs->loadLangs(array("admin", "compta")); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->fiscalyear->write)) { +if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { accessforbidden(); } diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index c32148b81fc..385c105451e 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -29,6 +29,7 @@ * \brief Setup page to configure accounting expert module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -38,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other")); // Security access -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -246,6 +247,20 @@ if ($action == 'setdisablebindingonexpensereports') { } } +if ($action == 'setenablelettering') { + $setenablelettering = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_LETTERING", $setenablelettering, 'yesno', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + /* * View @@ -465,6 +480,27 @@ print ''; print ''; +// Lettering params +print ''; +print ''; +print ''; +print "\n"; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { + print ''; +} else { + print ''; +} +print ''; + +print '
'.$langs->trans('Options').' '.$langs->trans('Lettering').'
'.$langs->trans("ACCOUNTING_ENABLE_LETTERING").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'; + print '
'; print ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 3ea90e283ce..e1a07fef5fc 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -26,6 +26,7 @@ if (!defined('CSRFCHECK_WITH_TOKEN')) { define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -45,7 +46,7 @@ $rowid = GETPOST('rowid', 'alpha'); $code = GETPOST('code', 'alpha'); // Security access -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -610,12 +611,6 @@ if ($id) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; - } elseif ($obj->code == 'RECEP') { - $iserasable = 0; - $canbedisabled = 0; - } elseif ($obj->code == 'EF0') { - $iserasable = 0; - $canbedisabled = 0; } } diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 01cf7164009..018a0cfd5e8 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -45,7 +45,7 @@ $langs->loadLangs(array("companies", "compta", "accountancy", "products")); if (!isModEnabled('accounting')) { accessforbidden(); } -if (empty($user->rights->accounting->bind->write)) { +if (!$user->hasRight('accounting', 'bind', 'write')) { accessforbidden(); } @@ -522,7 +522,7 @@ if ($resql) { // Filter on categories $moreforfilter = ''; - if (isModEnabled('categorie') && $user->rights->categorie->lire) { + if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) { $moreforfilter .= '
'; $moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"'); $categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1); diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index cc0d4de9f31..c9f78596bcd 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -23,6 +23,7 @@ * \brief List of accounting sub-account (auxiliary accounts) */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -47,7 +48,7 @@ $search_type = GETPOST('search_type', 'int'); if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->chartofaccount)) { +if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index e2a0d24ed58..01d89f1168d 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -24,6 +24,7 @@ * \brief Balance of book keeping */ +// Load Dolibarr environment require '../../main.inc.php'; // Class @@ -149,7 +150,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -503,6 +504,10 @@ if ($action != 'export_csv') { print "\n"; print ''; + $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ""; print ''; } diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 315b7a49847..4620bf37e4e 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -25,6 +25,7 @@ * \brief Page to show book-entry */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; @@ -85,7 +86,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -332,7 +333,9 @@ if ($action == 'valid') { $html = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader('', $langs->trans("CreateMvts")); +$title = $langs->trans("CreateMvts"); + +llxHeader('', $title); // Confirmation to delete the command if ($action == 'delete') { @@ -341,7 +344,7 @@ if ($action == 'delete') { } if ($action == 'create') { - print load_fiche_titre($langs->trans("CreateMvts")); + print load_fiche_titre($title); $object = new BookKeeping($db); $next_num_mvt = $object->getNextNumMvt('_tmp'); @@ -614,6 +617,7 @@ if ($action == 'create') { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { + // List of movements print load_fiche_titre($langs->trans("ListeMvts"), '', ''); print '
'; @@ -641,8 +645,8 @@ if ($action == 'create') { print_liste_field_titre("AccountAccountingShort"); print_liste_field_titre("SubledgerAccount"); print_liste_field_titre("LabelOperation"); - print_liste_field_titre("Debit", "", "", "", "", 'class="right"'); - print_liste_field_titre("Credit", "", "", "", "", 'class="right"'); + print_liste_field_titre("AccountingDebit", "", "", "", "", 'class="right"'); + print_liste_field_titre("AccountingCredit", "", "", "", "", 'class="right"'); if (empty($object->date_validation)) { print_liste_field_titre("Action", "", "", "", "", 'width="60"', "", "", 'center '); } else { @@ -661,14 +665,14 @@ if ($action == 'create') { } foreach ($object->linesmvt as $line) { - print ''; + print ''; $total_debit += $line->debit; $total_credit += $line->credit; if ($action == 'update' && $line->id == $id) { print ''; print ''; - print $formaccounting->select_account((GETPOSTISSET("accountingaccount_number") ? GETPOST("accountingaccount_number", "alpha") : $line->numero_compte), 'accountingaccount_number', 1, array(), 1, 1, ''); + print $formaccounting->select_account((GETPOSTISSET("accountingaccount_number") ? GETPOST("accountingaccount_number", "alpha") : $line->numero_compte), 'accountingaccount_number', 1, array(), 1, 1, 'minwidth200 maxwidth500'); print ''; print ''; // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because: @@ -694,7 +698,7 @@ if ($action == 'create') { if ($action == "" || $action == 'add') { print ''; print ''; - print $formaccounting->select_account('', 'accountingaccount_number', 1, array(), 1, 1, ''); + print $formaccounting->select_account('', 'accountingaccount_number', 1, array(), 1, 1, 'minwidth200 maxwidth500'); print ''; print ''; // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because: @@ -711,7 +715,7 @@ if ($action == 'create') { print ''; print ''; print ''; - print ''; + print ''; } } else { print ''; @@ -729,8 +733,8 @@ if ($action == 'create') { } print ''; print ''.$line->label_operation.''; - print ''.price($line->debit).''; - print ''.price($line->credit).''; + print ''.($line->debit != 0 ? price($line->debit) : '').''; + print ''.($line->credit != 0 ? price($line->credit) : '').''; print ''; if (empty($line->date_export) && empty($line->date_validation)) { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index d6234b3d8ac..2b2df70d647 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -25,6 +25,7 @@ * \brief List operation of book keeping */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -154,7 +155,7 @@ $hookmanager->initHooks(array('bookkeepinglist')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export) { +if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) { if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) { $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"; @@ -191,8 +192,8 @@ $arrayfields = array( 't.numero_compte'=>array('label'=>$langs->trans("AccountAccountingShort"), 'checked'=>1), 't.subledger_account'=>array('label'=>$langs->trans("SubledgerAccount"), 'checked'=>1), 't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1), - 't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1), - 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), + 't.debit'=>array('label'=>$langs->trans("AccountingDebit"), 'checked'=>1), + 't.credit'=>array('label'=>$langs->trans("AccountingCredit"), 'checked'=>1), 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), @@ -220,7 +221,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -234,7 +235,7 @@ $param = ''; if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'preunlettering' && $massaction != 'predeletebookkeepingwriting') { +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'preunletteringauto' && $massaction != 'preunletteringmanual' && $massaction != 'predeletebookkeepingwriting') { $massaction = ''; } @@ -437,7 +438,7 @@ if (empty($reshook)) { $param .= '&search_import_key='.urlencode($search_import_key); } - //if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) { + //if ($action == 'delbookkeepingyearconfirm' && !$user->hasRight('accounting', 'mouvements', 'supprimer_tous')) { // $delmonth = GETPOST('delmonth', 'int'); // $delyear = GETPOST('delyear', 'int'); // if ($delyear == -1) { @@ -483,50 +484,67 @@ if (empty($reshook)) { // Mass actions $objectclass = 'Bookkeeping'; $objectlabel = 'Bookkeeping'; - $permissiontoread = $user->rights->societe->lire; - $permissiontodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->hasRight('societe', 'lire'); + $permissiontodelete = $user->hasRight('societe', 'supprimer'); $permissiontoadd = $user->rights->societe->creer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->rights->accounting->mouvements->supprimer) { + if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) { + $db->begin(); + + if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) { + $lettering = new Lettering($db); + $nb_lettering = $lettering->bookkeepingLetteringAll($toselect, true); + if ($nb_lettering < 0) { + setEventMessages('', $lettering->errors, 'errors'); + $error++; + } + } + $nbok = 0; - foreach ($toselect as $toselectid) { - $result = $object->fetch($toselectid); - if ($result > 0 && (!isset($object->date_validation) || $object->date_validation === '')) { - $result = $object->deleteMvtNum($object->piece_num); - if ($result > 0) { - $nbok++; - } else { + if (!$error) { + foreach ($toselect as $toselectid) { + $result = $object->fetch($toselectid); + if ($result > 0 && (!isset($object->date_validation) || $object->date_validation === '')) { + $result = $object->deleteMvtNum($object->piece_num); + if ($result > 0) { + $nbok++; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + break; + } + } elseif ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; } - } elseif ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - break; } } - // Message for elements well deleted - if ($nbok > 1) { - setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - } elseif ($nbok > 0) { - setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); - } elseif (!$error) { - setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs'); - } - if (!$error) { + $db->commit(); + + // Message for elements well deleted + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + } elseif ($nbok > 0) { + setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs'); + } + header("Location: ".$_SERVER["PHP_SELF"]."?noreset=1".($param ? '&'.$param : '')); exit; + } else { + $db->rollback(); } } // others mass actions - if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) { - if ($massaction == 'lettering') { + if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { + if ($massaction == 'letteringauto') { $lettering = new Lettering($db); $nb_lettering = $lettering->bookkeepingLetteringAll($toselect); if ($nb_lettering < 0) { @@ -547,7 +565,17 @@ if (empty($reshook)) { header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); exit(); } - } elseif ($action == 'unlettering' && $confirm == "yes") { + } elseif ($massaction == 'letteringmanual') { + $lettering = new Lettering($db); + $result = $lettering->updateLettering($toselect); + if ($result < 0) { + setEventMessages('', $lettering->errors, 'errors'); + } else { + setEventMessages($langs->trans('AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); + exit(); + } + } elseif ($action == 'unletteringauto' && $confirm == "yes") { $lettering = new Lettering($db); $nb_lettering = $lettering->bookkeepingLetteringAll($toselect, true); if ($nb_lettering < 0) { @@ -568,6 +596,16 @@ if (empty($reshook)) { header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); exit(); } + } elseif ($action == 'unletteringmanual' && $confirm == "yes") { + $lettering = new Lettering($db); + $nb_lettering = $lettering->deleteLettering($toselect); + if ($result < 0) { + setEventMessages('', $lettering->errors, 'errors'); + } else { + setEventMessages($langs->trans('AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); + exit(); + } } } } @@ -655,22 +693,40 @@ if (!empty($sortfield)) { // Export into a file with format defined into setup (FEC, CSV, ...) // Must be after definition of $sql -if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) { - // TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumew too much memory on large export. Replace this with the query($sql) and loop on each line to export them. +if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements', 'export')) { + // TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumes too much memory on large export. + // Replace this with the query($sql) and loop on each line to export them. $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { - // Export files + // Export files then exit $accountancyexport = new AccountancyExport($db); + + $notexportlettering = GETPOST('notexportlettering', 'alpha'); + + if (!empty($notexportlettering)) { + if (is_array($object->lines)) { + foreach ($object->lines as $k => $movement) { + unset($object->lines[$k]->lettering_code); + unset($object->lines[$k]->date_lettering); + } + } + } + + $mimetype = $accountancyexport->getMimeType($formatexportset); + + top_httphead($mimetype, 1); + + // Output data on screen $accountancyexport->export($object->lines, $formatexportset); $notifiedexportdate = GETPOST('notifiedexportdate', 'alpha'); $notifiedvalidationdate = GETPOST('notifiedvalidationdate', 'alpha'); if (!empty($accountancyexport->errors)) { - setEventMessages('', $accountancyexport->errors, 'errors'); + dol_print_error('', '', $accountancyexport->errors); } elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) { // Specify as export : update field date_export or date_validated $error = 0; @@ -704,11 +760,10 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex if (!$error) { $db->commit(); - // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExportedOrValidated"), null, 'mesgs'); } else { $error++; $db->rollback(); - setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExportedOrValidated"), null, 'errors'); + dol_print_error('', $langs->trans("NotAllExportedMovementsCouldBeRecordedAsExportedOrValidated")); } } exit; @@ -762,6 +817,19 @@ $formconfirm = ''; if ($action == 'export_file') { $form_question = array(); + if (getDolGlobalInt("ACCOUNTING_ENABLE_LETTERING")) { + // If 1, we check by default. + $checked = !empty($conf->global->ACCOUNTING_DEFAULT_NOT_EXPORT_LETTERING) ? 'true' : 'false'; + $form_question['notexportlettering'] = array( + 'name' => 'notexportlettering', + 'type' => 'checkbox', + 'label' => $langs->trans('NotExportLettering'), + 'value' => $checked, + ); + + $form_question['separator'] = array('name'=>'separator', 'type'=>'separator'); + } + // If 1 or not set, we check by default. $checked = (!isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE)); $form_question['notifiedexportdate'] = array( @@ -771,7 +839,7 @@ if ($action == 'export_file') { 'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'), ); - $form_question['separator'] = array('name'=>'separator', 'type'=>'separator'); + $form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator'); if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) { // If 0 or not set, we NOT check by default. @@ -783,10 +851,10 @@ if ($action == 'export_file') { 'value' => $checked, ); - $form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator'); + $form_question['separator3'] = array('name'=>'separator3', 'type'=>'separator'); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 350, 600); } //if ($action == 'delbookkeepingyear') { @@ -843,16 +911,16 @@ if ($limit > 0 && $limit != $conf->liste_limit) { // List of mass actions available $arrayofmassactions = array(); -/* if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) { - $arrayofmassactions['lettering'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('Lettering'); - $arrayofmassactions['preunlettering'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('Unlettering'); + $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringAuto'); + $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringAuto'); + $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringManual'); + $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringManual'); } -*/ -if ($user->rights->accounting->mouvements->supprimer) { +if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunlettering', 'predeletebookkeepingwriting'))) { +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); @@ -891,8 +959,8 @@ if (empty($reshook)) { } $newcardbutton .= ''.$langs->trans("IncludeDocsAlreadyExported").''; - if (!empty($user->rights->accounting->mouvements->export)) { - $newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export); + if ($user->hasRight('accounting', 'mouvements', 'export')) { + $newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file&token='.newToken().($param ? '&'.$param : ''), $user->hasRight('accounting', 'mouvements', 'export')); } $newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); @@ -903,13 +971,15 @@ if (empty($reshook)) { if (!empty($socid)) { $url .= '&socid='.$socid; } - $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->hasRight('accounting', 'mouvements', 'creer')); } print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); -if ($massaction == 'preunlettering') { - print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnlettering"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unlettering", null, '', 0, 200, 500, 1); +if ($massaction == 'preunletteringauto') { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnletteringAuto"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unletteringauto", null, '', 0, 200, 500, 1); +} elseif ($massaction == 'preunletteringmanual') { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnletteringManual"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unletteringmanual", null, '', 0, 200, 500, 1); } elseif ($massaction == 'predeletebookkeepingwriting') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeleteBookkeepingWriting"), $langs->trans("ConfirmMassDeleteBookkeepingWritingQuestion", count($toselect)), "deletebookkeepingwriting", null, '', 0, 200, 500, 1); } @@ -929,7 +999,7 @@ if ($massactionbutton && $contextpage != 'poslist') { $moreforfilter = ''; $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -941,7 +1011,13 @@ print ''; // Filters lines print ''; - +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} // Movement number if (!empty($arrayfields['t.piece_num']['checked'])) { print ''; @@ -949,7 +1025,7 @@ if (!empty($arrayfields['t.piece_num']['checked'])) { // Code journal if (!empty($arrayfields['t.code_journal']['checked'])) { print ''; } // Date document @@ -992,14 +1068,14 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) { print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount'); print ''; } else { - print ''; + print ''; } print ''; } // Label operation if (!empty($arrayfields['t.label_operation']['checked'])) { print ''; } // Debit @@ -1017,7 +1093,7 @@ if (!empty($arrayfields['t.credit']['checked'])) { // Lettering code if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; } @@ -1077,13 +1153,18 @@ if (!empty($arrayfields['t.import_key']['checked'])) { print ''; } // Action column -print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print "\n"; print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['t.piece_num']['checked'])) { print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder); } @@ -1125,15 +1206,17 @@ if (!empty($arrayfields['t.tms']['checked'])) { print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['t.date_export']['checked'])) { - print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export,t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['t.date_validated']['checked'])) { - print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated,t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['t.import_key']['checked'])) { print_liste_field_titre($arrayfields['t.import_key']['label'], $_SERVER["PHP_SELF"], "t.import_key", "", $param, '', $sortfield, $sortorder, 'center '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; @@ -1143,10 +1226,10 @@ $line = new BookKeepingLine(); // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -$totalarray['val'] = array (); $totalarray['nbfield'] = 0; $total_debit = 0; $total_credit = 0; +$totalarray['val'] = array (); $totalarray['val']['totaldebit'] = 0; $totalarray['val']['totalcredit'] = 0; @@ -1188,6 +1271,18 @@ while ($i < min($num, $limit)) { $total_credit += $line->credit; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Piece number if (!empty($arrayfields['t.piece_num']['checked'])) { @@ -1392,15 +1487,17 @@ while ($i < min($num, $limit)) { } // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; @@ -1415,6 +1512,10 @@ while ($i < min($num, $limit)) { include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; +$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + print "
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; - print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1, 'small maxwidth150'); + print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1, 'small maxwidth75'); print ''; - print ''; + print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("NotReconciled").''; print '
'; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'; + if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; - if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
"; print '
'; @@ -1429,4 +1530,5 @@ print ''; // End of page llxFooter(); + $db->close(); diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index db0b3981246..4a6e37ceb29 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -25,6 +25,7 @@ * \brief List operation of ledger ordered by account number */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -162,8 +163,8 @@ $arrayfields = array( 't.doc_date'=>array('label'=>$langs->trans("Docdate"), 'checked'=>1), 't.doc_ref'=>array('label'=>$langs->trans("Piece"), 'checked'=>1), 't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1), - 't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1), - 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), + 't.debit'=>array('label'=>$langs->trans("AccountingDebit"), 'checked'=>1), + 't.credit'=>array('label'=>$langs->trans("AccountingCredit"), 'checked'=>1), 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), 't.date_validated'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1, 'enabled'=>!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")), @@ -193,7 +194,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -208,7 +209,7 @@ if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'preunlettering' && $massaction != 'predeletebookkeepingwriting') { +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'preunletteringauto' && $massaction != 'preunletteringmanual' && $massaction != 'predeletebookkeepingwriting') { $massaction = ''; } @@ -394,50 +395,67 @@ if (empty($reshook)) { // Mass actions $objectclass = 'Bookkeeping'; $objectlabel = 'Bookkeeping'; - $permissiontoread = $user->rights->societe->lire; - $permissiontodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->hasRight('societe', 'lire'); + $permissiontodelete = $user->hasRight('societe', 'supprimer'); $permissiontoadd = $user->rights->societe->creer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->rights->accounting->mouvements->supprimer) { + if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) { + $db->begin(); + + if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) { + $lettering = new Lettering($db); + $nb_lettering = $lettering->bookkeepingLetteringAll($toselect, true); + if ($nb_lettering < 0) { + setEventMessages('', $lettering->errors, 'errors'); + $error++; + } + } + $nbok = 0; - foreach ($toselect as $toselectid) { - $result = $object->fetch($toselectid); - if ($result > 0 && (!isset($object->date_validation) || $object->date_validation === '')) { - $result = $object->deleteMvtNum($object->piece_num); - if ($result > 0) { - $nbok++; - } else { + if (!$error) { + foreach ($toselect as $toselectid) { + $result = $object->fetch($toselectid); + if ($result > 0 && (!isset($object->date_validation) || $object->date_validation === '')) { + $result = $object->deleteMvtNum($object->piece_num); + if ($result > 0) { + $nbok++; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + break; + } + } elseif ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; } - } elseif ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - break; } } - // Message for elements well deleted - if ($nbok > 1) { - setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - } elseif ($nbok > 0) { - setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); - } elseif (!$error) { - setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs'); - } - if (!$error) { + $db->commit(); + + // Message for elements well deleted + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + } elseif ($nbok > 0) { + setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + } elseif (!$error) { + setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs'); + } + header("Location: ".$_SERVER["PHP_SELF"]."?noreset=1".($param ? '&'.$param : '')); exit; + } else { + $db->rollback(); } } // others mass actions - if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) { - if ($massaction == 'lettering') { + if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { + if ($massaction == 'letteringauto') { $lettering = new Lettering($db); $nb_lettering = $lettering->bookkeepingLetteringAll($toselect); if ($nb_lettering < 0) { @@ -458,7 +476,17 @@ if (empty($reshook)) { header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); exit(); } - } elseif ($action == 'unlettering' && $confirm == "yes") { + } elseif ($massaction == 'letteringmanual') { + $lettering = new Lettering($db); + $result = $lettering->updateLettering($toselect); + if ($result < 0) { + setEventMessages('', $lettering->errors, 'errors'); + } else { + setEventMessages($langs->trans('AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); + exit(); + } + } elseif ($action == 'unletteringauto' && $confirm == "yes") { $lettering = new Lettering($db); $nb_lettering = $lettering->bookkeepingLetteringAll($toselect, true); if ($nb_lettering < 0) { @@ -479,6 +507,16 @@ if (empty($reshook)) { header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); exit(); } + } elseif ($action == 'unletteringmanual' && $confirm == "yes") { + $lettering = new Lettering($db); + $nb_lettering = $lettering->deleteLettering($toselect); + if ($result < 0) { + setEventMessages('', $lettering->errors, 'errors'); + } else { + setEventMessages($langs->trans('AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); + exit(); + } } } } @@ -578,14 +616,16 @@ print $formconfirm; // List of mass actions available $arrayofmassactions = array(); -if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) { - $arrayofmassactions['lettering'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('Lettering'); - $arrayofmassactions['preunlettering'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('Unlettering'); +if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { + $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringAuto'); + $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringAuto'); + $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringManual'); + $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringManual'); } -if ($user->rights->accounting->mouvements->supprimer) { +if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunlettering', 'predeletebookkeepingwriting'))) { +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunletteringauto', 'preunletteringmanual', 'predeletebookkeepingwriting'))) { $arrayofmassactions = array(); } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); @@ -631,8 +671,10 @@ if ($limit > 0 && $limit != $conf->liste_limit) { print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); -if ($massaction == 'preunlettering') { - print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnlettering"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unlettering", null, '', 0, 200, 500, 1); +if ($massaction == 'preunletteringauto') { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnletteringAuto"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unletteringauto", null, '', 0, 200, 500, 1); +} elseif ($massaction == 'preunletteringmanual') { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassUnletteringManual"), $langs->trans("ConfirmMassUnletteringQuestion", count($toselect)), "unletteringmanual", null, '', 0, 200, 500, 1); } elseif ($massaction == 'predeletebookkeepingwriting') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeleteBookkeepingWriting"), $langs->trans("ConfirmMassDeleteBookkeepingWritingQuestion", count($toselect)), "deletebookkeepingwriting", null, '', 0, 200, 500, 1); } @@ -650,7 +692,7 @@ if ($massaction == 'preunlettering') { include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields if ($massactionbutton && $contextpage != 'poslist') { $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); } @@ -704,15 +746,21 @@ print ''; // Filters lines print ''; - +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} // Movement number if (!empty($arrayfields['t.piece_num']['checked'])) { - print ''; + print ''; } // Code journal if (!empty($arrayfields['t.code_journal']['checked'])) { print ''; } // Date document @@ -783,15 +831,20 @@ $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // N print $hookmanager->resPrint; // Action column -print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print "\n"; print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['t.piece_num']['checked'])) { - print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'tdoverflowmax80imp '); } if (!empty($arrayfields['t.code_journal']['checked'])) { print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); @@ -827,7 +880,9 @@ if (!empty($arrayfields['t.import_key']['checked'])) { $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($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; $displayed_account_number = null; // Start with undefined to be able to distinguish with empty @@ -940,7 +995,18 @@ while ($i < min($num, $limit)) { } print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Piece number if (!empty($arrayfields['t.piece_num']['checked'])) { print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } @@ -1054,7 +1120,7 @@ while ($i < min($num, $limit)) { // Amount debit if (!empty($arrayfields['t.debit']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } @@ -1066,7 +1132,7 @@ while ($i < min($num, $limit)) { // Amount credit if (!empty($arrayfields['t.credit']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } @@ -1113,15 +1179,17 @@ while ($i < min($num, $limit)) { print $hookmanager->resPrint; // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } @@ -1165,6 +1233,10 @@ if ($num > 0 && $colspan > 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; +$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + print "
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; - print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1); + print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1, 'maxwidth75'); print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'; + if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; @@ -958,7 +1024,7 @@ while ($i < min($num, $limit)) { $accountingjournal = new AccountingJournal($db); $result = $accountingjournal->fetch('', $line->code_journal); $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); - print ''.$journaltoshow.''.$journaltoshow.''.($line->debit ? price($line->debit) : '').''.($line->debit != 0 ? price($line->debit) : '').''.($line->credit ? price($line->credit) : '').''.($line->credit != 0 ? price($line->credit) : '').''; - if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
"; print ''; diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 7ae48c749c2..68662ccb610 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -452,56 +452,6 @@ class AccountancyCategory // extends CommonObject } } - /** - * Function to fill ->lines_cptbk with accounting account used (into bookkeeping) and not yet into a custom group - * - * @param int $id Id of custom group - * @return int <0 if KO, 0 if not found, >0 if OK - */ - /* - public function getCptBK($id) - { - global $conf; - - $sql = "SELECT DISTINCT t.numero_compte, t.label_operation, t.doc_ref"; - $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t"; - $sql .= " WHERE t.numero_compte NOT IN ("; // account not into a custom group - $sql .= " SELECT t.account_number"; - $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as t"; - $sql .= " WHERE t.fk_accounting_category = ".((int) $id)." AND t.entity = ".$conf->entity.")"; - $sql .= " AND t.numero_compte IN ("; // account into current chart of account - $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 = ".((int) $conf->global->CHARTOFACCOUNTS); - $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"; - - $this->lines_cptbk = array(); - - dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $num = $this->db->num_rows($resql); - if ($num) { - while ($obj = $this->db->fetch_object($resql)) { - $this->lines_cptbk[] = $obj; - } - } - - return $num; - } else { - $this->error = "Error ".$this->db->lasterror(); - $this->errors[] = $this->error; - dol_syslog(__METHOD__." ".implode(','.$this->errors), LOG_ERR); - - return -1; - } - } - */ - /** * Function to fill ->lines_cptbk with accounting account (defined in chart of account) and not yet into a custom group * @@ -743,7 +693,7 @@ class AccountancyCategory // extends CommonObject } $listofaccount .= "'".$cptcursor."'"; } - $sql .= " AND t.numero_compte IN (".$this->db->sanitize($listofaccount).")"; + $sql .= " AND t.numero_compte IN (".$this->db->sanitize($listofaccount, 1).")"; } else { $sql .= " AND t.numero_compte = '".$this->db->escape($cpt)."'"; } diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 0cf7c331506..3c45315ffa9 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -286,6 +286,28 @@ class AccountancyExport } + /** + * Return the MIME type of a file + * + * @param int $formatexportset Id of export format + * @return string MIME type. + */ + public function getMimeType($formatexportset) + { + $mime = 'text/csv'; + + switch ($formatexportset) { + case self::$EXPORT_TYPE_FEC: + $mime = 'text/tab-separated-values'; + break; + default: + $mime = 'text/csv'; + break; + } + + return $mime; + } + /** * Function who chose which export to use with the default config, and make the export into a file * @@ -1356,7 +1378,7 @@ class AccountancyExport } print $nature_piece.$separator; // RACI - // if (! empty($line->subledger_account)) { + // if (!empty($line->subledger_account)) { // if ($line->doc_type == 'supplier_invoice') { // $racine_subledger_account = '40'; // } elseif ($line->doc_type == 'customer_invoice') { @@ -1619,7 +1641,7 @@ class AccountancyExport } print $nature_piece.$separator; // RACI - // if (! empty($line->subledger_account)) { + // if (!empty($line->subledger_account)) { // if ($line->doc_type == 'supplier_invoice') { // $racine_subledger_account = '40'; // } elseif ($line->doc_type == 'customer_invoice') { diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 11b28b85cb9..94ee1ac6029 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -730,7 +730,7 @@ class AccountingAccount extends CommonObject * @param Product $product Product object sell or buy * @param Facture|FactureFournisseur $facture Facture * @param FactureLigne|SupplierInvoiceLine $factureDet Facture Det - * @param array $accountingAccount Array of Account account + * @param array $accountingAccount Array of Accounting account * @param string $type Customer / Supplier * @return array|int Accounting accounts suggested or < 0 if technical error. */ @@ -811,9 +811,9 @@ class AccountingAccount extends CommonObject $suggestedaccountingaccountfor = ''; if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code))) { // If buyer in same country than seller (if not defined, we assume it is same country) - if ($type=='customer' && !empty($product->accountancy_code_sell)) { + if ($type == 'customer' && !empty($product->accountancy_code_sell)) { $code_p = $product->accountancy_code_sell; - } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + } elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) { $code_p = $product->accountancy_code_buy; } $suggestedid = $accountingAccount['dom']; @@ -821,36 +821,36 @@ class AccountingAccount extends CommonObject } else { if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with VAT - if ($type=='customer' && !empty($product->accountancy_code_sell)) { + if ($type == 'customer' && !empty($product->accountancy_code_sell)) { $code_p = $product->accountancy_code_sell; - } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + } elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) { $code_p = $product->accountancy_code_buy; } $suggestedid = $accountingAccount['dom']; $suggestedaccountingaccountfor = 'eecwithvat'; } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number - if ($type=='customer' && !empty($product->accountancy_code_sell)) { + if ($type == 'customer' && !empty($product->accountancy_code_sell)) { $code_p = $product->accountancy_code_sell; - } elseif ($type=='supplier' && !empty($product->accountancy_code_buy)) { + } elseif ($type == 'supplier' && !empty($product->accountancy_code_buy)) { $code_p = $product->accountancy_code_buy; } $suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ? $suggestedaccountingaccountfor = 'eecwithoutvatnumber'; } elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) { // European intravat sale - if ($type=='customer' && !empty($product->accountancy_code_sell_intra)) { + if ($type == 'customer' && !empty($product->accountancy_code_sell_intra)) { $code_p = $product->accountancy_code_sell_intra; - } elseif ($type=='supplier' && !empty($product->accountancy_code_buy_intra)) { + } elseif ($type == 'supplier' && !empty($product->accountancy_code_buy_intra)) { $code_p = $product->accountancy_code_buy_intra; } $suggestedid = $accountingAccount['intra']; $suggestedaccountingaccountfor = 'eec'; } else { // Foreign sale - if ($type=='customer' && !empty($product->accountancy_code_sell_export)) { + if ($type == 'customer' && !empty($product->accountancy_code_sell_export)) { $code_p = $product->accountancy_code_sell_export; - } elseif ($type=='supplier' && !empty($product->accountancy_code_buy_export)) { + } elseif ($type == 'supplier' && !empty($product->accountancy_code_buy_export)) { $code_p = $product->accountancy_code_buy_export; } $suggestedid = $accountingAccount['export']; @@ -868,16 +868,44 @@ class AccountingAccount extends CommonObject } // Manage Deposit - if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) { - $accountdeposittoventilated = new self($this->db); - $result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); - if ($result < 0) { - return -1; + if (getDolGlobalString('ACCOUNTING_ACCOUNT_' . strtoupper($type) . '_DEPOSIT')) { + if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) { + $accountdeposittoventilated = new self($this->db); + if ($type == 'customer') { + $result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); + } elseif ($type == 'supplier') { + $result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT, 1); + } + if (isset($result) && $result < 0) { + return -1; + } + + $code_l = $accountdeposittoventilated->ref; + $code_p = ''; + $code_t = ''; + $suggestedid = $accountdeposittoventilated->rowid; + $suggestedaccountingaccountfor = 'deposit'; } - $code_l = $accountdeposittoventilated->ref; - $suggestedid = $accountdeposittoventilated->rowid; - $suggestedaccountingaccountfor = 'deposit'; + // For credit note invoice, if origin invoice is a deposit invoice, force also on specific customer/supplier deposit account + if (!empty($facture->fk_facture_source)) { + $invoiceSource = new $facture($this->db); + $invoiceSource->fetch($facture->fk_facture_source); + + if ($facture->type == $facture::TYPE_CREDIT_NOTE && $invoiceSource->type == $facture::TYPE_DEPOSIT) { + $accountdeposittoventilated = new self($this->db); + if ($type == 'customer') { + $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); + } elseif ($type == 'supplier') { + $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT, 1); + } + $code_l = $accountdeposittoventilated->ref; + $code_p = ''; + $code_t = ''; + $suggestedid = $accountdeposittoventilated->rowid; + $suggestedaccountingaccountfor = 'deposit'; + } + } } // If $suggestedid could not be guessed yet, we set it from the generic default accounting code $code_l diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 982d6849f6e..4accf66e154 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -231,7 +231,7 @@ class AccountingJournal 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 journal + * @param int $withlabel 0=No label, 1=Include label of journal, 2=Include nature of journal * @param int $nourl 1=Disable url * @param string $moretitle Add more text to title tooltip * @param int $notooltip 1=Disable tooltip @@ -281,9 +281,14 @@ class AccountingJournal extends CommonObject } $label_link = $this->code; - if ($withlabel && !empty($this->label)) { + if ($withlabel != 2 && !empty($this->label)) { $label_link .= ' - '.($nourl ? '' : '').$langs->transnoentities($this->label).($nourl ? '' : ''); } + if ($withlabel == 2 && !empty($this->nature)) { + $key = $langs->trans("AccountingJournalType".strtoupper($this->nature)); + $transferlabel = ($this->nature && $key != "AccountingJournalType".strtoupper($langs->trans($this->nature)) ? $key : $this->label); + $label_link .= ' - '.($nourl ? '' : '').$transferlabel.($nourl ? '' : ''); + } $result .= $linkstart; if ($withpicto) { @@ -982,8 +987,8 @@ class AccountingJournal extends CommonObject $langs->transnoentitiesnoconv("LedgerAccount"), $langs->transnoentitiesnoconv("SubledgerAccount"), $langs->transnoentitiesnoconv("Label"), - $langs->transnoentitiesnoconv("Debit"), - $langs->transnoentitiesnoconv("Credit"), + $langs->transnoentitiesnoconv("AccountingDebit"), + $langs->transnoentitiesnoconv("AccountingCredit"), $langs->transnoentitiesnoconv("Journal"), $langs->transnoentitiesnoconv("Note"), ); @@ -993,8 +998,8 @@ class AccountingJournal extends CommonObject $langs->transnoentitiesnoconv("Piece"), $langs->transnoentitiesnoconv("AccountAccounting"), $langs->transnoentitiesnoconv("LabelOperation"), - $langs->transnoentitiesnoconv("Debit"), - $langs->transnoentitiesnoconv("Credit"), + $langs->transnoentitiesnoconv("AccountingDebit"), + $langs->transnoentitiesnoconv("AccountingCredit"), ); } elseif ($this->nature == 1) { $header = array( @@ -1002,8 +1007,8 @@ class AccountingJournal extends CommonObject $langs->transnoentitiesnoconv("Piece"), $langs->transnoentitiesnoconv("AccountAccounting"), $langs->transnoentitiesnoconv("LabelOperation"), - $langs->transnoentitiesnoconv("Debit"), - $langs->transnoentitiesnoconv("Credit"), + $langs->transnoentitiesnoconv("AccountingDebit"), + $langs->transnoentitiesnoconv("AccountingCredit"), ); } diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 405a630942e..5749518e2b9 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -33,11 +33,52 @@ include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; */ class Lettering extends BookKeeping { - /** - * @var BookKeeping[] Bookkeeping cached - */ - public static $bookkeeping_cached = array(); - + public static $doc_type_infos = array( + 'customer_invoice' => array( + 'payment_table' => 'paiement', + 'payment_table_fk_bank' => 'fk_bank', + 'doc_payment_table' => 'paiement_facture', + 'doc_payment_table_fk_payment' => 'fk_paiement', + 'doc_payment_table_fk_doc' => 'fk_facture', + 'linked_info' => array( + array( + 'table' => 'paiement_facture', + 'fk_doc' => 'fk_facture', + 'fk_link' => 'fk_paiement', + 'prefix' => 'p', + ), + array( + 'table' => 'societe_remise_except', + 'fk_doc' => 'fk_facture_source', + 'fk_link' => 'fk_facture', + 'prefix' => 'a', + 'is_fk_link_is_also_fk_doc' => true, + ), + ), + ), + 'supplier_invoice' => array( + 'payment_table' => 'paiementfourn', + 'payment_table_fk_bank' => 'fk_bank', + 'doc_payment_table' => 'paiementfourn_facturefourn', + 'doc_payment_table_fk_payment' => 'fk_paiementfourn', + 'doc_payment_table_fk_doc' => 'fk_facturefourn', + 'linked_info' => array( + array( + 'table' => 'paiementfourn_facturefourn', + 'fk_doc' => 'fk_facturefourn', + 'fk_link' => 'fk_paiementfourn', + 'prefix' => 'p', + ), + array( + 'table' => 'societe_remise_except', + 'fk_doc' => 'fk_invoice_supplier_source', + 'fk_link' => 'fk_invoice_supplier', + 'prefix' => 'a', + 'is_fk_link_is_also_fk_doc' => true, + ), + ), + ), + ); /** * letteringThirdparty @@ -250,26 +291,17 @@ class Lettering extends BookKeeping $lettre = 'AAA'; $sql = "SELECT DISTINCT ab2.lettering_code"; - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping As ab"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url AS bu ON bu.fk_bank = ab.fk_doc"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url AS bu2 ON bu2.url_id = bu.url_id"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab2 ON ab2.fk_doc = bu2.fk_bank"; - $sql .= " WHERE ab.rowid IN (" . $this->db->sanitize(implode(',', $ids)) . ")"; - $sql .= " AND ab.doc_type = 'bank'"; - $sql .= " AND ab2.doc_type = 'bank'"; - $sql .= " AND bu.type = 'company'"; - $sql .= " AND bu2.type = 'company'"; - $sql .= " AND ab.subledger_account != ''"; - $sql .= " AND ab2.subledger_account != ''"; - $sql .= " AND ab.lettering_code IS NULL"; - $sql .= " AND ab2.lettering_code != ''"; - $sql .= " ORDER BY ab2.lettering_code DESC"; - $sql .= " LIMIT 1 "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab2 ON ab2.subledger_account = ab.subledger_account"; + $sql .= " WHERE ab.rowid IN (" . $this->db->sanitize(implode(',', $ids)) . ")"; + $sql .= " AND ab2.lettering_code != ''"; + $sql .= " ORDER BY ab2.lettering_code DESC"; + $sql .= " LIMIT 1 "; $resqla = $this->db->query($sql); if ($resqla) { $obj = $this->db->fetch_object($resqla); - $lettre = (empty($obj->lettering_code) ? 'AAA' : $obj->lettering_code); + $lettre = (empty($obj->lettering_code) ? $lettre : $obj->lettering_code); if (!empty($obj->lettering_code)) { $lettre++; } @@ -301,7 +333,7 @@ class Lettering extends BookKeeping if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET"; $sql .= " lettering_code='".$this->db->escape($lettre)."'"; - $sql .= " , date_lettering = '".$this->db->idate($now)."'"; // todo correct date it's false + $sql .= ", date_lettering = '".$this->db->idate($now)."'"; // todo correct date it's false $sql .= " WHERE rowid IN (".$this->db->sanitize(implode(',', $ids)).") AND lettering_code IS NULL AND subledger_account != ''"; dol_syslog(get_class($this)."::update", LOG_DEBUG); @@ -336,7 +368,7 @@ class Lettering extends BookKeeping $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET"; $sql .= " lettering_code = NULL"; - $sql .= " , date_lettering = NULL"; + $sql .= ", date_lettering = NULL"; $sql .= " WHERE rowid IN (".$this->db->sanitize(implode(',', $ids)).")"; $sql .= " AND subledger_account != ''"; @@ -374,16 +406,7 @@ class Lettering extends BookKeeping $errors = array(); $nb_lettering = 0; - $result = $this->bookkeepingLettering($bookkeeping_ids, 'customer_invoice', $unlettering); - if ($result < 0) { - $error++; - $errors = array_merge($errors, $this->errors); - $nb_lettering += abs($result) - 2; - } else { - $nb_lettering += $result; - } - - $result = $this->bookkeepingLettering($bookkeeping_ids, 'supplier_invoice', $unlettering); + $result = $this->bookkeepingLettering($bookkeeping_ids, $unlettering); if ($result < 0) { $error++; $errors = array_merge($errors, $this->errors); @@ -404,11 +427,10 @@ class Lettering extends BookKeeping * Lettering bookkeeping lines * * @param array $bookkeeping_ids Lettering specific list of bookkeeping id - * @param string $type Type of bookkeeping type to lettering ('customer_invoice' or 'supplier_invoice') * @param bool $unlettering Do unlettering * @return int <0 if error (nb lettered = result -1), 0 if noting to lettering, >0 if OK (nb lettered) */ - public function bookkeepingLettering($bookkeeping_ids, $type = 'customer_invoice', $unlettering = false) + public function bookkeepingLettering($bookkeeping_ids, $unlettering = false) { global $langs; @@ -416,11 +438,14 @@ class Lettering extends BookKeeping // Clean parameters $bookkeeping_ids = is_array($bookkeeping_ids) ? $bookkeeping_ids : array(); - $type = trim($type); $error = 0; $nb_lettering = 0; - $grouped_lines = $this->getLinkedLines($bookkeeping_ids, $type); + $grouped_lines = $this->getLinkedLines($bookkeeping_ids); + if (!is_array($grouped_lines)) { + return -2; + } + foreach ($grouped_lines as $lines) { $group_error = 0; $total = 0; @@ -478,52 +503,214 @@ class Lettering extends BookKeeping /** * Lettering bookkeeping lines * - * @param array $bookkeeping_ids Lettering specific list of bookkeeping id - * @param string $type Type of bookkeeping type to lettering ('customer_invoice' or 'supplier_invoice') - * @return array|int <0 if error otherwise all linked lines by block + * @param array $bookkeeping_ids Lettering specific list of bookkeeping id + * @param bool $only_has_subledger_account Get only lines who have subledger account + * @return array|int <0 if error otherwise all linked lines by block */ - public function getLinkedLines($bookkeeping_ids, $type = 'customer_invoice') + public function getLinkedLines($bookkeeping_ids, $only_has_subledger_account = true) { global $conf, $langs; $this->errors = array(); // Clean parameters $bookkeeping_ids = is_array($bookkeeping_ids) ? $bookkeeping_ids : array(); - $type = trim($type); - if ($type == 'customer_invoice') { - $doc_type = 'customer_invoice'; - $bank_url_type = 'payment'; - $payment_element = 'paiement_facture'; - $fk_payment_element = 'fk_paiement'; - $fk_element = 'fk_facture'; - $account_number = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; - } elseif ($type == 'supplier_invoice') { - $doc_type = 'supplier_invoice'; - $bank_url_type = 'payment_supplier'; - $payment_element = 'paiementfourn_facturefourn'; - $fk_payment_element = 'fk_paiementfourn'; - $fk_element = 'fk_facturefourn'; - $account_number = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; - } else { + // Get all bookkeeping lines + $sql = "SELECT DISTINCT ab.doc_type, ab.fk_doc"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab"; + $sql .= " WHERE ab.entity IN (" . getEntity('accountancy') . ")"; + $sql .= " AND ab.fk_doc > 0"; + if (!empty($bookkeeping_ids)) { + // Get all bookkeeping lines of piece number + $sql .= " AND EXISTS ("; + $sql .= " SELECT rowid"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS pn"; + $sql .= " WHERE pn.entity IN (" . getEntity('accountancy') . ")"; + $sql .= " AND pn.rowid IN (" . $this->db->sanitize(implode(',', $bookkeeping_ids)) . ")"; + $sql .= " AND pn.piece_num = ab.piece_num"; + $sql .= " )"; + } + if ($only_has_subledger_account) $sql .= " AND ab.subledger_account != ''"; + + dol_syslog(__METHOD__ . " - Get all bookkeeping lines", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->errors[] = "Error " . $this->db->lasterror(); + return -1; + } + + $bookkeeping_lines_by_type = array(); + while ($obj = $this->db->fetch_object($resql)) { + $bookkeeping_lines_by_type[$obj->doc_type][$obj->fk_doc] = $obj->fk_doc; + } + $this->db->free($resql); + + if (empty($bookkeeping_lines_by_type)) { + return array(); + } + + if (!empty($bookkeeping_lines_by_type['bank'])) { + $new_bookkeeping_lines_by_type = $this->getDocTypeAndFkDocFromBankLines($bookkeeping_lines_by_type['bank']); + if (!is_array($new_bookkeeping_lines_by_type)) { + return -1; + } + foreach ($new_bookkeeping_lines_by_type as $doc_type => $fk_docs) { + foreach ($fk_docs as $fk_doc) { + $bookkeeping_lines_by_type[$doc_type][$fk_doc] = $fk_doc; + } + } + } + + $grouped_lines = array(); + foreach (self::$doc_type_infos as $doc_type => $doc_type_info) { + if (!is_array($bookkeeping_lines_by_type[$doc_type])) { + continue; + } + + // Get all document ids grouped + $doc_grouped = $this->getLinkedDocumentByGroup($bookkeeping_lines_by_type[$doc_type], $doc_type); + if (!is_array($doc_grouped)) { + return -1; + } + + // Group all lines by document/piece number + foreach ($doc_grouped as $doc_ids) { + $bank_ids = $this->getBankLinesFromFkDocAndDocType($doc_ids, $doc_type); + if (!is_array($bank_ids)) { + return -1; + } + + // Get all bookkeeping lines linked + $sql = "SELECT DISTINCT ab.rowid, ab.piece_num, ab.debit, ab.credit, ab.lettering_code"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab"; + $sql .= " WHERE ab.entity IN (" . getEntity('accountancy') . ")"; + $sql .= " AND ("; + if (!empty($bank_ids)) { + $sql .= " EXISTS ("; + $sql .= " SELECT bpn.rowid"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS bpn"; + $sql .= " WHERE bpn.entity IN (" . getEntity('accountancy') . ")"; + $sql .= " AND bpn.doc_type = 'bank'"; + $sql .= " AND bpn.fk_doc IN (" . $this->db->sanitize(implode(',', $bank_ids)) . ")"; + $sql .= " AND bpn.piece_num = ab.piece_num"; + $sql .= " ) OR "; + } + $sql .= " EXISTS ("; + $sql .= " SELECT dpn.rowid"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS dpn"; + $sql .= " WHERE dpn.entity IN (" . getEntity('accountancy') . ")"; + $sql .= " AND dpn.doc_type = '" . $this->db->escape($doc_type) . "'"; + $sql .= " AND dpn.fk_doc IN (" . $this->db->sanitize(implode(',', $doc_ids)) . ")"; + $sql .= " AND dpn.piece_num = ab.piece_num"; + $sql .= " )"; + $sql .= ")"; + if ($only_has_subledger_account) $sql .= " AND ab.subledger_account != ''"; + + dol_syslog(__METHOD__ . " - Get all bookkeeping lines linked", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->errors[] = "Error " . $this->db->lasterror(); + return -1; + } + + $group = array(); + while ($obj = $this->db->fetch_object($resql)) { + $group[$obj->rowid] = array( + 'id' => $obj->rowid, + 'piece_num' => $obj->piece_num, + 'debit' => $obj->debit, + 'credit' => $obj->credit, + 'lettering_code' => $obj->lettering_code, + ); + } + $this->db->free($resql); + + if (!empty($group)) $grouped_lines[] = $group; + } + } + + return $grouped_lines; + } + + /** + * Get all fk_doc by doc_type from list of bank ids + * + * @param array $bank_ids List of bank ids + * @return array|int <0 if error otherwise all fk_doc by doc_type + */ + public function getDocTypeAndFkDocFromBankLines($bank_ids) + { + dol_syslog(__METHOD__ . " - bank_ids=".json_encode($bank_ids), LOG_DEBUG); + + // Clean parameters + $bank_ids = is_array($bank_ids) ? $bank_ids : array(); + + if (empty($bank_ids)) { + return array(); + } + + $bookkeeping_lines_by_type = array(); + foreach (self::$doc_type_infos as $doc_type => $doc_type_info) { + // Get all fk_doc by doc_type from bank ids + $sql = "SELECT DISTINCT dp." . $doc_type_info['doc_payment_table_fk_doc'] . " AS fk_doc"; + $sql .= " FROM " . MAIN_DB_PREFIX . $doc_type_info['payment_table'] . " AS p"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $doc_type_info['doc_payment_table'] . " AS dp ON dp." . $doc_type_info['doc_payment_table_fk_payment'] . " = p.rowid"; + $sql .= " WHERE p." . $doc_type_info['payment_table_fk_bank'] . " IN (" . $this->db->sanitize(implode(',', $bank_ids)) . ")"; + $sql .= " AND dp." . $doc_type_info['doc_payment_table_fk_doc'] . " > 0"; + + dol_syslog(__METHOD__ . " - Get all fk_doc by doc_type from list of bank ids for '" . $doc_type . "'", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->errors[] = "Error " . $this->db->lasterror(); + return -1; + } + + while ($obj = $this->db->fetch_object($resql)) { + $bookkeeping_lines_by_type[$doc_type][$obj->fk_doc] = $obj->fk_doc; + } + $this->db->free($resql); + } + + return $bookkeeping_lines_by_type; + } + + /** + * Get all bank ids from list of document ids of a type + * + * @param array $document_ids List of document id + * @param string $doc_type Type of document ('customer_invoice' or 'supplier_invoice', ...) + * @return array|int <0 if error otherwise all all bank ids from list of document ids of a type + */ + public function getBankLinesFromFkDocAndDocType($document_ids, $doc_type) + { + global $langs; + + dol_syslog(__METHOD__ . " - bank_ids=".json_encode($document_ids) . ", doc_type=$doc_type", LOG_DEBUG); + + // Clean parameters + $document_ids = is_array($document_ids) ? $document_ids : array(); + $doc_type = trim($doc_type); + + if (empty($document_ids)) { + return array(); + } + if (!is_array(self::$doc_type_infos[$doc_type])) { $langs->load('errors'); $this->errors[] = $langs->trans('ErrorBadParameters'); return -1; } - $payment_ids = array(); + $doc_type_info = self::$doc_type_infos[$doc_type]; + $bank_ids = array(); - // Get all payment id from bank lines - $sql = "SELECT DISTINCT bu.url_id AS payment_id"; - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url AS bu ON bu.fk_bank = ab.fk_doc"; - $sql .= " WHERE ab.doc_type = 'bank'"; - // $sql .= " AND ab.subledger_account != ''"; - // $sql .= " AND ab.numero_compte = '" . $this->db->escape($account_number) . "'"; - $sql .= " AND bu.type = '" . $this->db->escape($bank_url_type) . "'"; - if (!empty($bookkeeping_ids)) $sql .= " AND ab.rowid IN (" . $this->db->sanitize(implode(',', $bookkeeping_ids)) . ")"; + // Get all fk_doc by doc_type from bank ids + $sql = "SELECT DISTINCT p." . $doc_type_info['payment_table_fk_bank'] . " AS fk_doc"; + $sql .= " FROM " . MAIN_DB_PREFIX . $doc_type_info['payment_table'] . " AS p"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $doc_type_info['doc_payment_table'] . " AS dp ON dp." . $doc_type_info['doc_payment_table_fk_payment'] . " = p.rowid"; + $sql .= " WHERE dp." . $doc_type_info['doc_payment_table_fk_doc'] . " IN (" . $this->db->sanitize(implode(',', $document_ids)) . ")"; + $sql .= " AND p." . $doc_type_info['payment_table_fk_bank'] . " > 0"; - dol_syslog(__METHOD__ . " - Get all payment id from bank lines", LOG_DEBUG); + dol_syslog(__METHOD__ . " - Get all bank ids from list of document ids of a type '" . $doc_type . "'", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->errors[] = "Error " . $this->db->lasterror(); @@ -531,218 +718,137 @@ class Lettering extends BookKeeping } while ($obj = $this->db->fetch_object($resql)) { - $payment_ids[$obj->payment_id] = $obj->payment_id; + $bank_ids[$obj->fk_doc] = $obj->fk_doc; } $this->db->free($resql); - // Get all payment id from payment lines - $sql = "SELECT DISTINCT pe.$fk_payment_element AS payment_id"; - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "$payment_element AS pe ON pe.$fk_element = ab.fk_doc"; - $sql .= " WHERE ab.doc_type = '" . $this->db->escape($doc_type) . "'"; - // $sql .= " AND ab.subledger_account != ''"; - // $sql .= " AND ab.numero_compte = '" . $this->db->escape($account_number) . "'"; - $sql .= " AND pe.$fk_payment_element IS NOT NULL"; - if (!empty($bookkeeping_ids)) $sql .= " AND ab.rowid IN (" . $this->db->sanitize(implode(',', $bookkeeping_ids)) . ")"; - - dol_syslog(__METHOD__ . " - Get all payment id from bank lines", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { - $this->errors[] = "Error " . $this->db->lasterror(); - return -1; - } - - while ($obj = $this->db->fetch_object($resql)) { - $payment_ids[$obj->payment_id] = $obj->payment_id; - } - $this->db->free($resql); - - if (empty($payment_ids)) { - return array(); - } - - // Get all payments linked by group - $payment_by_group = $this->getLinkedPaymentByGroup($payment_ids, $type); - - $groups = array(); - foreach ($payment_by_group as $payment_list) { - $lines = array(); - - // Get bank lines - $sql = "SELECT DISTINCT ab.rowid, ab.piece_num, ab.lettering_code, ab.debit, ab.credit"; - $sql .= " FROM " . MAIN_DB_PREFIX . "bank_url AS bu"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab ON ab.fk_doc = bu.fk_bank"; - $sql .= " WHERE bu.url_id IN (" . $this->db->sanitize(implode(',', $payment_list)) . ")"; - $sql .= " AND bu.type = '" . $this->db->escape($bank_url_type) . "'"; - $sql .= " AND ab.doc_type = 'bank'"; - $sql .= " AND ab.subledger_account != ''"; - $sql .= " AND ab.numero_compte = '" . $this->db->escape($account_number) . "'"; - - dol_syslog(__METHOD__ . " - Get bank lines", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { - $this->errors[] = "Error " . $this->db->lasterror(); - return -1; - } - - while ($obj = $this->db->fetch_object($resql)) { - $lines[$obj->rowid] = array('id' => $obj->rowid, 'piece_num' => $obj->piece_num, 'lettering_code' => $obj->lettering_code, 'debit' => $obj->debit, 'credit' => $obj->credit); - } - $this->db->free($resql); - - // Get payment lines - $sql = "SELECT DISTINCT ab.rowid, ab.piece_num, ab.lettering_code, ab.debit, ab.credit"; - $sql .= " FROM " . MAIN_DB_PREFIX . "$payment_element AS pe"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping AS ab ON ab.fk_doc = pe.$fk_element"; - $sql .= " WHERE pe.$fk_payment_element IN (" . $this->db->sanitize(implode(',', $payment_list)) . ")"; - $sql .= " AND ab.doc_type = '" . $this->db->escape($doc_type) . "'"; - $sql .= " AND ab.subledger_account != ''"; - $sql .= " AND ab.numero_compte = '" . $this->db->escape($account_number) . "'"; - - dol_syslog(__METHOD__ . " - Get payment lines", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { - $this->errors[] = "Error " . $this->db->lasterror(); - return -1; - } - - while ($obj = $this->db->fetch_object($resql)) { - $lines[$obj->rowid] = array('id' => $obj->rowid, 'piece_num' => $obj->piece_num, 'lettering_code' => $obj->lettering_code, 'debit' => $obj->debit, 'credit' => $obj->credit); - } - $this->db->free($resql); - - if (!empty($lines)) { - $groups[] = $lines; - } - } - - return $groups; + return $bank_ids; } /** - * Linked payment by group + * Get all linked document ids by group and type * - * @param array $payment_ids list of payment id - * @param string $type Type of bookkeeping type to lettering ('customer_invoice' or 'supplier_invoice') - * @return array|int <0 if error otherwise all linked lines by block + * @param array $document_ids List of document id + * @param string $doc_type Type of document ('customer_invoice' or 'supplier_invoice', ...) + * @return array|int <0 if error otherwise all linked document ids by group and type [ [ 'doc_type' => [ doc_id, ... ], ... ], ... ] */ - public function getLinkedPaymentByGroup($payment_ids, $type) + public function getLinkedDocumentByGroup($document_ids, $doc_type) { global $langs; // Clean parameters - $payment_ids = is_array($payment_ids) ? $payment_ids : array(); - $type = trim($type); + $document_ids = is_array($document_ids) ? $document_ids : array(); + $doc_type = trim($doc_type); - if (empty($payment_ids)) { + if (empty($document_ids)) { return array(); } - - if ($type == 'customer_invoice') { - $payment_element = 'paiement_facture'; - $fk_payment_element = 'fk_paiement'; - $fk_element = 'fk_facture'; - } elseif ($type == 'supplier_invoice') { - $payment_element = 'paiementfourn_facturefourn'; - $fk_payment_element = 'fk_paiementfourn'; - $fk_element = 'fk_facturefourn'; - } else { + if (!is_array(self::$doc_type_infos[$doc_type])) { $langs->load('errors'); $this->errors[] = $langs->trans('ErrorBadParameters'); return -1; } - // Get payment lines - $sql = "SELECT DISTINCT pe2.$fk_payment_element, pe2.$fk_element"; - $sql .= " FROM " . MAIN_DB_PREFIX . "$payment_element AS pe"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "$payment_element AS pe2 ON pe2.$fk_element = pe.$fk_element"; - $sql .= " WHERE pe.$fk_payment_element IN (" . $this->db->sanitize(implode(',', $payment_ids)) . ")"; + $doc_type_info = self::$doc_type_infos[$doc_type]; - dol_syslog(__METHOD__ . " - Get payment lines", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { - $this->errors[] = "Error " . $this->db->lasterror(); - return -1; + // Get document lines + $current_document_ids = array(); + $link_by_element = array(); + $element_by_link = array(); + foreach ($doc_type_info['linked_info'] as $linked_info) { + $sql = "SELECT DISTINCT tl2." . $linked_info['fk_link'] . " AS fk_link, tl2." . $linked_info['fk_doc'] . " AS fk_doc"; + $sql .= " FROM " . MAIN_DB_PREFIX . $linked_info['table'] . " AS tl"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $linked_info['table'] . " AS tl2 ON tl2." . $linked_info['fk_link'] . " = tl." . $linked_info['fk_link']; + $sql .= " WHERE tl." . $linked_info['fk_doc'] . " IN (" . $this->db->sanitize(implode(',', $document_ids)) . ")"; + + dol_syslog(__METHOD__ . " - Get document lines", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->errors[] = "Error " . $this->db->lasterror(); + return -1; + } + + $is_fk_link_is_also_fk_doc = !empty($linked_info['is_fk_link_is_also_fk_doc']); + while ($obj = $this->db->fetch_object($resql)) { + $current_document_ids[$obj->fk_doc] = $obj->fk_doc; + + $link_key = $linked_info['prefix'] . $obj->fk_link; + $element_by_link[$link_key][$obj->fk_doc] = $obj->fk_doc; + $link_by_element[$obj->fk_doc][$link_key] = $link_key; + if ($is_fk_link_is_also_fk_doc) { + $element_by_link[$link_key][$obj->fk_link] = $obj->fk_link; + $link_by_element[$obj->fk_link][$link_key] = $link_key; + } + } + $this->db->free($resql); } - $current_payment_ids = array(); - $payment_by_element = array(); - $element_by_payment = array(); - while ($obj = $this->db->fetch_object($resql)) { - $current_payment_ids[$obj->$fk_payment_element] = $obj->$fk_payment_element; - $element_by_payment[$obj->$fk_payment_element][$obj->$fk_element] = $obj->$fk_element; - $payment_by_element[$obj->$fk_element][$obj->$fk_payment_element] = $obj->$fk_payment_element; - } - $this->db->free($resql); - - if (count(array_diff($payment_ids, $current_payment_ids))) { - return $this->getLinkedPaymentByGroup($current_payment_ids, $type); + if (count(array_diff($document_ids, $current_document_ids))) { + return $this->getLinkedDocumentByGroup($current_document_ids, $doc_type); } - return $this->getGroupElements($payment_by_element, $element_by_payment); + return $this->getGroupElements($link_by_element, $element_by_link); } /** - * Get payment ids grouped by payment id and element id in common + * Get element ids grouped by link or element in common * - * @param array $payment_by_element List of payment ids by element id - * @param array $element_by_payment List of element ids by payment id - * @param int $element_id Element Id (used for recursive function) - * @param array $current_group Current group (used for recursive function) - * @return array List of payment ids grouped by payment id and element id in common + * @param array $link_by_element List of payment ids by link key + * @param array $element_by_link List of element ids by link key + * @param string $link_key Link key (used for recursive function) + * @param array $current_group Current group (used for recursive function) + * @return array List of element ids grouped by link or element in common */ - public function getGroupElements(&$payment_by_element, &$element_by_payment, $element_id = 0, &$current_group = array()) + public function getGroupElements(&$link_by_element, &$element_by_link, $link_key = '', &$current_group = array()) { - $grouped_payments = array(); - if ($element_id > 0 && !isset($payment_by_element[$element_id])) { - // Return if specific element id not found - return $grouped_payments; + $grouped_elements = array(); + if (!empty($link_key) && !isset($element_by_link[$link_key])) { + // Return if specific link key not found + return $grouped_elements; } - $save_payment_by_element = null; - $save_element_by_payment = null; - if ($element_id == 0) { + if (empty($link_key)) { // Save list when is the begin of recursive function - $save_payment_by_element = $payment_by_element; - $save_element_by_payment = $element_by_payment; + $save_link_by_element = $link_by_element; + $save_element_by_link = $element_by_link; } do { // Get current element id, get this payment id list and delete the entry - $current_element_id = $element_id > 0 ? $element_id : array_keys($payment_by_element)[0]; - $payment_ids = $payment_by_element[$current_element_id]; - unset($payment_by_element[$current_element_id]); + $current_link_key = !empty($link_key) ? $link_key : array_keys($element_by_link)[0]; + $element_ids = $element_by_link[$current_link_key]; + unset($element_by_link[$current_link_key]); - foreach ($payment_ids as $payment_id) { - // Continue if payment id in not found - if (!isset($element_by_payment[$payment_id])) continue; + foreach ($element_ids as $element_id) { + // Continue if element id in not found + if (!isset($link_by_element[$element_id])) continue; - // Set the payment in the current group - $current_group[$payment_id] = $payment_id; + // Set the element in the current group + $current_group[$element_id] = $element_id; - // Get current element ids, get this payment id list and delete the entry - $element_ids = $element_by_payment[$payment_id]; - unset($element_by_payment[$payment_id]); + // Get current link keys, get this element id list and delete the entry + $link_keys = $link_by_element[$element_id]; + unset($link_by_element[$element_id]); - // Set payment id on the current group for each element id of the payment - foreach ($element_ids as $id) { - $this->getGroupElements($payment_by_element, $element_by_payment, $id, $current_group); + // Set element id on the current group for each link key of the element + foreach ($link_keys as $key) { + $this->getGroupElements($link_by_element, $element_by_link, $key, $current_group); } } - if ($element_id == 0) { + if (empty($link_key)) { // Save current group and reset the current group when is the begin of recursive function - $grouped_payments[] = $current_group; + $grouped_elements[] = $current_group; $current_group = array(); } - } while (!empty($payment_by_element) && $element_id == 0); + } while (!empty($element_by_link) && empty($link_key)); - if ($element_id == 0) { + if (empty($link_key)) { // Restore list when is the begin of recursive function - $payment_by_element = $save_payment_by_element; - $element_by_payment = $save_element_by_payment; + $link_by_element = $save_link_by_element; + $element_by_link = $save_element_by_link; } - return $grouped_payments; + return $grouped_elements; } } diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 2aaa24d942a..c1dc454b675 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -21,6 +21,7 @@ * \brief Home closure page */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -63,7 +64,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->fiscalyear->write)) { +if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { accessforbidden(); } @@ -75,7 +76,7 @@ if (empty($user->rights->accounting->fiscalyear->write)) { $now = dol_now(); -if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting->fiscalyear->write)) { +if ($action == 'validate_movements_confirm' && $user->hasRight('accounting', 'fiscalyear', 'write')) { $date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); $date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 0b3435ecb92..e867070ed2d 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -44,7 +44,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -54,7 +54,7 @@ if (empty($user->rights->accounting->mouvements->lire)) { * Actions */ -if ($action == 'ventil' && $user->rights->accounting->bind->write) { +if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) { if (!$cancel) { if ($codeventil < 0) { $codeventil = 0; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 06db5cedd0e..393629ae505 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -26,6 +26,7 @@ * \brief Home customer journalization page */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -46,7 +47,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->bind->write)) { +if (!$user->hasRight('accounting', 'bind', 'write')) { accessforbidden(); } @@ -83,7 +84,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -92,7 +93,7 @@ if (empty($user->rights->accounting->mouvements->lire)) { * Actions */ -if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accounting->bind->write) { +if (($action == 'clean' || $action == 'validatehistory') && $user->hasRight('accounting', 'bind', 'write')) { // Clean database by removing binding done on non existing or no more existing accounts $db->begin(); $sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as fd"; @@ -141,7 +142,7 @@ if ($action == 'validatehistory') { }*/ // Customer Invoice lines (must be same request than into page list.php for manual binding) - $sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,"; + $sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype, f.fk_facture_source,"; $sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.tva_tx as tva_tx_prod,"; if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { @@ -206,37 +207,38 @@ if ($action == 'validatehistory') { while ($i < min($num_lines, 10000)) { // No more than 10000 at once $objp = $db->fetch_object($result); - $thirdpartystatic->id = $objp->socid; - $thirdpartystatic->name = $objp->name; - $thirdpartystatic->client = $objp->client; - $thirdpartystatic->fournisseur = $objp->fournisseur; - $thirdpartystatic->code_client = $objp->code_client; - $thirdpartystatic->code_compta_client = $objp->code_compta_client; - $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; - $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; - $thirdpartystatic->email = $objp->email; - $thirdpartystatic->country_code = $objp->country_code; - $thirdpartystatic->tva_intra = $objp->tva_intra; - $thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion) + $thirdpartystatic->id = !empty($objp->socid) ? $objp->socid : 0; + $thirdpartystatic->name = !empty($objp->name) ? $objp->name : ""; + $thirdpartystatic->client = !empty($objp->client) ? $objp->client : ""; + $thirdpartystatic->fournisseur = !empty($objp->fournisseur) ? $objp->fournisseur : ""; + $thirdpartystatic->code_client = !empty($objp->code_client) ? $objp->code_client : ""; + $thirdpartystatic->code_compta_client = !empty($objp->code_compta_client) ? $objp->code_compta_client : ""; + $thirdpartystatic->code_fournisseur = !empty($objp->code_fournisseur) ? $objp->code_fournisseur : ""; + $thirdpartystatic->code_compta_fournisseur = !empty($objp->code_compta_fournisseur) ? $objp->code_compta_fournisseur : ""; + $thirdpartystatic->email = !empty($objp->email) ? $objp->email : ""; + $thirdpartystatic->country_code = !empty($objp->country_code) ? $objp->country_code : ""; + $thirdpartystatic->tva_intra = !empty($objp->tva_intra) ? $objp->tva_intra : ""; + $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : ""; // The accounting account for product stored on thirdparty object (for level3 suggestion) $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; $product_static->type = $objp->type; $product_static->label = $objp->product_label; - $product_static->status = $objp->status; - $product_static->status_buy = $objp->status_buy; + $product_static->status = !empty($objp->status) ? $objp->status : 0; + $product_static->status_buy = !empty($objp->status_buy) ? $objp->status_buy : 0; $product_static->accountancy_code_sell = $objp->code_sell; $product_static->accountancy_code_sell_intra = $objp->code_sell_intra; $product_static->accountancy_code_sell_export = $objp->code_sell_export; - $product_static->accountancy_code_buy = $objp->code_buy; - $product_static->accountancy_code_buy_intra = $objp->code_buy_intra; - $product_static->accountancy_code_buy_export = $objp->code_buy_export; + $product_static->accountancy_code_buy = !empty($objp->code_buy) ? $objp->code_buy : ""; + $product_static->accountancy_code_buy_intra = !empty($objp->code_buy_intra) ? $objp->code_buy_intra : ""; + $product_static->accountancy_code_buy_export = !empty($objp->code_buy_export) ? $objp->code_buy_export : ""; $product_static->tva_tx = $objp->tva_tx_prod; $facture_static->ref = $objp->ref; $facture_static->id = $objp->facid; $facture_static->type = $objp->ftype; - $facture_static->date = $objp->datef; + $facture_static->date = $db->jdate($objp->datef); + $facture_static->fk_facture_source = $objp->fk_facture_source; $facture_static_det->id = $objp->rowid; $facture_static_det->total_ht = $objp->total_ht; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 469f29ad3c7..e4f7d556c16 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -91,7 +91,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } @@ -126,7 +126,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_tvaintra = ''; } -if (is_array($changeaccount) && count($changeaccount) > 0 && $user->rights->accounting->bind->write) { +if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) { $error = 0; if (!(GETPOST('account_parent', 'int') >= 0)) { @@ -189,7 +189,7 @@ print ''; -} +$constname = 'MAIN_AGENDA_XCAL_EXPORTKEY'; + +// Add button to autosuggest a key +include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; +print dolJSToSetRandomPassword($constname); // End of page llxFooter(); diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index 1382ef49983..d01ac5a93e9 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of bank */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -64,32 +65,27 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; * View */ -$textobject = $langs->transnoentitiesnoconv("Bank"); +$help_url = ''; +$page_name = "BankSetupModule"; llxHeader('', $langs->trans("BankSetupModule"), $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; -print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup'); +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); $head = bank_admin_prepare_head(null); -print dol_get_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), -1, 'account'); +print dol_get_fiche_head($head, 'attributes', $langs->trans($page_name), -1, 'account'); + +$textobject = $langs->transnoentitiesnoconv("Bank"); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/bankline_extrafields.php b/htdocs/admin/bankline_extrafields.php new file mode 100644 index 00000000000..7e451275f8d --- /dev/null +++ b/htdocs/admin/bankline_extrafields.php @@ -0,0 +1,112 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2022 Frédéric France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/bankline_extrafields.php + * \ingroup bank + * \brief Page to setup extra fields of bankline + */ + +// Load Dolibarr environment +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "companies", "bills", "other", "banks")); + +$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', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'bank'; //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 + */ + + +$help_url = ''; +$page_name = "BankSetupModule"; + +llxHeader('', $langs->trans("BankSetupModule"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); + + +$head = bank_admin_prepare_head(null); + +print dol_get_fiche_head($head, 'bankline_extrafields', $langs->trans($page_name), -1, 'account'); + +$textobject = $langs->transnoentitiesnoconv("BankTransaction"); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +/* + * 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'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 5e2451f2ce6..96dd7affdba 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -24,6 +24,7 @@ * \brief Page to setup barcode module */ +// Load Dolibarr environment 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'; @@ -31,10 +32,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; // Load translation files required by the page $langs->load("admin"); +// Security Check Access if (!$user->admin) { accessforbidden(); } +// Get Parameters $action = GETPOST('action', 'aZ09'); $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php @@ -55,6 +58,16 @@ if ($action == 'setbarcodeproducton') { $res = dolibarr_del_const($db, "BARCODE_PRODUCT_ADDON_NUM", $conf->entity); } +if ($action == 'setbarcodethirdpartyon') { + $barcodenumberingmodule = GETPOST('value', 'alpha'); + $res = dolibarr_set_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $barcodenumberingmodule, 'chaine', 0, '', $conf->entity); + if ($barcodenumberingmodule == 'mod_barcode_thirdparty_standard' && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $res = dolibarr_set_const($db, "BARCODE_STANDARD_THIRDPARTY_MASK", '020{000000000}', 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'setbarcodethirdpartyoff') { + $res = dolibarr_del_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $conf->entity); +} + if ($action == 'setcoder') { $coder = GETPOST('coder', 'alpha'); $code_id = GETPOST('code_id', 'int'); @@ -180,7 +193,7 @@ foreach ($dirbarcode as $reldir) { // Select barcode numbering module -if ($conf->product->enabled) { +if (isModEnabled('product')) { print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")", '', ''); print '
'; @@ -241,6 +254,66 @@ if ($conf->product->enabled) { print '
'; } +// Select barcode numbering module +if (isModEnabled('societe')) { + print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("ThirdParty").")", '', ''); + + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); + + foreach ($dirbarcodenum as $dirroot) { + $dir = dol_buildpath($dirroot, 0); + + $handle = @opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) { + $file = substr($file, 0, dol_strlen($file) - 4); + + try { + dol_include_once($dirroot.$file.'.php'); + } catch (Exception $e) { + dol_syslog($e->getMessage(), LOG_ERR); + } + + $modBarCode = new $file(); + print ''; + print ''; + print '\n"; + + if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM) && $conf->global->BARCODE_THIRDPARTY_ADDON_NUM == "$file") { + print ''; + } else { + print ''; + } + print ''; + print "\n"; + } + } + closedir($handle); + } + } + print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."\n"; + print $modBarCode->info($langs); + print ''.$modBarCode->getExample($langs)."'; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + $s = $modBarCode->getToolTip($langs, null, -1); + print $form->textwithpicto('', $s, 1); + print '
\n"; + print '
'; +} /* * CHOIX ENCODAGE @@ -380,7 +453,7 @@ if (!isset($_SERVER['WINDIR'])) { } // Module products -if (!empty($conf->product->enabled)) { +if (isModEnabled('product')) { print ''; print ''.$langs->trans("SetDefaultBarcodeTypeProducts").''; print ''; @@ -391,7 +464,7 @@ if (!empty($conf->product->enabled)) { } // Module thirdparty -if (!empty($conf->societe->enabled)) { +if (isModEnabled('societe')) { print ''; print ''.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; print ''; diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index b19db5a3d5e..a35aef780d2 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -21,6 +21,7 @@ * \brief Setup page of module BOM */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; diff --git a/htdocs/admin/bom_extrafields.php b/htdocs/admin/bom_extrafields.php index 0691f91b592..7b77702eea4 100644 --- a/htdocs/admin/bom_extrafields.php +++ b/htdocs/admin/bom_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of BOM */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,14 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/bomline_extrafields.php b/htdocs/admin/bomline_extrafields.php new file mode 100644 index 00000000000..1a21f052b84 --- /dev/null +++ b/htdocs/admin/bomline_extrafields.php @@ -0,0 +1,114 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/bomline_extrafields.php + * \ingroup bom + * \brief Page to setup extra fields of BOM + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . '/bom/lib/bom.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('mrp', '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', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'bom_bomline'; + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php'; + + +/* + * View + */ + +$help_url = ''; +llxHeader('', $langs->trans("BOMLinesSetup"), $help_url); + + +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans("BOMLinesSetup"), $linkback, 'title_setup'); + + +$head = bomAdminPrepareHead(); + +print dol_get_fiche_head($head, 'bomline_extrafields', $langs->trans("ExtraFields"), -1, 'account'); + +require DOL_DOCUMENT_ROOT . '/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + 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'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 1bc5f67239e..cbab8027e43 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * @@ -23,6 +23,7 @@ * \brief Page to setup boxes */ +// Load Dolibarr environment require '../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; @@ -356,7 +357,7 @@ foreach ($boxtoadd as $box) { // For each possible position, an activation link is displayed if the box is not already active for that position print ''; - print $form->selectarray("boxid[".$box->box_id."][pos]", $arrayofhomepages, -1, 1, 0, 0, '', 1)."\n"; + print $form->selectarray("boxid[".$box->box_id."][pos]", $arrayofhomepages, -1, 1, 0, 0, '', 1, 0, 0, '', 'minwidth75', 1)."\n"; print ''."\n"; print ''; diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 396d44625a7..cf93155b814 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -25,6 +25,7 @@ * \brief Page to setup the bank module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index a8d33ae5a09..3174b5bc091 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -23,6 +23,7 @@ * \brief Page to setup module ClickToDial */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -35,8 +36,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); -if (!in_array('clicktodial', $conf->modules)) { - accessforbidden($langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module58Name"))); +if (!isModEnabled('clicktodial')) { + accessforbidden($langs->transnoentitiesnoconv("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module58Name"))); } @@ -107,7 +108,7 @@ print '* https://myphoneserver/phoneurl?login=__LOGIN__&password=__PASS__&caller print '* sip:__PHONETO__@my.sip.server'; print ''; -//if (! empty($user->clicktodial_url)) +//if (!empty($user->clicktodial_url)) //{ print '
'; print info_admin($langs->trans("ValueOverwrittenByUserSetup")); @@ -188,22 +189,10 @@ if (!empty($conf->global->CLICKTODIAL_URL)) { } } -if (!empty($conf->use_javascript_ajax)) { - print "\n".''; -} +// Add button to autosuggest a key +include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; +print dolJSToSetRandomPassword('CLICKTODIAL_KEY_FOR_CIDLOOKUP'); + // End of page llxFooter(); diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index a2aa663f189..34a5e281fac 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -31,6 +31,7 @@ * \brief Setup page of module Order */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -181,7 +182,39 @@ if ($action == 'updateMask') { } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') { +} elseif (preg_match('/set_(.*)/', $action, $reg)) { + $code = $reg[1]; + $value = (GETPOST($code) ? GETPOST($code) : 1); + + $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } +} elseif (preg_match('/del_(.*)/', $action, $reg)) { + $code = $reg[1]; + $res = dolibarr_del_const($db, $code, $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } +} +/*elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') { // Activate ask for payment bank $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity); @@ -207,7 +240,8 @@ if ($action == 'updateMask') { } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} +} */ + /* @@ -507,7 +541,7 @@ print ''; print "".$langs->trans("SuggestPaymentByRIBOnAccount").""; print ""; if (empty($conf->facture->enabled)) { - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE clos = 0"; @@ -635,16 +669,24 @@ print ''; print ''; print "\n"; + +// Allow external download +print ''; +print ''.$langs->trans("AllowExternalDownload").''; +print ''; +print ajax_constantonoff('ORDER_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1); +print ''; print ''; /* // Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation. +// TODO Must be implemented by PDF templates // Ask for payment bank during order if ($conf->banque->enabled) { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' '; - if (! empty($conf->use_javascript_ajax)) { + if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER'); } else { if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) { @@ -664,7 +706,7 @@ if ($conf->banque->enabled) { if (isModEnabled('stock')) { print ''; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' '; - if (! empty($conf->use_javascript_ajax)) { + if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER'); } else { if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { diff --git a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php index cf887b6b454..277d61e1b2f 100644 --- a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php +++ b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php @@ -30,6 +30,7 @@ * \brief Page to setup extra fields of reception */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -91,14 +92,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print "
"; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 4f4af520df7..d6760ef45e8 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -27,6 +27,7 @@ * \brief Setup page to configure company/foundation */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -470,7 +471,7 @@ print ''."\n"; // Barcode -if (!empty($conf->barcode->enabled)) { +if (isModEnabled('barcode')) { print ''; print ''; print ''; @@ -478,11 +479,15 @@ if (!empty($conf->barcode->enabled)) { print ''; } -// Logo -print ''; -print '
'; +// Tooltip for both Logo and LogSquarred +$tooltiplogo = $langs->trans('AvailableFormats').' : png, jpg, jpeg'; $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; +$tooltiplogo .= ($maxmin > 0) ? '
'.$langs->trans('MaxSize').' : '.$maxmin.' '.$langs->trans('Kb') : ''; + +// Logo +print ''; +print '
'; if ($maxmin > 0) { print ''; // MAX_FILE_SIZE must precede the field type=file } @@ -521,7 +526,7 @@ print '
'; print ''; // Logo (squarred) -print ''; +print ''; print '
'; $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php index 1f2d102b644..e9171431187 100644 --- a/htdocs/admin/company_socialnetworks.php +++ b/htdocs/admin/company_socialnetworks.php @@ -28,6 +28,7 @@ * \brief Setup page to configure company social networks */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -93,6 +94,7 @@ $head = company_admin_prepare_head(); print dol_get_fiche_head($head, 'socialnetworks', '', -1, ''); print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Save"))."
\n"; +print ''.$langs->trans("MoreNetworksAvailableWithModule")."
\n"; print "
\n"; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index d215125d51e..afc23f3ff63 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -27,6 +27,7 @@ * \brief Page to setup accountancy module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -146,7 +147,7 @@ print "\n"; print ' '.$langs->trans('OptionModeTrue').''; print ''.nl2br($langs->trans('OptionModeTrueDesc')); // Write info on way to count VAT -//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) +//if (!empty($conf->global->MAIN_MODULE_COMPTABILITE)) //{ // // print "
\n"; // // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite')); diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php deleted file mode 100644 index c2ca271e5ea..00000000000 --- a/htdocs/admin/confexped.php +++ /dev/null @@ -1,146 +0,0 @@ - - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2011-2016 Juanjo Menent ù - * 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 - * 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/confexped.php - * \ingroup produit - * \brief Page to setup sending module - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; - -// Load translation files required by the page -$langs->loadLangs(array('admin', 'sendings', 'deliveries')); - -if (!$user->admin) { - accessforbidden(); -} - -$action = GETPOST('action', 'aZ09'); - - -/* - * Actions - */ - -// Shipment note -if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - // This option should always be set to on when module is on. - dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity); -} -/* -if ($action == 'activate_sending') -{ - dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); - header("Location: confexped.php"); - exit; -} -if ($action == 'disable_sending') -{ - dolibarr_del_const($db, "MAIN_SUBMODULE_EXPEDITION",$conf->entity); - header("Location: confexped.php"); - exit; -} -*/ - -// Delivery note -if ($action == 'activate_delivery') { - dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity); // We must also enable this - dolibarr_set_const($db, "MAIN_SUBMODULE_DELIVERY", "1", 'chaine', 0, '', $conf->entity); - header("Location: confexped.php"); - exit; -} elseif ($action == 'disable_delivery') { - dolibarr_del_const($db, "MAIN_SUBMODULE_DELIVERY", $conf->entity); - header("Location: confexped.php"); - exit; -} - - -/* - * View - */ - -$dir = DOL_DOCUMENT_ROOT."/core/modules/expedition/"; -$form = new Form($db); - -llxHeader("", $langs->trans("SendingsSetup")); - -$linkback = ''.$langs->trans("BackToModuleList").''; -print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); -print '
'; -$head = expedition_admin_prepare_head(); - -print dol_get_fiche_head($head, 'general', $langs->trans("Sendings"), -1, 'shipment'); - -// Miscellaneous parameters - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''."\n"; - -// expedition activation/desactivation -print ""; -print ''; -print ''; -print '"; -print ''; - -// Delivery note activate/deactivate Bon de livraison activation/desactivation -print ''; -print ''; -print ''; -print '"; -print ''; -print '
'.$langs->trans("Feature").' '.$langs->trans("Status").'
'.$langs->trans("SendingsAbility").''; -print ''; -print ''.img_picto($langs->trans("Required"), 'switch_on').''; -/*if (empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) -{ - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; -} -else -{ - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; -}*/ -print "
'; -print $langs->trans("DeliveriesOrderAbility"); -print '
'.info_admin($langs->trans("NoNeedForDeliveryReceipts"), 0, 1); -print '
'; -print ''; - -if (empty($conf->global->MAIN_SUBMODULE_DELIVERY)) { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; -} else { - print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; -} - -print "
'; - -print '
'; - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a5a68a0bb49..e5625b0f975 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -24,8 +24,10 @@ * \brief Admin page to define miscellaneous constants */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; // Load translation files required by the page $langs->load("admin"); @@ -185,12 +187,12 @@ print ''; print '
'; print ''; print ''; -print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n"; print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); -print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; -if (!empty($conf->multicompany->enabled) && !$user->entity) { - print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; +if (isModEnabled('multicompany') && !$user->entity) { + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; } print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); print "\n"; @@ -211,14 +213,14 @@ print ''; print ''; // Limit to superadmin -if (!empty($conf->multicompany->enabled) && !$user->entity) { +if (isModEnabled('multicompany') && !$user->entity) { print ''; print '\n"; @@ -255,16 +257,18 @@ if ($result) { while ($i < $num) { $obj = $db->fetch_object($result); + $value = dolDecrypt($obj->value); + print "\n"; - print ''."\n"; + print ''."\n"; // Value print ''; // Note @@ -278,14 +282,14 @@ if ($result) { print ''; // Entity limit to superadmin - if (!empty($conf->multicompany->enabled) && !$user->entity) { + if (isModEnabled('multicompany') && !$user->entity) { print ''; print '
'; print ''; - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } print ''; print "
'.$obj->name.'
'.dol_escape_htmltag($obj->name).''; print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } if ($conf->use_javascript_ajax) { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 31d0776da6b..48247bf0b8e 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -22,6 +22,7 @@ * \brief Setup page of module Contracts */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -54,6 +55,8 @@ if (empty($conf->global->CONTRACT_ADDON)) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; +$error=0; + if ($action == 'updateMask') { $maskconst = GETPOST('maskconstcontract', 'alpha'); $maskvalue = GETPOST('maskcontract', 'alpha'); @@ -127,6 +130,8 @@ if ($action == 'updateMask') { if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } +} elseif ($action == 'unsetdoc') { + dolibarr_del_const($db, "CONTRACT_ADDON_PDF", $conf->entity); } elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -151,9 +156,45 @@ if ($action == 'updateMask') { } else { setEventMessages($langs->trans("Error"), null, 'errors'); } +} elseif ($action == "allowonlinesign") { + if (!dolibarr_set_const($db, "CONTRACT_ALLOW_ONLINESIGN", $value, 0, 'int', $conf->entity)) { + $error++; + } +} elseif (preg_match('/set_(.*)/', $action, $reg)) { + $code = $reg[1]; + $value = (GETPOST($code) ? GETPOST($code) : 1); + + $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } +} elseif (preg_match('/del_(.*)/', $action, $reg)) { + $code = $reg[1]; + $res = dolibarr_del_const($db, $code, $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } } + /* * View */ @@ -177,6 +218,7 @@ print dol_get_fiche_head($head, 'contract', $langs->trans("Contracts"), -1, 'con print load_fiche_titre($langs->trans("ContractsNumberingModules"), '', ''); +print '
'; print ''; print ''; print ''; @@ -270,7 +312,7 @@ foreach ($dirmodels as $reldir) { } } -print '
'.$langs->trans("Name").'

'; +print '

'; /* * Documents models for Contracts @@ -298,6 +340,7 @@ if ($resql) { } +print '
'; print ''; print ''; print ''; @@ -368,9 +411,9 @@ foreach ($dirmodels as $reldir) { // Defaut print ''; @@ -414,6 +457,7 @@ foreach ($dirmodels as $reldir) { } print '
'.$langs->trans("Name").''; if ($conf->global->CONTRACT_ADDON_PDF == $name) { - print img_picto($langs->trans("Default"), 'on'); + print 'scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; } else { - print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print '
'; +print '
'; print "
"; /* @@ -426,6 +470,8 @@ print ''; print ''; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); + +print '
'; print ''; print ''; print ''; @@ -468,7 +514,31 @@ print $form->selectyesno("activate_hideClosedServiceByDefault", (!empty($conf->g print ''; print ''; +// Allow online signing +print ''; +print ''; +print ''; +print ''; + +// Allow external download +print ''; +print ''; +print ''; +print ''; print '
'.$langs->trans("Parameter").'
'.$langs->trans("AllowOnlineSign").''; +if (getDolGlobalString('CONTRACT_ALLOW_ONLINESIGN')) { + print ''; + print img_picto($langs->trans("Activited"), 'switch_on'); + print ''; +} else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; +} +print '
'.$langs->trans("AllowExternalDownload").''; +print ajax_constantonoff('CONTRACT_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1); +print '
'; +print '
'; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 698bb187d67..d0fd21c80a0 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -21,6 +21,7 @@ * \brief Page to setup DAV server */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php'; @@ -76,14 +77,14 @@ print ''; $head = dav_admin_prepare_head(); -print dol_get_fiche_head($head, 'webdav', '', -1, 'action'); +print dol_get_fiche_head($head, 'webdav', '', -1, ''); if ($action == 'edit') { print '
'; print ''; print ''; - print ''; + print '
'; print ''; foreach ($arrayofparameters as $key => $val) { @@ -96,7 +97,7 @@ if ($action == 'edit') { $label = $langs->trans($key); if ($key == 'DAV_RESTICT_ON_IP') { $label = $langs->trans("RESTRICT_ON_IP"); - $label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); + $tooltiphelp .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); } print $form->textwithpicto($label, $tooltiphelp); print ''; $filterfound++; } elseif ($value == 'code') { @@ -2076,7 +2077,7 @@ if ($id > 0) { } elseif (in_array($value, array('recuperableonly'))) { $class = "center"; } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; $tmpaccountingaccount = new AccountingAccount($db); $tmpaccountingaccount->fetch(0, $valuetoshow, 1); @@ -2127,7 +2128,7 @@ if ($id > 0) { $class .= ' right'; } if (in_array($value, array('localtax1_type', 'localtax2_type'))) { - $class .= ' nowrap'; + $class .= ' nowraponall'; } if (in_array($value, array('use_default', 'fk_parent', 'sortorder'))) { $class .= ' center'; @@ -2272,8 +2273,9 @@ if ($id > 0) { print '
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; @@ -119,19 +120,19 @@ if ($action == 'edit') { print ''; print '
'; } else { - print ''; + print '
'; print ''; foreach ($arrayofparameters as $key => $val) { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); $label = $langs->trans($key); if ($key == 'DAV_RESTICT_ON_IP') { $label = $langs->trans("RESTRICT_ON_IP"); - $label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample").''; + $tooltiphelp .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample").''; } print $form->textwithpicto($label, $tooltiphelp); - print ''; + print ''; if ($key == 'DAV_ALLOW_PRIVATE_DIR') { print $langs->trans("AlwaysActive"); } elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') { @@ -185,13 +186,13 @@ $message .= ajax_autoselect('webdavpublicurl'); $message .= '
'; if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { - $urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : ''); - $url = ''.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.''; + $urlEntity = (isModEnabled('multicompany') ? '?entity=' . $conf->entity : ''); + $url = '' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . ''; - $message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '')); - $message .= '
'; -/* - * Autres Options - */ -print "
"; -print load_fiche_titre($langs->trans("OtherOptions"), '', ''); - -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; - -$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); -$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); -$htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach ($substitutionarray as $key => $val) { - $htmltext .= $key.'
'; -} -$htmltext .= '
'; - -print ''; -print ''; -print ''; -print '\n"; -print ''; - -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; -print $form->textwithpicto($langs->trans("FreeLegalTextOnDeliveryReceipts"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; -$variablename = 'DELIVERY_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { - print ''; -} else { - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes'); - print $doleditor->Create(); -} -print '
'; -print ''; -print "
'; - // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/delivery_extrafields.php b/htdocs/admin/delivery_extrafields.php index fa1aa809944..214f209b2be 100644 --- a/htdocs/admin/delivery_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -27,6 +27,7 @@ * \brief Page to setup extra fields of delivery */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -88,14 +89,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/deliverydet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php index 6fbfbb58884..9c054f5bcfd 100644 --- a/htdocs/admin/deliverydet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -29,6 +29,7 @@ * \brief Page to setup extra fields of delivery */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -89,14 +90,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ed5e4c06b3d..d928931c9ab 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -11,7 +11,7 @@ * Copyright (C) 2011-2022 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2022 Frédéric France * Copyright (C) 2020-2022 Open-Dsi * * This program is free software; you can redistribute it and/or modify @@ -34,6 +34,7 @@ * \brief Page to administer data tables */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -54,13 +55,13 @@ $entity = GETPOST('entity', 'int'); $code = GETPOST('code', 'alpha'); $allowed = $user->admin; -if ($id == 7 && !empty($user->rights->accounting->chartofaccount)) { +if ($id == 7 && $user->hasRight('accounting', 'chartofaccount')) { $allowed = 1; // Tax page allowed to manager of chart account } -if ($id == 10 && !empty($user->rights->accounting->chartofaccount)) { +if ($id == 10 && $user->hasRight('accounting', 'chartofaccount')) { $allowed = 1; // Vat page allowed to manager of chart account } -if ($id == 17 && !empty($user->rights->accounting->chartofaccount)) { +if ($id == 17 && $user->hasRight('accounting', 'chartofaccount')) { $allowed = 1; // Dictionary with type of expense report and accounting account allowed to manager of chart account } if (!$allowed) { @@ -483,50 +484,50 @@ $tabrowid[44] = "rowid"; // Condition to show dictionary in setup page $tabcond = array(); -$tabcond[1] = (!empty($conf->societe->enabled)); +$tabcond[1] = (isModEnabled("societe")); $tabcond[2] = true; $tabcond[3] = true; $tabcond[4] = true; -$tabcond[5] = (!empty($conf->societe->enabled) || !empty($conf->adherent->enabled)); +$tabcond[5] = (isModEnabled("societe") || isModEnabled('adherent')); $tabcond[6] = isModEnabled('agenda'); -$tabcond[7] = !empty($conf->tax->enabled); -$tabcond[8] = !empty($conf->societe->enabled); +$tabcond[7] = isModEnabled('tax'); +$tabcond[8] = isModEnabled("societe"); $tabcond[9] = true; $tabcond[10] = true; -$tabcond[11] = (!empty($conf->societe->enabled)); -$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled)); -$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled)); -$tabcond[14] = (!empty($conf->product->enabled) && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY))); +$tabcond[11] = (isModEnabled("societe")); +$tabcond[12] = (isModEnabled('commande') || isModEnabled("propal") || isModEnabled('facture') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice") || isModEnabled("supplier_order")); +$tabcond[13] = (isModEnabled('commande') || isModEnabled("propal") || isModEnabled('facture') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice") || isModEnabled("supplier_order")); +$tabcond[14] = (isModEnabled("product") && (isModEnabled('ecotax') || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY))); $tabcond[15] = true; -$tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)); -$tabcond[17] = (!empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled)); -$tabcond[18] = !empty($conf->expedition->enabled) || !empty($conf->reception->enabled); -$tabcond[19] = !empty($conf->societe->enabled); -$tabcond[20] = (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled); -$tabcond[21] = !empty($conf->propal->enabled); -$tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled)); +$tabcond[16] = (isModEnabled("societe") && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)); +$tabcond[17] = (isModEnabled('deplacement') || isModEnabled('expensereport')); +$tabcond[18] = isModEnabled("expedition") || isModEnabled("reception"); +$tabcond[19] = isModEnabled("societe"); +$tabcond[20] = (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order"); +$tabcond[21] = isModEnabled("propal"); +$tabcond[22] = (isModEnabled('commande') || isModEnabled("propal")); $tabcond[23] = true; -$tabcond[24] = !empty($conf->resource->enabled); -$tabcond[25] = !empty($conf->website->enabled); -//$tabcond[26]= !empty($conf->product->enabled); -$tabcond[27] = !empty($conf->societe->enabled); -$tabcond[28] = !empty($conf->holiday->enabled); -$tabcond[29] = !empty($conf->project->enabled); -$tabcond[30] = !empty($conf->label->enabled); -//$tabcond[31]= !empty($conf->accounting->enabled); -$tabcond[32] = (!empty($conf->holiday->enabled) || !empty($conf->hrm->enabled)); -$tabcond[33] = !empty($conf->hrm->enabled); -$tabcond[34] = !empty($conf->hrm->enabled); -$tabcond[35] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK); -$tabcond[36] = !empty($conf->expensereport->enabled) && !empty($conf->global->MAIN_USE_EXPENSE_IK); -$tabcond[37] = !empty($conf->product->enabled); -$tabcond[38] = !empty($conf->socialnetworks->enabled); -$tabcond[39] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); -$tabcond[40] = (!empty($conf->societe->enabled) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); -$tabcond[41] = !empty($conf->intracommreport->enabled); -$tabcond[42] = !empty($conf->product->enabled); -$tabcond[43] = !empty($conf->product->enabled) && !empty($conf->productbatch->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2; -$tabcond[44] = !empty($conf->asset->enabled); +$tabcond[24] = isModEnabled('resource'); +$tabcond[25] = isModEnabled('website'); +//$tabcond[26]= isModEnabled("product"); +$tabcond[27] = isModEnabled("societe"); +$tabcond[28] = isModEnabled('holiday'); +$tabcond[29] = isModEnabled('project'); +$tabcond[30] = isModEnabled('label'); +//$tabcond[31]= isModEnabled('accounting'); +$tabcond[32] = (isModEnabled('holiday') || isModEnabled('hrm')); +$tabcond[33] = isModEnabled('hrm'); +$tabcond[34] = isModEnabled('hrm'); +$tabcond[35] = isModEnabled('expensereport') && !empty($conf->global->MAIN_USE_EXPENSE_IK); +$tabcond[36] = isModEnabled('expensereport') && !empty($conf->global->MAIN_USE_EXPENSE_IK); +$tabcond[37] = isModEnabled("product"); +$tabcond[38] = isModEnabled('socialnetworks'); +$tabcond[39] = (isModEnabled("societe") && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); +$tabcond[40] = (isModEnabled("societe") && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); +$tabcond[41] = isModEnabled('intracommreport'); +$tabcond[42] = isModEnabled("product"); +$tabcond[43] = isModEnabled("product") && isModEnabled('productbatch') && $conf->global->MAIN_FEATURES_LEVEL >= 2; +$tabcond[44] = isModEnabled('asset'); // List of help for fields (no more used, help is defined into tabcomplete) $tabhelp = array(); @@ -842,7 +843,7 @@ if (empty($reshook)) { $_POST["accountancy_code_buy"] = ''; // If empty, we force to null } if ($id == 10 && GETPOSTISSET("code")) { // Spaces are not allowed into code for tax dictionary - $_POST["code"] = preg_replace('/[^a-zA-Z0-9\-\+]/', '', GETPOST("code")); + $_POST["code"] = preg_replace('/[^a-zA-Z0-9_\-\+]/', '', GETPOST("code")); } $tablename = $tabname[$id]; @@ -1636,7 +1637,7 @@ if ($id > 0) { if ($showfield) { if ($value == 'country') { print '
'; - print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth150 maxwidthonsmartphone'); + print $form->select_country($search_country_id, 'search_country_id', '', 28, 'minwidth100 maxwidth150 maxwidthonsmartphone'); print '
'; print ''; - print ''; + print ''; print ''; + print ''; print ''; $showemptyline = ''; @@ -2284,13 +2286,13 @@ if ($id > 0) { if ($i) { if ($showemptyline) { - print ''; + print ''; $showemptyline = 0; } $value = $tabname[$i]; - print ''; - print ''; print ''; @@ -2373,7 +2375,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') } // For state page, we do not show the country input (we link to region, not country) print ''; } elseif ($value == 'country_id') { if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate) @@ -2485,7 +2487,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { print ''; $arrayoftypes = array( - 'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), - 'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), - 'recordjoinpiece'=>'AttachJoinedDocumentsToObject', - 'recordevent'=>'RecordEvent'); + 'loadthirdparty' => $langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), + 'loadandcreatethirdparty' => $langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), + 'recordjoinpiece' => 'AttachJoinedDocumentsToObject', + 'recordevent' => 'RecordEvent' + ); $arrayoftypesnocondition = $arrayoftypes; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; } $arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty'; - if (!empty($conf->ticket->enabled)) { + if (isModEnabled('ticket')) { $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; } $arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty'; - if (!empty($conf->recruitment->enabled)) { + if (isModEnabled('recruitment')) { $arrayoftypes['candidature'] = 'CreateCandidature'; } $arrayoftypesnocondition['candidature'] = 'CreateCandidature'; @@ -584,11 +702,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; print ''; print ''; @@ -620,12 +738,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; // Move up/down @@ -679,9 +797,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // Clone - print ''; + print ''; // Collect now + print ''; + if (count($object->actions) > 0) { print ''; } else { diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 6a980642c5f..3be38cca113 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -21,6 +21,7 @@ * \brief List page for emailcollector */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; @@ -30,7 +31,7 @@ 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'; -dol_include_once('/emailcollector/class/emailcollector.class.php'); +require_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollector.class.php'; // Load translation files required by page $langs->loadLangs(array("admin", "other")); @@ -49,7 +50,7 @@ $mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); @@ -142,7 +143,7 @@ $permissiontodelete = $user->admin; if (!$user->admin) { accessforbidden(); } -if (empty($conf->emailcollector->enabled)) { +if (!isModEnabled('emailcollector')) { accessforbidden('Module not enabled'); } diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 8efbfcdb669..cc9b8d7bca8 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -273,23 +273,12 @@ if ($action == 'edit') { if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); } - if (!empty($conf->use_javascript_ajax)) { - print "\n".''; - } + + // Add button to autosuggest a key + include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); } elseif ($val['type'] == 'product') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $form->select_produits($selected, $constname, '', 0); } diff --git a/htdocs/admin/eventorganization_confbooth_extrafields.php b/htdocs/admin/eventorganization_confbooth_extrafields.php index f17a2cf91e1..a4b14206c65 100644 --- a/htdocs/admin/eventorganization_confbooth_extrafields.php +++ b/htdocs/admin/eventorganization_confbooth_extrafields.php @@ -21,6 +21,7 @@ * \brief Page to setup extra fields of EventOrganization */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/eventorganization.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -78,14 +79,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/eventorganization_confboothattendee_extrafields.php b/htdocs/admin/eventorganization_confboothattendee_extrafields.php index 552e814f8de..8830e42dd26 100644 --- a/htdocs/admin/eventorganization_confboothattendee_extrafields.php +++ b/htdocs/admin/eventorganization_confboothattendee_extrafields.php @@ -82,14 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index b98f3775aad..4b4bdf18974 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -22,6 +22,7 @@ * \brief Log event setup page */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; @@ -109,11 +110,11 @@ print dol_get_fiche_head($head, 'audit', '', -1); print '
'; -print '
'.$langs->trans("Dictionary").''.$langs->trans("Dictionary").'
   
'; + print '
'; if (!empty($tabcond[$i])) { $tabnamenoprefix = preg_replace('/'.MAIN_DB_PREFIX.'/', '', $tabname[$i]); print ''; @@ -2308,7 +2310,7 @@ if ($id > 0) { print img_picto('Edit', 'edit', ''); print ''; print ''; + print ''; print $form->textwithpicto('', $langs->trans("Table").': '.MAIN_DB_PREFIX.$tabname[$i]); print '
'; $fieldname = 'country'; - print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth150 maxwidthonsmartphone'); + print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'minwidth100 maxwidth150 maxwidthonsmartphone'); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $fieldname = $value; $accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0); print $formaccounting->select_account($accountancy_account, '.'. $value, 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index e601da43e06..6beb96a9e66 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -27,14 +27,17 @@ if (!defined('NOTOKENRENEWAL')) { * \ingroup admin * \brief Page des informations dolistore */ + require "../../../main.inc.php"; - -// CORE - -global $lang, $user, $conf; - - require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php'; + + +/* + * View + */ + +top_httphead('image'); + $dolistore = new Dolistore(); $id_product = GETPOST('id_product', 'int'); @@ -51,7 +54,7 @@ try { ); //echo $url; $request = $api->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET')); - header('Content-type:image'); + print $request['response']; } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 44df7f74189..3e0c2378742 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -22,6 +22,8 @@ * \brief Page to setup ECM (GED) module */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -37,6 +39,8 @@ if (!$user->admin) { /* * Action */ + +// set 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,6 +51,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { } } +// delete 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/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php index ea75c5ea0fc..f820f376995 100644 --- a/htdocs/admin/ecm_directories_extrafields.php +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -28,6 +28,7 @@ * \brief Page to setup extra fields of ecm */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -88,14 +89,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php index 41a0d714eb9..563f9f58275 100644 --- a/htdocs/admin/ecm_files_extrafields.php +++ b/htdocs/admin/ecm_files_extrafields.php @@ -28,6 +28,7 @@ * \brief Page to setup extra fields of ecm */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -88,14 +89,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 2a32551eaad..8dfafb19b63 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -22,6 +22,7 @@ * \brief Page to create/edit/view emailcollector */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; @@ -34,10 +35,20 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectorfilter.class include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectoraction.class.php'; include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; +// use Webklex\PHPIMAP; +require DOL_DOCUMENT_ROOT.'/includes/webklex/php-imap/vendor/autoload.php'; +use Webklex\PHPIMAP\ClientManager; +use Webklex\PHPIMAP\Exceptions\ConnectionFailedException; +use Webklex\PHPIMAP\Exceptions\InvalidWhereQueryCriteriaException; + + +use OAuth\Common\Storage\DoliStorage; +use OAuth\Common\Consumer\Credentials; + if (!$user->admin) { accessforbidden(); } -if (empty($conf->emailcollector->enabled)) { +if (!isModEnabled('emailcollector')) { accessforbidden(); } @@ -91,9 +102,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0); //$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); -$permissionnote = $user->rights->emailcollector->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->emailcollector->write; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $user->rights->emailcollector->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissionnote = $user->admin; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->admin; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->admin; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $debuginfo = ''; @@ -135,6 +146,7 @@ if (GETPOST('addfilter', 'alpha')) { $emailcollectorfilter->rulevalue = GETPOST('rulevalue', 'alpha'); $emailcollectorfilter->fk_emailcollector = $object->id; $emailcollectorfilter->status = 1; + $result = $emailcollectorfilter->create($user); if ($result > 0) { @@ -192,7 +204,7 @@ if ($action == 'updateoperation') { $emailcollectoroperation = new EmailCollectorAction($db); $emailcollectoroperation->fetch(GETPOST('rowidoperation2', 'int')); - $emailcollectoroperation->actionparam = GETPOST('operationparam2', 'restricthtml'); + $emailcollectoroperation->actionparam = GETPOST('operationparam2', 'alphawithlgt'); if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty')) && empty($emailcollectoroperation->actionparam)) { @@ -224,10 +236,25 @@ if ($action == 'deleteoperation') { } } +if ($action == 'collecttest') { + dol_include_once('/emailcollector/class/emailcollector.class.php'); + + $res = $object->doCollectOneCollector(1); + if ($res > 0) { + $debuginfo = $object->debuginfo; + setEventMessages($object->lastresult, null, 'mesgs'); + } else { + $debuginfo = $object->debuginfo; + setEventMessages($object->error, null, 'errors'); + } + + $action = ''; +} + if ($action == 'confirm_collect') { dol_include_once('/emailcollector/class/emailcollector.class.php'); - $res = $object->doCollectOneCollector(); + $res = $object->doCollectOneCollector(0); if ($res > 0) { $debuginfo = $object->debuginfo; setEventMessages($object->lastresult, null, 'mesgs'); @@ -337,14 +364,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation of action process if ($action == 'collect') { - $formquestion = array( - 'text' => $langs->trans("EmailCollectorConfirmCollect"), - ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('EmailCollectorConfirmCollectTitle'), $text, 'confirm_collect', $formquestion, 0, 1, 220); + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('EmailCollectorConfirmCollectTitle'), $langs->trans('EmailCollectorConfirmCollect'), 'confirm_collect', $formquestion, 0, 1, 220); } // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $formconfirm .= $hookmanager->resPrint; @@ -379,50 +404,142 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $connectstringserver = $object->getConnectStringIMAP($usessl); if ($action == 'scan') { - try { - if ($sourcedir) { - //$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); - $connectstringsource = $connectstringserver.$object->getEncodedUtf7($sourcedir); + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + if ($object->acces_type == 1) { + // Mode OAUth2 with PHP-IMAP + require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; // define $supportedoauth2array + $keyforsupportedoauth2array = $object->oauth_service; + if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { + $keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array); + } else { + $keyforprovider = ''; + } + $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; + + $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); + + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; + //$debugtext = "Host: ".$this->host."
Port: ".$this->port."
Login: ".$this->login."
Password: ".$this->password."
access type: ".$this->acces_type."
oauth service: ".$this->oauth_service."
Max email per collect: ".$this->maxemailpercollect; + //dol_syslog($debugtext); + + $storage = new DoliStorage($db, $conf); + + try { + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + $expire = true; + // Is token expired or will token expire in the next 30 seconds + // if (is_object($tokenobj)) { + // $expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30)); + // } + // Token expired so we refresh it + if (is_object($tokenobj) && $expire) { + $credentials = new Credentials( + getDolGlobalString('OAUTH_'.$object->oauth_service.'_ID'), + getDolGlobalString('OAUTH_'.$object->oauth_service.'_SECRET'), + getDolGlobalString('OAUTH_'.$object->oauth_service.'_URLAUTHORIZE') + ); + $serviceFactory = new \OAuth\ServiceFactory(); + $oauthname = explode('-', $OAUTH_SERVICENAME); + // ex service is Google-Emails we need only the first part Google + $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); + // We have to save the token because Google give it only once + $refreshtoken = $tokenobj->getRefreshToken(); + $tokenobj = $apiService->refreshAccessToken($tokenobj); + $tokenobj->setRefreshToken($refreshtoken); + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + } + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + if (is_object($tokenobj)) { + $token = $tokenobj->getAccessToken(); + } else { + $object->error = "Token not found"; + return -1; + } + } catch (Exception $e) { + print $e->getMessage(); + } + + $cm = new ClientManager(); + $client = $cm->make([ + 'host' => $object->host, + 'port' => $object->port, + 'encryption' => 'ssl', + 'validate_cert' => true, + 'protocol' => 'imap', + 'username' => $object->login, + 'password' => $token, + 'authentication' => "oauth", + ]); + } else { + // Mode login/pass with PHP-IMAP + $cm = new ClientManager(); + $client = $cm->make([ + 'host' => $object->host, + 'port' => $object->port, + 'encryption' => 'ssl', + 'validate_cert' => true, + 'protocol' => 'imap', + 'username' => $object->login, + 'password' => $object->password, + 'authentication' => "login", + ]); } - if ($targetdir) { - //$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); - $connectstringtarget = $connectstringserver.$object->getEncodedUtf7($targetdir); + try { + $client->connect(); + } catch (ConnectionFailedException $e) { + print $e->getMessage(); } - $timeoutconnect = empty($conf->global->MAIN_USE_CONNECT_TIMEOUT) ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT; - $timeoutread = empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT) ? 20 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT; - - dol_syslog("imap_open connectstring=".$connectstringsource." login=".$object->login." password=".$object->password." timeoutconnect=".$timeoutconnect." timeoutread=".$timeoutread); - - $result1 = imap_timeout(IMAP_OPENTIMEOUT, $timeoutconnect); // timeout seems ignored with ssl connect - $result2 = imap_timeout(IMAP_READTIMEOUT, $timeoutread); - $result3 = imap_timeout(IMAP_WRITETIMEOUT, 5); - $result4 = imap_timeout(IMAP_CLOSETIMEOUT, 5); - - dol_syslog("result1=".$result1." result2=".$result2." result3=".$result3." result4=".$result4); - - $connection = imap_open($connectstringsource, $object->login, $object->password); - - //dol_syslog("end imap_open connection=".var_export($connection, true)); - } catch (Exception $e) { - print $e->getMessage(); - } - - if (!$connection) { - $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; - if (function_exists('imap_last_error')) { - $morehtml .= '
'.imap_last_error(); - } - dol_syslog("Error ".$morehtml, LOG_WARNING); - //var_dump(imap_errors()) + $f = $client->getFolders(false, $object->source_directory); + $nbemail = $f[0]->examine()["exists"]; + $morehtml .= $nbemail; } else { - dol_syslog("Imap connected. Now we call imap_num_msg()"); - $morehtml .= imap_num_msg($connection); - } + try { + if ($sourcedir) { + //$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); + $connectstringsource = $connectstringserver.$object->getEncodedUtf7($sourcedir); + } + if ($targetdir) { + //$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); + $connectstringtarget = $connectstringserver.$object->getEncodedUtf7($targetdir); + } - if ($connection) { - dol_syslog("Imap close"); - imap_close($connection); + $timeoutconnect = empty($conf->global->MAIN_USE_CONNECT_TIMEOUT) ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT; + $timeoutread = empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT) ? 20 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT; + + dol_syslog("imap_open connectstring=".$connectstringsource." login=".$object->login." password=".$object->password." timeoutconnect=".$timeoutconnect." timeoutread=".$timeoutread); + + $result1 = imap_timeout(IMAP_OPENTIMEOUT, $timeoutconnect); // timeout seems ignored with ssl connect + $result2 = imap_timeout(IMAP_READTIMEOUT, $timeoutread); + $result3 = imap_timeout(IMAP_WRITETIMEOUT, 5); + $result4 = imap_timeout(IMAP_CLOSETIMEOUT, 5); + + dol_syslog("result1=".$result1." result2=".$result2." result3=".$result3." result4=".$result4); + + $connection = imap_open($connectstringsource, $object->login, $object->password); + + //dol_syslog("end imap_open connection=".var_export($connection, true)); + } catch (Exception $e) { + print $e->getMessage(); + } + + if (!$connection) { + $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; + if (function_exists('imap_last_error')) { + $morehtml .= '
'.imap_last_error(); + } + dol_syslog("Error ".$morehtml, LOG_WARNING); + //var_dump(imap_errors()) + } else { + dol_syslog("Imap connected. Now we call imap_num_msg()"); + $morehtml .= imap_num_msg($connection); + } + + if ($connection) { + dol_syslog("Imap close"); + imap_close($connection); + } } } else { $morehtml .= ''.img_picto('', 'refresh', 'class="paddingrightonly"').$langs->trans("Refresh").''; @@ -549,20 +666,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300', 1); print ''; - print ''; + //print ''; + $htmltext = $langs->transnoentitiesnoconv("OperationParamDesc"); + print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt'); print ''; - $htmltext = $langs->transnoentitiesnoconv("OperationParamDesc"); - print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt'); print '
'; if ($action == 'editoperation' && $ruleaction['id'] == $operationid) { - print '
'; + print '
'; print ''; print ''; print ''; } else { - print $ruleaction['actionparam']; + print dol_escape_htmltag($ruleaction['actionparam']); } print '
'; -print ""; -print getTitleFieldOfList("LogEvents", 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, '')."\n"; +print '
'; +print ''; +print getTitleFieldOfList("TrackableSecurityEvents", 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, '')."\n"; print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; -print "\n"; +print ''."\n"; // Loop on each event type foreach ($eventstolog as $key => $arr) { if ($arr['id']) { @@ -128,12 +129,12 @@ foreach ($eventstolog as $key => $arr) { } print '
'; -print dol_get_fiche_end(); - print '
'; print ''; print '
'; +print dol_get_fiche_end(); + print "\n"; // End of page diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 0a9009889f8..485ce901e5c 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -28,6 +28,7 @@ * \brief Page d'administration/configuration du module Expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 948efb6188a..303b0f88167 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -27,6 +27,7 @@ * \brief Page to setup extra fields of expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -88,13 +89,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 41fba691b7f..56a023e1c83 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -29,6 +29,7 @@ * \brief Page to setup extra fields of expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -89,14 +90,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 64cf24ca6fa..8c20b493105 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-2018 Philippe Grand + * Copyright (C) 2011-2022 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,6 +28,7 @@ * \brief Setup page of module ExpenseReport */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -148,7 +149,7 @@ if ($action == 'updateMask') { $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); $res3 = 0; - if (!empty($conf->project->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided + if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity); } @@ -471,7 +472,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm print ''; print ''."\n"; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { print ''; print $langs->trans('ProjectIsRequiredOnExpenseReports'); print ''; diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 54ce5a9ffea..69f6bf14d61 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of expensereport */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -82,15 +83,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index 10b14f8ee99..b26cefba580 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -24,6 +24,7 @@ * \brief Page to display expense tax ik */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 7c27ee6e408..1ad9cc67e7d 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -25,6 +25,7 @@ * \brief Page to display expense tax ik */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index 0addfcf38f7..3aba8fa8192 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -28,6 +28,7 @@ * \brief config Page module Export */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index d0f08783e22..d46f1897b71 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -28,6 +28,7 @@ * \brief Page to setupe module ExternalRss */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php'; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index f866eef7802..10746c794be 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -6,6 +6,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2012-2013 Juanjo Menent * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> + * Copyright (C) 2022 Anthony Berton * * 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 @@ -27,6 +28,7 @@ * \brief Page to setup invoice module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -231,6 +233,37 @@ if ($action == 'updateMask') { if (!($res > 0)) { $error++; } +} elseif (preg_match('/set_(.*)/', $action, $reg)) { + $code = $reg[1]; + $value = (GETPOST($code) ? GETPOST($code) : 1); + + $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } +} elseif (preg_match('/del_(.*)/', $action, $reg)) { + $code = $reg[1]; + $res = dolibarr_del_const($db, $code, $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if ($error) { + setEventMessages($langs->trans('Error'), null, 'errors'); + } else { + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); + header("Location: " . $_SERVER["PHP_SELF"]); + exit(); + } } @@ -637,7 +670,7 @@ print "\n"; print ''; print "".$langs->trans("SuggestPaymentByRIBOnAccount").""; print ""; -if (!empty($conf->banque->enabled)) { +if (isModEnabled('banque')) { $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE clos = 0"; @@ -722,7 +755,7 @@ print ''; print ''; print $langs->trans("ForceInvoiceDate"); print ''; -print $form->selectyesno("forcedate", $conf->global->FAC_FORCE_DATE_VALIDATION, 1); +print $form->selectyesno("forcedate", getDolGlobalInt('FAC_FORCE_DATE_VALIDATION', 0), 1); print ''; print ''; print "\n"; @@ -770,20 +803,15 @@ print ''; print ''.$langs->trans("InvoiceCheckPosteriorDate"). ' ' ; print $form->textwithpicto('', $langs->trans("InvoiceCheckPosteriorDateHelp"), 1, 'help') . ''; -print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('INVOICE_CHECK_POSTERIOR_DATE'); -} else { - print '
'; - print ''; - print ''; - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("INVOICE_CHECK_POSTERIOR_DATE", $arrval, $conf->global->INVOICE_CHECK_POSTERIOR_DATE); - print ''; - print ''; - print ''; - print '
'; -} +print ''; +print ajax_constantonoff('INVOICE_CHECK_POSTERIOR_DATE'); +print ''; + +// Allow external download +print ''; +print ''.$langs->trans("AllowExternalDownload").''; +print ''; +print ajax_constantonoff('INVOICE_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1); print ''; print ''; diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 609a6605d1a..dfc145e72b0 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -27,6 +27,7 @@ * \brief Page to setup invoice module */ +// Load Dolibarr environment require '../main.inc.php'; // Libraries @@ -130,12 +131,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); -llxHeader( - "", - $langs->trans("BillsSetup"), - 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura' -); +$help_yrl = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura'; +llxHeader("", $langs->trans("BillsSetup"), $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 3ea92bb48ad..b6ce3d8b9a5 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -24,6 +24,7 @@ * \brief Activation page for the FCKeditor module in the other modules */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php'; @@ -50,7 +51,7 @@ $modules = array( 'NOTE_PUBLIC' => 'FCKeditorForNotePublic', 'NOTE_PRIVATE' => 'FCKeditorForNotePrivate', 'SOCIETE' => 'FCKeditorForCompany', - 'PRODUCTDESC' => 'FCKeditorForProduct', + //'PRODUCTDESC' => 'FCKeditorForProduct', 'DETAILS' => 'FCKeditorForProductDetails', 'USERSIGN' => 'FCKeditorForUserSignature', 'MAILING' => 'FCKeditorForMailing', @@ -62,12 +63,12 @@ $conditions = array( 'NOTE_PUBLIC' => 1, 'NOTE_PRIVATE' => 1, 'SOCIETE' => 1, - 'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)), - 'DETAILS' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)), + 'PRODUCTDESC' => (isModEnabled("product") || isModEnabled("service")), + 'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande') || isModEnabled('supplier_proposal') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")), 'USERSIGN' => 1, - 'MAILING' => !empty($conf->mailing->enabled), - 'MAIL' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)), - 'TICKET' => !empty($conf->ticket->enabled), + 'MAILING' => isModEnabled('mailing'), + 'MAIL' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande')), + 'TICKET' => isModEnabled('ticket'), ); // Picto $picto = array( @@ -92,14 +93,14 @@ foreach ($modules as $const => $desc) { if ($action == 'enable_'.strtolower($const)) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1", 'chaine', 0, '', $conf->entity); // If fckeditor is active in the product/service description, it is activated in the forms - if ($const == 'PRODUCTDESC' && !empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if ($const == 'PRODUCTDESC' && getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1", 'chaine', 0, '', $conf->entity); } header("Location: ".$_SERVER["PHP_SELF"]); exit; } if ($action == 'disable_'.strtolower($const)) { - dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const, $conf->entity); + dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "0", 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); exit; } @@ -165,8 +166,13 @@ if (empty($conf->use_javascript_ajax)) { print ''."\n"; print ''; print ''.img_object("", $picto[$const]).''; - print ''.$langs->trans($desc).''; - print ''; + print ''; + print $langs->trans($desc); + if ($const == 'DETAILS') { + print '
'.$langs->trans("FCKeditorForProductDetails2").''; + } + print ''; + print ''; $value = (isset($conf->global->$constante) ? $conf->global->$constante : 0); if ($value == 0) { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; @@ -184,6 +190,7 @@ if (empty($conf->use_javascript_ajax)) { print '
'."\n"; print ''; + print ''; // Skins show_skin(null, 1); @@ -218,7 +225,7 @@ if (empty($conf->use_javascript_ajax)) { print $conf->global->FCKEDITOR_TEST; print '
'; } - print $form->buttonsSaveCancel("Save", ''); + print $form->buttonsSaveCancel("Save", '', null, 0, 'reposition'); print '
'; print ''."\n"; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 79896d0ed74..cf637d37329 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -28,6 +28,7 @@ * \brief Setup page of module Interventions */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -207,6 +208,32 @@ if ($action == 'updateMask') { $error++; } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == "set_FICHINTER_ALLOW_ONLINE_SIGN") { + $val = GETPOST('FICHINTER_ALLOW_ONLINE_SIGN', 'alpha'); + $res = dolibarr_set_const($db, "FICHINTER_ALLOW_ONLINE_SIGN", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == "set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD") { + $val = GETPOST('FICHINTER_ALLOW_EXTERNAL_DOWNLOAD', 'alpha'); + $res = dolibarr_set_const($db, "FICHINTER_ALLOW_EXTERNAL_DOWNLOAD", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); + + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -537,7 +564,7 @@ print '' print ''; print $langs->trans("PrintProductsOnFichinter").' ('.$langs->trans("PrintProductsOnFichinterDetails").')'; print 'global->FICHINTER_PRINT_PRODUCTS) { +if (getDolGlobalString("FICHINTER_PRINT_PRODUCTS")) { print 'checked '; } print '/>'; @@ -554,7 +581,7 @@ print ''; print $langs->trans("UseServicesDurationOnFichinter"); print ''; print ''; -print 'global->FICHINTER_USE_SERVICE_DURATION ? ' checked' : '').'>'; +print ''; print ''; print ''; print ''; @@ -570,7 +597,7 @@ print ''; print $langs->trans("UseDurationOnFichinter"); print ''; print ''; -print 'global->FICHINTER_WITHOUT_DURATION ? ' checked' : '').'>'; +print ''; print ''; print ''; print ''; @@ -586,13 +613,46 @@ print ''; print $langs->trans("UseDateWithoutHourOnFichinter"); print ''; print ''; -print 'global->FICHINTER_DATE_WITHOUT_HOUR ? ' checked' : '').'>'; +print ''; print ''; print ''; print ''; print ''; print ''; print ''; +// Allow online signing +print '
'; +print ''; +print ''; +print ''; +print ''; +print $langs->trans("AllowOnlineSign"); +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print '
'; +// Allow external download +print '
'; +print ''; +print ''; +print ''; +print ''; +print $langs->trans("AllowExternalDownload"); +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print '
'; + print ''; print '
'; diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index c002c9059d7..8f76f9a7b2b 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -22,6 +22,7 @@ * \brief Setup page for geoipmaxmind module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -52,27 +53,20 @@ if ($action == 'set') { $error++; } - if (!$error && $gimcdf && !file_exists($gimcdf)) { - setEventMessages($langs->trans("ErrorFileNotFound", $gimcdf), null, 'errors'); + $res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity); + if (!($res1 > 0)) { + $error++; + } + + $res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity); + if (!($res2 > 0)) { $error++; } if (!$error) { - $res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity); - if (!($res1 > 0)) { - $error++; - } - - $res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity); - if (!($res2 > 0)) { - $error++; - } - - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'errors'); - } + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + //setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -111,8 +105,8 @@ print '\n"; // Lib version -print ''.$langs->trans("GeoIPLibVersion").''; -print ''; +print ''.$langs->trans("GeoIPLibVersion").''; +print ''; $arrayofvalues = array('php' => 'Native PHP functions', '1' => 'Embedded GeoIP v1', '2' => 'Embedded GeoIP v2'); print $form->selectarray('geoipversion', $arrayofvalues, (isset($conf->global->GEOIP_VERSION) ? $conf->global->GEOIP_VERSION : '2')); if ($conf->global->GEOIP_VERSION == 'php') { @@ -123,16 +117,29 @@ if ($conf->global->GEOIP_VERSION == 'php') { print '
'.$langs->trans("Version").': '.$version; } } +print ''; +print ''; print ''; +$gimcdf = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE'); + // Path to database file print ''.$langs->trans("PathToGeoIPMaxmindCountryDataFile").''; -print ''; - +print ''; if ($conf->global->GEOIP_VERSION == 'php') { print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb
'; } -print ''; +print ''; +if (!file_exists($gimcdf)) { + print '
'.$langs->trans("ErrorFileNotFound", $gimcdf).'
'; +} +print ''; +print ''; +print $langs->trans("Example").'
'; +print '/usr/local/share/GeoIP/GeoIP.dat
+/usr/share/GeoIP/GeoIP.dat
+/usr/share/GeoIP/GeoLite2-Country.mmdb'; +print '
'; print ''; print ''; @@ -144,12 +151,16 @@ print '
'; print $langs->trans("NoteOnPathLocation").'
'; $url1 = 'http://www.maxmind.com/en/city?rId=awstats'; -print $langs->trans("YouCanDownloadFreeDatFileTo", ''.$url1.''); +$textoshow = $langs->trans("YouCanDownloadFreeDatFileTo", '{s1}'); +$textoshow = str_replace('{s1}', ''.$url1.'', $textoshow); +print $textoshow; print '
'; $url2 = 'http://www.maxmind.com/en/city?rId=awstats'; -print $langs->trans("YouCanDownloadAdvancedDatFileTo", ''.$url2.''); +$textoshow = $langs->trans("YouCanDownloadAdvancedDatFileTo", '{s1}'); +$textoshow = str_replace('{s1}', ''.$url2.'', $textoshow); +print $textoshow; if ($geoip) { print '

'; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 5902402674d..9a60c6b9b84 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -24,6 +24,7 @@ * \brief Setup page of module Contracts */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; diff --git a/htdocs/admin/holiday_extrafields.php b/htdocs/admin/holiday_extrafields.php index 0ef1998d9e7..21fce3d62d6 100644 --- a/htdocs/admin/holiday_extrafields.php +++ b/htdocs/admin/holiday_extrafields.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of holiday */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -82,14 +83,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index b1b74189d35..838e9bf9a0b 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -492,14 +492,14 @@ if ($action == 'edit') { print ''; if ($val['type'] == 'textarea') { - print '\n"; - } elseif ($val['type']== 'integer') { - print '' . "\n"; - } elseif ($val['type']== 'html') { + } elseif ($val['type'] == 'integer') { + print '' . "\n"; + } elseif ($val['type'] == 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, $conf->global->{$constname}, 1); @@ -532,36 +532,25 @@ if ($action == 'edit') { print img_picto('', 'category', 'class="pictofixedwidth"'); print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); } elseif (preg_match('/thirdparty_type/', $val['type'])) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; $formcompany = new FormCompany($db); print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname); } elseif ($val['type'] == 'securekey') { - print ''; + print ''; if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); - } - if (!empty($conf->use_javascript_ajax)) { - print "\n".''; + print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"'); } + + // Add button to autosuggest a key + include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; + print dolJSToSetRandomPassword($constname, 'generate_token' . $constname); } elseif ($val['type'] == 'product') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled('product') || isModEnabled('service')) { $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $form->select_produits($selected, $constname, '', 0); } } else { - print ''; + print ''; } print ''; } @@ -635,7 +624,7 @@ if ($action == 'edit') { setEventMessages(null, $object->errors, "errors"); } } else { - print $conf->global->{$constname}; + print getDolGlobalString($constname); } print ''; } diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 48541310372..1026ea12442 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -26,6 +26,7 @@ * \brief Page to setup GUI display options */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -104,6 +105,16 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('THEME_DARKMODEENABLED')) { + $val = GETPOST('THEME_DARKMODEENABLED'); + if (!$val) { + dolibarr_del_const($db, "THEME_DARKMODEENABLED", $conf->entity); + } + if ($val) { + dolibarr_set_const($db, "THEME_DARKMODEENABLED", $val, 'chaine', 0, '', $conf->entity); + } + } + if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) { $val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE'); if (!$val) { diff --git a/htdocs/admin/import.php b/htdocs/admin/import.php index 37168baa3d4..432b912e76c 100644 --- a/htdocs/admin/import.php +++ b/htdocs/admin/import.php @@ -29,6 +29,7 @@ * \brief config page module import */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 787a9d6d820..87b49c95468 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -22,11 +22,14 @@ * \brief Home page of setup area */ +// Load Dolibarr environment require '../main.inc.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'companies')); +$action = ''; + if (!$user->admin) { accessforbidden(); } @@ -119,11 +122,12 @@ print '
'; // Add hook to add information $parameters = array(); +$object = new stdClass(); $reshook = $hookmanager->executeHooks('addHomeSetup', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; if (empty($reshook)) { // Show into other - print ''.$langs->trans("SetupDescription5")."
"; + //print ''.$langs->trans("SetupDescription5")."
"; print '
'; // Show logo diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index 041216014b0..b1710a53839 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -208,12 +208,12 @@ if ($action == 'edit') { print ''; if ($val['type'] == 'textarea') { - print '\n"; - } elseif ($val['type']== 'html') { + } elseif ($val['type'] == 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, $conf->global->{$constname}, 1); diff --git a/htdocs/admin/knowledgerecord_extrafields.php b/htdocs/admin/knowledgerecord_extrafields.php index 62580d585c3..13c628be99b 100644 --- a/htdocs/admin/knowledgerecord_extrafields.php +++ b/htdocs/admin/knowledgerecord_extrafields.php @@ -85,14 +85,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 421399a81bc..f5096960b8b 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -26,6 +26,7 @@ * \brief Page to setup module LDAP */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; @@ -138,7 +139,7 @@ $formldap = new FormLdap($db); print '
'; print ''; -print dol_get_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'ldap', '', -1); print ''; @@ -158,24 +159,24 @@ if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && empty($conf->global->LDAP_USER print ''; // Synchro contact active -if (!empty($conf->societe->enabled)) { +if (isModEnabled('societe')) { print ''; + print ''; } // Synchro member active -if (!empty($conf->adherent->enabled)) { - print ''; + print ''; } // Synchro member type active -if (!empty($conf->adherent->enabled)) { - print ''; + print ''; } // Fields from hook @@ -244,7 +245,8 @@ print ''; print '
'.$langs->trans("LDAPDnContactActive").''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR)); - print ''.$langs->trans("LDAPDnContactActiveExample").'
' . $langs->trans("LDAPDnContactActiveExample") . '
'.$langs->trans("LDAPDnMemberActive").''; +if (isModEnabled('adherent')) { + print '
' . $langs->trans("LDAPDnMemberActive") . ''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2); - print ''.$langs->trans("LDAPDnMemberActiveExample").'
' . $langs->trans("LDAPDnMemberActiveExample") . '
'.$langs->trans("LDAPDnMemberTypeActive").''; +if (isModEnabled('adherent')) { + print '
' . $langs->trans("LDAPDnMemberTypeActive") . ''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2); - print ''.$langs->trans("LDAPDnMemberTypeActiveExample").'
' . $langs->trans("LDAPDnMemberTypeActiveExample") . '
'.$langs->trans // Pass print ''; print '
'.$langs->trans("LDAPPassword").''; -print ''; +print ''; +print showValueWithClipboardCPButton(getDolGlobalString('LDAP_ADMIN_PASS'), 0, ' '); print ''.$langs->trans('Password').' (ex: secret)
'; diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 4e7f148672b..6ee7b38e0b8 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -26,6 +26,7 @@ * \brief Page d'administration/configuration du module Ldap */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; @@ -139,7 +140,7 @@ if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } -print dol_get_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'contacts', '', -1); print ''.$langs->trans("LDAPDescContact").'
'; diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 595afe29042..5079d6d2d29 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -26,6 +26,7 @@ * \brief Page to setup LDAP synchronization for groups */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -113,7 +114,7 @@ if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } -print dol_get_fiche_head($head, 'groups', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'groups', '', -1); print ''.$langs->trans("LDAPDescGroups").'
'; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 4bdec17867e..b9461430bf9 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -26,6 +26,7 @@ * \brief Page d'administration/configuration du module Ldap adherent */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -187,7 +188,7 @@ if (!function_exists("ldap_connect")) { print ''; print ''; -print dol_get_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'members', '', -1); print ''.$langs->trans("LDAPDescMembers").'
'; diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 3c6ef9f5aa9..7b3ac57192f 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -26,6 +26,7 @@ * \brief Page to setup LDAP synchronization for members types */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -105,7 +106,7 @@ if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } -print dol_get_fiche_head($head, 'memberstypes', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'memberstypes', '', -1); print ''.$langs->trans("LDAPDescMembersTypes").'
'; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 53e142cf900..ad84a5889ed 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -27,6 +27,7 @@ * \brief Page d'administration/configuration du module Ldap */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -177,7 +178,7 @@ print ''; -print dol_get_fiche_head($head, 'users', $langs->trans("LDAPSetup"), -1); +print dol_get_fiche_head($head, 'users', '', -1); print ''.$langs->trans("LDAPDescUsers").'
'; print '
'; @@ -500,9 +501,9 @@ if (function_exists("ldap_connect")) { // Remove from required_fields all entries not configured in LDAP (empty) and duplicated $required_fields = array_unique(array_values(array_filter($required_fields, "dol_validElement"))); - // Get from LDAP database an array of results + // Get from LDAP database an array of results by making a search on + // $filter = '('.ldap_escape(getDolGlobalString('LDAP_KEY_USERS'), '', LDAP_ESCAPE_FILTER).'=*)'; $ldapusers = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 1); - //$ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, '', 1); if (is_array($ldapusers)) { $liste = array(); @@ -525,7 +526,7 @@ if (function_exists("ldap_connect")) { print "search: *
\n"; print "userDN: ".getDolGlobalString('LDAP_USER_DN')."
\n"; print "useridentifier: ".getDolGlobalString('LDAP_KEY_USERS')."
\n"; - print "required_fields: ".implode(',', $required_fields)."
\n"; + print "requested fields: ".implode(',', $required_fields)."
\n"; print "=> ".count($liste)." records
\n"; print "\n
"; } else { diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index db963562deb..c1f31282dcd 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -22,6 +22,7 @@ * \brief Page to setup limits */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -33,7 +34,7 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $currencycode = GETPOST('currencycode', 'alpha'); -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { // When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default. $currencycode = (!empty($currencycode) ? $currencycode : $conf->currency); } @@ -127,12 +128,12 @@ print load_fiche_titre($title, '', 'title_setup'); $aCurrencies = array($conf->currency); // Default currency always first position -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { - require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php'; - $sql = "SELECT rowid, code FROM ".MAIN_DB_PREFIX."multicurrency"; - $sql .= " WHERE entity = ".((int) $conf->entity); - $sql .= " AND code <> '".$db->escape($conf->currency)."'"; // Default currency always first position + $sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency"; + $sql .= " WHERE entity = " . ((int) $conf->entity); + $sql .= " AND code <> '" . $db->escape($conf->currency) . "'"; // Default currency always first position $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { @@ -151,11 +152,11 @@ print ''.$langs->trans("LimitsDesc")."
\n" print "
\n"; if ($action == 'edit') { - print ''; - print ''; + print ''; + print ''; print ''; - if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { - print ''; + if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + print ''; } clearstatcache(); @@ -217,7 +218,7 @@ if ($action == 'edit') { print '
'; } -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { if (!empty($aCurrencies) && count($aCurrencies) > 1) { print dol_get_fiche_end(); } diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 72b2a15d678..ca95c835ecd 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -22,11 +22,12 @@ * \brief Setup page to configure loan module */ +// Load Dolibarr environment require '../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } @@ -76,7 +77,7 @@ if ($action == 'update') { llxHeader(); $form = new Form($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } @@ -100,14 +101,14 @@ foreach ($list as $key) { // Param $label = $langs->trans($key); - print ''; + print ''; // Value print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); } else { - print ''; + print ''; } print ''; } diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 4d12a87f7bd..19effcdfd2e 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -23,6 +23,7 @@ * \brief Page to setup emailing module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -50,8 +51,19 @@ if ($action == 'setvalue') { $mailerror = GETPOST('MAILING_EMAIL_ERRORSTO', 'alpha'); $checkread = GETPOST('value', 'alpha'); $checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY', 'alpha'); - $mailingdelay = GETPOST('MAILING_DELAY', 'int'); $contactbulkdefault = GETPOST('MAILING_CONTACT_DEFAULT_BULK_STATUS', 'int'); + if (GETPOST('MAILING_DELAY', 'alpha') != '') { + $mailingdelay = price2num(GETPOST('MAILING_DELAY', 'alpha'), 3); // Not less than 1 millisecond. + } else { + $mailingdelay = ''; + } + // Clean data + if ((float) $mailingdelay > 10) { + $mailingdelay = 10; + } + if (GETPOST('MAILING_DELAY', 'alpha') != '' && GETPOST('MAILING_DELAY', 'alpha') != '0' && (float) $mailingdelay < 0.001) { + $mailingdelay = 0.001; + } $res = dolibarr_set_const($db, "MAILING_EMAIL_FROM", $mailfrom, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -107,21 +119,11 @@ llxHeader('', $langs->trans("MailingSetup")); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MailingSetup"), $linkback, 'title_setup'); -if (!empty($conf->use_javascript_ajax)) { - print "\n".''; -} +$constname = 'MAILING_EMAIL_UNSUBSCRIBE_KEY'; + +// Add button to autosuggest a key +include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; +print dolJSToSetRandomPassword($constname); print '
'; print ''; @@ -132,32 +134,35 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; print ''; +print ''; +print ''; print ''; print ''; +print ''; +print ''; print ''; print ''; +print ''; +print ''; print ''; @@ -166,11 +171,12 @@ print ''; print ''; +print ''; +print ''; print ''; // default blacklist from mailing @@ -180,7 +186,7 @@ print ''; -print ''; +print ''; print ''; @@ -188,7 +194,8 @@ if (!empty($conf->use_javascript_ajax) && $conf->global->MAIN_FEATURES_LEVEL >= print ''; + print ''; + print ''; print ''; } diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index 8b003ce2d4e..88389f0a4c4 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -27,6 +27,7 @@ * \brief Page to setup the module MailmanSpip (Mailman) */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php'; @@ -158,7 +159,7 @@ if (!empty($conf->global->ADHERENT_USE_MAILMAN)) { $link .= ''; // Edition des varibales globales $constantes = array( - 'ADHERENT_MAILMAN_ADMINPW', + 'ADHERENT_MAILMAN_ADMIN_PASSWORD', 'ADHERENT_MAILMAN_URL', 'ADHERENT_MAILMAN_UNSUB_URL', 'ADHERENT_MAILMAN_LISTS' diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 5b470eafdc0..e9a8132188c 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -23,6 +23,7 @@ * \brief Page to setup emails sending */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -33,14 +34,15 @@ $langs->loadLangs(array("companies", "products", "admin", "mails", "other", "err $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); +$trackid = GETPOST('trackid'); + if (!$user->admin) { accessforbidden(); } $usersignature = $user->signature; -// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. - -if ($action == 'test' || $action == 'send') { +// For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html. +if ($action == 'test' || ($action == 'send' && $trackid = 'test')) { $usersignature = dol_string_nohtmltag($usersignature, 2); } @@ -50,6 +52,7 @@ $substitutionarrayfortest = array( '__USER_LOGIN__' => $user->login, '__USER_EMAIL__' => $user->email, '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails + '__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails '__ID__' => 'RecipientIdRecord', //'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails '__LASTNAME__' => 'RecipientLastname', @@ -88,7 +91,15 @@ if ($action == 'update' && !$cancel) { dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW", 'none'), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW", 'none'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE", 'chaine'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_OAUTH_SERVICE")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_OAUTH_SERVICE", GETPOST("MAIN_MAIL_SMTPS_OAUTH_SERVICE", 'chaine'), 'chaine', 0, '', $conf->entity); + } dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED", 'int'), 'chaine', 0, '', $conf->entity); @@ -108,6 +119,11 @@ if ($action == 'update' && !$cancel) { } } +if ($action == 'disablephpmailwarning' && !$cancel) { + dolibarr_set_const($db, 'MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP', 1, 'chaine', 1, 0, $conf->entity); + + setEventMessages($langs->trans("WarningDisabled"), null, 'mesgs'); +} // Actions to send emails $id = 0; @@ -115,7 +131,7 @@ $actiontypecode = ''; // Not an event for agenda $triggersendname = ''; // Disable triggers $paramname = 'id'; $mode = 'emailfortest'; -$trackid = (($action == 'testhtml') ? "testhtml" : "test"); +$trackid = ($action == 'send' ? GETPOST('trackid', 'aZ09') : $action); $sendcontext = ''; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; @@ -128,7 +144,6 @@ if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') { - /* * View */ @@ -171,6 +186,24 @@ if (version_compare(phpversion(), '7.0', '>=')) { $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; } +// List of oauth services +$oauthservices = array(); + +foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $key = preg_replace('/^OAUTH_/', '', $key); + $key = preg_replace('/_ID$/', '', $key); + if (preg_match('/^.*-/', $key)) { + $name = preg_replace('/^.*-/', '', $key); + } else { + $name = $langs->trans("NoName"); + } + $provider = preg_replace('/-.*$/', '', $key); + $provider = ucfirst(strtolower($provider)); + + $oauthservices[$key] = $name." (".$provider.")"; + } +} if ($action == 'edit') { if ($conf->use_javascript_ajax) { @@ -195,6 +228,7 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").prop("disabled", true); jQuery(".smtp_method").hide(); jQuery(".dkim").hide(); + jQuery(".smtp_auth_method").hide(); '; if ($linuxlike) { print ' @@ -234,9 +268,10 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_SERVER").show(); jQuery("#MAIN_MAIL_SMTP_PORT").show(); jQuery("#smtp_server_mess").hide(); - jQuery("#smtp_port_mess").hide(); + jQuery("#smtp_port_mess").hide(); jQuery(".smtp_method").show(); - jQuery(".dkim").hide(); + jQuery(".dkim").hide(); + jQuery(".smtp_auth_method").show(); } if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'swiftmailer\') { @@ -262,14 +297,36 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_PORT").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); - jQuery(".smtp_method").show(); + jQuery(".smtp_method").show(); jQuery(".dkim").show(); + jQuery(".smtp_auth_method").show(); } } + function change_smtp_auth_method() { + console.log(jQuery("#radio_pw").prop("checked")); + if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if(jQuery("#MAIN_MAIL_SENDMODE").val()==\'mail\'){ + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").hide(); + } else { + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").show(); + } + } initfields(); + change_smtp_auth_method(); jQuery("#MAIN_MAIL_SENDMODE").change(function() { initfields(); + change_smtp_auth_method(); }); + jQuery("#radio_pw, #radio_oauth").change(function() { + change_smtp_auth_method(); + }); jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { if (jQuery("#MAIN_MAIL_EMAIL_TLS").val() == 1) jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0); @@ -323,7 +380,7 @@ if ($action == 'edit') { // SuperAdministrator access only if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE); + print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail')); } else { $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) { @@ -331,13 +388,13 @@ if ($action == 'edit') { } $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print ''; // Host server print ''; - if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { + if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') { print ''; + // Auth mode + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { + print ''; + } + // ID - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID) ? $conf->global->MAIN_MAIL_SMTPS_ID : ''); print ''; } + // PW - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW) ? $conf->global->MAIN_MAIL_SMTPS_PW : ''); - print ''; } + // OAUTH service provider + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { + print ''; + } // TLS print ''; // Host server - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { print ''; } else { print ''; } + // Port - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { print ''; } else { print ''; } + // AUTH method + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { + $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN'); + $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : '') ; + print ''; + } + // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') != "XOAUTH2") { print ''; } + // SMTPS oauth service + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE]; + if (empty($text)) { + $text = $langs->trans("Undefined").img_warning(); + } + print ''; + } + // TLS print '
'.$langs->trans("Parameter").''.$langs->trans("Value").''.$langs->trans("Example").''.$langs->trans("Example").'
'; $help = img_help(1, $langs->trans("EMailHelpMsgSPFDKIM")); print $langs->trans("MailingEMailFrom").' '.$help.''; -print ''; +print ''; if (!empty($conf->global->MAILING_EMAIL_FROM) && !isValidEmail($conf->global->MAILING_EMAIL_FROM)) { print ' '.img_warning($langs->trans("BadEMail")); } -print ''.dol_escape_htmltag(($mysoc->name ? $mysoc->name : 'MyName').' ').''.dol_escape_htmltag(($mysoc->name ? $mysoc->name : 'MyName').' ').'
'; print $langs->trans("MailingEMailError").''; -print ''; +print ''; if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && !isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) { print ' '.img_warning($langs->trans("BadEMail")); } -print 'webmaster@example.com>webmaster@example.com>
'; -print $langs->trans("MailingDelay").''; +print $form->textwithpicto($langs->trans("MailingDelay"), $langs->trans("IfDefinedUseAValueBeetween", '0.001', '10')).''; print ''; -print '
'; print $langs->trans("ActivateCheckReadKey").''; -print ''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); } -print '
'; $blacklist_setting=array(0=>$langs->trans('No'), 1=>$langs->trans('Yes'), 2=>$langs->trans('DefaultStatusEmptyMandatory')); print $form->selectarray("MAILING_CONTACT_DEFAULT_BULK_STATUS", $blacklist_setting, $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS); print '
'; print $langs->trans("MailAdvTargetRecipients").''; print ajax_constantonoff('EMAILING_USE_ADVANCED_SELECTOR'); - print '
'; print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); print ''; @@ -354,7 +411,7 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; @@ -371,7 +428,7 @@ if ($action == 'edit') { // Port print '
'; - if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { + if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; @@ -385,7 +442,7 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; @@ -398,12 +455,31 @@ if ($action == 'edit') { } print '
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) + print ' '; + print ''; + print '     '; + print ' '; + print ''; + } else { + $value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN'); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -413,14 +489,15 @@ if ($action == 'edit') { print '
'; + print '
'; print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_PW"), $langs->trans("WithGMailYouCanCreateADedicatedPassword")); print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -430,9 +507,27 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; + + // SuperAdministrator access only + if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE); + } else { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE]; + if (empty($text)) { + $text = $langs->trans("Undefined"); + } + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + 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 (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (!empty($conf->global->MAIN_MAIL_EMAIL_TLS) ? $conf->global->MAIN_MAIL_EMAIL_TLS : 0), 1); } else { @@ -445,7 +540,7 @@ if ($action == 'edit') { // STARTTLS 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')))) { + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS) ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS : 0), 1); } else { @@ -458,7 +553,7 @@ if ($action == 'edit') { // SMTP_ALLOW_SELF_SIGNED print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (!empty($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED) ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED : 0), 1); } else { @@ -471,7 +566,7 @@ if ($action == 'edit') { // DKIM 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 (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), 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 { @@ -583,45 +678,63 @@ if ($action == 'edit') { // Method print '
'.$langs->trans("MAIN_MAIL_SENDMODE").''; - $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; + $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail')]; if (empty($text)) { $text = $langs->trans("Undefined").img_warning(); } print $text; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { - print $form->textwithpicto('', $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 1, 'warning'); + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + $textwarning = $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"); + print $form->textwithpicto('', $textwarning, 1, 'warning'); } print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''.$text.'
'.$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_SMTPS_OAUTH_SERVICE").''.$text.'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_TLS); } else { @@ -634,7 +747,7 @@ if ($action == 'edit') { // STARTTLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS); } else { @@ -647,7 +760,7 @@ if ($action == 'edit') { // SMTP_ALLOW_SELF_SIGNED print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED); } else { @@ -662,7 +775,7 @@ if ($action == 'edit') { if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer') { // DKIM 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 (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_DKIM_ENABLED')); } else { @@ -692,8 +805,14 @@ if ($action == 'edit') { print '
'; print '
'; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { - print info_admin($langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 0, 0, 'warning'); + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + $messagetoshow = $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"); + $messagetoshow .= ' '.$langs->trans("WarningPHPMailDbis", '{s1}', '{s2}'); + $linktosetvar1 = ''; + $linktosetvar2 = ''; + $messagetoshow = str_replace('{s1}', $linktosetvar1, $messagetoshow); + $messagetoshow = str_replace('{s2}', $linktosetvar2, $messagetoshow); + print info_admin($messagetoshow, 0, 0, 'warning'); } print '
'; @@ -799,7 +918,7 @@ if ($action == 'edit') { print ''.$langs->trans("Modify").''; if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { - if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) { + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') != 'mail' || !$linuxlike) { if (function_exists('fsockopen') && $port && $server) { print ''.$langs->trans("DoTestServerAvailability").''; } @@ -809,7 +928,7 @@ if ($action == 'edit') { print ''.$langs->trans("DoTestSend").''; - if (!empty($conf->fckeditor->enabled)) { + if (isModEnabled('fckeditor')) { print ''.$langs->trans("DoTestSendHTML").''; } } @@ -817,7 +936,7 @@ if ($action == 'edit') { print ''; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) { + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) { /* // Warning 1 if ($linuxlike) @@ -834,11 +953,11 @@ if ($action == 'edit') { if (!in_array($action, array('testconnect', 'test', 'testhtml'))) { $text = ''; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') { //$text .= $langs->trans("WarningPHPMail"); // To encourage to use SMTPS } - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') { if (!empty($conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD)) { // List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com' $text .= ($text ? '

' : '').''.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD); diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 79ddda792e0..b9cb57e0d80 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -23,6 +23,7 @@ * \brief Page to setup emails sending */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -33,10 +34,6 @@ $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'err $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); -if (!$user->admin) { - accessforbidden(); -} - $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. if ($action == 'test' || $action == 'send') { @@ -49,6 +46,7 @@ $substitutionarrayfortest = array( //'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails '__CHECK_READ__' => (!empty($object) && is_object($object) && is_object($object->thirdparty)) ? '' : '', '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails + '__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails '__LOGIN__' => $user->login, '__LASTNAME__' => 'RecipientLastname', '__FIRSTNAME__' => 'RecipientFirstname', @@ -59,6 +57,10 @@ $substitutionarrayfortest = array( ); complete_substitutions_array($substitutionarrayfortest, $langs); +// Security check +if (!$user->admin) { + accessforbidden(); +} /* @@ -71,7 +73,15 @@ if ($action == 'update' && !$cancel) { dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_EMAILING", GETPOST("MAIN_MAIL_SMTP_PORT_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_EMAILING", GETPOST("MAIN_MAIL_SMTP_SERVER_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_EMAILING", GETPOST("MAIN_MAIL_SMTPS_ID_EMAILING"), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_EMAILING")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING", 'none'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING", 'chaine'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING", GETPOST("MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING", 'chaine'), 'chaine', 0, '', $conf->entity); + } dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_TLS_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING"), 'chaine', 0, '', $conf->entity); @@ -145,6 +155,24 @@ if (version_compare(phpversion(), '7.0', '>=')) { $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; } +// List of oauth services +$oauthservices = array(); + +foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $key = preg_replace('/^OAUTH_/', '', $key); + $key = preg_replace('/_ID$/', '', $key); + if (preg_match('/^.*-/', $key)) { + $name = preg_replace('/^.*-/', '', $key); + } else { + $name = $langs->trans("NoName"); + } + $provider = preg_replace('/-.*$/', '', $key); + $provider = ucfirst(strtolower($provider)); + + $oauthservices[$key] = $name." (".$provider.")"; + } +} if ($action == 'edit') { if ($conf->use_javascript_ajax) { @@ -170,6 +198,8 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").prop("disabled", true); + jQuery(".smtp_method").hide(); + jQuery(".smtp_auth_method").hide(); '; if ($linuxlike) { print ' @@ -201,9 +231,11 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").show(); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").show(); + jQuery("#smtp_port_mess").hide(); jQuery("#smtp_server_mess").hide(); - jQuery("#smtp_port_mess").hide(); - } + jQuery(".smtp_method").show(); + jQuery(".smtp_auth_method").show(); + } if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'swiftmailer\') { jQuery(".drag").show(); @@ -219,12 +251,35 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); + jQuery(".smtp_method").show(); + jQuery(".smtp_auth_method").show(); } } + function change_smtp_auth_method() { + console.log(jQuery("#radio_pw").prop("checked")); + if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if(jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'mail\' || jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'default\'){ + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").hide(); + } else { + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").show(); + } + } initfields(); - jQuery("#MAIN_MAIL_SENDMODE_EMAILING").change(function() { + change_smtp_auth_method(); + jQuery("#MAIN_MAIL_SENDMODE_EMAILING").change(function() { initfields(); - }); + change_smtp_auth_method(); + }); + jQuery("#radio_pw, #radio_oauth").change(function() { + change_smtp_auth_method(); + }); jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").change(function() { if (jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").val() == 1) jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val(0); @@ -237,7 +292,7 @@ if ($action == 'edit') { else jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); }); - })'; + })'; print ''."\n"; } @@ -294,16 +349,16 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; - print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; - print ' '.$langs->trans("SeeLinkToOnlineDocumentation").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print '' . $langs->trans("SeeLocalSendMailSetup") . ''; + print ' ' . $langs->trans("SeeLinkToOnlineDocumentation") . ''; } else { $text = !empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print ''; } @@ -326,30 +381,49 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; - print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print '' . $langs->trans("SeeLocalSendMailSetup") . ''; } else { $text = (!empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); - print ''; + print ''; } } print ''; + // AUTH method + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) + print ' '; + print ''; + print '            '; + print ' '; + print ''; + } else { + $value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN'); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin'); + print ''; + } + print ''; + } + // ID if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : ''); - print ''.$langs->trans("MAIN_MAIL_SMTPS_ID").''; + print '' . $langs->trans("MAIN_MAIL_SMTPS_ID") . ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print ''; } @@ -357,18 +431,38 @@ 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 ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + print '' . $langs->trans("MAIN_MAIL_SMTPS_PW") . ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print ''; } + // OAUTH service provider + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + print ''.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; + + // SuperAdministrator access only + if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING); + } else { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING]; + if (empty($text)) { + $text = $langs->trans("Undefined"); + } + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print ''; + } + + // TLS print ''.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { @@ -453,16 +547,33 @@ if ($action == 'edit') { print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').''; } + // AUTH method + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { + $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN'); + $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : '') ; + print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''.$text.''; + } + // SMTPS ID if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { print ''.$langs->trans("MAIN_MAIL_SMTPS_ID").''.getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING').''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') != "XOAUTH2") { print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING')).''; } + // SMTPS oauth service + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') === "XOAUTH2") { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING]; + if (empty($text)) { + $text = $langs->trans("Undefined").img_warning(); + } + print ''.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING").''.$text.''; + } + + // TLS print ''.$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'))) { @@ -533,16 +644,16 @@ if ($action == 'edit') { if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') { if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) { if (function_exists('fsockopen') && $port && $server) { - print ''.$langs->trans("DoTestServerAvailability").''; + print '' . $langs->trans("DoTestServerAvailability") . ''; } } else { - print ''.$langs->trans("DoTestServerAvailability").''; + print '' . $langs->trans("DoTestServerAvailability") . ''; } - print ''.$langs->trans("DoTestSend").''; + print '' . $langs->trans("DoTestSend") . ''; - if (!empty($conf->fckeditor->enabled)) { - print ''.$langs->trans("DoTestSendHTML").''; + if (isModEnabled('fckeditor')) { + print '' . $langs->trans("DoTestSendHTML") . ''; } } @@ -597,8 +708,8 @@ if ($action == 'edit') { $formmail->withfrom = 1; $formmail->witherrorsto = 1; $formmail->withto = (GETPOSTISSET('sendto') ? GETPOST('sendto', 'restricthtml') : ($user->email ? $user->email : 1)); - $formmail->withtocc = (GETPOSTISSET(['sendtocc']) ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty - $formmail->withtoccc = (GETPOSTISSET(['sendtoccc']) ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty + $formmail->withtocc = (GETPOSTISSET('sendtocc') ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty + $formmail->withtoccc = (GETPOSTISSET('sendtoccc') ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty $formmail->withtopic = (GETPOSTISSET('subject') ? GETPOST('subject') : $langs->trans("Test")); $formmail->withtopicreadonly = 0; $formmail->withfile = 2; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 8e31d0e6d62..95f57d5dfc5 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -22,6 +22,7 @@ * \brief Page to adminsiter email sender profiles */ +// 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/admin.lib.php'; @@ -285,7 +286,7 @@ foreach($object->fields as $key => $val) $sql .= "t.".$key.", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } // Add where from hooks @@ -380,14 +381,17 @@ if ($action != 'create') { if ($action == 'edit') { print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -409,14 +413,17 @@ if ($action != 'create') { print ''; */ print '
'.$langs->trans("Label").'
'.$langs->trans("Email").'
'.$langs->trans("Label").'
'.$langs->trans("Email").''; + print img_picto('', 'email', 'class="pictofixedwidth"'); + print '
'.$langs->trans("Signature").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('signature', (GETPOSTISSET('signature') ? GETPOST('signature', 'restricthtml') : $object->signature), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%'); print $doleditor->Create(1); print '
'.$langs->trans("User").''; + print img_picto('', 'user', 'class="pictofixedwidth"'); print $form->select_dolusers((GETPOSTISSET('private') ? GETPOST('private', 'int') : $object->private), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); print '
'.$langs->trans("Position").'
'; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -557,6 +564,7 @@ if (!empty($extrafields->attributes[$object->table_element]['computed']) && is_a // -------------------------------------------------------------------- $i = 0; $totalarray = array(); +$totalarray['nbfield'] = 0; while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); if (empty($obj)) { diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index c3912dc2b67..e462b7854ac 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -33,6 +33,7 @@ * \brief Page to administer emails templates */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -45,17 +46,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langsArray=array("errors", "admin", "mails", "languages"); -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { $langsArray[]='members'; } -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsArray[]='eventorganization'; } $langs->loadLangs($langsArray); $toselect = GETPOST('toselect', 'array'); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; $massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $mode = GETPOST('mode', 'aZ09'); @@ -179,58 +180,58 @@ $elementList = array(); $elementList['all'] = '-- '.dol_escape_htmltag($langs->trans("All")).' --'; $elementList['none'] = '-- '.dol_escape_htmltag($langs->trans("None")).' --'; $elementList['user'] = img_picto('', 'user', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToUser')); -if (!empty($conf->adherent->enabled) && !empty($user->rights->adherent->lire)) { +if (isModEnabled('adherent') && !empty($user->rights->adherent->lire)) { $elementList['member'] = img_picto('', 'object_member', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToMember')); } -if (!empty($conf->recruitment->enabled) && !empty($user->rights->recruitment->recruitmentjobposition->read)) { +if (isModEnabled('recruitment') && !empty($user->rights->recruitment->recruitmentjobposition->read)) { $elementList['recruitmentcandidature_send'] = img_picto('', 'recruitmentcandidature', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('RecruitmentCandidatures')); } -if (!empty($conf->societe->enabled) && !empty($user->rights->societe->lire)) { +if (isModEnabled("societe") && $user->hasRight('societe', 'lire')) { $elementList['thirdparty'] = img_picto('', 'company', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToThirdparty')); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $elementList['project'] = img_picto('', 'project', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToProject')); } -if (!empty($conf->propal->enabled) && !empty($user->rights->propal->lire)) { +if (isModEnabled("propal") && !empty($user->rights->propal->lire)) { $elementList['propal_send'] = img_picto('', 'propal', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendProposal')); } -if (!empty($conf->commande->enabled) && !empty($user->rights->commande->lire)) { +if (isModEnabled('commande') && !empty($user->rights->commande->lire)) { $elementList['order_send'] = img_picto('', 'order', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendOrder')); } if (isModEnabled('facture') && !empty($user->rights->facture->lire)) { $elementList['facture_send'] = img_picto('', 'bill', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendInvoice')); } -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { $elementList['shipping_send'] = img_picto('', 'dolly', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendShipment')); } -if (!empty($conf->reception->enabled)) { +if (isModEnabled("reception")) { $elementList['reception_send'] = img_picto('', 'dollyrevert', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendReception')); } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $elementList['fichinter_send'] = img_picto('', 'intervention', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendIntervention')); } -if (!empty($conf->supplier_proposal->enabled)) { +if (isModEnabled('supplier_proposal')) { $elementList['supplier_proposal_send'] = img_picto('', 'propal', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierRequestForQuotation')); } -if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire))) { +if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire))) { $elementList['order_supplier_send'] = img_picto('', 'order', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierOrder')); } -if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { +if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) { $elementList['invoice_supplier_send'] = img_picto('', 'bill', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierInvoice')); } -if (!empty($conf->contrat->enabled) && !empty($user->rights->contrat->lire)) { +if (isModEnabled('contrat') && !empty($user->rights->contrat->lire)) { $elementList['contract'] = img_picto('', 'contract', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendContract')); } -if (!empty($conf->ticket->enabled) && !empty($user->rights->ticket->read)) { +if (isModEnabled('ticket') && !empty($user->rights->ticket->read)) { $elementList['ticket_send'] = img_picto('', 'ticket', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToTicket')); } -if (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire)) { +if (isModEnabled('expensereport') && !empty($user->rights->expensereport->lire)) { $elementList['expensereport_send'] = img_picto('', 'trip', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToExpenseReport')); } if (isModEnabled('agenda')) { $elementList['actioncomm_send'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventPush')); } -if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) { +if (isModEnabled('eventorganization') && !empty($user->rights->eventorganization->read)) { $elementList['conferenceorbooth'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization')); } if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) { @@ -245,17 +246,17 @@ if ($reshook == 0) { } } +$id = 25; +$acceptlocallinktomedia = (acceptLocalLinktoMedia() > 0 ? 1 : 0); +// Security if (!empty($user->socid)) { accessforbidden(); } $permissiontoadd = 1; - -//asort($elementList); - -$id = 25; +$permissiontodelete = 1; @@ -293,8 +294,8 @@ if (empty($reshook)) { $search_array_options = array(); } - // Actions add or modify an entry into a dictionary - if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { + // Actions add or modify an email template + if ((GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) && $permissiontoadd) { $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); $listfieldinsert = explode(',', $tabfieldinsert[$id]); $listfieldmodify = explode(',', $tabfieldinsert[$id]); @@ -349,7 +350,7 @@ if (empty($reshook)) { } setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); - $action = 'add'; + $action = 'create'; } } @@ -365,7 +366,7 @@ if (empty($reshook)) { // List of values $i = 0; foreach ($listfieldinsert as $f => $value) { - $keycode = $listfieldvalue[$i]; + $keycode = isset($listfieldvalue[$i]) ? $listfieldvalue[$i] : ""; if ($value == 'lang') { $keycode = 'langcode'; } @@ -423,7 +424,7 @@ if (empty($reshook)) { } else { dol_print_error($db); } - $action = 'add'; + $action = 'create'; } } @@ -511,7 +512,7 @@ if (empty($reshook)) { } } - if ($action == 'confirm_delete' && $confirm == 'yes') { // delete + if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontodelete) { // delete $rowidcol = "rowid"; $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = ".((int) $rowid); @@ -530,7 +531,7 @@ if (empty($reshook)) { } // activate - if ($action == $acts[0]) { + if ($action == $acts[0] && $permissiontoadd) { $rowidcol = "rowid"; $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE rowid = ".((int) $rowid); @@ -542,7 +543,7 @@ if (empty($reshook)) { } // disable - if ($action == $acts[1]) { + if ($action == $acts[1] && $permissiontoadd) { $rowidcol = "rowid"; $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE rowid = ".((int) $rowid); @@ -582,7 +583,7 @@ if (!$user->admin) { $sql .= " AND (private = 0 OR (private = 1 AND fk_user = ".((int) $user->id)."))"; // Show only public and private to me $sql .= " AND (active = 1 OR fk_user = ".((int) $user->id).")"; // Show only active or owned by me } -if (empty($conf->global->MAIN_MULTILANGS)) { +if (!getDolGlobalInt('MAIN_MULTILANGS')) { $sql .= " AND (lang = '".$db->escape($langs->defaultlang)."' OR lang IS NULL OR lang = '')"; } if ($search_label) { @@ -653,7 +654,7 @@ $linkback = ''; $titlepicto = 'title_setup'; -$url = DOL_URL_ROOT.'/admin/mails_templates.php?action=add&token='.newToken(); +$url = DOL_URL_ROOT.'/admin/mails_templates.php?action=create'; $newcardbutton = dolGetButtonTitle($langs->trans('NewEMailTemplate'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -684,10 +685,11 @@ if ($action == 'delete') { $fieldlist = explode(',', $tabfield[$id]); -if ($action == 'add') { +if ($action == 'create') { // Form to add a new line print ''; print ''; + print ''; print ''; print '
'; @@ -705,7 +707,7 @@ if ($action == 'add') { $valuetoshow = $langs->trans("Owner"); } if ($fieldlist[$field] == 'lang') { - $valuetoshow = (empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); + $valuetoshow = (!getDolGlobalInt('MAIN_MULTILANGS') ? ' ' : $langs->trans("Language")); } if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); @@ -738,7 +740,6 @@ if ($action == 'add') { if ($fieldlist[$field] == 'content_lines') { $valuetoshow = ''; } - if ($valuetoshow != '') { print '
'; } elseif ($value == 'lang') { print ''; } elseif ($value == 'fk_user') { print ''; } elseif ($value == 'topic') { print ''; } elseif ($value == 'type_template') { print ''; } elseif (!in_array($value, array('content', 'content_lines'))) { print ''; @@ -1023,7 +1024,7 @@ if ($num) { $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 + // Show main fields if (empty($reshook)) { fieldList($fieldlist, $obj, $tabname[$id], 'edit'); } @@ -1044,7 +1045,7 @@ if ($num) { foreach ($fieldsforcontent as $tmpfieldlist) { $showfield = 1; $align = "left"; - $valuetoshow = $obj->{$tmpfieldlist}; + $valuetoshow = $obj->$tmpfieldlist; $class = 'tddict'; // Show value for field @@ -1058,41 +1059,7 @@ if ($num) { } if ($tmpfieldlist == 'joinfiles') { print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; - print ''; - } - - // If $acceptlocallinktomedia is true, we can add link media files int email templates (we already can do this into HTML editor of an email). - // Note that local link to a file into medias are replaced with a real link by email in CMailFile.class.php with value $urlwithroot defined like this: - // $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 - $acceptlocallinktomedia = getDolGlobalInt('MAIN_DISALLOW_MEDIAS_IN_EMAIL_TEMPLATES') ? 0 : 1; - if ($acceptlocallinktomedia) { - global $dolibarr_main_url_root; - $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - - // Parse $newUrl - $newUrlArray = parse_url($urlwithouturlroot); - $hosttocheck = $newUrlArray['host']; - $hosttocheck = str_replace(array('[', ']'), '', $hosttocheck); // Remove brackets of IPv6 - - if (function_exists('gethostbyname')) { - $iptocheck = gethostbyname($hosttocheck); - } else { - $iptocheck = $hosttocheck; - } - - //var_dump($iptocheck.' '.$acceptlocallinktomedia); - if (!filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { - // If ip of public url is an private network IP, we do not allow this. - $acceptlocallinktomedia = 0; - // TODO Show a warning - } - - if (preg_match('/http:/i', $urlwithouturlroot)) { - // If public url is not a https, we do not allow to add medias link. It will generate security alerts when email will be sent. - $acceptlocallinktomedia = 0; - // TODO Show a warning - } + print $form->selectyesno($tmpfieldlist.'-'.$rowid, (isset($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : '0'), 1, false, 0, 1); } if ($tmpfieldlist == 'content') { @@ -1101,6 +1068,7 @@ if ($num) { if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { $okforextended = false; } + $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, $acceptlocallinktomedia, $okforextended, ROWS_6, '90%'); print $doleditor->Create(1); } @@ -1110,7 +1078,7 @@ if ($num) { if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { $okforextended = false; } - $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, $acceptlocallinktomedia, $okforextended, ROWS_6, '90%'); + $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, $acceptlocallinktomedia, $okforextended, ROWS_6, '90%'); print $doleditor->Create(1); } print ''; @@ -1203,7 +1171,7 @@ if ($num) { if ($value == 'joinfiles') { $align = "center"; if ($valuetoshow) { - $valuetoshow = 1; + $valuetoshow = yn(1); } else { $valuetoshow = ''; } @@ -1310,7 +1278,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if ($value == 'fk_user') { print ''; } elseif ($value == 'lang') { print ''; } elseif ($value == 'type_template') { // Le type de template print ''; } elseif ($context == 'add' && in_array($value, array('topic', 'joinfiles', 'content', 'content_lines'))) { @@ -1377,7 +1345,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $class = 'maxwidth50'; $classtd = 'center'; } if ($value == 'position') { - $class = 'maxwidth50'; $classtd = 'center'; + $class = 'maxwidth50 center'; $classtd = 'center'; } if ($value == 'libelle') { $class = 'quatrevingtpercent'; @@ -1394,7 +1362,6 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if (empty($user->admin)) { print $form->selectyesno($value, '1', 1); } else { - //print ''; print $form->selectyesno($value, (isset($obj->{$value}) ? $obj->{$value}:''), 1); } } else { diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index a439bdabcf0..05d66516cde 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -23,6 +23,7 @@ * \brief Page to setup mails for ticket */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -31,22 +32,28 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. if ($action == 'test' || $action == 'send') { - $usersignature = dol_string_nohtmltag($usersignature); + $usersignature = dol_string_nohtmltag($usersignature, 2); } $substitutionarrayfortest = array( -'__LOGIN__' => $user->login, -'__ID__' => 'TESTIdRecord', -'__EMAIL__' => 'TESTEMail', -'__LASTNAME__' => 'TESTLastname', -'__FIRSTNAME__' => 'TESTFirstname', -'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), -//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet + '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, + '__ID__' => 'TESTIdRecord', + '__EMAIL__' => 'TESTEMail', + '__LOGIN__' => $user->login, + '__LASTNAME__' => 'TESTLastname', + '__FIRSTNAME__' => 'TESTFirstname', + '__ADDRESS__'=> 'RecipientAddress', + '__ZIP__'=> 'RecipientZip', + '__TOWN_'=> 'RecipientTown', + '__COUNTRY__'=> 'RecipientCountry', + '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), + '__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails + //'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet ); complete_substitutions_array($substitutionarrayfortest, $langs); @@ -66,8 +73,15 @@ if ($action == 'update' && !$cancel) { dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_TICKET", GETPOST("MAIN_MAIL_SMTP_PORT_TICKET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_TICKET", GETPOST("MAIN_MAIL_SMTP_SERVER_TICKET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_TICKET", GETPOST("MAIN_MAIL_SMTPS_ID_TICKET"), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_TICKET", GETPOST("MAIN_MAIL_SMTPS_PW_TICKET"), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_TICKET", GETPOST("MAIN_MAIL_EMAIL_TLS_TICKET"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_TICKET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_TICKET", GETPOST("MAIN_MAIL_SMTPS_PW_TICKET", 'none'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET", 'chaine'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET", GETPOST("MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET", 'chaine'), 'chaine', 0, '', $conf->entity); + }dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_TICKET", GETPOST("MAIN_MAIL_EMAIL_TLS_TICKET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_TICKET", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_TICKET"), 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); @@ -85,10 +99,10 @@ $trackid = (($action == 'testhtml') ? "testhtml" : "test"); $sendcontext = 'ticket'; // Force to use dedicated context of setup for ticket include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; -if ($action == 'presend' && GETPOST('trackid') == 'test') { +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') { $action = 'test'; } -if ($action == 'presend' && GETPOST('trackid') == 'testhtml') { +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') { $action = 'testhtml'; } @@ -139,6 +153,25 @@ if (version_compare(phpversion(), '7.0', '>=')) { $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; } +// List of oauth services +$oauthservices = array(); + +foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $key = preg_replace('/^OAUTH_/', '', $key); + $key = preg_replace('/_ID$/', '', $key); + if (preg_match('/^.*-/', $key)) { + $name = preg_replace('/^.*-/', '', $key); + } else { + $name = $langs->trans("NoName"); + } + $provider = preg_replace('/-.*$/', '', $key); + $provider = ucfirst(strtolower($provider)); + + $oauthservices[$key] = $name." (".$provider.")"; + } +} + if ($action == 'edit') { if ($conf->use_javascript_ajax) { @@ -162,6 +195,8 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_EMAIL_TLS_TICKET").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val(0); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").prop("disabled", true); + jQuery(".smtp_method").hide(); + jQuery(".smtp_auth_method").hide(); '; if ($linuxlike) { print ' @@ -192,7 +227,9 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_SERVER_TICKET").show(); jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").show(); jQuery("#smtp_server_mess").hide(); - jQuery("#smtp_port_mess").hide(); + jQuery("#smtp_port_mess").hide(); + jQuery(".smtp_method").show(); + jQuery(".smtp_auth_method").show(); } if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'swiftmailer\') { @@ -207,12 +244,37 @@ if ($action == 'edit') { jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); + jQuery(".smtp_method").show(); + jQuery(".smtp_auth_method").show(); } } + function change_smtp_auth_method() { + console.log(jQuery("#radio_pw").prop("checked")); + if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_oauth_service").show(); + jQuery(".smtp_pw").hide(); + } else if(jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'mail\' || jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'default\'){ + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").hide(); + } else { + jQuery(".smtp_oauth_service").hide(); + jQuery(".smtp_pw").show(); + } + } initfields(); + change_smtp_auth_method(); + jQuery("#MAIN_MAIL_SENDMODE_TICKET").change(function() { initfields(); + change_smtp_auth_method(); + }); + jQuery("#radio_pw, #radio_oauth").change(function() { + change_smtp_auth_method(); + }); jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val() == 1) jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val(0); @@ -260,12 +322,15 @@ if ($action == 'edit') { // Host server - print ''; if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') { + print ''; } else { + print ''; } - print ''; + print ''; // Port @@ -294,7 +360,7 @@ if ($action == 'edit') { if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print ''; + // AUTH method + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + print ''; + } + // ID if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : ''); print ''; } + // OAUTH service provider + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + print ''; + } + // TLS print ''; } + // AUTH method + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { + $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN'); + $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : '') ; + print ''; + } + // SMTPS ID if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") { print ''; } + // SMTPS oauth service + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') === "XOAUTH2") { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET]; + if (empty($text)) { + $text = $langs->trans("Undefined").img_warning(); + } + print ''; + } + // TLS print ''; - print ''; + print ''; + print ajax_combobox('menuuser'); + print ''; print ''; // Type - print ''; @@ -373,12 +354,6 @@ if ($action == 'create') { print ''; print ''; - // Target - print ''; - // Enabled print ''; print ''; @@ -387,6 +362,14 @@ if ($action == 'create') { print ''; print ''; + // Target + print ''; + print '
'.$langs->trans("Label").'
'.$langs->trans("Email").'
'.$langs->trans("Label").'
'.$langs->trans("Email").''; + print img_picto('', 'email', 'class="pictofixedwidth"'); + print '
'.$langs->trans("Signature").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('signature', GETPOST('signature'), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%'); print $doleditor->Create(1); print '
'.$langs->trans("User").''; + print img_picto('', 'user', 'class="pictofixedwidth"'); print $form->select_dolusers((GETPOSTISSET('private') ? GETPOST('private', 'int') : -1), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); print '
'.$langs->trans("Position").'
'; if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) { @@ -819,16 +820,16 @@ if ($action == 'add') { // Input field if ($tmpfieldlist == 'topic') { - print ''; + print ''; } elseif ($tmpfieldlist == 'joinfiles') { - print ''; + print $form->selectyesno($tmpfieldlist, (isset($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : '0'), 1, false, 0, 1); } else { - // print ''; $okforextended = true; if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { $okforextended = false; } - $doleditor = new DolEditor($tmpfieldlist, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 180, 'dolibarr_mailings', 'In', 0, true, $okforextended, ROWS_4, '90%'); + + $doleditor = new DolEditor($tmpfieldlist, (!empty($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : ''), '', 180, 'dolibarr_mailings', 'In', false, $acceptlocallinktomedia, $okforextended, ROWS_4, '90%'); print $doleditor->Create(1); } print ''; @@ -912,17 +913,17 @@ foreach ($fieldlist as $field => $value) { print ''; - print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth150'); + print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100'); print ''; - print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'maxwidth150'); + print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'maxwidth125', 1); print ''; - print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'minwidth150', 1, '', 0, 1); + print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth125', 1, '', 0, 1); print ''; if ($user->admin) { - print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'minwidth150 maxwidth300'); + print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'minwidth150 maxwidth200'); } else { if ($context == 'add') { // I am not admin and we show the add form print $user->getNomUrl(1); // Me @@ -1331,32 +1299,32 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $selectedlang = GETPOSTISSET('langcode') ?GETPOST('langcode', 'aZ09') : $langs->defaultlang; if ($context == 'edit') { - $selectedlang = $obj->{$value}; + $selectedlang = $obj->lang; } print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150'); } else { - if (!empty($obj->{$value})) { - print $obj->{$value}.' - '.$langs->trans('Language_'.$obj->{$value}); + if (!empty($obj->lang)) { + print $obj->lang.' - '.$langs->trans('Language_'.$obj->lang); } $keyname = $value; if ($keyname == 'lang') { $keyname = 'langcode'; // Avoid conflict with lang param } - print ''; + print ''; } print ''; - if ($context == 'edit' && !empty($obj->{$value}) && !in_array($obj->{$value}, array_keys($elementList))) { + if ($context == 'edit' && !empty($obj->type_template) && !in_array($obj->type_template, array_keys($elementList))) { // Current template type is an unknown type, so we must keep it as it is. - print ''; - print $obj->{$value}; + print ''; + print $obj->type_template; } else { - print $form->selectarray('type_template', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''), 1, 0, 0, '', 0, 0, 0, '', 'minwidth150', 1, '', 0, 1); + print $form->selectarray('type_template', $elementList, (!empty($obj->type_template) ? $obj->type_template:''), 1, 0, 0, '', 0, 0, 0, '', 'minwidth150', 1, '', 0, 1); } print '
'; + print '
'; print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); print ''; - print $langs->trans("SeeLocalSendMailSetup"); + print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''; $mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ''); $smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) { @@ -275,18 +340,19 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { $text = !empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); print ''; } + print '
'; - print $langs->trans("SeeLocalSendMailSetup"); + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { $mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ''); $smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined"); @@ -305,10 +371,10 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { $text = (!empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -318,12 +384,31 @@ if ($action == 'edit') { } print '
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) + print ' '; + print ''; + print '            '; + print ' '; + print ''; + } else { + $value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN'); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -336,9 +421,9 @@ if ($action == 'edit') { // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_PW_TICKET : ''); - print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -348,6 +433,24 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; + // SuperAdministrator access only + if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET); + } else { + $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET]; + if (empty($text)) { + $text = $langs->trans("Undefined"); + } + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; @@ -420,16 +523,32 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''.$text.'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID_TICKET.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW_TICKET).'
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET").''.$text.'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { @@ -496,7 +615,7 @@ if ($action == 'edit') { print ''.$langs->trans("DoTestSend").''; - if (!empty($conf->fckeditor->enabled)) { + if (isModEnabled('fckeditor')) { print ''.$langs->trans("DoTestSendHTML").''; } } @@ -511,6 +630,7 @@ if ($action == 'edit') { // Run the test to connect if ($action == 'testconnect') { + print '
'; print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -541,8 +661,8 @@ if ($action == 'edit') { // Cree l'objet formulaire mail include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); - $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname') : $conf->global->MAIN_MAIL_EMAIL_FROM); - $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail') : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM); $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); $formmail->withfromreadonly = 0; $formmail->withsubstit = 0; @@ -569,7 +689,7 @@ if ($action == 'edit') { $formmail->param["returnurl"] = $_SERVER["PHP_SELF"]; // Init list of files - if (GETPOST("mode") == 'init') { + if (GETPOST("mode", "aZ09") == 'init') { $formmail->clear_attached_files(); } diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 8034d813c0d..abcb2133e8c 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -23,6 +23,7 @@ * \brief Page to setup menu manager to use */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index bf4ac3f8979..288cba1c5b9 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -24,6 +24,7 @@ * \brief Tool to edit menus */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; @@ -172,12 +173,12 @@ if ($action == 'add') { $action = 'create'; $error++; } - if (!$error && GETPOST('menuId') && GETPOST('type') == 'top') { + if (!$error && GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'top') { setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); $action = 'create'; $error++; } - if (!$error && !GETPOST('menuId') && GETPOST('type') == 'left') { + if (!$error && !GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'left') { setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); $action = 'create'; $error++; @@ -219,29 +220,6 @@ if ($action == 'add') { } } -// delete -if ($action == 'confirm_delete' && $confirm == 'yes') { - $db->begin(); - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int'); - $result = $db->query($sql); - - if ($result == 0) { - $db->commit(); - - llxHeader(); - setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); - llxFooter(); - exit; - } else { - $db->rollback(); - - $reload = 0; - $_GET["action"] = ''; - $action = ''; - } -} - /* @@ -318,15 +296,17 @@ if ($action == 'create') { // User print '
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('Type').''; + print '
'.$langs->trans('Position').''; if ($parent_rowid) { print $langs->trans('Left'); print ''; @@ -336,6 +316,7 @@ if ($action == 'create') { print ''; print ''; print ''; + print ajax_combobox('topleft'); } print ''.$langs->trans('DetailType').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled').'
'.$langs->trans('Rights').''.$langs->trans('DetailRight').'
'.$langs->trans('Target').''; + print ajax_combobox("target"); + print ''.$langs->trans('DetailTarget').'
'; print dol_get_fiche_end(); @@ -415,7 +398,7 @@ if ($action == 'create') { print ''.$langs->trans('Id').''.$menu->id.''.$langs->trans('DetailId').''; // Module - print ''.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').''; + print ''.$langs->trans('MenuModule').''.(empty($menu->module) ? 'Core' : $menu->module).''.$langs->trans('DetailMenuModule').''; // Handler if ($menu->menu_handler == 'all') { @@ -426,14 +409,17 @@ if ($action == 'create') { print ''.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').''; // User - print ''.$langs->trans('MenuForUsers').''; print ''; print ''; print ''; - print ''.$langs->trans('DetailUser').''; + print ''; + print ajax_combobox('menuuser'); + print ''.$langs->trans('DetailUser').''; // Type - print ''.$langs->trans('Type').''; + print ''.$langs->trans('Position').''; print ''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').''; // Mainmenu code @@ -486,12 +472,6 @@ if ($action == 'create') { print ''.$langs->trans('Position').''; print ''.$langs->trans('DetailPosition').''; - // Target - print ''.$langs->trans('Target').''.$langs->trans('DetailTarget').''; - // Enabled print ''.$langs->trans('Enabled').''; print ''.$langs->trans('DetailEnabled'); @@ -508,6 +488,14 @@ if ($action == 'create') { } print ''; + // Target + print ''.$langs->trans('Target').''; + print ajax_combobox("target"); + print ''.$langs->trans('DetailTarget').''; + print ''; print dol_get_fiche_end(); diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 5a155d11411..0396c31eb96 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -24,6 +24,7 @@ * \brief Index page for menu editor */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 01c29b48a26..e18e65e47a0 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -1,6 +1,7 @@ * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2022 Charlene 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 @@ -29,6 +30,7 @@ if (!defined('NOTOKENRENEWAL')) { } +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -136,7 +138,7 @@ foreach ($modulesdir as $dir) { } // We discard modules according to property disabled - //if (! empty($objMod->hidden)) $modulequalified=0; + //if (!empty($objMod->hidden)) $modulequalified=0; if ($modulequalified > 0) { $publisher = dol_escape_htmltag($objMod->getPublisher()); @@ -506,7 +508,7 @@ if ($mode == 'feature') { $text .= '
'; $text .= '
'.$langs->trans("AddHooks").': '; - if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) { + if (isset($objMod->module_parts) && isset($objMod->module_parts['hooks']) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) { $i = 0; foreach ($objMod->module_parts['hooks'] as $key => $val) { if ($key === 'entity') { diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 286ccc424e8..bd6a238c0f0 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -33,6 +33,7 @@ if (!defined('CSRFCHECK_WITH_TOKEN') && (empty($_GET['action']) || $_GET['action define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET } +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -43,10 +44,15 @@ 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 = GETPOSTISSET('mode') ? GETPOST('mode', 'alpha') : (empty($conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT) ? 'commonkanban' : 'common'); -if (empty($mode)) { - $mode = 'common'; +// if we set another view list mode, we keep it (till we change one more time) +if (GETPOSTISSET('mode')) { + $mode = GETPOST('mode', 'alpha'); + if ($mode =='common' || $mode =='commonkanban') + dolibarr_set_const($db, "MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT", $mode, 'chaine', 0, '', $conf->entity); +} else { + $mode = (empty($conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT) ? 'commonkanban' : $conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT); } + $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $page_y = GETPOST('page_y', 'int'); @@ -781,14 +787,14 @@ if ($mode == 'common' || $mode == 'commonkanban') { if (!empty($objMod->disabled)) { $codeenabledisable .= $langs->trans("Disabled"); - } elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { + } elseif (!empty($objMod->always_enabled) || ((isModEnabled('multicompany') && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= $langs->trans("Used"); } else { $codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium valignmiddle'); //print $langs->trans("Required"); } - if (!empty($conf->multicompany->enabled) && $user->entity) { + if (isModEnabled('multicompany') && $user->entity) { $disableSetup++; } } else { @@ -1112,7 +1118,13 @@ if ($mode == 'deploy') { } } } else { - $message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock')); + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean message + $message = info_admin($langs->trans('InstallModuleFromWebHasBeenDisabledContactUs')); + } else { + // Show technical message + $message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock')); + } $allowfromweb = 0; } @@ -1274,7 +1286,7 @@ if ($mode == 'develop') { print ''; print ''.$langs->trans("TryToUseTheModuleBuilder", $langs->transnoentitiesnoconv("ModuleBuilder")).''; print ''; - if (!empty($conf->modulebuilder->enabled)) { + if (isModEnabled('modulebuilder')) { print $langs->trans("SeeTopRightMenu"); } else { print ''.$langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("ModuleBuilder")).''; diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 2d543cb1faa..36a82e965f4 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -21,6 +21,7 @@ * \brief Setup page of module MRP */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; diff --git a/htdocs/admin/mrp_extrafields.php b/htdocs/admin/mrp_extrafields.php index 768ec487165..cd18b47eec7 100644 --- a/htdocs/admin/mrp_extrafields.php +++ b/htdocs/admin/mrp_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of MOs */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,14 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - /* * Creation of an optional field */ diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index d6487093e41..1cf838c08cb 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; $langs->loadLangs(array('admin', 'multicurrency')); // Access control -if (!$user->admin || empty($conf->multicurrency->enabled)) { +if (!$user->admin || !isModEnabled('multicurrency')) { accessforbidden(); } diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 760df948d34..d3ad20f68b7 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -26,6 +26,7 @@ * \brief Page to setup notification module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -177,7 +178,7 @@ print load_fiche_titre($langs->trans("NotificationSetup"), $linkback, 'title_set print ''; print $langs->trans("NotificationsDesc").'
'; print $langs->trans("NotificationsDescUser").'
'; -if (!empty($conf->societe->enabled)) { +if (isModEnabled("societe")) { print $langs->trans("NotificationsDescContact").'
'; } print $langs->trans("NotificationsDescGlobal").'
'; @@ -361,7 +362,7 @@ print $form->buttonsSaveCancel("Save", ''); print '
'; print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; - if (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; } print '
'; @@ -384,7 +385,7 @@ print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email'); print '
'; print $langs->trans("Note").':
'; print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; -if (!empty($conf->societe->enabled)) { +if (isModEnabled("societe")) { print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; } print '
'; diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index ec6af9bc4f6..64968b1a516 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -15,7 +15,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ /** @@ -24,6 +23,8 @@ * \brief Setup page to configure oauth access api */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; @@ -62,7 +63,7 @@ if ($action == 'add') { // $provider is OAUTH_XXX setEventMessages($langs->trans("AOAuthEntryForThisProviderAndLabelAlreadyHasAKey"), null, 'errors'); $error++; } else { - dolibarr_set_const($db, $constname, 'ToComplete', 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, $constname, $langs->trans('ToComplete'), 'chaine', 0, '', $conf->entity); setEventMessages($langs->trans("OAuthProviderAdded"), null); } } @@ -78,9 +79,29 @@ if ($action == 'update') { if (!dolibarr_set_const($db, $constvalue.'_SECRET', GETPOST($constvalue.'_ID') ? GETPOST($constvalue.'_SECRET') : '', 'chaine', 0, '', $conf->entity)) { $error++; } + if (GETPOSTISSET($constvalue.'_URLAUTHORIZE')) { + if (!dolibarr_set_const($db, $constvalue.'_URLAUTHORIZE', GETPOST($constvalue.'_URLAUTHORIZE'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if (GETPOSTISSET($constvalue.'_SCOPE')) { + if (is_array(GETPOST($constvalue.'_SCOPE'))) { + $scopestring = implode(',', GETPOST($constvalue.'_SCOPE')); + } else { + $scopestring = GETPOST($constvalue.'_SCOPE'); + } + if (!dolibarr_set_const($db, $constvalue.'_SCOPE', $scopestring, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } else { + if (!dolibarr_set_const($db, $constvalue.'_SCOPE', '', 'chaine', 0, '', $conf->entity)) { + $error++; + } + } } } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null); } else { @@ -88,6 +109,48 @@ if ($action == 'update') { } } +if ($action == 'confirm_delete') { + $provider = GETPOST('provider', 'aZ09'); + $label = GETPOST('label'); + + $globalkey = empty($provider) ? $label : $label.'-'.$provider; + + if (getDolGlobalString($globalkey.'_ID') && getDolGlobalString($globalkey.'_SECRET')) { // If ID and secret exist, we delete first the token + $backtourl = DOL_URL_ROOT.'/admin/oauth.php?action=delete_entry&provider='.$provider.'&label='.$label.'&token='.newToken(); + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; + $callbacktodel = $urlwithroot; + if ($label == 'OAUTH_GOOGLE') { + $callbacktodel .= '/core/modules/oauth/google_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); + } elseif ($label == 'OAUTH_GITHUB') { + $callbacktodel .= '/core/modules/oauth/github_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); + } elseif ($label == 'OAUTH_STRIPE_LIVE') { + $callbacktodel .= '/core/modules/oauth/stripelive_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); + } elseif ($label == 'OAUTH_STRIPE_TEST') { + $callbacktodel .= '/core/modules/oauth/stripetest_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); + } elseif ($label == 'OAUTH_OTHER') { + $callbacktodel .= '/core/modules/oauth/generic_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); + } + header("Location: ".$callbacktodel); + exit; + } else { + $action = 'delete_entry'; + } +} + +if ($action == 'delete_entry') { + $provider = GETPOST('provider', 'aZ09'); + $label = GETPOST('label'); + + $globalkey = empty($provider) ? $label : $label.'-'.$provider; + + if (!dolibarr_del_const($db, $globalkey.'_NAME', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_ID', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_SECRET', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_URLAUTHORIZE', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_SCOPE', $conf->entity)) { + setEventMessages($langs->trans("ErrorInEntryDeletion"), null, 'errors'); + $error++; + } else { + setEventMessages($langs->trans("EntryDeleted"), null); + } +} /* * View @@ -96,6 +159,13 @@ if ($action == 'update') { llxHeader(); $form = new Form($db); +// Confirmation of action process +if ($action == 'delete') { + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?provider='.GETPOST('provider').'&label='.GETPOST('label'), $langs->trans('OAuthServiceConfirmDeleteTitle'), $langs->trans('OAuthServiceConfirmDeleteMessage'), 'confirm_delete', $formquestion, 0, 1, 220); + print $formconfirm; +} + $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup'); @@ -132,19 +202,26 @@ print ''; print ajax_combobox('provider'); print ' '; print ' '; -print ''; print '
'; print '
'; print dol_get_fiche_end(); +print ''; -//var_dump($list); +$listinsetup = []; +// Define $listinsetup foreach ($conf->global as $key => $val) { if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { $provider = preg_replace('/_ID$/', '', $key); - $listinsetup[] = array($provider.'_NAME', $provider.'_ID', $provider.'_SECRET', 'OAUTH Provider '.str_replace('OAUTH_', '', $provider)); + $listinsetup[] = array( + $provider.'_NAME', + $provider.'_ID', + $provider.'_SECRET', + $provider.'_URLAUTHORIZE', // For custom oauth links + $provider.'_SCOPE' // For custom oauth links + ); } } @@ -155,7 +232,6 @@ if (count($listinsetup) > 0) { print ''; print '
'; - print ''; $i = 0; @@ -182,12 +258,18 @@ if (count($listinsetup) > 0) { $i++; - print ''; - // Api Name + print '
'; + + // OAUTH service name $label = $langs->trans($keyforsupportedoauth2array); - print ''; + print ''; + + // Delete + print ''; + print ''; if ($supported) { $redirect_uri = $urlwithroot.'/core/modules/oauth/'.$supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'].'_oauthcallback.php'; print ''; print ''; - print ''; + print ''; + print ''; + print ''; + + if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { + print ''; + print ''; + print ''; + print ''; + print ''; + } } else { print ''; print ''; print ''; - print ''; + print ''; + print ''; + print ''; } // Api Id print ''; print ''; - print ''; + print ''; + print ''; + print ''; // Api Secret print ''; print ''; - print ''; + print ''; + print ''; + print ''; + + // TODO Move this into token generation ? + if ($supported) { + if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { + print ''; + print ''; + print ''; + print ''; + print ''; + } else { + $availablescopes = array_flip(explode(',', $supportedoauth2array[$keyforsupportedoauth2array]['availablescopes'])); + $currentscopes = explode(',', getDolGlobalString($key[4])); + $scopestodispay = array(); + foreach ($availablescopes as $keyscope => $valscope) { + if (in_array($keyscope, $currentscopes)) { + $scopestodispay[$keyscope] = 1; + } else { + $scopestodispay[$keyscope] = 0; + } + } + // Api Scope + print ''; + print ''; + print ''; + print ''; + print ''; + } + } else { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + print '
'; + print '
'; print img_picto('', $supportedoauth2array[$keyforsupportedoauth2array]['picto'], 'class="pictofixedwidth"'); - print $label; + if ($label == $keyforsupportedoauth2array) { + print $supportedoauth2array[$keyforsupportedoauth2array]['name']; + } else { + print $label; + } if ($keyforprovider) { print ' ('.$keyforprovider.')'; } else { @@ -199,35 +281,108 @@ if (count($listinsetup) > 0) { print $langs->trans("OAUTH_URL_FOR_CREDENTIAL", $supportedoauth2array[$keyforsupportedoauth2array]['urlforcredentials']); } print ''; + $label = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); + print ''; + print img_picto('', 'delete'); + print ''; + + print ''; + print '
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; - print '
'; + print '
'.$langs->trans("URLOfServiceForAuthorization").''; + print '
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''.$langs->trans("FeatureNotYetSupported").'
'; - print '
'; + print '
'; - print '
'; + print '
'.$langs->trans("Scopes").''; + print ''; + print '
'.$langs->trans("Scopes").''; + foreach ($scopestodispay as $scope => $val) { + print ''; + print ''; + } + print '
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''.$langs->trans("FeatureNotYetSupported").'
'."\n"; + + print '
'; } - print ''."\n"; print '
'; print $form->buttonsSaveCancel("Modify", ''); diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index c157a21caff..f798995d525 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -23,6 +23,7 @@ * \brief Setup page to configure oauth access to login information */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; // This define $list and $supportedoauth2array @@ -138,11 +139,17 @@ if (GETPOST('error')) { if ($mode == 'setup' && $user->admin) { print ''.$langs->trans("OAuthSetupForLogin")."

\n"; - //var_dump($list); + // Define $listinsetup foreach ($conf->global as $key => $val) { if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { $provider = preg_replace('/_ID$/', '', $key); - $listinsetup[] = array($provider.'_NAME', $provider.'_ID', $provider.'_SECRET', 'OAUTH Provider '.str_replace('OAUTH_', '', $provider)); + $listinsetup[] = array( + $provider.'_NAME', + $provider.'_ID', + $provider.'_SECRET', + $provider.'_URLAUTHORIZE', // For custom oauth links + $provider.'_SCOPE' // For custom oauth links + ); } } @@ -165,46 +172,39 @@ if ($mode == 'setup' && $user->admin) { $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); - // Define $shortscope, $urltorenew, $urltodelete, $urltocheckperms + $shortscope = ''; + if (getDolGlobalString($key[4])) { + $shortscope = getDolGlobalString($key[4]); + } + $state = $shortscope; // TODO USe a better state + + // Define $urltorenew, $urltodelete, $urltocheckperms // TODO Use array $supportedoauth2array if ($keyforsupportedoauth2array == 'OAUTH_GITHUB_NAME') { // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). // We pass this param list in to 'state' because we need it before and after the redirect. - $shortscope = 'user,public_repo'; - // Note: github does not accept csrf key inside the state parameter (only know values) - $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + // Note: github does not accept csrf key inside the state parameter (only known values) + $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://github.com/settings/applications/'; } elseif ($keyforsupportedoauth2array == 'OAUTH_GOOGLE_NAME') { // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). // List of scopes for Google are here: https://developers.google.com/identity/protocols/oauth2/scopes // We pass this key list into the param 'state' because we need it before and after the redirect. - $shortscope = 'userinfo_email,userinfo_profile'; - $shortscope .= ',openid,email,profile'; // For openid connect - if (!empty($conf->printing->enabled)) { - $shortscope .= ',cloud_print'; - } - if (!empty($conf->global->OAUTH_GOOGLE_GSUITE)) { - $shortscope .= ',admin_directory_user'; - } - if (!empty($conf->global->OAUTH_GOOGLE_GMAIL)) { - $shortscope.=',gmail_full'; - } - - $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'-'.$oauthstateanticsrf.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'-'.$oauthstateanticsrf.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://security.google.com/settings/security/permissions'; } elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_TEST_NAME') { - $shortscope = 'none'; - - $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; } elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_LIVE_NAME') { - $shortscope = 'none'; - - $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = ''; + $urltocheckperms = ''; + } elseif ($keyforsupportedoauth2array = 'OAUTH_OTHER_NAME') { + $urltorenew = $urlwithroot.'/core/modules/oauth/generic_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode($state).'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; } else { @@ -212,7 +212,8 @@ if ($mode == 'setup' && $user->admin) { $urltodelete = ''; $urltocheckperms = ''; } - $urltorenew .= '&keyforprovider='.$keyforprovider; + + $urltorenew .= '&keyforprovider='.urlencode($keyforprovider); // Show value of token $tokenobj = null; @@ -245,7 +246,7 @@ if ($mode == 'setup' && $user->admin) { } elseif ($endoflife == $tokenobj::EOL_UNKNOWN) { $expiredat = $langs->trans("Unknown"); } else { - $expiredat = dol_print_date($endoflife, "dayhour"); + $expiredat = dol_print_date($endoflife, "dayhour", 'tzuserrel'); } } } @@ -259,10 +260,16 @@ if ($mode == 'setup' && $user->admin) { print '
'; print ''."\n"; + // Api Name + $label = $langs->trans($keyforsupportedoauth2array); print ''; print '\n"; print ''; - print ''; + print ''; //var_dump($key); print $langs->trans("OAuthIDSecret").''; print ''; print ''."\n"; + // Scopes print ''; - print ''; + print ''; + print ''; + + print ''; + print ''; //var_dump($key); print $langs->trans("IsTokenGenerated"); print ''; print ''; print ''; - print ''; + print ''; //var_dump($key); print $langs->trans("Token").''; print ''; - print ''; + print ''; //var_dump($key); print $langs->trans("TOKEN_EXPIRED"); print ''; @@ -358,7 +375,7 @@ if ($mode == 'setup' && $user->admin) { // Token expired at print ''; - print ''; + print ''; //var_dump($key); print $langs->trans("TOKEN_EXPIRE_AT"); print ''; @@ -377,8 +394,8 @@ if ($mode == 'setup' && $user->admin) { } } - print ''; + print '
'; } } diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index b18ebd0c05f..c31e2162156 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -21,6 +21,7 @@ * \brief Setup page to configure opening hours */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index b66f004295d..8ebbce2cc4d 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of order */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -85,14 +86,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 3f8102d076a..e9c0947d6a2 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -27,6 +27,7 @@ * \brief Page to setup extra fields of order */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -86,14 +87,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 089ddbafd23..59da712b266 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -22,6 +22,7 @@ * \brief Page to setup invoices payments */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 997c71bb335..f86f6d5c27f 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -25,6 +25,7 @@ * \brief Page to setup payments by credit transfer */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -378,7 +379,7 @@ print '
'; */ /* Disable this, there is no trigger with elementtype 'withdraw' -if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) +if (!empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $langs->load("mails"); print load_fiche_titre($langs->trans("Notifications")); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index b95f73a399f..d8cc8d554a2 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012-2107 Juanjo Menent * Copyright (C) 2019 Ferran Marcet @@ -25,6 +25,7 @@ * \brief Page to setup PDF options */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; @@ -108,7 +109,7 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", GETPOST("MAIN_TVAINTRA_NOT_IN_ADDRESS"), 'chaine', 0, '', $conf->entity); } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { if (GETPOST('PDF_SHOW_PROJECT_REF_OR_LABEL') == 'no') { dolibarr_del_const($db, "PDF_SHOW_PROJECT", $conf->entity); dolibarr_del_const($db, "PDF_SHOW_PROJECT_TITLE", $conf->entity); @@ -166,10 +167,13 @@ if ($action == 'update') { dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity); } + if (GETPOSTISSET('DOC_SHOW_FIRST_SALES_REP')) { + dolibarr_set_const($db, "DOC_SHOW_FIRST_SALES_REP", GETPOST('DOC_SHOW_FIRST_SALES_REP', 'alpha'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) { dolibarr_set_const($db, "PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", GETPOST('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME', 'alpha'), 'chaine', 0, '', $conf->entity); } - if (GETPOSTISSET('PDF_USE_A')) { dolibarr_set_const($db, "PDF_USE_A", GETPOST('PDF_USE_A', 'alpha'), 'chaine', 0, '', $conf->entity); } @@ -286,16 +290,16 @@ print $formadmin->select_paper_format($selected, 'MAIN_PDF_FORMAT'); print '
'; print ''; print ''; print ''; print ''; print '
'; print img_picto('', $supportedoauth2array[$keyforsupportedoauth2array]['picto'], 'class="pictofixedwidth"'); - print $langs->trans($keyforsupportedoauth2array); + if ($label == $keyforsupportedoauth2array) { + print $supportedoauth2array[$keyforsupportedoauth2array]['name']; + } else { + print $label; + } if ($keyforprovider) { print ' ('.$keyforprovider.')'; } else { @@ -274,7 +281,7 @@ if ($mode == 'setup' && $user->admin) { print "
'; @@ -284,14 +291,22 @@ if ($mode == 'setup' && $user->admin) { print '
'.$langs->trans("Scopes").''; + $currentscopes = getDolGlobalString($key[4]); + print $currentscopes; + print '
'; if (is_object($tokenobj)) { - print $langs->trans("HasAccessToken"); + print $form->textwithpicto(yn(1), $langs->trans("HasAccessToken").' : '.dol_print_date($storage->date_modification, 'dayhour').' state='.dol_escape_htmltag($storage->state)); } else { print ''.$langs->trans("NoAccessToken").''; } @@ -304,7 +319,9 @@ if ($mode == 'setup' && $user->admin) { } // Request remote token if ($urltorenew) { - print ''.$langs->trans('RequestAccess').'
'; + print ''.$langs->trans('GetAccess').''; + print $form->textwithpicto('', $langs->trans('RequestAccess')); + print '
'; } // Check remote access if ($urltocheckperms) { @@ -314,7 +331,7 @@ if ($mode == 'setup' && $user->admin) { print '
'; @@ -322,7 +339,7 @@ if ($mode == 'setup' && $user->admin) { if (is_object($tokenobj)) { //var_dump($tokenobj); $tokentoshow = $tokenobj->getAccessToken(); - print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'
'; + print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'
'; //print 'Refresh: '.$tokenobj->getRefreshToken().'
'; //print 'EndOfLife: '.$tokenobj->getEndOfLife().'
'; //var_dump($tokenobj->getExtraParams()); @@ -347,7 +364,7 @@ if ($mode == 'setup' && $user->admin) { // Token expired print '
'.$langs->trans("MAIN_PDF_MARGIN_LEFT").''; -print ''; +print ''; print '
'.$langs->trans("MAIN_PDF_MARGIN_RIGHT").''; -print ''; +print ''; print '
'.$langs->trans("MAIN_PDF_MARGIN_TOP").''; -print ''; +print ''; print '
'.$langs->trans("MAIN_PDF_MARGIN_BOTTOM").''; -print ''; +print ''; print '
'; @@ -309,7 +313,7 @@ print load_fiche_titre($langs->trans("PDFAddressForging"), '', ''); print '
'; print ''; -print ''; +print ''; // Show sender name @@ -373,6 +377,7 @@ if ($conf->use_javascript_ajax) { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("MAIN_PDF_NO_RECIPENT_FRAME", $arrval, $conf->global->MAIN_PDF_NO_RECIPENT_FRAME); } +print ''; //Invert sender and recipient @@ -394,6 +399,13 @@ if ($conf->use_javascript_ajax) { } print ''; +// Show alias in thirdparty name +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").'
'.$langs->trans("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").''; +if ($conf->use_javascript_ajax) { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("THIRDPARTY_ALIAS"), '2' => $langs->trans("ALIAS_THIRDPARTY")); + print $form->selectarray("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval, getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')); +} + print '
'; print '
'; @@ -438,7 +450,7 @@ if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) { print load_fiche_titre($title, '', ''); print ''; -print ''; +print ''; // Hide any information on Sale tax / VAT @@ -458,22 +470,20 @@ print '
'; // Other + print load_fiche_titre($langs->trans("Other"), '', ''); print '
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").'
'; -print ''; +print ''; // Use 2 languages into PDF -print ''; // Height of logo @@ -482,7 +492,7 @@ print ''; // Show project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { print 'selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS : 0)); print ''; -// Show alias in thirdparty name +// Show the first sales representative -/* Disabled because not yet completely implemented (does not work when we force a contact on object) -print ''; print ''; @@ -524,8 +525,8 @@ print "\n"; print ''; print ""; print ""; print ''; print ""; print "'; +print ''; + + + // default update prices on cloning a proposal /* print ''; @@ -700,12 +710,12 @@ print "\n"; print ''; /* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation. -if ($conf->banque->enabled) +if (isModEnabled('facture')) { print ''; print ''; print ''; +$tabConf = explode(";", getDolGlobalString('USER_PASSWORD_PATTERN')); + foreach ($arrayhandler as $key => $module) { // Show modules according to features level if (!empty($module->version) && $module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { @@ -240,15 +232,16 @@ foreach ($arrayhandler as $key => $module) { } if ($module->isEnabled()) { - print ''; // Show example of numbering module - print ''."\n"; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").''; -//if (! empty($conf->global->MAIN_MULTILANGS)) - //{ +print '
'; +print $form->textwithpicto($langs->trans("PDFIn2Languages"), $langs->trans("PDF_USE_ALSO_LANGUAGE_CODE")); +print ''; $selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0); print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1); -//} else { -// print ''.$langs->trans("MultiLangNotEnabled").''; -//} print '
'.$langs->trans("PDF_SHOW_PROJECT").''; $tmparray = array('no' => 'No', 'showprojectref' => 'RefProject', 'showprojectlabel' => 'ShowProjectLabel'); $showprojectref = empty($conf->global->PDF_SHOW_PROJECT) ? (empty($conf->global->PDF_SHOW_PROJECT_TITLE) ? 'no' : 'showprojectlabel') : 'showprojectref'; @@ -568,15 +578,17 @@ print '
'.$langs->trans("ShowDetailsInPDFPageFoot").'
'.$langs->trans("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").''; +print '
'.$langs->trans("DOC_SHOW_FIRST_SALES_REP"); +print ' ('.$langs->trans("SalesRepresentativeInfo").')'; +print ''; if ($conf->use_javascript_ajax) { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("THIRDPARTY_ALIAS"), '2' => $langs->trans("ALIAS_THIRDPARTY")); - print $form->selectarray("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval, getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')); + print ajax_constantonoff('DOC_SHOW_FIRST_SALES_REP'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("DOC_SHOW_FIRST_SALES_REP", $arrval, $conf->global->DOC_SHOW_FIRST_SALES_REP); } -*/ // Show online payment link on invoices diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index b064cbb8cd8..e5c76a36269 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012-2107 Juanjo Menent * Copyright (C) 2019 Ferran Marcet - * Copyright (C) 2021 Anthony Berton + * Copyright (C) 2021-2022 Anthony Berton * * 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 @@ -25,6 +25,7 @@ * \brief Page to setup PDF options */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; @@ -68,6 +69,10 @@ if ($action == 'update') { dolibarr_set_const($db, "INVOICE_ADD_SWISS_QR_CODE", GETPOST("INVOICE_ADD_SWISS_QR_CODE", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_del_const($db, "INVOICE_ADD_ZATCA_QR_CODE", $conf->entity); } + if (GETPOSTISSET('INVOICE_SHOW_SHIPPING_ADDRESS')) { + dolibarr_set_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", GETPOST("INVOICE_SHOW_SHIPPING_ADDRESS", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_del_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", $conf->entity); + } setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -102,8 +107,8 @@ print '
'; print ''; print ''; -if (!empty($conf->propal->enabled)) { - print load_fiche_titre($langs->trans("Proposal"), '', ''); +if (isModEnabled('propal')) { + print load_fiche_titre($langs->trans("Proposal"), '', 'proposal'); print '
'; print ''; @@ -126,7 +131,7 @@ if (!empty($conf->propal->enabled)) { if (isModEnabled('facture')) { - print load_fiche_titre($langs->trans("Invoices"), '', ''); + print load_fiche_titre($langs->trans("Invoices"), '', 'bill'); print '
'; print '
'; @@ -154,21 +159,57 @@ if (isModEnabled('facture')) { } print ''; - /* - print ''; - */ + print $form->selectarray("INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS); + } + print ''; print '
'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'); - } else { + print '
'; + print $form->textwithpicto($langs->trans("INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans("INVOICE_SHOW_SHIPPING_ADDRESSMore")); + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('INVOICE_SHOW_SHIPPING_ADDRESS'); + } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING); - } - print '
'; print '
'; } + + +if (isModEnabled('reception')) { + print load_fiche_titre($langs->trans("Receptions"), '', 'reception'); + + print '
'; + print ''; + print ''; + + print ''; + + print ''; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $langs->trans("RECEPTION_PDF_HIDE_ORDERED"); + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('RECEPTION_PDF_HIDE_ORDERED'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("RECEPTION_PDF_HIDE_ORDERED", $arrval, $conf->global->RECEPTION_PDF_HIDE_ORDERED); + } + print '
'; + print $langs->trans("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT"); + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval, $conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT); + } + print '
'; + print '
'; +} + + print '
'; print ''; print '
'; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index d2f0d79e4f3..ef20ab6e205 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -24,6 +24,7 @@ * \brief Page to setup default permissions of a new user */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 88a02e90457..0dad5e887eb 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -25,6 +25,7 @@ * \brief Page to setup Withdrawals */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -392,7 +393,7 @@ print '
'; */ /* Disable this, there is no trigger with elementtype 'withdraw' -if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) +if (!empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $langs->load("mails"); print load_fiche_titre($langs->trans("Notifications")); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index c324f33ba92..7883cc7da20 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -28,6 +28,7 @@ * \brief Setup page for commercial proposal module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -515,7 +516,7 @@ print '
'; print ''; print $langs->trans("PaymentMode").''; -if (empty($conf->facture->enabled)) { +if (!isModEnabled('facture')) { print ''; } print '
".$langs->trans("SuggestPaymentByRIBOnAccount").""; -if (empty($conf->facture->enabled)) { - if (!empty($conf->banque->enabled)) { +if (!isModEnabled('facture')) { + if (isModEnabled("banque")) { $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE clos = 0"; @@ -563,7 +564,7 @@ print "
".$langs->trans("SuggestPaymentByChequeToAddress").""; -if (empty($conf->facture->enabled)) { +if (!isModEnabled('facture')) { print ''; +print ''.$langs->trans("AllowExternalDownload").''; +print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1); +print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; - if (! empty($conf->use_javascript_ajax)) + if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL'); } diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 2c3a2629a76..f2103d0c97d 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -22,6 +22,7 @@ * \brief Page setup proxy to use for external web access */ +// Load Dolibarr environment 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'; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 53f0cd9f7f0..a8ae4501ca5 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -24,6 +24,7 @@ * \brief Page to setup receipt printer */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php index aa83fca230c..bf87698e5d8 100644 --- a/htdocs/admin/reception_extrafields.php +++ b/htdocs/admin/reception_extrafields.php @@ -28,6 +28,7 @@ * \brief Page to setup extra fields of reception */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -91,14 +92,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - - // Creation of an optional field if ($action == 'create') { print "
"; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 5479b43f6ca..c86db66e464 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -21,6 +21,7 @@ * \brief Page to setup reception module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; @@ -47,7 +48,7 @@ $type = 'reception'; * Actions */ -if (!empty($conf->reception->enabled) && empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { +if (isModEnabled('reception') && empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { // This option should always be set to on when module is on. dolibarr_set_const($db, "MAIN_SUBMODULE_RECEPTION", "1", 'chaine', 0, '', $conf->entity); } @@ -237,7 +238,7 @@ foreach ($dirmodels as $reldir) { if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { - print 'scandir.'&label='.urlencode($module->name).'">'; + print 'scandir) ? '&scan_dir='.$module->scandir : '').(!empty($module->name) ? '&label='.urlencode($module->name) : '').'">'; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -344,10 +345,10 @@ foreach ($dirmodels as $reldir) { $module = new $classname($db); $modulequalified = 1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + if (isset($module->version) && $module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { $modulequalified = 0; } - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + if (isset($module->version) && $module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { $modulequalified = 0; } diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 1d3e29c9cd4..9b421a17a6d 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -22,6 +22,7 @@ * \brief Setup page to configure resource module */ +// Load Dolibarr environment require '../main.inc.php'; // Class diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index 068ae6f02d1..62c1c4cfed2 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -25,6 +25,7 @@ * \brief Page to setup extra fields of resource */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -84,13 +85,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 2c2444cd473..33344363cf7 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2013-2015 Juanjo Menent * @@ -23,6 +23,7 @@ * \brief Page de configuration du module securite */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -47,9 +48,6 @@ $allow_disable_encryption = true; if ($action == 'setgeneraterule') { if (!dolibarr_set_const($db, 'USER_PASSWORD_GENERATED', GETPOST("value", "alphanohtml"), 'chaine', 0, '', $conf->entity)) { dol_print_error($db); - } else { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; } } @@ -98,8 +96,6 @@ if ($action == 'activate_encrypt') { //exit; if (!$error) { $db->commit(); - header("Location: security.php"); - exit; } else { $db->rollback(); dol_print_error($db, ''); @@ -110,8 +106,6 @@ if ($action == 'activate_encrypt') { if ($allow_disable_encryption) { dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", $conf->entity); } - header("Location: security.php"); - exit; } if ($action == 'activate_encryptdbpassconf') { @@ -142,12 +136,8 @@ if ($action == 'activate_encryptdbpassconf') { if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_set_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", '1', 'chaine', 0, '', $conf->entity); - header("Location: security.php"); - exit; } elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", $conf->entity); - header("Location: security.php"); - exit; } if ($action == 'updatepattern') { @@ -230,6 +220,8 @@ print '
'.$langs->trans("Example").''.$langs->trans("Activated").'
'; + print '
'; + print img_picto('', $module->picto, 'class="width25 size15x"').' '; print ucfirst($key); print "\n"; print $module->getDescription().'
'; - print $langs->trans("MinLength").': '.$module->length; + print $langs->trans("MinLength").': '.$module->length.''; print '
'; + print ''; $tmp = $module->getExample(); if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); @@ -260,7 +253,7 @@ foreach ($arrayhandler as $key => $module) { } print ''; + print ''; if ($conf->global->USER_PASSWORD_GENERATED == $key) { //print img_picto('', 'tick'); print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -278,10 +271,9 @@ print ''; print ''; -//if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1) -// Patter for Password Perso + +// Pattern for Password Perso if ($conf->global->USER_PASSWORD_GENERATED == "Perso") { - $tabConf = explode(";", $conf->global->USER_PASSWORD_PATTERN); print '
'; print '
'; @@ -328,10 +320,10 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso") { print '
'; - print '
'; print '
'; print ''.$langs->trans("Save").''; print '
'; + print '

'; print ''; + +print '
'; + $morehtmlcenter = ''; $MAXEVENT = 10; $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/asset/agenda.php?id='.$object->id); @@ -413,7 +415,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlcenter); print '
'; } diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index d144d95819b..7c2b55c045e 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -195,7 +195,7 @@ class Asset extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -652,6 +652,8 @@ class Asset extends CommonObject return -1; } + // Old request with 'WITH' + /* $sql = "WITH in_accounting_bookkeeping(fk_docdet) AS ("; $sql .= " SELECT DISTINCT fk_docdet"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; @@ -663,6 +665,14 @@ class Asset extends CommonObject $sql .= " LEFT JOIN in_accounting_bookkeeping as iab ON iab.fk_docdet = ad.rowid"; $sql .= " WHERE ad.fk_asset = " . (int) $this->id; $sql .= " ORDER BY ad.depreciation_date ASC"; + */ + + $sql = "SELECT ad.rowid, ad.depreciation_mode, ad.ref, ad.depreciation_date, ad.depreciation_ht, ad.cumulative_depreciation_ht"; + $sql .= ", " . $this->db->ifsql('iab.fk_docdet IS NOT NULL', 1, 0) . " AS bookkeeping"; + $sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad"; + $sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid"; + $sql .= " WHERE ad.fk_asset = " . (int) $this->id; + $sql .= " ORDER BY ad.depreciation_date ASC"; $resql = $this->db->query($sql); if (!$resql) { @@ -708,6 +718,8 @@ class Asset extends CommonObject return -1; } + // Old request with 'WITH' + /* $sql = "WITH in_accounting_bookkeeping(fk_docdet) AS ("; $sql .= " SELECT DISTINCT fk_docdet"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; @@ -718,6 +730,13 @@ class Asset extends CommonObject $sql .= " LEFT JOIN in_accounting_bookkeeping as iab ON iab.fk_docdet = ad.rowid"; $sql .= " WHERE ad.fk_asset = " . (int) $this->id; $sql .= " AND iab.fk_docdet IS NOT NULL"; + */ + + $sql = "SELECT COUNT(*) AS has_bookkeeping"; + $sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad"; + $sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid"; + $sql .= " WHERE ad.fk_asset = " . (int) $this->id; + $sql .= " AND iab.fk_docdet IS NOT NULL"; $resql = $this->db->query($sql); if (!$resql) { @@ -866,6 +885,9 @@ class Asset extends CommonObject foreach ($options->deprecation_options as $mode_key => $fields) { // Get last depreciation lines save in bookkeeping //----------------------------------------------------- + + // Old request with 'WITH' + /* $sql = "WITH in_accounting_bookkeeping(fk_docdet) AS ("; $sql .= " SELECT fk_docdet"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; @@ -879,6 +901,17 @@ class Asset extends CommonObject $sql .= " AND iab.fk_docdet IS NOT NULL"; $sql .= " ORDER BY ad.depreciation_date DESC"; $sql .= " LIMIT 1"; + */ + + $sql = "SELECT ad.depreciation_date, ad.cumulative_depreciation_ht"; + $sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad"; + $sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid"; + $sql .= " WHERE ad.fk_asset = " . (int) $this->id; + $sql .= " AND ad.depreciation_mode = '" . $this->db->escape($mode_key) . "'"; + $sql .= " AND iab.fk_docdet IS NOT NULL"; + $sql .= " ORDER BY ad.depreciation_date DESC"; + $sql .= " LIMIT 1"; + $resql = $this->db->query($sql); if (!$resql) { $this->errors[] = $langs->trans('AssetErrorFetchMaxDepreciationDateForMode', $mode_key) . ': ' . $this->db->lasterror(); @@ -1171,10 +1204,10 @@ class Asset extends CommonObject global $hidedetails, $hidedesc, $hideref; $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $this->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1234,10 +1267,10 @@ class Asset extends CommonObject global $hidedetails, $hidedesc, $hideref; $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $this->thirdparty->default_lang; } if (!empty($newlang)) { diff --git a/htdocs/asset/class/assetdepreciationoptions.class.php b/htdocs/asset/class/assetdepreciationoptions.class.php index ce2ddd73c08..49efadca869 100644 --- a/htdocs/asset/class/assetdepreciationoptions.class.php +++ b/htdocs/asset/class/assetdepreciationoptions.class.php @@ -163,8 +163,8 @@ class AssetDepreciationOptions extends CommonObject } // Unset required option (notnull) if field disabled - if (!empty($mode_info['enabled_field'])) { - $info = explode(':', $mode_info['enabled_field']); + if (!empty($field_info['enabled_field'])) { + $info = explode(':', $field_info['enabled_field']); if ($this->deprecation_options[$info[0]][$info[1]] != $info[2] && isset($this->fields[$field_key]['notnull'])) { unset($this->fields[$field_key]['notnull']); } diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 6b75702278d..fb574e6ea18 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -160,7 +160,7 @@ class AssetModel extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } diff --git a/htdocs/asset/depreciation.php b/htdocs/asset/depreciation.php index 8f3547d81fb..eae2ff45e2b 100644 --- a/htdocs/asset/depreciation.php +++ b/htdocs/asset/depreciation.php @@ -22,6 +22,7 @@ * \brief Card with depreciation on Asset */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; @@ -56,7 +57,7 @@ if ($id > 0 || !empty($ref)) { if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!empty($object->not_depreciated)) accessforbidden(); $object->asset_depreciation_options = &$assetdepreciationoptions; diff --git a/htdocs/asset/depreciation_options.php b/htdocs/asset/depreciation_options.php index ba5719705dc..f4558ae6157 100644 --- a/htdocs/asset/depreciation_options.php +++ b/htdocs/asset/depreciation_options.php @@ -22,6 +22,7 @@ * \brief Card with depreciation options on Asset */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; @@ -58,7 +59,7 @@ $permissiontoadd = $user->rights->asset->write; // Used by the include of action if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!empty($object->not_depreciated)) accessforbidden(); $object->asset_depreciation_options = &$assetdepreciationoptions; diff --git a/htdocs/asset/disposal.php b/htdocs/asset/disposal.php index 7fddb92b05f..0f1b71e1929 100644 --- a/htdocs/asset/disposal.php +++ b/htdocs/asset/disposal.php @@ -22,6 +22,7 @@ * \brief Card with disposal info on Asset */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; @@ -57,7 +58,7 @@ $permissiontoadd = $user->rights->asset->write; // Used by the include of action if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!isset($object->disposal_date) || $object->disposal_date === "") accessforbidden(); diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index 96b222b26c1..ee5f7845aed 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -22,6 +22,7 @@ * \brief Page for attached files on assets */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; @@ -78,7 +79,7 @@ $permissiontoadd = $user->rights->asset->asset->write; // Used by the include of if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); /* diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index c475e22fc83..1ddfd2a1c82 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -125,7 +125,7 @@ $permissiontoadd = $user->rights->asset->write; $permissiontodelete = $user->rights->asset->delete; // Security check -if (empty($conf->asset->enabled)) { +if (!isModEnabled('asset')) { accessforbidden('Module not enabled'); } @@ -134,7 +134,7 @@ if ($user->socid > 0) accessforbidden(); $socid = 0; if ($user->socid > 0) $socid = $user->socid; $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); @@ -216,6 +216,9 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; @@ -297,21 +300,18 @@ $sql .= !empty($hookmanager->resPrint) ? (" HAVING 1=1 " . $hookmanager->resPrin // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - /* This old and fast method to get and count full list returns all record so use a high amount of memory. - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - */ - /* The slow method does not consume memory on mysql (not tested on pgsql) */ - /*$resql = $db->query($sql, 0, 'auto', 1); - while ($db->fetch_object($resql)) { - $nbtotalofrecords++; - }*/ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-z0-9\._\s\(\),]+FROM/i', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); $resql = $db->query($sqlforcount); - $objforcount = $db->fetch_object($resql); - $nbtotalofrecords = $objforcount->nbtotalofrecords; - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } diff --git a/htdocs/asset/model/accountancy_codes.php b/htdocs/asset/model/accountancy_codes.php index 7582b61177e..b39a72bb7a3 100644 --- a/htdocs/asset/model/accountancy_codes.php +++ b/htdocs/asset/model/accountancy_codes.php @@ -22,6 +22,7 @@ * \brief Card with accountancy code on Asset Model */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; @@ -59,7 +60,7 @@ $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rig if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); $result = $assetaccountancycodes->fetchAccountancyCodes(0, $object->id); diff --git a/htdocs/asset/model/agenda.php b/htdocs/asset/model/agenda.php index f1db3030dc2..17fb19fe565 100644 --- a/htdocs/asset/model/agenda.php +++ b/htdocs/asset/model/agenda.php @@ -22,6 +22,7 @@ * \brief Tab of events on Asset Model */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; @@ -88,7 +89,7 @@ if ($user->socid > 0) accessforbidden(); if ($user->socid > 0) $socid = $user->socid; $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); @@ -125,11 +126,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = assetModelPrepareHead($object); diff --git a/htdocs/asset/model/card.php b/htdocs/asset/model/card.php index 3d3ec2f67d2..3eb75eded08 100644 --- a/htdocs/asset/model/card.php +++ b/htdocs/asset/model/card.php @@ -22,6 +22,7 @@ * \brief Page to create/edit/view asset Model */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; @@ -80,7 +81,7 @@ if ($user->socid > 0) accessforbidden(); if ($user->socid > 0) $socid = $user->socid; $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); diff --git a/htdocs/asset/model/depreciation_options.php b/htdocs/asset/model/depreciation_options.php index c34bd38dc46..e8519e581d9 100644 --- a/htdocs/asset/model/depreciation_options.php +++ b/htdocs/asset/model/depreciation_options.php @@ -22,6 +22,7 @@ * \brief Card with depreciation options on Asset Model */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; @@ -59,7 +60,7 @@ $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rig if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); $object->asset_depreciation_options = &$assetdepreciationoptions; diff --git a/htdocs/asset/model/list.php b/htdocs/asset/model/list.php index a55d5f49f9a..aa80b4e5426 100644 --- a/htdocs/asset/model/list.php +++ b/htdocs/asset/model/list.php @@ -126,7 +126,7 @@ $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rig $permissiontodelete = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->delete) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->asset->model_advance->delete))); // Security check -if (empty($conf->asset->enabled)) { +if (!isModEnabled('asset')) { accessforbidden('Module not enabled'); } @@ -140,7 +140,7 @@ if ($user->socid > 0) { } $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); if (!$permissiontoread) accessforbidden(); /* @@ -307,7 +307,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $db->num_rows($result); */ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-z0-9\._\s\(\),]+FROM/i', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^SELECT[a-z0-9\._\s\(\),]+FROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); $resql = $db->query($sqlforcount); if ($resql) { diff --git a/htdocs/asset/model/note.php b/htdocs/asset/model/note.php index 8c88feba449..52d7e13e777 100644 --- a/htdocs/asset/model/note.php +++ b/htdocs/asset/model/note.php @@ -22,6 +22,7 @@ * \brief Card with notes on Asset Model */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 8de86d49bb7..fd404a77447 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -22,6 +22,7 @@ * \brief Card with notes on Asset */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; @@ -57,7 +58,7 @@ $permissiontoadd = $user->rights->asset->write; // Used by the include of action if ($user->socid > 0) accessforbidden(); $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->asset->enabled)) accessforbidden(); +if (!isModEnabled('asset')) accessforbidden(); /* diff --git a/htdocs/asset/tpl/accountancy_codes_edit.tpl.php b/htdocs/asset/tpl/accountancy_codes_edit.tpl.php index bbd2b3d797c..fa01cbd59bc 100644 --- a/htdocs/asset/tpl/accountancy_codes_edit.tpl.php +++ b/htdocs/asset/tpl/accountancy_codes_edit.tpl.php @@ -34,7 +34,7 @@ if (!is_object($form)) { $form = new Form($db); } -if (!empty($conf->accounting->enabled) && !is_object($formaccounting)) { +if (isModEnabled('accounting') && !is_object($formaccounting)) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; $formaccounting = new FormAccounting($db); } @@ -66,7 +66,7 @@ if (empty($reshook)) { $html_name = $mode_key . '_' . $field_key; print '' . $langs->trans($field_info['label']) . ''; $accountancy_code = GETPOSTISSET($html_name) ? GETPOST($html_name, 'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] : ''); - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account($accountancy_code, $html_name, 1, null, 1, 1, 'minwidth150 maxwidth300', 1); } else { print ''; diff --git a/htdocs/asset/tpl/accountancy_codes_view.tpl.php b/htdocs/asset/tpl/accountancy_codes_view.tpl.php index 0d92ad8eb37..67993291359 100644 --- a/htdocs/asset/tpl/accountancy_codes_view.tpl.php +++ b/htdocs/asset/tpl/accountancy_codes_view.tpl.php @@ -50,7 +50,7 @@ if ($reshook < 0) { } if (empty($reshook)) { - if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; + if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) { //if (empty($object->enabled_modes[$mode_key])) continue; @@ -63,7 +63,7 @@ if (empty($reshook)) { print '' . $langs->trans($field_info['label']) . ''; if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) { $accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key]; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $accountancy_code, 1); diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index 7313fdfd2d5..2f5096f6436 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -34,9 +34,6 @@ if (!defined('NOREQUIRESOC')) { if (!defined('NOREQUIRETRAN')) { define('NOREQUIRETRAN', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', '1'); } @@ -75,7 +72,6 @@ function llxFooter() print "\n".''."\n"; } - require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 48ef2f8a2cd..8ce559031a1 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -22,6 +22,7 @@ * \brief Page to make mass init of barcode */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -36,7 +37,8 @@ $month = dol_print_date($now, '%m'); $day = dol_print_date($now, '%d'); $forbarcode = GETPOST('forbarcode'); $fk_barcode_type = GETPOST('fk_barcode_type'); -$eraseallbarcode = GETPOST('eraseallbarcode'); +$eraseallproductbarcode = GETPOST('eraseallproductbarcode'); +$eraseallthirdpartybarcode = GETPOST('eraseallthirdpartybarcode'); $action = GETPOST('action', 'aZ09'); @@ -44,14 +46,126 @@ $producttmp = new Product($db); $thirdpartytmp = new Societe($db); $modBarCodeProduct = ''; +$modBarCodeThirdparty = ''; $maxperinit = 1000; +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +if (!isModEnabled('barcode')) { + accessforbidden('Module not enabled'); +} +//restrictedArea($user, 'barcode'); +if (empty($user->admin)) { + accessforbidden('Must be admin'); +} + /* * Actions */ +// Define barcode template for third-party +if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM)) { + $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); + + foreach ($dirbarcodenum as $dirroot) { + $dir = dol_buildpath($dirroot, 0); + + $handle = @opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) { + $file = substr($file, 0, dol_strlen($file) - 4); + + try { + dol_include_once($dirroot.$file.'.php'); + } catch (Exception $e) { + dol_syslog($e->getMessage(), LOG_ERR); + } + + $modBarCodeThirdparty = new $file(); + break; + } + } + closedir($handle); + } + } +} + +if ($action == 'initbarcodethirdparties') { + if (!is_object($modBarCodeThirdparty)) { + $error++; + setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors'); + } + + if (!$error) { + $thirdpartystatic = new Societe($db); + + $db->begin(); + + $nbok = 0; + if (!empty($eraseallthirdpartybarcode)) { + $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; + $sql .= " SET barcode = NULL"; + $resql = $db->query($sql); + if ($resql) { + setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); + } else { + $error++; + dol_print_error($db); + } + } else { + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe"; + $sql .= " WHERE barcode IS NULL or barcode = ''"; + $sql .= $db->order("datec", "ASC"); + $sql .= $db->plimit($maxperinit); + + dol_syslog("codeinit", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + + $i = 0; $nbok = $nbtry = 0; + while ($i < min($num, $maxperinit)) { + $obj = $db->fetch_object($resql); + if ($obj) { + $thirdpartystatic->id = $obj->rowid; + $nextvalue = $modBarCodeThirdparty->getNextValue($thirdpartystatic, ''); + + $result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'THIRDPARTY_MODIFY'); + + $nbtry++; + if ($result > 0) { + $nbok++; + } + } + + $i++; + } + } else { + $error++; + dol_print_error($db); + } + + if (!$error) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } + } + + if (!$error) { + //$db->rollback(); + $db->commit(); + } else { + $db->rollback(); + } + } + + $action = ''; +} + // Define barcode template for products if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); @@ -92,7 +206,7 @@ if ($action == 'initbarcodeproducts') { $db->begin(); $nbok = 0; - if (!empty($eraseallbarcode)) { + if (!empty($eraseallproductbarcode)) { $sql = "UPDATE ".MAIN_DB_PREFIX."product"; $sql .= " SET barcode = NULL"; $resql = $db->query($sql); @@ -156,18 +270,10 @@ if ($action == 'initbarcodeproducts') { } - /* * View */ -if (!$user->admin) { - accessforbidden(); -} -if (empty($conf->barcode->enabled)) { - accessforbidden(); -} - $form = new Form($db); llxHeader('', $langs->trans("MassBarcodeInit")); @@ -181,16 +287,25 @@ print '
'; //print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'
'; //print '
'; -print '
'; -print ''; -print ''; -print ''; - print '
'; + + +// Example 1 : Adding jquery code +print ''; + + // For thirdparty if (isModEnabled('societe')) { - $nbno = $nbtotal = 0; + print ''; + print ''; + print ''; + print ''; + $nbthirdpartyno = $nbthirdpartytotal = 0; print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company'); @@ -199,7 +314,7 @@ if (isModEnabled('societe')) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbno = $obj->nb; + $nbthirdpartyno = $obj->nb; } else { dol_print_error($db); } @@ -208,30 +323,50 @@ if (isModEnabled('societe')) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbtotal = $obj->nb; + $nbthirdpartytotal = $obj->nb; } else { dol_print_error($db); } - print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ThirdParties")).'
'."\n"; + print $langs->trans("CurrentlyNWithoutBarCode", $nbthirdpartyno, $nbthirdpartytotal, $langs->transnoentitiesnoconv("ThirdParties"))."\n"; - print '
'; + $disabledthirdparty = $disabledthirdparty1 = 0; + + if (is_object($modBarCodeThirdparty)) { + print '
'.$langs->trans("BarCodeNumberManager").": "; + $objthirdparty = new Societe($db); + print ''.(isset($modBarCodeThirdparty->name) ? $modBarCodeThirdparty->name : $modBarCodeThirdparty->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeThirdparty->getNextValue($objthirdparty).'
'; + $disabledthirdparty = 0; + print '
'; + } else { + $disabledthirdparty = 1; + $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); + print '
'.$langs->trans("NoBarcodeNumberingTemplateDefined"); + print '
'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").''; + print '
'; + } + if (empty($nbthirdpartyno)) { + $disabledthirdparty1 = 1; + } + + $moretagsthirdparty1 = (($disabledthirdparty || $disabledthirdparty1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); + print '
'; + $moretagsthirdparty2 = (($nbthirdpartyno == $nbthirdpartytotal) ? ' disabled' : ''); + print '   '; + print ''; print '



'; + print '
'; } // For products -if ($conf->product->enabled || $conf->product->service) { - // Example 1 : Adding jquery code - print ''; +if (isModEnabled('product') || isModEnabled('service')) { + print '
'; + print ''; + print ''; + print ''; - $nbno = $nbtotal = 0; + $nbproductno = $nbproducttotal = 0; print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product'); print '
'."\n"; @@ -248,7 +383,7 @@ if ($conf->product->enabled || $conf->product->service) { $i = 0; while ($i < $num) { $obj = $db->fetch_object($resql); - $nbno += $obj->nb; + $nbproductno += $obj->nb; $i++; } @@ -260,37 +395,40 @@ if ($conf->product->enabled || $conf->product->service) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbtotal = $obj->nb; + $nbproducttotal = $obj->nb; } else { dol_print_error($db); } - print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices"))."\n"; + print $langs->trans("CurrentlyNWithoutBarCode", $nbproductno, $nbproducttotal, $langs->transnoentitiesnoconv("ProductsOrServices"))."\n"; + + $disabledproduct = $disabledproduct1 = 0; if (is_object($modBarCodeProduct)) { - print $langs->trans("BarCodeNumberManager").": "; + print '
'.$langs->trans("BarCodeNumberManager").": "; $objproduct = new Product($db); print ''.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeProduct->getNextValue($objproduct).'
'; - $disabled = 0; + $disabledproduct = 0; print '
'; } else { - $disabled = 1; + $disabledproduct = 1; $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); print '
'.$langs->trans("NoBarcodeNumberingTemplateDefined"); print '
'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").''; print '
'; } - if (empty($nbno)) { - $disabled1 = 1; + if (empty($nbproductno)) { + $disabledproduct1 = 1; } //print ' '.$langs->trans("ResetBarcodeForAllRecords").'
'; - $moretags1 = (($disabled || $disabled1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); - print ''; - $moretags2 = (($nbno == $nbtotal) ? ' disabled' : ''); + $moretagsproduct1 = (($disabledproduct || $disabledproduct1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); + print ''; + $moretagsproduct2 = (($nbproductno == $nbproducttotal) ? ' disabled' : ''); print '   '; - print ''; + print ''; print '



'; + print '
'; } @@ -300,7 +438,6 @@ print $langs->trans("ClickHereToGoTo").' : rights->produit->lire) || !empty($user->rights->service->lire) print ''; } -if (!empty($user->rights->societe->lire)) { +if ($user->hasRight('societe', 'lire')) { print ''; print '
'; print '
'; diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 8880e6c1e86..0f9034e374a 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -22,22 +22,25 @@ * \brief Page setup for blockedlog module */ + +// Load Dolibarr environment require '../../main.inc.php'; 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")); +$langs->loadLangs(array('admin', 'blockedlog', 'other')); +// Access Control if (!$user->admin || empty($conf->blockedlog->enabled)) { accessforbidden(); } -$action = GETPOST('action', 'aZ09'); +// Get Parameters +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); - -$withtab = GETPOST('withtab', 'int'); +$withtab = GETPOST('withtab', 'int'); /* diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 4490b3897df..9bb4456e840 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -18,11 +18,13 @@ */ /** - * \file htdocs/blockedlog/admin/blockedlog_list.php - * \ingroup blockedlog - * \brief Page setup for blockedlog module + * \file htdocs/blockedlog/admin/blockedlog_list.php + * \ingroup blockedlog + * \brief Page setup for blockedlog module */ + +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; @@ -31,16 +33,18 @@ 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")); +$langs->loadLangs(array('admin', 'bills', 'blockedlog', 'other')); +// Access Control if ((!$user->admin && empty($user->rights->blockedlog->read)) || empty($conf->blockedlog->enabled)) { accessforbidden(); } -$action = GETPOST('action', 'aZ09'); +// Get Parameters +$action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'blockedloglist'; // 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') +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $search_showonlyerrors = GETPOST('search_showonlyerrors', 'int'); if ($search_showonlyerrors < 0) { @@ -95,7 +99,7 @@ $block_static->loadTrackedEvents(); $result = restrictedArea($user, 'blockedlog', 0, ''); - +// Execution Time $max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined $max_time = @ini_get("max_execution_time"); if ($max_time && $max_time < $max_execution_time_for_importexport) { @@ -523,7 +527,7 @@ if (is_array($blocks)) { print ''; // ID - print ''.$block->id.''; + print ''.dol_escape_htmltag($block->id).''; // Date print ''.dol_print_date($block->date_creation, 'dayhour').''; @@ -531,11 +535,11 @@ if (is_array($blocks)) { // User print ''; //print $block->getUser() - print $block->user_fullname; + print dol_escape_htmltag($block->user_fullname); print ''; // Action - print ''.$langs->trans('log'.$block->action).''; + print ''.$langs->trans('log'.$block->action).''; // Ref print ''; diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index 78f944f692a..2da0544e0a7 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -44,6 +44,13 @@ require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; $user = new User($db); $user->fetch(1); //TODO conf user authority + +/* + * View + */ + +top_httphead(); + $auth = new BlockedLogAuthority($db); $signature = GETPOST('s'); diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php index 53093f02d18..e2009a01da1 100644 --- a/htdocs/blockedlog/ajax/block-add.php +++ b/htdocs/blockedlog/ajax/block-add.php @@ -42,6 +42,13 @@ $id = GETPOST('id', 'int'); $element = GETPOST('element', 'alpha'); $action = GETPOST('action', 'aZ09'); + +/* + * View + */ + +top_httphead(); + if ($element === 'facture') { require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php index e6f9ea0de15..9c2850608af 100644 --- a/htdocs/blockedlog/ajax/block-info.php +++ b/htdocs/blockedlog/ajax/block-info.php @@ -37,6 +37,7 @@ if (!defined('NOREQUIREHTML')) { } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; @@ -54,6 +55,8 @@ $langs->loadLangs(array("admin")); * View */ +top_httphead(); + print '
'; print ''; diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index 4d59b56a981..ab2f6b0427f 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -37,6 +37,7 @@ if (!defined('NOREQUIREHTML')) { } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; @@ -48,6 +49,12 @@ if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { } +/* + * View + */ + +top_httphead(); + $auth = new BlockedLogAuthority($db); $auth->syncSignatureWithAuthority(); diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index ea5069cb840..70ba9a2b531 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -140,6 +140,7 @@ class BlockedLog $this->trackedevents = array(); + // Customer Invoice/Facture / Payment if (isModEnabled('facture')) { $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE'; $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE'; @@ -151,19 +152,20 @@ class BlockedLog } /* Supplier - if (!empty($conf->fournisseur->enabled)) { - $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; + // Supplier Invoice / Payment + if (isModEnabled("fournisseur")) { + $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; $this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete'; $this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done - $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done - $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done - - $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; - $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; + $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done + $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done + $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; + $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; } */ - if (!empty($conf->don->enabled)) { + // Donation + if (isModEnabled('don')) { $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE'; $this->trackedevents['DON_DELETE'] = 'logDON_DELETE'; //$this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL'; @@ -172,23 +174,29 @@ class BlockedLog } /* + // Salary if (!empty($conf->salary->enabled)) { - $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; - $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; - $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; + $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; + $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; + $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; } */ - if (!empty($conf->adherent->enabled)) { + // Members + if (isModEnabled('adherent')) { $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE'; $this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY'; $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE'; } - if (!empty($conf->banque->enabled)) { + + // Bank + if (isModEnabled("banque")) { $this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE'; $this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY'; $this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE'; } + + // Cashdesk // $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules $moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL)); if ($moduleposenabled) { @@ -196,6 +204,7 @@ class BlockedLog } // Add more action to track from a conf variable + // For example: STOCK_MOVEMENT,... if (!empty($conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED)) { $tmparrayofmoresupportedevents = explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED); foreach ($tmparrayofmoresupportedevents as $val) { @@ -297,6 +306,15 @@ class BlockedLog } else { $this->error++; } + } elseif ($this->element === 'stockmouvement') { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + + $object = new MouvementStock($this->db); + if ($object->fetch($this->fk_object) > 0) { + return $object->getNomUrl(1); + } else { + $this->error++; + } } elseif ($this->action == 'MODULE_SET') { return ''.$langs->trans("BlockedLogEnabled").''; } elseif ($this->action == 'MODULE_RESET') { @@ -361,18 +379,23 @@ class BlockedLog $this->amounts = $amounts; // date if ($object->element == 'payment' || $object->element == 'payment_supplier') { - $this->date_object = $object->datepaye; + $this->date_object = empty($object->datepaye) ? $object->date : $object->datepaye; } elseif ($object->element == 'payment_salary') { $this->date_object = $object->datev; } elseif ($object->element == 'payment_donation' || $object->element == 'payment_various') { - $this->date_object = $object->datepaid ? $object->datepaid : $object->datep; + $this->date_object = empty($object->datepaid) ? $object->datep : $object->datepaid; } elseif ($object->element == 'subscription') { $this->date_object = $object->dateh; } elseif ($object->element == 'cashcontrol') { $this->date_object = $object->date_creation; - } else { + } elseif (property_exists($object, 'date')) { + // Generic case $this->date_object = $object->date; + } elseif (property_exists($object, 'datem')) { + // Generic case (second chance, for example for stock movement) + $this->date_object = $object->datem; } + // ref $this->ref_object = ((!empty($object->newref)) ? $object->newref : $object->ref); // newref is set when validating a draft, ref is set in other cases // type of object @@ -387,11 +410,18 @@ class BlockedLog $arrayoffieldstoexclude = array( 'table_element', 'fields', 'ref_previous', 'ref_next', 'origin', 'origin_id', 'oldcopy', 'picto', 'error', 'errors', 'model_pdf', 'modelpdf', 'last_main_doc', 'civility_id', 'contact', 'contact_id', 'table_element_line', 'ismultientitymanaged', 'isextrafieldmanaged', + 'array_languages', + 'childtables', + 'contact_ids', + 'context', + 'labelStatus', + 'labelStatusShort', 'linkedObjectsIds', 'linkedObjects', 'fk_delivery_address', - 'context', - 'projet' // There is already ->fk_project + 'projet', // There is already ->fk_project + 'restrictiononfksoc', + 'specimen', ); // Add more fields to exclude depending on object type if ($this->element == 'cashcontrol') { @@ -420,7 +450,7 @@ class BlockedLog continue; // Discard if not into a dedicated list } if (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->thirdparty->{$key} = $value; + $this->object_data->thirdparty->$key = $value; } } } @@ -440,7 +470,7 @@ class BlockedLog continue; // Discard if not into a dedicated list } if (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->mycompany->{$key} = $value; + $this->object_data->mycompany->$key = $value; } } } @@ -478,12 +508,12 @@ class BlockedLog } if (!is_object($valueline) && !is_null($valueline) && $valueline !== '') { - $this->object_data->invoiceline[$lineid]->{$keyline} = $valueline; + $this->object_data->invoiceline[$lineid]->$keyline = $valueline; } } } } elseif (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->{$key} = $value; + $this->object_data->$key = $value; } } @@ -501,7 +531,7 @@ class BlockedLog continue; // Discard if not into a dedicated list } if (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->{$key} = $value; + $this->object_data->$key = $value; } } @@ -527,7 +557,7 @@ class BlockedLog $totalamount = 0; - // Loop on each invoice payment amount + // Loop on each invoice payment amount (payment_part) if (is_array($object->amounts) && !empty($object->amounts)) { $paymentpartnumber = 0; foreach ($object->amounts as $objid => $amount) { @@ -593,7 +623,7 @@ class BlockedLog continue; // Discard if not into a dedicated list } if (!is_object($value) && !is_null($value) && $value !== '') { - $paymentpart->thirdparty->{$key} = $value; + $paymentpart->thirdparty->$key = $value; } } } @@ -617,11 +647,11 @@ class BlockedLog } if (!is_object($value) && !is_null($value) && $value !== '') { if ($this->element == 'payment_donation') { - $paymentpart->donation->{$key} = $value; + $paymentpart->donation->$key = $value; } elseif ($this->element == 'payment_various') { - $paymentpart->various->{$key} = $value; + $paymentpart->various->$key = $value; } else { - $paymentpart->invoice->{$key} = $value; + $paymentpart->invoice->$key = $value; } } } @@ -656,21 +686,30 @@ class BlockedLog continue; // Discard if not into a dedicated list } if (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->{$key} = $value; + $this->object_data->$key = $value; } } if (!empty($object->newref)) { $this->object_data->ref = $object->newref; } - } else // Generic case - { + } elseif ($this->element == 'stockmouvement') { foreach ($object as $key => $value) { if (in_array($key, $arrayoffieldstoexclude)) { continue; // Discard some properties } if (!is_object($value) && !is_null($value) && $value !== '') { - $this->object_data->{$key} = $value; + $this->object_data->$key = $value; + } + } + } else { + // Generic case + foreach ($object as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->$key = $value; } } diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php index 44f7074d582..23a7ec1f62d 100644 --- a/htdocs/blockedlog/lib/blockedlog.lib.php +++ b/htdocs/blockedlog/lib/blockedlog.lib.php @@ -16,9 +16,9 @@ */ /** - * \file htdocs/blockedlog/lib/blockedlog.lib.php - * \ingroup system - * \brief Library for common blockedlog functions + * \file htdocs/blockedlog/lib/blockedlog.lib.php + * \ingroup system + * \brief Library for common blockedlog functions */ /** diff --git a/htdocs/bom/ajax/ajax.php b/htdocs/bom/ajax/ajax.php new file mode 100644 index 00000000000..9a55c609252 --- /dev/null +++ b/htdocs/bom/ajax/ajax.php @@ -0,0 +1,67 @@ + + * + * 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/bom/ajax/ajax.php + * \brief Ajax component for BOM. + */ + +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} + +include_once '../../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; + + +$action = GETPOST('action', 'aZ09'); +$idproduct = GETPOST('idproduct', 'int'); + + +/* + * View + */ + +top_httphead(); + +if ($action == 'getDurationUnitByProduct' && $user->hasRight('product', 'lire')) { + $product = new Product($db); + $res = $product->fetch($idproduct); + + $cUnit = new CUnits($db); + $fk_unit = $cUnit->getUnitFromCode($product->duration_unit, 'short_label', 'time'); + + echo json_encode($fk_unit); + exit(); +} diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index d2c64eea0b6..f133d1bbd4b 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -17,9 +17,9 @@ */ /** - * \file htdocs/modulebuilder/template/myobject_agenda.php - * \ingroup bom - * \brief Page of MyObject events + * \file htdocs/bom/bom_agenda.php + * \ingroup bom + * \brief Page of BOM events */ // Load Dolibarr environment @@ -32,15 +32,16 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("mrp", "other")); +$langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$id = GETPOST('id', 'int'); +$socid = GETPOST('socid', 'int'); +$ref = GETPOST('ref', 'alpha'); + +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); -$socid = GETPOST('socid', 'int'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); @@ -50,8 +51,10 @@ if (GETPOST('actioncode', 'array')) { } else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } + $search_agenda_label = GETPOST('search_agenda_label'); +// Load variables for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -74,6 +77,7 @@ $object = new BOM($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomagenda', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -126,11 +130,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = bomPrepareHead($object); @@ -150,7 +154,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; @@ -171,7 +175,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref.=''; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 573478a6b3d..333b6232f9f 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -17,9 +17,9 @@ */ /** - * \file htdocs/bom/bom_card.php - * \ingroup bom - * \brief Page to create/edit/view bom + * \file htdocs/bom/bom_card.php + * \ingroup bom + * \brief Page to create/edit/view Bill Of Material */ // Load Dolibarr environment @@ -32,17 +32,18 @@ require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("mrp", "other")); +$langs->loadLangs(array('mrp', 'other')); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$id = GETPOST('id', 'int'); +$lineid = GETPOST('lineid', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomcard'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$backtopage = GETPOST('backtopage', 'alpha'); + // PDF $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); @@ -54,6 +55,7 @@ $object = new BOM($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomcard', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -84,6 +86,7 @@ if ($object->id > 0) { $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); +// Permissions $permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php $permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php @@ -148,6 +151,7 @@ if (empty($reshook)) { if ($action == 'addline' && $user->rights->bom->write) { $langs->load('errors'); $error = 0; + $predef = ''; // Set if we used free entry or predefined product $bom_child_id = (int) GETPOST('bom_id', 'int'); @@ -158,14 +162,14 @@ if (empty($reshook)) { $idprod = $bom_child->fk_product; } } else { - $idprod = (int) GETPOST('idprod', 'int'); + $idprod = (!empty(GETPOST('idprodservice', 'int')) ? GETPOST('idprodservice', 'int') : (int) GETPOST('idprod', 'int')); } $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); - + $fk_unit = GETPOST('fk_unit', 'alphanohtml'); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; @@ -191,39 +195,37 @@ if (empty($reshook)) { } if (!$error) { - $bomline = new BOMLine($db); - $bomline->fk_bom = $id; - $bomline->fk_product = $idprod; - $bomline->fk_bom_child = $bom_child_id; - $bomline->qty = $qty; - $bomline->qty_frozen = (int) $qty_frozen; - $bomline->disable_stock_change = (int) $disable_stock_change; - $bomline->efficiency = $efficiency; + // Extrafields + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); + // Unset extrafield + if (is_array($extralabelsline)) { + // Get extra fields + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_".$key]); + } + } - // Rang to use - $rangmax = $object->line_max(0); - $ranktouse = $rangmax + 1; + $result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null, $fk_unit, $array_options); - $bomline->position = ($ranktouse + 1); - - $result = $bomline->create($user); if ($result <= 0) { - setEventMessages($bomline->error, $bomline->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } else { unset($_POST['idprod']); + unset($_POST['idprodservice']); unset($_POST['qty']); unset($_POST['qty_frozen']); unset($_POST['disable_stock_change']); - - $object->fetchLines(); - - $object->calculateCosts(); } + + $object->fetchLines(); + + $object->calculateCosts(); } } - // Add line + // Update line if ($action == 'updateline' && $user->rights->bom->write) { $langs->load('errors'); $error = 0; @@ -233,261 +235,272 @@ if (empty($reshook)) { $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); + $fk_unit = GETPOST('fk_unit', 'alphanohtml'); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } - $bomline = new BOMLine($db); - $bomline->fetch($lineid); - $bomline->qty = $qty; - $bomline->qty_frozen = (int) $qty_frozen; - $bomline->disable_stock_change = (int) $disable_stock_change; - $bomline->efficiency = $efficiency; + if (!$error) { + // Extrafields + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); + // Unset extrafield + if (is_array($extralabelsline)) { + // Get extra fields + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_".$key]); + } + } - $result = $bomline->update($user); - if ($result <= 0) { - setEventMessages($bomline->error, $bomline->errors, 'errors'); - $action = ''; - } else { - unset($_POST['idprod']); - unset($_POST['qty']); - unset($_POST['qty_frozen']); - unset($_POST['disable_stock_change']); + $bomline = new BOMLine($db); + $bomline->fetch($lineid); + + $result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit, $array_options); + + if ($result <= 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = ''; + } else { + unset($_POST['idprod']); + unset($_POST['idprodservice']); + unset($_POST['qty']); + unset($_POST['qty_frozen']); + unset($_POST['disable_stock_change']); + } $object->fetchLines(); $object->calculateCosts(); } } -} -/* - * View - */ + /* + * View + */ -$form = new Form($db); -$formfile = new FormFile($db); + $form = new Form($db); + $formfile = new FormFile($db); -$title = $langs->trans('BOM'); -$help_url ='EN:Module_BOM'; -llxHeader('', $title, $help_url); + $title = $langs->trans('BOM'); + $help_url ='EN:Module_BOM'; + llxHeader('', $title, $help_url); -// Part to create -if ($action == 'create') { - print load_fiche_titre($langs->trans("NewBOM"), '', 'bom'); + // Part to create + if ($action == 'create') { + print load_fiche_titre($langs->trans("NewBOM"), '', 'bom'); - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print dol_get_fiche_head(array(), ''); + print dol_get_fiche_head(array(), ''); - print '
'.$langs->trans('Field').''.$langs->trans('Value').'
'."\n"; + print '
'."\n"; - // Common attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - print '
'."\n"; + print ''."\n"; - print dol_get_fiche_end(); + print dol_get_fiche_end(); - print $form->buttonsSaveCancel("Create"); + print $form->buttonsSaveCancel("Create"); - print ''; -} - -// Part to edit record -if (($id || $ref) && $action == 'edit') { - print load_fiche_titre($langs->trans("BillOfMaterials"), '', 'cubes'); - - print '
'; - print ''; - print ''; - print ''; - print ''; - - print dol_get_fiche_head(); - - //$object->fields['keyfield']['disabled'] = 1; - - 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 '
'; - - print dol_get_fiche_end(); - - print $form->buttonsSaveCancel("Create"); - - print '
'; -} - -// Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - $head = bomPrepareHead($object); - print dol_get_fiche_head($head, 'card', $langs->trans("BillOfMaterials"), -1, 'bom'); - - $formconfirm = ''; - - // Confirmation to delete - if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1); - } - // Confirmation to delete line - if ($action == 'deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + print ''; } - // Confirmation of validation - if ($action == 'validate') { - // We check that object has a temporary ref - $ref = substr($object->ref, 1, 4); - if ($ref == 'PROV') { - $object->fetch_product(); - $numref = $object->getNextNumRef($object->product); - } else { - $numref = $object->ref; + // Part to edit record + if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("BillOfMaterials"), '', 'cubes'); + + print '
'; + print ''; + print ''; + print ''; + print ''; + + print dol_get_fiche_head(); + + //$object->fields['keyfield']['disabled'] = 1; + + 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 '
'; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel("Create"); + + print '
'; + } + + // Part to show record + if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $head = bomPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("BillOfMaterials"), -1, 'bom'); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); } - $text = $langs->trans('ConfirmValidateBom', $numref); - /*if (! empty($conf->notification->enabled)) - { + // Confirmation of validation + if ($action == 'validate') { + // We check that object has a temporary ref + $ref = substr($object->ref, 1, 4); + if ($ref == 'PROV') { + $object->fetch_product(); + $numref = $object->getNextNumRef($object->product); + } else { + $numref = $object->ref; + } + + $text = $langs->trans('ConfirmValidateBom', $numref); + /*if (isModEnabled('notification')) + { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
'; $text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object); - }*/ + }*/ - $formquestion = array(); - if (!empty($conf->bom->enabled)) { - $langs->load("mrp"); - $forcecombo = 0; - if ($conf->browser->name == 'ie') { - $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - } - $formquestion = array( + $formquestion = array(); + if (isModEnabled('bom')) { + $langs->load("mrp"); + $forcecombo = 0; + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } + $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), - ); + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220); - } - - // Confirmation of closing - if ($action == 'close') { - $text = $langs->trans('ConfirmCloseBom', $object->ref); - /*if (! empty($conf->notification->enabled)) - { + // Confirmation of closing + if ($action == 'close') { + $text = $langs->trans('ConfirmCloseBom', $object->ref); + /*if (isModEnabled('notification')) + { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
'; $text .= $notify->confirmMessage('BOM_CLOSE', $object->socid, $object); - }*/ + }*/ - $formquestion = array(); - if (!empty($conf->bom->enabled)) { - $langs->load("mrp"); - $forcecombo = 0; - if ($conf->browser->name == 'ie') { - $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - } - $formquestion = array( + $formquestion = array(); + if (isModEnabled('bom')) { + $langs->load("mrp"); + $forcecombo = 0; + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } + $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), - ); + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Close'), $text, 'confirm_close', $formquestion, 0, 1, 220); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Close'), $text, 'confirm_close', $formquestion, 0, 1, 220); - } + // Confirmation of reopen + if ($action == 'reopen') { + $text = $langs->trans('ConfirmReopenBom', $object->ref); + /*if (isModEnabled('notification')) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOM_CLOSE', $object->socid, $object); + }*/ - // Confirmation of reopen - if ($action == 'reopen') { - $text = $langs->trans('ConfirmReopenBom', $object->ref); - /*if (! empty($conf->notification->enabled)) - { - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; - $notify = new Notify($db); - $text .= '
'; - $text .= $notify->confirmMessage('BOM_CLOSE', $object->socid, $object); - }*/ - - $formquestion = array(); - if (!empty($conf->bom->enabled)) { - $langs->load("mrp"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - $forcecombo = 0; - if ($conf->browser->name == 'ie') { - $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - } - $formquestion = array( + $formquestion = array(); + if (isModEnabled('bom')) { + $langs->load("mrp"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $forcecombo = 0; + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } + $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), - ); + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $text, 'confirm_reopen', $formquestion, 0, 1, 220); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $text, 'confirm_reopen', $formquestion, 0, 1, 220); - } + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } - // Clone confirmation - if ($action == 'clone') { - // Create an array for form - $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); - } + // Confirmation of action xxxx + if ($action == 'setdraft') { + $text = $langs->trans('ConfirmSetToDraft', $object->ref); - // Confirmation of action xxxx - if ($action == 'setdraft') { - $text = $langs->trans('ConfirmSetToDraft', $object->ref); + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220); + } - $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220); - } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, '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; + } - // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); - $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) { - $formconfirm .= $hookmanager->resPrint; - } elseif ($reshook > 0) { - $formconfirm = $hookmanager->resPrint; - } - - // Print form confirm - print $formconfirm; + // Print form confirm + print $formconfirm; - // Object card - // ------------------------------------------------------------ - $linkback = '
'.$langs->trans("BackToList").''; + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
'; - /* - // Ref bis - $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->bom->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->bom->creer, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); - // Project - if (! empty($conf->project->enabled)) - { + $morehtmlref = '
'; + /* + // Ref bis + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->bom->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->bom->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); + // Project + if (isModEnabled('project')) + { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($permissiontoadd) @@ -514,76 +527,133 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.=''; } } - } - */ - $morehtmlref .= '
'; + } + */ + $morehtmlref .= '
'; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
'; - print '
'; - print '
'; - print ''."\n"; + print '
'; + print '
'; + print '
'; + print '
'."\n"; - // Common attributes - $keyforbreak = 'duration'; - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; - $object->calculateCosts(); - print ''; - print ''; + // Common attributes + $keyforbreak = 'duration'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + $object->calculateCosts(); + print ''; + print ''; - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print '
'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).''.price($object->total_cost).'
'.$langs->trans("UnitCost").''.price($object->unit_cost).'
'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).''.price($object->total_cost).'
'.$langs->trans("UnitCost").''.price($object->unit_cost).'
'; - print '
'; - print '
'; + print ''; + print '
'; + print '
'; - print '
'; + print '
'; - print dol_get_fiche_end(); + print dol_get_fiche_end(); - /* - * Lines - */ + /* + * Lines + */ - if (!empty($object->table_element_line)) { - print '
- - + if (!empty($object->table_element_line)) { + //Products + $res = $object->fetchLinesbytypeproduct(0); + $object->calculateCosts(); + + print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMProductsList'), '', 'product'); + + print ' + + - + '; - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } - print '
'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { - print ''; - } + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '
'; + } - if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); - } + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); + } - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { - if ($action != 'editline') { - // Add products/services form + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form - $parameters = array(); - $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); + } + } + + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '
'; + } + print '
'; + + print "
\n"; + + mrpCollapseBomManagement(); + + + //Services + $filtertype = 1; + $res = $object->fetchLinesbytypeproduct(1); + $object->calculateCosts(); + + print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMServicesList'), '', 'service'); + + print '
+ + + + + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + $tagidfortablednd = 'tablelinesservice'; + include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print ''; + } + + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add services form + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectServiceLine', $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)) + $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); + } } } @@ -597,6 +667,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea mrpCollapseBomManagement(); } + $res = $object->fetchLines(); // Buttons for actions @@ -656,7 +727,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''."\n"; + print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : "").'&action=clone&object=bom', 'clone', $permissiontoadd); } // Close / Cancel @@ -678,11 +749,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } */ - if ($permissiontodelete) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print ''."\n"; } diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index a0390ef5105..29aca029d36 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -17,35 +17,35 @@ */ /** - * \file bom_document.php - * \ingroup bom - * \brief Tab for documents linked to BillOfMaterials + * \file htdocs/bom/bom_document.php + * \ingroup bom + * \brief Tab for documents linked to BillOfMaterials */ // Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.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'; require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; // Load translation files required by the page $langs->loadLangs(array("mrp", "companies", "other", "mails")); - +// Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); // Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'bom', $id); +// if ($user->socid > 0) accessforbidden(); +// if ($user->socid > 0) $socid = $user->socid; +// $result = restrictedArea($user, 'bom', $id); -// Get parameters +// Load variables for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 48798db9b8f..b9b20c64d1f 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -16,9 +16,9 @@ */ /** - * \file htdocs/bom/bom_list.php - * \ingroup bom - * \brief List page for bom + * \file htdocs/bom/bom_list.php + * \ingroup bom + * \brief List page for BillOfMaterials */ // Load Dolibarr environment @@ -29,8 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; // Load translation files required by the page -$langs->loadLangs(array("mrp", "other")); +$langs->loadLangs(array('mrp', 'other')); +// Get Parameters +$id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -38,16 +40,14 @@ $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') : 'bomlist'; // 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'); +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action @@ -305,6 +305,9 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; @@ -366,7 +369,7 @@ foreach($object->fields as $key => $val) $sql .= "t.".$key.", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } @@ -378,35 +381,41 @@ $sql.=$hookmanager->resPrint; $sql=preg_replace('/,\s*$/','', $sql); */ -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { $obj = $db->fetch_object($resql); @@ -513,7 +522,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; @@ -523,6 +532,15 @@ print '
'; + +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} + foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -537,7 +555,7 @@ foreach ($object->fields as $key => $val) { if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -593,7 +617,9 @@ $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} print ''."\n"; @@ -624,6 +650,18 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Show here line of result print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { @@ -676,15 +714,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) { $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/bom/bom_net_needs.php b/htdocs/bom/bom_net_needs.php index baf4b096324..1b8afa91e52 100644 --- a/htdocs/bom/bom_net_needs.php +++ b/htdocs/bom/bom_net_needs.php @@ -35,20 +35,24 @@ $langs->loadLangs(array("mrp", "other", "stocks")); // Get parameters $id = GETPOST('id', 'int'); $lineid = GETPOST('lineid', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomnet_needs'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); - +$backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects $object = new BOM($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; + +// Initialize technical objects for hooks $hookmanager->initHooks(array('bomnetneeds')); // Note that conf->hooks_modules contains array + +// Massaction +$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -73,13 +77,13 @@ if ($object->id > 0) { } - // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); +// Permissions $permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php $permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php @@ -123,13 +127,11 @@ if (empty($reshook)) { $form = new Form($db); $formfile = new FormFile($db); - $title = $langs->trans('BOM'); $help_url ='EN:Module_BOM'; llxHeader('', $title, $help_url); - // Part to show record if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $head = bomPrepareHead($object); @@ -195,19 +197,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ $text_stock_options = $langs->trans("RealStockDesc").'
'; $text_stock_options .= $langs->trans("RealStockWillAutomaticallyWhen").'
'; - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? '- '.$langs->trans("DeStockOnShipment").'
' : ''); - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? '- '.$langs->trans("DeStockOnValidateOrder").'
' : ''); - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_BILL) ? '- '.$langs->trans("DeStockOnBill").'
' : ''); - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? '- '.$langs->trans("ReStockOnBill").'
' : ''); - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? '- '.$langs->trans("ReStockOnValidateOrder").'
' : ''); - $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? '- '.$langs->trans("ReStockOnDispatchOrder").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? '- '.$langs->trans("DeStockOnShipment").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? '- '.$langs->trans("DeStockOnValidateOrder").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_BILL) ? '- '.$langs->trans("DeStockOnBill").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? '- '.$langs->trans("ReStockOnBill").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? '- '.$langs->trans("ReStockOnValidateOrder").'
' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? '- '.$langs->trans("ReStockOnDispatchOrder").'
' : ''); $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) ? '- '.$langs->trans("StockOnReception").'
' : ''); print '
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { - print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1); } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { @@ -561,16 +579,22 @@ $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 ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + 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($object->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
'; print "\n"; print ''; print ''; print ''; print ''; - if (! empty($TChildBom)) { + if (!empty($TChildBom)) { if ($action == 'treeview') { foreach ($TChildBom as $fk_bom => $TProduct) { $repeatChar = ' '; - if (! empty($TProduct['bom'])) { + if (!empty($TProduct['bom'])) { if ($TProduct['parentid'] != $object->id) print ''; else print ''; print ''; print ''; } - if (! empty($TProduct['product'])) { + if (!empty($TProduct['product'])) { foreach ($TProduct['product'] as $fk_product => $TInfos) { $prod = new Product($db); $prod->fetch($fk_product); diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 9984a1498b8..0c32b8643fb 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -17,9 +17,9 @@ */ /** - * \file bom_note.php - * \ingroup bom - * \brief Car with notes on BillOfMaterials + * \file htdocs/bom/bom_note.php + * \ingroup bom + * \brief Card with notes on BillOfMaterials */ // Load Dolibarr environment @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; $langs->loadLangs(array("mrp", "companies")); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -40,9 +40,13 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects $object = new BOM($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; + +// Initialize technical objects for hooks $hookmanager->initHooks(array('bomnote', 'globalcard')); // Note that conf->hooks_modules contains array +// Massactions +$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id; + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index 91af888ffd8..fb7d175a229 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2019 Maxime Kohlhaas * Copyright (C) 2020 Frédéric France + * Copyright (C) 2022 Christian Humpel * * 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 @@ -279,6 +280,177 @@ class Boms extends DolibarrApi ); } + /** + * Get lines of an BOM + * + * @param int $id Id of BOM + * + * @url GET {id}/lines + * + * @return array + */ + public function getLines($id) + { + if (!DolibarrApiAccess::$user->rights->bom->read) { + throw new RestException(401); + } + + $result = $this->bom->fetch($id); + if (!$result) { + throw new RestException(404, 'BOM not found'); + } + + if (!DolibarrApi::_checkAccessToResource('bom_bom', $this->bom->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->bom->getLinesArray(); + $result = array(); + foreach ($this->bom->lines as $line) { + array_push($result, $this->_cleanObjectDatas($line)); + } + return $result; + } + + /** + * Add a line to given BOM + * + * @param int $id Id of BOM to update + * @param array $request_data BOMLine data + * + * @url POST {id}/lines + * + * @return int + */ + public function postLine($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->bom->write) { + throw new RestException(401); + } + + $result = $this->bom->fetch($id); + if (!$result) { + throw new RestException(404, 'BOM not found'); + } + + if (!DolibarrApi::_checkAccessToResource('bom_bom', $this->bom->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $request_data = (object) $request_data; + + $updateRes = $this->bom->addLine( + $request_data->fk_product, + $request_data->qty, + $request_data->qty_frozen, + $request_data->disable_stock_change, + $request_data->efficiency, + $request_data->position, + $request_data->fk_bom_child, + $request_data->import_key + ); + + if ($updateRes > 0) { + return $updateRes; + } else { + throw new RestException(400, $this->bom->error); + } + } + + /** + * Update a line to given BOM + * + * @param int $id Id of BOM to update + * @param int $lineid Id of line to update + * @param array $request_data BOMLine data + * + * @url PUT {id}/lines/{lineid} + * + * @return array|bool + */ + public function putLine($id, $lineid, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->bom->write) { + throw new RestException(401); + } + + $result = $this->bom->fetch($id); + if (!$result) { + throw new RestException(404, 'BOM not found'); + } + + if (!DolibarrApi::_checkAccessToResource('bom_bom', $this->bom->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $request_data = (object) $request_data; + + $updateRes = $this->bom->updateLine( + $lineid, + $request_data->qty, + $request_data->qty_frozen, + $request_data->disable_stock_change, + $request_data->efficiency, + $request_data->position, + $request_data->import_key + ); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + } + + /** + * Delete a line to given BOM + * + * + * @param int $id Id of BOM to update + * @param int $lineid Id of line to delete + * + * @url DELETE {id}/lines/{lineid} + * + * @return int + * + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 500 + */ + public function deleteLine($id, $lineid) + { + if (!DolibarrApiAccess::$user->rights->bom->write) { + throw new RestException(401); + } + + $result = $this->bom->fetch($id); + if (!$result) { + throw new RestException(404, 'BOM not found'); + } + + if (!DolibarrApi::_checkAccessToResource('bom_bom', $this->bom->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + //Check the rowid is a line of current bom object + $lineIdIsFromObject = false; + foreach ($this->bom->lines as $bl) { + if ($bl->id == $lineid) { + $lineIdIsFromObject = true; + break; + } + } + if (!$lineIdIsFromObject) { + throw new RestException(500, 'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); + } + + $updateRes = $this->bom->deleteline(DolibarrApiAccess::$user, $lineid); + if ($updateRes > 0) { + return $this->get($id); + } else { + throw new RestException(405, $this->bom->error); + } + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 0e57bebd922..cd5b119cabf 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -23,6 +23,8 @@ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; @@ -239,7 +241,7 @@ class BOM extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -399,6 +401,58 @@ class BOM extends CommonObject return $result; } + /** + * Load object lines in memory from the database by type of product + * + * @param int $typeproduct 0 type product, 1 type service + + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetchLinesbytypeproduct($typeproduct = 0) + { + $this->lines = array(); + + $objectlineclassname = get_class($this).'Line'; + if (!class_exists($objectlineclassname)) { + $this->error = 'Error, class '.$objectlineclassname.' not found during call of fetchLinesCommon'; + return -1; + } + + $objectline = new $objectlineclassname($this->db); + + $sql = "SELECT ".$objectline->getFieldList('l'); + $sql .= " FROM ".$this->db->prefix().$objectline->table_element." as l"; + $sql .= " LEFT JOIN ".$this->db->prefix()."product as p ON p.rowid = l.fk_product"; + $sql .= " WHERE l.fk_".$this->db->escape($this->element)." = ".((int) $this->id); + $sql .= " AND p.fk_product_type = ". ((int) $typeproduct); + if (isset($objectline->fields['position'])) { + $sql .= $this->db->order('position', 'ASC'); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num_rows = $this->db->num_rows($resql); + $i = 0; + while ($i < $num_rows) { + $obj = $this->db->fetch_object($resql); + if ($obj) { + $newline = new $objectlineclassname($this->db); + $newline->setVarsFromFetchObj($obj); + + $this->lines[] = $newline; + } + $i++; + } + + return $num_rows; + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + return -1; + } + } + + /** * Load list of objects in memory from the database. * @@ -502,6 +556,226 @@ class BOM extends CommonObject //return $this->deleteCommon($user, $notrigger, 1); } + /** + * Add an BOM line into database (linked to BOM) + * + * @param int $fk_product Id of product + * @param float $qty Quantity + * @param int $qty_frozen Frozen quantity + * @param int $disable_stock_change Disable stock change on using in MO + * @param float $efficiency Efficiency in MO + * @param int $position Position of BOM-Line in BOM-Lines + * @param int $fk_bom_child Id of BOM Child + * @param string $import_key Import Key + * @param string $fk_unit Unit + * @param array $array_options extrafields array + * @return int <0 if KO, Id of created object if OK + */ + public function addLine($fk_product, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $fk_bom_child = null, $import_key = null, $fk_unit = '', $array_options = 0) + { + global $mysoc, $conf, $langs, $user; + + $logtext = "::addLine bomid=$this->id, qty=$qty, fk_product=$fk_product, qty_frozen=$qty_frozen, disable_stock_change=$disable_stock_change, efficiency=$efficiency"; + $logtext .= ", fk_bom_child=$fk_bom_child, import_key=$import_key"; + dol_syslog(get_class($this).$logtext, LOG_DEBUG); + + if ($this->statut == self::STATUS_DRAFT) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + + // Clean parameters + if (empty($qty)) { + $qty = 0; + } + if (empty($qty_frozen)) { + $qty_frozen = 0; + } + if (empty($disable_stock_change)) { + $disable_stock_change = 0; + } + if (empty($efficiency)) { + $efficiency = 1.0; + } + if (empty($fk_bom_child)) { + $fk_bom_child = null; + } + if (empty($import_key)) { + $import_key = null; + } + if (empty($position)) { + $position = -1; + } + + $qty = price2num($qty); + $efficiency = price2num($efficiency); + $position = price2num($position); + + $this->db->begin(); + + // Rank to use + $rangMax = $this->line_max(); + $rankToUse = $position; + if ($rankToUse <= 0 or $rankToUse > $rangMax) { // New line after existing lines + $rankToUse = $rangMax + 1; + } else { // New line between the existing lines + foreach ($this->lines as $bl) { + if ($bl->position >= $rankToUse) { + $bl->position++; + $bl->update($user); + } + } + } + + // Insert line + $this->line = new BOMLine($this->db); + + $this->line->context = $this->context; + + $this->line->fk_bom = $this->id; + $this->line->fk_product = $fk_product; + $this->line->qty = $qty; + $this->line->qty_frozen = $qty_frozen; + $this->line->disable_stock_change = $disable_stock_change; + $this->line->efficiency = $efficiency; + $this->line->fk_bom_child = $fk_bom_child; + $this->line->import_key = $import_key; + $this->line->position = $rankToUse; + $this->line->fk_unit = $fk_unit; + + if (is_array($array_options) && count($array_options) > 0) { + $this->line->array_options = $array_options; + } + + $result = $this->line->create($user); + + if ($result > 0) { + $this->calculateCosts(); + $this->db->commit(); + return $result; + } else { + $this->error = $this->line->error; + dol_syslog(get_class($this)."::addLine error=".$this->error, LOG_ERR); + $this->db->rollback(); + return -2; + } + } else { + dol_syslog(get_class($this)."::addLine status of BOM must be Draft to allow use of ->addLine()", LOG_ERR); + return -3; + } + } + + /** + * Update an BOM line into database + * + * @param int $rowid Id of line to update + * @param float $qty Quantity + * @param int $qty_frozen Frozen quantity + * @param int $disable_stock_change Disable stock change on using in MO + * @param float $efficiency Efficiency in MO + * @param int $position Position of BOM-Line in BOM-Lines + * @param string $import_key Import Key + * @param int $fk_unit Unit of line + * @param array $array_options extrafields array + * @return int <0 if KO, Id of updated BOM-Line if OK + */ + public function updateLine($rowid, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $import_key = null, $fk_unit = 0, $array_options = 0) + { + global $mysoc, $conf, $langs, $user; + + $logtext = "::updateLine bomid=$this->id, qty=$qty, qty_frozen=$qty_frozen, disable_stock_change=$disable_stock_change, efficiency=$efficiency"; + $logtext .= ", import_key=$import_key"; + dol_syslog(get_class($this).$logtext, LOG_DEBUG); + + if ($this->statut == self::STATUS_DRAFT) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + + // Clean parameters + if (empty($qty)) { + $qty = 0; + } + if (empty($qty_frozen)) { + $qty_frozen = 0; + } + if (empty($disable_stock_change)) { + $disable_stock_change = 0; + } + if (empty($efficiency)) { + $efficiency = 1.0; + } + if (empty($import_key)) { + $import_key = null; + } + if (empty($position)) { + $position = -1; + } + + $qty = price2num($qty); + $efficiency = price2num($efficiency); + $position = price2num($position); + + $this->db->begin(); + + //Fetch current line from the database and then clone the object and set it in $oldline property + $line = new BOMLine($this->db); + $line->fetch($rowid); + $line->fetch_optionals(); + + $staticLine = clone $line; + $line->oldcopy = $staticLine; + $this->line = $line; + $this->line->context = $this->context; + + // Rank to use + $rankToUse = (int) $position; + if ($rankToUse != $line->oldcopy->position) { // check if position have a new value + foreach ($this->lines as $bl) { + if ($bl->position >= $rankToUse AND $bl->position < ($line->oldcopy->position + 1)) { // move rank up + $bl->position++; + $bl->update($user); + } + if ($bl->position <= $rankToUse AND $bl->position > ($line->oldcopy->position)) { // move rank down + $bl->position--; + $bl->update($user); + } + } + } + + + $this->line->fk_bom = $this->id; + $this->line->qty = $qty; + $this->line->qty_frozen = $qty_frozen; + $this->line->disable_stock_change = $disable_stock_change; + $this->line->efficiency = $efficiency; + $this->line->import_key = $import_key; + $this->line->position = $rankToUse; + if (!empty($fk_unit)) { + $this->line->fk_unit = $fk_unit; + } + + if (is_array($array_options) && count($array_options) > 0) { + // We replace values in this->line->array_options only for entries defined into $array_options + foreach ($array_options as $key => $value) { + $this->line->array_options[$key] = $array_options[$key]; + } + } + + $result = $this->line->update($user); + + if ($result > 0) { + $this->calculateCosts(); + $this->db->commit(); + return $result; + } else { + $this->error = $this->line->error; + dol_syslog(get_class($this)."::addLine error=".$this->error, LOG_ERR); + $this->db->rollback(); + return -2; + } + } else { + dol_syslog(get_class($this)."::addLine status of BOM must be Draft to allow use of ->addLine()", LOG_ERR); + return -3; + } + } + /** * Delete a line of object in database * @@ -517,7 +791,38 @@ class BOM extends CommonObject return -2; } - return $this->deleteLineCommon($user, $idline, $notrigger); + $this->db->begin(); + + //Fetch current line from the database and then clone the object and set it in $oldline property + $line = new BOMLine($this->db); + $line->fetch($idline); + $line->fetch_optionals(); + + $staticLine = clone $line; + $line->oldcopy = $staticLine; + $this->line = $line; + $this->line->context = $this->context; + + $result = $this->line->delete($user, $notrigger); + + //Positions (rank) reordering + foreach ($this->lines as $bl) { + if ($bl->position > ($line->oldcopy->position)) { // move rank down + $bl->position--; + $bl->update($user); + } + } + + if ($result > 0) { + $this->calculateCosts(); + $this->db->commit(); + return $result; + } else { + $this->error = $this->line->error; + dol_syslog(get_class($this)."::addLine error=".$this->error, LOG_ERR); + $this->db->rollback(); + return -2; + } } /** @@ -589,8 +894,8 @@ class BOM extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->create)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->create)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -701,8 +1006,8 @@ class BOM extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -725,8 +1030,8 @@ class BOM extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -749,8 +1054,8 @@ class BOM extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -1028,7 +1333,7 @@ class BOM extends CommonObject */ public function calculateCosts() { - global $hookmanager; + global $conf, $hookmanager; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $this->unit_cost = 0; @@ -1037,7 +1342,6 @@ class BOM extends CommonObject $parameters=array(); $reshook = $hookmanager->executeHooks('calculateCostsBom', $parameters, $this); // Note that $action and $object may have been modified by hook - if ($reshook > 0) { return $hookmanager->resPrint; } @@ -1050,38 +1354,60 @@ class BOM extends CommonObject foreach ($this->lines as &$line) { $tmpproduct->cost_price = 0; $tmpproduct->pmp = 0; + $result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading - if (empty($line->fk_bom_child)) { - $result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading - if ($result < 0) { - $this->error = $tmpproduct->error; - return -1; - } - $line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp); - if (empty($line->unit_cost)) { - if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) { - $line->unit_cost = $productFournisseur->fourn_unitprice; + if ($tmpproduct->type == $tmpproduct::TYPE_PRODUCT) { + if (empty($line->fk_bom_child)) { + if ($result < 0) { + $this->error = $tmpproduct->error; + return -1; + } + $line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp); + if (empty($line->unit_cost)) { + if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) { + $line->unit_cost = $productFournisseur->fourn_unitprice; + } + } + + $line->total_cost = price2num($line->qty * $line->unit_cost, 'MT'); + + $this->total_cost += $line->total_cost; + } else { + $bom_child = new BOM($this->db); + $res = $bom_child->fetch($line->fk_bom_child); + if ($res > 0) { + $bom_child->calculateCosts(); + $line->childBom[] = $bom_child; + $this->total_cost += $bom_child->total_cost * $line->qty; + } else { + $this->error = $bom_child->error; + return -2; } } + } else { + //Convert qty to hour + $unit = measuringUnitString($line->fk_unit, '', '', 1); + $qty = convertDurationtoHour($line->qty, $unit); - $line->total_cost = price2num($line->qty * $line->unit_cost, 'MT'); + if (isModEnabled('workstation') && !empty($tmpproduct->fk_default_workstation)) { + $workstation = new Workstation($this->db); + $res = $workstation->fetch($tmpproduct->fk_default_workstation); + + if ($res > 0) $line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT'); + else { + $this->error = $workstation->error; + return -3; + } + } else { + $line->total_cost = price2num($qty * $tmpproduct->cost_price, 'MT'); + } $this->total_cost += $line->total_cost; - } else { - $bom_child= new BOM($this->db); - $res = $bom_child->fetch($line->fk_bom_child); - if ($res>0) { - $bom_child->calculateCosts(); - $line->childBom[] = $bom_child; - $this->total_cost += $bom_child->total_cost * $line->qty; - } else { - $this->error = $bom_child->error; - return -2; - } } } $this->total_cost = price2num($this->total_cost, 'MT'); + if ($this->qty > 0) { $this->unit_cost = price2num($this->total_cost / $this->qty, 'MU'); } elseif ($this->qty < 0) { @@ -1116,9 +1442,9 @@ class BOM extends CommonObject */ public function getNetNeeds(&$TNetNeeds = array(), $qty = 0) { - if (! empty($this->lines)) { + if (!empty($this->lines)) { foreach ($this->lines as $line) { - if (! empty($line->childBom)) { + if (!empty($line->childBom)) { foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty); } else { if (empty($TNetNeeds[$line->fk_product])) { @@ -1140,9 +1466,9 @@ class BOM extends CommonObject */ public function getNetNeedsTree(&$TNetNeeds = array(), $qty = 0, $level = 0) { - if (! empty($this->lines)) { + if (!empty($this->lines)) { foreach ($this->lines as $line) { - if (! empty($line->childBom)) { + if (!empty($line->childBom)) { foreach ($line->childBom as $childBom) { $TNetNeeds[$childBom->id]['bom'] = $childBom; $TNetNeeds[$childBom->id]['parentid'] = $this->id; @@ -1256,6 +1582,7 @@ class BOMLine extends CommonObjectLine 'qty_frozen' => array('type'=>'smallint', 'label'=>'QuantityFrozen', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>105, 'css'=>'maxwidth50imp', 'help'=>'QuantityConsumedInvariable'), 'disable_stock_change' => array('type'=>'smallint', 'label'=>'DisableStockChange', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>108, 'css'=>'maxwidth50imp', 'help'=>'DisableStockChangeHelp'), 'efficiency' => array('type'=>'double(24,8)', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'position'=>110, 'notnull'=>1, 'css'=>'maxwidth50imp', 'help'=>'ValueOfEfficiencyConsumedMeans'), + 'fk_unit' => array('type'=>'integer', 'label'=>'Unit', 'enabled'=>1, 'visible'=>1, 'position'=>120, 'notnull'=>-1,), 'position' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>1, 'visible'=>0, 'default'=>0, 'position'=>200, 'notnull'=>1,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,), ); @@ -1335,7 +1662,7 @@ class BOMLine extends CommonObjectLine if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -1382,7 +1709,7 @@ class BOMLine extends CommonObjectLine public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index 94debfbee7b..8d827ba09aa 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -46,6 +46,11 @@ function bomAdminPrepareHead() $head[$h][2] = 'bom_extrafields'; $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/bomline_extrafields.php"; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'bomline_extrafields'; + $h++; + // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( @@ -134,6 +139,8 @@ function bomPrepareHead($object) //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom', 'remove'); + return $head; } diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index 0a3a3b34e7a..e644c7813e7 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -29,6 +29,8 @@ * $forceall (0 by default, 1 for supplier invoices/orders) */ +require_once DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php"; + // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error: this template page cannot be called directly as an URL"; @@ -36,12 +38,18 @@ if (empty($object) || !is_object($object)) { } -global $forceall, $forcetoshowtitlelines; +global $forceall, $forcetoshowtitlelines, $filtertype; if (empty($forceall)) { $forceall = 0; } +if (empty($filtertype)) $filtertype = 0; +if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->STOCK_SUPPORT_SERVICES)) { + $filtertype = -1; +} + +$formproduct = new FormProduct($object->db); // Define colspan for the button 'Add' $colspan = 3; // Columns: total ht + col edit + col delete @@ -53,6 +61,7 @@ $objectline = new BOMLine($this->db); print "\n"; $nolinesbefore = (count($this->lines) == 0 || $forcetoshowtitlelines); + if ($nolinesbefore) { print ''; if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { @@ -62,16 +71,24 @@ if ($nolinesbefore) { print '
'.$langs->trans('AddNewLine').''; print ''; print ''; - if (!empty($conf->global->PRODUCT_USE_UNITS)) { - print ''; + + if ($filtertype != 1) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + } + print ''; + print ''; + print ''; + } else { + print ''; + if (isModEnabled('workstation')) print ''; + print ''; } - print ''; - print ''; - print ''; - print ''; + + print ''; print ''; } print ''; @@ -87,30 +104,39 @@ $coldisplay++; print ''; @@ -118,35 +144,57 @@ $coldisplay++; print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) { +if ($filtertype != 1) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $coldisplay++; + print ''; + } + $coldisplay++; - print ''; + + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; +} else { + $coldisplay++; + require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; + $cUnit = new CUnits($this->db); + $fk_unit_default = $cUnit->getUnitFromCode('h', 'short_label', 'time'); + print ''; + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; } -$coldisplay++; -print ''; + $coldisplay += $colspan; + print ''; + print ''; -$coldisplay++; -print ''; - -$coldisplay++; -print ''; - -$coldisplay++; -print ''; - -$coldisplay += $colspan; -print ''; -print ''; if (is_object($objectline)) { print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', 1, 'line'); @@ -175,6 +223,27 @@ jQuery(document).ready(function() { } } }); + + //change unit selected if we change service selected + + $('#idprodservice').change(function(){ + var idproduct = $(this).val(); + + $.ajax({ + url : "" + ,type: 'POST' + ,data: { + 'action': 'getDurationUnitByProduct' + ,'idproduct' : idproduct + } + }).done(function(data) { + + console.log(data); + var data = JSON.parse(data); + $("#fk_unit").val(data).change(); + }); + }); + }); diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index e5f24fa994f..88463996ebc 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -31,6 +31,9 @@ * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) */ +require_once DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php"; + + // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; @@ -38,12 +41,16 @@ if (empty($object) || !is_object($object)) { } -global $forceall; +global $forceall, $filtertype; if (empty($forceall)) { $forceall = 0; } +if (empty($filtertype)) $filtertype = 0; + +$formproduct = new FormProduct($object->db); + // Define colspan for the button 'Add' $colspan = 3; // Columns: total ht + col edit + col delete @@ -86,6 +93,16 @@ if (is_object($hookmanager)) { $reshook = $hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); } +//Line extrafield +if (is_object($objectline) && !empty($extrafields)) { + $temps = $line->showOptionals($extrafields, 'edit', array('class'=>'tredited'), '', '', 1, 'line'); + if (!empty($temps)) { + print '
'; + print $temps; + print '
'; + } +} + print ''; /*if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines @@ -108,28 +125,43 @@ if (($line->info_bits & 2) != 2) { } print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) { +if ($filtertype != 1) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $coldisplay++; + print ''; + } + $coldisplay++; - print ''; + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; +} else { + $coldisplay++; + print ''; + + $coldisplay++; + print ''; + + $coldisplay++; + print ''; } -$coldisplay++; -print ''; - -$coldisplay++; -print ''; - -$coldisplay++; -print ''; - -$coldisplay++; -print ''; - $coldisplay += $colspan; print ''; // Qty -print ''; +print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) { - print ''; +if ($filtertype != 1) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + } + + // Qty frozen + print ''; + + // Disable stock change + print ''; + + // Efficiency + print ''; + + // Cost + print ''; +} else { + print ''; + + if (isModEnabled('workstation')) print ''; + + // Cost + print ''; } -// Qty frozen -print ''; -// Disable stock change -print ''; -// Efficiency -print ''; - -// Cost -print ''; print ''; // No width to allow autodim diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 61b394a3b0f..b7087b27288 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -34,12 +34,17 @@ * $type, $text, $description, $line */ +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; + // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } +global $filtertype; +if (empty($filtertype)) $filtertype = 0; + global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax, $langs; @@ -60,7 +65,9 @@ if (empty($outputalsopricetotalwithtax)) { } // add html5 elements -$domData = ' data-element="'.$line->element.'"'; +if ($filtertype == 1) $domData = ' data-element="'.$line->element.'service"'; +else $domData = ' data-element="'.$line->element.'"'; + $domData .= ' data-id="'.$line->id.'"'; $domData .= ' data-qty="'.$line->qty.'"'; $domData .= ' data-product_type="'.$line->product_type.'"'; @@ -93,6 +100,17 @@ if ($tmpbom->id > 0) { print $tmpproduct->getNomUrl(1); print ' - '.$tmpproduct->label; } + +// Line extrafield +if (!empty($extrafields)) { + $temps = $line->showOptionals($extrafields, 'view', array(), '', '', 1, 'line'); + if (!empty($temps)) { + print '
'; + print $temps; + print '
'; + } +} + print ''; print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) { - print ''; } + + print ''; + print ''; + + print ''; +} else { + //Unité + print ''; + + // Work station + if (isModEnabled('workstation')) { + $workstation = new Workstation($object->db); + $res = $workstation->fetch($tmpproduct->fk_default_workstation); + + print ''; + } } - -print ''; -print ''; - -print ''; - $total_cost = 0; print ''; - // Owner + // Visibility / Owner print ''; @@ -269,9 +279,10 @@ if ($id > 0 && !preg_match('/^add/i', $action)) { } print ''; + // Visibility / owner print '
'.$langs->trans('Product'); - if (! empty($conf->global->BOM_SUB_BOM) && $action == 'treeview') { + if (!empty($conf->global->BOM_SUB_BOM) && $action == 'treeview') { print '   '.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'  '; print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' '; } @@ -216,11 +218,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).''.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).'
'.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1); @@ -233,7 +235,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'.$langs->trans('Qty').''; - print ''; - print $langs->trans('Unit'); - print ''; + print ''; + print $langs->trans('Unit'); + print '' . $form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")) . '' . $form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')) . '' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . '' . $form->textwithpicto($langs->trans('Unit'), '').'' . $form->textwithpicto($langs->trans('Workstation'), '') . '' . $form->textwithpicto($langs->trans('TotalCost'), '') . ''.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).''.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).''.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'  
'; // Predefined product/service -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - if (!empty($conf->global->BOM_SUB_BOM)) { +if (isModEnabled("product") || isModEnabled("service")) { + if ($filtertype == 1) { + print $langs->trans("Service"); + } elseif (!empty($conf->global->BOM_SUB_BOM)) { print $langs->trans("Product"); } echo ''; - $filtertype = 0; - if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->STOCK_SUPPORT_SERVICES)) { - $filtertype = -1; - } $statustoshow = -1; if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) { // hide products in closed warehouse, but show products for internal transfer - $form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); + $form->select_produits(GETPOST('idprod', 'int'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); } else { - $form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); + $form->select_produits(GETPOST('idprod', 'int'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } echo ''; } -if (!empty($conf->global->BOM_SUB_BOM)) { +if (!empty($conf->global->BOM_SUB_BOM) && $filtertype!=1) { print '
'.$langs->trans("or").'
'.$langs->trans("BOM"); // TODO Add component to select a BOM $form->select_bom(); } + +if (is_object($objectline)) { + $temps = $objectline->showOptionals($extrafields, 'create', array(), '', '', 1, 'line'); + + if (!empty($temps)) { + print '
'; + print $temps; + print '
'; + } +} + print '
'; print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ' '; + print ''; + print $formproduct->selectMeasuringUnits("fk_unit", "time", $fk_unit_default, 0, 0); + print ''; + print ' '; + print ''; + print ' '; print ''; -print ''; + print ''; + print '
'; -print ''; -print ''; -print ''; -print ' '; -print ''; -print ''; -print '
'; + print ''; + print 'qty_frozen ? ' checked="checked"' : '')) . '>'; + print 'disable_stock_change ? ' checked="checked"' : '')) . '">'; + print ''; + print ''; + print ''; + print $formproduct->selectMeasuringUnits("fk_unit", "time", ($line->fk_unit) ? $line->fk_unit : '', 0, 0); + print ''; + print ''; print 'qty_frozen ? ' checked="checked"' : '')).'>'; -print 'disable_stock_change ? ' checked="checked"' : '')).'">'; -print ''; -print ''; -print ''; $coldisplay += $colspan; @@ -138,8 +170,4 @@ print '\n"; diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php index dff3a38ccd2..5252baf61ca 100644 --- a/htdocs/bom/tpl/objectline_title.tpl.php +++ b/htdocs/bom/tpl/objectline_title.tpl.php @@ -38,6 +38,10 @@ if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } + +global $filtertype; +if (empty($filtertype)) $filtertype = 0; + print "\n"; @@ -53,30 +57,42 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { // Product or sub-bom print ''.$langs->trans('Description'); -if (!empty($conf->global->BOM_SUB_BOM)) { +if (!empty($conf->global->BOM_SUB_BOM) && $filtertype != 1) { print '   '.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'  '; print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' '; } print ''.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).''.$form->textwithpicto($langs->trans('Qty'), ($filtertype != 1) ? $langs->trans("QtyRequiredIfNoLoss") : '').''.$langs->trans('Unit').'' . $langs->trans('Unit') . '' . $form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")) . '' . $form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')) . '' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . ''.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'' . $form->textwithpicto($langs->trans('Unit'), '').'' . $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . ''.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCostService")).''.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).''.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).''.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).''.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).''; @@ -100,29 +118,54 @@ $coldisplay++; echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price print ''; - $label = $tmpproduct->getLabelOfUnit('long'); - if ($label !== '') { - print $langs->trans($label); +if ($filtertype != 1) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + $label = $tmpproduct->getLabelOfUnit('long'); + if ($label !== '') { + print $langs->trans($label); + } + print ''; + $coldisplay++; + echo $line->qty_frozen ? yn($line->qty_frozen) : ''; print ''; + $coldisplay++; + echo $line->disable_stock_change ? yn($line->disable_stock_change) : ''; // Yes, it is a quantity, not a price, but we just want the formating role of function price + print ''; + $coldisplay++; + echo $line->efficiency; + print ''; + $coldisplay++; + + if (!empty($line->fk_unit)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; + $unit = new CUnits($this->db); + $unit->fetch($line->fk_unit); + print (isset($unit->label) ? " ".$langs->trans(ucwords($unit->label))." " : ''); + } + + print ''; + $coldisplay++; + if ($res > 0) echo $workstation->getNomUrl(); + print ''; -$coldisplay++; -echo $line->qty_frozen ? yn($line->qty_frozen) : ''; -print ''; -$coldisplay++; -echo $line->disable_stock_change ? yn($line->disable_stock_change) : ''; // Yes, it is a quantity, not a price, but we just want the formating role of function price -print ''; -$coldisplay++; -echo $line->efficiency; -print ''; $coldisplay++; @@ -277,10 +320,4 @@ if ($total_cost > 0) { showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1, 'line'); -} - print "\n"; diff --git a/htdocs/bookcal/COPYING b/htdocs/bookcal/COPYING new file mode 100644 index 00000000000..94a04532226 --- /dev/null +++ b/htdocs/bookcal/COPYING @@ -0,0 +1,621 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS diff --git a/htdocs/bookcal/ChangeLog.md b/htdocs/bookcal/ChangeLog.md new file mode 100644 index 00000000000..992a3d0842c --- /dev/null +++ b/htdocs/bookcal/ChangeLog.md @@ -0,0 +1,5 @@ +# CHANGELOG BOOKCAL FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) + +## 1.0 + +Initial version diff --git a/htdocs/webhook/README.md b/htdocs/bookcal/README.md similarity index 89% rename from htdocs/webhook/README.md rename to htdocs/bookcal/README.md index 74fe79e76fd..73f2f616938 100644 --- a/htdocs/webhook/README.md +++ b/htdocs/bookcal/README.md @@ -1,11 +1,11 @@ -# WEBHOOK FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) +# BOOKCAL FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) ## Features Description of the module... Other external modules are available on [Dolistore.com](https://www.dolistore.com). @@ -58,11 +58,11 @@ Note: If this screen tell you that there is no "custom" directory, check that yo ### From a GIT repository -Clone the repository in ```$dolibarr_main_document_root_alt/webhook``` +Clone the repository in ```$dolibarr_main_document_root_alt/bookcal``` ```sh cd ....../custom -git clone git@github.com:gitlogin/webhook.git webhook +git clone git@github.com:gitlogin/bookcal.git bookcal ``` ### Final steps diff --git a/htdocs/bookcal/admin/about.php b/htdocs/bookcal/admin/about.php new file mode 100644 index 00000000000..85f0efcdebb --- /dev/null +++ b/htdocs/bookcal/admin/about.php @@ -0,0 +1,105 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 bookcal/admin/about.php + * \ingroup bookcal + * \brief About page of module BookCal. + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +// Libraries +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once '../lib/bookcal.lib.php'; + +// Translations +$langs->loadLangs(array("errors", "admin", "bookcal@bookcal")); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$form = new Form($db); + +$help_url = ''; +$page_name = "BookCalAbout"; + +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 = bookcalAdminPrepareHead(); +print dol_get_fiche_head($head, 'about', $langs->trans($page_name), 0, 'bookcal@bookcal'); + +dol_include_once('/bookcal/core/modules/modBookCal.class.php'); +$tmpmodule = new modBookCal($db); +print $tmpmodule->getDescLong(); + +// Page end +print dol_get_fiche_end(); +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/admin/availabilities_extrafields.php b/htdocs/bookcal/admin/availabilities_extrafields.php new file mode 100644 index 00000000000..9d16d7b5395 --- /dev/null +++ b/htdocs/bookcal/admin/availabilities_extrafields.php @@ -0,0 +1,145 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file admin/availabilities_extrafields.php + * \ingroup bookcal + * \brief Page to setup extra fields of availabilities + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once '../lib/bookcal.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('bookcal@bookcal', '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', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'bookcal_availabilities'; //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("Availabilities"); + +$help_url = ''; +$page_name = "BookCalSetup"; + +llxHeader('', $langs->trans("BookCalSetup"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); + + +$head = bookcalAdminPrepareHead(); + +print dol_get_fiche_head($head, 'availabilities_extrafields', $langs->trans($page_name), -1, 'bookcal@bookcal'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '
'; + print ''.$langs->trans("NewAttribute").''; + 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'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/admin/booking_extrafields.php b/htdocs/bookcal/admin/booking_extrafields.php new file mode 100644 index 00000000000..30122d95048 --- /dev/null +++ b/htdocs/bookcal/admin/booking_extrafields.php @@ -0,0 +1,145 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file admin/booking_extrafields.php + * \ingroup bookcal + * \brief Page to setup extra fields of booking + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once '../lib/bookcal.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('bookcal@bookcal', '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', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'bookcal_booking'; //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("Booking"); + +$help_url = ''; +$page_name = "BookCalSetup"; + +llxHeader('', $langs->trans("BookCalSetup"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); + + +$head = bookcalAdminPrepareHead(); + +print dol_get_fiche_head($head, 'booking_extrafields', $langs->trans($page_name), -1, 'bookcal@bookcal'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '
'; + print ''.$langs->trans("NewAttribute").''; + 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'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/admin/setup.php b/htdocs/bookcal/admin/setup.php new file mode 100644 index 00000000000..c4fd74404eb --- /dev/null +++ b/htdocs/bookcal/admin/setup.php @@ -0,0 +1,587 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 bookcal/admin/setup.php + * \ingroup bookcal + * \brief BookCal setup page. + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +global $langs, $user; + +// Libraries +require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; +require_once '../lib/bookcal.lib.php'; +//require_once "../class/myclass.class.php"; + +// Translations +$langs->loadLangs(array("admin", "bookcal@bookcal")); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bookcalsetup', 'globalsetup')); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + +$value = GETPOST('value', 'alpha'); +$label = GETPOST('label', 'alpha'); +$scandir = GETPOST('scan_dir', 'alpha'); +$type = 'myobject'; + + +$error = 0; +$setupnotempty = 0; + +// Set this to 1 to use the factory to manage constants. Warning, the generated module will be compatible with version v15+ only +$useFormSetup = 1; + +if (!class_exists('FormSetup')) { + // For retrocompatibility Dolibarr < 16.0 + if (floatval(DOL_VERSION) < 16.0 && !class_exists('FormSetup')) { + require_once __DIR__.'/../backport/v16/core/class/html.formsetup.class.php'; + } else { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php'; + } +} + +$formSetup = new FormSetup($db); + + +// Hôte +$item = $formSetup->newItem('NO_PARAM_JUST_TEXT'); +$item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST']; +$item->cssClass = 'minwidth500'; + +// Setup conf BOOKCAL_MYPARAM1 as a simple string input +$item = $formSetup->newItem('BOOKCAL_MYPARAM1'); +$item->defaultFieldValue = 'default value'; + +// Setup conf BOOKCAL_MYPARAM1 as a simple textarea input but we replace the text of field title +$item = $formSetup->newItem('BOOKCAL_MYPARAM2'); +$item->nameText = $item->getNameText().' more html text '; + +// Setup conf BOOKCAL_MYPARAM3 +$item = $formSetup->newItem('BOOKCAL_MYPARAM3'); +$item->setAsThirdpartyType(); + +// Setup conf BOOKCAL_MYPARAM4 : exemple of quick define write style +$formSetup->newItem('BOOKCAL_MYPARAM4')->setAsYesNo(); + +// Setup conf BOOKCAL_MYPARAM5 +$formSetup->newItem('BOOKCAL_MYPARAM5')->setAsEmailTemplate('thirdparty'); + +// Setup conf BOOKCAL_MYPARAM6 +$formSetup->newItem('BOOKCAL_MYPARAM6')->setAsSecureKey()->enabled = 0; // disabled + +// Setup conf BOOKCAL_MYPARAM7 +$formSetup->newItem('BOOKCAL_MYPARAM7')->setAsProduct(); + +$formSetup->newItem('Title')->setAsTitle(); + +// Setup conf BOOKCAL_MYPARAM8 +$item = $formSetup->newItem('BOOKCAL_MYPARAM8'); +$TField = array( + 'test01' => $langs->trans('test01'), + 'test02' => $langs->trans('test02'), + 'test03' => $langs->trans('test03'), + 'test04' => $langs->trans('test04'), + 'test05' => $langs->trans('test05'), + 'test06' => $langs->trans('test06'), +); +$item->setAsMultiSelect($TField); +$item->helpText = $langs->transnoentities('BOOKCAL_MYPARAM8'); + + +// Setup conf BOOKCAL_MYPARAM9 +$formSetup->newItem('BOOKCAL_MYPARAM9')->setAsSelect($TField); + + +// Setup conf BOOKCAL_MYPARAM10 +$item = $formSetup->newItem('BOOKCAL_MYPARAM10'); +$item->setAsColor(); +$item->defaultFieldValue = '#FF0000'; +$item->nameText = $item->getNameText().' more html text '; +$item->fieldInputOverride = ''; +$item->helpText = $langs->transnoentities('AnHelpMessage'); +//$item->fieldValue = ''; +//$item->fieldAttr = array() ; // fields attribute only for compatible fields like input text +//$item->fieldOverride = false; // set this var to override field output will override $fieldInputOverride and $fieldOutputOverride too +//$item->fieldInputOverride = false; // set this var to override field input +//$item->fieldOutputOverride = false; // set this var to override field output + + +$setupnotempty =+ count($formSetup->items); + + +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + + +/* + * Actions + */ + +// For retrocompatibility Dolibarr < 15.0 +if ( versioncompare(explode('.', DOL_VERSION), array(15)) < 0 && $action == 'update' && !empty($user->admin)) { + $formSetup->saveConfFromPost(); +} + +include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; + +if ($action == 'updateMask') { + $maskconst = GETPOST('maskconst', 'alpha'); + $maskvalue = GETPOST('maskvalue', 'alpha'); + + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'specimen') { + $modele = GETPOST('module', 'alpha'); + $tmpobjectkey = GETPOST('object'); + + $tmpobject = new $tmpobjectkey($db); + $tmpobject->initAsSpecimen(); + + // Search template files + $file = ''; $classname = ''; $filefound = 0; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $file = dol_buildpath($reldir."core/modules/bookcal/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); + if (file_exists($file)) { + $filefound = 1; + $classname = "pdf_".$modele."_".strtolower($tmpobjectkey); + break; + } + } + + if ($filefound) { + require_once $file; + + $module = new $classname($db); + + if ($module->write_file($tmpobject, $langs) > 0) { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bookcal-".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); + return; + } else { + setEventMessages($module->error, null, 'errors'); + dol_syslog($module->error, LOG_ERR); + } + } else { + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } +} elseif ($action == 'setmod') { + // TODO Check if numbering module chosen can be activated by calling method canBeActivated + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'BOOKCAL_'.strtoupper($tmpobjectkey)."_ADDON"; + dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'set') { + // Activate a model + $ret = addDocumentModel($value, $type, $label, $scandir); +} elseif ($action == 'del') { + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'BOOKCAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } + } + } +} elseif ($action == 'setdoc') { + // Set or unset default model + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'BOOKCAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { + // The constant that was read before the new set + // We therefore requires a variable to have a coherent view + $conf->global->$constforval = $value; + } + + // We disable/enable the document template (into llx_document_model table) + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $ret = addDocumentModel($value, $type, $label, $scandir); + } + } +} elseif ($action == 'unsetdoc') { + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'BOOKCAL_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + dolibarr_del_const($db, $constforval, $conf->entity); + } +} + + + +/* + * View + */ + +$form = new Form($db); + +$help_url = ''; +$page_name = "BookCalSetup"; + +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 = bookcalAdminPrepareHead(); +print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "bookcal@bookcal"); + +// Setup page goes here +echo ''.$langs->trans("BookCalSetupPage").'

'; + + +if ($action == 'edit') { + print $formSetup->generateOutput(true); + print '
'; +} elseif (!empty($formSetup->items)) { + print $formSetup->generateOutput(); + print '
'; + print ''.$langs->trans("Modify").''; + print '
'; +} else { + print '
'.$langs->trans("NothingToSetup"); +} + + +$moduledir = 'bookcal'; +$myTmpObjects = array(); +$myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + + +foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'MyObject') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + /* + * Orders Numbering model + */ + $setupnotempty++; + + print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', ''); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''."\n"; + + clearstatcache(); + + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/".$moduledir); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { + $file = substr($file, 0, dol_strlen($file) - 4); + + require_once $dir.'/'.$file.'.php'; + + $module = new $file($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } + + if ($module->isEnabled()) { + dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); + + print ''; + + // Show example of numbering model + print ''."\n"; + + print ''; + + $mytmpinstance = new $myTmpObjectKey($db); + $mytmpinstance->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; + + $nextval = $module->getNextValue($mytmpinstance); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= ''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { + $nextval = $langs->trans($nextval); + } + $htmltooltip .= $nextval.'
'; + } else { + $htmltooltip .= $langs->trans($module->error).'
'; + } + } + + print ''; + + print "\n"; + } + } + } + closedir($handle); + } + } + } + print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.$module->name."\n"; + print $module->info(); + print ''; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) { + $langs->load("errors"); + print '
'.$langs->trans($tmp).'
'; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } + print '
'; + $constforvar = 'BOOKCAL_'.strtoupper($myTmpObjectKey).'_ADDON'; + if (getDolGlobalString($constforvar) == $file) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '

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

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); + $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } + } + + print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "'; + $constforvar = 'BOOKCAL_'.strtoupper($myTmpObjectKey).'_ADDON'; + if (getDolGlobalString($constforvar) == $name) { + //print img_picto($langs->trans("Default"), 'on'); + // Even if choice is the default value, we allow to disable it. Replace this with previous line if you need to disable unset + print 'scandir).'&label='.urlencode($module->name).'&type='.urlencode($type).'" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; + } else { + print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + if ($module->type == 'pdf') { + $newname = preg_replace('/_'.preg_quote(strtolower($myTmpObjectKey), '/').'/', '', $name); + print ''.img_object($langs->trans("Preview"), 'pdf').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
'; + } +} + +if (empty($setupnotempty)) { + print '
'.$langs->trans("NothingToSetup"); +} + +// Page end +print dol_get_fiche_end(); + +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_agenda.php b/htdocs/bookcal/availabilities_agenda.php new file mode 100644 index 00000000000..c3e66a17257 --- /dev/null +++ b/htdocs/bookcal/availabilities_agenda.php @@ -0,0 +1,315 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_agenda.php + * \ingroup bookcal + * \brief Tab of events on Availabilities + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +dol_include_once('/bookcal/class/availabilities.class.php'); +dol_include_once('/bookcal/lib/bookcal_availabilities.lib.php'); + + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) { + $actioncode = '0'; + } +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} +$search_agenda_label = GETPOST('search_agenda_label'); + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitiesagenda', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bookcal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; +} + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permissiontoadd = $user->rights->bookcal->availabilities->write; +} else { + $permissiontoread = 1; + $permissiontoadd = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +$parameters = array('id'=>$id); +$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)) { + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + + // 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 + $actioncode = ''; + $search_agenda_label = ''; + } +} + + + +/* + * View + */ + +$form = new Form($db); + +if ($object->id > 0) { + $title = $langs->trans("Agenda"); + //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + $help_url = 'EN:Module_Agenda_En'; + llxHeader('', $title, $help_url); + + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } + $head = availabilitiesPrepareHead($object); + + + print dol_get_fiche_head($head, 'agenda', $langs->trans("Availabilities"), -1, $object->picto); + + // 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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + print '
'; + + $object->info($object->id); + dol_print_object_info($object, 1); + + print '
'; + + print dol_get_fiche_end(); + + + + // Actions buttons + + $objthirdparty = $object; + $objcon = new stdClass(); + + $out = '&origin='.urlencode($object->element.'@'.$object->module).'&originid='.urlencode($object->id); + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; + $out .= '&backtopage='.urlencode($urlbacktopage); + $permok = $user->rights->agenda->myactions->create; + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { + //$out.='trans("AddAnAction"),'filenew'); + //$out.=""; + } + + + print '
'; + + if (isModEnabled('agenda')) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { + print ''.$langs->trans("AddAction").''; + } else { + print ''.$langs->trans("AddAction").''; + } + } + + print '
'; + + if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + $param = '&id='.$object->id.(!empty($socid) ? '&socid='.$socid : ''); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + + + //print load_fiche_titre($langs->trans("ActionsOnAvailabilities"), '', ''); + + // List of all actions + $filters = array(); + $filters['search_agenda_label'] = $search_agenda_label; + + // TODO Replace this with same code than into list.php + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_card.php b/htdocs/bookcal/availabilities_card.php new file mode 100644 index 00000000000..b9f5277d4ae --- /dev/null +++ b/htdocs/bookcal/availabilities_card.php @@ -0,0 +1,627 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_card.php + * \ingroup bookcal + * \brief Page to create/edit/view availabilities + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification +//if (! defined('NOSESSION')) define('NOSESSION', '1'); // Disable session + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +dol_include_once('/bookcal/class/availabilities.class.php'); +dol_include_once('/bookcal/lib/bookcal_availabilities.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$lineid = GETPOST('lineid', 'int'); + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitiescard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$search_all = 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'; +} + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permissiontoadd = $user->rights->bookcal->availabilities->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + $permissiontodelete = $user->rights->bookcal->availabilities->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); + $permissionnote = $user->rights->bookcal->availabilities->write; // Used by the include of actions_setnotes.inc.php + $permissiondellink = $user->rights->bookcal->availabilities->write; // Used by the include of actions_dellink.inc.php +} else { + $permissiontoread = 1; + $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + $permissiontodelete = 1; + $permissionnote = 1; + $permissiondellink = 1; +} + +$upload_dir = $conf->bookcal->multidir_output[isset($object->entity) ? $object->entity : 1].'/availabilities'; + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +if (empty($reshook)) { + $error = 0; + + $backurlforlist = dol_buildpath('/bookcal/availabilities_list.php', 1); + + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/bookcal/availabilities_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); + } + } + } + + $triggermodname = 'BOOKCAL_AVAILABILITIES_MODIFY'; // Name of trigger action code to execute when we modify record + + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; + + // Action to build doc + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + + if ($action == 'set_thirdparty' && $permissiontoadd) { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); + } + if ($action == 'classin' && $permissiontoadd) { + $object->setProject(GETPOST('projectid', 'int')); + } + + // Actions to send emails + $triggersendname = 'BOOKCAL_AVAILABILITIES_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_AVAILABILITIES_TO'; + $trackid = 'availabilities'.$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); +$formproject = new FormProjets($db); + +$title = $langs->trans("Availabilities"); +$help_url = ''; +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +// print ''; + + +// Part to create +if ($action == 'create') { + if (empty($permissiontoadd)) { + accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); + exit; + } + + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Availabilities")), '', 'object_'.$object->picto); + + print '
'; + print ''; + print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_fiche_head(array(), ''); + + // Set some default values + //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue'; + + 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"; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel("Create"); + + print '
'; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("Availabilities"), '', 'object_'.$object->picto); + + print '
'; + print ''; + print ''; + print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_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 '
'; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel(); + + print '
'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = availabilitiesPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("Availabilities"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAvailabilities'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + if ($action == 'generate') { + print ' Link : '. DOL_DOCUMENT_ROOT.'/public/bookcal/booking.php?id='.$object->id . '' ; + } + + // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) + if ($action == 'xxx') { + $text = $langs->trans('ConfirmActionAvailabilities', $object->ref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('AVAILABILITIES_CLOSE', $object->socid, $object); + }*/ + + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $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, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, '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 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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + //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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + print ''."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + + print '
'; + + print dol_get_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) { + // Show object lines + $result = $object->getLinesArray(); + + print '
+ + + + + + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print ''; + } + + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) + $object->formAddObjectLine(1, $mysoc, $soc); + } + } + + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '
'; + } + print '
'; + + print "
\n"; + } + + + // 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 + if (empty($user->socid)) { + print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); + } + + // Back to draft + if ($object->status == $object::STATUS_VALIDATED) { + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + } + + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + + // Validate + if ($object->status == $object::STATUS_DRAFT) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { + print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); + } else { + $langs->load("errors"); + print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0); + } + } + + // Clone + print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); + + // Generate link + print dolGetButtonAction($langs->trans('generateLink'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=generate', '', $permissiontoadd); + + /* + if ($permissiontoadd) { + if ($object->status == $object::STATUS_ENABLED) { + print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd); + } else { + print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd); + } + } + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED) { + print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd); + } else { + print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd); + } + } + */ + + // Delete (need delete permission, or if draft, just need create/modify permission) + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + } + print '
'."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') { + print '
'; + print ''; // ancre + + $includedocgeneration = 0; + + // Documents + if ($includedocgeneration) { + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->bookcal->dir_output.'/'.$object->element.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content + $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('bookcal:Availabilities', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); + } + + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('availabilities')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '
'; + + $MAXEVENT = 10; + + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/bookcal/availabilities_agenda.php', 1).'?id='.$object->id); + + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); + + print '
'; + } + + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + // Presend form + $modelmail = 'availabilities'; + $defaulttopic = 'InformationMessage'; + $diroutput = $conf->bookcal->dir_output; + $trackid = 'availabilities'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_contact.php b/htdocs/bookcal/availabilities_contact.php new file mode 100644 index 00000000000..dd01e8bf046 --- /dev/null +++ b/htdocs/bookcal/availabilities_contact.php @@ -0,0 +1,226 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_contact.php + * \ingroup bookcal + * \brief Tab for contacts linked to Availabilities + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +dol_include_once('/bookcal/class/availabilities.class.php'); +dol_include_once('/bookcal/lib/bookcal_availabilities.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); + +$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$ref = GETPOST('ref', 'alpha'); +$lineid = GETPOST('lineid', 'int'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitiescontact', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permission = $user->rights->bookcal->availabilities->write; +} else { + $permissiontoread = 1; + $permission = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Add a new contact + */ + +if ($action == 'addcontact' && $permission) { + $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} elseif ($action == 'swapstatut' && $permission) { + // Toggle the status of a contact + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); +} elseif ($action == 'deletecontact' && $permission) { + // Deletes a contact + $result = $object->delete_contact($lineid); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + dol_print_error($db); + } +} + + +/* + * View + */ + +$title = $langs->trans('Availabilities')." - ".$langs->trans('ContactsAddresses'); +$help_url = ''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +$form = new Form($db); +$formcompany = new FormCompany($db); +$contactstatic = new Contact($db); +$userstatic = new User($db); + + +/* *************************************************************************** */ +/* */ +/* View and edit mode */ +/* */ +/* *************************************************************************** */ + +if ($object->id) { + /* + * Show tabs + */ + $head = availabilitiesPrepareHead($object); + + print dol_get_fiche_head($head, 'contact', $langs->trans("Availabilities"), -1, $object->picto); + + $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); + + print dol_get_fiche_end(); + + print '
'; + + // Contacts lines (modules that overwrite templates must declare this into descriptor) + $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); + foreach ($dirtpls as $reldir) { + $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); + if ($res) { + break; + } + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_document.php b/htdocs/bookcal/availabilities_document.php new file mode 100644 index 00000000000..5bab9356ee1 --- /dev/null +++ b/htdocs/bookcal/availabilities_document.php @@ -0,0 +1,261 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_document.php + * \ingroup bookcal + * \brief Tab for documents linked to Availabilities + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +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'; +dol_include_once('/bookcal/class/availabilities.class.php'); +dol_include_once('/bookcal/lib/bookcal_availabilities.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); + + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +// Get parameters +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} +//if (! $sortfield) $sortfield="position_name"; + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitiesdocument', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 + +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bookcal->multidir_output[$object->entity ? $object->entity : $conf->entity]."/availabilities/".get_exdir(0, 0, 0, 1, $object); +} + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permissiontoadd = $user->rights->bookcal->availabilities->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +} else { + $permissiontoread = 1; + $permissiontoadd = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans("Availabilities").' - '.$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 + */ + $head = availabilitiesPrepareHead($object); + + print dol_get_fiche_head($head, 'document', $langs->trans("Availabilities"), -1, $object->picto); + + + // Build file list + $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").''; + + $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + 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 '
'; + + print dol_get_fiche_end(); + + $modulepart = 'bookcal'; + //$permissiontoadd = $user->rights->bookcal->availabilities->write; + $permissiontoadd = 1; + //$permtoedit = $user->rights->bookcal->availabilities->write; + $permtoedit = 1; + $param = '&id='.$object->id; + + //$relativepathwithnofile='availabilities/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile = 'availabilities/'.dol_sanitizeFileName($object->ref).'/'; + + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; +} else { + accessforbidden('', 0, 1); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_list.php b/htdocs/bookcal/availabilities_list.php new file mode 100644 index 00000000000..6c5b4c2ed64 --- /dev/null +++ b/htdocs/bookcal/availabilities_list.php @@ -0,0 +1,845 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_list.php + * \ingroup bookcal + * \brief List page for availabilities + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification +//if (! defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +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'; + +// load bookcal libraries +require_once __DIR__.'/class/availabilities.class.php'; + +// for other modules +//dol_include_once('/othermodule/class/otherobject.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // 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') +$mode = GETPOST('mode', 'aZ'); + +// Load variable for pagination +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters + $page = 0; +} +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitieslist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (!$sortfield) { + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Initialize array of search criterias +$search_all = GETPOST('search_all', 'alphanohtml'); +$search = array(); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if (!empty($val['searchall'])) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +} + +// Definition of array of fields for columns +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=> isset($val['help']) ? $val['help'] : '' + ); + } +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permissiontoadd = $user->rights->bookcal->availabilities->write; + $permissiontodelete = $user->rights->bookcal->availabilities->delete; +} else { + $permissiontoread = 1; + $permissiontoadd = 1; + $permissiontodelete = 1; +} + +// Security check (enable the most restrictive one) +if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) accessforbidden(); +//$socid = 0; if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, 0, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden('Module not enabled'); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +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] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } + } + $toselect = array(); + $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 = 'Availabilities'; + $objectlabel = 'Availabilities'; + $uploaddir = $conf->bookcal->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form = new Form($db); + +$now = dol_now(); + +//$help_url = "EN:Module_Availabilities|FR:Module_Availabilities_FR|ES:Módulo_Availabilities"; +$help_url = ''; +$title = $langs->trans("Availabilitiess"); +$morejs = array(); +$morecss = array(); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// Add fields from extrafields +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['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 .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql = preg_replace('/,\s*$/', '', $sql); +//$sql .= ", COUNT(rc.rowid) as anotherfield"; +$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; +//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."anothertable as rc ON rc.parent = t.rowid"; +if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; +} +// Add table from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +if ($object->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; +} else { + $sql .= " WHERE 1 = 1"; +} +foreach ($search as $key => $val) { + if (array_key_exists($key, $object->fields)) { + if ($key == 'status' && $search[$key] == -1) { + continue; + } + $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); + if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'"; + } + } + } + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +} +//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); +// 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.".$db->escape($key).", "; +} +// Add fields from extrafields +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + } +} +// Add where from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +$sql = preg_replace('/,\s*$/', '', $sql); +*/ + +// Add HAVING from hooks +/* +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPrint; +*/ + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + /* This old and fast method to get and count full list returns all record so use a high amount of memory. + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + */ + /* The slow method does not consume memory on mysql (not tested on pgsql) */ + /*$resql = $db->query($sql, 0, 'auto', 1); + while ($db->fetch_object($resql)) { + if (empty($nbtotalofrecords)) { + $nbtotalofrecords = 1; // We can't make +1 because init value is '' + } else { + $nbtotalofrecords++; + } + }*/ + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } else { + dol_print_error($db); + } + + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + $page = 0; + $offset = 0; + } + $db->free($resql); +} + +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".dol_buildpath('/bookcal/availabilities_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); + +// Example : Adding jquery code +// print ''; + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} +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) { + if (is_array($search[$key]) && count($search[$key])) { + foreach ($search[$key] as $skey) { + if ($skey != '') { + $param .= '&search_'.$key.'[]='.urlencode($skey); + } + } + } elseif ($search[$key] != '') { + $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'; +// Add $param from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$param .= $hookmanager->resPrint; + +// List of mass actions available +$arrayofmassactions = array( + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if (!empty($permissiontodelete)) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print '
'."\n"; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + + +$newcardbutton = ''; +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitleSeparator(); +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/bookcal/availabilities_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail = "SendAvailabilitiesRef"; +$modelmail = "availabilities"; +$objecttmp = new Availabilities($db); +$trackid = 'xxxx'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($search_all) { + $setupstring = ''; + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; + } + print ''."\n"; + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'."\n"; +} + +$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, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // 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 ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} +foreach ($object->fields as $key => $val) { + $searchkey = empty($search[$key]) ? '' : $search[$key]; + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + 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; +/*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; +}*/ +// Action column +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} +print ''."\n"; + +$totalarray = array(); +$totalarray['nbfield'] = 0; + +// Fields title label +// -------------------------------------------------------------------- +print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label + if (!empty($arrayfields['t.'.$key]['checked'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; + $totalarray['nbfield']++; + } +} +// 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, 'totalarray'=>&$totalarray); +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +/*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; + $totalarray['nbfield']++; +}*/ +// Action column +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +$totalarray['nbfield']++; +print ''."\n"; + + +// Detect if we need a fetch on each output line +$needToFetchEachLine = 0; +if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['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; +$savnbfield = $totalarray['nbfield']; +$totalarray = array(); +$totalarray['nbfield'] = 0; +$imaxinloop = ($limit ? min($num, $limit) : $num); +while ($i < $imaxinloop) { + $obj = $db->fetch_object($resql); + if (empty($obj)) { + break; // Should not happen + } + + // Store properties in $object + $object->setVarsFromFetchObj($obj); + + if ($mode == 'kanban') { + if ($i == 0) { + print ''; + } + } else { + // Show here line of result + $j = 0; + print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } + + if (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif ($key == 'ref') { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + + if (!empty($arrayfields['t.'.$key]['checked'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'rowid') { + print $object->showOutputField($val, $key, $object->id, ''); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + if (!isset($totalarray['val'])) { + $totalarray['val'] = array(); + } + if (!isset($totalarray['val']['t.'.$key])) { + $totalarray['val']['t.'.$key] = 0; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + /*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; + }*/ + // Action column + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + if (!$i) { + $totalarray['nbfield']++; + } + + print ''."\n"; + } + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// 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, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { + print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1); + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '
'; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
'; + print '
'; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
'; + } elseif ($key == 'lang') { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($db); + print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2); + } else { + print ''; + } + print '
'; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'.$langs->trans("AnotherField").'
'; + print '
'; + } + // Output Kanban + print $object->getKanbanView(''); + if ($i == ($imaxinloop - 1)) { + print '
'; + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$obj->anotherfield.''; + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print '
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; + +print '
'."\n"; + +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { + $hidegeneratedfilelistifempty = 1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } + + 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 = $permissiontoread; + $delallowed = $permissiontoadd; + + print $formfile->showdocuments('massfilesarea_bookcal', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/availabilities_note.php b/htdocs/bookcal/availabilities_note.php new file mode 100644 index 00000000000..faae7a08834 --- /dev/null +++ b/htdocs/bookcal/availabilities_note.php @@ -0,0 +1,221 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 availabilities_note.php + * \ingroup bookcal + * \brief Tab for notes on Availabilities + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +dol_include_once('/bookcal/class/availabilities.class.php'); +dol_include_once('/bookcal/lib/bookcal_availabilities.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object = new Availabilities($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('availabilitiesnote', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bookcal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; +} + + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->availabilities->read; + $permissiontoadd = $user->rights->bookcal->availabilities->write; + $permissionnote = $user->rights->bookcal->availabilities->write; // Used by the include of actions_setnotes.inc.php +} else { + $permissiontoread = 1; + $permissiontoadd = 1; + $permissionnote = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} +if (empty($reshook)) { + 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 = ''; +$title = $langs->trans('Availabilities').' - '.$langs->trans("Notes"); +llxHeader('', $title, $help_url); + +if ($id > 0 || !empty($ref)) { + $object->fetch_thirdparty(); + + $head = availabilitiesPrepareHead($object); + + print dol_get_fiche_head($head, 'note', $langs->trans("Availabilities"), -1, $object->picto); + + // 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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } 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 '
'; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/bookcalindex.php b/htdocs/bookcal/bookcalindex.php new file mode 100644 index 00000000000..1b4e360e4ce --- /dev/null +++ b/htdocs/bookcal/bookcalindex.php @@ -0,0 +1,227 @@ + + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file bookcal/bookcalindex.php + * \ingroup bookcal + * \brief Home page of bookcal top menu + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal")); + +$action = GETPOST('action', 'aZ09'); + + +// Security check +// if (! $user->rights->bookcal->myobject->read) { +// accessforbidden(); +// } +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) { + $action = ''; + $socid = $user->socid; +} + +$max = 5; +$now = dol_now(); + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$form = new Form($db); +$formfile = new FormFile($db); + +llxHeader("", $langs->trans("BookCalArea")); + +print load_fiche_titre($langs->trans("BookCalArea"), '', 'bookcal.png@bookcal'); + +print '
'; + + +// BEGIN MODULEBUILDER DRAFT MYOBJECT +// Draft MyObject +if ($user->rights->bookcal->availabilities->read && !empty($conf->bookcal->enabled)) { + $langs->load("orders"); + + $sql = "SELECT rowid, `ref`, fk_soc, fk_project, description, note_public, note_private, date_creation, tms, fk_user_creat, fk_user_modif, last_main_doc, import_key, model_pdf, status, firstname, lastname, email, `start`, duration"; + $sql .= " FROM ". MAIN_DB_PREFIX . 'bookcal_booking'; + + $resql = $db->query($sql); + if ($resql) { + $total = 0; + $num = $db->num_rows($resql); + + print ''; + print ''; + print ''; + + $var = true; + print ' + + + + + + + + + '; + if ($num > 0) { + $i = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + print ''; + + $myobjectstatic->id=$obj->rowid; + $myobjectstatic->ref=$obj->ref; + $myobjectstatic->date = $obj->start; + $myobjectstatic->firstname = $obj->firstname; + $myobjectstatic->lastname = $obj->lastname; + $myobjectstatic->start = $obj->start; + $myobjectstatic->duration = $obj->duration; + $myobjectstatic->description = $obj->description; + + + print '"; + print '"; + print '"; + print '"; + print '"; + print '"; + $i++; + } + } else { + print ''; + } + print "
'.$langs->trans("Bookings").($num?''.$num.'':'').'
idrefnamedatehourdurationdescription
' . $myobjectstatic->id . "' . $myobjectstatic->ref . "' . $myobjectstatic->firstname . " " . $myobjectstatic->lastname . "' . $myobjectstatic->start . "' . $myobjectstatic->duration . "' . $myobjectstatic->description . "
'.$langs->trans("NoOrder").'

"; + + $db->free($resql); + } else { + dol_print_error($db); + } +} +//END MODULEBUILDER DRAFT MYOBJECT */ + + + +print '
'; + + +$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + +/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT +// Last modified myobject +if (! empty($conf->bookcal->enabled)) +{ + $sql = "SELECT rowid, `ref`, fk_soc, fk_project, description, note_public, note_private, date_creation, tms, fk_user_creat, fk_user_modif, last_main_doc, import_key, model_pdf, status, firstname, lastname, email, `start`, duration"; + $sql .= " FROM ". MAIN_DB_PREFIX . 'bookcal_booking'; + print "here2"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + print ''; + print ''; + print ''; + print ''; + print ''; + print $num; + if ($num) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + + $myobjectstatic->id=$objp->rowid; + $myobjectstatic->ref=$objp->ref; + $myobjectstatic->label=$objp->label; + $myobjectstatic->status = $objp->status; + + print ''; + print ''; + print '"; + print '"; + print ''; + $i++; + } + + $db->free($resql); + } else { + print ''; + } + print "
'; + print $langs->trans("BoxTitleLatestModifiedMyObjects", $max); + print ''.$langs->trans("DateModificationShort").'
'.$myobjectstatic->getNomUrl(1).''; + print "'.dol_print_date($db->jdate($objp->tms), 'day')."
'.$langs->trans("None").'

"; + } +} + +*/ +print '
'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/booking_agenda.php b/htdocs/bookcal/booking_agenda.php new file mode 100644 index 00000000000..dec1ebee921 --- /dev/null +++ b/htdocs/bookcal/booking_agenda.php @@ -0,0 +1,315 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 booking_agenda.php + * \ingroup bookcal + * \brief Tab of events on Booking + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +dol_include_once('/bookcal/class/booking.class.php'); +dol_include_once('/bookcal/lib/bookcal_booking.lib.php'); + + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) { + $actioncode = '0'; + } +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} +$search_agenda_label = GETPOST('search_agenda_label'); + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} + +// Initialize technical objects +$object = new Booking($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookingagenda', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bookcal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; +} + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->booking->read; + $permissiontoadd = $user->rights->bookcal->booking->write; +} else { + $permissiontoread = 1; + $permissiontoadd = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +$parameters = array('id'=>$id); +$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)) { + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + + // 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 + $actioncode = ''; + $search_agenda_label = ''; + } +} + + + +/* + * View + */ + +$form = new Form($db); + +if ($object->id > 0) { + $title = $langs->trans("Agenda"); + //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + $help_url = 'EN:Module_Agenda_En'; + llxHeader('', $title, $help_url); + + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } + $head = bookingPrepareHead($object); + + + print dol_get_fiche_head($head, 'agenda', $langs->trans("Booking"), -1, $object->picto); + + // 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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + print '
'; + + $object->info($object->id); + dol_print_object_info($object, 1); + + print '
'; + + print dol_get_fiche_end(); + + + + // Actions buttons + + $objthirdparty = $object; + $objcon = new stdClass(); + + $out = '&origin='.urlencode($object->element.'@'.$object->module).'&originid='.urlencode($object->id); + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; + $out .= '&backtopage='.urlencode($urlbacktopage); + $permok = $user->rights->agenda->myactions->create; + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { + //$out.='trans("AddAnAction"),'filenew'); + //$out.=""; + } + + + print '
'; + + if (isModEnabled('agenda')) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { + print ''.$langs->trans("AddAction").''; + } else { + print ''.$langs->trans("AddAction").''; + } + } + + print '
'; + + if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + $param = '&id='.$object->id.(!empty($socid) ? '&socid='.$socid : ''); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + + + //print load_fiche_titre($langs->trans("ActionsOnBooking"), '', ''); + + // List of all actions + $filters = array(); + $filters['search_agenda_label'] = $search_agenda_label; + + // TODO Replace this with same code than into list.php + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/booking_card.php b/htdocs/bookcal/booking_card.php new file mode 100644 index 00000000000..0240ab2dccc --- /dev/null +++ b/htdocs/bookcal/booking_card.php @@ -0,0 +1,620 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 booking_card.php + * \ingroup bookcal + * \brief Page to create/edit/view booking + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification +//if (! defined('NOSESSION')) define('NOSESSION', '1'); // Disable session + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +dol_include_once('/bookcal/class/booking.class.php'); +dol_include_once('/bookcal/lib/bookcal_booking.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$lineid = GETPOST('lineid', 'int'); + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); + +// Initialize technical objects +$object = new Booking($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookingcard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$search_all = 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'; +} + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->booking->read; + $permissiontoadd = $user->rights->bookcal->booking->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + $permissiontodelete = $user->rights->bookcal->booking->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); + $permissionnote = $user->rights->bookcal->booking->write; // Used by the include of actions_setnotes.inc.php + $permissiondellink = $user->rights->bookcal->booking->write; // Used by the include of actions_dellink.inc.php +} else { + $permissiontoread = 1; + $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + $permissiontodelete = 1; + $permissionnote = 1; + $permissiondellink = 1; +} + +$upload_dir = $conf->bookcal->multidir_output[isset($object->entity) ? $object->entity : 1].'/booking'; + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +if (empty($reshook)) { + $error = 0; + + $backurlforlist = dol_buildpath('/bookcal/booking_list.php', 1); + + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/bookcal/booking_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); + } + } + } + + $triggermodname = 'BOOKCAL_BOOKING_MODIFY'; // Name of trigger action code to execute when we modify record + + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; + + // Action to build doc + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + + if ($action == 'set_thirdparty' && $permissiontoadd) { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); + } + if ($action == 'classin' && $permissiontoadd) { + $object->setProject(GETPOST('projectid', 'int')); + } + + // Actions to send emails + $triggersendname = 'BOOKCAL_BOOKING_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_BOOKING_TO'; + $trackid = 'booking'.$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); +$formproject = new FormProjets($db); + +$title = $langs->trans("Booking"); +$help_url = ''; +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +// print ''; + + +// Part to create +if ($action == 'create') { + if (empty($permissiontoadd)) { + accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); + exit; + } + + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Booking")), '', 'object_'.$object->picto); + + print '
'; + print ''; + print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_fiche_head(array(), ''); + + // Set some default values + //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue'; + + 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"; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel("Create"); + + print '
'; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("Booking"), '', 'object_'.$object->picto); + + print '
'; + print ''; + print ''; + print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_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 '
'; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel(); + + print '
'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = bookingPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("Booking"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBooking'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) + if ($action == 'xxx') { + $text = $langs->trans('ConfirmActionBooking', $object->ref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOOKING_CLOSE', $object->socid, $object); + }*/ + + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $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, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, '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 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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + //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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + print ''."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + + print '
'; + + print dol_get_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) { + // Show object lines + $result = $object->getLinesArray(); + + print '
+ + + + + + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print ''; + } + + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) + $object->formAddObjectLine(1, $mysoc, $soc); + } + } + + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '
'; + } + print '
'; + + print "
\n"; + } + + + // 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 + if (empty($user->socid)) { + print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); + } + + // Back to draft + if ($object->status == $object::STATUS_VALIDATED) { + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + } + + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + + // Validate + if ($object->status == $object::STATUS_DRAFT) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { + print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); + } else { + $langs->load("errors"); + print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0); + } + } + + // Clone + print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); + + /* + if ($permissiontoadd) { + if ($object->status == $object::STATUS_ENABLED) { + print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd); + } else { + print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd); + } + } + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED) { + print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd); + } else { + print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd); + } + } + */ + + // Delete (need delete permission, or if draft, just need create/modify permission) + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + } + print '
'."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') { + print '
'; + print ''; // ancre + + $includedocgeneration = 0; + + // Documents + if ($includedocgeneration) { + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->bookcal->dir_output.'/'.$object->element.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content + $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('bookcal:Booking', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); + } + + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('booking')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '
'; + + $MAXEVENT = 10; + + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/bookcal/booking_agenda.php', 1).'?id='.$object->id); + + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); + + print '
'; + } + + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + // Presend form + $modelmail = 'booking'; + $defaulttopic = 'InformationMessage'; + $diroutput = $conf->bookcal->dir_output; + $trackid = 'booking'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/booking_contact.php b/htdocs/bookcal/booking_contact.php new file mode 100644 index 00000000000..923976adb47 --- /dev/null +++ b/htdocs/bookcal/booking_contact.php @@ -0,0 +1,226 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 booking_contact.php + * \ingroup bookcal + * \brief Tab for contacts linked to Booking + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +dol_include_once('/bookcal/class/booking.class.php'); +dol_include_once('/bookcal/lib/bookcal_booking.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); + +$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$ref = GETPOST('ref', 'alpha'); +$lineid = GETPOST('lineid', 'int'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); + +// Initialize technical objects +$object = new Booking($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookingcontact', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->booking->read; + $permission = $user->rights->bookcal->booking->write; +} else { + $permissiontoread = 1; + $permission = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Add a new contact + */ + +if ($action == 'addcontact' && $permission) { + $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} elseif ($action == 'swapstatut' && $permission) { + // Toggle the status of a contact + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); +} elseif ($action == 'deletecontact' && $permission) { + // Deletes a contact + $result = $object->delete_contact($lineid); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + dol_print_error($db); + } +} + + +/* + * View + */ + +$title = $langs->trans('Booking')." - ".$langs->trans('ContactsAddresses'); +$help_url = ''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +$form = new Form($db); +$formcompany = new FormCompany($db); +$contactstatic = new Contact($db); +$userstatic = new User($db); + + +/* *************************************************************************** */ +/* */ +/* View and edit mode */ +/* */ +/* *************************************************************************** */ + +if ($object->id) { + /* + * Show tabs + */ + $head = bookingPrepareHead($object); + + print dol_get_fiche_head($head, 'contact', $langs->trans("Booking"), -1, $object->picto); + + $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); + + print dol_get_fiche_end(); + + print '
'; + + // Contacts lines (modules that overwrite templates must declare this into descriptor) + $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); + foreach ($dirtpls as $reldir) { + $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); + if ($res) { + break; + } + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/booking_document.php b/htdocs/bookcal/booking_document.php new file mode 100644 index 00000000000..81342e1a7b6 --- /dev/null +++ b/htdocs/bookcal/booking_document.php @@ -0,0 +1,261 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 booking_document.php + * \ingroup bookcal + * \brief Tab for documents linked to Booking + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +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'; +dol_include_once('/bookcal/class/booking.class.php'); +dol_include_once('/bookcal/lib/bookcal_booking.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "companies", "other", "mails")); + + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +// Get parameters +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} +//if (! $sortfield) $sortfield="position_name"; + +// Initialize technical objects +$object = new Booking($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookingdocument', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$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 + +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bookcal->multidir_output[$object->entity ? $object->entity : $conf->entity]."/booking/".get_exdir(0, 0, 0, 1, $object); +} + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->booking->read; + $permissiontoadd = $user->rights->bookcal->booking->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +} else { + $permissiontoread = 1; + $permissiontoadd = 1; +} + +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden(); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans("Booking").' - '.$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 + */ + $head = bookingPrepareHead($object); + + print dol_get_fiche_head($head, 'document', $langs->trans("Booking"), -1, $object->picto); + + + // Build file list + $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").''; + + $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + 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 '
'; + + print dol_get_fiche_end(); + + $modulepart = 'bookcal'; + //$permissiontoadd = $user->rights->bookcal->booking->write; + $permissiontoadd = 1; + //$permtoedit = $user->rights->bookcal->booking->write; + $permtoedit = 1; + $param = '&id='.$object->id; + + //$relativepathwithnofile='booking/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile = 'booking/'.dol_sanitizeFileName($object->ref).'/'; + + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; +} else { + accessforbidden('', 0, 1); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/bookcal/booking_list.php b/htdocs/bookcal/booking_list.php new file mode 100644 index 00000000000..f4aac1e5ed8 --- /dev/null +++ b/htdocs/bookcal/booking_list.php @@ -0,0 +1,845 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 booking_list.php + * \ingroup bookcal + * \brief List page for booking + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//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). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification +//if (! defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +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'; + +// load bookcal libraries +require_once __DIR__.'/class/booking.class.php'; + +// for other modules +//dol_include_once('/othermodule/class/otherobject.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("bookcal@bookcal", "other")); + +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // 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') +$mode = GETPOST('mode', 'aZ'); + +// Load variable for pagination +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters + $page = 0; +} +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object = new Booking($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookinglist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (!$sortfield) { + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Initialize array of search criterias +$search_all = GETPOST('search_all', 'alphanohtml'); +$search = array(); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if (!empty($val['searchall'])) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +} + +// Definition of array of fields for columns +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=> isset($val['help']) ? $val['help'] : '' + ); + } +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +// There is several ways to check permission. +// Set $enablepermissioncheck to 1 to enable a minimum low level of checks +$enablepermissioncheck = 0; +if ($enablepermissioncheck) { + $permissiontoread = $user->rights->bookcal->booking->read; + $permissiontoadd = $user->rights->bookcal->booking->write; + $permissiontodelete = $user->rights->bookcal->booking->delete; +} else { + $permissiontoread = 1; + $permissiontoadd = 1; + $permissiontodelete = 1; +} + +// Security check (enable the most restrictive one) +if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) accessforbidden(); +//$socid = 0; if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, 0, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->bookcal->enabled)) accessforbidden('Module not enabled'); +if (!$permissiontoread) accessforbidden(); + + +/* + * Actions + */ + +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] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } + } + $toselect = array(); + $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 = 'Booking'; + $objectlabel = 'Booking'; + $uploaddir = $conf->bookcal->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form = new Form($db); + +$now = dol_now(); + +//$help_url = "EN:Module_Booking|FR:Module_Booking_FR|ES:Módulo_Booking"; +$help_url = ''; +$title = $langs->trans("Bookings"); +$morejs = array(); +$morecss = array(); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// Add fields from extrafields +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['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 .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql = preg_replace('/,\s*$/', '', $sql); +//$sql .= ", COUNT(rc.rowid) as anotherfield"; +$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; +//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."anothertable as rc ON rc.parent = t.rowid"; +if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; +} +// Add table from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +if ($object->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; +} else { + $sql .= " WHERE 1 = 1"; +} +foreach ($search as $key => $val) { + if (array_key_exists($key, $object->fields)) { + if ($key == 'status' && $search[$key] == -1) { + continue; + } + $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); + if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'"; + } + } + } + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +} +//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); +// 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.".$db->escape($key).", "; +} +// Add fields from extrafields +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + } +} +// Add where from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +$sql = preg_replace('/,\s*$/', '', $sql); +*/ + +// Add HAVING from hooks +/* +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPrint; +*/ + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + /* This old and fast method to get and count full list returns all record so use a high amount of memory. + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + */ + /* The slow method does not consume memory on mysql (not tested on pgsql) */ + /*$resql = $db->query($sql, 0, 'auto', 1); + while ($db->fetch_object($resql)) { + if (empty($nbtotalofrecords)) { + $nbtotalofrecords = 1; // We can't make +1 because init value is '' + } else { + $nbtotalofrecords++; + } + }*/ + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } else { + dol_print_error($db); + } + + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + $page = 0; + $offset = 0; + } + $db->free($resql); +} + +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".dol_buildpath('/bookcal/booking_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); + +// Example : Adding jquery code +// print ''; + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} +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) { + if (is_array($search[$key]) && count($search[$key])) { + foreach ($search[$key] as $skey) { + if ($skey != '') { + $param .= '&search_'.$key.'[]='.urlencode($skey); + } + } + } elseif ($search[$key] != '') { + $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'; +// Add $param from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$param .= $hookmanager->resPrint; + +// List of mass actions available +$arrayofmassactions = array( + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if (!empty($permissiontodelete)) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print '
'."\n"; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + + +$newcardbutton = ''; +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitleSeparator(); +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/bookcal/booking_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail = "SendBookingRef"; +$modelmail = "booking"; +$objecttmp = new Booking($db); +$trackid = 'xxxx'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($search_all) { + $setupstring = ''; + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; + } + print ''."\n"; + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'."\n"; +} + +$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, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // 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 ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} +foreach ($object->fields as $key => $val) { + $searchkey = empty($search[$key]) ? '' : $search[$key]; + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + 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; +/*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; +}*/ +// Action column +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} +print ''."\n"; + +$totalarray = array(); +$totalarray['nbfield'] = 0; + +// Fields title label +// -------------------------------------------------------------------- +print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label + if (!empty($arrayfields['t.'.$key]['checked'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; + $totalarray['nbfield']++; + } +} +// 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, 'totalarray'=>&$totalarray); +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +/*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; + $totalarray['nbfield']++; +}*/ +// Action column +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +$totalarray['nbfield']++; +print ''."\n"; + + +// Detect if we need a fetch on each output line +$needToFetchEachLine = 0; +if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['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; +$savnbfield = $totalarray['nbfield']; +$totalarray = array(); +$totalarray['nbfield'] = 0; +$imaxinloop = ($limit ? min($num, $limit) : $num); +while ($i < $imaxinloop) { + $obj = $db->fetch_object($resql); + if (empty($obj)) { + break; // Should not happen + } + + // Store properties in $object + $object->setVarsFromFetchObj($obj); + + if ($mode == 'kanban') { + if ($i == 0) { + print ''; + } + } else { + // Show here line of result + $j = 0; + print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } + + if (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif ($key == 'ref') { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + + if (!empty($arrayfields['t.'.$key]['checked'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'rowid') { + print $object->showOutputField($val, $key, $object->id, ''); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + if (!isset($totalarray['val'])) { + $totalarray['val'] = array(); + } + if (!isset($totalarray['val']['t.'.$key])) { + $totalarray['val']['t.'.$key] = 0; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + /*if (!empty($arrayfields['anotherfield']['checked'])) { + print ''; + }*/ + // Action column + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + if (!$i) { + $totalarray['nbfield']++; + } + + print ''."\n"; + } + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// 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, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { + print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1); + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '
'; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
'; + print '
'; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
'; + } elseif ($key == 'lang') { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($db); + print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2); + } else { + print ''; + } + print '
'; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'.$langs->trans("AnotherField").'
'; + print '
'; + } + // Output Kanban + print $object->getKanbanView(''); + if ($i == ($imaxinloop - 1)) { + print '
'; + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$obj->anotherfield.''; + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print '
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; + +print '
'."\n"; + +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { + $hidegeneratedfilelistifempty = 1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } + + 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 = $permissiontoread; + $delallowed = $permissiontoadd; + + print $formfile->showdocuments('massfilesarea_bookcal', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/webhook/target_note.php b/htdocs/bookcal/booking_note.php similarity index 87% rename from htdocs/webhook/target_note.php rename to htdocs/bookcal/booking_note.php index bb12d0947e8..f68ffcbd72b 100644 --- a/htdocs/webhook/target_note.php +++ b/htdocs/bookcal/booking_note.php @@ -1,6 +1,6 @@ - * Copyright (C) ---Put here your own copyright and developer email--- + * Copyright (C) 2022 Alice Adminson * * 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 @@ -17,9 +17,9 @@ */ /** - * \file target_note.php - * \ingroup webhook - * \brief Tab for notes on Target + * \file booking_note.php + * \ingroup bookcal + * \brief Tab for notes on Booking */ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db @@ -74,11 +74,11 @@ if (!$res) { die("Include of main fails"); } -dol_include_once('/webhook/class/target.class.php'); -dol_include_once('/webhook/lib/webhook_target.lib.php'); +dol_include_once('/bookcal/class/booking.class.php'); +dol_include_once('/bookcal/lib/bookcal_booking.lib.php'); // Load translation files required by the page -$langs->loadLangs(array("webhook@webhook", "companies")); +$langs->loadLangs(array("bookcal@bookcal", "companies")); // Get parameters $id = GETPOST('id', 'int'); @@ -88,17 +88,17 @@ $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects -$object = new Target($db); +$object = new Booking($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('targetnote', 'globalcard')); // Note that conf->hooks_modules contains array +$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('bookingnote', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->webhook->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; + $upload_dir = $conf->bookcal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } @@ -106,9 +106,9 @@ if ($id > 0 || !empty($ref)) { // Set $enablepermissioncheck to 1 to enable a minimum low level of checks $enablepermissioncheck = 0; if ($enablepermissioncheck) { - $permissiontoread = $user->rights->webhook->target->read; - $permissiontoadd = $user->rights->webhook->target->write; - $permissionnote = $user->rights->webhook->target->write; // Used by the include of actions_setnotes.inc.php + $permissiontoread = $user->rights->bookcal->booking->read; + $permissiontoadd = $user->rights->bookcal->booking->write; + $permissionnote = $user->rights->bookcal->booking->write; // Used by the include of actions_setnotes.inc.php } else { $permissiontoread = 1; $permissiontoadd = 1; @@ -120,7 +120,7 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->webhook->enabled)) accessforbidden(); +if (empty($conf->bookcal->enabled)) accessforbidden(); if (!$permissiontoread) accessforbidden(); @@ -146,19 +146,19 @@ $form = new Form($db); //$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; $help_url = ''; -$title = $langs->trans('Target').' - '.$langs->trans("Notes"); +$title = $langs->trans('Booking').' - '.$langs->trans("Notes"); llxHeader('', $title, $help_url); if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); - $head = targetPrepareHead($object); + $head = bookingPrepareHead($object); - print dol_get_fiche_head($head, 'note', $langs->trans("Target"), -1, $object->picto); + print dol_get_fiche_head($head, 'note', $langs->trans("Booking"), -1, $object->picto); // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -168,7 +168,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) + if (! empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php new file mode 100644 index 00000000000..cfbfc8eed88 --- /dev/null +++ b/htdocs/bookcal/class/availabilities.class.php @@ -0,0 +1,1089 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 class/availabilities.class.php + * \ingroup bookcal + * \brief This file is a CRUD class file for Availabilities (Create/Read/Update/Delete) + */ + +// Put here all includes required by your class file +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 Availabilities + */ +class Availabilities extends CommonObject +{ + /** + * @var string ID of module. + */ + public $module = 'bookcal'; + + /** + * @var string ID to identify managed object. + */ + public $element = 'availabilities'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'bookcal_availabilities'; + + /** + * @var int Does this object support multicompany module ? + * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table + */ + public $ismultientitymanaged = 0; + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 1; + + /** + * @var string String with name of icon for availabilities. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'availabilities@bookcal' if picto is file 'img/object_availabilities.png'. + */ + public $picto = 'fa-file'; + + + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + const STATUS_CANCELED = 9; + + + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'picto' is code of a picto to show before value in forms + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * '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_...). + * '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 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arrayofkeyval' to set a list of values if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel"). Note that type can be 'integer' or 'varchar' + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'validate' is 1 if need to validate with $this->validateField() + * 'copytoclipboard' is 1 or 2 to allow to add a picto to copy value into clipboard (1=picto after label, 2=picto after value) + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ + + // BEGIN MODULEBUILDER PROPERTIES + /** + * @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', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), + 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'validate'=>'1', 'comment'=>"Reference of object"), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>"Help text", 'showoncombobox'=>'2', 'validate'=>'1',), + 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), + 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), + 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), + 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'), 'validate'=>'1',), + 'start' => array('type'=>'date', 'label'=>'Start Date', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'isameasure'=>'1',), + 'end' => array('type'=>'date', 'label'=>'End Date', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'isameasure'=>'1',), + 'type' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>'1', 'position'=>49, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Customer', '1'=>'Supplier', '2'=>'Else'),), + 'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>47, 'notnull'=>1, 'visible'=>1, 'default'=>'30', 'isameasure'=>'1',), + 'startHour' => array('type'=>'integer', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>46, 'notnull'=>1, 'visible'=>-1,), + 'endHour' => array('type'=>'integer', 'label'=>'End Hour', 'enabled'=>'1', 'position'=>46.5, 'notnull'=>1, 'visible'=>-1,), + ); + public $rowid; + public $ref; + public $label; + public $description; + public $note_public; + public $note_private; + public $date_creation; + public $tms; + public $fk_user_creat; + public $fk_user_modif; + public $last_main_doc; + public $import_key; + public $model_pdf; + public $status; + public $start; + public $end; + public $type; + public $duration; + public $startHour; + public $endHour; + // END MODULEBUILDER PROPERTIES + + + // If this object has a subtable with lines + + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'bookcal_availabilitiesline'; + + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_availabilities'; + + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'Availabilitiesline'; + + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); + + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('bookcal_availabilitiesdet'); + + // /** + // * @var AvailabilitiesLine[] Array of subtable lines + // */ + // public $lines = array(); + + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + global $conf, $langs; + + $this->db = $db; + + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } + + // Example to show how to set values of fields definition dynamically + /*if ($user->rights->bookcal->availabilities->read) { + $this->fields['myfield']['visible'] = 1; + $this->fields['myfield']['noteditable'] = 0; + }*/ + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * 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) + { + $resultcreate = $this->createCommon($user, $notrigger); + + //$resultvalidate = $this->validate($user, $notrigger); + + return $resultcreate; + } + + /** + * Clone an 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 $langs, $extrafields; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $result = $object->fetchCommon($fromid); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } + + // get lines so they will be clone + //foreach($this->lines as $line) + // $line->fetch_optionals(); + + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } + // ... + // Clear extrafields that are unique + if (is_array($object->array_options) && count($object->array_options) > 0) { + $extrafields->fetch_name_optionals_label($this->table_element); + foreach ($object->array_options as $key => $option) { + $shortkey = preg_replace('/options_/', '', $key); + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { + //var_dump($key); + //var_dump($clonedObj->array_options[$key]); exit; + unset($object->array_options[$key]); + } + } + } + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + if (!$error) { + // copy internal contacts + if ($this->copy_linked_contact($object, 'internal') < 0) { + $error++; + } + } + + if (!$error) { + // copy external contacts if same company + if (!empty($object->socid) && property_exists($this, 'fk_soc') && $this->fk_soc == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { + $error++; + } + } + } + + unset($object->context['createfromclone']); + + // 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(); + + $result = $this->fetchLinesCommon(); + return $result; + } + + + /** + * Load list of objects in memory from the database. + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit limit + * @param int $offset Offset + * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) + * @param string $filtermode Filter mode (AND or OR) + * @return array|int int <0 if KO, array of pages if OK + */ + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { + global $conf; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $records = array(); + + $sql = "SELECT "; + $sql .= $this->getFieldList('t'); + $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity($this->element).")"; + } else { + $sql .= " WHERE 1 = 1"; + } + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sqlwhere[] = $key." = ".((int) $value); + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")"; + } else { + $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'"; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= " AND (".implode(" ".$filtermode." ", $sqlwhere).")"; + } + + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= $this->db->plimit($limit, $offset); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < ($limit ? min($limit, $num) : $num)) { + $obj = $this->db->fetch_object($resql); + + $record = new self($this->db); + $record->setVarsFromFetchObj($obj); + + $records[$record->id] = $record; + + $i++; + } + $this->db->free($resql); + + return $records; + } else { + $this->errors[] = 'Error '.$this->db->lasterror(); + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + + /** + * 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 $this->deleteCommon($user, $notrigger, 1); + } + + /** + * Delete a line of object in database + * + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int >0 if OK, <0 if KO + */ + public function deleteLine(User $user, $idline, $notrigger = false) + { + if ($this->status < 0) { + $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; + return -2; + } + + return $this->deleteLineCommon($user, $idline, $notrigger); + } + + + /** + * Validate object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function validate($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_VALIDATED) { + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->availabilities->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->availabilities->availabilities_advance->validate)))) + { + $this->error='NotEnoughPermissions'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); + return -1; + }*/ + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life + $num = $this->getNextNumRef(); + } else { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Validate + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_VALIDATED; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."'"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".((int) $user->id); + } + $sql .= " WHERE rowid = ".((int) $this->id); + + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('AVAILABILITIES_VALIDATE', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } + } + + if (!$error) { + $this->oldref = $this->ref; + + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) { + // Now we rename also files into index + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'availabilities/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'availabilities/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; $this->error = $this->db->lasterror(); + } + + // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->bookcal->dir_output.'/availabilities/'.$oldref; + $dirdest = $conf->bookcal->dir_output.'/availabilities/'.$newref; + if (!$error && file_exists($dirsource)) { + dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); + + if (@rename($dirsource, $dirdest)) { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->bookcal->dir_output.'/availabilities/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } + + // Set new ref and current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_VALIDATED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDraft($user, $notrigger = 0) + { + // Protection + if ($this->status <= self::STATUS_DRAFT) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'AVAILABILITIES_UNVALIDATE'); + } + + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function cancel($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_VALIDATED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'AVAILABILITIES_CANCEL'); + } + + /** + * Set back to validated status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function reopen($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_CANCELED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'AVAILABILITIES_REOPEN'); + } + + /** + * 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 + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } + + $result = ''; + + $label = img_picto('', $this->picto).' '.$langs->trans("Availabilities").''; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } + $label .= '
'; + $label .= ''.$langs->trans('Ref').': '.$this->ref; + + $url = dol_buildpath('/bookcal/availabilities_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 ($url && $add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } + } + + $linkclose = ''; + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + $label = $langs->trans("ShowAvailabilities"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } + + if ($option == 'nolink' || empty($url)) { + $linkstart = ''; + if ($option == 'nolink' || empty($url)) { + $linkend = ''; + } else { + $linkend = ''; + } + + $result .= $linkstart; + + if (empty($this->showphoto_on_popup)) { + 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); + } + } else { + if ($withpicto) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + list($class, $module) = explode('@', $this->picto); + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); + $filearray = dol_dir_list($upload_dir, "files"); + $filename = $filearray[0]['name']; + if (!empty($filename)) { + $pospoint = strpos($filearray[0]['name'], '.'); + + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); + if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { + $result .= '
No photo
'; + } else { + $result .= '
No photo
'; + } + + $result .= '
'; + } else { + $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)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('availabilitiesdao')); + $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; + } + + /** + * Return the label of the 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 + */ + public function getLabelStatus($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + /** + * Return the label of the 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 + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * 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 + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("bookcal@bookcal"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + } + + $statusType = 'status'.$status; + //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status6'; + } + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } + + /** + * Load the info information in the object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + $sql = "SELECT rowid,"; + $sql .= " 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 = ".((int) $id); + + $result = $this->db->query($sql); + if ($result) { + if ($this->db->num_rows($result)) { + $obj = $this->db->fetch_object($result); + + $this->id = $obj->rowid; + + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; + if (!empty($obj->fk_user_valid)) { + $this->user_validation_id = $obj->fk_user_valid; + } + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); + if (!empty($obj->datev)) { + $this->date_validation = empty($obj->datev) ? '' : $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() + { + // Set here init that are not commonf fields + // $this->property1 = ... + // $this->property2 = ... + + $this->initAsSpecimenCommon(); + } + + /** + * Create an array of lines + * + * @return array|int array of lines if OK, <0 if KO + */ + public function getLinesArray() + { + $this->lines = array(); + + $objectline = new AvailabilitiesLine($this->db); + $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_availabilities = '.((int) $this->id))); + + if (is_numeric($result)) { + $this->error = $objectline->error; + $this->errors = $objectline->errors; + return $result; + } else { + $this->lines = $result; + return $this->lines; + } + } + + /** + * Returns the reference to the following non used object depending on the active numbering module. + * + * @return string Object free reference + */ + public function getNextNumRef() + { + global $langs, $conf; + $langs->load("bookcal@bookcal"); + + if (empty($conf->global->BOOKCAL_AVAILABILITIES_ADDON)) { + $conf->global->BOOKCAL_AVAILABILITIES_ADDON = 'mod_availabilities_standard'; + } + + if (!empty($conf->global->BOOKCAL_AVAILABILITIES_ADDON)) { + $mybool = false; + + $file = $conf->global->BOOKCAL_AVAILABILITIES_ADDON.".php"; + $classname = $conf->global->BOOKCAL_AVAILABILITIES_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/bookcal/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + if (class_exists($classname)) { + $obj = new $classname(); + $numref = $obj->getNextValue($this); + + if ($numref != '' && $numref != '-1') { + return $numref; + } else { + $this->error = $obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + return ""; + } + } else { + print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; + return ""; + } + } else { + print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); + return ""; + } + } + + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @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, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) + { + global $conf, $langs; + + $result = 0; + $includedocgeneration = 0; + + $langs->load("bookcal@bookcal"); + + if (!dol_strlen($modele)) { + $modele = 'standard_availabilities'; + + if (!empty($this->model_pdf)) { + $modele = $this->model_pdf; + } elseif (!empty($conf->global->AVAILABILITIES_ADDON_PDF)) { + $modele = $conf->global->AVAILABILITIES_ADDON_PDF; + } + } + + $modelpath = "core/modules/bookcal/doc/"; + + if ($includedocgeneration && !empty($modele)) { + $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + } + + return $result; + } + + /** + * Action executed by scheduler + * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters + * + * @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; + + //$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log'; + + $error = 0; + $this->output = ''; + $this->error = ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $now = dol_now(); + + $this->db->begin(); + + // ... + + $this->db->commit(); + + return $error; + } +} + + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; + +/** + * Class AvailabilitiesLine. You can also remove this and generate a CRUD class for lines objects. + */ +class AvailabilitiesLine extends CommonObjectLine +{ + // To complete with content of an object AvailabilitiesLine + // We should have a field rowid, fk_availabilities and position + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 0; + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + $this->db = $db; + } +} diff --git a/htdocs/bookcal/class/booking.class.php b/htdocs/bookcal/class/booking.class.php new file mode 100644 index 00000000000..a74cb87a43d --- /dev/null +++ b/htdocs/bookcal/class/booking.class.php @@ -0,0 +1,1089 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 class/booking.class.php + * \ingroup bookcal + * \brief This file is a CRUD class file for Booking (Create/Read/Update/Delete) + */ + +// Put here all includes required by your class file +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 Booking + */ +class Booking extends CommonObject +{ + /** + * @var string ID of module. + */ + public $module = 'bookcal'; + + /** + * @var string ID to identify managed object. + */ + public $element = 'booking'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'bookcal_booking'; + + /** + * @var int Does this object support multicompany module ? + * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table + */ + public $ismultientitymanaged = 0; + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 1; + + /** + * @var string String with name of icon for booking. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'booking@bookcal' if picto is file 'img/object_booking.png'. + */ + public $picto = 'fa-file'; + + + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + const STATUS_CANCELED = 9; + + + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'picto' is code of a picto to show before value in forms + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * '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_...). + * '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 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arrayofkeyval' to set a list of values if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel"). Note that type can be 'integer' or 'varchar' + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'validate' is 1 if need to validate with $this->validateField() + * 'copytoclipboard' is 1 or 2 to allow to add a picto to copy value into clipboard (1=picto after label, 2=picto after value) + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ + + // BEGIN MODULEBUILDER PROPERTIES + /** + * @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', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), + 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1.2, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'validate'=>'1', 'comment'=>"Reference of object"), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'help'=>"LinkToThirparty", 'validate'=>'1',), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'validate'=>'1',), + 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), + 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), + 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), + 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'), 'validate'=>'1',), + 'firstname' => array('type'=>'varchar(128)', 'label'=>'firstname', 'enabled'=>'1', 'position'=>2, 'notnull'=>1, 'visible'=>-1,), + 'lastname' => array('type'=>'varchar(128)', 'label'=>'lastname', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>-1,), + 'email' => array('type'=>'varchar(128)', 'label'=>'email', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>-1,), + 'start' => array('type'=>'datetime', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>-1,), + 'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>-1,), + ); + public $rowid; + public $ref; + public $fk_soc; + public $fk_project; + public $description; + public $note_public; + public $note_private; + public $date_creation; + public $tms; + public $fk_user_creat; + public $fk_user_modif; + public $last_main_doc; + public $import_key; + public $model_pdf; + public $status; + public $firstname; + public $lastname; + public $email; + public $start; + public $duration; + // END MODULEBUILDER PROPERTIES + + + // If this object has a subtable with lines + + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'bookcal_bookingline'; + + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_booking'; + + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'Bookingline'; + + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); + + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('bookcal_bookingdet'); + + // /** + // * @var BookingLine[] Array of subtable lines + // */ + // public $lines = array(); + + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + global $conf, $langs; + + $this->db = $db; + + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } + + // Example to show how to set values of fields definition dynamically + /*if ($user->rights->bookcal->booking->read) { + $this->fields['myfield']['visible'] = 1; + $this->fields['myfield']['noteditable'] = 0; + }*/ + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * 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) + { + $resultcreate = $this->createCommon($user, $notrigger); + + //$resultvalidate = $this->validate($user, $notrigger); + + return $resultcreate; + } + + /** + * Clone an 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 $langs, $extrafields; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $result = $object->fetchCommon($fromid); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } + + // get lines so they will be clone + //foreach($this->lines as $line) + // $line->fetch_optionals(); + + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } + // ... + // Clear extrafields that are unique + if (is_array($object->array_options) && count($object->array_options) > 0) { + $extrafields->fetch_name_optionals_label($this->table_element); + foreach ($object->array_options as $key => $option) { + $shortkey = preg_replace('/options_/', '', $key); + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { + //var_dump($key); + //var_dump($clonedObj->array_options[$key]); exit; + unset($object->array_options[$key]); + } + } + } + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + if (!$error) { + // copy internal contacts + if ($this->copy_linked_contact($object, 'internal') < 0) { + $error++; + } + } + + if (!$error) { + // copy external contacts if same company + if (!empty($object->socid) && property_exists($this, 'fk_soc') && $this->fk_soc == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { + $error++; + } + } + } + + unset($object->context['createfromclone']); + + // 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(); + + $result = $this->fetchLinesCommon(); + return $result; + } + + + /** + * Load list of objects in memory from the database. + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit limit + * @param int $offset Offset + * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) + * @param string $filtermode Filter mode (AND or OR) + * @return array|int int <0 if KO, array of pages if OK + */ + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { + global $conf; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $records = array(); + + $sql = "SELECT "; + $sql .= $this->getFieldList('t'); + $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity($this->element).")"; + } else { + $sql .= " WHERE 1 = 1"; + } + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sqlwhere[] = $key." = ".((int) $value); + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")"; + } else { + $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'"; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= " AND (".implode(" ".$filtermode." ", $sqlwhere).")"; + } + + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= $this->db->plimit($limit, $offset); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < ($limit ? min($limit, $num) : $num)) { + $obj = $this->db->fetch_object($resql); + + $record = new self($this->db); + $record->setVarsFromFetchObj($obj); + + $records[$record->id] = $record; + + $i++; + } + $this->db->free($resql); + + return $records; + } else { + $this->errors[] = 'Error '.$this->db->lasterror(); + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + + /** + * 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 $this->deleteCommon($user, $notrigger, 1); + } + + /** + * Delete a line of object in database + * + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int >0 if OK, <0 if KO + */ + public function deleteLine(User $user, $idline, $notrigger = false) + { + if ($this->status < 0) { + $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; + return -2; + } + + return $this->deleteLineCommon($user, $idline, $notrigger); + } + + + /** + * Validate object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function validate($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_VALIDATED) { + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->booking->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->booking->booking_advance->validate)))) + { + $this->error='NotEnoughPermissions'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); + return -1; + }*/ + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life + $num = $this->getNextNumRef(); + } else { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Validate + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_VALIDATED; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."'"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".((int) $user->id); + } + $sql .= " WHERE rowid = ".((int) $this->id); + + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('BOOKING_VALIDATE', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } + } + + if (!$error) { + $this->oldref = $this->ref; + + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) { + // Now we rename also files into index + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'booking/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'booking/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; $this->error = $this->db->lasterror(); + } + + // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->bookcal->dir_output.'/booking/'.$oldref; + $dirdest = $conf->bookcal->dir_output.'/booking/'.$newref; + if (!$error && file_exists($dirsource)) { + dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); + + if (@rename($dirsource, $dirdest)) { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->bookcal->dir_output.'/booking/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } + + // Set new ref and current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_VALIDATED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDraft($user, $notrigger = 0) + { + // Protection + if ($this->status <= self::STATUS_DRAFT) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'BOOKING_UNVALIDATE'); + } + + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function cancel($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_VALIDATED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'BOOKING_CANCEL'); + } + + /** + * Set back to validated status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function reopen($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_CANCELED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bookcal->bookcal_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'BOOKING_REOPEN'); + } + + /** + * 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 + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } + + $result = ''; + + $label = img_picto('', $this->picto).' '.$langs->trans("Booking").''; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } + $label .= '
'; + $label .= ''.$langs->trans('Ref').': '.$this->ref; + + $url = dol_buildpath('/bookcal/booking_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 ($url && $add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } + } + + $linkclose = ''; + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + $label = $langs->trans("ShowBooking"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } + + if ($option == 'nolink' || empty($url)) { + $linkstart = ''; + if ($option == 'nolink' || empty($url)) { + $linkend = ''; + } else { + $linkend = ''; + } + + $result .= $linkstart; + + if (empty($this->showphoto_on_popup)) { + 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); + } + } else { + if ($withpicto) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + list($class, $module) = explode('@', $this->picto); + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); + $filearray = dol_dir_list($upload_dir, "files"); + $filename = $filearray[0]['name']; + if (!empty($filename)) { + $pospoint = strpos($filearray[0]['name'], '.'); + + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); + if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { + $result .= '
No photo
'; + } else { + $result .= '
No photo
'; + } + + $result .= ''; + } else { + $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)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('bookingdao')); + $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; + } + + /** + * Return the label of the 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 + */ + public function getLabelStatus($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + /** + * Return the label of the 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 + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * 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 + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("bookcal@bookcal"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); + } + + $statusType = 'status'.$status; + //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status6'; + } + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } + + /** + * Load the info information in the object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + $sql = "SELECT rowid,"; + $sql .= " 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 = ".((int) $id); + + $result = $this->db->query($sql); + if ($result) { + if ($this->db->num_rows($result)) { + $obj = $this->db->fetch_object($result); + + $this->id = $obj->rowid; + + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; + if (!empty($obj->fk_user_valid)) { + $this->user_validation_id = $obj->fk_user_valid; + } + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); + if (!empty($obj->datev)) { + $this->date_validation = empty($obj->datev) ? '' : $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() + { + // Set here init that are not commonf fields + // $this->property1 = ... + // $this->property2 = ... + + $this->initAsSpecimenCommon(); + } + + /** + * Create an array of lines + * + * @return array|int array of lines if OK, <0 if KO + */ + public function getLinesArray() + { + $this->lines = array(); + + $objectline = new BookingLine($this->db); + $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_booking = '.((int) $this->id))); + + if (is_numeric($result)) { + $this->error = $objectline->error; + $this->errors = $objectline->errors; + return $result; + } else { + $this->lines = $result; + return $this->lines; + } + } + + /** + * Returns the reference to the following non used object depending on the active numbering module. + * + * @return string Object free reference + */ + public function getNextNumRef() + { + global $langs, $conf; + $langs->load("bookcal@bookcal"); + + if (empty($conf->global->BOOKCAL_BOOKING_ADDON)) { + $conf->global->BOOKCAL_BOOKING_ADDON = 'mod_booking_standard'; + } + + if (!empty($conf->global->BOOKCAL_BOOKING_ADDON)) { + $mybool = false; + + $file = $conf->global->BOOKCAL_BOOKING_ADDON.".php"; + $classname = $conf->global->BOOKCAL_BOOKING_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/bookcal/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + if (class_exists($classname)) { + $obj = new $classname(); + $numref = $obj->getNextValue($this); + + if ($numref != '' && $numref != '-1') { + return $numref; + } else { + $this->error = $obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + return ""; + } + } else { + print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; + return ""; + } + } else { + print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); + return ""; + } + } + + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @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, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) + { + global $conf, $langs; + + $result = 0; + $includedocgeneration = 0; + + $langs->load("bookcal@bookcal"); + + if (!dol_strlen($modele)) { + $modele = 'standard_booking'; + + if (!empty($this->model_pdf)) { + $modele = $this->model_pdf; + } elseif (!empty($conf->global->BOOKING_ADDON_PDF)) { + $modele = $conf->global->BOOKING_ADDON_PDF; + } + } + + $modelpath = "core/modules/bookcal/doc/"; + + if ($includedocgeneration && !empty($modele)) { + $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + } + + return $result; + } + + /** + * Action executed by scheduler + * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters + * + * @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; + + //$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log'; + + $error = 0; + $this->output = ''; + $this->error = ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $now = dol_now(); + + $this->db->begin(); + + // ... + + $this->db->commit(); + + return $error; + } +} + + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; + +/** + * Class BookingLine. You can also remove this and generate a CRUD class for lines objects. + */ +class BookingLine extends CommonObjectLine +{ + // To complete with content of an object BookingLine + // We should have a field rowid, fk_booking and position + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 0; + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + $this->db = $db; + } +} diff --git a/htdocs/bookcal/lib/bookcal.lib.php b/htdocs/bookcal/lib/bookcal.lib.php new file mode 100644 index 00000000000..bc60468fb1d --- /dev/null +++ b/htdocs/bookcal/lib/bookcal.lib.php @@ -0,0 +1,68 @@ + + * + * 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 bookcal/lib/bookcal.lib.php + * \ingroup bookcal + * \brief Library files with common functions for BookCal + */ + +/** + * Prepare admin pages header + * + * @return array + */ +function bookcalAdminPrepareHead() +{ + global $langs, $conf; + + $langs->load("bookcal@bookcal"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/bookcal/admin/setup.php", 1); + $head[$h][1] = $langs->trans("Settings"); + $head[$h][2] = 'settings'; + $h++; + + /* + $head[$h][0] = dol_buildpath("/bookcal/admin/myobject_extrafields.php", 1); + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'myobject_extrafields'; + $h++; + */ + + $head[$h][0] = dol_buildpath("/bookcal/admin/about.php", 1); + $head[$h][1] = $langs->trans("About"); + $head[$h][2] = 'about'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'bookcal@bookcal'); + + complete_head_from_modules($conf, $langs, null, $head, $h, 'bookcal@bookcal', 'remove'); + + return $head; +} diff --git a/htdocs/bookcal/lib/bookcal_availabilities.lib.php b/htdocs/bookcal/lib/bookcal_availabilities.lib.php new file mode 100644 index 00000000000..83d204a2d76 --- /dev/null +++ b/htdocs/bookcal/lib/bookcal_availabilities.lib.php @@ -0,0 +1,110 @@ + + * + * 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 lib/bookcal_availabilities.lib.php + * \ingroup bookcal + * \brief Library files with common functions for Availabilities + */ + +/** + * Prepare array of tabs for Availabilities + * + * @param Availabilities $object Availabilities + * @return array Array of tabs + */ +function availabilitiesPrepareHead($object) +{ + global $db, $langs, $conf; + + $langs->load("bookcal@bookcal"); + + $showtabofpagecontact = 1; + $showtabofpagenote = 1; + $showtabofpagedocument = 1; + $showtabofpageagenda = 1; + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/bookcal/availabilities_card.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + if ($showtabofpagecontact) { + $head[$h][0] = dol_buildpath("/bookcal/availabilities_contact.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Contacts"); + $head[$h][2] = 'contact'; + $h++; + } + + if ($showtabofpagenote) { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { + $nbNote = 0; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } + $head[$h][0] = dol_buildpath('/bookcal/availabilities_note.php', 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + if ($nbNote > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.$nbNote.'' : ''); + } + $head[$h][2] = 'note'; + $h++; + } + } + + if ($showtabofpagedocument) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->bookcal->dir_output."/availabilities/".dol_sanitizeFileName($object->ref); + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $object->element, $object->id); + $head[$h][0] = dol_buildpath("/bookcal/availabilities_document.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } + $head[$h][2] = 'document'; + $h++; + } + + if ($showtabofpageagenda) { + $head[$h][0] = dol_buildpath("/bookcal/availabilities_agenda.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Events"); + $head[$h][2] = 'agenda'; + $h++; + } + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'availabilities@bookcal'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'availabilities@bookcal', 'remove'); + + return $head; +} diff --git a/htdocs/bookcal/lib/bookcal_booking.lib.php b/htdocs/bookcal/lib/bookcal_booking.lib.php new file mode 100644 index 00000000000..a6cb0e50df6 --- /dev/null +++ b/htdocs/bookcal/lib/bookcal_booking.lib.php @@ -0,0 +1,110 @@ + + * + * 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 lib/bookcal_booking.lib.php + * \ingroup bookcal + * \brief Library files with common functions for Booking + */ + +/** + * Prepare array of tabs for Booking + * + * @param Booking $object Booking + * @return array Array of tabs + */ +function bookingPrepareHead($object) +{ + global $db, $langs, $conf; + + $langs->load("bookcal@bookcal"); + + $showtabofpagecontact = 1; + $showtabofpagenote = 1; + $showtabofpagedocument = 1; + $showtabofpageagenda = 1; + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/bookcal/booking_card.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + if ($showtabofpagecontact) { + $head[$h][0] = dol_buildpath("/bookcal/booking_contact.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Contacts"); + $head[$h][2] = 'contact'; + $h++; + } + + if ($showtabofpagenote) { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { + $nbNote = 0; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } + $head[$h][0] = dol_buildpath('/bookcal/booking_note.php', 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + if ($nbNote > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.$nbNote.'' : ''); + } + $head[$h][2] = 'note'; + $h++; + } + } + + if ($showtabofpagedocument) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->bookcal->dir_output."/booking/".dol_sanitizeFileName($object->ref); + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $object->element, $object->id); + $head[$h][0] = dol_buildpath("/bookcal/booking_document.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } + $head[$h][2] = 'document'; + $h++; + } + + if ($showtabofpageagenda) { + $head[$h][0] = dol_buildpath("/bookcal/booking_agenda.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Events"); + $head[$h][2] = 'agenda'; + $h++; + } + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@bookcal:/bookcal/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'booking@bookcal'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'booking@bookcal', 'remove'); + + return $head; +} diff --git a/htdocs/bookcal/modulebuilder.txt b/htdocs/bookcal/modulebuilder.txt new file mode 100644 index 00000000000..670a1774929 --- /dev/null +++ b/htdocs/bookcal/modulebuilder.txt @@ -0,0 +1,3 @@ +# DO NOT DELETE THIS FILE MANUALLY +# File to flag module built using official module template. +# When this file is present into a module directory, you can edit it with the module builder tool. \ No newline at end of file diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 3d5c8eb3bc0..74b44bd8f9b 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -22,6 +22,7 @@ * \brief Page to setup bookmark module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 26d834fb5d9..d5258ba26f1 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -60,7 +60,7 @@ function printDropdownBookmarksList() if ($sortorder) { $tmpurl .= ($tmpurl ? '&' : '').'sortorder='.urlencode($sortorder); } - if (is_array($_POST)) { + if (!empty($_POST) && is_array($_POST)) { foreach ($_POST as $key => $val) { if ((preg_match('/^search_/', $key) || in_array($key, $authorized_var)) && $val != '' @@ -79,11 +79,6 @@ function printDropdownBookmarksList() $searchForm .= '
global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' onsubmit="return false"' : '').'>'; $searchForm .= ''; - - // Url to list bookmark - $listbtn = ''; - $listbtn .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('Bookmarks').''; - // Url to go on create new bookmark page $newbtn = ''; if (!empty($user->rights->bookmark->creer)) { @@ -95,6 +90,11 @@ function printDropdownBookmarksList() } } + // Url to list/edit bookmark + $listbtn = ''; + $listbtn .= img_picto('', 'edit', 'class="paddingright opacitymedium"').$langs->trans('EditBookmarks').''; + + $bookmarkList = ''; // Menu with list of bookmarks $sql = "SELECT rowid, title, url, target FROM ".MAIN_DB_PREFIX."bookmark"; $sql .= " WHERE (fk_user = ".((int) $user->id)." OR fk_user is NULL OR fk_user = 0)"; @@ -186,27 +186,28 @@ function printDropdownBookmarksList() '; $html .= ' - - - '; - - $html .= ' - + '; + $html .= ' + + + '; + $html .= ' '; } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index bbc92a83ef1..5b22b8918d9 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2015 Laurent Destailleur + * Copyright (C) 2005-2022 Laurent Destailleur * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify @@ -18,23 +18,22 @@ */ /** - * \file htdocs/bookmarks/card.php - * \brief Page display/creation of bookmarks - * \ingroup bookmark + * \file htdocs/bookmarks/card.php + * \ingroup bookmark + * \brief Page display/creation of bookmarks */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; + // Load translation files required by the page $langs->loadLangs(array('bookmarks', 'other')); -// Security check -if (empty($user->rights->bookmark->lire)) { - restrictedArea($user, 'bookmarks'); -} +// Get Parameters $id = GETPOST("id", 'int'); $action = GETPOST("action", "alpha"); $title = (string) GETPOST("title", "alpha"); @@ -45,12 +44,22 @@ $userid = GETPOST("userid", "int"); $position = GETPOST("position", "int"); $backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize Objects $object = new Bookmark($db); if ($id > 0) { $object->fetch($id); } +// Security check +if (empty($user->rights->bookmark->lire)) { + restrictedArea($user, 'bookmarks'); +} + + + + /* * Actions */ @@ -124,6 +133,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') { } + /* * View */ @@ -176,7 +186,7 @@ if ($action == 'create') { print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : $defaulttarget, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth300'); print '
'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'
'.$langs->trans("Visibility").''; print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx'); print '
'.$langs->trans("Visibility").''; if ($action == 'edit' && $user->admin) { - print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx'); } else { if ($object->fk_user > 0) { $fuser = new User($db); diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 07ea263eeda..56aae3a15f7 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2022 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 @@ -16,52 +16,54 @@ */ /** - * \file htdocs/bookmarks/list.php - * \brief Page to display list of bookmarks - * \ingroup bookmark + * \file htdocs/bookmarks/list.php + * \ingroup bookmark + * \brief Page to display list of bookmarks */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; // Load translation files required by the page $langs->loadLangs(array('bookmarks', 'admin')); +// Get Parameters $action = GETPOST('action', 'aZ09'); $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') : 'bookmarklist'; // To manage different context of search - -// Security check -if (empty($user->rights->bookmark->lire)) { - restrictedArea($user, 'bookmarks'); -} +$id = GETPOST("id", 'int'); $optioncss = GETPOST('optioncss', 'alpha'); // Load variable for pagination -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; -} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortfield) { - $sortfield = 'position'; + $sortfield = 'b.position'; } if (!$sortorder) { $sortorder = 'ASC'; } -$id = GETPOST("id", 'int'); - +// Initialize Objects $object = new Bookmark($db); +// Security check +restrictedArea($user, 'bookmark'); + +// Permissions $permissiontoread = !empty($user->rights->bookmark->lire); $permissiontoadd = !empty($user->rights->bookmark->creer); $permissiontodelete = !empty($user->rights->bookmark->supprimer); @@ -71,6 +73,14 @@ $permissiontodelete = !empty($user->rights->bookmark->supprimer); * Actions */ +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; + $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} + if ($action == 'delete') { $res = $object->remove($id); if ($res > 0) { @@ -82,6 +92,7 @@ if ($action == 'delete') { } + /* * View */ @@ -94,6 +105,9 @@ llxHeader('', $title); $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"; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid"; $sql .= " WHERE 1=1"; $sql .= " AND b.entity IN (".getEntity('bookmark').")"; @@ -101,34 +115,42 @@ if (!$user->admin) { $sql .= " AND (b.fk_user = ".((int) $user->id)." OR b.fk_user is NULL OR b.fk_user = 0)"; } -$sql .= $db->order($sortfield.", position", $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { - $num = $nbtotalofrecords; -} else { + +// Complete request and execute it with limit +$sql .= $db->order($sortfield.", position", $sortorder); +if ($limit) { $sql .= $db->plimit($limit + 1, $offset); - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); } -$param = ""; +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); + exit; +} + +$num = $db->num_rows($resql); + +$param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } @@ -136,7 +158,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } if ($optioncss != '') { - $param = '&optioncss='.urlencode($optioncss); + $param .= '&optioncss='.urlencode($optioncss); } $moreforfilter = ''; @@ -148,7 +170,7 @@ $arrayofmassactions = array( //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) { +if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { @@ -156,7 +178,7 @@ if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'pr } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); -print ''; +print ''."\n"; if ($optioncss != '') { print ''; } @@ -165,7 +187,9 @@ print ''; print ''; print ''; +print ''; print ''; +print ''; $newcardbutton = ''; $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create&backtopage='.urlencode(DOL_URL_ROOT.'/bookmarks/list.php'), '', !empty($user->rights->bookmark->creer)); @@ -177,13 +201,13 @@ print ''; //print ""; -print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="left"', $sortfield, $sortorder); -print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, 'align="left"', $sortfield, $sortorder); -print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, 'align="left"', $sortfield, $sortorder); -print_liste_field_titre("Target", '', '', '', '', 'align="center"'); -print_liste_field_titre("Visibility", $_SERVER["PHP_SELF"], "u.lastname", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.dateb", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, 'class="right"', $sortfield, $sortorder); +print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "b.target", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Visibility", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "b.dateb", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre(''); print "\n"; @@ -203,33 +227,31 @@ while ($i < min($num, $limit)) { print $object->getNomUrl(1); print ''; - $linkintern = 0; + $linkintern = 1; + if (preg_match('/^http/i', $obj->url)) { + $linkintern = 0; + } $title = $obj->title; $link = $obj->url; $canedit = $user->rights->bookmark->supprimer; $candelete = $user->rights->bookmark->creer; // Title - print "\n"; // Url print '\n"; // Target @@ -262,7 +284,7 @@ while ($i < min($num, $limit)) { print "\n"; // Date creation - print '"; + print '"; // Position print '"; diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 02e6892b571..72b7f02f0d2 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -23,6 +23,7 @@ * \brief Categorie admin pages */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; @@ -67,7 +68,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { * View */ -$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías'; +$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|DE:Modul_Kategorien'; $linkback = ''.$langs->trans("BackToModuleList").''; llxHeader('', $langs->trans("Categories"), $help_url); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 7dbf31835ca..7f2fabe4a3a 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -24,6 +24,7 @@ * \brief Page to setup extra fields of category */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -63,7 +64,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; $textobject = $langs->transnoentitiesnoconv("Categories"); -$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías'; +$help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|DE:Modul_Kategorien'; llxHeader('', $langs->trans("Categories"), $help_url); @@ -79,13 +80,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
'; - print ''.$langs->trans("NewAttribute").''; - print "
"; -} - // Creation of an optional field if ($action == 'create') { print '
'; diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 361f2a5f1ce..c94e464a762 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -27,6 +27,7 @@ * \brief Page to create a new category */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -246,7 +247,7 @@ if ($user->rights->categorie->creer) { // Description print ''; diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 0a618974024..e59ff070aec 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -315,7 +315,7 @@ class Categories extends DolibarrApi throw new RestException(401); } elseif ($type == Categorie::TYPE_CONTACT && !DolibarrApiAccess::$user->rights->contact->lire) { throw new RestException(401); - } elseif ($type == Categorie::TYPE_CUSTOMER && !DolibarrApiAccess::$user->rights->societe->lire) { + } elseif ($type == Categorie::TYPE_CUSTOMER && !DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } elseif ($type == Categorie::TYPE_SUPPLIER && !DolibarrApiAccess::$user->rights->fournisseur->lire) { throw new RestException(401); @@ -386,7 +386,7 @@ class Categories extends DolibarrApi } $object = new Contact($this->db); } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { + if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) { throw new RestException(401); } $object = new Adherent($this->db); @@ -466,7 +466,7 @@ class Categories extends DolibarrApi } $object = new Contact($this->db); } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { + if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) { throw new RestException(401); } $object = new Adherent($this->db); @@ -546,7 +546,7 @@ class Categories extends DolibarrApi } $object = new Contact($this->db); } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { + if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) { throw new RestException(401); } $object = new Adherent($this->db); @@ -624,7 +624,7 @@ class Categories extends DolibarrApi } $object = new Contact($this->db); } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { + if (!DolibarrApiAccess::$user->hasRight('adherent', 'creer')) { throw new RestException(401); } $object = new Adherent($this->db); @@ -682,9 +682,6 @@ class Categories extends DolibarrApi unset($object->total_ttc); unset($object->total_tva); unset($object->lines); - unset($object->fk_incoterms); - unset($object->label_incoterms); - unset($object->location_incoterms); unset($object->civility_id); unset($object->name); unset($object->lastname); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 27a301776b8..b5719d388f3 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -384,7 +384,7 @@ class Categorie extends CommonObject $this->db->free($resql); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->getMultiLangs(); } @@ -694,6 +694,7 @@ class Categorie extends CommonObject * @param CommonObject $obj Object to link to category * @param string $type Type of category ('product', ...). Use '' to take $obj->element. * @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked + * @see del_type() */ public function add_type($obj, $type = '') { @@ -710,13 +711,14 @@ class Categorie extends CommonObject $type = $obj->element; } + dol_syslog(get_class($this).'::add_type', LOG_DEBUG); + $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); $sql .= " (fk_categorie, fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type]).")"; $sql .= " VALUES (".((int) $this->id).", ".((int) $obj->id).")"; - dol_syslog(get_class($this).'::add_type', LOG_DEBUG); if ($this->db->query($sql)) { if (!empty($conf->global->CATEGORIE_RECURSIV_ADD)) { $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'categorie'; @@ -784,8 +786,8 @@ class Categorie extends CommonObject * * @param CommonObject $obj Object * @param string $type Type of category ('customer', 'supplier', 'contact', 'product', 'member') - * * @return int 1 if OK, -1 if KO + * @see add_type() */ public function del_type($obj, $type) { @@ -999,7 +1001,7 @@ class Categorie extends CommonObject $categories[$i]['array_options'] = $category_static->array_options; // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && isset($category_static->multilangs)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && isset($category_static->multilangs)) { $categories[$i]['multilangs'] = $category_static->multilangs; } } @@ -1127,11 +1129,11 @@ class Categorie extends CommonObject // Init $this->cats array $sql = "SELECT DISTINCT c.rowid, c.label, c.ref_ext, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $sql .= ", t.label as label_trans, t.description as description_trans"; } $sql .= " FROM ".MAIN_DB_PREFIX."categorie as c"; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'"; } $sql .= " WHERE c.entity IN (".getEntity('category').")"; @@ -1150,6 +1152,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['color'] = $obj->color; $this->cats[$obj->rowid]['visible'] = $obj->visible; $this->cats[$obj->rowid]['ref_ext'] = $obj->ref_ext; + $this->cats[$obj->rowid]['picto'] = 'category'; $i++; } } else { @@ -1672,10 +1675,10 @@ class Categorie extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Deplace fichier uploade sous le nom $files dans le repertoire sdir + * Deplace fichier uploade sous le nom $file dans le repertoire sdir * - * @param string $sdir Repertoire destination finale - * @param string $file Nom du fichier uploade + * @param string $sdir Final destination directory + * @param array $file Uploaded file name * @return void */ public function add_photo($sdir, $file) @@ -1979,6 +1982,7 @@ class Categorie extends CommonObject * @param string $type The category type (e.g Categorie::TYPE_WAREHOUSE) * @param string $rowIdName The name of the row id inside the whole sql query (e.g. "e.rowid") * @return string A additional SQL JOIN query + * @deprecated search on some categories must be done using a WHERE EXISTS or NOT EXISTS and not a LEFT JOIN. @TODO Replace with getWhereQuery($type, $searchCategoryList) */ public static function getFilterJoinQuery($type, $rowIdName) { @@ -1996,6 +2000,7 @@ class Categorie extends CommonObject * @param string $rowIdName The name of the row id inside the whole sql query (e.g. "e.rowid") * @param Array $searchList A list with the selected categories * @return string A additional SQL SELECT query + * @deprecated search on some categories must be done using a WHERE EXISTS or NOT EXISTS and not a LEFT JOIN */ public static function getFilterSelectQuery($type, $rowIdName, $searchList) { diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 518889b85b3..caacc986cc5 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -25,6 +25,7 @@ * \brief Page d'edition de categorie produit */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 4a9e771416c..babbf23e99a 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -27,6 +27,7 @@ * \brief Home page of category area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; diff --git a/htdocs/categories/info.php b/htdocs/categories/info.php index f5b54f50de9..81685a51e7b 100644 --- a/htdocs/categories/info.php +++ b/htdocs/categories/info.php @@ -23,6 +23,7 @@ * \brief Category info page */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 4e7d5bb8943..bd98afb87f7 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -26,6 +26,7 @@ * \brief Gestion des photos d'une categorie */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 512f25a67e2..f0f40b4401b 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -20,11 +20,12 @@ */ /** - * \file htdocs/product/traduction.php - * \ingroup product - * \brief Page of translation of products + * \file htdocs/categories/traduction.php + * \ingroup categories + * \brief Page of translation of categories */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -35,8 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('categories', 'languages')); -$id = GETPOST('id', 'int'); -$label = GETPOST('label', 'alpha'); +$id = GETPOST('id', 'int'); +$label = GETPOST('label', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); @@ -56,21 +57,23 @@ if ($result <= 0) { $type = $object->type; if (is_numeric($type)) { - $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility } + /* * Actions */ + $error = 0; -// retour a l'affichage des traduction si annulation +// return to translation view if cancelled if ($cancel == $langs->trans("Cancel")) { $action = ''; } -// Validation de l'ajout +// validation of addition if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && ($user->rights->categorie->creer)) { @@ -94,7 +97,7 @@ $cancel != $langs->trans("Cancel") && } if (!$error) { - // update de l'objet + // update the object if ($forcelangprod == $current_lang) { $object->label = $libelle; $object->description = dol_htmlcleanlastbr($desc); @@ -103,7 +106,7 @@ $cancel != $langs->trans("Cancel") && $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc); } - // sauvegarde en base + // save in base / sauvegarde en base $res = $object->setMultiLangs($user); if ($res < 0) { $error++; @@ -119,14 +122,14 @@ $cancel != $langs->trans("Cancel") && } } -// Validation de l'edition +// validation of the edition if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && ($user->rights->categorie->creer)) { $object->fetch($id); $current_lang = $langs->getDefaultLang(); - foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet + foreach ($object->multilangs as $key => $value) { // recording of new values in the object $libelle = GETPOST('libelle-'.$key, 'alpha'); $desc = GETPOST('desc-'.$key); @@ -164,7 +167,7 @@ $cancel != $langs->trans("Cancel") && * View */ -$form = new Form($db); +$form = new Form($db); $formadmin = new FormAdmin($db); $formother = new FormOther($db); @@ -223,10 +226,10 @@ print dol_get_fiche_end(); - /* * Action bar */ + print "\n
\n"; if ($action == '') { @@ -243,7 +246,7 @@ print "\n
\n"; if ($action == 'edit') { - //WYSIWYG Editor + // WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; print ''; @@ -260,10 +263,11 @@ if ($action == 'edit') { // Label $libelle = (GETPOST('libelle-'.$key, 'alpha') ? GETPOST('libelle-'.$key, 'alpha') : $object->multilangs[$key]['label']); print ''; + // Desc $desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : $object->multilangs[$key]['description']); print ''; @@ -323,7 +327,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 7e8a1252095..194229725c3 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -27,6 +27,7 @@ * \brief Page to show a category card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; @@ -103,7 +104,7 @@ if ($confirm == 'no') { $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Remove element from category -if ($id > 0 && $removeelem > 0) { +if ($id > 0 && $removeelem > 0 && $action == 'unlink') { if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $tmpobject = new Product($db); @@ -117,7 +118,7 @@ if ($id > 0 && $removeelem > 0) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'customer'; - } elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) { + } elseif ($type == Categorie::TYPE_MEMBER && $user->hasRight('adherent', 'creer')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $tmpobject = new Adherent($db); $result = $tmpobject->fetch($removeelem); @@ -487,745 +488,800 @@ $typeid = $type; // List of products or services (type is type of category) if ($type == Categorie::TYPE_PRODUCT) { - $permission = ($user->rights->produit->creer || $user->rights->service->creer); + if ($user->hasRight("product", "read")) { + $permission = ($user->rights->produit->creer || $user->rights->service->creer); + + $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($prods < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
 
"; - $linkintern = 1; - if ($linkintern) { - print ''; - } - print $title; - if ($linkintern) { - print ""; - } + print ''; + print dol_escape_htmltag($title); print "'; - if (!$linkintern) { - print 'target ? ' target="newlink" rel="noopener"' : '').'>'; + if (empty($linkintern)) { + print img_picto('', 'url', 'class="pictofixedwidth"'); + print 'target ? ' target="newlink" rel="noopener"' : '').'>'; + } else { + //print img_picto('', 'rightarrow', 'class="pictofixedwidth"'); + print ''; } print $link; - if (!$linkintern) { - print ''; - } + print ''; print "'.dol_print_date($db->jdate($obj->dateb), 'day')."'.dol_print_date($db->jdate($obj->dateb), 'day')."'.$obj->position."
'.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_5, '90%'); + $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, '90%'); $doleditor->Create(); print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; - $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%'); + $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%'); $doleditor->Create(); print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; - $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_3, '90%'); + $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%'); $doleditor->Create(); print '
'; + print ''; + print ''; + print '
'; + print $langs->trans("AddProductServiceIntoCategory").'  '; + $form->select_produits('', 'elemid', '', 0, 0, -1, 2, '', 1); + print '
'; + print ''; + } - $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($prods < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddProductServiceIntoCategory").'  '; - $form->select_produits('', 'elemid', '', 0, 0, -1, 2, '', 1); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit); + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; + $newcardbutton = dolGetButtonTitle($langs->trans("AddProduct"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&categories[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit); - print ''."\n"; - print ''."\n"; + print '
'.$langs->trans("Ref").'
'."\n"; + print ''."\n"; - if (count($prods) > 0) { - $i = 0; - foreach ($prods as $prod) { - $i++; - if ($i > $limit) { - break; + if (count($prods) > 0) { + $i = 0; + foreach ($prods as $prod) { + $i++; + if ($i > $limit) { + break; + } + + print "\t".''."\n"; + print '\n"; + print '\n"; + // Link to delete from category + print ''; + print "\n"; } - - print "\t".''."\n"; - print '\n"; - print '\n"; - // Link to delete from category - print ''; - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; + print $prod->getNomUrl(1); + print "'.$prod->label."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print '
'; - print $prod->getNomUrl(1); - print "'.$prod->label."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print '
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "
\n"; - print ''."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("ProductsAndServices"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'products'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of customers if ($type == Categorie::TYPE_CUSTOMER) { - $permission = $user->rights->societe->creer; + if ($user->hasRight("societe", "read")) { + $permission = $user->rights->societe->creer; + + $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($socs < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddCustomerIntoCategory").'  '; + print $form->select_company('', 'elemid', 's.client IN (1,3)'); + print '
'; + print '
'; + } - $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($socs < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddCustomerIntoCategory").'  '; - print $form->select_company('', 'elemid', 's.client IN (1,3)'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; + $newcardbutton = dolGetButtonTitle($langs->trans("AddThirdParty"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&client=3&custcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); + print ''."\n"; + print ''."\n"; - print '
'.$langs->trans("Name").'
'."\n"; - print ''."\n"; + if (count($socs) > 0) { + $i = 0; + foreach ($socs as $key => $soc) { + $i++; + if ($i > $limit) { + break; + } - if (count($socs) > 0) { - $i = 0; - foreach ($socs as $key => $soc) { - $i++; - if ($i > $limit) { - break; + print "\t".''."\n"; + print '\n"; + // Link to delete from category + print ''; + print "\n"; } - - print "\t".''."\n"; - print '\n"; - // Link to delete from category - print ''; - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Name").'
'; + print $soc->getNomUrl(1); + print "'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print '
'; - print $soc->getNomUrl(1); - print "'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print '
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Customers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of suppliers if ($type == Categorie::TYPE_SUPPLIER) { - $permission = $user->rights->societe->creer; + if ($user->hasRight("fournisseur", "read")) { + $permission = $user->rights->societe->creer; + + $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($socs < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddSupplierIntoCategory").'  '; + print $form->select_company('', 'elemid', 's.fournisseur = 1'); + print '
'; + print '
'; + } - $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($socs < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddSupplierIntoCategory").'  '; - print $form->select_company('', 'elemid', 's.fournisseur = 1'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; + $newcardbutton = dolGetButtonTitle($langs->trans("AddSupplier"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&fournisseur=1&suppcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); + print ''."\n"; + print '\n"; - print '
'.$langs->trans("Name")."
'."\n"; - print '\n"; + if (count($socs) > 0) { + $i = 0; + foreach ($socs as $soc) { + $i++; + if ($i > $limit) { + break; + } - if (count($socs) > 0) { - $i = 0; - foreach ($socs as $soc) { - $i++; - if ($i > $limit) { - break; + print "\t".''."\n"; + print '\n"; + // Link to delete from category + print ''; + + print "\n"; } - - print "\t".''."\n"; - print '\n"; - // Link to delete from category - print ''; - - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Name")."
'; + print $soc->getNomUrl(1); + print "'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print '
'; - print $soc->getNomUrl(1); - print "'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print '
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Suppliers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of members if ($type == Categorie::TYPE_MEMBER) { - require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + if ($user->hasRight("adherent", "read")) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - $permission = $user->rights->adherent->creer; + $permission = $user->hasRight('adherent', 'creer'); + + $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($prods < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AssignCategoryTo").'  '; + print $form->selectMembers('', 'elemid'); + print '
'; + print '
'; + } - $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($prods < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AssignCategoryTo").'  '; - print $form->selectMembers('', 'elemid'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; + $newcardbutton = dolGetButtonTitle($langs->trans("AddMember"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create&memcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('adherent', 'creer')); + print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); + print "\n"; + print ''."\n"; - print "
'.$langs->trans("Name").'
\n"; - print ''."\n"; + if (count($prods) > 0) { + $i = 0; + foreach ($prods as $key => $member) { + $i++; + if ($i > $limit) { + break; + } - if (count($prods) > 0) { - $i = 0; - foreach ($prods as $key => $member) { - $i++; - if ($i > $limit) { - break; + print "\t".''."\n"; + print '\n"; + print '\n"; + print '\n"; + // Link to delete from category + print '\n"; } - - print "\t".''."\n"; - print '\n"; - print '\n"; - print '\n"; - // Link to delete from category - print '\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Name").'
'; + $member->ref = $member->login; + print $member->getNomUrl(1, 0); + print "'.$member->lastname."'.$member->firstname."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print "
'; - $member->ref = $member->login; - print $member->getNomUrl(1, 0); - print "'.$member->lastname."'.$member->firstname."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print "
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Member"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'members'); + accessforbidden("NotEnoughPermissions", 0, 0); } } -// Categorie contact +// List of contacts if ($type == Categorie::TYPE_CONTACT) { - $permission = $user->rights->societe->creer; + if ($user->hasRight("societe", "read")) { + $permission = $user->rights->societe->creer; - $contacts = $object->getObjectsInCateg($type, 0, $limit, $offset); - if (is_numeric($contacts) && $contacts < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; + $contacts = $object->getObjectsInCateg($type, 0, $limit, $offset); + if (is_numeric($contacts) && $contacts < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AssignCategoryTo").'  '; + print $form->selectContacts('', '', 'elemid'); + print '
'; + print '
'; + } print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddContactIntoCategory").'  '; - print $form->selectContacts('', '', 'elemid'); - print '
'; - print '
'; - } - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; - $num = count($contacts); - $nbtotalofrecords = ''; - $newcardbutton = ''; - $objsoc = new Societe($db); - print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit); + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; + $num = count($contacts); + $nbtotalofrecords = ''; + $newcardbutton = dolGetButtonTitle($langs->trans("AddContact"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create&contcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + $objsoc = new Societe($db); + print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit); - print ''."\n"; - print ''."\n"; + print '
'.$langs->trans("Ref").'
'."\n"; + print ''."\n"; - if (is_array($contacts) && count($contacts) > 0) { - $i = 0; - foreach ($contacts as $key => $contact) { - $i++; - if ($i > $limit) { - break; + if (is_array($contacts) && count($contacts) > 0) { + $i = 0; + foreach ($contacts as $key => $contact) { + $i++; + if ($i > $limit) { + break; + } + + print "\t".''."\n"; + print '\n"; + // Link to delete from category + print ''; + print "\n"; } - - print "\t".''."\n"; - print '\n"; - // Link to delete from category - print ''; - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; + print $contact->getNomUrl(1, 'category'); + if ($contact->socid > 0) { + $objsoc->fetch($contact->socid); + print ' - '; + print $objsoc->getNomUrl(1, 'contact'); + } + print "'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print '
'; - print $contact->getNomUrl(1, 'category'); - if ($contact->socid > 0) { - $objsoc->fetch($contact->socid); - print ' - '; - print $objsoc->getNomUrl(1, 'contact'); - } - print "'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print '
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Contact"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'contact'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of bank accounts if ($type == Categorie::TYPE_ACCOUNT) { - require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + if ($user->hasRight("banque", "read")) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $permission = $user->rights->banque->creer; + $permission = $user->rights->banque->creer; + + $accounts = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($accounts < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddAccountIntoCategory").'  '; + $form->select_comptes('', 'elemid'); + print '
'; + print '
'; + } - $accounts = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($accounts < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddAccountIntoCategory").'  '; - $form->select_comptes('', 'elemid'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($accounts); $nbtotalofrecords = ''; $newcardbutton = ''; + print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit); - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($accounts); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit); + print "\n"; + print ''."\n"; - print "
'.$langs->trans("Ref").'
\n"; - print ''."\n"; + if (count($accounts) > 0) { + $i = 0; + foreach ($accounts as $key => $account) { + $i++; + if ($i > $limit) { + break; + } - if (count($accounts) > 0) { - $i = 0; - foreach ($accounts as $key => $account) { - $i++; - if ($i > $limit) { - break; + print "\t".''."\n"; + print '\n"; + print '\n"; + print '\n"; + // Link to delete from category + print '\n"; } - - print "\t".''."\n"; - print '\n"; - print '\n"; - print '\n"; - // Link to delete from category - print '\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; + print $account->getNomUrl(1, 0); + print "'.$account->bank."'.$account->number."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print "
'; - print $account->getNomUrl(1, 0); - print "'.$account->bank."'.$account->number."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print "
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Banque"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'bank'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of Project if ($type == Categorie::TYPE_PROJECT) { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + if ($user->hasRight("project", "read")) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - $permission = $user->rights->projet->creer; + $permission = $user->rights->projet->creer; + + $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($objects < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddProjectIntoCategory").'  '; + $form->selectProjects('', 'elemid'); + print '
'; + print '
'; + } - $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($objects < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddProjectIntoCategory").'  '; - $form->selectProjects('', 'elemid'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = ''; - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = ''; + print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit); - print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit); + print "\n"; + print ''."\n"; - print "
'.$langs->trans("Ref").'
\n"; - print ''."\n"; + if (count($objects) > 0) { + $i = 0; + foreach ($objects as $key => $project) { + $i++; + if ($i > $limit) { + break; + } - if (count($objects) > 0) { - $i = 0; - foreach ($objects as $key => $project) { - $i++; - if ($i > $limit) { - break; + print "\t".''."\n"; + print '\n"; + print '\n"; + print '\n"; + // Link to delete from category + print '\n"; } - - print "\t".''."\n"; - print '\n"; - print '\n"; - print '\n"; - // Link to delete from category - print '\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; + print $project->getNomUrl(1); + print "'.$project->ref."'.$project->title."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print "
'; - print $project->getNomUrl(1); - print "'.$project->ref."'.$project->title."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print "
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Project"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'project'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of users if ($type == Categorie::TYPE_USER) { - require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + if ($user->hasRight("user", "user", "read")) { + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; - $users = $object->getObjectsInCateg($type); - if ($users < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; + $users = $object->getObjectsInCateg($type); + if ($users < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddObjectIntoCategory").'  '; + print $form->select_dolusers('', 'elemid'); + print '
'; + print '
'; + } print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddObjectIntoCategory").'  '; - print $form->select_dolusers('', 'elemid'); - print '
'; - print '
'; - } - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; - print '
'; + print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; - $num = count($users); + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; + $num = count($users); - print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, '', 'user', 0, '', '', $limit); + print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, '', 'user', 0, '', '', $limit); - print "\n"; - print ''."\n"; + print "
'.$langs->trans("Users").' '.$num.'
\n"; + print ''."\n"; - if (count($users) > 0) { - // Use "$userentry" here, because "$user" is the current user - foreach ($users as $key => $userentry) { - print "\t".''."\n"; - print '\n"; - print '\n"; + if (count($users) > 0) { + // Use "$userentry" here, because "$user" is the current user + foreach ($users as $key => $userentry) { + print "\t".''."\n"; + print '\n"; + print '\n"; - // Link to delete from category - print '\n"; } - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Users").' '.$num.'
'; - print $userentry->getNomUrl(1); - print "'.$userentry->job."
'; + print $userentry->getNomUrl(1); + print "'.$userentry->job."'; - if ($user->rights->user->user->creer) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; + // Link to delete from category + print ''; + if ($user->rights->user->user->creer) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print "
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user'); + accessforbidden("NotEnoughPermissions", 0, 0); } } // List of warehouses if ($type == Categorie::TYPE_WAREHOUSE) { - $permission = $user->rights->stock->creer; + if ($user->hasRight("warehouse", "read")) { + $permission = $user->rights->stock->creer; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($objects < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = ''; - - print_barre_liste($langs->trans("Warehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit); - - print "\n"; - print ''."\n"; - - if (count($objects) > 0) { - $i = 0; - foreach ($objects as $key => $project) { - $i++; - if ($i > $limit) { - break; - } - - print "\t".''."\n"; - print '\n"; - print '\n"; - print '\n"; - // Link to delete from category - print '\n"; - } + $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($objects < 0) { + dol_print_error($db, $object->error, $object->errors); } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; - print $project->getNomUrl(1); - print "'.$project->ref."'.$project->title."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; - } - print "
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; - - print '
'."\n"; - } -} - -if ($type == Categorie::TYPE_TICKET) { - $permission = ($user->rights->categorie->creer || $user->rights->categorie->creer); - - $tickets = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($tickets < 0) { - dol_print_error($db, $object->error, $object->errors); - } else { - // Form to add record into a category - $showclassifyform = 1; - if ($showclassifyform) { - print '
'; print '
'; print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("AddTicketIntoCategory").'  '; - $form->selectTickets('', 'elemid'); - print '
'; - print '
'; - } + print ''; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = ''; - print '
'; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($tickets); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Ticket"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'ticket', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("Warehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit); + print "\n"; + print ''."\n"; - print '
'.$langs->trans("Ref").'
'."\n"; - print ''."\n"; + if (count($objects) > 0) { + $i = 0; + foreach ($objects as $key => $project) { + $i++; + if ($i > $limit) { + break; + } - if (count($tickets) > 0) { - $i = 0; - foreach ($tickets as $ticket) { - $i++; - if ($i > $limit) break; - - print "\t".''."\n"; - print '\n"; - print '\n"; - // Link to delete from category - print ''."\n"; + print '\n"; + print '\n"; + print '\n"; + // Link to delete from category + print '\n"; } - print ''; - print "\n"; + } else { + print ''; } - } else { - print ''; - } - print "
'.$langs->trans("Ref").'
'; - print $ticket->getNomUrl(1); - print "'.$ticket->label."'; - if ($permission) { - print ""; - print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); - print ""; + print "\t".'
'; + print $project->getNomUrl(1); + print "'.$project->ref."'.$project->title."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print "
'.$langs->trans("ThisCategoryHasNoItems").'
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + print "\n"; - print '
'."\n"; + print ''."\n"; + } + } else { + print_barre_liste($langs->trans("Warehouse"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'stock'); + accessforbidden("NotEnoughPermissions", 0, 0); + } +} + +// List of tickets +if ($type == Categorie::TYPE_TICKET) { + if ($user->hasRight("ticket", "read")) { + $permission = ($user->rights->categorie->creer || $user->rights->categorie->creer); + + $tickets = $object->getObjectsInCateg($type, 0, $limit, $offset); + if ($tickets < 0) { + dol_print_error($db, $object->error, $object->errors); + } else { + // Form to add record into a category + $showclassifyform = 1; + if ($showclassifyform) { + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("AddTicketIntoCategory").'  '; + $form->selectTickets('', 'elemid'); + print '
'; + print '
'; + } + + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + + print '
'; + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($tickets); $nbtotalofrecords = ''; $newcardbutton = ''; + print_barre_liste($langs->trans("Ticket"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'ticket', 0, $newcardbutton, '', $limit); + + + print ''."\n"; + print ''."\n"; + + if (count($tickets) > 0) { + $i = 0; + foreach ($tickets as $ticket) { + $i++; + if ($i > $limit) break; + + print "\t".''."\n"; + print '\n"; + print '\n"; + // Link to delete from category + print ''; + print "\n"; + } + } else { + print ''; + } + print "
'.$langs->trans("Ref").'
'; + print $ticket->getNomUrl(1); + print "'.$ticket->label."'; + if ($permission) { + print "id."'>"; + print $langs->trans("DeleteFromCat"); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print ""; + } + print '
'.$langs->trans("ThisCategoryHasNoItems").'
\n"; + + print '
'."\n"; + } + } else { + print_barre_liste($langs->trans("Ticket"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'ticket'); + accessforbidden("NotEnoughPermissions", 0, 0); } } diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index 296e0f3852f..746cc019a8b 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -24,6 +24,7 @@ define('NOSCANPOSTFORINJECTION', 1); define('NOSTYLECHECK', 1); +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0b169d846e9..11b8330b64c 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -25,31 +25,35 @@ */ /** - * \file htdocs/comm/action/card.php - * \ingroup agenda - * \brief Page for event card + * \file htdocs/comm/action/card.php + * \ingroup agenda + * \brief Page for event card */ +// Load Dolibarr environment require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncommreminder.class.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncommreminder.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + // Load translation files required by the page $langs->loadLangs(array("companies", "other", "commercial", "bills", "orders", "agenda", "mails")); +// Get Parameters $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -86,6 +90,14 @@ if ($fulldayevent) { $datep = dol_mktime($aphour, $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); $datef = dol_mktime($p2hour, $p2min, '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); } +$reg = array(); +if (GETPOST('datep')) { + if (GETPOST('datep') == 'now') { + $datep = dol_now(); + } elseif (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/', GETPOST("datep"), $reg)) { // Try to not use this. Use insteead '&datep=now' + $datep = dol_mktime(0, 0, 0, $reg[2], $reg[3], $reg[1], 'tzuser'); + } +} // Security check $socid = GETPOST('socid', 'int'); @@ -97,6 +109,7 @@ if ($user->socid) { $error = GETPOST("error"); $donotclearsession = GETPOST('donotclearsession') ?GETPOST('donotclearsession') : 0; +// Initialize Objects $object = new ActionComm($db); $cactioncomm = new CActionComm($db); $contact = new Contact($db); @@ -146,6 +159,8 @@ if ($user->socid && $socid) { $result = restrictedArea($user, 'societe', $socid); } +$usercancreate = $user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create); + /* * Actions @@ -410,9 +425,42 @@ if (empty($reshook) && $action == 'add') { $error++; } + + if (!$error) { $db->begin(); + $selectedrecurrulefreq = 'no'; + $selectedrecurrulebymonthday = ''; + $selectedrecurrulebyday = ''; + $object->recurrule = GETPOSTISSET('recurrulefreq') ? "FREQ=".GETPOST('recurrulefreq', 'alpha') : ""; + $object->recurrule .= (GETPOST('recurrulefreq', 'alpha') == 'MONTHLY' && GETPOSTISSET('BYMONTHDAY')) ? "_BYMONTHDAY".GETPOST('BYMONTHDAY', 'alpha') : ""; + $object->recurrule .= (GETPOST('recurrulefreq', 'alpha') == 'WEEKLY' && GETPOSTISSET('BYDAY')) ? "_BYDAY".GETPOST('BYDAY', 'alpha') : ""; + + $reg1 = array(); $reg2 = array(); $reg3 = array(); + if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg1)) { + $selectedrecurrulefreq = $reg1[1]; + } + if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY(\d+)/i', $object->recurrule, $reg2)) { + $selectedrecurrulebymonthday = $reg2[1]; + } + if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i', $object->recurrule, $reg3)) { + $selectedrecurrulebyday = $reg3[1]; + } + + // Is event recurrent ? + $eventisrecurring = 0; + $userepeatevent = (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2 ? 1 : 0); + if ($userepeatevent && !empty($selectedrecurrulefreq) && $selectedrecurrulefreq != 'no') { + $eventisrecurring = 1; + $object->recurid = dol_print_date(dol_now('gmt'), 'dayhourlog', 'gmt'); + $object->recurdateend = dol_mktime(0, 0, 0, GETPOST('limitmonth', 'int'), GETPOST('limitday', 'int'), GETPOST('limityear', 'int')); + } else { + unset($object->recurid); + unset($object->recurrule); + unset($object->recurdateend); + } + // Creation of action/event $idaction = $object->create($user); @@ -475,15 +523,15 @@ if (empty($reshook) && $action == 'add') { $db->commit(); } - if (!empty($backtopage)) { - dol_syslog("Back to ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); - header("Location: ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); - } elseif ($idaction) { - header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction.($moreparam ? '&'.$moreparam : '')); - } else { - header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : '')); - } - exit; + // if (!empty($backtopage)) { + // dol_syslog("Back to ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); + // header("Location: ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); + // } elseif ($idaction) { + // header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction.($moreparam ? '&'.$moreparam : '')); + // } else { + // header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : '')); + // } + // exit; } else { // If error $db->rollback(); @@ -497,6 +545,132 @@ if (empty($reshook) && $action == 'add') { setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; $donotclearsession = 1; } + + if ($eventisrecurring) { + // We set first date of recurrence and offsets + if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) { + $firstdatearray = dol_get_first_day_week(GETPOST("apday", 'int'), GETPOST("apmonth", 'int'), GETPOST("apyear", 'int')); + $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuser'); + $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after + $dayoffset = 7; + $monthoffset = 0; + } elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) { + $firstday = $selectedrecurrulebymonthday; + $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOST("apmonth", 'int') + 1 : GETPOST("apmonth", 'int');//We begin the week after + $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstmonth, $firstday, GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuser'); + $dayoffset = 0; + $monthoffset = 1; + } else { + $error++; + } + // End date + $repeateventlimitdate = dol_mktime(23, 59, 59, GETPOSTISSET("limitmonth") ? GETPOST("limitmonth", 'int') : 1, GETPOSTISSET("limitday") ? GETPOST("limitday", 'int') : 1, GETPOSTISSET("limityear") && GETPOST("limityear", 'int') < 2100 ? GETPOST("limityear", 'int') : 2100, $tzforfullday ? $tzforfullday : 'tzuser'); + // Set date of end of event + $deltatime = num_between_day($object->datep, $datep); + $datef = dol_time_plus_duree($datef, $deltatime, 'd'); + + while ($datep <= $repeateventlimitdate && !$error) { + $finalobject = clone $object; + + + $finalobject->datep = $datep; + $finalobject->datef = $datef; + // Creation of action/event + $idaction = $finalobject->create($user); + + if ($idaction > 0) { + if (!$finalobject->error) { + // Category association + $categories = GETPOST('categories', 'array'); + $finalobject->setCategories($categories); + + unset($_SESSION['assignedtouser']); + + $moreparam = ''; + if ($user->id != $finalobject->userownerid) { + $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view. + } + + // Create reminders + if ($addreminder == 'on') { + $actionCommReminder = new ActionCommReminder($db); + + $dateremind = dol_time_plus_duree($datep, -$offsetvalue, $offsetunit); + + $actionCommReminder->dateremind = $dateremind; + $actionCommReminder->typeremind = $remindertype; + $actionCommReminder->offsetunit = $offsetunit; + $actionCommReminder->offsetvalue = $offsetvalue; + $actionCommReminder->status = $actionCommReminder::STATUS_TODO; + $actionCommReminder->fk_actioncomm = $finalobject->id; + if ($remindertype == 'email') { + $actionCommReminder->fk_email_template = $modelmail; + } + + // the notification must be created for every user assigned to the event + foreach ($finalobject->userassigned as $userassigned) { + $actionCommReminder->fk_user = $userassigned['id']; + $res = $actionCommReminder->create($user); + + if ($res <= 0) { + // If error + $db->rollback(); + $langs->load("errors"); + $error = $langs->trans('ErrorReminderActionCommCreation'); + setEventMessages($error, null, 'errors'); + $action = 'create'; $donotclearsession = 1; + break; + } + } + } + + // Modify $moreparam so we are sure to see the event we have just created, whatever are the default value of filter on next page. + /*$moreparam .= ($moreparam ? '&' : '').'search_actioncode=0'; + $moreparam .= ($moreparam ? '&' : '').'search_status=-1'; + $moreparam .= ($moreparam ? '&' : '').'search_filtert='.$object->userownerid; + */ + $moreparam .= ($moreparam ? '&' : '').'disabledefaultvalues=1'; + + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } else { + // If error + $db->rollback(); + $langs->load("errors"); + $error = $langs->trans($finalobject->error); + setEventMessages($error, null, 'errors'); + $action = 'create'; $donotclearsession = 1; + } + } else { + $db->rollback(); + setEventMessages($finalobject->error, $finalobject->errors, 'errors'); + $action = 'create'; $donotclearsession = 1; + } + + // If event is not recurrent, we stop here + if (!($userepeatevent && GETPOSTISSET('recurrulefreq') && GETPOST('recurrulefreq') != 'no' && GETPOSTISSET("limityear") && GETPOSTISSET("limitmonth") && GETPOSTISSET("limitday"))) { + break; + } + + // increment date for recurrent events + $datep = dol_time_plus_duree($datep, $dayoffset, 'd'); + $datep = dol_time_plus_duree($datep, $monthoffset, 'm'); + $datef = dol_time_plus_duree($datef, $dayoffset, 'd'); + $datef = dol_time_plus_duree($datef, $monthoffset, 'm'); + } + } + if (!empty($backtopage) && !$error) { + dol_syslog("Back to ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); + header("Location: ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); + } elseif ($idaction) { + header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction.($moreparam ? '&'.$moreparam : '')); + } else { + header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : '')); + } + exit; } } @@ -529,7 +703,7 @@ if (empty($reshook) && $action == 'update') { $object->fetch($id); $object->fetch_optionals(); $object->fetch_userassigned(); - $object->oldcopy = clone $object; + $object->oldcopy = dol_clone($object); // Clean parameters if ($fulldayevent) { @@ -542,12 +716,23 @@ if (empty($reshook) && $action == 'update') { $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuser'); } - if ($object->elementtype == 'ticket') { + if ($object->elementtype == 'ticket') { // code should be TICKET_MSG, TICKET_MSG_PRIVATE, TICKET_MSG_SENTBYMAIL, TICKET_MSG_PRIVATE_SENTBYMAIL if ($private) { - $object->type_code = 'TICKET_MSG_PRIVATE'; + if ($object->code == 'TICKET_MSG') { + $object->code = 'TICKET_MSG_PRIVATE'; + } + if ($object->code == 'TICKET_MSG_SENTBYMAIL') { + $object->code = 'TICKET_MSG_PRIVATE_SENTBYMAIL'; + } } else { - $object->type_id = dol_getIdFromCode($db, 'AC_EMAIL', 'c_actioncomm'); + if ($object->code == 'TICKET_MSG_PRIVATE') { + $object->code = 'TICKET_MSG'; + } + if ($object->code == 'TICKET_MSG_PRIVATE_SENTBYMAIL') { + $object->code = 'TICKET_MSG_SENTBYMAIL'; + } } + // type_id and type_code is not modified } else { $object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm'); $object->type_code = GETPOST("actioncode", 'aZ09'); @@ -782,14 +967,12 @@ if (empty($reshook) && $action == 'update') { } } -/* - * delete event - */ +// Delete event if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes') { $object->fetch($id); $object->fetch_optionals(); $object->fetch_userassigned(); - $object->oldcopy = clone $object; + $object->oldcopy = dol_clone($object); if ($user->rights->agenda->myactions->delete || $user->rights->agenda->allactions->delete) { @@ -916,7 +1099,6 @@ if (empty($reshook)) { } - /* * View */ @@ -927,10 +1109,11 @@ $formproject = new FormProjets($db); $arrayrecurrulefreq = array( 'no'=>$langs->trans("OnceOnly"), 'MONTHLY'=>$langs->trans("EveryMonth"), - 'WEEKLY'=>$langs->trans("EveryWeek"), - //'DAYLY'=>$langs->trans("EveryDay") + 'WEEKLY'=>$langs->trans("EveryWeek") + // 'DAILY'=>$langs->trans("EveryDay") ); + $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); @@ -1028,9 +1211,10 @@ if ($action == 'create') { // Type of event if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''.$langs->trans("Type").''; - $default = (empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT) ? 'AC_RDV' : $conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT); + $default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV'); print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"'); - print $formactions->select_type_actions(GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default), "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot + $selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default); + print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot print ''; } @@ -1048,20 +1232,31 @@ if ($action == 'create') { print '        
'; print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"'); print ''; + $selectedrecurrulefreq = 'no'; $selectedrecurrulebymonthday = ''; $selectedrecurrulebyday = ''; + $object->recurrule = GETPOSTISSET('recurrulefreq') ? "FREQ=".GETPOST('recurrulefreq', 'alpha') : ""; + $object->recurrule .= GETPOSTISSET('BYMONTHDAY') ? "_BYMONTHDAY".GETPOST('BYMONTHDAY', 'alpha') : ""; + $object->recurrule .= GETPOSTISSET('BYDAY') ? "_BYDAY".GETPOST('BYDAY', 'alpha') : ""; + + $reg = array(); if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg)) { $selectedrecurrulefreq = $reg[1]; } - if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY=(\d+)/i', $object->recurrule, $reg)) { + if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY(\d+)/i', $object->recurrule, $reg)) { $selectedrecurrulebymonthday = $reg[1]; } if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i', $object->recurrule, $reg)) { $selectedrecurrulebyday = $reg[1]; } + print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq, 0, 0, 0, '', 0, 0, 0, '', 'marginrightonly'); + // print ''; + // For recursive event + + // If recurrulefreq is MONTHLY print ''; //print ''; } @@ -1118,11 +1328,6 @@ if ($action == 'create') { // Date start print ''; - /* - print ''.$langs->trans("DateActionStart").''; - print ' - '; - print ''.$langs->trans("DateActionEnd").''; - */ print ''; if (GETPOST("afaire") == 1) { print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); // Empty value not allowed for start date and hours if "todo" @@ -1197,7 +1402,7 @@ if ($action == 'create') { $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ''; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { // Categories print ''.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1); @@ -1213,7 +1418,7 @@ if ($action == 'create') { print ''; - if (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { // Related company print ''; + if ($object->elementtype == 'ticket') { + print ''; + } // Title print 'global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired titlefieldcreate"' : '').'>'.$langs->trans("Title").''; @@ -1559,64 +1763,64 @@ if ($id > 0) { print ''; - } + // // Recurring event + // $userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); + // if ($userepeatevent) { + // // Repeat + // //print ''; + // } print ''; // Date start - end @@ -1698,7 +1902,7 @@ if ($id > 0) { // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { - print ''; + print ''; } // Status @@ -1708,7 +1912,7 @@ if ($id > 0) { print ''; // Tags-Categories - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { print '
'.$langs->trans("ActionOnCompany").''; if (GETPOST('socid', 'int') > 0) { @@ -1246,7 +1451,7 @@ if ($action == 'create') { } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $projectid = GETPOST('projectid', 'int'); @@ -1316,11 +1521,6 @@ if ($action == 'create') { } } - $reg = array(); - if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/', GETPOST("datep"), $reg)) { - $object->datep = dol_mktime(0, 0, 0, $reg[2], $reg[3], $reg[1]); - } - // Priority if (!empty($conf->global->AGENDA_SUPPORT_PRIORITY_IN_EVENTS)) { print '
'.$langs->trans("Priority").''; @@ -1524,7 +1724,7 @@ if ($id > 0) { if ($backtopage) { print ''; } - if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && $object->code != "TICKET_MSG_PRIVATE") { + if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { print ''; } @@ -1550,7 +1750,11 @@ if ($id > 0) { } // Private - if ($object->elementtype == 'ticket') print '
'.$langs->trans("PrivateEventMessage").'code == 'TICKET_MSG_PRIVATE') ? ' checked' : '').'>
'.$langs->trans("MarkMessageAsPrivate"); + print ' '.$form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help'); + print 'code) ? ' checked' : '').'>
'.$langs->trans("Date").'fulldayevent ? ' checked' : '').'>'; print ''; - // Recurring event - $userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); - if ($userepeatevent) { - // Repeat - //print '
'; - print '        
'; - print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"'); - print ''; - $selectedrecurrulefreq = 'no'; - $selectedrecurrulebymonthday = ''; - $selectedrecurrulebyday = ''; - if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg)) { - $selectedrecurrulefreq = $reg[1]; - } - if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY=(\d+)/i', $object->recurrule, $reg)) { - $selectedrecurrulebymonthday = $reg[1]; - } - if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i', $object->recurrule, $reg)) { - $selectedrecurrulebyday = $reg[1]; - } - print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq, 0, 0, 0, '', 0, 0, 0, '', 'marginrightonly'); - // If recurrulefreq is MONTHLY - print ''; - // If recurrulefreq is WEEKLY - print ''; - print ''; - print '
'; - //print '
'; + // print '        
'; + // print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"'); + // print ''; + // $selectedrecurrulefreq = 'no'; + // $selectedrecurrulebymonthday = ''; + // $selectedrecurrulebyday = ''; + // if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i', $object->recurrule, $reg)) { + // $selectedrecurrulefreq = $reg[1]; + // } + // if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY=(\d+)/i', $object->recurrule, $reg)) { + // $selectedrecurrulebymonthday = $reg[1]; + // } + // if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i', $object->recurrule, $reg)) { + // $selectedrecurrulebyday = $reg[1]; + // } + // print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq, 0, 0, 0, '', 0, 0, 0, '', 'marginrightonly'); + // // If recurrulefreq is MONTHLY + // print ''; + // // If recurrulefreq is WEEKLY + // print ''; + // print ''; + // print '
'; + // //print '
'.$langs->trans("Location").'
'.$langs->trans("Location").'
'.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1); $c = new Categorie($db); @@ -1729,7 +1933,7 @@ if ($id > 0) { print ''; - if (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { // Related company print ''; print ''; print ''; - if ($object->elementtype == 'task' && !empty($conf->project->enabled)) { + if ($object->elementtype == 'task' && isModEnabled('project')) { print '
'.$langs->trans("ActionOnCompany").''; @@ -1752,7 +1956,7 @@ if ($id > 0) { } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); print '
'.$langs->trans("Project").''; @@ -1777,7 +1981,7 @@ if ($id > 0) { print '
'.$langs->trans("LinkedObject").''; $urloption = '?action=create&donotclearsession=1'; // we use create not edit for more flexibility @@ -1830,7 +2034,7 @@ if ($id > 0) { print '
'; // Reminders - if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) { + if (getDolGlobalString('AGENDA_REMINDER_EMAIL') || getDolGlobalString('AGENDA_REMINDER_BROWSER')) { $filteruserid = $user->id; if ($user->rights->agenda->allactions->read) { $filteruserid = 0; @@ -1917,13 +2121,22 @@ if ($id > 0) { } else { print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action'); + $formconfirm = ''; + // Clone event if ($action == 'clone') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1); - - print $formconfirm; + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', array(), 'yes', 1); } + // Call Hook formConfirm + $parameters = array(); + $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; + $linkback = ''; // Link to other agenda views $linkback .= ''; @@ -1955,42 +2168,38 @@ if ($id > 0) { $linkback .= ''.$langs->trans("ViewPerUser").''; $linkback .= ''; + // Add more views from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action); + if (empty($reshook)) { + $linkback .= $hookmanager->resPrint; + } elseif ($reshook > 1) { + $linkback = $hookmanager->resPrint; + } + //$linkback.=$out; $morehtmlref = '
'; // Thirdparty //$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - //$morehtmlref.='
'.$langs->trans('Project') . ' '; - $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->agenda->allactions->create || - (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { + //$morehtmlref .= '
'; + if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -2008,19 +2217,21 @@ if ($id > 0) { print ''; // Type - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $object->elementtype != 'ticket') { + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''; } - // Private - if ($object->elementtype == 'ticket') print ''; - // Full day event print ''; + // Event into a serie + if ($object->recurid) { + print ''; + } + $rowspan = 4; if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { $rowspan++; @@ -2117,7 +2328,7 @@ if ($id > 0) { } // Categories - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { print '"; @@ -2132,9 +2343,10 @@ if ($id > 0) { print '
'; print '
'.$langs->trans("Type").''; print $object->getTypePicto(); print $langs->trans("Action".$object->type_code); print '
'.$langs->trans("PrivateEventMessage").''.yn(($object->code == 'TICKET_MSG_PRIVATE') ? 1 : 0, 3).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent ? 1 : 0, 3).'
'.$langs->trans("EventIntoASerie").''.dol_escape_htmltag($object->recurid).'
'.$langs->trans("Categories").''; print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1); print "
'; - if (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { // Related company - print ''; + print '
'.$langs->trans("ActionOnCompany").''.($object->thirdparty->id ? $object->thirdparty->getNomUrl(1) : (''.$langs->trans("None").'')); + print '
'.$langs->trans("ActionOnCompany").''.(is_object($object->thirdparty) && $object->thirdparty->id ? $object->thirdparty->getNomUrl(1) : (''.$langs->trans("None").'')); if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL') { if ($object->thirdparty->fetch($object->thirdparty->id)) { print "
".dol_print_phone($object->thirdparty->phone); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 7947afa71ab..64d01817c85 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -269,6 +269,7 @@ class ActionComm extends CommonObject */ public $contact_id; + /** * @var Societe|null Company linked to action (optional) * @deprecated @@ -285,17 +286,17 @@ class ActionComm extends CommonObject // Properties for links to other objects /** - * @var int Id of linked object + * @var int Id of linked object */ public $fk_element; // Id of record /** - * @var int Id of record alternative for API + * @var int Id of record alternative for API */ public $elementid; /** - * @var string Type of record. This if property ->element of object linked to. + * @var string Type of record. This if property ->element of object linked to. */ public $elementtype; @@ -376,9 +377,9 @@ class ActionComm extends CommonObject /** * Properties to manage the recurring events */ - public $recurid; - public $recurrule; - public $recurdateend; + public $recurid; /* A string YYYYMMDDHHMMSS shared by allevent of same serie */ + public $recurrule; /* Rule of recurring */ + public $recurdateend; /* Repeat until this date */ public $calling_duration; @@ -422,7 +423,7 @@ class ActionComm extends CommonObject */ public function create(User $user, $notrigger = 0) { - global $langs, $conf, $hookmanager; + global $langs, $conf; $error = 0; $now = dol_now(); @@ -457,11 +458,11 @@ class ActionComm extends CommonObject if (!empty($this->datep) && !empty($this->datef)) { $this->durationp = ($this->datef - $this->datep); // deprecated } - //if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date); + //if (!empty($this->date) && !empty($this->dateend)) $this->durationa=($this->dateend - $this->date); if (!empty($this->datep) && !empty($this->datef) && $this->datep > $this->datef) { $this->datef = $this->datep; } - //if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date; + //if (!empty($this->date) && !empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date; if (!isset($this->fk_project) || $this->fk_project < 0) { $this->fk_project = 0; } @@ -549,9 +550,13 @@ class ActionComm extends CommonObject $sql .= "email_tobcc,"; $sql .= "email_subject,"; $sql .= "errors_to,"; + $sql .= "recurid,"; + $sql .= "recurrule,"; + $sql .= "recurdateend,"; $sql .= "num_vote,"; $sql .= "event_paid,"; - $sql .= "status"; + $sql .= "status,"; + $sql .= "ip"; $sql .= ") VALUES ("; $sql .= "'(PROV)', "; $sql .= "'".$this->db->idate($now)."', "; @@ -587,9 +592,13 @@ class ActionComm extends CommonObject $sql .= (!empty($this->email_tobcc) ? "'".$this->db->escape($this->email_tobcc)."'" : "null").", "; $sql .= (!empty($this->email_subject) ? "'".$this->db->escape($this->email_subject)."'" : "null").", "; $sql .= (!empty($this->errors_to) ? "'".$this->db->escape($this->errors_to)."'" : "null").", "; + $sql .= (!empty($this->recurid) ? "'".$this->db->escape($this->recurid)."'" : "null").", "; + $sql .= (!empty($this->recurrule) ? "'".$this->db->escape($this->recurrule)."'" : "null").", "; + $sql .= (!empty($this->recurdateend) ? "'".$this->db->idate($this->recurdateend)."'" : "null").", "; $sql .= (!empty($this->num_vote) ? (int) $this->num_vote : "null").", "; $sql .= (!empty($this->event_paid) ? (int) $this->event_paid : 0).", "; - $sql .= (!empty($this->status) ? (int) $this->status : "0"); + $sql .= (!empty($this->status) ? (int) $this->status : "0").", "; + $sql .= (!empty($this->ip) ? "'".$this->db->escape($this->ip)."'" : "null"); $sql .= ")"; dol_syslog(get_class($this)."::add", LOG_DEBUG); @@ -698,10 +707,9 @@ class ActionComm extends CommonObject */ public function createFromClone(User $fuser, $socid) { - global $db, $conf, $hookmanager; + global $hookmanager; $error = 0; - $now = dol_now(); $this->db->begin(); @@ -716,6 +724,9 @@ class ActionComm extends CommonObject $this->fetchResources(); $this->id = 0; + $this->recurid = ''; + $this->recurrule = ''; + $this->recurdateend = ''; // Create clone $this->context['createfromclone'] = 'createfromclone'; @@ -1162,13 +1173,13 @@ class ActionComm extends CommonObject } $code = $this->code; - if (empty($code) || (!empty($this->oldcopy) && $this->oldcopy->type_code != $this->type_code)) { // If code unknown or if change the type, we reset $code too + if (empty($code) || (!empty($this->oldcopy) && $this->oldcopy->type_code != $this->type_code)) { // If code unknown or if we change the type, we reset $code too $code = $this->type_code; } $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; + $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm"; $sql .= " SET percent = '".$this->db->escape($this->percentage)."'"; $sql .= ", fk_action = ".(int) $this->type_id; $sql .= ", code = " . ($code ? "'".$this->db->escape($code)."'" : "null"); @@ -1202,7 +1213,7 @@ class ActionComm extends CommonObject if (!empty($this->status)) { $sql .= ", status=".($this->status ? (int) $this->status : 0); } - $sql .= " WHERE id=".$this->id; + $sql .= " WHERE id=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); if ($this->db->query($sql)) { @@ -1313,8 +1324,17 @@ class ActionComm extends CommonObject dol_syslog(get_class()."::getActions", LOG_DEBUG); + require_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($this->db); + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context + $hookmanager->initHooks(array('agendadao')); + $sql = "SELECT a.id"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + // Fields from hook + $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); + $reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters); // Note that $action and $object may have been modified by hook + if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint; $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; if (!empty($socid)) { $sql .= " AND a.fk_soc = ".((int) $socid); @@ -1333,6 +1353,10 @@ class ActionComm extends CommonObject if (!empty($filter)) { $sql .= $filter; } + // Fields where hook + $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); + $reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters); // Note that $action and $object may have been modified by hook + if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint; if ($sortorder && $sortfield) { $sql .= $this->db->order($sortfield, $sortorder); } @@ -1409,7 +1433,7 @@ class ActionComm extends CommonObject $response->label = $langs->trans("ActionsToDo"); $response->labelShort = $langs->trans("ActionsToDoShort"); $response->url = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&actioncode=0&status=todo&mainmenu=agenda'; - if ($user->rights->agenda->allactions->read) { + if ($user->hasRight("agenda", "allactions", "read")) { $response->url .= '&filtert=-1'; } $response->img = img_object('', "action", 'class="inline-block valigntextmiddle"'); @@ -1564,13 +1588,13 @@ class ActionComm extends CommonObject } $canread = 0; - if ($user->rights->agenda->myactions->read && $this->authorid == $user->id) { + if (!empty($user->rights->agenda->myactions->read) && $this->authorid == $user->id) { $canread = 1; // Can read my event } - if ($user->rights->agenda->myactions->read && array_key_exists($user->id, $this->userassigned)) { + if (!empty($user->rights->agenda->myactions->read) && array_key_exists($user->id, $this->userassigned)) { $canread = 1; // Can read my event i am assigned } - if ($user->rights->agenda->allactions->read) { + if (!empty($user->rights->agenda->allactions->read)) { $canread = 1; // Can read all event of other } if (!$canread) { @@ -1597,16 +1621,16 @@ class ActionComm extends CommonObject $tooltip = img_picto('', $this->picto).' '.$langs->trans('Action').''; if (!empty($this->ref)) { - $tooltip .= '
'.$langs->trans('Ref').': '.$this->ref; + $tooltip .= '
'.$langs->trans('Ref').': '.dol_escape_htmltag($this->ref); } if (!empty($label)) { - $tooltip .= '
'.$langs->trans('Title').': '.$label; + $tooltip .= '
'.$langs->trans('Title').': '.dol_escape_htmltag($label); } if (!empty($labeltype)) { - $tooltip .= '
'.$langs->trans('Type').': '.$labeltype; + $tooltip .= '
'.$langs->trans('Type').': '.dol_escape_htmltag($labeltype); } if (!empty($this->location)) { - $tooltip .= '
'.$langs->trans('Location').': '.$this->location; + $tooltip .= '
'.$langs->trans('Location').': '.dol_escape_htmltag($this->location); } if (isset($this->transparency)) { $tooltip .= '
'.$langs->trans('Busy').': '.yn($this->transparency); @@ -1615,7 +1639,7 @@ class ActionComm extends CommonObject $langs->load("mails"); $tooltip .= '
'; //$tooltip .= '
'.img_picto('', 'email').' '.$langs->trans("Email").''; - $tooltip .= '
'.$langs->trans('MailTopic').': '.$this->email_subject; + $tooltip .= '
'.$langs->trans('MailTopic').': '.dol_escape_htmltag($this->email_subject); $tooltip .= '
'.$langs->trans('MailFrom').': '.str_replace(array('<', '>'), array('&lt', '&gt'), $this->email_from); $tooltip .= '
'.$langs->trans('MailTo').': '.str_replace(array('<', '>'), array('&lt', '&gt'), $this->email_to); if (!empty($this->email_tocc)) { @@ -1628,8 +1652,10 @@ class ActionComm extends CommonObject } if (!empty($this->note_private)) { $tooltip .= '

'.$langs->trans('Description').':
'; - $texttoshow = dolGetFirstLineOfText($this->note_private, 10); + $texttoshow = dolGetFirstLineOfText($this->note_private, 10); // Try to limit length of content + $tooltip .= '
'; // Restrict height of content into the tooltip $tooltip .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '
', $texttoshow)); + $tooltip .= '
'; } $linkclose = ''; //if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color) @@ -1703,7 +1729,7 @@ class ActionComm extends CommonObject if ($withpicto) { $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); } - $result .= $labelshort; + $result .= dol_escape_htmltag($labelshort); $result .= $linkend; global $action; @@ -1743,11 +1769,11 @@ class ActionComm extends CommonObject $imgpicto = img_picto('', 'object_phoning', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type_code == 'AC_FAX') { $imgpicto = img_picto('', 'object_phoning_fax', $color, false, 0, 0, '', 'paddingright'); - } elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN') { + } elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN' || preg_match('/_SENTBYMAIL/', $this->code)) { $imgpicto = img_picto('', 'object_email', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type_code == 'AC_INT') { $imgpicto = img_picto('', 'object_intervention', $color, false, 0, 0, '', 'paddingright'); - } elseif ($this->type_code == 'AC_OTH' && $this->code == 'TICKET_MSG') { + } elseif (preg_match('/^TICKET_MSG/', $this->code)) { $imgpicto = img_picto('', 'object_conversation', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type != 'systemauto') { $imgpicto = img_picto('', 'user-cog', $color, false, 0, 0, '', 'paddingright'); @@ -2063,7 +2089,7 @@ class ActionComm extends CommonObject } if ($exportholiday == 1) { - $langs->load("holidays"); + $langs->load("holiday"); $title = $langs->trans("Holidays"); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.email, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; @@ -2361,7 +2387,7 @@ class ActionComm extends CommonObject $nbMailSend = 0; $errorsMsg = array(); - if (empty($conf->agenda->enabled)) { // Should not happen. If module disabled, cron job should not be visible. + if (!isModEnabled('agenda')) { // Should not happen. If module disabled, cron job should not be visible. $langs->load("agenda"); $this->output = $langs->trans('ModuleNotEnabled', $langs->transnoentitiesnoconv("Agenda")); return 0; diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index ff242430b0a..eb0d464777a 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -149,7 +149,7 @@ class ActionCommReminder extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled)) { + if (!isModEnabled('multicompany')) { $this->fields['entity']['enabled'] = 0; } } diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 2d868e9bfaa..8c13709b250 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -124,24 +124,24 @@ class AgendaEvents extends DolibarrApi if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { $search_sale = DolibarrApiAccess::$user->id; } - if (empty($conf->societe->enabled)) { + if (!isModEnabled('societe')) { $search_sale = 0; // If module thirdparty not enabled, sale representative is something that does not exists } $sql = "SELECT t.id as rowid"; - if (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { 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 (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { 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 (!empty($conf->societe->enabled)) { + if (isModEnabled("societe")) { if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) { $sql .= " AND t.fk_soc = sc.fk_soc"; } diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 75cbefec3ec..049b70737e8 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -201,24 +201,24 @@ class CActionComm if ($obj->module == 'invoice' && isModEnabled('facture') && !empty($user->rights->facture->lire)) { $qualified = 1; } - if ($obj->module == 'order' && !empty($conf->commande->enabled) && empty($user->rights->commande->lire)) { + if ($obj->module == 'order' && isModEnabled('commande') && empty($user->rights->commande->lire)) { $qualified = 1; } - if ($obj->module == 'propal' && !empty($conf->propal->enabled) && !empty($user->rights->propale->lire)) { + if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propal->lire)) { $qualified = 1; } - if ($obj->module == 'invoice_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (!empty($conf->rights->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire)))) { + if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (isModEnabled('supplier_invoice') && !empty($user->rights->supplier_invoice->lire)))) { $qualified = 1; } - if ($obj->module == 'order_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->commande->lire)) || (empty($conf->rights->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)))) { + if ($obj->module == 'order_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->commande->lire)) || (!isModEnabled('supplier_order') && !empty($user->rights->supplier_order->lire)))) { $qualified = 1; } - if ($obj->module == 'shipping' && !empty($conf->expedition->enabled) && !empty($user->rights->expedition->lire)) { + if ($obj->module == 'shipping' && isModEnabled("expedition") && !empty($user->rights->expedition->lire)) { $qualified = 1; } // For case module = 'myobject@eventorganization' $tmparray = preg_split("/@/", $obj->module, -1); - if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) { + if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && isModEnabled('eventorganization')) { $qualified = 1; } // For the generic case with type = 'module...' and module = 'myobject@mymodule' @@ -228,7 +228,7 @@ class CActionComm $tmpobject = $regs[1]; $tmpmodule = $regs[2]; //var_dump($user->$tmpmodule); - if ($tmpmodule && isset($conf->$tmpmodule) && !empty($conf->$tmpmodule->enabled) && (!empty($user->rights->$tmpmodule->read) || !empty($user->rights->$tmpmodule->lire) || !empty($user->rights->$tmpmodule->$tmpobject->read) || !empty($user->rights->$tmpmodule->$tmpobject->lire))) { + if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule) && (!empty($user->rights->$tmpmodule->read) || !empty($user->rights->$tmpmodule->lire) || !empty($user->rights->$tmpmodule->$tmpobject->read) || !empty($user->rights->$tmpmodule->$tmpobject->lire))) { $qualified = 1; } } @@ -237,7 +237,7 @@ class CActionComm if (! in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) { $tmpmodule = $obj->module; //var_dump($tmpmodule); - if ($tmpmodule && isset($conf->$tmpmodule) && !empty($conf->$tmpmodule->enabled)) { + if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule)) { $qualified = 1; } } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 90ed4ea1944..82cc7584c07 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -26,6 +26,7 @@ * \brief Page of documents linked to actions */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -34,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.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'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -62,6 +63,9 @@ if ($id > 0) { $object->fetch_thirdparty(); } +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('actioncard', 'globalcard')); + // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -88,7 +92,8 @@ if ($user->socid && $socid) { $result = restrictedArea($user, 'societe', $socid); } -$permissiontoadd = $user->rights->agenda->myactions->read; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +$usercancreate = $user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create); +$permissiontoadd = $usercancreate; /* @@ -153,25 +158,39 @@ if ($object->id > 0) { $out .= '
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); $out .= ''.$langs->trans("ViewDay").''; + // Add more views from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action); + if (empty($reshook)) { + $out .= $hookmanager->resPrint; + } elseif ($reshook > 1) { + $out = $hookmanager->resPrint; + } + $linkback .= $out; $morehtmlref = '
    '; // Thirdparty //$morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - //$morehtmlref.='
    '.$langs->trans('Project') . ' '; - $morehtmlref .= $langs->trans('Project').': '; - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); - if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + //$morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - $morehtmlref .= ''; + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= $proj->getNomUrl(1); + if ($proj->title) { + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; + } + } } } $morehtmlref .= '
    '; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e313c1207cb..ab814957e5b 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -30,13 +30,14 @@ * \brief Home page of calendar events */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.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'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -212,7 +213,7 @@ if (GETPOST("viewperuser", 'alpha') || $mode == 'show_peruser') { $event->fetch($actionid); $event->fetch_optionals(); $event->fetch_userassigned(); - $event->oldcopy = clone $event; + $event->oldcopy = dol_clone($event); $result = $event->delete(); } @@ -273,7 +274,7 @@ if (empty($conf->global->AGENDA_DISABLE_EXT)) { $color = 'AGENDA_EXT_COLOR'.$i; $default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$i; $buggedfile = 'AGENDA_EXT_BUGGEDFILE'.$i; - if (!empty($conf->global->$source) && !empty($conf->global->$name)) { + if (getDolGlobalString($source) && getDolGlobalString($name)) { // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' $listofextcals[] = array( 'src' => getDolGlobalString($source), @@ -298,14 +299,14 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) { $enabled = 'AGENDA_EXT_ENABLED_'.$user->id.'_'.$i; $default = 'AGENDA_EXT_ACTIVEBYDEFAULT_'.$user->id.'_'.$i; $buggedfile = 'AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i; - if (!empty($user->conf->$source) && !empty($user->conf->$name)) { + if (getDolUserString($source) && getDolUserString($name)) { // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' $listofextcals[] = array( - 'src' => $user->conf->$source, - 'name' => dol_string_nohtmltag($user->conf->$name), + 'src' => getDolUserString($source), + 'name' => dol_string_nohtmltag(getDolUserString($name)), 'offsettz' => (int) (empty($user->conf->$offsettz) ? 0 : $user->conf->$offsettz), - 'color' => dol_string_nohtmltag($user->conf->$color), - 'default' => dol_string_nohtmltag($user->conf->$default), + 'color' => dol_string_nohtmltag(getDolUserString($color)), + 'default' => dol_string_nohtmltag(getDolUserString($default)), 'buggedfile' => dol_string_nohtmltag(isset($user->conf->buggedfile) ? $user->conf->buggedfile : '') ); } @@ -756,9 +757,10 @@ if ($type) { $sql .= " AND ca.id = ".((int) $type); } if ($status == '0') { + // To do (not started) $sql .= " AND a.percent = 0"; } -if ($status == '-1' || $status == 'na') { +if ($status == 'na') { // Not applicable $sql .= " AND a.percent = -1"; } @@ -1269,9 +1271,9 @@ if (count($listofextcals)) { $event->datef = $dateend + $usertime; if ($icalevent['SUMMARY']) { - $event->label = $icalevent['SUMMARY']; + $event->label = dol_string_nohtmltag($icalevent['SUMMARY']); } elseif ($icalevent['DESCRIPTION']) { - $event->label = dol_nl2br($icalevent['DESCRIPTION'], 1); + $event->label = dol_nl2br(dol_string_nohtmltag($icalevent['DESCRIPTION']), 1); } else { $event->label = $langs->trans("ExtSiteNoLabel"); } @@ -1285,7 +1287,7 @@ if (count($listofextcals)) { } // Transparency (see https://www.kanzaki.com/docs/ical/transp.html) - if ($icalevent['TRANSP']) { + if (!empty($icalevent['TRANSP'])) { if ($icalevent['TRANSP'] == "TRANSPARENT") { $event->transparency = 0; // 0 = available / free } @@ -1909,7 +1911,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } //print 'background: #'.$colortouse.';'; //print 'background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($color, -3).'), to(#'.dol_color_minus($color, -1).'));'; - //if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));'; + //if (!empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));'; //else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;'; //print ' -moz-border-radius:4px;"'; //print 'border: 1px solid #ccc" width="100%"'; @@ -1982,7 +1984,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Show title $titletoshow = $daterange; - $titletoshow .= ($titletoshow ? ' ' : '').($event->label ? $event->label : $event->libelle); + $titletoshow .= ($titletoshow ? ' ' : '').dol_escape_htmltag($event->label ? $event->label : $event->libelle); if ($event->type_code != 'ICALEVENT') { $savlabel = $event->label ? $event->label : $event->libelle; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 0ea24279df4..d4588223b26 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -22,13 +22,14 @@ * \brief Page des informations d'une action */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; 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.'/comm/action/class/cactioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -38,6 +39,9 @@ $langs->load("commercial"); $id = GETPOST('id', 'int'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('actioncard', 'globalcard')); + // Security check if ($user->socid > 0) { $action = ''; @@ -49,6 +53,8 @@ if ($user->socid && $socid) { $result = restrictedArea($user, 'societe', $socid); } +$usercancreate = $user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create); + /* * View @@ -80,25 +86,39 @@ $out .= ''.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); $out .= ''.$langs->trans("ViewDay").''; +// Add more views from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action); +if (empty($reshook)) { + $out .= $hookmanager->resPrint; +} elseif ($reshook > 1) { + $out = $hookmanager->resPrint; +} + $linkback .= $out; $morehtmlref = '
    '; // Thirdparty //$morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); - //$morehtmlref.='
    '.$langs->trans('Project') . ' '; - $morehtmlref .= $langs->trans('Project').': '; - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); - if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + //$morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - $morehtmlref .= ''; + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= $proj->getNomUrl(1); + if ($proj->title) { + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; + } + } } } $morehtmlref .= '
    '; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index b5ec104d02f..5eb538d4e62 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -27,10 +27,7 @@ * \brief Page to list actions */ -if (!defined("NOREDIRECTBYMAINTOLOGIN")) { - define('NOREDIRECTBYMAINTOLOGIN', 1); -} - +// Load Dolibarr environment 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'; @@ -430,6 +427,8 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_extrafields as ef ON (a.id = ef.fk_object)"; if (empty($user->rights->societe->client->voir) && !$socid) { @@ -566,21 +565,18 @@ $sql .= $hookmanager->resPrint; // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - /* This old and fast method to get and count full list returns all record so use a high amount of memory. - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - */ - /* The slow method does not consume memory on mysql (not tested on pgsql) */ - /*$resql = $db->query($sql, 0, 'auto', 1); - while ($db->fetch_object($resql)) { - $nbtotalofrecords++; - }*/ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),]+FROM/i', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); $resql = $db->query($sqlforcount); - $objforcount = $db->fetch_object($resql); - $nbtotalofrecords = $objforcount->nbtotalofrecords; - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } @@ -718,7 +714,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; $moreforfilter = ''; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields if ($massactionbutton) { $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); } @@ -732,6 +728,13 @@ print '
    '; print ''."\n"; print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} if (!empty($arrayfields['a.id']['checked'])) { print ''; } @@ -798,10 +801,12 @@ if (!empty($arrayfields['a.percent']['checked'])) { print ''; } // Action column -print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; $totalarray = array(); @@ -810,6 +815,9 @@ $totalarray['nbfield'] = 0; // Fields title label // -------------------------------------------------------------------- print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +} if (!empty($arrayfields['a.id']['checked'])) { print_liste_field_titre($arrayfields['a.id']['label'], $_SERVER["PHP_SELF"], "a.id", $param, "", "", $sortfield, $sortorder); $totalarray['nbfield']++; @@ -830,7 +838,7 @@ if (!empty($arrayfields['a.note']['checked'])) { print_liste_field_titre($arrayfields['a.note']['label'], $_SERVER["PHP_SELF"], "a.note", $param, "", "", $sortfield, $sortorder); $totalarray['nbfield']++; } -//if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) +//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) if (!empty($arrayfields['a.datep']['checked'])) { print_liste_field_titre($arrayfields['a.datep']['label'], $_SERVER["PHP_SELF"], "a.datep,a.id", $param, '', 'align="center"', $sortfield, $sortorder); $totalarray['nbfield']++; @@ -871,7 +879,9 @@ if (!empty($arrayfields['a.percent']['checked'])) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", $param, "", 'align="center"', $sortfield, $sortorder); $totalarray['nbfield']++; } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +} $totalarray['nbfield']++; print "\n"; @@ -924,7 +934,18 @@ while ($i < $imaxinloop) { } print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Ref if (!empty($arrayfields['a.id']['checked'])) { print ''; } // Action column - print ''; } - print ''; print ''."\n"; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 85eb355f2b6..61092df5665 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -23,20 +23,21 @@ /** - * \file htdocs/comm/action/pertype.php - * \ingroup agenda - * \brief Tab of calendar events per type + * \file htdocs/comm/action/pertype.php + * \ingroup agenda + * \brief Tab of calendar events per type */ +// Load Dolibarr environment require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { @@ -51,28 +52,35 @@ $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; -//$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; -$showbirthday = 0; + +// $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; +$showbirthday = 0; // will be hidden here // If not choice done on calendar owner, we filter on user. if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) { $filtert = $user->id; } +// Sorting $sortfield = GETPOST('sortfield', 'aZ09comma'); +if (!$sortfield) { + $sortfield = "a.datec"; +} + $sortorder = GETPOST('sortorder', 'aZ09comma'); +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Page $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; -if (!$sortorder) { - $sortorder = "ASC"; -} -if (!$sortfield) { - $sortfield = "a.datec"; -} + + // Security check $socid = GETPOST("search_socid", "int") ?GETPOST("search_socid", "int") : GETPOST("socid", "int"); @@ -83,6 +91,7 @@ if ($socid < 0) { $socid = ''; } +// Permissions $canedit = 1; if (empty($user->rights->agenda->myactions->read)) { accessforbidden(); @@ -105,6 +114,7 @@ $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GE $type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha'); $maxprint = ((GETPOST("maxprint", 'int') != '') ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) { $actioncode = GETPOST('search_actioncode', 'array', 3); @@ -117,11 +127,12 @@ if (GETPOST('search_actioncode', 'array')) { $dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); if ($dateselect > 0) { - $day = GETPOST('dateselectday', 'int'); + $day = GETPOST('dateselectday', 'int'); $month = GETPOST('dateselectmonth', 'int'); - $year = GETPOST('dateselectyear', 'int'); + $year = GETPOST('dateselectyear', 'int'); } +// working hours $tmp = empty($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? '9-18' : $conf->global->MAIN_DEFAULT_WORKING_HOURS; $tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); @@ -137,6 +148,7 @@ if ($end_h <= $begin_h) { $end_h = $begin_h + 1; } +// working days $tmp = empty($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? '1-5' : $conf->global->MAIN_DEFAULT_WORKING_DAYS; $tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); @@ -150,19 +162,24 @@ if (empty($mode) && !GETPOSTISSET('mode')) { $mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); } +// View by month if (GETPOST('viewcal', 'alpha') && $mode != 'show_day' && $mode != 'show_week' && $mode != 'show_peruser') { $mode = 'show_month'; $day = ''; -} // View by month +} +// View by week if (GETPOST('viewweek', 'alpha') || $mode == 'show_week') { $mode = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); -} // View by week +} +// View by day if (GETPOST('viewday', 'alpha') || $mode == 'show_day') { $mode = 'show_day'; $day = ($day ? $day : date("d")); -} // View by day +} +// View by year if (GETPOST('viewyear', 'alpha') || $mode == 'show_year') { $mode = 'show_year'; -} // View by year +} +// Initialize object $object = new ActionComm($db); // Load translation files required by the page @@ -189,7 +206,7 @@ if ($action == 'delete_action' && $user->rights->agenda->delete) { $event->fetch($actionid); $event->fetch_optionals(); $event->fetch_userassigned(); - $event->oldcopy = clone $event; + $event->oldcopy = dol_clone($event); $result = $event->delete(); } @@ -218,6 +235,7 @@ $parameters = array( 'resourceid' => $resourceid, 'usergroup' => $usergroup, ); + $reshook = $hookmanager->executeHooks('beforeAgendaPerType', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -226,14 +244,14 @@ if ($reshook < 0) { $form = new Form($db); $companystatic = new Societe($db); -$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; +$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("Agenda"), $help_url); $now = dol_now(); $nowarray = dol_getdate($now); -$nowyear = $nowarray['year']; +$nowyear = $nowarray['year']; $nowmonth = $nowarray['mon']; -$nowday = $nowarray['mday']; +$nowday = $nowarray['mday']; // Define list of all external calendars (global setup) @@ -246,7 +264,7 @@ $first_year = $year; $week = $prev['week']; -$day = (int) $day; +$day = (int) $day; $next = dol_get_next_day($day, $month, $year); $next_year = $year + 1; $next_month = $month; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 87def7240f5..5c5ef948c30 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -28,6 +28,7 @@ * \brief Tab of calendar events per user */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -196,7 +197,7 @@ if ($action == 'delete_action' && $user->rights->agenda->delete) { $event->fetch($actionid); $event->fetch_optionals(); $event->fetch_userassigned(); - $event->oldcopy = clone $event; + $event->oldcopy = dol_clone($event); $result = $event->delete(); } @@ -901,7 +902,7 @@ while ($currentdaytoshow < $lastdaytoshow) { /* Use this list to have for all users */ $sql = "SELECT DISTINCT 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 (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ug.entity IN (".getEntity('usergroup').")"; $sql .= " AND ug.fk_user = u.rowid "; diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 9b3f9a27140..2cc3f6a7a9d 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -24,12 +24,13 @@ * \brief Page with reports of actions */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.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/modules/action/rapport.pdf.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.class.php'; // Load translation files required by the page $langs->loadLangs(array("agenda", "commercial")); diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index 7a4cfe7a6ea..fa0c9117430 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -24,6 +24,7 @@ * \brief Page to setup extra fields of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -79,13 +80,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print "
    "; diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 91517d456c5..0f904b31407 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -27,6 +27,7 @@ * \brief Page to setup extra fields of order */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -82,13 +83,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 173ee8a6510..f578aa75cf5 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -32,6 +32,7 @@ * \brief Page to show customer card of a third party */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -44,47 +45,47 @@ if (isModEnabled('facture')) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; } -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } // Load translation files required by the page $langs->loadLangs(array('companies', 'banks')); -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $langs->load("contracts"); } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $langs->load("orders"); } -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { $langs->load("sendings"); } if (isModEnabled('facture')) { $langs->load("bills"); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $langs->load("interventions"); } -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); } @@ -130,7 +131,7 @@ if ($id > 0 && empty($object->id)) { } } if ($object->id > 0) { - if (!($object->client > 0) || empty($user->rights->societe->lire)) { + if (!($object->client > 0) || !$user->hasRight('societe', 'lire')) { accessforbidden(); } } @@ -157,7 +158,7 @@ if (empty($reshook)) { $action = ""; } - // set accountancy code + // Set accountancy code if ($action == 'setcustomeraccountancycode') { $result = $object->fetch($id); $object->code_compta_client = GETPOST("customeraccountancycode"); @@ -168,7 +169,7 @@ if (empty($reshook)) { } } - // terms of the settlement + // Payment terms of the settlement if ($action == 'setconditions' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha')); @@ -177,7 +178,7 @@ if (empty($reshook)) { } } - // mode de reglement + // Payment mode if ($action == 'setmode' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); @@ -186,7 +187,7 @@ if (empty($reshook)) { } } - // transport mode + // Transport mode if ($action == 'settransportmode' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setTransportMode(GETPOST('transport_mode_id', 'alpha')); @@ -420,7 +421,7 @@ if ($object->id > 0) { print ""; print ''; - // Mode de reglement par defaut + // Default payment mode print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; @@ -952,7 +973,7 @@ while ($i < $imaxinloop) { if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) { $labeltype = 'AC_OTH'; } - if ($actionstatic->type_code == 'AC_OTH' && $actionstatic->code == 'TICKET_MSG') { + if (preg_match('/^TICKET_MSG/', $actionstatic->code)) { $labeltype = $langs->trans("Message"); } else { if (!empty($arraylist[$labeltype])) { @@ -1103,15 +1124,17 @@ while ($i < $imaxinloop) { print ''.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).''; - 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->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
    '; print '"; print ''; - if (!empty($conf->banque->enabled)) { - // Compte bancaire par défaut + if (isModEnabled("banque")) { + // Default bank account for payments print '
    '; print $langs->trans('PaymentMode'); @@ -438,8 +439,8 @@ if ($object->id > 0) { print "
    '; print ''; print ''; } - if (!empty($conf->intracommreport->enabled)) { + if (isModEnabled('intracommreport')) { // Transport mode by default print '
    '; print $langs->trans('PaymentBankAccount'); @@ -510,7 +511,7 @@ if ($object->id > 0) { } if ($object->client) { - if (!empty($conf->commande->enabled) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { + if (isModEnabled('commande') && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { print ''."\n"; print '
    '; @@ -544,7 +545,7 @@ if ($object->id > 0) { } // Warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) { + if (isModEnabled('stock') && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) { $langs->load('stocks'); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -584,7 +585,7 @@ if ($object->id > 0) { print '
    '; print ''; print ''; - print ''; + print ''; $datem = $db->jdate($obj->dv); print '
    '; @@ -605,7 +606,7 @@ if ($object->id > 0) { } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { $langs->load("categories"); print '
    '.$langs->trans("CustomersCategoriesShort").''; @@ -621,7 +622,7 @@ if ($object->id > 0) { include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php'; // Module Adherent - if (!empty($conf->adherent->enabled)) { + if (isModEnabled('adherent')) { $langs->load("members"); $langs->load("users"); @@ -697,7 +698,7 @@ if ($object->id > 0) { $boxstat .= ''; $boxstat .= '
    '; - if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { + if (isModEnabled("propal") && $user->rights->propal->lire) { // Box proposals $tmp = $object->getOutstandingProposals(); $outstandingOpened = $tmp['opened']; @@ -718,7 +719,7 @@ if ($object->id > 0) { } } - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { + if (isModEnabled('commande') && $user->rights->commande->lire) { // Box commandes $tmp = $object->getOutstandingOrders(); $outstandingOpened = $tmp['opened']; @@ -818,7 +819,7 @@ if ($object->id > 0) { /* * Latest proposals */ - if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { + if (isModEnabled("propal") && $user->rights->propal->lire) { $langs->load("propal"); $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht"; @@ -913,7 +914,7 @@ if ($object->id > 0) { /* * Latest orders */ - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { + if (isModEnabled('commande') && $user->rights->commande->lire) { $param =""; $sql = "SELECT s.nom, s.rowid"; @@ -1024,7 +1025,7 @@ if ($object->id > 0) { /* * Latest shipments */ - if (!empty($conf->expedition->enabled) && $user->rights->expedition->lire) { + if (isModEnabled("expedition") && $user->rights->expedition->lire) { $sql = 'SELECT e.rowid as id'; $sql .= ', e.ref, e.entity'; $sql .= ', e.date_creation'; @@ -1122,7 +1123,7 @@ if ($object->id > 0) { /* * Latest contracts */ - if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { + if (isModEnabled('contrat') && $user->rights->contrat->lire) { $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut as contract_status, c.datec as dc, c.date_contrat as dcon, c.ref_customer as refcus, c.ref_supplier as refsup, c.entity,"; $sql .= " c.last_main_doc, c.model_pdf"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; @@ -1164,7 +1165,7 @@ if ($object->id > 0) { $late = ''; foreach ($contrat->lines as $line) { if ($contrat->statut == Contrat::STATUS_VALIDATED && $line->statut == ContratLigne::STATUS_OPEN) { - if (((!empty($line->date_fin_validite) ? $line->date_fin_validite : 0) + $conf->contrat->services->expires->warning_delay) < $now) { + if (((!empty($line->date_end) ? $line->date_end : 0) + $conf->contrat->services->expires->warning_delay) < $now) { $late = img_warning($langs->trans("Late")); } } @@ -1230,7 +1231,7 @@ if ($object->id > 0) { /* * Latest interventions */ - if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) { + if (isModEnabled('ficheinter') && $user->rights->ficheinter->lire) { $sql = "SELECT s.nom, s.rowid, f.rowid as id, f.ref, f.fk_statut, f.duree as duration, f.datei as startdate, f.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f"; $sql .= " WHERE f.fk_soc = s.rowid"; @@ -1548,12 +1549,12 @@ if ($object->id > 0) { print ''; } - if (!empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status == 1) { + if (isModEnabled("propal") && $user->rights->propal->creer && $object->status == 1) { $langs->load("propal"); print ''; } - if (!empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status == 1) { + if (isModEnabled('commande') && $user->rights->commande->creer && $object->status == 1) { $langs->load("orders"); print ''; } @@ -1563,14 +1564,14 @@ if ($object->id > 0) { print ''; } - if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status == 1) { + if (isModEnabled('ficheinter') && $user->rights->ficheinter->creer && $object->status == 1) { $langs->load("fichinter"); print ''; } // Add invoice if ($user->socid == 0) { - if (!empty($conf->deplacement->enabled) && $object->status == 1) { + if (isModEnabled('deplacement') && $object->status == 1) { $langs->load("trips"); print ''; } @@ -1581,7 +1582,7 @@ if ($object->id > 0) { } else { $langs->loadLangs(array("orders", "bills")); - if (!empty($conf->commande->enabled)) { + if (isModEnabled('commande')) { if ($object->client != 0 && $object->client != 2) { if (!empty($orders2invoice) && $orders2invoice > 0) { print ''; diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index d83fdbcb78c..19be738a50e 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -24,6 +24,7 @@ * \brief Liste des contacts */ +// Load Dolibarr environment require '../main.inc.php'; // Load translation files required by the page diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index a57c7232885..67af97cfe12 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -27,6 +27,7 @@ * \brief Home page of commercial area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; @@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } @@ -71,7 +72,12 @@ if ($user->socid > 0) { } else { $id = 0; } -restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); + +//restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); +if (!$user->hasRight('propal', 'read') && !$user->hasRight('supplier_proposal', 'read') && !$user->hasRight('commande', 'read') && !$user->hasRight('fournisseur', 'commande', 'read') + && !$user->hasRight('supplier_order', 'read') && !$user->hasRight('fichinter', 'read')) { + accessforbidden(); +} $maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD); @@ -90,20 +96,20 @@ $maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global- $form = new Form($db); $formfile = new FormFile($db); $companystatic = new Societe($db); -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { $propalstatic = new Propal($db); } -if (!empty($conf->supplier_proposal->enabled)) { +if (isModEnabled('supplier_proposal')) { $supplierproposalstatic = new SupplierProposal($db); } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $orderstatic = new Commande($db); } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { $supplierorderstatic = new CommandeFournisseur($db); } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $fichinterstatic = new Fichinter($db); } @@ -128,7 +134,7 @@ if ($tmp) { * Draft customer proposals */ -if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { +if (isModEnabled("propal") && $user->hasRight("propal", "lire")) { $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -226,7 +232,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { * Draft supplier proposals */ -if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { +if (isModEnabled('supplier_proposal') && $user->hasRight("supplier_proposal", "lire")) { $sql = "SELECT p.rowid, p.ref, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -320,10 +326,10 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa /* - * Draft customer orders + * Draft sales orders */ -if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { +if (isModEnabled('commande') && $user->rights->commande->lire) { $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, c.fk_statut as status"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -421,7 +427,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { * Draft purchase orders */ -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "commande", "lire")) || (isModEnabled("supplier_order") && $user->hasRight("supplier_order", "lire"))) { $sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_statut as status"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -516,9 +522,9 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU /* - * Draft interventionals + * Draft interventions */ -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $sql = "SELECT f.rowid, f.ref, s.nom as name, f.fk_statut"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -545,13 +551,12 @@ if (!empty($conf->ficheinter->enabled)) { if ($resql) { $num = $db->num_rows($resql); $nbofloop = min($num, $maxofloop); + startSimpleTable("DraftFichinter", "fichinter/list.php", "search_status=".Fichinter::STATUS_DRAFT, 2, $num); - print '
    '; - print ''; - print ''; - print ''; + //print ''; + //print ''; - if ($num) { + if ($num > 0) { $i = 0; while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -584,6 +589,10 @@ if (!empty($conf->ficheinter->enabled)) { $i++; } } + + addSummaryTableLine(3, $num, $nbofloop, $total, "NoIntervention"); + finishSimpleTable(true); + print "
    '.$langs->trans("DraftFichinter").'
    '.$langs->trans("DraftFichinter").'
    "; } } @@ -593,7 +602,7 @@ print '
    '; /* * Last modified customers or prospects */ -if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { +if (isModEnabled("societe") && $user->hasRight('societe', 'lire')) { $sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur"; @@ -668,7 +677,7 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { $s .= ''.dol_substr($langs->trans("Customer"), 0, 1).''; } /* - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $obj->fournisseur) { $s .= ''.dol_substr($langs->trans("Supplier"), 0, 1).''; }*/ @@ -699,7 +708,7 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { /* * Last suppliers */ -if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->societe->lire) { +if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $user->hasRight('societe', 'lire')) { $sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur"; @@ -764,7 +773,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S { $s .= ''.dol_substr($langs->trans("Customer"), 0, 1).''; }*/ - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $obj->fournisseur) { $s .= ''.dol_substr($langs->trans("Supplier"), 0, 1).''; } print $s; @@ -810,7 +819,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S /* * Latest contracts */ -if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT +if (isModEnabled('contrat') && $user->hasRight("contrat", "lire") && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT $staticcontrat = new Contrat($db); $sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias"; @@ -888,7 +897,7 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) { // T /* * Opened (validated) proposals */ -if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { +if (isModEnabled("propal") && $user->hasRight("propal", "lire")) { $sql = "SELECT p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -1007,7 +1016,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { /* * Opened (validated) order */ -if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { +if (isModEnabled('commande') && $user->rights->commande->lire) { $sql = "SELECT c.rowid as commandeid, c.total_ttc, c.total_ht, c.total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; $sql .= ", s.code_client, s.code_compta, s.client"; @@ -1090,7 +1099,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { print '
    '; print '
    '.$companystatic->getNomUrl(1, 'customer', 44).''.$companystatic->getNomUrl(1, 'customer', 44).''; print dol_print_date($datem, 'day', 'tzserver'); diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index bd052f4161e..d2e9fc7d0d5 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -26,6 +26,7 @@ if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; @@ -38,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('mails', 'companies')); -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { $langs->load("categories"); } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index c26b5afe399..32207425d2a 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -28,6 +28,7 @@ if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -83,6 +84,8 @@ if (empty($user->rights->mailing->lire) || (empty($conf->global->EXTERNAL_USERS_ accessforbidden(); } +$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing'); + /* * Actions @@ -123,8 +126,6 @@ if (empty($reshook)) { setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action = ''; } else { - $upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing'); - if ($object->statut == 0) { dol_print_error('', 'ErrorMailIsNotValidated'); exit; @@ -220,18 +221,19 @@ if (empty($reshook)) { $substitutionarray['__OTHER4__'] = $other4; $substitutionarray['__OTHER5__'] = $other5; $substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter) + $substitutionarray['__SENDEREMAIL_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter) $substitutionarray['__CHECK_READ__'] = ''; $substitutionarray['__UNSUBSCRIBE__'] = ''.$langs->trans("MailUnsubcribe").''; $substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'&email='.urlencode($obj->email).'&mtid='.$obj->rowid; $onlinepaymentenabled = 0; - if (!empty($conf->paypal->enabled)) { + if (isModEnabled('paypal')) { $onlinepaymentenabled++; } - if (!empty($conf->paybox->enabled)) { + if (isModEnabled('paybox')) { $onlinepaymentenabled++; } - if (!empty($conf->stripe->enabled)) { + if (isModEnabled('stripe')) { $onlinepaymentenabled++; } if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) { @@ -258,10 +260,10 @@ if (empty($reshook)) { } } if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm'). ''; + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm'). ''; } /* For backward compatibility, deprecated */ - if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { + if (isModEnabled('paypal') && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { $substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) { @@ -316,7 +318,8 @@ if (empty($reshook)) { // Mail making $trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid; - $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing'); + $upload_dir_tmp = $upload_dir; + $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp); if ($mail->error) { $res = 0; @@ -366,7 +369,7 @@ if (empty($reshook)) { } if (!empty($conf->global->MAILING_DELAY)) { - dol_syslog("Wait a delay of MAILING_DELAY=".$conf->global->MAILING_DELAY); + dol_syslog("Wait a delay of MAILING_DELAY=".((float) $conf->global->MAILING_DELAY)); usleep((float) $conf->global->MAILING_DELAY * 1000000); } @@ -476,7 +479,8 @@ if (empty($reshook)) { } $trackid = 'emailing-test'; - $mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing'); + $upload_dir_tmp = $upload_dir; + $mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', '', $upload_dir_tmp); $result = $mailfile->sendfile(); if ($result) { @@ -726,11 +730,14 @@ if ($action == 'create') { // Print mail form print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'object_email'); - print dol_get_fiche_head(); + print dol_get_fiche_head(array(), '', '', -3); print ''; + print ''; + print ''; + print ''; // Other attributes @@ -742,7 +749,7 @@ if ($action == 'create') { } print '
    '.$langs->trans("MailTitle").'
    '.$langs->trans("MailFrom").'
    '.$langs->trans("MailErrorsTo").'
    '; - print '

    '; + print '

    '; print ''; print ''; @@ -761,7 +768,7 @@ if ($action == 'create') { print dol_get_fiche_end(); - print $form->buttonsSaveCancel("CreateMailing", ''); + print $form->buttonsSaveCancel("CreateMailing", 'Cancel'); print ''; } else { @@ -887,16 +894,16 @@ if ($action == 'create') { // Description print ''; // From print '
    '.$langs->trans("MailTopic").'
    '; - print $form->editfieldkey("MailTitle", 'title', $object->title, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldkey("MailTitle", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string'); print ''; - print $form->editfieldval("MailTitle", 'title', $object->title, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldval("MailTitle", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string'); print '
    '; - print $form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'string'); print ''; - print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'string'); $email = CMailFile::getValidAddress($object->email_from, 2); if ($email && !isValidEmail($email)) { $langs->load("errors"); @@ -910,9 +917,9 @@ if ($action == 'create') { // Errors to print '
    '; - print $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'string'); print ''; - print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'string'); $email = CMailFile::getValidAddress($object->email_errorsto, 2); if ($email && !isValidEmail($email)) { $langs->load("errors"); @@ -977,12 +984,12 @@ if ($action == 'create') { if (GETPOST('cancel', 'alpha') || $confirm == 'no' || $action == '' || in_array($action, array('settodraft', 'valid', 'delete', 'sendall', 'clone', 'test'))) { print "\n\n
    \n"; - if (($object->statut == 1) && ($user->rights->mailing->valider || $object->user_validation == $user->id)) { + if (($object->statut == 1) && ($user->hasRight('mailing', 'valider') || $object->user_validation == $user->id)) { print ''.$langs->trans("SetToDraft").''; } - if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer) { - if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) { + if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->hasRight('mailing', 'creer')) { + if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) { print ''.$langs->trans("EditWithEditor").''; } else { print ''.$langs->trans("EditWithTextEditor").''; @@ -1011,7 +1018,7 @@ if ($action == 'create') { } } - if (($object->statut == 1 || $object->statut == 2) && $object->nbemail > 0 && $user->rights->mailing->valider) { + if (($object->statut == 1 || $object->statut == 2) && $object->nbemail > 0 && $user->hasRight('mailing', 'valider')) { if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { print ''.$langs->trans("SendMailing").''; } elseif (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) { @@ -1021,11 +1028,11 @@ if ($action == 'create') { } } - if ($user->rights->mailing->creer) { + if ($user->hasRight('mailing', 'creer')) { print ''.$langs->trans("ToClone").''; } - if (($object->statut == 2 || $object->statut == 3) && $user->rights->mailing->valider) { + if (($object->statut == 2 || $object->statut == 3) && $user->hasRight('mailing', 'valider')) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("ResetMailing").''; } else { @@ -1033,7 +1040,7 @@ if ($action == 'create') { } } - if (($object->statut <= 1 && $user->rights->mailing->creer) || $user->rights->mailing->supprimer) { + if (($object->statut <= 1 && $user->hasRight('mailing', 'creer')) || $user->hasRight('mailing', 'supprimer')) { if ($object->statut > 0 && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->delete)) { print ''.$langs->trans("DeleteMailing").''; } else { @@ -1086,18 +1093,18 @@ if ($action == 'create') { } - $htmltext = ''.$langs->trans("FollowingConstantsWillBeSubstituted").':
    '; + $htmltext = ''.$langs->trans("FollowingConstantsWillBeSubstituted").':

    '; foreach ($object->substitutionarray as $key => $val) { $htmltext .= $key.' = '.$langs->trans($val).'
    '; } - $htmltext .= '
    '; + $htmltext .= '
    '; // Print mail content - print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'helpclickable', '', 0, 2, 'emailsubstitionhelp'), 'generic'); + print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'helpclickable', '', 0, 3, 'emailsubstitionhelp'), 'generic'); print dol_get_fiche_head('', '', '', -1); - print ''; + print '
    '; // Subject print ''; @@ -1262,8 +1269,9 @@ if ($action == 'create') { $out .= '
    '; } } else { - $out .= ''.$langs->trans("NoAttachedFiles").'
    '; + //$out .= ''.$langs->trans("NoAttachedFiles").'
    '; } + // Add link to add file $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; @@ -1272,7 +1280,7 @@ if ($action == 'create') { } $out .= ''; $out .= ' '; - $out .= ''; + $out .= ''; print $out; print ''; @@ -1306,7 +1314,7 @@ if ($action == 'create') { print '
    '; print ''; - print '     '; + print '     '; print ''; print '
    '; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index c9b48665c95..dde6e3204d6 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -24,6 +24,7 @@ * \brief Page to define emailing targets */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; @@ -393,7 +394,7 @@ if ($object->fetch($id) >= 0) { if (empty($obj->picto)) { $obj->picto = 'generic'; } - print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle pictomodule"'); + print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle pictomodule pictofixedwidth"'); print ' '; print $obj->getDesc(); print ''; @@ -515,7 +516,7 @@ if ($object->fetch($id) >= 0) { $num = $db->num_rows($resql); $param = "&id=".$object->id; - //if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + //if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } @@ -543,7 +544,7 @@ if ($object->fetch($id) >= 0) { if ($allowaddtarget) { $morehtmlcenter = ''.$langs->trans("ToClearAllRecipientsClickHere").'id.'" class="button reposition smallpaddingimp">'.$langs->trans("TargetsReset").''; } - $morehtmlcenter .= '   id.'">'.$langs->trans("Download").''; + $morehtmlcenter .= '   id.'">'.img_picto('', 'download', 'class="pictofixedwidth"').$langs->trans("Download").''; $massactionbutton = ''; @@ -632,10 +633,12 @@ if ($object->fetch($id) >= 0) { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + include_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; $objectstaticmember = new Adherent($db); $objectstaticuser = new User($db); $objectstaticcompany = new Societe($db); $objectstaticcontact = new Contact($db); + $objectstaticeventorganization = new ConferenceOrBoothAttendee($db); while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); @@ -644,7 +647,7 @@ if ($object->fetch($id) >= 0) { print ''; print ''; print ''; - print ''; + print ''; print '
    '.$langs->trans("MailTopic").''.$object->sujet.'
    '.img_picto('$obj->email', 'email', 'class="paddingright"').dol_escape_htmltag($obj->email).''.dol_escape_htmltag($obj->lastname).''.dol_escape_htmltag($obj->firstname).''.dol_escape_htmltag($obj->other).''.dol_escape_htmltag($obj->other).''; if (empty($obj->source_id) || empty($obj->source_type)) { print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility @@ -661,6 +664,9 @@ if ($object->fetch($id) >= 0) { } elseif ($obj->source_type == 'contact') { $objectstaticcontact->fetch($obj->source_id); print $objectstaticcontact->getNomUrl(1); + } elseif ($obj->source_type == 'eventorganizationattendee') { + $objectstaticeventorganization->fetch($obj->source_id); + print $objectstaticeventorganization->getNomUrl(1); } else { print $obj->source_url; } diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index bd1a83e9959..d3ebc379b55 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -24,6 +24,7 @@ * \brief Home page for emailing area */ +// Load Dolibarr environment 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'; @@ -58,7 +59,7 @@ print load_fiche_titre($title); print '
    '; -//if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo +//if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo //{ // Search into emailings print '
    '; diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 74d6943a044..86ce2eb70b2 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -22,6 +22,7 @@ * \brief Page with log information for emailing */ +// Load Dolibarr environment 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'; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 757b6373f3f..13a7e63d364 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -22,6 +22,7 @@ * \brief Liste des mailings */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 0e582946df9..81e5cd0d9d2 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -23,6 +23,7 @@ * \brief Tab to set the price level of a thirdparty */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 084f312c836..07729fd55de 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1,20 +1,20 @@ - * Copyright (C) 2004-2014 Laurent Destailleur +/* Copyright (C) 2001-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2010-2021 Philippe Grand + * Copyright (C) 2010-2022 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2016 Marcos García - * Copyright (C) 2018-2021 Frédéric France - * Copyright (C) 2020 Nicolas ZABOURI - * Copyright (C) 2022 Gauthier VERDOL + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2016 Marcos García + * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2020 Nicolas ZABOURI + * Copyright (C) 2022 Gauthier VERDOL * * 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,6 +37,7 @@ * \brief Page of commercial proposals card and list */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -49,21 +50,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (!empty($conf->variants->enabled)) { +if (isModEnabled('variants')) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } // Load translation files required by the page $langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other')); -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load('incoterm'); } -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { $langs->load('margins'); } @@ -87,9 +88,6 @@ $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); -// Nombre de ligne pour choix de produit/service predefinis -$NBLINES = 4; - $object = new Propal($db); $extrafields = new ExtraFields($db); @@ -119,9 +117,10 @@ $usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreat $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->validate))); $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->send))); -$usercancreateorder = $user->hasRight("commande", "creer"); -$usercancreateinvoice = $user->hasRight("facture", "creer"); -$usercancreatecontract = $user->hasRight("contrat", "creer"); +$usermustrespectpricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); +$usercancreateorder = $user->hasRight('commande', 'creer'); +$usercancreateinvoice = $user->hasRight('facture', 'creer'); +$usercancreatecontract = $user->hasRight('contrat', 'creer'); $usercancreateintervention = $user->hasRight('ficheinter', 'creer'); $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); @@ -132,7 +131,6 @@ $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown // Security check if (!empty($user->socid)) { $socid = $user->socid; - $object->id = $user->socid; } restrictedArea($user, 'propal', $object->id); @@ -257,7 +255,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -275,14 +273,17 @@ if (empty($reshook)) { // Validation $idwarehouse = GETPOST('idwarehouse', 'int'); $result = $object->valid($user); + if ( $result > 0 && ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ) { + $result = $object->closeProposal($user, $object::STATUS_SIGNED); + } if ($result >= 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -324,8 +325,8 @@ if (empty($reshook)) { } elseif (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) $newlang = $object->thirdparty->default_lang; if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -345,8 +346,8 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) $newlang = $object->thirdparty->default_lang; if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -373,7 +374,7 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) { + } elseif ($action == 'set_incoterms' && isModEnabled('incoterm') && $usercancreate) { // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } elseif ($action == 'add' && $usercancreate) { @@ -470,7 +471,7 @@ if (empty($reshook)) { $object->origin_id = GETPOST('originid'); // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } @@ -645,10 +646,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -699,7 +700,7 @@ if (empty($reshook)) { $action = 'closeas'; } elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) { // prevent browser refresh from closing proposal several times - if ($object->statut == $object::STATUS_VALIDATED) { + if ($object->statut == $object::STATUS_VALIDATED || ( ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) { $db->begin(); $result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); @@ -715,7 +716,7 @@ if (empty($reshook)) { if ( !$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on' - && ! empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer) + && !empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer) ) { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; @@ -744,7 +745,7 @@ if (empty($reshook)) { $ret = $deposit->fetch($deposit->id); // Reload to get new records $outputlangs = $langs; - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($deposit->thirdparty->default_lang); $outputlangs->load('products'); @@ -773,7 +774,7 @@ if (empty($reshook)) { if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) { $db->begin(); - $result = $object->reopen($user, 1); + $result = $object->reopen($user, empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -875,7 +876,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -896,7 +897,7 @@ if (empty($reshook)) { } } } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '' && $usercancreate) { - // Define vat_rate + // Define a vat_rate for all lines $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); $vat_rate = str_replace('*', '', $vat_rate); $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); @@ -905,7 +906,7 @@ if (empty($reshook)) { $result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $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); } } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('remiseforalllines', 'alpha') !== '' && $usercancreate) { - // Define vat_rate + // Define a discount for all lines $remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0); $remise_percent = str_replace('*', '', $remise_percent); foreach ($object->lines as $line) { @@ -915,19 +916,36 @@ if (empty($reshook)) { // Set if we used free entry or predefined product $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); - $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); - $prod_entry_mode = GETPOST('prod_entry_mode'); + + $price_ht = ''; + $price_ht_devise = ''; + $price_ttc = ''; + $price_ttc_devise = ''; + + if (GETPOST('price_ht') !== '') { + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ht') !== '') { + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); + } + if (GETPOST('price_ttc') !== '') { + $price_ttc = price2num(GETPOST('price_ttc'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ttc') !== '') { + $price_ttc_devise = price2num(GETPOST('multicurrency_price_ttc'), 'CU', 2); + } + + $prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09'); if ($prod_entry_mode == 'free') { $idprod = 0; - $tva_tx = (GETPOST('tva_tx') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx'))) : 0); + $tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0); } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); - $remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2); + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); if (empty($remise_percent)) { $remise_percent = 0; } @@ -948,7 +966,7 @@ if (empty($reshook)) { $error++; } - if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && $price_ht === '' && $price_ht_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal. + if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && $price_ht === '' && $price_ht_devise === '' && $price_ttc === '' && $price_ttc_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal. setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -957,7 +975,7 @@ if (empty($reshook)) { $error++; } - if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') { + if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') { if ($combinations = GETPOST('combinations', 'array')) { //Check if there is a product with the given combination $prodcomb = new ProductCombination($db); @@ -975,6 +993,7 @@ if (empty($reshook)) { $pu_ht = 0; $pu_ttc = 0; $price_min = 0; + $price_min_ttc = 0; $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); $db->begin(); @@ -1002,6 +1021,7 @@ if (empty($reshook)) { $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; $price_min = $prod->price_min; + $price_min_ttc = $prod->price_min_ttc; $price_base_type = $prod->price_base_type; // If price per segment @@ -1009,6 +1029,7 @@ if (empty($reshook)) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; + $price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { @@ -1026,13 +1047,14 @@ if (empty($reshook)) { $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result) { // If there is some prices specific to the customer if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines[0]->price); $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_min = price($prodcustprice->lines[0]->price_min); + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { @@ -1091,13 +1113,15 @@ if (empty($reshook)) { $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); - // if price ht is forced (ie: calculated by margin rate and cost price). TODO Why this ? + // Set unit price to use if (!empty($price_ht) || $price_ht === '0') { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); + } elseif (!empty($price_ttc) || $price_ttc === '0') { + $pu_ttc = price2num($price_ttc, 'MU'); + $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } elseif ($tmpvat != $tmpprodvat) { - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + // Is this still used ? if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } else { @@ -1108,7 +1132,7 @@ if (empty($reshook)) { $desc = ''; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -1138,23 +1162,11 @@ if (empty($reshook)) { $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); } - // Add dimensions into product description - /*if (empty($conf->global->MAIN_PRODUCT_DISABLE_AUTOADD_DIM)) - { - $text=''; - if ($prod->weight) $text.=($text?"\n":"").$outputlangs->trans("Weight").': '.$prod->weight.' '.$prod->weight_units; - if ($prod->length) $text.=($text?"\n":"").$outputlangs->trans("Length").': '.$prod->length.' '.$prod->length_units; - if ($prod->surface) $text.=($text?"\n":"").$outputlangs->trans("Surface").': '.$prod->surface.' '.$prod->surface_units; - if ($prod->volume) $text.=($text?"\n":"").$outputlangs->trans("Volume").': '.$prod->volume.' '.$prod->volume_units; - - $desc = dol_concatdesc($desc, $text); - }*/ - // Add custom code and origin country into description if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { $tmptxt = '('; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'alpha')) { @@ -1196,15 +1208,22 @@ if (empty($reshook)) { $fk_unit = $prod->fk_unit; } else { $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); + $pu_ttc = price2num($price_ttc, 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); + if (empty($tva_tx)) { + $tva_npr = 0; + } $tva_tx = str_replace('*', '', $tva_tx); $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); $desc = $product_desc; $type = GETPOST('type'); - $fk_unit = GETPOST('units', 'alpha'); $pu_ht_devise = price2num($price_ht_devise, 'MU'); + $pu_ttc_devise = price2num($price_ttc_devise, 'MU'); + + if ($pu_ttc && !$pu_ht) { + $price_base_type = 'TTC'; + } } // Margin @@ -1223,10 +1242,22 @@ if (empty($reshook)) { $info_bits |= 0x01; } - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { - $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessages($mesg, null, 'errors'); - } else { + //var_dump(price2num($price_min)); var_dump(price2num($pu_ht)); var_dump($remise_percent); + //var_dump(price2num($price_min_ttc)); var_dump(price2num($pu_ttc)); var_dump($remise_percent);exit; + + if ($usermustrespectpricemin) { + if ($pu_ht && $price_min && ((price2num($pu_ht) * (1 - $remise_percent / 100)) < price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } + } + + if (!$error) { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, min($rank, count($object->lines) + 1), 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $date_start, $date_end, $array_options, $fk_unit, '', 0, $pu_ht_devise); @@ -1236,7 +1267,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -1304,12 +1335,14 @@ if (empty($reshook)) { $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); $pu_ht = price2num(GETPOST('price_ht'), '', 2); + $pu_ttc = price2num(GETPOST('price_ttc'), '', 2); // Add buying price $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : ''); $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); + $pu_ttc_devise = price2num(GETPOST('multicurrency_subprice_ttc'), '', 2); $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); @@ -1340,16 +1373,32 @@ if (empty($reshook)) { $res = $product->fetch($productid); $type = $product->type; + $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); $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]; + $price_min = $product->multiprices_min[$object->thirdparty->price_level]; + } + $price_min_ttc = $product->price_min_ttc; + if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) { + $price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level]; } - $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) { - setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); - $error++; + //var_dump(price2num($price_min)); var_dump(price2num($pu_ht)); var_dump($remise_percent); + //var_dump(price2num($price_min_ttc)); var_dump(price2num($pu_ttc)); var_dump($remise_percent);exit; + + if ($usermustrespectpricemin) { + if ($pu_ht && $price_min && ((price2num($pu_ht) * (1 - $remise_percent / 100)) < price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } } } else { $type = GETPOST('type'); @@ -1377,7 +1426,14 @@ if (empty($reshook)) { $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); - $result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise); + $pu = $pu_ht; + $price_base_type = 'HT'; + if (empty($pu) && !empty($pu_ttc)) { + $pu = $pu_ttc; + $price_base_type = 'TTC'; + } + + $result = $object->updateline(GETPOST('lineid', 'int'), $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $description, $price_base_type, $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise); if ($result >= 0) { $db->commit(); @@ -1385,7 +1441,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -1541,12 +1597,16 @@ $form = new Form($db); $formfile = new FormFile($db); $formpropal = new FormPropal($db); $formmargin = new FormMargin($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } -$title = $langs->trans('Proposal')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewPropal"); +} $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote'; + llxHeader('', $title, $help_url); $now = dol_now(); @@ -1616,7 +1676,7 @@ if ($action == 'create') { $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!empty($objectsrc->multicurrency_code)) { $currency_code = $objectsrc->multicurrency_code; } @@ -1626,7 +1686,7 @@ if ($action == 'create') { } } } else { - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($soc->multicurrency_code)) { $currency_code = $soc->multicurrency_code; } } @@ -1635,7 +1695,7 @@ if ($action == 'create') { if ($soc->fk_warehouse > 0) { $warehouse_id = $soc->fk_warehouse; } - if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (isModEnabled('stock') && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; } @@ -1681,7 +1741,7 @@ if ($action == 'create') { //$warehouse_id = $soc->warehouse_id; } else { print '
    '; - print img_picto('', 'company').$form->select_company('', 'socid', '((s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); + print img_picto('', 'company').$form->select_company('', 'socid', '((s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print ' + ' + ); } - - ob_start(); - $form->select_conditions_paiements(0, 'cond_reglement_id', -1, 0, 0, 'minwidth200'); - $paymentTermsSelect = ob_get_clean(); - - $formquestion[] = array( - 'type' => 'other', - 'tdclass' => 'fieldrequired showonlyifgeneratedeposit', - 'name' => 'cond_reglement_id', - 'label' => $langs->trans('PaymentTerm'), - 'value' => $paymentTermsSelect - ); - - $formquestion[] = array( - 'type' => 'checkbox', - 'tdclass' => 'showonlyifgeneratedeposit', - 'name' => 'validate_generated_deposit', - 'label' => $langs->trans('ValidateGeneratedDeposit') - ); - - $formquestion[] = array( - 'type' => 'onecolumn', - 'value' => ' - - ' - ); } } - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $formquestion = array_merge($formquestion, array( @@ -2149,7 +2216,11 @@ if ($action == 'create') { )); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + } else { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + } } elseif ($action == 'delete') { // Confirm delete $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); @@ -2176,7 +2247,7 @@ if ($action == 'create') { } $text = $langs->trans('ConfirmValidateProp', $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -2223,41 +2294,30 @@ if ($action == 'create') { $morehtmlref = '
    '; // Ref customer $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.$conf->global->THIRDPARTY_REF_INPUT_SIZE : ''), '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); + $morehtmlref .= '
    '.$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->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').''; + $morehtmlref .= '
    '; if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ': '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -2271,7 +2331,7 @@ if ($action == 'create') { print '
    '; print '
    '; - print ''; + print '
    '; // Link for thirdparty discounts if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -2331,7 +2391,7 @@ if ($action == 'create') { // Date end proposal print ''; print '
    '; - print ''; - // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate"); $maxfilesizearray = getMaxFileSizeArray(); @@ -195,6 +193,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $texte .= ''; $texte .= ''; $texte .= '
    '; + $texte .= ''; $texte .= '
    '; + print ''; if ($action != 'editecheance' && $usercancreate && $caneditfield) { @@ -2407,7 +2467,7 @@ if ($action == 'create') { // Delivery delay print ''; - print ''; + print ''; + print ''; print ''; } } else { print ''; + print ''; print ''; } print '
    '; print $langs->trans('DateEndPropal'); print '
    '; print ''; // Shipping Method - if (!empty($conf->expedition->enabled)) { + if (isModEnabled("expedition")) { print ''; print ''; print ''; print ''; -print '\n"; @@ -489,9 +494,14 @@ if ($num > 0) { } } + $reg = array(); + if (preg_match('/:(.*)$/', $obj->label, $reg)) { + $langs->load($reg[1]); + } + $object->id = $obj->rowid; $object->ref = $obj->rowid; - $object->label = $obj->label; + $object->label = preg_replace('/:.*$/', '', $obj->label); $object->status = $obj->status; $object->priority = $obj->priority; $object->processing = $obj->processing; @@ -512,9 +522,9 @@ if ($num > 0) { // Label print ''; - print ''; /* diff --git a/htdocs/datapolicy/mailing.php b/htdocs/datapolicy/admin/mailing.php similarity index 62% rename from htdocs/datapolicy/mailing.php rename to htdocs/datapolicy/admin/mailing.php index 7e2dccaf7d4..80597987df1 100644 --- a/htdocs/datapolicy/mailing.php +++ b/htdocs/datapolicy/admin/mailing.php @@ -17,25 +17,57 @@ */ /** - * \file htdocs/datapolicy/mailing.php + * \file htdocs/datapolicy/admin/mailing.php * \ingroup datapolicy - * \brief datapolicy mailing page. + * \brief Page called by the setupmail.php page to send agreements by email. */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php'; -$idcontact = GETPOST('idc'); +$idcontact = GETPOST('idc', 'int'); +$idcompany = GETPOST('ids', 'int'); +$idmember = GETPOST('ida', 'int'); + +// Security +if (!isModEnabled("datapolicy")) { + accessforbidden(); +} +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ if (!empty($idcontact)) { $contact = new Contact($db); $contact->fetch($idcontact); DataPolicy::sendMailDataPolicyContact($contact); +} elseif (!empty($idcompany)) { + $company = new Societe($db); + $company->fetch($idcompany); + DataPolicy::sendMailDataPolicyCompany($company); +} elseif (!empty($idmember)) { + $member = new Adherent($db); + $member->fetch($idmember); + DataPolicy::sendMailDataPolicyAdherent($member); } else { $contacts = new DataPolicy($db); + + // Send email to all contacts where email was not already sent $contacts->getAllContactNotInformed(); $contacts->getAllCompaniesNotInformed(); $contacts->getAllAdherentsNotInformed(); - echo $langs->trans('AllAgreementSend'); } + + +/* + * View + */ + +echo $langs->trans('AllAgreementSend'); diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php index 8f25461eb64..518adf75d5d 100644 --- a/htdocs/datapolicy/admin/setup.php +++ b/htdocs/datapolicy/admin/setup.php @@ -19,15 +19,16 @@ /** * \file htdocs/datapolicy/admin/setup.php * \ingroup datapolicy - * \brief datapolicy setup page. + * \brief Datapolicy setup page to define duration of data keeping. */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; -require_once '../lib/datapolicy.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/datapolicy/lib/datapolicy.lib.php'; // Translations -$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy@datapolicy')); +$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy')); // Parameters $action = GETPOST('action', 'aZ09'); @@ -50,7 +51,7 @@ if (!empty($conf->global->DATAPOLICY_USE_SPECIFIC_DELAY_FOR_CONTACT)) { 'DATAPOLICY_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')), ); } -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { $arrayofparameters['Member'] = array( 'DATAPOLICY_ADHERENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'member', 'class="pictofixedwidth"')), ); @@ -69,7 +70,10 @@ $valTab = array( '240' => $langs->trans('NB_YEARS', 20), ); -// Access control +// Security +if (!isModEnabled("datapolicy")) { + accessforbidden(); +} if (!$user->admin) { accessforbidden(); } @@ -137,7 +141,7 @@ if ($action == 'edit') { foreach ($tab as $key => $val) { print ''; $order = new Commande($db); $order->fetch($expedition->origin_id); @@ -410,7 +399,7 @@ if ($action == 'create') { print "\n"; print ''; } - if ($typeobject == 'propal' && $expedition->origin_id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $expedition->origin_id && isModEnabled("propal")) { $propal = new Propal($db); $propal->fetch($expedition->origin_id); print ''; @@ -450,7 +439,7 @@ if ($action == 'create') { print ''; // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; - print ''; + print ''; + print ''; print ''; } } else { print ''; } print '
    '; - if (!empty($conf->commande->enabled)) { + if (isModEnabled('commande')) { print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')'); } else { print $langs->trans('AvailabilityPeriod'); @@ -2428,7 +2488,7 @@ if ($action == 'create') { print '
    '; print ''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { // Multicurrency code print ''; print ''; } - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && isModEnabled("banque")) { // Bank Account print ''; // Account - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; print ''; print ''; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; } print '"; @@ -304,7 +305,7 @@ if (isModEnabled('tax') && $user->rights->tax->charges->lire) { print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder); - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); } print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, 'class="right"', $sortfield, $sortorder); @@ -341,7 +342,7 @@ if (isModEnabled('tax') && $user->rights->tax->charges->lire) { print $obj->num_payment.''; // Account - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; print ''."\n"; -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { // Customer Categories print ''; print ''; print ''; @@ -144,10 +156,20 @@ foreach ($object->fields as $key => $val) { $rightpart .= ' tdtop'; } $rightpart.= '">'; + $labeltoshow = ''; if (!empty($val['help'])) { - $rightpart .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + $labeltoshow .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); } else { - $rightpart .= $langs->trans($val['label']); + if (isset($val['copytoclipboard']) && $val['copytoclipboard'] == 1) { + $labeltoshow .= showValueWithClipboardCPButton($value, 0, $langs->transnoentitiesnoconv($val['label'])); + } else { + $labeltoshow .= $langs->trans($val['label']); + } + } + if (empty($val['alwayseditable'])) { + $rightpart .= $labeltoshow; + } else { + $rightpart .= $form->editfieldkey($labeltoshow, $key, $value, $object, 1, $val['type']); } $rightpart .= ''; $rightpart .= ''; $rightpart .= ''; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 5f463e44846..9d9bd226fd6 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -41,7 +41,7 @@ $module = $object->element; // Special cases if ($module == 'propal') { - $permission = $user->rights->propale->creer; + $permission = $user->rights->propal->creer; } elseif ($module == 'fichinter') { $permission = $user->rights->ficheinter->creer; } elseif ($module == 'order_supplier') { diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 2a12a07fd23..267ca6803c9 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -23,7 +23,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield $tmpkey = 'options_'.$key; - if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) { + if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && isset($obj->$tmpkey) && !is_numeric($obj->$tmpkey)) { $datenotinstring = $obj->$tmpkey; if (!is_numeric($obj->$tmpkey)) { // For backward compatibility $datenotinstring = $db->jdate($datenotinstring); @@ -67,7 +67,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield // we keep position for the first line $totalarray['totalizable'][$key]['pos'] = $totalarray['nbfield']; } - if (is_numeric($obj->$tmpkey)) { + if (isset($obj->$tmpkey) && is_numeric($obj->$tmpkey)) { if (!isset($totalarray['totalizable'][$key]['total'])) { $totalarray['totalizable'][$key]['total'] = 0; } diff --git a/htdocs/core/tpl/extrafields_list_search_title.tpl.php b/htdocs/core/tpl/extrafields_list_search_title.tpl.php index 53a12e2d73d..8d24c81c2e4 100644 --- a/htdocs/core/tpl/extrafields_list_search_title.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_title.tpl.php @@ -36,7 +36,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table $tooltip = empty($extrafields->attributes[$extrafieldsobjectkey]['help'][$key]) ? '' : $extrafields->attributes[$extrafieldsobjectkey]['help'][$key]; - print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($cssclass ? 'class="'.$cssclass.'" data-titlekey="'.$key.'"' : 'data-titlekey="'.$key.'"'), $sortfield, $sortorder, '', $disablesortlink, $tooltip)."\n"; + print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, 'data-titlekey="'.$key.'"', $sortfield, $sortorder, $cssclass.' ', $disablesortlink, $tooltip)."\n"; if (isset($totalarray) && isset($totalarray['nbfield'])) { $totalarray['nbfield']++; } diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index baf13f77c67..7d99a021f69 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -99,7 +99,7 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l $langs->load($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra]); } if ($action == 'edit_extras') { - $value = (GETPOSTISSET("options_".$tmpkeyextra) ? GETPOST("options_".$tmpkeyextra) : $object->array_options["options_".$tmpkeyextra]); + $value = (GETPOSTISSET("options_".$tmpkeyextra) ? GETPOST("options_".$tmpkeyextra) : (isset($object->array_options["options_".$tmpkeyextra]) ? $object->array_options["options_".$tmpkeyextra] : '')); } else { $value = (isset($object->array_options["options_".$tmpkeyextra]) ? $object->array_options["options_".$tmpkeyextra] : ''); //var_dump($tmpkeyextra.' - '.$value); @@ -237,7 +237,7 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l if ($object->table_element == 'societe') { $fieldid = 'socid'; } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index ddcb23da891..b3edcb7984f 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -44,17 +44,19 @@ $permtoadd = 0; $permtoupload = 0; $showroot = 0; if ($module == 'ecm') { - $permtoadd = $user->rights->ecm->setup; - $permtoupload = $user->rights->ecm->upload; + $permtoadd = $user->hasRight("ecm", "setup"); + $permtoupload = $user->hasRight("ecm", "upload"); $showroot = 0; } if ($module == 'medias') { - $permtoadd = ($user->rights->mailing->creer || $user->rights->website->write); - $permtoupload = ($user->rights->mailing->creer || $user->rights->website->write); + $permtoadd = ($user->hasRight("mailing", "creer") || $user->hasRight("website", "write")); + $permtoupload = ($user->hasRight("mailing", "creer") || $user->hasRight("website", "write")); $showroot = 1; } - +if (!isset($section)) { + $section = 0; +} // Confirm remove file (for non javascript users) if (($action == 'delete' || $action == 'file_manager_delete') && empty($conf->use_javascript_ajax)) { @@ -106,12 +108,26 @@ $('#acreatedir').on('click', function() { try{ section_dir = $('.directory.expanded')[$('.directory.expanded').length-1].children[0].rel; section = $('.directory.expanded')[$('.directory.expanded').length-1].children[0].id.split('_')[2]; + catParent = "; +if ($module == 'ecm') { + print "section;"; +} else { + print "section_dir.substring(0, section_dir.length - 1);"; +} +print " } catch{ section_dir = '/'; section = 0; + catParent = "; +if ($module == 'ecm') { + print "section;"; +} else { + print "section_dir;"; +} +print " } console.log('We click to create a new directory, we set current section_dir='+section_dir+' into href url of button acreatedir'); - $('#acreatedir').attr('href', $('#acreatedir').attr('href')+'§ion_dir='+encodeURI(section_dir)+'§ion='+encodeURI(section)); + $('#acreatedir').attr('href', $('#acreatedir').attr('href')+'%26section_dir%3D'+encodeURI(section_dir)+'%26section%3D'+encodeURI(section)+'§ion_dir='+encodeURI(section_dir)+'§ion='+encodeURI(section)+'&catParent='+encodeURI(catParent)); console.log($('#acreatedir').attr('href')); }); $('#agenerateimgwebp').on('click', function() { @@ -248,12 +264,13 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg $showonrightsize = ''; // Manual section - $htmltooltip = $langs->trans("ECMAreaDesc2"); + $htmltooltip = $langs->trans("ECMAreaDesc2a"); + $htmltooltip .= '
    '.$langs->trans("ECMAreaDesc2b"); if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { // Show the link to "Root" if ($showroot) { - print ''; } - print ''; - } else { // Show filtree when ajax is disabled (rare) + } else { + // Show filtree when ajax is disabled (rare) print ' - - multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?> + multicurrency_code != $conf->currency) { ?> @@ -175,15 +176,14 @@ if ($nolinesbefore) { } $coldisplay++; ?> - + '; $coldisplay++; @@ -400,7 +402,7 @@ if ($nolinesbefore) { multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { $coldisplay++; ?> - global->PRODUCT_USE_UNITS)) { @@ -433,11 +436,12 @@ if ($nolinesbefore) { } $coldisplay++; ?> - + + situation_cycle_ref) && $this->situation_cycle_ref) { $coldisplay++; - print ''; + print ''; $coldisplay++; print ''; } @@ -447,7 +451,7 @@ if ($nolinesbefore) { ?> global->DISPLAY_MARGIN_RATES)) { - echo ''; + echo ''; $coldisplay++; } if (!empty($conf->global->DISPLAY_MARK_RATES)) { - echo ''; + echo ''; $coldisplay++; } } @@ -472,7 +476,7 @@ if ($nolinesbefore) { service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required +if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required print ''."\n"; if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''; @@ -497,7 +501,6 @@ if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dat } } - if (!empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; print $form->selectDate($date_start, "date_start", $usehm, $usehm, 1, "addproduct"); @@ -520,8 +523,8 @@ if ((!empty($conf->service->enabled) || ($object->element == 'contrat')) && $dat ?> function prefill_service_dates() { - $('#date_start').val("").trigger('change'); - $('#date_end').val("").trigger('change'); + $('#date_start').val("").trigger('change'); + $('#date_end').val("").trigger('change'); return false; // Prevent default link behaviour (which is go to href URL) } @@ -715,7 +718,8 @@ if (!empty($usemargins) && $user->rights->margins->creer) { { console.log("objectline_create.tpl Call method change() after change on #idprod or #idprodfournprice (senderissupplier=). this.val = "+$(this).val()); - setforpredef(); // TODO Keep vat combo visible and set it to first entry into list that match result of get_default_tva + setforpredef(); // TODO Keep vat combo visible and set it to first entry into list that match result of get_default_tva(product) + jQuery('#trlinefordates').show(); rights->margins->creer) { global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { ?> if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we could not get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); } - // Get the HT price for the product and display it + // Get the price for the product and display it console.log("Load unit price without tax and set it into #price_ht for product id="+$(this).val()+" socid=socid; ?>"); $.post('/product/ajax/products.php?action=fetch', - { 'id': $(this).val(), 'socid': socid; ?> }, + { 'id': $(this).val(), 'socid': socid; ?>, 'token': '' }, function(data) { - console.log("objectline_create.tpl Load unit price end, we got value "+data.price_ht); + console.log("objectline_create.tpl Load unit price end, we got value ht="+data.price_ht+" ttc="+data.price_ttc+" pricebasetype="+data.pricebasetype); $('#date_start').removeAttr('type'); $('#date_end').removeAttr('type'); @@ -752,16 +756,38 @@ if (!empty($usemargins) && $user->rights->margins->creer) { if (data.mandatory_period == 1 && data.type == 1) { jQuery('#date_start').addClass('inputmandatory'); jQuery('#date_end').addClass('inputmandatory'); - }else{ + } else { jQuery('#date_start').removeClass('inputmandatory'); jQuery('#date_end').removeClass('inputmandatory'); } - console.log("objectline_create.tpl set content of price_ht"); - jQuery("#price_ht").val(data.price_ht); + if ( == 1 && data.pricebasetype == 'TTC') { + console.log("objectline_create.tpl set content of price_ttc"); + jQuery("#price_ttc").val(data.price_ttc); + } else { + console.log("objectline_create.tpl set content of price_ht"); + jQuery("#price_ht").val(data.price_ht); + } + + var tva_tx = data.tva_tx; + var default_vat_code = data.default_vat_code; + + // Now set the VAT + var stringforvatrateselection = tva_tx; + if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; + } + // Set vat rate if field is an input box + $('#tva_tx').val(tva_tx); + // Set vat rate by selecting the combo + //$('#tva_tx option').val(tva_tx); // This is bugged, it replaces the vat key of all options + $('#tva_tx option').removeAttr('selected'); + console.log("stringforvatrateselection="+stringforvatrateselection+" -> value of option label for this key="+$('#tva_tx option[value="'+stringforvatrateselection+'"]').val()); + $('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true); + global->PRODUIT_AUTOFILL_DESC) && $conf->global->PRODUIT_AUTOFILL_DESC == 1) { - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { ?> + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { ?> var proddesc = data.desc_trans; @@ -869,7 +895,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) { } options += ''; }); - options += ''; + options += ''; console.log("finally selected defaultkey="+defaultkey+" defaultprice for buying price="+defaultprice); @@ -911,42 +937,45 @@ if (!empty($usemargins) && $user->rights->margins->creer) { ?> global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {?> - /* To process customer price per quantity (PRODUIT_CUSTOMER_PRICES_BY_QTY works only if combo product is not an ajax after x key pressed) */ - var pbq = parseInt($('option:selected', this).attr('data-pbq')); // When select is done from HTML select - if (isNaN(pbq)) { pbq = jQuery('#idprod').attr('data-pbq'); } // When select is done from HTML input with autocomplete - var pbqup = parseFloat($('option:selected', this).attr('data-pbqup')); - if (isNaN(pbqup)) { pbqup = jQuery('#idprod').attr('data-pbqup'); } - var pbqbase = $('option:selected', this).attr('data-pbqbase'); - if (isNaN(pbqbase)) { pbqbase = jQuery('#idprod').attr('data-pbqbase'); } - var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty')); - if (isNaN(pbqqty)) { pbqqty = jQuery('#idprod').attr('data-pbqqty'); } - var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent')); - if (isNaN(pbqpercent)) { pbqpercent = jQuery('#idprod').attr('data-pbqpercent'); } + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { + ?> + /* To process customer price per quantity (PRODUIT_CUSTOMER_PRICES_BY_QTY works only if combo product is not an ajax after x key pressed) */ + var pbq = parseInt($('option:selected', this).attr('data-pbq')); // When select is done from HTML select + if (isNaN(pbq)) { pbq = jQuery('#idprod').attr('data-pbq'); } // When select is done from HTML input with autocomplete + var pbqup = parseFloat($('option:selected', this).attr('data-pbqup')); + if (isNaN(pbqup)) { pbqup = jQuery('#idprod').attr('data-pbqup'); } + var pbqbase = $('option:selected', this).attr('data-pbqbase'); + if (isNaN(pbqbase)) { pbqbase = jQuery('#idprod').attr('data-pbqbase'); } + var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty')); + if (isNaN(pbqqty)) { pbqqty = jQuery('#idprod').attr('data-pbqqty'); } + var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent')); + if (isNaN(pbqpercent)) { pbqpercent = jQuery('#idprod').attr('data-pbqpercent'); } - if ((jQuery('#idprod').val() > 0) && ! isNaN(pbq) && pbq > 0) - { - var pbqupht = pbqup; /* TODO support of price per qty TTC not yet available */ + if ((jQuery('#idprod').val() > 0) && ! isNaN(pbq) && pbq > 0) + { + var pbqupht = pbqup; /* TODO support of price per qty TTC not yet available */ - console.log("We choose a price by quanty price_by_qty id = "+pbq+" price_by_qty upht = "+pbqupht+" price_by_qty qty = "+pbqqty+" price_by_qty percent = "+pbqpercent); - jQuery("#pbq").val(pbq); - jQuery("#price_ht").val(pbqupht); - if (jQuery("#qty").val() < pbqqty) - { - jQuery("#qty").val(pbqqty); - } - if (jQuery("#remise_percent").val() < pbqpercent) - { - jQuery("#remise_percent").val(pbqpercent); - } - } else { jQuery("#pbq").val(''); } + console.log("We choose a price by quanty price_by_qty id = "+pbq+" price_by_qty upht = "+pbqupht+" price_by_qty qty = "+pbqqty+" price_by_qty percent = "+pbqpercent); + jQuery("#pbq").val(pbq); + jQuery("#price_ht").val(pbqupht); + if (jQuery("#qty").val() < pbqqty) + { + jQuery("#qty").val(pbqqty); + } + if (jQuery("#remise_percent").val() < pbqpercent) + { + jQuery("#remise_percent").val(pbqpercent); + } + } else { jQuery("#pbq").val(''); } - // Deal with supplier + + + // Deal with supplier ref price (idprodfournprice = int) if (jQuery('#idprodfournprice').val() > 0) { - console.log("objectline_create.tpl #idprodfournprice is > 0, so we set some properties into page"); + console.log("objectline_create.tpl #idprodfournprice is is an ID > 0, so we set some properties into page"); var up = parseFloat($('option:selected', this).attr('data-up')); // When select is done from HTML select if (isNaN(up)) { up = parseFloat(jQuery('#idprodfournprice').attr('data-up'));} // When select is done from HTML input with ajax autocomplete @@ -963,7 +992,15 @@ if (!empty($usemargins) && $user->rights->margins->creer) { var tva_tx = parseFloat($('option:selected', this).attr('data-tvatx')); // When select is done from HTML select if (isNaN(tva_tx)) { tva_tx = parseFloat(jQuery('#idprodfournprice').attr('data-tvatx'));} // When select is done from HTML input with ajax autocomplete - console.log("objectline_create.tpl We find supplier price : up = "+up+", up_locale = "+up_locale+", qty = "+qty+", tva_tx = "+tva_tx+", discount = "+discount+" for product "+jQuery('#idprodfournprice').val()); + var default_vat_code = $('option:selected', this).attr('data-default-vat-code'); // When select is done from HTML select + if (typeof default_vat_code === 'undefined') { default_vat_code = jQuery('#idprodfournprice').attr('data-default-vat-code');} // When select is done from HTML input with ajax autocomplete + + var stringforvatrateselection = tva_tx; + if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; + } + + console.log("objectline_create.tpl We find supplier price : up = "+up+", up_locale = "+up_locale+", qty = "+qty+", tva_tx = "+tva_tx+", default_vat_code = "+default_vat_code+", stringforvatrateselection="+stringforvatrateselection+", discount = "+discount+" for product supplier ref id = "+jQuery('#idprodfournprice').val()); if (typeof up_locale === 'undefined') { jQuery("#price_ht").val(up); @@ -971,8 +1008,13 @@ if (!empty($usemargins) && $user->rights->margins->creer) { jQuery("#price_ht").val(up_locale); } - /* $('#tva_tx option').removeAttr('selected').filter('[value='+tva_tx+']').prop('selected', true); */ - $('#tva_tx option').val(tva_tx); + // Set vat rate if field is an input box + $('#tva_tx').val(tva_tx); + // Set vat rate by selecting the combo + //$('#tva_tx option').val(tva_tx); // This is bugged, it replaces the vat key of all options + $('#tva_tx option').removeAttr('selected'); + console.log("stringforvatrateselection="+stringforvatrateselection+" -> value of option label for this key="+$('#tva_tx option[value="'+stringforvatrateselection+'"]').val()); + $('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true); if (jQuery("#qty").val() < qty) { jQuery("#qty").val(qty); @@ -982,14 +1024,15 @@ if (!empty($usemargins) && $user->rights->margins->creer) { } global->PRODUIT_AUTOFILL_DESC) && $conf->global->PRODUIT_AUTOFILL_DESC == 1) { + if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) { ?> var description = $('option:selected', this).attr('data-description'); if (typeof description == 'undefined') { description = jQuery('#idprodfournprice').attr('data-description'); } console.log("Load desciption into text area : "+description); global->FCKEDITOR_ENABLE_DETAILS)) { ?> + if (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { + ?> if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") { var editor = CKEDITOR.instances['dp_desc']; @@ -998,15 +1041,41 @@ if (!empty($usemargins) && $user->rights->margins->creer) { } } + } else { + ?> jQuery('#dp_desc').text(description); + } + ?> } else if (jQuery('#idprodfournprice').length > 0) { + console.log("objectline_create.tpl #idprodfournprice is not an int but is a string so we set only few properties into page"); + + var tva_tx = parseFloat($('option:selected', this).attr('data-tvatx')); // When select is done from HTML select + if (isNaN(tva_tx)) { tva_tx = parseFloat(jQuery('#idprodfournprice').attr('data-tvatx'));} // When select is done from HTML input with ajax autocomplete + + var default_vat_code = $('option:selected', this).attr('data-default-vat-code'); // When select is done from HTML select + if (typeof default_vat_code === 'undefined') { default_vat_code = jQuery('#idprodfournprice').attr('data-default-vat-code');} // When select is done from HTML input with ajax autocomplete + + var stringforvatrateselection = tva_tx; + if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; + } + + console.log("objectline_create.tpl We find data for price : tva_tx = "+tva_tx+", default_vat_code = "+default_vat_code+", stringforvatrateselection="+stringforvatrateselection+" for product id = "+jQuery('#idprodfournprice').val()); + + // Set vat rate if field is an input box + $('#tva_tx').val(tva_tx); + // Set vat rate by selecting the combo + //$('#tva_tx option').val(tva_tx); // This is bugged, it replaces the vat key of all options + $('#tva_tx option').removeAttr('selected'); + console.log("stringforvatrateselection="+stringforvatrateselection+" -> value of option label for this key="+$('#tva_tx option[value="'+stringforvatrateselection+'"]').val()); + $('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true); + global->PRODUIT_AUTOFILL_DESC) && $conf->global->PRODUIT_AUTOFILL_DESC == 1) { - if (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { ?> + if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) { + if (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { + ?> if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") { var editor = CKEDITOR.instances['dp_desc']; @@ -1015,11 +1084,13 @@ if (!empty($usemargins) && $user->rights->margins->creer) { } } + } else { + ?> jQuery('#dp_desc').text(''); + } + ?> } diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index c59949d5fb7..5520215d89a 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2020 Laurent Destailleur + * Copyright (C) 2010-2022 Laurent Destailleur * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud @@ -41,7 +41,7 @@ if (empty($object) || !is_object($object)) { $usemargins = 0; -if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) { +if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) { $usemargins = 1; } @@ -70,10 +70,10 @@ if (!empty($inputalsopricewithtax)) { if (in_array($object->element, array('propal', 'supplier_proposal', 'facture', 'facturerec', 'invoice', 'commande', 'order', 'order_supplier', 'invoice_supplier', 'invoice_supplier_rec'))) { $colspan++; // With this, there is a column move button } -if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { +if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { $colspan += 2; } -if (!empty($conf->asset->enabled) && $object->element == 'invoice_supplier') { +if (isModEnabled('asset') && $object->element == 'invoice_supplier') { $colspan++; } @@ -176,7 +176,7 @@ $coldisplay++; } // Show autofill date for recuring invoices - if (!empty($conf->service->enabled) && $line->product_type == 1 && ($line->element == 'facturedetrec' || $line->element == 'invoice_supplier_det_rec')) { + if (isModEnabled("service") && $line->product_type == 1 && ($line->element == 'facturedetrec' || $line->element == 'invoice_supplier_det_rec')) { if ($line->element == 'invoice_supplier_det_rec') { $line->date_start_fill = $line->date_start; $line->date_end_fill = $line->date_end; @@ -196,13 +196,17 @@ $coldisplay++; if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') { // We must have same test in printObjectLines $coldisplay++; ?> - + fk_fournprice.'">'; } + // VAT Rate $coldisplay++; if (!$situationinvoicelinewithparent) { - print ''; + print ''; } else { print ''; } @@ -214,7 +218,7 @@ $coldisplay++; } print '>'; - if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { $coldisplay++; print ''; } @@ -266,31 +270,36 @@ $coldisplay++; ?> + situation_cycle_ref) { $coldisplay++; print ''; $coldisplay++; print ''; } + if (!empty($usemargins)) { if (!empty($user->rights->margins->creer)) { $coldisplay++; ?> '; + echo ''; } else { - echo ''; + echo ''; } $coldisplay++; } @@ -313,9 +322,9 @@ $coldisplay++; $mark_rate = (GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : price($line->marque_tx)); // if credit note, dont allow to modify margin if ($line->subprice < 0) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } $coldisplay++; } @@ -325,12 +334,12 @@ $coldisplay++; -service->enabled) && $line->product_type == 1 && $dateSelector) { ?> +product_type == 1 && $dateSelector) { ?> global->MAIN_VIEW_LINE_NUMBER)) { ?> @@ -492,7 +501,7 @@ jQuery(document).ready(function() margin->enabled)) { + if (isModEnabled('margin')) { ?> /* Add rule to clear margin when we change some data, so when we change sell or buy price, margin will be recalculated after submitting form */ jQuery("#tva_tx").click(function() { /* somtimes field is a text, sometimes a combo */ diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php index 762e9b4eefa..7fe63613ea1 100644 --- a/htdocs/core/tpl/objectline_title.tpl.php +++ b/htdocs/core/tpl/objectline_title.tpl.php @@ -49,26 +49,26 @@ print ''; // Adds a line numbering column if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''; + print ''; } // Description -print ''; +print ''; // Supplier ref if ($this->element == 'supplier_proposal' || $this->element == 'order_supplier' || $this->element == 'invoice_supplier' || $this->element == 'invoice_supplier_rec') { - print ''; + print ''; } // VAT -print ''; // Price HT -print ''; +print ''; // Multicurrency -if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { - print ''; +if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { + print ''; } if ($inputalsopricewithtax) { - print ''; + print ''; } // Qty -print ''; +print ''; // Unit if (!empty($conf->global->PRODUCT_USE_UNITS)) { - print ''; + print ''; } // Reduction short -print ''; // Fields for situation invoice if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) { - print ''; - print ''; + print ''; + print ''; } // Purchase price -if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) { +if ($usemargins && isModEnabled('margin') && empty($user->socid)) { if (!empty($user->rights->margins->creer)) { if ($conf->global->MARGIN_TYPE == "1") { - print ''; + print ''; } else { - print ''; + print ''; } } if (!empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { - print ''; + print ''; } if (!empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) { - print ''; + print ''; } } // Total HT -print ''; +print ''; // Multicurrency -if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { - print ''; +if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { + print ''; } if ($outputalsopricetotalwithtax) { - print ''; + print ''; } -if (!empty($conf->asset->enabled) && $object->element == 'invoice_supplier') { - print ''; +if (isModEnabled('asset') && $object->element == 'invoice_supplier') { + print ''; } -print ''; // No width to allow autodim +print ''; // No width to allow autodim -print ''; +print ''; -print ''; +print ''; if ($action == 'selectlines') { - print ''; } print "\n"; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index c2d81b81eb5..14197b6d052 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -49,7 +49,7 @@ global $mysoc; global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; $usemargins = 0; -if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) { +if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) { $usemargins = 1; } @@ -213,7 +213,7 @@ if (($line->info_bits & 2) == 2) { } // Add description in form - if ($line->fk_product > 0 && !empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if ($line->fk_product > 0 && getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { if ($line->element == 'facturedetrec') { print (!empty($line->description) && $line->description != $line->product_label) ? (($line->date_start_fill || $line->date_end_fill) ? '' : '
    ').'
    '.dol_htmlentitiesbr($line->description) : ''; } elseif ($line->element == 'invoice_supplier_det_rec') { @@ -234,21 +234,21 @@ if (($line->info_bits & 2) == 2) { } } -if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES)) { +if ($user->hasRight('fournisseur', 'lire') && isset($line->fk_fournprice) && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productfourn = new ProductFournisseur($this->db); $productfourn->fetch_product_fournisseur_price($line->fk_fournprice); print '
    '; print ''.$langs->trans('Supplier').' : '.$productfourn->getSocNomUrl(1, 'supplier').' - '.$langs->trans('Ref').' : '; // Supplier ref - if ($user->rights->produit->creer || $user->rights->service->creer) { // change required right here + if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { // change required right here print $productfourn->getNomUrl(); } else { print $productfourn->ref_supplier; } } -if (!empty($conf->accounting->enabled) && $line->fk_accounting_account > 0) { +if (isModEnabled('accounting') && $line->fk_accounting_account > 0) { $accountingaccount = new AccountingAccount($this->db); $accountingaccount->fetch($line->fk_accounting_account); print '

    '.$langs->trans('AccountingAffectation').' : '.$accountingaccount->getNomUrl(0, 1, 1); @@ -280,17 +280,17 @@ print vatrate($positiverates.($line->vat_src_code ? ' ('.$line->vat_src_code.')' //print vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits); ?> - + -multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?> - +multicurrency_code != $conf->currency) { ?> + - + - '; } -if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) { +if ($usemargins && isModEnabled('margin') && empty($user->socid)) { if (!empty($user->rights->margins->creer)) { ?> special_code == 3) { ?> if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht); $tooltiponprice .= '
    '.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva); - if (!$senderissupplier && is_object($object->thirdparty)) { + if (is_object($object->thirdparty)) { + if ($senderissupplier) { + $seller = $object->thirdparty; + $buyer = $mysoc; + } else { + $seller = $mysoc; + $buyer = $object->thirdparty; + } + if ($mysoc->useLocalTax(1)) { - if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(1)) { - $tooltiponprice .= '
    '.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1); + if (($seller->country_code == $buyer->country_code) || $line->total_localtax1 || $seller->useLocalTax(1)) { + $tooltiponprice .= '
    '.$langs->transcountry("TotalLT1", $seller->country_code).'='.price($line->total_localtax1); } else { - $tooltiponprice .= '
    '.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").''; + $tooltiponprice .= '
    '.$langs->transcountry("TotalLT1", $seller->country_code).'='.$langs->trans($senderissupplier ? "NotUsedForThisSupplier" : "NotUsedForThisCustomer").''; } } if ($mysoc->useLocalTax(2)) { - if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(2)) { - $tooltiponprice .= '
    '.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2); + if (($seller->country_code == $buyer->thirdparty->country_code) || $line->total_localtax2 || $seller->useLocalTax(2)) { + $tooltiponprice .= '
    '.$langs->transcountry("TotalLT2", $seller->country_code).'='.price($line->total_localtax2); } else { - $tooltiponprice .= '
    '.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.$langs->trans("NotUsedForThisCustomer").''; + $tooltiponprice .= '
    '.$langs->transcountry("TotalLT2", $seller->country_code).'='.$langs->trans($senderissupplier ? "NotUsedForThisSupplier" : "NotUsedForThisCustomer").''; } } } @@ -378,7 +386,7 @@ if ($line->special_code == 3) { ?> print ''; } print ''; - if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currency) { print ''; $coldisplay++; } @@ -397,7 +405,7 @@ if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlin } } - if (!empty($conf->asset->enabled) && $object->element == 'invoice_supplier') { + if (isModEnabled('asset') && $object->element == 'invoice_supplier') { print ''; diff --git a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php b/htdocs/core/tpl/objectlinked_lineimport.tpl.php similarity index 100% rename from htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php rename to htdocs/core/tpl/objectlinked_lineimport.tpl.php diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 001ada1de0f..3693c818112 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -30,7 +30,7 @@ print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':
    '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'free')."

    \n"; -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'order')."
    \n"; @@ -43,10 +43,10 @@ if (!empty($conf->commande->enabled)) { print ''; print ''; if (GETPOST('generate_order_ref', 'alpha')) { - print '
    -> '; $url = getOnlinePaymentUrl(0, 'order', GETPOST('generate_order_ref', 'alpha')); + print ''."\n"; } print ''; } @@ -65,16 +65,16 @@ if (isModEnabled('facture')) { print ''; print ''; if (GETPOST('generate_invoice_ref', 'alpha')) { - print '
    -> '; $url = getOnlinePaymentUrl(0, 'invoice', GETPOST('generate_invoice_ref', 'alpha')); + print ''."\n"; } print ''; } print '
    '; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'contractline')."
    \n"; @@ -87,16 +87,16 @@ if (!empty($conf->contrat->enabled)) { print ''; print ''; if (GETPOST('generate_contract_ref')) { - print '
    -> '; $url = getOnlinePaymentUrl(0, 'contractline', GETPOST('generate_contract_ref', 'alpha')); + print ''."\n"; } print ''; } print '
    '; } -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'membersubscription')."
    \n"; @@ -109,16 +109,16 @@ if (!empty($conf->adherent->enabled)) { print ''; print ''; if (GETPOST('generate_member_ref')) { - print '
    -> '; $url = getOnlinePaymentUrl(0, 'membersubscription', GETPOST('generate_member_ref', 'alpha')); + print ''."\n"; } print ''; } print '
    '; } -if (!empty($conf->don->enabled)) { +if (isModEnabled('don')) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'donation')."
    \n"; @@ -131,31 +131,21 @@ if (!empty($conf->don->enabled)) { print ''; print ''; if (GETPOST('generate_donation_ref')) { - print '
    -> '; + print ''."\n"; } print ''; } print '
    '; } -if (!empty($conf->use_javascript_ajax)) { - print "\n".''; -} +$constname = 'PAYMENT_SECURITY_TOKEN'; + +// Add button to autosuggest a key +include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; +print dolJSToSetRandomPassword($constname); print info_admin($langs->trans("YouCanAddTagOnUrl")); diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index 25c799ffbfd..090ba834ba1 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -32,7 +32,7 @@ print '
    '; print ''; print ''; print ''; -if (!empty($conf->multicurrency->enabled)) { +if (isModEnabled("multicurrency")) { print ''; } diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 6d52cfff267..3fdbcd14ef3 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -16,7 +16,6 @@ * along with this program. If not, see . */ - if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', 1); } @@ -30,10 +29,8 @@ if (empty($conf) || !is_object($conf)) { // DDOS protection $size = (int) $_SERVER['CONTENT_LENGTH']; if ($size > 10000) { - http_response_code(413); $langs->loadLangs(array("errors", "install")); - accessforbidden('
    '.$langs->trans("ErrorRequestTooLarge").'
    '.$langs->trans("ClickHereToGoToApp").'
    ', 0, 0, 1); - exit; + httponly_accessforbidden('
    '.$langs->trans("ErrorRequestTooLarge").'
    '.$langs->trans("ClickHereToGoToApp").'
    ', 413, 1); } require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -236,15 +233,19 @@ if (!empty($morelogincontent)) { diff --git a/htdocs/core/tpl/passwordreset.tpl.php b/htdocs/core/tpl/passwordreset.tpl.php new file mode 100644 index 00000000000..1f35b1a251a --- /dev/null +++ b/htdocs/core/tpl/passwordreset.tpl.php @@ -0,0 +1,367 @@ + + * + * 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 . + */ + +// To show this page, we need parameters: setnewpassword=1&username=...&passworduidhash=... + +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', 1); +} + +// Protection to avoid direct call of template +if (empty($conf) || !is_object($conf)) { + print "Error, template page can't be called as URL"; + exit; +} + +// DDOS protection +$size = (int) $_SERVER['CONTENT_LENGTH']; +if ($size > 10000) { + $langs->loadLangs(array("errors", "install")); + httponly_accessforbidden('
    '.$langs->trans("ErrorRequestTooLarge").'
    '.$langs->trans("ClickHereToGoToApp").'
    ', 413, 1); +} + +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + +header('Cache-Control: Public, must-revalidate'); +header("Content-type: text/html; charset=".$conf->file->character_set_client); + +if (GETPOST('dol_hide_topmenu')) { + $conf->dol_hide_topmenu = 1; +} +if (GETPOST('dol_hide_leftmenu')) { + $conf->dol_hide_leftmenu = 1; +} +if (GETPOST('dol_optimize_smallscreen')) { + $conf->dol_optimize_smallscreen = 1; +} +if (GETPOST('dol_no_mouse_hover')) { + $conf->dol_no_mouse_hover = 1; +} +if (GETPOST('dol_use_jmobile')) { + $conf->dol_use_jmobile = 1; +} + +// If we force to use jmobile, then we reenable javascript +if (!empty($conf->dol_use_jmobile)) { + $conf->use_javascript_ajax = 1; +} + +$php_self = $_SERVER['PHP_SELF']; +$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : ''; +$php_self = str_replace('action=validatenewpassword', '', $php_self); + +$titleofpage = $langs->trans('ResetPassword'); + +// Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second +$arrayofjs = array(); + +$disablenofollow = 1; +if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) { + $disablenofollow = 0; +} +if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + $disablenofollow = 0; +} + +print top_htmlhead('', $titleofpage, 0, 0, $arrayofjs, array(), 1, $disablenofollow); + + +$colorbackhmenu1 = '60,70,100'; // topmenu +if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; +} +$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $conf->global->THEME_ELDY_TOPMENU_BACK1) : (empty($user->conf->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $user->conf->THEME_ELDY_TOPMENU_BACK1); +$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' + + +$edituser = new User($db); + + +// Validate parameters +if ($setnewpassword && $username && $passworduidhash) { + $result = $edituser->fetch('', $username); + if ($result < 0) { + $message = '
    '.dol_escape_htmltag($langs->trans("ErrorTechnicalError")).'
    '; + } else { + global $dolibarr_main_instance_unique_id; + + //print $edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id.' '.$passworduidhash; + if ($edituser->pass_temp && dol_verifyHash($edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id, $passworduidhash)) { + // Clear session + unset($_SESSION['dol_login']); + + // Parameters to reset the user are validated + } else { + $langs->load("errors"); + $message = '
    '.$langs->trans("ErrorFailedToValidatePasswordReset").'
    '; + } + } +} else { + $langs->load("errors"); + $message = '
    '.$langs->trans("ErrorFailedToValidatePasswordReset").'
    '; +} + + +?> + + +global->MAIN_LOGIN_BACKGROUND) ? '' : ' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> + +dol_use_jmobile)) { ?> + + + + + + + + + + diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 884790c990e..abaadfc85a8 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -72,7 +72,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers // Proposals to order if ($action == 'PROPAL_CLOSE_SIGNED') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) { + if (isModEnabled('commande') && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) { $object->fetchObjectLinked(); if (!empty($object->linkedObjectsIds['commande'])) { setEventMessages($langs->trans("OrderExists"), null, 'warnings'); @@ -118,7 +118,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers // Order classify billed proposal if ($action == 'ORDER_CLASSIFY_BILLED') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (!empty($conf->propal->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL)) { + if (isModEnabled("propal") && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL)) { $object->fetchObjectLinked('', 'propal', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -143,7 +143,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // First classify billed the order to allow the proposal classify process - if (!empty($conf->commande->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) { + if (isModEnabled('commande') && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) { $object->fetchObjectLinked('', 'commande', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -162,7 +162,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers } // Second classify billed the proposal. - if (!empty($conf->propal->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL)) { + if (isModEnabled("propal") && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL)) { $object->fetchObjectLinked('', 'propal', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -180,15 +180,24 @@ class InterfaceWorkflowManager extends DolibarrTriggers } } - if (!empty($conf->expedition->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE)) { - /** @var Facture $object */ + if (isModEnabled("expedition") && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE)) { $object->fetchObjectLinked('', 'shipping', $object->id, $object->element); - if (!empty($object->linkedObjects)) { - /** @var Expedition $shipment */ - $shipment = array_shift($object->linkedObjects['shipping']); - - $ret = $shipment->setClosed(); + $totalonlinkedelements = 0; + foreach ($object->linkedObjects['shipping'] as $element) { + if ($element->statut == Expedition::STATUS_VALIDATED) { + $totalonlinkedelements += $element->total_ht; + } + } + dol_syslog("Amount of linked shipment = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht), LOG_DEBUG); + if ($totalonlinkedelements == $object->total_ht) { + foreach ($object->linkedObjects['shipping'] as $element) { + $ret = $element->setClosed(); + if ($ret < 0) { + return $ret; + } + } + } } } @@ -201,7 +210,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers // Firstly, we set to purchase order to "Billed" if WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER is set. // After we will set proposals - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) { $object->fetchObjectLinked('', 'order_supplier', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -223,7 +232,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers } // Secondly, we set to linked Proposal to "Billed" if WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL is set. - if (!empty($conf->supplier_proposal->enabled) && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL)) { + if (isModEnabled('supplier_proposal') && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL)) { $object->fetchObjectLinked('', 'supplier_proposal', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -244,8 +253,8 @@ class InterfaceWorkflowManager extends DolibarrTriggers } } - // Then set reception to "Billed" if WORKFLOW_BILL_ON_RECEPTION is set - if (!empty($conf->reception->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { + // Then set reception to "Billed" if WORKFLOW_EXPEDITION_CLASSIFY_CLOSED_INVOICE is set + if (isModEnabled("reception") && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_EXPEDITION_CLASSIFY_CLOSED_INVOICE)) { $object->fetchObjectLinked('', 'reception', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -273,7 +282,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers if ($action == 'BILL_PAYED') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER)) { + if (isModEnabled('commande') && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER)) { $object->fetchObjectLinked('', 'commande', $object->id, $object->element); if (!empty($object->linkedObjects)) { $totalonlinkedelements = 0; @@ -297,7 +306,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers if (($action == 'SHIPPING_VALIDATE') || ($action == 'SHIPPING_CLOSED')) { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if (!empty($conf->commande->enabled) && !empty($conf->expedition->enabled) && !empty($conf->workflow->enabled) && + if (isModEnabled('commande') && isModEnabled("expedition") && !empty($conf->workflow->enabled) && ( (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING) && ($action == 'SHIPPING_VALIDATE')) || (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED) && ($action == 'SHIPPING_CLOSED')) @@ -366,7 +375,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers if (($action == 'RECEPTION_VALIDATE') || ($action == 'RECEPTION_CLOSED')) { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - if ((!empty($conf->fournisseur->enabled) || !empty($conf->supplier_order->enabled)) && !empty($conf->reception->enabled) && !empty($conf->workflow->enabled) && + if ((isModEnabled("fournisseur") || isModEnabled("supplier_order")) && isModEnabled("reception") && !empty($conf->workflow->enabled) && ( (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION) && ($action == 'RECEPTION_VALIDATE')) || (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION_CLOSED) && ($action == 'RECEPTION_CLOSED')) @@ -434,7 +443,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers if ($action == 'TICKET_CREATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Auto link contract - if (!empty($conf->contract->enabled) && !empty($conf->ticket->enabled) && !empty($conf->ficheinter->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_LINK_CONTRACT) && !empty($conf->global->TICKET_PRODUCT_CATEGORY) && !empty($object->fk_soc)) { + if (!empty($conf->contract->enabled) && isModEnabled('ticket') && isModEnabled('ficheinter') && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_LINK_CONTRACT) && !empty($conf->global->TICKET_PRODUCT_CATEGORY) && !empty($object->fk_soc)) { $societe = new Societe($this->db); $company_ids = (empty($conf->global->WORKFLOW_TICKET_USE_PARENT_COMPANY_CONTRACTS)) ? [$object->fk_soc] : $societe->getParentsForCompany($object->fk_soc, [$object->fk_soc]); @@ -465,7 +474,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers } } // Automatically create intervention - if (!empty($conf->ficheinter->enabled) && !empty($conf->ticket->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_CREATE_INTERVENTION)) { + if (isModEnabled('ficheinter') && isModEnabled('ticket') && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_CREATE_INTERVENTION)) { $fichinter = new Fichinter($this->db); $fichinter->socid = (int) $object->fk_soc; $fichinter->fk_project = $projectid; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 75c3d545c3b..e3f798dec62 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -713,7 +713,7 @@ class InterfaceActionsAuto extends DolibarrTriggers // Load translation files required by the page $langs->loadLangs(array("agenda", "other", "members")); - $member = $this->context['member']; + $member = (isset($this->context['member']) ? $this->context['member'] : null); if (!is_object($member)) { // This should not happen dol_syslog("Execute a trigger MEMBER_SUBSCRIPTION_CREATE with context key 'member' not an object"); include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -731,7 +731,7 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); $object->sendtoid = 0; - if ($object->fk_soc > 0) { + if (isset($object->fk_soc) && $object->fk_soc > 0) { $object->socid = $object->fk_soc; } } elseif ($action == 'MEMBER_SUBSCRIPTION_MODIFY') { @@ -742,7 +742,7 @@ class InterfaceActionsAuto extends DolibarrTriggers if (!is_object($member)) { // This should not happen include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $member = new Adherent($this->db); - $member->fetch($this->fk_adherent); + $member->fetch($object->fk_adherent); } if (empty($object->actionmsg2)) { @@ -767,12 +767,12 @@ class InterfaceActionsAuto extends DolibarrTriggers } $object->actionmsg = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start, 'day').' - '.dol_print_date($object->last_subscription_date_end, 'day'); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->fk_type; + $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->amount; + $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); $object->sendtoid = 0; - if ($object->fk_soc > 0) { + if (isset($object->fk_soc) && $object->fk_soc > 0) { $object->socid = $object->fk_soc; } } elseif ($action == 'MEMBER_RESILIATE') { @@ -798,6 +798,18 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; + $object->sendtoid = 0; + } elseif ($action == 'MEMBER_EXCLUDE') { + // Load translation files required by the page + $langs->loadLangs(array("agenda", "other", "members")); + + if (empty($object->actionmsg2)) { + $object->actionmsg2 = $langs->transnoentities("MemberExcludedInDolibarr", $object->getFullName($langs)); + } + $object->actionmsg = $langs->transnoentities("MemberExcludedInDolibarr", $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; + $object->sendtoid = 0; } elseif ($action == 'PROJECT_CREATE') { // Projects @@ -836,6 +848,19 @@ class InterfaceActionsAuto extends DolibarrTriggers } $object->sendtoid = 0; + } elseif ($action == 'PROJECT_SENTBYMAIL') { + // Load translation files required by the page + $langs->loadLangs(array("agenda", "other", "projects")); + + if (empty($object->actionmsg2)) { + $object->actionmsg2 = $langs->transnoentities("ProjectSentByEMail", $object->ref); + } + if (empty($object->actionmsg)) { + $object->actionmsg = $langs->transnoentities("ProjectSentByEMail", $object->ref); + } + + // Parameters $object->sendtoid defined by caller + //$object->sendtoid=0; } elseif ($action == 'TASK_CREATE') { // Project tasks // Load translation files required by the page @@ -977,7 +1002,7 @@ class InterfaceActionsAuto extends DolibarrTriggers } */ - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); // Add entry in event table $now = dol_now(); diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index 741cc4d09bc..502fe33e980 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -64,12 +64,15 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers } // Test if event/record is qualified - $listofqualifiedelement = array('facture', 'don', 'payment', 'payment_donation', 'subscription', 'payment_various', 'cashcontrol'); - if (!in_array($object->element, $listofqualifiedelement)) { - return 1; + if (empty($conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED) || !in_array($action, explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED))) { + // If custom actions are not set or if action not into custom actions, we can exclude action if object->elementis not valid + $listofqualifiedelement = array('facture', 'don', 'payment', 'payment_donation', 'subscription', 'payment_various', 'cashcontrol'); + if (!in_array($object->element, $listofqualifiedelement)) { + return 1; + } } - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; $b = new BlockedLog($this->db); @@ -100,7 +103,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers $amounts = (double) $object->amount; } elseif ($action == 'CASHCONTROL_VALIDATE') { $amounts = (double) $object->cash + (double) $object->cheque + (double) $object->card; - } else { + } elseif (property_exists($object, 'total_ttc')) { $amounts = (double) $object->total_ttc; } } @@ -132,7 +135,9 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers return 0; // not implemented action log } - $result = $b->setObjectData($object, $action, $amounts, $user); // Set field date_object, ref_object, fk_object, element, object_data + // Set field date_object, ref_object, fk_object, element, object_data + $result = $b->setObjectData($object, $action, $amounts, $user); + //var_dump($b); exit; if ($result < 0) { $this->error = $b->error; diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 6e4f8cb1563..f25aabee871 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -66,7 +66,7 @@ class InterfaceNotification extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { - if (empty($conf->notification) || empty($conf->notification->enabled)) { + if (empty($conf->notification) || !isModEnabled('notification')) { return 0; // Module not active, we do nothing } @@ -74,7 +74,7 @@ class InterfaceNotification extends DolibarrTriggers return 0; } - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); $notify = new Notify($this->db); $notify->send($action, $object); @@ -90,7 +90,7 @@ class InterfaceNotification extends DolibarrTriggers */ public function getListOfManagedEvents() { - global $conf; + global $conf, $action; global $hookmanager; @@ -100,6 +100,8 @@ class InterfaceNotification extends DolibarrTriggers } $hookmanager->initHooks(array('notification')); + $parameters = array(); + $object = new stdClass(); $reshook = $hookmanager->executeHooks('notifsupported', $parameters, $object, $action); if (empty($reshook)) { if (!empty($hookmanager->resArray['arrayofnotifsupported'])) { @@ -133,9 +135,9 @@ class InterfaceNotification extends DolibarrTriggers $element = $obj->elementtype; // Exclude events if related module is disabled - if ($element == 'order_supplier' && ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))) { + if ($element == 'order_supplier' && ((!isModEnabled('fournisseur') && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !isModEnabled('supplier_order'))) { $qualified = 0; - } elseif ($element == 'invoice_supplier' && ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_invoice->enabled))) { + } elseif ($element == 'invoice_supplier' && ((!isModEnabled('fournisseur') && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !isModEnabled('supplier_invoice'))) { $qualified = 0; } elseif ($element == 'withdraw' && empty($conf->prelevement->enabled)) { $qualified = 0; diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 55e2bf42c8b..089629234d6 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -61,7 +61,7 @@ class InterfaceTicketEmail extends DolibarrTriggers { $ok = 0; - if (empty($conf->ticket) || empty($conf->ticket->enabled)) { + if (empty($conf->ticket) || !isModEnabled('ticket')) { return 0; // Module not active, we do nothing } @@ -387,10 +387,12 @@ class InterfaceTicketEmail extends DolibarrTriggers $trackid = 'tic'.$object->id; + $old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO'); + if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { - $old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO; $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; } + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject, $sendto, $from, $message_customer, $filepath, $mimetype, $filename, '', '', 0, -1, '', '', $trackid, '', 'ticket'); if ($mailfile->error) { diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index 54ee9929cb2..44cd1d1f660 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -141,7 +141,7 @@ class InterfaceStripe extends DolibarrTriggers } if ($changerequested) { - /*if (! empty($object->email)) $customer->email = $object->email; + /*if (!empty($object->email)) $customer->email = $object->email; $customer->description = $namecleaned; if (empty($taxinfo)) $customer->tax_info = array('type'=>'vat', 'tax_id'=>null); else $customer->tax_info = $taxinfo; */ diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php index b1eb321f7f5..cecb7f7cb98 100644 --- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php +++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php @@ -18,7 +18,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -70,7 +70,7 @@ class InterfaceContactRoles extends DolibarrTriggers if ($action === 'PROPAL_CREATE' || $action === 'ORDER_CREATE' || $action === 'BILL_CREATE' || $action === 'ORDER_SUPPLIER_CREATE' || $action === 'BILL_SUPPLIER_CREATE' || $action === 'PROPOSAL_SUPPLIER_CREATE' || $action === 'CONTRACT_CREATE' || $action === 'FICHINTER_CREATE' || $action === 'PROJECT_CREATE' || $action === 'TICKET_CREATE') { - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); $socid = (property_exists($object, 'socid') ? $object->socid : $object->fk_soc); diff --git a/htdocs/core/triggers/interface_99_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php similarity index 85% rename from htdocs/core/triggers/interface_99_modWebhook_WebhookTriggers.class.php rename to htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index a8932934bd1..6a05551d333 100644 --- a/htdocs/core/triggers/interface_99_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -103,8 +103,24 @@ class InterfaceWebhookTriggers extends DolibarrTriggers foreach ($target_url as $key => $tmpobject) { $actionarray = explode(",", $tmpobject->trigger_codes); if (is_array($actionarray) && in_array($action, $actionarray)) { - $jsonstr = '{"triggercode":'.json_encode($action).',"object":'.json_encode($object).'}'; - $response = getURLContent($tmpobject->url, 'POST', $jsonstr); + // Build the answer object + $resobject = new stdClass(); + $resobject->triggercode = $action; + $resobject->object = dol_clone($object, 2); + + if (property_exists($resobject->object, 'fields')) { + unset($resobject->object->fields); + } + if (property_exists($resobject->object, 'error')) { + unset($resobject->object->error); + } + if (property_exists($resobject->object, 'errors')) { + unset($resobject->object->errors); + } + + $jsonstr = json_encode($resobject); + + $response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, array(), array('http', 'https'), 0, -1); if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) { $nbPosts ++; } else { diff --git a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php b/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php similarity index 96% rename from htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php rename to htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php index 8a2cffe05f3..7c16599f039 100644 --- a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -203,7 +203,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers // case 'MYECMDIR_CREATE': // case 'MYECMDIR_MODIFY': - // Customer orders + // Sales orders case 'ORDER_CREATE': $resql = $this->db->query($sql); while ($resql && $obj = $this->db->fetch_array($resql)) { @@ -236,7 +236,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers // case 'ORDER_SUPPLIER_REFUSE': // case 'ORDER_SUPPLIER_CANCEL': // case 'ORDER_SUPPLIER_SENTBYMAIL': - // case 'ORDER_SUPPLIER_DISPATCH': + // case 'ORDER_SUPPLIER_RECEIVE': // case 'LINEORDER_SUPPLIER_DISPATCH': // case 'LINEORDER_SUPPLIER_CREATE': // case 'LINEORDER_SUPPLIER_UPDATE': @@ -396,7 +396,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers // case 'SHIPPING_DELETE': } if ($logtriggeraction) { - dol_syslog("Trigger '".$this->name."' for action '.$action.' launched by ".__FILE__." id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__." id=".$object->id); } return 0; } @@ -404,14 +404,20 @@ class InterfaceZapierTriggers extends DolibarrTriggers /** * Post webhook in zapier with object data * - * @param string $url url provided by zapier - * @param string $json data to send + * @param string $url Url provided by zapier + * @param string $json Data to send * @return void */ function zapierPostWebhook($url, $json) { $headers = array('Accept: application/json', 'Content-Type: application/json'); - // TODO supprimer le webhook en cas de mauvaise réponse + + // TODO disable wekhook if error ? + + dol_syslog("Send message to Zapier with json size=".dol_strlen($json), LOG_DEBUG); + getURLContent($url, 'POSTALREADYFORMATED', $json, 1, $headers, array('http', 'https'), 0); + + /* $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @@ -420,8 +426,10 @@ function zapierPostWebhook($url, $json) curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + $output = curl_exec($ch); curl_close($ch); + */ } /** @@ -449,7 +457,6 @@ function cleanObjectDatas($toclean) unset($toclean->ref_previous); unset($toclean->ref_next); - unset($toclean->ref_int); unset($toclean->projet); // Should be fk_project unset($toclean->project); // Should be fk_project diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 8205696751b..2bdc9080b78 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -75,6 +75,18 @@ if ($pageid > 0) { if (!defined('USEDOLIBARREDITOR') && (in_array($websitepage->type_container, array('menu', 'other')) || empty($websitepage->status) && !defined('USEDOLIBARRSERVER'))) { $weblangs->load("website"); + + // Security options + + // X-Content-Type-Options + header("X-Content-Type-Options: nosniff"); + + // X-Frame-Options + if (empty($websitepage->allowed_in_frames) && empty($conf->global->WEBSITE_ALLOW_FRAMES_ON_ALL_PAGES)) { + header("X-Frame-Options: SAMEORIGIN"); + } + + //httponly_accessforbidden('


    '.$weblangs->trans("YouTryToAccessToAFileThatIsNotAWebsitePage", $websitepage->pageurl, $websitepage->type_container, $websitepage->status).'
    ', 404, 1); http_response_code(404); print '


    '.$weblangs->trans("YouTryToAccessToAFileThatIsNotAWebsitePage", $websitepage->pageurl, $websitepage->type_container, $websitepage->status).'
    '; exit; @@ -82,10 +94,82 @@ if ($pageid > 0) { } if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { + // Security options + + // X-Content-Type-Options header("X-Content-Type-Options: nosniff"); + + // X-Frame-Options if (empty($websitepage->allowed_in_frames) && empty($conf->global->WEBSITE_ALLOW_FRAMES_ON_ALL_PAGES)) { header("X-Frame-Options: SAMEORIGIN"); } + + // X-XSS-Protection + //header("X-XSS-Protection: 1"); // XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated. + + // Content-Security-Policy + if (!defined('WEBSITE_MAIN_SECURITY_FORCECSP')) { + // The constant WEBSITE_MAIN_SECURITY_FORCECSP should never be defined by page, but the variable used just after may be + + // A default security policy that keep usage of js external component like ckeditor, stripe, google, working + // $contentsecuritypolicy = "font-src *; img-src *; style-src * 'unsafe-inline' 'unsafe-eval'; default-src 'self' *.stripe.com 'unsafe-inline' 'unsafe-eval'; script-src 'self' *.stripe.com 'unsafe-inline' 'unsafe-eval'; frame-src 'self' *.stripe.com; connect-src 'self';"; + $contentsecuritypolicy = getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCECSP'); + + if (!is_object($hookmanager)) { + $hookmanager = new HookManager($db); + } + $hookmanager->initHooks(array("main")); + + $parameters = array('contentsecuritypolicy'=>$contentsecuritypolicy); + $result = $hookmanager->executeHooks('setContentSecurityPolicy', $parameters); // Note that $action and $object may have been modified by some hooks + if ($result > 0) { + $contentsecuritypolicy = $hookmanager->resPrint; // Replace CSP + } else { + $contentsecuritypolicy .= $hookmanager->resPrint; // Concat CSP + } + + if (!empty($contentsecuritypolicy)) { + // For example: to restrict to only local resources, except for css (cloudflare+google), and js (transifex + google tags) and object/iframe (youtube) + // default-src 'self'; style-src: https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src: https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src: *; + // For example, to restrict everything to itself except img that can be on other servers: + // default-src 'self'; img-src *; + // Pre-existing site that uses too much js code to fix but wants to ensure resources are loaded only over https and disable plugins: + // default-src https: 'unsafe-inline' 'unsafe-eval'; object-src 'none' + header("Content-Security-Policy: ".$contentsecuritypolicy); + } + } + + // Referrer-Policy + if (!defined('WEBSITE_MAIN_SECURITY_FORCERP')) { + // The constant WEBSITE_MAIN_SECURITY_FORCERP should never be defined by page, but the variable used just after may be + + // For public web sites, we use the same default value than "strict-origin-when-cross-origin" + $referrerpolicy = getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCERP', "strict-origin-when-cross-origin"); + + header("Referrer-Policy: ".$referrerpolicy); + } + + // Strict-Transport-Security + if (!defined('WEBSITE_MAIN_SECURITY_FORCESTS')) { + // The constant WEBSITE_MAIN_SECURITY_FORCESTS should never be defined by page, but the variable used just after may be + + // Example: "max-age=31536000; includeSubDomains" + $sts = getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCESTS'); + if (!empty($sts)) { + header("Strict-Transport-Security: ".$sts); + } + } + + // Permissions-Policy (old name was Feature-Policy) + if (!defined('WEBSITE_MAIN_SECURITY_FORCEPP')) { + // The constant WEBSITE_MAIN_SECURITY_FORCEPP should never be defined by page, but the variable used just after may be + + // Example: "camera: 'none'; microphone: 'none';" + $pp = getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP'); + if (!empty($pp)) { + header("Permissions-Policy: ".$pp); + } + } } // A lang was forced, so we change weblangs init @@ -126,9 +210,21 @@ if ($_SERVER['PHP_SELF'] != DOL_URL_ROOT.'/website/index.php') { // If we browsi } } -// Show off line message +// Show off line message when all website is off if (!defined('USEDOLIBARREDITOR') && empty($website->status)) { + // Security options + + // X-Content-Type-Options + header("X-Content-Type-Options: nosniff"); + + // X-Frame-Options + if (empty($websitepage->allowed_in_frames) && empty($conf->global->WEBSITE_ALLOW_FRAMES_ON_ALL_PAGES)) { + header("X-Frame-Options: SAMEORIGIN"); + } + $weblangs->load("website"); + + //httponly_accessforbidden('


    '.$weblangs->trans("SorryWebsiteIsCurrentlyOffLine").'
    ', 503, 1); http_response_code(503); print '


    '.$weblangs->trans("SorryWebsiteIsCurrentlyOffLine").'
    '; exit; diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php index ff413a8a1c2..d214c112aa3 100644 --- a/htdocs/cron/admin/cron.php +++ b/htdocs/cron/admin/cron.php @@ -129,22 +129,11 @@ dol_print_cron_urls(); print '
    '; -if (!empty($conf->use_javascript_ajax)) { - print "\n".''; -} +$constname = 'CRON_KEY'; + +// Add button to autosuggest a key +include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; +print dolJSToSetRandomPassword($constname); llxFooter(); $db->close(); diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 6fd71669d9c..9900db2c9d6 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -24,6 +24,7 @@ * \brief Cron Jobs Card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -140,6 +141,7 @@ if ($action == 'add') { $object->unitfrequency = GETPOST('unitfrequency', 'int'); $object->frequency = GETPOST('nbfrequency', 'int'); $object->maxrun = GETPOST('maxrun', 'int'); + $object->email_alert = GETPOST('email_alert'); // Add cron task $result = $object->create($user); @@ -174,6 +176,7 @@ if ($action == 'update') { $object->unitfrequency = GETPOST('unitfrequency', 'int'); $object->frequency = GETPOST('nbfrequency', 'int'); $object->maxrun = GETPOST('maxrun', 'int'); + $object->email_alert = GETPOST('email_alert'); // Add cron task $result = $object->update($user); @@ -337,7 +340,7 @@ if (($action == "create") || ($action == "edit")) { print '
    "; - print ""; print ""; @@ -353,7 +356,7 @@ if (($action == "create") || ($action == "edit")) { print '"; print ""; print ""; print ""; print ""; print "\n"; + print '"; + print ""; + print "\n"; + print '"; print ""; print ""; @@ -471,7 +493,7 @@ if (($action == "create") || ($action == "edit")) { if (!empty($object->datestart)) { print $form->selectDate($object->datestart, 'datestart', 1, 1, '', "cronform"); } else { - print $form->selectDate(-1, 'datestart', 1, 1, '', "cronform"); + print $form->selectDate(-1, 'datestart', 1, 1, 1, "cronform"); } print ""; print ""; print ""; print ""; @@ -508,7 +530,7 @@ if (($action == "create") || ($action == "edit")) { $maxrun = $object->maxrun; } print $langs->trans('CronMaxRun').""; - print ""; print ""; @@ -516,12 +538,12 @@ if (($action == "create") || ($action == "edit")) { print '"; print ""; print '"; print '"; print '"; print '"; print '"; print '"; - if (!empty($conf->multicompany->enabled)) { + print '"; + + if (isModEnabled('multicompany')) { print '"; print '"; print '
    '; print $langs->trans('SendingMethod'); @@ -2448,7 +2508,7 @@ if ($action == 'create') { } // Warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { + if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { $langs->load('stocks'); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -2484,7 +2544,7 @@ if ($action == 'create') { print '
    '; @@ -2546,7 +2606,7 @@ if ($action == 'create') { print '
    '; print ''; } else { @@ -674,6 +689,28 @@ if ($result) { if ($user->rights->banque->consolidate) { print ''; } else { print ''; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 5c1472bc6fb..38b666cc2ef 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -26,6 +26,7 @@ * \brief Home page of bank module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; @@ -58,6 +59,7 @@ $search_number = GETPOST('search_number', 'alpha'); $search_status = GETPOST('search_status') ?GETPOST('search_status', 'alpha') : 'opened'; // 'all' or ''='opened' $optioncss = GETPOST('optioncss', 'alpha'); +$search_category_list =""; if (isModEnabled('categorie')) { $search_category_list = GETPOST("search_category_".Categorie::TYPE_ACCOUNT."_list", "array"); } @@ -69,7 +71,7 @@ if ($user->socid) { } $allowed = 0; -if (!empty($user->rights->accounting->chartofaccount)) { +if ($user->hasRight('accounting', 'chartofaccount')) { $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account } if (!$allowed) { @@ -161,6 +163,7 @@ if (empty($reshook)) { $search_label = ''; $search_number = ''; $search_status = ''; + $search_category_list = array(); } // Mass actions @@ -190,17 +193,15 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."bank_account as b"; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; } - -if (isModEnabled('categorie')) { - $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_ACCOUNT, "b.rowid"); -} - $sql .= " WHERE b.entity IN (".getEntity('bank_account').")"; if ($search_status == 'opened') { $sql .= " AND clos = 0"; @@ -208,11 +209,6 @@ if ($search_status == 'opened') { if ($search_status == 'closed') { $sql .= " AND clos = 1"; } - -if (isModEnabled('categorie')) { - $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_ACCOUNT, "b.rowid", $search_category_list); -} - if ($search_ref != '') { $sql .= natural_search('b.ref', $search_ref); } @@ -222,23 +218,68 @@ if ($search_label != '') { if ($search_number != '') { $sql .= natural_search('b.number', $search_number); } +// Search for tag/category ($searchCategoryBankList is an array of ID) +$searchCategoryBankList = $search_category_list; +$searchCategoryBankOperator = 0; +if (!empty($searchCategoryBankList)) { + $searchCategoryBankSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryBankList as $searchCategoryBank) { + if (intval($searchCategoryBank) == -2) { + $searchCategoryBankSqlList[] = "NOT EXISTS (SELECT ck.fk_account FROM ".MAIN_DB_PREFIX."categorie_account as ck WHERE b.rowid = ck.fk_account)"; + } elseif (intval($searchCategoryBank) > 0) { + if ($searchCategoryBankOperator == 0) { + $searchCategoryBankSqlList[] = " EXISTS (SELECT ck.fk_account FROM ".MAIN_DB_PREFIX."categorie_account as ck WHERE b.rowid = ck.fk_account AND ck.fk_categorie = ".((int) $searchCategoryBank).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryBank); + } + } + } + if ($listofcategoryid) { + $searchCategoryBankSqlList[] = " EXISTS (SELECT ck.fk_account FROM ".MAIN_DB_PREFIX."categorie_account as ck WHERE b.rowid = ck.fk_account AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryBankOperator == 1) { + if (!empty($searchCategoryBankSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryBankSqlList).")"; + } + } else { + if (!empty($searchCategoryBankSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryBankSqlList).")"; + } + } +} // 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); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // 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); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; + } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} $resql = $db->query($sql); if ($resql) { @@ -292,7 +333,7 @@ if ($optioncss != '') { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; // List of mass actions available @@ -350,7 +391,7 @@ if (isModEnabled('categorie') && $user->rights->categorie->lire) { // Bank accounts $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -364,7 +405,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // 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 @@ -373,7 +414,13 @@ print '
    '; @@ -2583,7 +2643,7 @@ if ($action == 'create') { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '
    '; print ''; print ''; print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -474,12 +493,12 @@ if ($socid > 0) { } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -562,12 +581,12 @@ if ($socid > 0) { print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -612,12 +631,12 @@ if ($socid > 0) { } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -735,12 +754,12 @@ if ($socid > 0) { print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -808,12 +827,12 @@ if ($socid > 0) { } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -896,12 +915,12 @@ if ($socid > 0) { print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; @@ -969,12 +988,12 @@ if ($socid > 0) { } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { print ''; } print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 586cf98d606..383cf7581e9 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2019 Philippe Grand + * Copyright (C) 2011-2022 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2012 Cedric Salvador @@ -13,7 +13,7 @@ * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2021 Frédéric France - * Copyright (C) 2022 Gauthier VERDOL + * Copyright (C) 2022 Gauthier VERDOL * * 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 @@ -30,59 +30,65 @@ */ /** - * \file htdocs/commande/card.php - * \ingroup commande - * \brief Page to show customer order + * \file htdocs/commande/card.php + * \ingroup commande + * \brief Page to show sales order */ +// Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->propal->enabled)) { +require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; + +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->project->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - -if (!empty($conf->variants->enabled)) { +if (isModEnabled('variants')) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } + // Load translation files required by the page $langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other')); -if (!empty($conf->incoterm->enabled)) { + +if (isModEnabled('incoterm')) { $langs->load('incoterm'); } -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { $langs->load('margins'); } -if (!empty($conf->productbatch->enabled)) { - $langs->load("productbatch"); +if (isModEnabled('productbatch')) { + $langs->load('productbatch'); } -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); -$ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$contactid = GETPOST('contactid', 'int'); -$projectid = GETPOST('projectid', 'int'); -$origin = GETPOST('origin', 'alpha'); -$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility -$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; + +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); +$ref = GETPOST('ref', 'alpha'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$lineid = GETPOST('lineid', 'int'); +$contactid = GETPOST('contactid', 'int'); +$projectid = GETPOST('projectid', 'int'); +$origin = GETPOST('origin', 'alpha'); +$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility +$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; // PDF $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); @@ -106,22 +112,27 @@ $extrafields = new ExtraFields($db); $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 +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once + +// Permissions / Rights +$usercanread = $user->hasRight("commande", "lire"); +$usercancreate = $user->hasRight("commande", "creer"); +$usercandelete = $user->hasRight("commande", "supprimer"); -$usercanread = $user->hasRight("commande", "lire"); -$usercancreate = $user->hasRight("commande", "creer"); -$usercandelete = $user->hasRight("commande", "supprimer"); // Advanced permissions -$usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->close))); -$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->validate))); -$usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->annuler))); -$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send); +$usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close'))); +$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate'))); +$usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler'))); +$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send')); +$usercangeneretedoc = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc')); -$usercancreatepurchaseorder = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); +$usermustrespectpricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); +$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); + +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $error = 0; @@ -163,11 +174,11 @@ if (empty($reshook)) { $action = ''; } - include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { @@ -217,10 +228,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -435,7 +446,7 @@ if (empty($reshook)) { // Now we create same links to contact than the ones found on origin object /* Useless, already into the create - if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) + if (!empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) { $originforcontact = $object->origin; $originidforcontact = $object->origin_id; @@ -580,7 +591,7 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -592,7 +603,7 @@ if (empty($reshook)) { $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } - } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + } elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) { // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); if ($result < 0) { @@ -643,19 +654,35 @@ if (empty($reshook)) { // Set if we used free entry or predefined product $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); - $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); - $prod_entry_mode = GETPOST('prod_entry_mode'); + + $price_ht = ''; + $price_ht_devise = ''; + $price_ttc = ''; + $price_ttc_devise = ''; + + if (GETPOST('price_ht') !== '') { + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ht') !== '') { + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); + } + if (GETPOST('price_ttc') !== '') { + $price_ttc = price2num(GETPOST('price_ttc'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ttc') !== '') { + $price_ttc_devise = price2num(GETPOST('multicurrency_price_ttc'), 'CU', 2); + } + + $prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09'); if ($prod_entry_mode == 'free') { $idprod = 0; - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); + $tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0); } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); if (empty($remise_percent)) { $remise_percent = 0; @@ -680,7 +707,7 @@ if (empty($reshook)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && $price_ht == '' && $price_ht_devise == '') { // Unit price can be 0 but not ''. Also price can be negative for order. + if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && $price_ht === '' && $price_ht_devise === '' && $price_ttc === '' && $price_ttc_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for order. setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -697,7 +724,7 @@ if (empty($reshook)) { $error++; } - if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') { + if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') { if ($combinations = GETPOST('combinations', 'array')) { //Check if there is a product with the given combination $prodcomb = new ProductCombination($db); @@ -737,6 +764,7 @@ if (empty($reshook)) { $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; $price_min = $prod->price_min; + $price_min_ttc = $prod->price_min_ttc; $price_base_type = $prod->price_base_type; // If price per segment @@ -744,6 +772,7 @@ if (empty($reshook)) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; + $price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { @@ -761,12 +790,13 @@ if (empty($reshook)) { $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result >= 0) { if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines[0]->price); $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_min = price($prodcustprice->lines[0]->price_min); + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = $prodcustprice->lines[0]->tva_tx; if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { @@ -826,13 +856,15 @@ if (empty($reshook)) { $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); - // if price ht is forced (ie: calculated by margin rate and cost price). TODO Why this ? + // Set unit price to use if (!empty($price_ht) || $price_ht === '0') { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); + } elseif (!empty($price_ttc) || $price_ttc === '0') { + $pu_ttc = price2num($price_ttc, 'MU'); + $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } elseif ($tmpvat != $tmpprodvat) { - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + // Is this still used ? if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } else { @@ -843,7 +875,7 @@ if (empty($reshook)) { $desc = ''; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -877,7 +909,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { $tmptxt = '('; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'alpha')) { @@ -919,14 +951,22 @@ if (empty($reshook)) { $fk_unit = $prod->fk_unit; } else { $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); + $pu_ttc = price2num($price_ttc, 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); + if (empty($tva_tx)) { + $tva_npr = 0; + } $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); $desc = $product_desc; $type = GETPOST('type'); $fk_unit = GETPOST('units', 'alpha'); $pu_ht_devise = price2num($price_ht_devise, 'MU'); + $pu_ttc_devise = price2num($price_ttc_devise, 'MU'); + + if ($pu_ttc && !$pu_ht) { + $price_base_type = 'TTC'; + } } // Margin @@ -937,17 +977,26 @@ if (empty($reshook)) { $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - $desc = dol_htmlcleanlastbr($desc); - $info_bits = 0; if ($tva_npr) { $info_bits |= 0x01; } - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { - $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessages($mesg, null, 'errors'); - } else { + $desc = dol_htmlcleanlastbr($desc); + + if ($usermustrespectpricemin) { + if ($pu_ht && $price_min && ((price2num($pu_ht) * (1 - $remise_percent / 100)) < price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } + } + + if (!$error) { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, min($rank, count($object->lines) + 1), 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $fk_unit, '', 0, $pu_ht_devise); @@ -959,7 +1008,7 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1015,11 +1064,16 @@ if (empty($reshook)) { $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml')); - $pu_ht = price2num(GETPOST('price_ht'), '', 2); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx', 'alpha') : 0); - $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); + $vat_rate = str_replace('*', '', $vat_rate); - $qty = price2num(GETPOST('qty'), 'MS'); + $pu_ht = price2num(GETPOST('price_ht'), '', 2); + $pu_ttc = price2num(GETPOST('price_ttc'), '', 2); + + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); + $pu_ttc_devise = price2num(GETPOST('multicurrency_subprice_ttc'), '', 2); + + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); // Define info_bits $info_bits = 0; @@ -1066,13 +1120,25 @@ if (empty($reshook)) { 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]; } + $price_min_ttc = $product->price_min_ttc; + if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && !empty($object->thirdparty->price_level)) { + $price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level]; + } $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) { - setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); - $error++; - $action = 'editline'; + if ($usermustrespectpricemin) { + if ($pu_ht && $price_min && ((price2num($pu_ht) * (1 - $remise_percent / 100)) < price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } } } else { $type = GETPOST('type'); @@ -1102,17 +1168,25 @@ if (empty($reshook)) { } } } - $result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); + + $price_base_type = 'HT'; + $pu = $pu_ht; + if (empty($pu) && !empty($pu_ttc)) { + $pu = $pu_ttc; + $price_base_type = 'TTC'; + } + + $result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $price_base_type, $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); if ($result >= 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1168,7 +1242,7 @@ if (empty($reshook)) { } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); @@ -1187,8 +1261,8 @@ if (empty($reshook)) { $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); if ( - GETPOST('generate_deposit', 'alpha') == 'on' && ! empty($deposit_percent_from_payment_terms) - && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer) + GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms) + && isModEnabled('facture') && !empty($user->rights->facture->creer) ) { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; @@ -1262,7 +1336,7 @@ if (empty($reshook)) { } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); @@ -1277,10 +1351,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1310,7 +1384,7 @@ if (empty($reshook)) { } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); @@ -1484,15 +1558,19 @@ if (empty($reshook)) { * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewOrder"); +} $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; + llxHeader('', $title, $help_url); $form = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); $formmargin = new FormMargin($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -1587,7 +1665,7 @@ if ($action == 'create' && $usercancreate) { $date_delivery = (!empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : ''); } - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!empty($objectsrc->multicurrency_code)) { $currency_code = $objectsrc->multicurrency_code; } @@ -1615,7 +1693,7 @@ if ($action == 'create' && $usercancreate) { $remise_absolue = 0; $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ?-1 : ''; - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($soc->multicurrency_code)) { $currency_code = $soc->multicurrency_code; } @@ -1627,7 +1705,7 @@ if ($action == 'create' && $usercancreate) { if ($soc->fk_warehouse > 0) { $warehouse_id = $soc->fk_warehouse; } - if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (isModEnabled('stock') && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; } @@ -1673,7 +1751,7 @@ if ($action == 'create' && $usercancreate) { print ''; } else { print ''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { // Multicurrency code print ''; print ''; print ""; for ($annee = $year_start; $annee <= $year_end; $annee++) { + $totsorties[$annee] = 0; + $totentrees[$annee] = 0; + $case = sprintf("%04s-%02s", $annee, $mois); print ''; } // Numero @@ -1270,7 +1278,7 @@ if ($resql) { } // Extra fields $element = 'banktransaction'; - if (is_array($extrafields->attributes[$element]['label']) && count($extrafields->attributes[$element]['label'])) { + if (!empty($extrafields->attributes[$element]['label']) && is_array($extrafields->attributes[$element]['label']) && count($extrafields->attributes[$element]['label'])) { foreach ($extrafields->attributes[$element]['label'] as $key => $val) { if (!empty($arrayfields["ef.".$key]['checked'])) { if (!empty($arrayfields[$key]['checked'])) { @@ -1553,6 +1561,7 @@ if ($resql) { $companylinked_id = 0; $userlinked_id = 0; + $type_link = ""; //payment line type to define user display and user or company linked foreach ($links as $key => $value) { diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 6edee79f86b..c2e93b27e59 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -17,17 +17,20 @@ */ /** - * \file htdocs/compta/bank/bilan.php - * \ingroup banque - * \brief Page de bilan + * \file htdocs/compta/bank/bilan.php + * \ingroup compta/bank + * \brief Page of Balance sheet */ + +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories')); +// Security Check Access Control if (empty($user->rights->banque->lire)) { accessforbidden(); } diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 3e40e45b58e..8385dab544c 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -24,6 +24,7 @@ * \brief Page de budget */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index c67f6e668c5..a923f3a0829 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2014-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric France * Copyright (C) 2022 Charlene Benke * * This program is free software; you can redistribute it and/or modify @@ -29,6 +29,7 @@ * \brief Page to create/view a bank account */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -68,6 +69,15 @@ $hookmanager->initHooks(array('bankcard', 'globalcard')); $id = GETPOST("id", 'int') ? GETPOST("id", 'int') : GETPOST('ref', 'alpha'); $fieldid = GETPOST("id", 'int') ? 'rowid' : 'ref'; +if (GETPOST("id", 'int') || GETPOST("ref")) { + if (GETPOST("id", 'int')) { + $object->fetch(GETPOST("id", 'int')); + } + if (GETPOST("ref")) { + $object->fetch(0, GETPOST("ref")); + } +} + $result = restrictedArea($user, 'banque', $id, 'bank_account&bank_account', '', '', $fieldid); @@ -319,6 +329,7 @@ if (empty($reshook)) { } } + /* * View */ @@ -332,18 +343,16 @@ if (isModEnabled('accounting')) { $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -$title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card"); - $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas|DE:Modul_Banken_und_Barbestände'; - +if ($action == 'create') { + $title = $langs->trans("NewFinancialAccount"); +} elseif (!empty($object->ref)) { + $title = $object->ref." - ".$langs->trans("Card"); +} llxHeader("", $title, $help_url); - // Creation - if ($action == 'create') { - $object = new Account($db); - print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account'); if ($conf->use_javascript_ajax) { @@ -599,22 +608,8 @@ if ($action == 'create') { print ''; } else { - /* ************************************************************************** */ - /* */ - /* Visu et edition */ - /* */ - /* ************************************************************************** */ - + // View and edit mode if ((GETPOST("id", 'int') || GETPOST("ref")) && $action != 'edit') { - $object = new Account($db); - if (GETPOST("id", 'int')) { - $object->fetch(GETPOST("id", 'int')); - } - if (GETPOST("ref")) { - $object->fetch(0, GETPOST("ref")); - $_GET["id"] = $object->id; - } - // Show tabs $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"), -1, 'account'); @@ -757,7 +752,7 @@ if ($action == 'create') { } print ''; - print ''.$langs->trans("AccountancyCode").''; + print ''.$langs->trans("AccountancyCode").''; print ''; } - if (!empty(isModEnabled('paymentbybanktransfer'))) { + if (isModEnabled('paymentbybanktransfer')) { print ''; print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index aa60c1ddf41..fbb52fe4a58 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -21,29 +21,38 @@ */ /** - * \file htdocs/compta/bank/categ.php - * \ingroup compta - * \brief Page ajout de categories bancaires + * \file htdocs/compta/bank/categ.php + * \ingroup compta/bank + * \brief Page to manage Bank Categories */ + +// Load Dolibarr environment 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'; + // Load translation files required by the page $langs->loadLangs(array('banks', 'categories')); + +// Get Parameters $action = GETPOST('action', 'aZ09'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$categid = GETPOST('categid'); +$label = GETPOST("label"); + +// Initialize technical objects +$bankcateg = new BankCateg($db); + + +// Security Check Access Control if (!$user->rights->banque->configurer) { accessforbidden(); } -$bankcateg = new BankCateg($db); -$categid = GETPOST('categid'); -$label = GETPOST("label"); - /* diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 222694a15f1..a73fd2b5f2c 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2019 JC Prieto + * Copyright (C) 2022 Frédéric 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 @@ -852,7 +853,7 @@ class Account extends CommonObject $sql .= ",min_allowed = ".($this->min_allowed != '' ? price2num($this->min_allowed) : "null"); $sql .= ",min_desired = ".($this->min_desired != '' ? price2num($this->min_desired) : "null"); - $sql .= ",comment = '".$this->db->escape($this->comment)."'"; + $sql .= ",comment = '".$this->db->escape($this->comment)."'"; $sql .= ",state_id = ".($this->state_id > 0 ? ((int) $this->state_id) : "null"); $sql .= ",fk_pays = ".($this->country_id > 0 ? ((int) $this->country_id) : "null"); @@ -1381,6 +1382,7 @@ class Account extends CommonObject public function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $user; + include_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; $result = ''; $label = img_picto('', $this->picto).' '.$langs->trans("BankAccount").''; @@ -1389,7 +1391,7 @@ class Account extends CommonObject } $label .= '
    '.$langs->trans('Label').': '.$this->label; $label .= '
    '.$langs->trans('AccountNumber').': '.$this->number; - $label .= '
    '.$langs->trans('IBAN').': '.$this->iban; + $label .= '
    '.$langs->trans('IBAN').': '.getIbanHumanReadable($this); $label .= '
    '.$langs->trans('BIC').': '.$this->bic; $label .= '
    '.$langs->trans("AccountCurrency").': '.$this->currency_code; @@ -1925,18 +1927,18 @@ class AccountLine extends CommonObject $obj = $this->db->fetch_object($result); if ($obj) { $this->id = $obj->rowid; - $this->rowid = $obj->rowid; + $this->rowid = $obj->rowid; $this->ref = $obj->rowid; - $this->datec = $obj->datec; - $this->datev = $obj->datev; - $this->dateo = $obj->dateo; + $this->datec = $obj->datec; + $this->datev = $obj->datev; + $this->dateo = $obj->dateo; $this->amount = $obj->amount; - $this->label = $obj->label; - $this->note = $obj->note; + $this->label = $obj->label; + $this->note = $obj->note; - $this->fk_user_author = $obj->fk_user_author; - $this->fk_user_rappro = $obj->fk_user_rappro; + $this->fk_user_author = $obj->fk_user_author; + $this->fk_user_rappro = $obj->fk_user_rappro; $this->fk_type = $obj->fk_type; // Type of transaction $this->rappro = $obj->rappro; @@ -1947,9 +1949,13 @@ class AccountLine extends CommonObject $this->fk_bordereau = $obj->fk_bordereau; $this->fk_account = $obj->fk_account; - $this->bank_account_ref = $obj->bank_account_ref; + $this->bank_account_ref = $obj->bank_account_ref; $this->bank_account_label = $obj->bank_account_label; + // Retrieve all extrafield + // fetch optionals attributes and labels + $this->fetch_optionals(); + $ret = 1; } $this->db->free($result); @@ -1966,6 +1972,10 @@ class AccountLine extends CommonObject */ public function insert() { + $error = 0; + + $this->db->begin(); + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank ("; $sql .= "datec"; $sql .= ", dateo"; @@ -2001,15 +2011,26 @@ class AccountLine extends CommonObject dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); - - if (!$resql) { + if ($resql) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'bank'); + // Actions on extra fields (by external module or standard code) + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } else { + $error++; $this->error = $this->db->lasterror(); - return -1; + dol_print_error($this->db); } - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'bank'); - - return $this->id; + if (!$error) { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1 * $error; + } } /** @@ -2063,6 +2084,12 @@ class AccountLine extends CommonObject $nbko++; } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_extrafields WHERE fk_object=".(int) $this->rowid; + $result = $this->db->query($sql); + if (!$result) { + $nbko++; + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".(int) $this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 53505a888eb..3d07c280559 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -423,11 +423,11 @@ class PaymentVarious extends CommonObject $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); return -5; } - if (isModEnabled('banque') && (empty($this->fk_account) || $this->fk_account <= 0)) { + if (isModEnabled("banque") && (empty($this->fk_account) || $this->fk_account <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("BankAccount")); return -6; } - if (isModEnabled('banque') && (empty($this->type_payment) || $this->type_payment <= 0)) { + if (isModEnabled("banque") && (empty($this->type_payment) || $this->type_payment <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); return -7; } @@ -481,7 +481,7 @@ class PaymentVarious extends CommonObject $this->ref = $this->id; if ($this->id > 0) { - if (isModEnabled('banque') && !empty($this->amount)) { + if (isModEnabled("banque") && !empty($this->amount)) { // Insert into llx_bank require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 78d45beadf3..0960b984c04 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -1,5 +1,4 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo @@ -39,6 +38,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankaccountdocuments', 'globalcard')); + // Security check if ($user->socid) { $action = ''; @@ -93,8 +95,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); - +$title = $object->ref.' - '.$langs->trans("Documents"); $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; llxHeader("", $title, $help_url); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 459134dc68a..c11e13f1e71 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -23,6 +23,7 @@ * \brief Page graph des transactions bancaires */ +// Load Dolibarr environment 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'; @@ -34,6 +35,9 @@ $langs->loadLangs(array('banks', 'categories')); $WIDTH = DolGraph::getDefaultGraphSizeForStats('width', 768); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 200); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankstats', 'globalcard')); + // Security check if (GETPOST('account') || GETPOST('ref')) { $id = GETPOST('account') ? GETPOST('account') : GETPOST('ref'); @@ -55,11 +59,6 @@ $error = 0; /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Graph"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); $datetime = dol_now(); @@ -83,6 +82,10 @@ if (GETPOST("ref")) { $account = $object->id; } +$title = $object->ref.' - '.$langs->trans("Graph"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $result = dol_mkdir($conf->bank->dir_temp); if ($result < 0) { $langs->load("errors"); diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 1bbab933e7b..729ccc53fdc 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -16,23 +16,29 @@ */ /** - * \file htdocs/compta/bank/info.php - * \ingroup banque - * \brief Onglet info d'une ecriture bancaire + * \file htdocs/compta/bank/info.php + * \ingroup compta/bank + * \brief Info tab of bank statement */ + +// Load Dolibarr environment require '../../main.inc.php'; 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'; +require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'companies')); + +// Get Parameters $id = GETPOST("rowid", 'int'); $accountid = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); + // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index a22e32b2595..7c775b6e95c 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -30,10 +30,12 @@ * \brief Page to edit a bank transaction record */ +// Load Dolibarr environment 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'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'compta', 'bills', 'other')); @@ -76,7 +78,9 @@ if (empty($user->rights->banque->lire) && empty($user->rights->banque->consolida } $hookmanager->initHooks(array('bankline')); - +$object = new AccountLine($db); +$extrafields = new ExtraFields($db); +$extrafields->fetch_name_optionals_label($object->element); /* * Actions @@ -124,18 +128,17 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban if ($user->rights->banque->modifier && $action == "update") { $error = 0; - $acline = new AccountLine($db); - $result = $acline->fetch($rowid); + $result = $object->fetch($rowid); if ($result <= 0) { dol_syslog('Failed to read bank line with id '.$rowid, LOG_WARNING); // This happens due to old bug that has set fk_account to null. - $acline->id = $rowid; + $object->id = $rowid; } $acsource = new Account($db); $acsource->fetch($accountoldid); $actarget = new Account($db); - if (GETPOST('accountid', 'int') > 0 && !$acline->rappro && !$acline->getVentilExportCompta()) { // We ask to change bank account + if (GETPOST('accountid', 'int') > 0 && !$object->rappro && !$object->getVentilExportCompta()) { // We ask to change bank account $actarget->fetch(GETPOST('accountid', 'int')); } else { $actarget->fetch($accountoldid); @@ -172,7 +175,7 @@ if ($user->rights->banque->modifier && $action == "update") { $sql .= " emetteur='".$db->escape(GETPOST("emetteur"))."',"; } // Blocked when conciliated - if (!$acline->rappro) { + if (!$object->rappro) { if (GETPOSTISSET('label')) { $sql .= " label = '".$db->escape(GETPOST("label"))."',"; } @@ -187,7 +190,7 @@ if ($user->rights->banque->modifier && $action == "update") { } } $sql .= " fk_account = ".((int) $actarget->id); - $sql .= " WHERE rowid = ".((int) $acline->id); + $sql .= " WHERE rowid = ".((int) $object->id); $result = $db->query($sql); if (!$result) { @@ -213,6 +216,11 @@ if ($user->rights->banque->modifier && $action == "update") { } } + if (!$error) { + $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); + $object->insertExtraFields(); + } + if (!$error) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); @@ -600,6 +608,13 @@ if ($result) { print ""; } + // Other attributes + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $bankline, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook)) { + print $bankline->showOptionals($extrafields, ($objp->rappro ? 'view' : 'create'), $parameters); + } print "
    '; print $langs->trans('IncotermLabel'); @@ -2615,7 +2675,7 @@ if ($action == 'create') { print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { + if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -2665,7 +2725,7 @@ if ($action == 'create') { print '
    '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '; // Margin Infos - if (!empty($conf->margin->enabled)) { + if (isModEnabled('margin')) { $formmargin->displayMarginInfos($object); } @@ -2690,10 +2750,15 @@ if ($action == 'create') { * Lines */ - // Show object lines + // Get object lines $result = $object->getLinesArray(); - print '
    + // Add products/services form + //$forceall = 1; + global $inputalsopricewithtax; + $inputalsopricewithtax = 1; + + print ' @@ -2717,8 +2782,6 @@ if ($action == 'create') { // Form to add new line if ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines') { if ($action != 'editline') { - // Add products/services form - $parameters = array(); $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -2756,13 +2819,13 @@ if ($action == 'create') { if (($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) { if ($usercanvalidate) { - print ''.$langs->trans('Validate').''; + print ''.(empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')).''; } else { print ''.$langs->trans('Validate').''; } } // Create event - /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. + /*if ($conf->agenda->enabled && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { print '' . $langs->trans("AddAction") . ''; }*/ @@ -2772,7 +2835,7 @@ if ($action == 'create') { } // ReOpen - if ( (( ! empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { + if ( (( !empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { print 'global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; print '>'.$langs->trans('ReOpen').''; } @@ -2780,16 +2843,12 @@ if ($action == 'create') { // Send if (empty($user->socid)) { if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { - if ($usercansend) { - print ''.$langs->trans('SendMail').''; - } else { - print ''.$langs->trans('SendMail').''; - } + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $usercansend); } } // Create a sale order - if (!empty($conf->commande->enabled) && $object->statut == Propal::STATUS_SIGNED) { + if (isModEnabled('commande') && $object->statut == Propal::STATUS_SIGNED) { if ($usercancreateorder) { print ''.$langs->trans("AddOrder").''; } @@ -2797,7 +2856,7 @@ if ($action == 'create') { // Create a purchase order if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL)) { - if ($object->statut == Propal::STATUS_SIGNED && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { + if ($object->statut == Propal::STATUS_SIGNED && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order"))) { if ($usercancreatepurchaseorder) { print ''.$langs->trans("AddPurchaseOrder").''; } @@ -2805,7 +2864,7 @@ if ($action == 'create') { } // Create an intervention - if (!empty($conf->service->enabled) && !empty($conf->ficheinter->enabled) && $object->statut == Propal::STATUS_SIGNED) { + if (isModEnabled("service") && isModEnabled('ficheinter') && $object->statut == Propal::STATUS_SIGNED) { if ($usercancreateintervention) { $langs->load("interventions"); print ''.$langs->trans("AddIntervention").''; @@ -2813,7 +2872,7 @@ if ($action == 'create') { } // Create contract - if (!empty($conf->contrat->enabled) && $object->statut == Propal::STATUS_SIGNED) { + if (isModEnabled('contrat') && $object->statut == Propal::STATUS_SIGNED) { $langs->load("contracts"); if ($usercancreatecontract) { @@ -2837,14 +2896,22 @@ if ($action == 'create') { } } - // Close as accepted/refused - if ($object->statut == Propal::STATUS_VALIDATED) { - if ($usercanclose) { - print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; - print '>'.$langs->trans('SetAcceptedRefused').''; - } else { - print ''.$langs->trans('SetAcceptedRefused').''; + if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { + // Close as accepted/refused + if ($object->statut == Propal::STATUS_VALIDATED) { + if ($usercanclose) { + print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; + print '>'.$langs->trans('SetAcceptedRefused').''; + } else { + print ''.$langs->trans('SetAcceptedRefused').''; + } + } + } else { + // Set not signed (close) + if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) { + print 'global->MAIN_JUMP_TAG) ? '' : '#close') . '"'; + print '>' . $langs->trans('SetRefusedAndClose') . ''; } } @@ -2854,10 +2921,7 @@ if ($action == 'create') { } // Delete - if ($usercandelete) { - print ''.$langs->trans('Delete').''; - } + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $usercandelete); } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3717ed361b8..1b3df25c7d2 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2020 Juanjo Menent - * Copyright (C) 2010-2017 Philippe Grand + * Copyright (C) 2010-2022 Philippe Grand * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013 Florian Henry @@ -53,6 +53,11 @@ class Propal extends CommonObject { use CommonIncoterm; + /** + * @var string code + */ + public $code = ""; + /** * @var string ID to identify managed object */ @@ -297,7 +302,7 @@ class Propal extends CommonObject 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>22), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>40), 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'position'=>23), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>24), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>24), 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25), 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>55), 'datep' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>60), @@ -335,11 +340,11 @@ class Propal extends CommonObject 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>220), 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>225), 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'MulticurrencyID', 'enabled'=>1, 'visible'=>-1, 'position'=>230), - 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCurrency', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>235), - 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>240, 'isameasure'=>1), - 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>245, 'isameasure'=>1), - 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>250, 'isameasure'=>1), - 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>255, 'isameasure'=>1), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCurrency', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>235), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>240, 'isameasure'=>1), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>245, 'isameasure'=>1), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>250, 'isameasure'=>1), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>255, 'isameasure'=>1), 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>260), 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), @@ -932,9 +937,6 @@ class Propal extends CommonObject $this->line->date_start = $date_start; $this->line->date_end = $date_end; - // TODO deprecated - $this->line->price = $price; - if (is_array($array_options) && count($array_options) > 0) { // We replace values in this->line->array_options only for entries defined into $array_options foreach ($array_options as $key => $value) { @@ -1105,6 +1107,7 @@ class Propal extends CommonObject $sql .= ", fk_mode_reglement"; $sql .= ", fk_account"; $sql .= ", ref_client"; + $sql .= ", ref_ext"; $sql .= ", date_livraison"; $sql .= ", fk_shipping_method"; $sql .= ", fk_warehouse"; @@ -1135,10 +1138,11 @@ class Propal extends CommonObject $sql .= ", '".$this->db->escape($this->model_pdf)."'"; $sql .= ", ".($this->fin_validite != '' ? "'".$this->db->idate($this->fin_validite)."'" : "NULL"); $sql .= ", ".($this->cond_reglement_id > 0 ? ((int) $this->cond_reglement_id) : 'NULL'); - $sql .= ", ".(! empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : 'NULL'); + $sql .= ", ".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : 'NULL'); $sql .= ", ".($this->mode_reglement_id > 0 ? ((int) $this->mode_reglement_id) : 'NULL'); $sql .= ", ".($this->fk_account > 0 ? ((int) $this->fk_account) : 'NULL'); $sql .= ", '".$this->db->escape($this->ref_client)."'"; + $sql .= ", '".$this->db->escape($this->ref_ext)."'"; $sql .= ", ".(empty($delivery_date) ? "NULL" : "'".$this->db->idate($delivery_date)."'"); $sql .= ", ".($this->shipping_method_id > 0 ? $this->shipping_method_id : 'NULL'); $sql .= ", ".($this->warehouse_id > 0 ? $this->warehouse_id : 'NULL'); @@ -1367,7 +1371,7 @@ class Propal extends CommonObject $object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); $object->fk_delivery_address = ''; - /*if (!empty($conf->project->enabled)) + /*if (isModEnabled('project')) { $project = new Project($db); if ($this->fk_project > 0 && $project->fetch($this->fk_project)) { @@ -1415,7 +1419,7 @@ class Propal extends CommonObject } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $prodcustprice = new Productcustomerprice($this->db); $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $objsoc->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result) { // If there is some prices specific to the customer if (count($prodcustprice->lines) > 0) { @@ -1523,7 +1527,7 @@ class Propal extends CommonObject $sql .= ", p.datep as dp"; $sql .= ", p.fin_validite as dfv"; $sql .= ", p.date_livraison as delivery_date"; - $sql .= ", p.model_pdf, p.last_main_doc, p.ref_client, p.extraparams"; + $sql .= ", p.model_pdf, p.last_main_doc, p.ref_client, ref_ext, p.extraparams"; $sql .= ", p.note_private, p.note_public"; $sql .= ", p.fk_projet as fk_project, p.fk_statut"; $sql .= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; @@ -1575,6 +1579,7 @@ class Propal extends CommonObject $this->ref = $obj->ref; $this->ref_client = $obj->ref_client; + $this->ref_ext = $obj->ref_ext; $this->remise = $obj->remise; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; @@ -1741,7 +1746,7 @@ class Propal extends CommonObject $sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "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 .= " deposit_percent=".(! empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null").","; + $sql .= " deposit_percent=".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null").","; $sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; $sql .= " fk_input_reason=".(isset($this->demand_reason_id) ? $this->demand_reason_id : "null").","; $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; @@ -1904,7 +1909,7 @@ class Propal extends CommonObject $line->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($objp->fk_product) && !empty($loadalsotranslation)) { $tmpproduct = new Product($this->db); $tmpproduct->fetch($objp->fk_product); $tmpproduct->getMultiLangs(); @@ -2110,11 +2115,11 @@ class Propal extends CommonObject * Define end validity date * * @param User $user Object user that modify - * @param int $date_fin_validite End of validity date + * @param int $date_end_validity End of validity date * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_echeance($user, $date_fin_validite, $notrigger = 0) + public function set_echeance($user, $date_end_validity, $notrigger = 0) { // phpcs:enable if (!empty($user->rights->propal->creer)) { @@ -2122,8 +2127,8 @@ class Propal extends CommonObject $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fin_validite = ".($date_fin_validite != '' ? "'".$this->db->idate($date_fin_validite)."'" : 'null'); - $sql .= " WHERE rowid = ".((int) $this->id)." AND fk_statut = ".self::STATUS_DRAFT; + $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fin_validite = ".($date_end_validity != '' ? "'".$this->db->idate($date_end_validity)."'" : 'null'); + $sql .= " WHERE rowid = ".((int) $this->id)." AND fk_statut = ".((int) self::STATUS_DRAFT); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); @@ -2135,7 +2140,7 @@ class Propal extends CommonObject if (!$error) { $this->oldcopy = clone $this; - $this->fin_validite = $date_fin_validite; + $this->fin_validite = $date_end_validity; } if (!$notrigger && empty($error)) { @@ -2620,18 +2625,32 @@ class Propal extends CommonObject $newprivatenote = dol_concatdesc($this->note_private, $note); + if (empty($conf->global->PROPALE_KEEP_OLD_SIGNATURE_INFO)) { + $date_signature = $now; + $fk_user_signature = $user->id; + } else { + $this->info($this->id); + if (!isset($this->date_signature) || $this->date_signature == '') { + $date_signature = $now; + $fk_user_signature = $user->id; + } else { + $date_signature = $this->date_signature; + $fk_user_signature = $this->user_signature->id; + } + } + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id; + $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($date_signature)."', fk_user_signature=".$fk_user_signature; $sql .= " WHERE rowid = ".((int) $this->id); $resql = $this->db->query($sql); if ($resql) { // Status self::STATUS_REFUSED by default $modelpdf = !empty($conf->global->PROPALE_ADDON_PDF_ODT_CLOSED) ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf; - $trigger_name = 'PROPAL_CLOSE_REFUSED'; + $trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger() if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED - $trigger_name = 'PROPAL_CLOSE_SIGNED'; + $trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger() $modelpdf = !empty($conf->global->PROPALE_ADDON_PDF_ODT_TOBILL) ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf; // The connected company is classified as a client @@ -2649,7 +2668,7 @@ class Propal extends CommonObject if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -2668,7 +2687,7 @@ class Propal extends CommonObject $this->oldcopy= clone $this; $this->statut = $status; $this->status = $status; - $this->date_signature = $now; + $this->date_signature = $date_signature; $this->note_private = $newprivatenote; } @@ -2742,7 +2761,7 @@ class Propal extends CommonObject if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -2809,6 +2828,7 @@ class Propal extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; $sql .= " SET fk_statut = ".self::STATUS_DRAFT; + $sql .= ", online_sign_ip = NULL , online_sign_name = NULL"; $sql .= " WHERE rowid = ".((int) $this->id); $resql = $this->db->query($sql); @@ -3333,7 +3353,7 @@ class Propal extends CommonObject public function LibStatut($status, $mode = 1) { // phpcs:enable - global $conf; + global $conf, $hookmanager; // Init/load array of translation of status if (empty($this->labelStatus) || empty($this->labelStatusShort)) { @@ -3364,6 +3384,14 @@ class Propal extends CommonObject $statusType = 'status6'; } + + $parameters = array('status' => $status, 'mode' => $mode); + $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook + + if ($reshook > 0) { + return $hookmanager->resPrint; + } + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index e8f922fab44..ccc514553f8 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -106,9 +106,7 @@ class PropaleStats extends Stats } if ($categid) { - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cs ON cs.fk_soc = p.fk_soc'; - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as c ON c.rowid = cs.fk_categorie'; - $this->where .= ' AND c.rowid = '.((int) $categid); + $this->where .= ' AND EXISTS (SELECT rowid FROM '.MAIN_DB_PREFIX.'categorie_societe as cats WHERE cats.fk_soc = p.fk_soc AND cats.fk_categorie = '.((int) $categid).')'; } } diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index d9942e9153c..42f3f34f8d4 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Patrick Rouillon * Copyright (C) 2005-2016 Destailleur Laurent * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2022 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 @@ -24,6 +24,7 @@ * \brief Tab to manage contacts/adresses of proposal */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -68,12 +69,14 @@ if (!empty($user->socid)) { } restrictedArea($user, 'propal', $object->id); +$usercancreate = $user->hasRight("propal", "creer"); + /* * Add a new contact */ -if ($action == 'addcontact' && $user->rights->propale->creer) { +if ($action == 'addcontact' && $user->rights->propal->creer) { if ($object->id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); @@ -91,12 +94,12 @@ if ($action == 'addcontact' && $user->rights->propale->creer) { setEventMessages($object->error, $object->errors, 'errors'); } } -} elseif ($action == 'swapstatut' && $user->rights->propale->creer) { +} elseif ($action == 'swapstatut' && $user->rights->propal->creer) { // Toggle the status of a contact if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } -} elseif ($action == 'deletecontact' && $user->rights->propale->creer) { +} elseif ($action == 'deletecontact' && $user->rights->propal->creer) { // Deletes a contact $result = $object->delete_contact($lineid); @@ -112,8 +115,9 @@ if ($action == 'addcontact' && $user->rights->propale->creer) { /* * View */ -$title = $langs->trans('Proposal')." - ".$langs->trans('ContactsAddresses'); +$title = $object->ref." - ".$langs->trans('ContactsAddresses'); $help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos"; + llxHeader('', $title, $help_url); $form = new Form($db); @@ -135,37 +139,25 @@ 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, 'customer'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 31cf2c18f42..f1d1d7ef644 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -26,13 +26,14 @@ * \brief Management page of documents attached to a business proposal */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.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'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -80,7 +81,7 @@ if (!$sortfield) { $object = new Propal($db); $object->fetch($id, $ref); -$permissiontoadd = $user->rights->propale->creer; +$permissiontoadd = $user->rights->propal->creer; // Security check if (!empty($user->socid)) { @@ -89,6 +90,8 @@ if (!empty($user->socid)) { } restrictedArea($user, 'propal', $object->id); +$usercancreate = $user->hasRight("propal", "creer"); + /* * Actions @@ -104,7 +107,7 @@ if ($object->id > 0) { /* * View */ -$title = $langs->trans('Proposal')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); @@ -134,37 +137,25 @@ 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, 'customer'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 5bfed3ff1c9..4a6d9ec63ed 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -25,6 +25,7 @@ * \brief Home page of proposal area */ +// Load Dolibarr environment 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'; @@ -76,7 +77,7 @@ if ($tmp) { /* * Draft proposals */ -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc"; $sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.code_fournisseur, s.email, s.entity, s.code_compta"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; @@ -226,7 +227,7 @@ if ($resql) { /* * Open (validated) proposals */ -if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { +if (isModEnabled("propal") && $user->rights->propal->lire) { $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta"; $sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -311,7 +312,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { */ /* -if (! empty($conf->propal->enabled)) +if (isModEnabled('propal')) { $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid"; $sql.=" FROM ".MAIN_DB_PREFIX."propal as c"; @@ -386,7 +387,7 @@ if (! empty($conf->propal->enabled)) */ /* -if (! empty($conf->propal->enabled)) +if (isModEnabled('propal')) { $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 65ff9c19e2b..986601a91bc 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -24,11 +24,12 @@ * \brief Page d'affichage des infos d'une proposition commerciale */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -52,6 +53,8 @@ if (!empty($user->socid)) { } restrictedArea($user, 'propal', $object->id); +$usercancreate = $user->hasRight("propal", "creer"); + /* * View @@ -59,7 +62,7 @@ restrictedArea($user, 'propal', $object->id); $form = new Form($db); -$title = $langs->trans('Proposal')." - ".$langs->trans('Info'); +$title = $object->ref." - ".$langs->trans('Info'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); @@ -81,37 +84,25 @@ $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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index dc4c4339f1e..ed86a61d7bd 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand + * Copyright (C) 2010-2022 Philippe Grand * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry @@ -37,22 +37,27 @@ * \brief Page of commercial proposals card and list */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.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.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +if (isModEnabled('categorie')) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'categories')); -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { $langs->loadLangs(array('sendings')); } @@ -100,7 +105,8 @@ $search_date_endyear = GETPOST('search_date_endyear', 'int'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_date_end_startday = GETPOST('search_date_end_startday', 'int'); -$search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); +$search_date_end_startmonth = GETPOST('se$sql .= $db->plimit($limit + 1, $offset); +arch_date_end_startmonth', 'int'); $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); @@ -204,8 +210,8 @@ $checkedtypetiers = 0; $arrayfields = array( 'p.ref'=>array('label'=>"Ref", 'checked'=>1), 'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>-1), - 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1)), - 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1)), + 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(isModEnabled('project') ? 1 : 0)), + 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(isModEnabled('project') ? 1 : 0)), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1), 's.town'=>array('label'=>"Town", 'checked'=>-1), @@ -218,7 +224,7 @@ $arrayfields = array( 'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0), 'p.date_signature'=>array('label'=>"DateSigning", 'checked'=>0), 'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0), - 'p.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'enabled'=>!empty($conf->expedition->enabled)), + 'p.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'enabled'=>isModEnabled("expedition")), 'p.fk_input_reason'=>array('label'=>"Origin", 'checked'=>0, 'enabled'=>1), 'p.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>0), 'p.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0), @@ -227,27 +233,49 @@ $arrayfields = array( 'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), 'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), - 'p.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_tva'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), - 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'p.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'p.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'p.multicurrency_total_tva'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'p.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>isModEnabled("multicurrency") && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>isModEnabled("multicurrency") && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10), 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>-1), - 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), - 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), + 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), + 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), + 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), + 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), 'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500), - 'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), - 'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), + 'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); +// List of fields to search into when doing a "search in all" +/*$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if (!empty($val['searchall'])) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +}*/ +// Definition of array of fields for columns +/*$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=> isset($val['help']) ? $val['help'] : '' + ); + } +}*/ // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -439,7 +467,7 @@ if ($action == "nosign" && $permissiontoclose) { $error = 0; foreach ($toselect as $checked) { if ($tmpproposal->fetch($checked) > 0) { - if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) { + if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED || (!empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $tmpproposal->statut == $tmpproposal::STATUS_DRAFT)) { $tmpproposal->statut = $tmpproposal::STATUS_NOTSIGNED; if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_NOTSIGNED) > 0) { setEventMessage($tmpproposal->ref." ".$langs->trans('NoSigned'), 'mesgs'); @@ -513,21 +541,25 @@ $formother = new FormOther($db); $formfile = new FormFile($db); $formpropal = new FormPropal($db); $formmargin = null; -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { $formmargin = new FormMargin($db); } $companystatic = new Societe($db); $projectstatic = new Project($db); $formcompany = new FormCompany($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + +$title = $langs->trans('ListOfProposals'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; -//llxHeader('',$langs->trans('Proposal'),$help_url); +llxHeader('', $title, $help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) { +if ($sall || $search_user > 0) { $sql = 'SELECT DISTINCT'; } -$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, '; $sql .= " typent.code as typent_code,"; $sql .= " ava.rowid as availability,"; $sql .= " country.code as country_code,"; @@ -554,9 +586,12 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql = preg_replace('/, $/', '', $sql); + +$sqlfields = $sql; // $sql fields to remove for count total + $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)"; @@ -568,12 +603,9 @@ $sql .= ', '.MAIN_DB_PREFIX.'propal as p'; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; } -if ($sall || $search_product_category > 0) { +if ($sall) { $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)"; @@ -627,11 +659,15 @@ if ($search_project) { if ($search_availability) { $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_societe_alias) { - $sql .= natural_search('s.name_alias', $search_societe_alias); +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_login) { $sql .= natural_search(array("u.login", "u.firstname", "u.lastname"), $search_login); @@ -686,10 +722,6 @@ if ($search_fk_input_reason > 0) { if ($search_fk_mode_reglement > 0) { $sql .= " AND p.fk_mode_reglement = ".((int) $search_fk_mode_reglement); } - -if ($search_product_category > 0) { - $sql .= " AND cp.fk_categorie = ".((int) $search_product_category); -} if ($socid > 0) { $sql .= ' AND s.rowid = '.((int) $socid); } @@ -726,35 +758,75 @@ if ($search_date_signature_start) { if ($search_date_signature_end) { $sql .= " AND p.date_signature <= '".$db->idate($search_date_signature_end)."'"; } +// Search for tag/category ($searchCategoryProductList is an array of ID) +$searchCategoryProductOperator = -1; +$searchCategoryProductList = array($search_product_category); +if (!empty($searchCategoryProductList)) { + $searchCategoryProductSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProductList as $searchCategoryProduct) { + if (intval($searchCategoryProduct) == -2) { + $searchCategoryProductSqlList[] = "NOT EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."propaldet as pd WHERE pd.fk_propal = p.rowid AND pd.fk_product = ck.fk_product)"; + } elseif (intval($searchCategoryProduct) > 0) { + if ($searchCategoryProductOperator == 0) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."propaldet as pd WHERE pd.fk_propal = p.rowid AND pd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); + } + } + } + if ($listofcategoryid) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."propaldet as pd WHERE pd.fk_propal = p.rowid AND pd.fk_product = ck.fk_product AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProductOperator == 1) { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProductSqlList).")"; + } + } else { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProductSqlList).")"; + } + } +} // 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); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add HAVING from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPrint; -$sql .= $db->order($sortfield, $sortorder); -$sql .= ', p.ref DESC'; - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +$sql .= $db->order($sortfield, $sortorder); +$sql .= ', p.ref DESC'; +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} $resql = $db->query($sql); @@ -786,8 +858,6 @@ if ($resql) { exit; } - llxHeader('', $langs->trans('Proposal'), $help_url); - $param = '&search_status='.urlencode($search_status); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); @@ -965,7 +1035,7 @@ if ($resql) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; // List of mass actions available @@ -1058,22 +1128,21 @@ if ($resql) { $moreforfilter .= '
    '; } // If the user can view products - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { + if (isModEnabled('categorie') && $user->hasRight('categorie', 'read') && ($user->rights->produit->lire || $user->rights->service->lire)) { + $searchCategoryProductOperator = -1; include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $moreforfilter .= '
    '; $tmptitle = $langs->trans('IncludingProductWithTag'); - $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300 widthcentpercentminusx' : 'maxwidth250 widthcentpercentminusx'), 1); - $moreforfilter .= '
    '; + $formcategory = new FormCategory($db); + $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PRODUCT, array($search_product_category), 'maxwidth300', $searchCategoryProductOperator, 0, 0, $tmptitle); } - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + if (isModEnabled('categorie') && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300 widthcentpercentminusx' : 'maxwidth250 widthcentpercentminusx')); $moreforfilter .= '
    '; } - if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { + if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $moreforfilter .= '
    '; @@ -1082,7 +1151,7 @@ if ($resql) { $moreforfilter .= '
    '; } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -1096,13 +1165,22 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
    '; print ''."\n"; print ''; + + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + if (!empty($arrayfields['p.ref']['checked'])) { print ''; } // Payment mode if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { print ''; } if (!empty($arrayfields['p.total_ht']['checked'])) { @@ -1331,7 +1409,7 @@ if ($resql) { // Fields from hook $parameters = array('arrayfields'=>$arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['p.datec']['checked'])) { @@ -1361,15 +1439,16 @@ if ($resql) { // Status if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; } // Action column - print ''; - + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } print "\n"; $totalarray = array( @@ -1383,6 +1462,9 @@ if ($resql) { // Fields title print ''; + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + } if (!empty($arrayfields['p.ref']['checked'])) { print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); } @@ -1411,22 +1493,22 @@ if ($resql) { 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); + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'class="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); + print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'class="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); + print_liste_field_titre($arrayfields['p.date']['label'], $_SERVER["PHP_SELF"], 'p.datep', '', $param, 'class="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); + print_liste_field_titre($arrayfields['p.fin_validite']['label'], $_SERVER["PHP_SELF"], 'dfv', '', $param, 'class="center"', $sortfield, $sortorder); } if (!empty($arrayfields['p.date_livraison']['checked'])) { - print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'p.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'p.date_livraison', '', $param, 'class="center"', $sortfield, $sortorder); } if (!empty($arrayfields['p.date_signature']['checked'])) { - print_liste_field_titre($arrayfields['p.date_signature']['label'], $_SERVER["PHP_SELF"], 'p.date_signature', '', $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['p.date_signature']['label'], $_SERVER["PHP_SELF"], 'p.date_signature', '', $param, 'class="center"', $sortfield, $sortorder); } if (!empty($arrayfields['ava.rowid']['checked'])) { print_liste_field_titre($arrayfields['ava.rowid']['label'], $_SERVER["PHP_SELF"], 'availability', '', $param, '', $sortfield, $sortorder); @@ -1480,7 +1562,7 @@ if ($resql) { print_liste_field_titre($arrayfields['p.multicurrency_total_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); } if (!empty($arrayfields['u.login']['checked'])) { - print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'class="center"', $sortfield, $sortorder); } if (!empty($arrayfields['sale_representative']['checked'])) { print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder); @@ -1507,7 +1589,8 @@ if ($resql) { 'sortorder' => $sortorder, 'totalarray' => &$totalarray, ); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['p.datec']['checked'])) { @@ -1528,7 +1611,9 @@ if ($resql) { if (!empty($arrayfields['p.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + } print ''."\n"; $now = dol_now(); @@ -1536,7 +1621,7 @@ if ($resql) { $typenArray = null; $with_margin_info = false; - if (!empty($conf->margin->enabled) && ( + if (isModEnabled('margin') && ( !empty($arrayfields['total_pa']['checked']) || !empty($arrayfields['total_margin']['checked']) || !empty($arrayfields['total_margin_rate']['checked']) @@ -1551,8 +1636,9 @@ if ($resql) { $savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; - $last_num = min($num, $limit); - while ($i < $last_num) { + + $imaxinloop = ($limit ? min($num, $limit) : $num); + while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); $objectstatic->id = $obj->rowid; @@ -1567,6 +1653,7 @@ if ($resql) { $companystatic->name = $obj->name; $companystatic->name_alias = $obj->alias; $companystatic->client = $obj->client; + $companystatic->fournisseur = $obj->fournisseur; $companystatic->code_client = $obj->code_client; $companystatic->email = $obj->email; $companystatic->phone = $obj->phone; @@ -1612,6 +1699,22 @@ if ($resql) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['p.ref']['checked'])) { print ''; if (!$i) { $totalarray['nbfield']++; @@ -1670,7 +1773,7 @@ if ($resql) { // Project label print ''; if (!$i) { @@ -1681,7 +1784,7 @@ if ($resql) { // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { print ''; if (!$i) { $totalarray['nbfield']++; @@ -1849,7 +1952,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht'; } - $totalarray['val']['p.total_ht'] += $obj->total_ht; + if (empty($totalarray['val']['p.total_ht'])) { + $totalarray['val']['p.total_ht'] = $obj->total_ht; + } else { + $totalarray['val']['p.total_ht'] += $obj->total_ht; + } } // Amount VAT if (!empty($arrayfields['p.total_tva']['checked'])) { @@ -1860,7 +1967,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_tva'; } - $totalarray['val']['p.total_tva'] += $obj->total_tva; + if (empty($totalarray['val']['p.total_tva'])) { + $totalarray['val']['p.total_tva'] = $obj->total_tva; + } else { + $totalarray['val']['p.total_tva'] += $obj->total_tva; + } } // Amount TTC if (!empty($arrayfields['p.total_ttc']['checked'])) { @@ -1871,7 +1982,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ttc'; } - $totalarray['val']['p.total_ttc'] += $obj->total_ttc; + if (empty($totalarray['val']['p.total_ttc'])) { + $totalarray['val']['p.total_ttc'] = $obj->total_ttc; + } else { + $totalarray['val']['p.total_ttc'] += $obj->total_ttc; + } } // Amount invoiced HT if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) { @@ -1882,7 +1997,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced'; } - $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT; + if (empty($totalarray['val']['p.total_ht_invoiced'])) { + $totalarray['val']['p.total_ht_invoiced'] = $totalInvoicedHT; + } else { + $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT; + } } // Amount invoiced TTC if (!empty($arrayfields['p.total_invoiced']['checked'])) { @@ -1893,7 +2012,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced'; } - $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC; + if (empty($totalarray['val']['p.total_invoiced'])) { + $totalarray['val']['p.total_invoiced'] = $totalInvoicedTTC; + } else { + $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC; + } } // Currency if (!empty($arrayfields['p.multicurrency_code']['checked'])) { @@ -2056,7 +2179,7 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate'; } - if ($i >= $last_num - 1) { + if ($i >= $imaxinloop - 1) { if (!empty($total_ht)) { $totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT'); } else { @@ -2069,7 +2192,7 @@ if ($resql) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['p.datec']['checked'])) { @@ -2124,19 +2247,22 @@ if ($resql) { } } // Action column - print ''; + if (!$i) { + $totalarray['nbfield']++; } - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; } + print ''."\n"; $i++; @@ -2159,7 +2285,7 @@ if ($resql) { $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; print ''; @@ -1224,13 +1302,13 @@ if ($resql) { // Payment term if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { print ''; - $form->select_conditions_paiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); print ''; - $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); print ''; - $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut'); + $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut', 'search_status maxwidth125 onrightofpage'); print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - 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 ''; @@ -1647,7 +1750,7 @@ if ($resql) { if (!empty($arrayfields['p.ref_client']['checked'])) { // Customer ref print ''; - print $obj->ref_client; + print dol_escape_htmltag($obj->ref_client); print ''; if ($obj->project_id > 0) { - print $projectstatic->title; + print dol_escape_htmltag($projectstatic->title); } print ''; - print $companystatic->getNomUrl(1, 'customer'); + print $companystatic->getNomUrl(1, 'customer', 0, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); 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; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + 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 '
    '."\n"; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 7e40552fefb..fe4895ad2f8 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -26,10 +26,11 @@ * \brief Fiche d'information sur une proposition commerciale */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -58,12 +59,14 @@ $hookmanager->initHooks(array('propalnote')); restrictedArea($user, 'propal', $object->id, 'propal'); +$usercancreate = $user->hasRight("propal", "creer"); + /* * Actions */ -$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote = $user->rights->propal->creer; // Used by the include of actions_setnotes.inc.php $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -81,8 +84,9 @@ if (empty($reshook)) { $form = new Form($db); -$title = $langs->trans('Proposal')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; + llxHeader('', $title, $help_url); if ($object->id > 0) { @@ -105,37 +109,25 @@ 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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 576285594b4..db85490e1bb 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -26,6 +26,7 @@ * \brief Page des stats propositions commerciales */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -51,7 +52,7 @@ if ($user->socid > 0) { $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; @@ -59,7 +60,7 @@ $endyear = $year; // Load translation files required by the page $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal')); -if ($mode == 'customer' && !$user->rights->propale->lire) { +if ($mode == 'customer' && !$user->rights->propal->lire) { accessforbidden(); } if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) { diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 613f06a6feb..37c0f8d5e58 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { print '
    '.$objectlink->ref_client.''.dol_print_date($objectlink->date, 'day').''; - if ($user->rights->propale->lire) { + if ($user->rights->propal->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index e63aee6f240..19bde7072ad 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -24,6 +24,7 @@ * \brief Home page of propest area */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; @@ -59,7 +60,7 @@ print load_fiche_titre($langs->trans("ProspectionArea")); print '
    '; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { $var = false; print '
    '; print ''; @@ -118,7 +119,7 @@ if ($resql) { /* * Liste des propal brouillons */ -if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { +if (isModEnabled("propal") && $user->rights->propal->lire) { $sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; @@ -176,7 +177,7 @@ if (isModEnabled('agenda')) { /* * Dernieres propales ouvertes */ -if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { +if (isModEnabled("propal") && $user->rights->propal->lire) { $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,"; $sql .= " p.rowid as propalid, p.total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index da37fe1048c..60295558621 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -22,6 +22,7 @@ * \brief Page de fiche recap client */ +// Load Dolibarr environment 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'; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index cdd8fefc4b0..4da58a6bd91 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -22,6 +22,7 @@ * \brief Page to edit relative discount of a customer */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index db1cc06c504..fe8c630fc10 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -26,6 +26,7 @@ if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +// Load Dolibarr environment 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'; @@ -52,6 +53,9 @@ if ($user->socid > 0) { } $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); +$permissiontocreate = ($user->rights->societe->creer || $user->rights->facture->creer); + + /* * Actions @@ -62,7 +66,7 @@ if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { exit; } -if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && ($user->rights->societe->creer || $user->rights->facture->creer)) { +if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $permissiontocreate) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) @@ -153,16 +157,17 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && ($user } } -if ($action == 'setremise' && ($user->rights->societe->creer || $user->rights->facture->creer)) { +if ($action == 'setremise' && $permissiontocreate) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) - $amount_ht = price2num(GETPOST('amount_ht', 'alpha')); + $amount = price2num(GETPOST('amount', 'alpha'), '', 2); $desc = GETPOST('desc', 'alpha'); $tva_tx = GETPOST('tva_tx', 'alpha'); $discount_type = GETPOSTISSET('discount_type') ? GETPOST('discount_type', 'alpha') : 0; + $price_base_type = GETPOST('price_base_type', 'alpha'); - if ($amount_ht > 0) { + if ($amount > 0) { $error = 0; if (empty($desc)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReasonDiscount")), null, 'errors'); @@ -172,14 +177,14 @@ if ($action == 'setremise' && ($user->rights->societe->creer || $user->rights->f if (!$error) { $soc = new Societe($db); $soc->fetch($id); - $discountid = $soc->set_remise_except($amount_ht, $user, $desc, $tva_tx, $discount_type); + $discountid = $soc->set_remise_except($amount, $user, $desc, $tva_tx, $discount_type, $price_base_type); if ($discountid > 0) { if (!empty($backtopage)) { - header("Location: ".$backtopage.'&discountid='.$discountid); + header("Location: ".$backtopage.'&discountid='.((int) $discountid)); exit; } else { - header("Location: remx.php?id=".$id); + header("Location: remx.php?id=".((int) $id)); exit; } } else { @@ -192,7 +197,7 @@ if ($action == 'setremise' && ($user->rights->societe->creer || $user->rights->f } } -if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' && ($user->rights->societe->creer || $user->rights->facture->creer)) { +if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' && $permissiontocreate) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) @@ -230,9 +235,8 @@ if ($socid > 0) { $isCustomer = $object->client == 1 || $object->client == 3; $isSupplier = $object->fournisseur == 1; - /* - * Display tabs - */ + // Display tabs + $head = societe_prepare_head($object); print ''; @@ -261,6 +265,7 @@ if ($socid > 0) { } + print '
    '; print ''; if ($isCustomer) { // Calcul avoirs client en cours @@ -323,9 +328,10 @@ if ($socid > 0) { } print '
    '; - print '
    '; + print '
    '; // close fichecenter + print dol_get_fiche_end(); @@ -345,6 +351,8 @@ if ($socid > 0) { print dol_get_fiche_head(); + + print '
    '; print ''; if ($isCustomer && $isSupplier) { print ''; @@ -352,9 +360,19 @@ if ($socid > 0) { print '   '; print ''; } - print ''; - print ''; + print ''; + + // Price base (HT / TTC) + print ''; + print ''; + + // VAT print ''; print ''; print "
    '.$langs->trans('DiscountType').'
    '.$langs->trans("AmountHT").''; + + // Amount + print '
    '.$langs->trans("Amount").''; print ' '.$langs->trans("Currency".$conf->currency).'
    '.$langs->trans("PriceBase").''; + print $form->selectPriceBaseType(GETPOST("price_base_type"), "price_base_type"); + print '
    '.$langs->trans("VAT").''; print $form->load_tva('tva_tx', GETPOSTISSET('tva_tx') ? GETPOST('tva_tx', 'alpha') : 0, $mysoc, $object, 0, 0, '', 0, 1); @@ -363,6 +381,7 @@ if ($socid > 0) { print '
    "; + print '
    '; print dol_get_fiche_end(); } @@ -424,12 +443,12 @@ if ($socid > 0) { print '
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -503,7 +522,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { $colspan += 2; } print '
    '.$langs->trans("None").'
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -641,7 +660,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { $colspan += 2; } print '
    '.$langs->trans("None").'
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -825,7 +844,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { $colspan += 2; } print '
    '.$langs->trans("None").'
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -986,7 +1005,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicompany')) { $colspan += 2; } print '
    '.$langs->trans("None").'
    '; - print img_picto('', 'company').$form->select_company('', 'socid', '((s.client = 1 OR s.client = 2 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); + print img_picto('', 'company').$form->select_company('', 'socid', '((s.client = 1 OR s.client = 2 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print ' - ' - ); + + ' + ); + } } } @@ -2150,7 +2231,7 @@ if ($action == 'create' && $usercancreate) { $text = $langs->trans('ConfirmUnvalidateOrder', $object->ref); $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -2189,7 +2270,7 @@ if ($action == 'create' && $usercancreate) { $text = $langs->trans('ConfirmCancelOrder', $object->ref); $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -2243,41 +2324,30 @@ if ($action == 'create' && $usercancreate) { $morehtmlref = '
    '; // Ref customer $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.$conf->global->THIRDPARTY_REF_INPUT_SIZE : ''), '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1, 'customer'); + $morehtmlref .= '
    '.$soc->getNomUrl(1, 'customer'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { $morehtmlref .= ' ('.$langs->trans("OtherOrders").')'; } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; + $morehtmlref .= '
    '; if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); - $morehtmlref .= ''; - $morehtmlref .= ''; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -2402,7 +2472,7 @@ if ($action == 'create' && $usercancreate) { } // Warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { $langs->load('stocks'); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -2458,7 +2528,7 @@ if ($action == 'create' && $usercancreate) { print '
    '; @@ -2529,7 +2599,7 @@ if ($action == 'create' && $usercancreate) { // TODO How record was recorded OrderMode (llx_c_input_method) // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '
    '; $editenable = $usercancreate; print $form->editfieldkey("IncotermLabel", 'incoterm', '', $object, $editenable); @@ -2544,7 +2614,7 @@ if ($action == 'create' && $usercancreate) { } // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && !empty($conf->banque->enabled)) { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && isModEnabled("banque")) { print '
    '; $editenable = $usercancreate; print $form->editfieldkey("BankAccount", 'bankaccount', '', $object, $editenable); @@ -2569,7 +2639,7 @@ if ($action == 'create' && $usercancreate) { print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { + if (isModEnabled("multicurrency") && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -2616,7 +2686,7 @@ if ($action == 'create' && $usercancreate) { print '
    '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).''.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '; // Margin Infos - if (!empty($conf->margin->enabled)) { + if (isModEnabled('margin')) { $formmargin->displayMarginInfos($object); } @@ -2641,9 +2711,16 @@ if ($action == 'create' && $usercancreate) { /* * Lines */ + + // Get object lines $result = $object->getLinesArray(); - print '
    + // Add products/services form + //$forceall = 1; + global $inputalsopricewithtax; + $inputalsopricewithtax = 1; + + print ' @@ -2705,7 +2782,7 @@ if ($action == 'create' && $usercancreate) { if (empty($user->socid)) { if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); } else { print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } @@ -2721,7 +2798,7 @@ if ($action == 'create' && $usercancreate) { print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=modif&token='.newToken().'&id='.$object->id, ''); } // Create event - /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) + /*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) { // Add hidden condition because this is not a // "workflow" action so should appears somewhere else on @@ -2731,7 +2808,7 @@ if ($action == 'create' && $usercancreate) { // Create a purchase order if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_SALE_ORDER)) { - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { if ($usercancreatepurchaseorder) { print dolGetButtonAction('', $langs->trans('AddPurchaseOrder'), 'default', DOL_URL_ROOT.'/fourn/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); } @@ -2739,11 +2816,11 @@ if ($action == 'create' && $usercancreate) { } // Create intervention - if (!empty($conf->ficheinter->enabled)) { + if (isModEnabled('ficheinter')) { $langs->load("interventions"); if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { - if ($user->rights->ficheinter->creer) { + if ($user->hasRight('ficheinter', 'creer')) { print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); } else { print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('AddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false); @@ -2752,10 +2829,10 @@ if ($action == 'create' && $usercancreate) { } // Create contract - if (!empty($conf->contrat->enabled) && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) { + if (isModEnabled('contrat') && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) { $langs->load("contracts"); - if ($user->rights->contrat->creer) { + if ($user->hasRight('contrat', 'creer')) { print dolGetButtonAction('', $langs->trans('AddContract'), 'default', DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); } } @@ -2767,7 +2844,7 @@ if ($action == 'create' && $usercancreate) { if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { if ((isModEnabled('expedition_bon') && $user->rights->expedition->creer) || ($conf->delivery_note->enabled && $user->rights->expedition->delivery->creer)) { - if ($user->rights->expedition->creer) { + if ($user->hasRight('expedition', 'creer')) { print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, ''); } else { print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false); @@ -2786,7 +2863,7 @@ if ($action == 'create' && $usercancreate) { // Create bill and Classify billed // Note: Even if module invoice is not enabled, we should be able to use button "Classified billed" if ($object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) { - if (isModEnabled('facture') && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { + if (isModEnabled('facture') && $user->hasRight('facture', 'creer') && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&token='.newToken().'&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); } if ($usercancreate && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { @@ -2811,7 +2888,7 @@ if ($action == 'create' && $usercancreate) { // Delete order if ($usercandelete) { if ($numshipping == 0) { - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); } else { print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } @@ -2849,7 +2926,7 @@ if ($action == 'create' && $usercancreate) { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList); // Show online payment link - $useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)); + $useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox')); if (!empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) { $useonlinepayment = 0; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c2c4eada0b2..73988594e6f 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -31,7 +31,7 @@ /** * \file htdocs/commande/class/commande.class.php * \ingroup commande - * \brief Fichier des classes de commandes + * \brief class for orders */ include_once DOL_DOCUMENT_ROOT.'/core/class/commonorder.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; @@ -93,21 +93,15 @@ class Commande extends CommonOrder protected $table_ref_field = 'ref'; /** - * @var int Thirparty ID + * @var int Thirdparty ID */ public $socid; /** - * @var string Thirparty ref of order + * @var string Thirdparty ref of order */ public $ref_client; - /** - * @var string Internal ref for order - * @deprecated - */ - public $ref_int; - /** * @var int Contact ID */ @@ -311,10 +305,9 @@ class Commande extends CommonOrder 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20, 'index'=>1), 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>26), - 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>27), // deprecated 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>28), 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'notnull'=>1, 'position'=>20), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>25), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>25), 'date_commande' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>1, 'position'=>60), 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>62), 'date_cloture' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>65), @@ -348,12 +341,12 @@ class Commande extends CommonOrder 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>225), 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>230), 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>235), - 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>240), - 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCurrency', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>245), - 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>250, 'isameasure'=>1), - 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>255, 'isameasure'=>1), - 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>260, 'isameasure'=>1), - 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'$conf->multicurrency->enabled', 'visible'=>-1, 'position'=>265, 'isameasure'=>1), + 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>240), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCurrency', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>245), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>250, 'isameasure'=>1), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>255, 'isameasure'=>1), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>260, 'isameasure'=>1), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>265, 'isameasure'=>1), 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270), 'module_source' =>array('type'=>'varchar(32)', 'label'=>'POSModule', 'enabled'=>1, 'visible'=>-1, 'position'=>275), 'pos_source' =>array('type'=>'varchar(32)', 'label'=>'POSTerminal', 'enabled'=>1, 'visible'=>-1, 'position'=>280), @@ -521,7 +514,7 @@ class Commande extends CommonOrder if (!$error) { // If stock is incremented on validate order, we must increment it - if ($result >= 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { + if ($result >= 0 && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -649,7 +642,7 @@ class Commande extends CommonOrder } // If stock is decremented on validate order, we must reincrement it - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { $result = 0; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; @@ -834,7 +827,7 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::cancel", LOG_DEBUG); if ($this->db->query($sql)) { // If stock is decremented on validate order, we must reincrement it - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -945,7 +938,7 @@ class Commande extends CommonOrder $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande ("; - $sql .= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_ext, ref_client, ref_int"; + $sql .= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_ext, ref_client"; $sql .= ", model_pdf, fk_cond_reglement, deposit_percent, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address"; $sql .= ", fk_shipping_method"; $sql .= ", fk_warehouse"; @@ -964,10 +957,9 @@ class Commande extends CommonOrder $sql .= ", '".$this->db->escape($this->note_public)."'"; $sql .= ", ".($this->ref_ext ? "'".$this->db->escape($this->ref_ext)."'" : "null"); $sql .= ", ".($this->ref_client ? "'".$this->db->escape($this->ref_client)."'" : "null"); - $sql .= ", ".($this->ref_int ? "'".$this->db->escape($this->ref_int)."'" : "null"); $sql .= ", '".$this->db->escape($this->model_pdf)."'"; $sql .= ", ".($this->cond_reglement_id > 0 ? ((int) $this->cond_reglement_id) : "null"); - $sql .= ", ".(! empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null"); + $sql .= ", ".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null"); $sql .= ", ".($this->mode_reglement_id > 0 ? ((int) $this->mode_reglement_id) : "null"); $sql .= ", ".($this->fk_account > 0 ? ((int) $this->fk_account) : 'NULL'); $sql .= ", ".($this->availability_id > 0 ? ((int) $this->availability_id) : "null"); @@ -1782,7 +1774,7 @@ class Commande extends CommonOrder $this->lines[] = $line; /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE - if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { $prod = new Product($this->db); $prod->fetch($idproduct); @@ -1827,7 +1819,7 @@ class Commande extends CommonOrder $sql .= ', c.fk_shipping_method'; $sql .= ', c.fk_warehouse'; $sql .= ', c.fk_projet as fk_project, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed'; - $sql .= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams'; + $sql .= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams'; $sql .= ', c.fk_incoterms, c.location_incoterms'; $sql .= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc"; $sql .= ", c.module_source, c.pos_source"; @@ -1855,9 +1847,6 @@ class Commande extends CommonOrder if ($ref_ext) { $sql .= " AND c.ref_ext='".$this->db->escape($ref_ext)."'"; } - if ($notused) { - $sql .= " AND c.ref_int='".$this->db->escape($notused)."'"; - } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -1871,7 +1860,6 @@ class Commande extends CommonOrder $this->ref_client = $obj->ref_client; $this->ref_customer = $obj->ref_client; $this->ref_ext = $obj->ref_ext; - $this->ref_int = $obj->ref_int; $this->socid = $obj->fk_soc; $this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty @@ -2155,7 +2143,7 @@ class Commande extends CommonOrder $line->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($objp->fk_product) && !empty($loadalsotranslation)) { $tmpproduct = new Product($this->db); $tmpproduct->fetch($objp->fk_product); $tmpproduct->getMultiLangs(); @@ -3355,7 +3343,7 @@ class Commande extends CommonOrder $sql .= " fk_user_valid=".((isset($this->user_valid) && $this->user_valid > 0) ? $this->user_valid : "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 .= " deposit_percent=".(! empty($this->deposit_percent) ? strval($this->deposit_percent) : "null").","; + $sql .= " deposit_percent=".(!empty($this->deposit_percent) ? strval($this->deposit_percent) : "null").","; $sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; $sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').","; $sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").","; @@ -3407,7 +3395,7 @@ class Commande extends CommonOrder } /** - * Delete the customer order + * Delete the sales order * * @param User $user User object * @param int $notrigger 1=Does not execute triggers, 0= execute triggers @@ -3638,7 +3626,7 @@ class Commande extends CommonOrder public function LibStatut($status, $billed, $mode, $donotshowbilled = 0) { // phpcs:enable - global $langs, $conf; + global $langs, $conf, $hookmanager; $billedtext = ''; if (empty($donotshowbilled)) { @@ -3662,11 +3650,14 @@ class Commande extends CommonOrder } elseif ($status == self::STATUS_SHIPMENTONPROCESS) { $labelStatus = $langs->transnoentitiesnoconv('StatusOrderSent').$billedtext; $labelStatusShort = $langs->transnoentitiesnoconv('StatusOrderSentShort').$billedtext; - $labelTooltip = $langs->transnoentitiesnoconv("StatusOrderSent").' - '.$langs->transnoentitiesnoconv("DateDeliveryPlanned").dol_print_date($this->date_livraison).$billedtext; + $labelTooltip = $langs->transnoentitiesnoconv("StatusOrderSent"); + if (!empty($this->delivery_date)) { + $labelTooltip .= ' - '.$langs->transnoentitiesnoconv("DateDeliveryPlanned").dol_print_date($this->delivery_date, 'day').$billedtext; + } $statusType = 'status4'; } elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { - $labelStatus = $langs->transnoentitiesnoconv('StatusOrderToBill'); - $labelStatusShort = $langs->transnoentitiesnoconv('StatusOrderToBillShort'); + $labelStatus = $langs->transnoentitiesnoconv('StatusOrderToBill'); // translated into Delivered + $labelStatusShort = $langs->transnoentitiesnoconv('StatusOrderToBillShort'); // translated into Delivered $statusType = 'status4'; } elseif ($status == self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { $labelStatus = $langs->transnoentitiesnoconv('StatusOrderProcessed').$billedtext; @@ -3683,6 +3674,19 @@ class Commande extends CommonOrder $mode = 0; } + $parameters = array( + 'status' => $status, + 'mode' => $mode, + 'billed' => $billed, + 'donotshowbilled' => $donotshowbilled + ); + + $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook + + if ($reshook > 0) { + return $hookmanager->resPrint; + } + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', array('tooltip' => $labelTooltip)); } @@ -3710,7 +3714,7 @@ class Commande extends CommonOrder $result = ''; - if (!empty($conf->expedition->enabled) && ($option == '1' || $option == '2')) { + if (isModEnabled("expedition") && ($option == '1' || $option == '2')) { $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id; } else { $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id; @@ -4071,7 +4075,7 @@ class Commande extends CommonOrder } /** - * Is the customer order delayed? + * Is the sales order delayed? * * @return bool true if late, false if not */ @@ -4209,6 +4213,12 @@ class OrderLine extends CommonOrderLine $result = $this->db->query($sql); if ($result) { $objp = $this->db->fetch_object($result); + + if (!$objp) { + $this->error = 'OrderLine with id '. $rowid .' not found sql='.$sql; + return 0; + } + $this->rowid = $objp->rowid; $this->id = $objp->rowid; $this->fk_commande = $objp->fk_commande; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index ca20b879e65..3070f82c98d 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -106,9 +106,7 @@ class CommandeStats extends Stats } if ($categid) { - $this->join .= ' LEFT JOIN '.$this->categ_link.' as cats ON cats.fk_soc = c.fk_soc'; - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie'; - $this->where .= ' AND cat.rowid = '.((int) $categid); + $this->where .= ' AND EXISTS (SELECT rowid FROM '.$this->categ_link.' as cats WHERE cats.fk_soc = c.fk_soc AND cats.fk_categorie = '.((int) $categid).')'; } } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 5f4de8b59a0..04c16e68aa0 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Patrick Rouillon * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2022 Philippe Grand * Copyright (C) 2021 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -25,6 +25,7 @@ * \brief Onglet de gestion des contacts de commande */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -46,8 +47,11 @@ if ($user->socid) { } $result = restrictedArea($user, 'commande', $id, ''); +$usercancreate = $user->hasRight("commande", "creer"); + $object = new Commande($db); + /* * Ajout d'un nouveau contact */ @@ -96,10 +100,6 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('ContactsAddresses'); -$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; -llxHeader('', $title, $help_url); - $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -117,6 +117,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; + llxHeader('', $title, $help_url); + $head = commande_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order'); @@ -129,37 +133,25 @@ 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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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->thirdparty->id, $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->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index e181cc03c6a..a6eb116f17d 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -26,6 +26,7 @@ * \brief Show list of customers to add an new invoice from orders */ +// Load Dolibarr environment 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'; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index d85400243e7..0c35c3489f7 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -26,13 +26,14 @@ * \brief Management page of documents attached to an order */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.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.'/commande/class/commande.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -72,7 +73,8 @@ if (!$sortfield) { $object = new Commande($db); -$permissiontoadd = $user->rights->commande->creer; +$usercancreate = $user->hasRight("commande", "creer"); +$permissiontoadd = $usercancreate; // Security check if ($user->socid) { @@ -96,7 +98,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); @@ -128,37 +130,25 @@ 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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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->thirdparty->id, $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->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 03644fe5690..9b653b90e65 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -22,9 +22,11 @@ /** * \file htdocs/commande/index.php * \ingroup commande - * \brief Home page of customer order module + * \brief Home page of sales order module */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; @@ -32,6 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('orders', 'bills')); + + if (!$user->rights->commande->lire) { accessforbidden(); } @@ -41,8 +48,6 @@ $hookmanager = new HookManager($db); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('ordersindex')); -// Load translation files required by the page -$langs->loadLangs(array('orders', 'bills')); // Security check $socid = GETPOST('socid', 'int'); @@ -87,7 +92,7 @@ if ($tmp) { /* * Draft orders */ -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; @@ -239,7 +244,7 @@ $max = 10; /* * Orders to process */ -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; @@ -328,7 +333,7 @@ if (!empty($conf->commande->enabled)) { /* * Orders that are in process */ -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 93b80b80f1c..0acc5b793aa 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -23,11 +23,12 @@ * \brief Sale Order info page */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -49,6 +50,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'commande', $comid, ''); +$usercancreate = $user->hasRight("commande", "creer"); + $object = new Commande($db); if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); @@ -81,37 +84,25 @@ $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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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->thirdparty->id, $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->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 29ad812f6e6..e6338903f43 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -33,6 +33,8 @@ * \brief Page to list orders */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -40,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; } require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; @@ -49,8 +51,9 @@ 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', 'stocks', 'products')); +$langs->loadLangs(array('orders', 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products')); +// Get Parameters $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); @@ -58,6 +61,7 @@ $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'orderlist'; +// Search Parameters $search_datecloture_start = GETPOST('search_datecloture_start', 'int'); if (empty($search_datecloture_start)) { $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int')); @@ -70,29 +74,34 @@ $search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_start_mo $search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_end_month', 'int'), GETPOST('search_dateorder_end_day', 'int'), GETPOST('search_dateorder_end_year', 'int')); $search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_start_month', 'int'), GETPOST('search_datedelivery_start_day', 'int'), GETPOST('search_datedelivery_start_year', 'int')); $search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_end_month', 'int'), GETPOST('search_datedelivery_end_day', 'int'), GETPOST('search_datedelivery_end_year', 'int')); + $search_product_category = GETPOST('search_product_category', 'int'); $search_ref = GETPOST('search_ref', 'alpha') != '' ?GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); $search_company_alias = GETPOST('search_company_alias', 'alpha'); +$search_parent_name = trim(GETPOST('search_parent_name', 'alphanohtml')); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = GETPOST("search_state", 'alpha'); -$search_country = GETPOST("search_country", 'int'); -$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); +$search_state = GETPOST('search_state', 'alpha'); +$search_country = GETPOST('search_country', 'int'); +$search_type_thirdparty = GETPOST('search_type_thirdparty', 'int'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $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_total_ht = GETPOST('search_total_ht', 'alpha'); $search_total_vat = GETPOST('search_total_vat', 'alpha'); $search_total_ttc = GETPOST('search_total_ttc', 'alpha'); $search_warehouse = GETPOST('search_warehouse', 'int'); + $search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha'); $search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha'); -$search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); +$search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); + $search_login = GETPOST('search_login', 'alpha'); $search_categ_cus = GETPOST("search_categ_cus", 'int'); $optioncss = GETPOST('optioncss', 'alpha'); @@ -103,10 +112,11 @@ $search_remove_btn = GETPOST('button_removefilter', 'alpha'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_shippable = GETPOST('search_shippable', 'aZ09'); -$search_fk_cond_reglement = GETPOST("search_fk_cond_reglement", 'int'); -$search_fk_shipping_method = GETPOST("search_fk_shipping_method", 'int'); -$search_fk_mode_reglement = GETPOST("search_fk_mode_reglement", 'int'); -$search_fk_input_reason = GETPOST("search_fk_input_reason", 'int'); + +$search_fk_cond_reglement = GETPOST('search_fk_cond_reglement', 'int'); +$search_fk_shipping_method = GETPOST('search_fk_shipping_method', 'int'); +$search_fk_mode_reglement = GETPOST('search_fk_mode_reglement', 'int'); +$search_fk_input_reason = GETPOST('search_fk_input_reason', 'int'); // Security check $id = (GETPOST('orderid') ?GETPOST('orderid', 'int') : GETPOST('id', 'int')); @@ -165,10 +175,11 @@ $checkedtypetiers = 0; $arrayfields = array( 'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5), 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>20), - 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>25), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>20), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>25), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31), + 's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0), 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35), 's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), @@ -176,34 +187,35 @@ $arrayfields = array( 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55), 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60), 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65), - 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)), + 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("expedition")), 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67), 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68), 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69), 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), - 'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>90), - 'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>95), - 'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>100), - 'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>105), - 'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>110), + 'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>90), + 'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>95), + 'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>100), + 'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>105), + 'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>110), 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115), 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116), - 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), - 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), + 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)), + 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)), + 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)), + 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120), 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125), 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130), - 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135), - 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140), - 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>990), + 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135), + 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140), + 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("expedition")), 'position'=>990), 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995), 'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999), 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) ); + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -243,6 +255,7 @@ if (empty($reshook)) { $search_ref_customer = ''; $search_company = ''; $search_company_alias = ''; + $search_parent_name = ''; $search_town = ''; $search_zip = ""; $search_state = ""; @@ -285,19 +298,19 @@ if (empty($reshook)) { // Mass actions $objectclass = 'Commande'; $objectlabel = 'Orders'; - $permissiontoread = $user->rights->commande->lire; - $permissiontoadd = $user->rights->commande->creer; - $permissiontodelete = $user->rights->commande->supprimer; + $permissiontoread = $user->hasRight("commande", "lire"); + $permissiontoadd = $user->hasRight("commande", "creer"); + $permissiontodelete = $user->hasRight("commande", "supprimer"); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $permissiontovalidate = $user->rights->commande->order_advance->validate; - $permissiontoclose = $user->rights->commande->order_advance->close; - $permissiontocancel = $user->rights->commande->order_advance->annuler; - $permissiontosendbymail = $user->rights->commande->order_advance->send; + $permissiontovalidate = $user->hasRight("commande", "order_advance", "validate"); + $permissiontoclose = $user->hasRight("commande", "order_advance", "close"); + $permissiontocancel = $user->hasRight("commande", "order_advance", "annuler"); + $permissiontosendbymail = $user->hasRight("commande", "order_advance", "send"); } else { - $permissiontovalidate = $user->rights->commande->creer; - $permissiontoclose = $user->rights->commande->creer; - $permissiontocancel = $user->rights->commande->creer; - $permissiontosendbymail = $user->rights->commande->creer; + $permissiontovalidate = $user->hasRight("commande", "creer"); + $permissiontoclose = $user->hasRight("commande", "creer"); + $permissiontocancel = $user->hasRight("commande", "creer"); + $permissiontosendbymail = $user->hasRight("commande", "creer"); } $uploaddir = $conf->commande->multidir_output[$conf->entity]; $triggersendname = 'ORDER_SENTBYMAIL'; @@ -719,6 +732,7 @@ if ($action == 'shipped' && $permissiontoadd) { } } } + // Closed records if (!$error && $massaction === 'setbilled' && $permissiontoclose) { $db->begin(); @@ -755,32 +769,39 @@ if (!$error && $massaction === 'setbilled' && $permissiontoclose) { } } + /* * View */ + $now = dol_now(); $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formmargin = null; -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { $formmargin = new FormMargin($db); } $companystatic = new Societe($db); +$company_url_list = array(); $formcompany = new FormCompany($db); $projectstatic = new Project($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $title = $langs->trans("Orders"); $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; -// llxHeader('',$title,$help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) { +if ($sall || $search_user > 0) { $sql = 'SELECT DISTINCT'; } -$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client,'; +$sql .= " s.parent as fk_parent,"; +$sql .= " s2.nom as name2,"; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " country.code as country_code,"; @@ -795,17 +816,23 @@ $sql .= ' c.fk_input_reason, c.import_key'; if (($search_categ_cus > 0) || ($search_categ_cus == -2)) { $sql .= ", cc.fk_categorie, cc.fk_soc"; } + // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } } + // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s2 ON s2.rowid = s.parent"; $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)"; @@ -816,12 +843,9 @@ $sql .= ', '.MAIN_DB_PREFIX.'commande as c'; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; } -if ($sall || $search_product_category > 0) { +if ($sall) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; } -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."projet as p ON p.rowid = c.fk_projet"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON c.fk_user_author = u.rowid'; @@ -836,14 +860,11 @@ if ($search_user > 0) { // Add table from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= ' WHERE c.fk_soc = s.rowid'; $sql .= ' AND c.entity IN ('.getEntity('commande').')'; -if ($search_product_category > 0) { - $sql .= " AND cp.fk_categorie = ".((int) $search_product_category); -} if ($socid > 0) { $sql .= ' AND s.rowid = '.((int) $socid); } @@ -917,11 +938,18 @@ if ($search_country) { if ($search_type_thirdparty && $search_type_thirdparty != '-1') { $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); +if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); +} else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); +if ($search_parent_name) { + $sql .= natural_search('s2.nom', $search_parent_name); } if ($search_sale > 0) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); @@ -983,34 +1011,73 @@ if ($search_fk_mode_reglement > 0) { if ($search_fk_input_reason > 0) { $sql .= " AND c.fk_input_reason = ".((int) $search_fk_input_reason); } - +// Search for tag/category ($searchCategoryProductList is an array of ID) +$searchCategoryProductOperator = -1; +$searchCategoryProductList = array($search_product_category); +if (!empty($searchCategoryProductList)) { + $searchCategoryProductSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProductList as $searchCategoryProduct) { + if (intval($searchCategoryProduct) == -2) { + $searchCategoryProductSqlList[] = "NOT EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product)"; + } elseif (intval($searchCategoryProduct) > 0) { + if ($searchCategoryProductOperator == 0) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); + } + } + } + if ($listofcategoryid) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProductOperator == 1) { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProductSqlList).")"; + } + } else { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProductSqlList).")"; + } + } +} // 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); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add HAVING from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$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); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} //print $sql; $resql = $db->query($sql); @@ -1107,6 +1174,9 @@ if ($resql) { if ($search_company_alias) { $param .= '&search_company_alias='.urlencode($search_company_alias); } + if ($search_parent_name != '') { + $param .= '&search_parent_name='.urlencode($search_parent_name); + } if ($search_ref_customer) { $param .= '&search_ref_customer='.urlencode($search_ref_customer); } @@ -1197,7 +1267,7 @@ if ($resql) { // Add $param from hooks $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; // List of mass actions available @@ -1217,7 +1287,7 @@ if ($resql) { if ($permissiontocancel) { $arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel"); } - if ($user->rights->facture->creer) { + if (isModEnabled('facture') && $user->hasRight("facture", "creer")) { $arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer"); } if ($permissiontoclose) { @@ -1269,9 +1339,9 @@ if ($resql) { if ($massaction == 'createbills') { print ''; - print ''; + print '
    '; print ''; - print ''; print ''; print ''; print '
    '; + print ''; print $langs->trans('DateInvoice'); print ''; @@ -1291,7 +1361,7 @@ if ($resql) { print $langs->trans('ValidateInvoices'); print ''; - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { print $form->selectyesno('validate_invoices', 0, 1, 1); $langs->load("errors"); print ' ('.$langs->trans("WarningAutoValNotPossibleWhenStockIsDecreasedOnInvoiceVal").')'; @@ -1307,12 +1377,11 @@ if ($resql) { print '
    '; - print '
    '; print '
    '; print ' '; print ''; print '
    '; - print '
    '; + print '

    '; } if ($sall) { @@ -1324,8 +1393,8 @@ if ($resql) { $moreforfilter = ''; - // If the user can view prospects other than his' - if ($user->rights->user->user->lire) { + // If the user can view prospects? sales other than his own + if ($user->hasRight("user", "user", "lire")) { $langs->load("commercial"); $moreforfilter .= '
    '; $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); @@ -1333,14 +1402,15 @@ if ($resql) { $moreforfilter .= '
    '; } // If the user can view other users - if ($user->rights->user->user->lire) { + if ($user->hasRight("user", "user", "lire")) { $moreforfilter .= '
    '; $tmptitle = $langs->trans('LinkedToSpecificUsers'); $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx'); $moreforfilter .= '
    '; } - // If the user can view prospects other than his' - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { + + // If the user can view other products/services than his own + if (isModEnabled('categorie') && $user->hasRight("categorie", "lire") && ($user->hasRight("produit", "lire") || $user->hasRight("service", "lire"))) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('IncludingProductWithTag'); @@ -1348,14 +1418,16 @@ if ($resql) { $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1); $moreforfilter .= '
    '; } - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + // If Categories are enabled & user has rights to see + if (isModEnabled('categorie') && $user->hasRight("categorie", "lire")) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, 'maxwidth300 widthcentpercentminusx'); $moreforfilter .= '
    '; } - if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + // If Stock is enabled + if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $moreforfilter .= '
    '; @@ -1364,7 +1436,7 @@ if ($resql) { $moreforfilter .= '
    '; } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -1378,7 +1450,7 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); if (GETPOST('autoselectall', 'int')) { @@ -1395,6 +1467,14 @@ if ($resql) { print ''."\n"; print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + // Ref if (!empty($arrayfields['c.ref']['checked'])) { print ''; } + // Parent company + if (!empty($arrayfields['s2.nom']['checked'])) { + print ''; + } // Town if (!empty($arrayfields['s.town']['checked'])) { print ''; @@ -1483,13 +1569,13 @@ if ($resql) { // Payment term if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { print ''; } // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; } // Channel @@ -1498,60 +1584,61 @@ if ($resql) { $form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, '', 1); print ''; } + // Amount HT / net if (!empty($arrayfields['c.total_ht']['checked'])) { - // Amount print ''; } + // Amount of VAT if (!empty($arrayfields['c.total_vat']['checked'])) { - // Amount print ''; } + // Total Amount (TTC / gross) if (!empty($arrayfields['c.total_ttc']['checked'])) { - // Amount print ''; } + // Currency if (!empty($arrayfields['c.multicurrency_code']['checked'])) { - // Currency print ''; } + // Currency rate if (!empty($arrayfields['c.multicurrency_tx']['checked'])) { - // Currency rate print ''; } + // Amount HT/net in foreign currency if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) { - // Amount print ''; } + // VAT in foreign currency if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { - // Amount VAT print ''; } + // Amount/Total (TTC / gross) in foreign currency if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) { - // Amount print ''; } + // Author if (!empty($arrayfields['u.login']['checked'])) { - // Author print ''; } + // Sales Representative if (!empty($arrayfields['sale_representative']['checked'])) { print ''; } @@ -1571,12 +1658,15 @@ if ($resql) { 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 + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; + // Date creation if (!empty($arrayfields['c.datec']['checked'])) { print ''; } // Action column - print ''; - + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } print "\n"; // Fields title print ''; + + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + } if (!empty($arrayfields['c.ref']['checked'])) { print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); } @@ -1674,6 +1769,9 @@ if ($resql) { if (!empty($arrayfields['s.name_alias']['checked'])) { print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $param, '', $sortfield, $sortorder); } + if (!empty($arrayfields['s2.nom']['checked'])) { + print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER['PHP_SELF'], 's2.nom', '', $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); } @@ -1759,8 +1857,10 @@ if ($resql) { ), 'pos' => array(), ); + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; + // Hook fields $parameters = array( 'arrayfields' => $arrayfields, @@ -1769,7 +1869,7 @@ if ($resql) { 'sortorder' => $sortorder, 'totalarray' => &$totalarray, ); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // 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.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); @@ -1798,7 +1898,9 @@ if ($resql) { if (!empty($arrayfields['c.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); + } print ''."\n"; $total = 0; @@ -1813,7 +1915,7 @@ if ($resql) { $i = 0; $with_margin_info = false; - if (!empty($conf->margin->enabled) && ( + if (isModEnabled('margin') && ( !empty($arrayfields['total_pa']['checked']) || !empty($arrayfields['total_margin']['checked']) || !empty($arrayfields['total_margin_rate']['checked']) @@ -1825,8 +1927,10 @@ if ($resql) { $total_ht = 0; $total_margin = 0; + $savnbfield = $totalarray['nbfield']; + $totalarray = array(); + $totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); - $last_num = min($num, $limit); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); @@ -1840,6 +1944,7 @@ if ($resql) { $companystatic->name = $obj->name; $companystatic->name_alias = $obj->alias; $companystatic->client = $obj->client; + $companystatic->fournisseur = $obj->fournisseur; $companystatic->code_client = $obj->code_client; $companystatic->email = $obj->email; $companystatic->phone = $obj->phone; @@ -1848,7 +1953,7 @@ if ($resql) { $companystatic->town = $obj->town; $companystatic->country_code = $obj->country_code; if (!isset($getNomUrl_cache[$obj->socid])) { - $getNomUrl_cache[$obj->socid] = $companystatic->getNomUrl(1, 'customer'); + $getNomUrl_cache[$obj->socid] = $companystatic->getNomUrl(1, 'customer', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } $generic_commande->id = $obj->rowid; @@ -1856,7 +1961,6 @@ if ($resql) { $generic_commande->statut = $obj->fk_statut; $generic_commande->billed = $obj->billed; $generic_commande->date = $db->jdate($obj->date_commande); - $generic_commande->date_livraison = $db->jdate($obj->date_delivery); // deprecated $generic_commande->delivery_date = $db->jdate($obj->date_delivery); $generic_commande->ref_client = $obj->ref_client; $generic_commande->total_ht = $obj->total_ht; @@ -1879,6 +1983,22 @@ if ($resql) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + // Ref if (!empty($arrayfields['c.ref']['checked'])) { print '"; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Town if (!empty($arrayfields['s.town']['checked'])) { print '\n"; @@ -1980,6 +2125,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Country if (!empty($arrayfields['country.code_iso']['checked'])) { print '\n"; if (!$i) { @@ -2076,6 +2229,7 @@ if ($resql) { $totalarray['val']['c.total_ht'] = $obj->total_ht; } } + // Amount VAT if (!empty($arrayfields['c.total_vat']['checked'])) { print '\n"; @@ -2085,9 +2239,14 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'c.total_tva'; } - $totalarray['val']['c.total_tva'] += $obj->total_tva; + if (isset($totalarray['val']['c.total_tva'])) { + $totalarray['val']['c.total_tva'] += $obj->total_tva; + } else { + $totalarray['val']['c.total_tva'] = $obj->total_tva; + } } - // Amount TTC + + // Amount TTC / gross if (!empty($arrayfields['c.total_ttc']['checked'])) { print '\n"; if (!$i) { @@ -2096,7 +2255,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'c.total_ttc'; } - $totalarray['val']['c.total_ttc'] += $obj->total_ttc; + if (isset($totalarray['val']['c.total_ttc'])) { + $totalarray['val']['c.total_ttc'] += $obj->total_ttc; + } else { + $totalarray['val']['c.total_ttc'] = $obj->total_ttc; + } } // Currency @@ -2116,21 +2279,22 @@ if ($resql) { $totalarray['nbfield']++; } } - // Amount HT + + // Amount HT/net in foreign currency if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) { print '\n"; if (!$i) { $totalarray['nbfield']++; } } - // Amount VAT + // Amount VAT in foreign currency if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { print '\n"; if (!$i) { $totalarray['nbfield']++; } } - // Amount TTC + // Amount TTC / gross in foreign currency if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) { print '\n"; if (!$i) { @@ -2166,8 +2330,8 @@ if ($resql) { } } + // Sales representatives if (!empty($arrayfields['sale_representative']['checked'])) { - // Sales representatives print ''; @@ -2231,6 +2396,7 @@ if ($resql) { } $totalarray['val']['total_margin'] += $marginInfo['total_margin']; } + // Total margin rate if (!empty($arrayfields['total_margin_rate']['checked'])) { print ''; @@ -2238,6 +2404,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Total mark rate if (!empty($arrayfields['total_mark_rate']['checked'])) { print ''; @@ -2247,7 +2414,7 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate'; } - if ($i >= $last_num - 1) { + if ($i >= $imaxinloop - 1) { if (!empty($total_ht)) { $totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT'); } else { @@ -2260,7 +2427,7 @@ if ($resql) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -2316,7 +2483,7 @@ if ($resql) { // Show shippable Icon (this creates subloops, so may be slow) if (!empty($arrayfields['shippable']['checked'])) { print ''; @@ -2433,6 +2601,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Status if (!empty($arrayfields['c.fk_statut']['checked'])) { print ''; @@ -2442,17 +2611,19 @@ if ($resql) { } // Action column - print ''; + if (!$i) { + $totalarray['nbfield']++; } - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; } print "\n"; @@ -2479,7 +2650,7 @@ if ($resql) { $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; @@ -1427,6 +1507,12 @@ if ($resql) { print ''; print ''; + print ''; + print ''; - $form->select_conditions_paiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); + print $form->getSelectConditionsPaiements($search_fk_cond_reglement, 'search_fk_cond_reglement', 1, 1, 1); print ''; - $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; @@ -1643,19 +1733,24 @@ if ($resql) { -2=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort"), Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort") ); - print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'maxwidth125', 1); + print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'maxwidth125 onrightofpage', 1); print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - 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 ''; + } + if (!$i) { + $totalarray['nbfield']++; + } + print ''; @@ -1929,7 +2049,7 @@ if ($resql) { // Third party if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ''; print $getNomUrl_cache[$obj->socid]; // If module invoices enabled and user with invoice creation permissions @@ -1946,6 +2066,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Alias name if (!empty($arrayfields['s.name_alias']['checked'])) { print ''; @@ -1955,6 +2076,28 @@ if ($resql) { $totalarray['nbfield']++; } } + + // Parent company + if (!empty($arrayfields['s2.nom']['checked'])) { + print ''; + if ($obj->fk_parent > 0) { + if (!isset($company_url_list[$obj->fk_parent])) { + $companyparent = new Societe($db); + $res = $companyparent->fetch($obj->fk_parent); + if ($res > 0) { + $company_url_list[$obj->fk_parent] = $companyparent->getNomUrl(1); + } + } + if (isset($company_url_list[$obj->fk_parent])) { + print $company_url_list[$obj->fk_parent]; + } + } + print "'; @@ -1964,6 +2107,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Zip if (!empty($arrayfields['s.zip']['checked'])) { print ''; @@ -1973,6 +2117,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // State if (!empty($arrayfields['state.nom']['checked'])) { print "".$obj->state_name."'; @@ -1990,6 +2136,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Type ent if (!empty($arrayfields['typent.code']['checked'])) { print ''; @@ -2016,6 +2163,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Plannned date of delivery if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; @@ -2025,6 +2173,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Shipping Method if (!empty($arrayfields['c.fk_shipping_method']['checked'])) { print ''; @@ -2034,6 +2183,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Payment terms if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { print ''; @@ -2043,6 +2193,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; @@ -2052,6 +2203,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Channel if (!empty($arrayfields['c.fk_input_reason']['checked'])) { print ''; @@ -2061,7 +2213,8 @@ if ($resql) { $totalarray['nbfield']++; } } - // Amount HT + + // Amount HT/net if (!empty($arrayfields['c.total_ht']['checked'])) { print ''.price($obj->total_ht)."'.price($obj->total_tva)."'.price($obj->total_ttc)."'.price($obj->multicurrency_total_ht)."'.price($obj->multicurrency_total_vat)."'.price($obj->multicurrency_total_ttc)."'; if ($obj->socid > 0) { $listsalesrepresentatives = $companystatic->getSalesRepresentatives($user); @@ -2220,6 +2384,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Total margin if (!empty($arrayfields['total_margin']['checked'])) { print ''.price($marginInfo['total_margin']).''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').''; - if (!empty($show_shippable_command) && !empty($conf->stock->enabled)) { + if (!empty($show_shippable_command) && isModEnabled('stock')) { if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) { $generic_commande->getLinesArray(); // Load array ->lines $generic_commande->loadExpeditions(); // Load array ->expeditions @@ -2359,7 +2526,7 @@ if ($resql) { $stock_order = 0; $stock_order_supplier = 0; if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { // What about other options ? - if (!empty($conf->commande->enabled)) { + if (isModEnabled('commande')) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { $generic_product->load_stats_commande(0, '1,2'); $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; @@ -2368,7 +2535,7 @@ if ($resql) { } $stock_order = $generic_product->stats_commande['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { $generic_product->load_stats_commande_fournisseur(0, '3'); $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; @@ -2389,7 +2556,7 @@ if ($resql) { } else { $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { $text_info .= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier; } $text_info .= ($reliquat != $generic_commande->lines[$lig]->qty ? ' ('.$langs->trans("QtyInOtherShipments").' '.($generic_commande->lines[$lig]->qty - $reliquat).')' : ''); @@ -2426,6 +2593,7 @@ if ($resql) { $totalarray['nbfield']++; } } + // Import key if (!empty($arrayfields['c.import_key']['checked'])) { print ''.$obj->import_key.''.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).''; - 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; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + 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 '
    '."\n"; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 75d8e587ccb..e84dd5ad6e1 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -25,10 +25,11 @@ * \brief Fiche de notes sur une commande */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -51,6 +52,10 @@ $hookmanager->initHooks(array('ordernote')); $result = restrictedArea($user, 'commande', $id, ''); +$usercancreate = $user->hasRight("commande", "creer"); + +$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php + $object = new Commande($db); if (!$object->fetch($id, $ref) > 0) { @@ -58,8 +63,6 @@ if (!$object->fetch($id, $ref) > 0) { exit; } -$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php - /* * Actions @@ -77,7 +80,7 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); @@ -100,37 +103,25 @@ 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 .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 3e33ddedf57..9052ed7ab27 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -26,6 +26,7 @@ * \brief Page with customers or suppliers orders statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; @@ -64,7 +65,7 @@ if ($user->socid > 0) { $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 7da97a77c29..2f2f5816ae1 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -32,6 +32,7 @@ if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key } } +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -48,6 +49,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; +if (isModEnabled('project')) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +} + // Constant to define payment sens const PAY_DEBIT = 0; const PAY_CREDIT = 1; @@ -65,6 +71,7 @@ $date_stopMonth = GETPOST('date_stopmonth', 'int'); $date_stopYear = GETPOST('date_stopyear', 'int'); $date_stop = dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear, 'tzuserrel'); $action = GETPOST('action', 'aZ09'); +$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('comptafileslist', 'globallist')); @@ -176,6 +183,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Vendor invoices if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) { @@ -187,9 +195,10 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Expense reports - if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms'])) { + if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms']) && empty($projectid)) { if (!empty($sql)) { $sql .= " UNION ALL"; } @@ -209,6 +218,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datedon between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Payments of salaries if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) { @@ -220,6 +230,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Social contributions if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) { @@ -231,6 +242,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Various payments if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) { @@ -241,9 +253,10 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; + if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid); } // Loan payments - if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms'])) { + if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms']) && empty($projectid)) { if (!empty($sql)) { $sql .= " UNION ALL"; } @@ -438,79 +451,86 @@ if (empty($dirfortmpfile)) { if ($result && $action == "dl" && !$error) { if (!extension_loaded('zip')) { setEventMessages('PHPZIPExtentionNotLoaded', null, 'errors'); - exit; - } + } else { + dol_mkdir($dirfortmpfile); - dol_mkdir($dirfortmpfile); - - $log = $langs->transnoentitiesnoconv("Type"); - if (isModEnabled('multicompany') && is_object($mc)) { - $log .= ','.$langs->transnoentitiesnoconv("Entity"); - } - $log .= ','.$langs->transnoentitiesnoconv("Date"); - $log .= ','.$langs->transnoentitiesnoconv("DateDue"); - $log .= ','.$langs->transnoentitiesnoconv("Ref"); - $log .= ','.$langs->transnoentitiesnoconv("TotalHT"); - $log .= ','.$langs->transnoentitiesnoconv("TotalTTC"); - $log .= ','.$langs->transnoentitiesnoconv("TotalVAT"); - $log .= ','.$langs->transnoentitiesnoconv("Paid"); - $log .= ','.$langs->transnoentitiesnoconv("Document"); - $log .= ','.$langs->transnoentitiesnoconv("ItemID"); - $log .= ','.$langs->transnoentitiesnoconv("ThirdParty"); - $log .= ','.$langs->transnoentitiesnoconv("Code"); - $log .= ','.$langs->transnoentitiesnoconv("Country"); - $log .= ','.$langs->transnoentitiesnoconv("VATIntra"); - $log .= ','.$langs->transnoentitiesnoconv("Sens")."\n"; - $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc', 'tzuserrel')."-".dol_print_date($date_stop, 'dayrfc', 'tzuserrel').'_export.zip'; - - dol_delete_file($zipname); - - $zip = new ZipArchive; - $res = $zip->open($zipname, ZipArchive::OVERWRITE | ZipArchive::CREATE); - if ($res) { - foreach ($filesarray as $key => $file) { - if (!empty($file['files'])) { - foreach ($file['files'] as $filecursor) { - if (file_exists($filecursor["fullname"])) { - $zip->addFile($filecursor["fullname"], $filecursor["relpathnamelang"]); - } - } - } - - $log .= '"'.$langs->trans($file['item']).'"'; - if (isModEnabled('multicompany') && is_object($mc)) { - $log .= ',"'.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]).'"'; - } - $log .= ','.dol_print_date($file['date'], 'dayrfc'); - $log .= ','.dol_print_date($file['date_due'], 'dayrfc'); - $log .= ',"'.$file['ref'].'"'; - $log .= ','.$file['amount_ht']; - $log .= ','.$file['amount_ttc']; - $log .= ','.$file['amount_vat']; - $log .= ','.$file['paid']; - $log .= ',"'.$file["name"].'"'; - $log .= ','.$file['fk']; - $log .= ',"'.$file['thirdparty_name'].'"'; - $log .= ',"'.$file['thirdparty_code'].'"'; - $log .= ',"'.$file['country_code'].'"'; - $log .= ',"'.$file['vatnum'].'"'; - $log .= ',"'.$file['sens'].'"'; - $log .= "\n"; + $log = $langs->transnoentitiesnoconv("Type"); + if (isModEnabled('multicompany') && is_object($mc)) { + $log .= ','.$langs->transnoentitiesnoconv("Entity"); } - $zip->addFromString('transactions.csv', $log); - $zip->close(); - - // Then download the zipped file. - header('Content-Type: application/zip'); - header('Content-disposition: attachment; filename='.basename($zipname)); - header('Content-Length: '.filesize($zipname)); - readfile($zipname); + $log .= ','.$langs->transnoentitiesnoconv("Date"); + $log .= ','.$langs->transnoentitiesnoconv("DateDue"); + $log .= ','.$langs->transnoentitiesnoconv("Ref"); + $log .= ','.$langs->transnoentitiesnoconv("TotalHT"); + $log .= ','.$langs->transnoentitiesnoconv("TotalTTC"); + $log .= ','.$langs->transnoentitiesnoconv("TotalVAT"); + $log .= ','.$langs->transnoentitiesnoconv("Paid"); + $log .= ','.$langs->transnoentitiesnoconv("Document"); + $log .= ','.$langs->transnoentitiesnoconv("ItemID"); + $log .= ','.$langs->transnoentitiesnoconv("ThirdParty"); + $log .= ','.$langs->transnoentitiesnoconv("Code"); + $log .= ','.$langs->transnoentitiesnoconv("Country"); + $log .= ','.$langs->transnoentitiesnoconv("VATIntra"); + $log .= ','.$langs->transnoentitiesnoconv("Sens")."\n"; + $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc', 'tzuserrel')."-".dol_print_date($date_stop, 'dayrfc', 'tzuserrel'); + if (!empty($projectid)) { + $project = new Project($db); + $project->fetch($projectid); + if ($project->ref) { + $zipname .= '_'.$project->ref; + } + } + $zipname .='_export.zip'; dol_delete_file($zipname); - exit(); - } else { - setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors'); + $zip = new ZipArchive; + $res = $zip->open($zipname, ZipArchive::OVERWRITE | ZipArchive::CREATE); + if ($res) { + foreach ($filesarray as $key => $file) { + if (!empty($file['files'])) { + foreach ($file['files'] as $filecursor) { + if (file_exists($filecursor["fullname"])) { + $zip->addFile($filecursor["fullname"], $filecursor["relpathnamelang"]); + } + } + } + + $log .= '"'.$langs->trans($file['item']).'"'; + if (isModEnabled('multicompany') && is_object($mc)) { + $log .= ',"'.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]).'"'; + } + $log .= ','.dol_print_date($file['date'], 'dayrfc'); + $log .= ','.dol_print_date($file['date_due'], 'dayrfc'); + $log .= ',"'.$file['ref'].'"'; + $log .= ','.$file['amount_ht']; + $log .= ','.$file['amount_ttc']; + $log .= ','.$file['amount_vat']; + $log .= ','.$file['paid']; + $log .= ',"'.$file["name"].'"'; + $log .= ','.$file['fk']; + $log .= ',"'.$file['thirdparty_name'].'"'; + $log .= ',"'.$file['thirdparty_code'].'"'; + $log .= ',"'.$file['country_code'].'"'; + $log .= ',"'.$file['vatnum'].'"'; + $log .= ',"'.$file['sens'].'"'; + $log .= "\n"; + } + $zip->addFromString('transactions.csv', $log); + $zip->close(); + + // Then download the zipped file. + header('Content-Type: application/zip'); + header('Content-disposition: attachment; filename='.basename($zipname)); + header('Content-Length: '.filesize($zipname)); + readfile($zipname); + + dol_delete_file($zipname); + + exit(); + } else { + setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors'); + } } } @@ -562,11 +582,13 @@ print $form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0, '', '', ' print "\n"; // Export is for current company only +$socid = 0; if (isModEnabled('multicompany') && is_object($mc)) { $mc->getInfo($conf->entity); print '('.$langs->trans("Entity").' : '; print "
    "; if (!empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) { + $socid = $mc->id; print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true); } else { print $mc->label; @@ -577,6 +599,16 @@ if (isModEnabled('multicompany') && is_object($mc)) { print '
    '; +// Project filter +if (isModEnabled('projet')) { + $formproject = new FormProjets($db); + $langs->load('projects'); + print ''.$langs->trans('Project').":"; + print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, ''); + print ''; + print '
    '; +} + foreach ($listofchoices as $choice => $val) { if (empty($val['enabled'])) { continue; // list not qualified @@ -616,7 +648,7 @@ if (!empty($date_start) && !empty($date_stop)) { echo dol_print_date($date_start, 'day', 'tzuserrel')." - ".dol_print_date($date_stop, 'day', 'tzuserrel'); - print 'load('compta'); diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php index 09cf9709aee..a07759ad504 100644 --- a/htdocs/compta/bank/account_statement_document.php +++ b/htdocs/compta/bank/account_statement_document.php @@ -1,5 +1,4 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 5d6c2045d47..177855c9302 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -24,6 +24,7 @@ * \brief Page to report input-output of a bank account */ +// Load Dolibarr environment 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'; @@ -38,6 +39,9 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 160); $id = GETPOST('account') ?GETPOST('account', 'alpha') : GETPOST('id'); $ref = GETPOST('ref'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankannualreport', 'globalcard')); + // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); @@ -61,10 +65,6 @@ if (!$year_start) { * View */ -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("IOMonthlyReporting"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); // Get account informations @@ -82,6 +82,10 @@ $annee = ''; $totentrees = array(); $totsorties = array(); +$title = $object->ref.' - '.$langs->trans("IOMonthlyReporting"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + // Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture) // plutot que sur llx_paiement + llx_paiementfourn @@ -192,6 +196,9 @@ for ($mois = 1; $mois < 13; $mois++) { print '
    ".dol_print_date(dol_mktime(1, 1, 1, $mois, 1, 2000), "%B")." '; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 543750c16a7..b0514c71ee6 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -31,6 +31,7 @@ * \brief List of bank transactions */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -235,8 +236,12 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } +$rowids = GETPOST('rowid', 'array'); + // Conciliation -if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && !empty($user->rights->banque->consolidate) +if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) + && (GETPOST("num_releve", "alpha") || !empty($rowids)) + && !empty($user->rights->banque->consolidate) && (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) { $error = 0; @@ -512,10 +517,16 @@ $buttonreconcile = ''; $morehtmlref = ''; if ($id > 0 || !empty($ref)) { - $title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions"); - $helpurl = ""; - llxHeader('', $title, $helpurl); + $title = $object->ref.' - '.$langs->trans("Transactions"); +} else { + $title = $langs->trans("BankTransactions"); +} +$help_url = ''; +llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $param); + + +if ($id > 0 || !empty($ref)) { // Load bank groups require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; $bankcateg = new BankCateg($db); @@ -570,11 +581,8 @@ if ($id > 0 || !empty($ref)) { } } } -} else { - llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param); } - $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,"; $sql .= " b.fk_account, b.fk_type, b.fk_bordereau,"; $sql .= " ba.rowid as bankid, ba.ref as bankref"; @@ -1077,7 +1085,7 @@ if ($resql) { } if (!empty($arrayfields['type']['checked'])) { print ''; - $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100'); + print $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100', 1); print '
    '.$langs->trans($ibankey).''.$object->iban.' '; + print ''.getIbanHumanReadable($object).' '; if (!empty($object->iban)) { if (!checkIbanForAccount($object)) { print img_picto($langs->trans("IbanNotValid"), 'warning'); @@ -842,9 +837,6 @@ if ($action == 'create') { /* ************************************************************************** */ if (GETPOST('id', 'int') && $action == 'edit' && $user->rights->banque->configurer) { - $object = new Account($db); - $object->fetch(GETPOST('id', 'int')); - print load_fiche_titre($langs->trans("EditFinancialAccount"), '', 'bank_account'); if ($conf->use_javascript_ajax) { @@ -1013,7 +1005,7 @@ if ($action == 'create') { $tdextra = ' class="fieldrequired titlefieldcreate"'; } - print '
    '; if (isModEnabled('accounting')) { print $formaccounting->select_account($object->account_number, 'account_number', 1, '', 1, 1); @@ -1088,7 +1080,7 @@ if ($action == 'create') { print '
    '.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'
    "; // Code to adjust value date with plus and less picto using an Ajax call instead of a full reload of page @@ -656,13 +671,13 @@ if ($result) { if ($user->rights->banque->consolidate) { print '
    '; if ($objp->rappro) { - print 'rappro ? ' disabled' : '').'>'; - print ''; + print 'rappro ? ' disabled' : '').'>'; + print ''; } else { - print 'rappro ? ' disabled' : '').'>'; + print 'rappro ? ' disabled' : '').'>'; } if ($objp->num_releve) { - print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; + print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; } print ''; print 'rappro ? ' checked="checked"' : '')).'">'; + + print ' + + '; + print ''.yn($objp->rappro).'
    '; - +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} // Ref if (!empty($arrayfields['b.ref']['checked'])) { print ''; } // Balance @@ -449,15 +496,20 @@ if (!empty($arrayfields['balance']['checked'])) { print ''; } // Action column -print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['b.ref']['checked'])) { print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder); } @@ -486,7 +538,7 @@ if (!empty($arrayfields['toreconcile']['checked'])) { 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 +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // 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, '', $sortfield, $sortorder, 'center nowrap '); @@ -500,7 +552,9 @@ if (!empty($arrayfields['b.clos']['checked'])) { if (!empty($arrayfields['balance']['checked'])) { print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; @@ -531,7 +585,18 @@ foreach ($accounts as $key => $type) { } print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Ref if (!empty($arrayfields['b.ref']['checked'])) { print ''; @@ -636,7 +701,7 @@ foreach ($accounts as $key => $type) { print ''.$langs->trans("ConciliationDisabled").''; } else { $result = $objecttmp->load_board($user, $objecttmp->id); - if ($result < 0) { + if (is_numeric($result) && $result < 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); } else { print ''; @@ -668,7 +733,7 @@ foreach ($accounts as $key => $type) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp, $action); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['b.datec']['checked'])) { @@ -714,15 +779,17 @@ foreach ($accounts as $key => $type) { } // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index d424a3a8fef..2e532984d99 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -27,6 +27,7 @@ * \brief Page to show a bank statement report */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -61,6 +62,9 @@ $newbankreceipt = GETPOST('newbankreceipt', 'alpha'); $rel = GETPOST("rel", 'alphanohtml'); $backtopage = GETPOST('backtopage', 'alpha'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankaccountstatement', 'globalcard')); + // Security check $fieldid = (!empty($ref) ? $ref : $id); $fieldname = (!empty($ref) ? 'ref' : 'rowid'); @@ -197,11 +201,6 @@ if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($n /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); $societestatic = new Societe($db); $chargestatic = new ChargeSociales($db); @@ -228,6 +227,17 @@ if ($id > 0) { $param .= '&id='.urlencode($id); } +if (empty($numref)) { + $title = $object->ref.' - '.$langs->trans("AccountStatements"); + $helpurl = ""; +} else { + $title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); + $helpurl = ""; +} + + +llxHeader('', $title, $helpurl); + if (empty($numref)) { $sortfield = 'numr'; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index ff38abb32d4..d896c3e6069 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -22,17 +22,20 @@ */ /** - * \file htdocs/compta/bank/transfer.php - * \ingroup banque - * \brief Page de saisie d'un virement + * \file htdocs/compta/bank/transfer.php + * \ingroup bank + * \brief Page for entering a bank transfer */ +// Load Dolibarr environment 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")); +$langs->loadLangs(array('banks', 'categories', 'multicurrency')); + + $socid = 0; if ($user->socid > 0) { $socid = $user->socid; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 71e5cf37c87..d3e573f21bf 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -4,6 +4,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2015 Marcos García + * Copyright (C) 2022 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 @@ -25,16 +26,20 @@ * \brief Page to estimate future balance */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.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.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.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', 'bills', 'companies')); +$langs->loadLangs(array('banks', 'bills', 'categories', 'companies', 'salaries')); // Security check if (GETPOSTISSET("account") || GETPOSTISSET("ref")) { @@ -57,15 +62,13 @@ $hookmanager->initHooks(array('banktreso', 'globalcard')); /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("PlannedTransactions"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $societestatic = new Societe($db); +$userstatic = new User($db); $facturestatic = new Facture($db); $facturefournstatic = new FactureFournisseur($db); $socialcontribstatic = new ChargeSociales($db); +$salarystatic = new Salary($db); +$vatstatic = new TVA($db); $form = new Form($db); @@ -85,6 +88,9 @@ if (GETPOST("account") || GETPOST("ref")) { $_GET["account"] = $object->id; } + $title = $object->ref.' - '.$langs->trans("PlannedTransactions"); + $helpurl = ""; + llxHeader('', $title, $helpurl); // Onglets $head = bank_prepare_head($object); @@ -135,6 +141,27 @@ if (GETPOST("account") || GETPOST("ref")) { $sql .= " ORDER BY dlr ASC"; $sqls[] = $sql; + // Salaries + $sql = " SELECT 'salary' as family, sa.rowid as objid, sa.label as ref, (-1*sa.amount) as total_ttc, sa.dateep as dlr,"; + $sql .= " s.rowid as socid, CONCAT(s.firstname, ' ', s.lastname) as name, 0 as fournisseur"; + $sql .= " FROM ".MAIN_DB_PREFIX."salary as sa"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as s ON sa.fk_user = s.rowid"; + $sql .= " WHERE sa.entity = ".$conf->entity; + $sql .= " AND sa.paye = 0"; // Not paid + $sql .= " AND (sa.fk_account IN (0, ".$object->id.") OR sa.fk_account IS NULL)"; // Id bank account of salary + $sql .= " ORDER BY dlr ASC"; + $sqls[] = $sql; + + // VAT + $sql = " SELECT 'vat' as family, t.rowid as objid, t.label as ref, (-1*t.amount) as total_ttc, t.datev as dlr,"; + $sql .= " 0 as socid, 'noname' as name, 0 as fournisseur"; + $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; + $sql .= " WHERE t.entity = ".$conf->entity; + $sql .= " AND t.paye = 0"; // Not paid + $sql .= " AND (t.fk_account IN (-1, 0, ".$object->id.") OR t.fk_account IS NULL)"; // Id bank account of vat + $sql .= " ORDER BY dlr ASC"; + $sqls[] = $sql; + // others sql $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreSQL', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -268,6 +295,26 @@ if (GETPOST("account") || GETPOST("ref")) { $totalpayment = -1 * $socialcontribstatic->getSommePaiement(); // Payment already done } + if ($tmpobj->family == 'salary') { + $salarystatic->ref = $tmpobj->ref; + $salarystatic->id = $tmpobj->objid; + $salarystatic->label = $langs->trans("SalaryPayment"); + $ref = $salarystatic->getNomUrl(1, ''); + + $userstatic->id = $tmpobj->socid; + $userstatic->name = $tmpobj->name; + $refcomp = $userstatic->getNomUrl(1); + + $totalpayment = -1 * $salarystatic->getSommePaiement(); // Payment already done + } + if ($tmpobj->family == 'vat') { + $vatstatic->ref = $tmpobj->ref; + $vatstatic->id = $tmpobj->objid; + $vatstatic->type = $tmpobj->type; + $ref = $vatstatic->getNomUrl(1, ''); + + $totalpayment = -1 * $vatstatic->getSommePaiement(); // Payment already done + } $parameters = array('obj' => $tmpobj, 'ref' => $ref, 'refcomp' => $refcomp, 'totalpayment' => $totalpayment); $reshook = $hookmanager->executeHooks('moreFamily', $parameters, $tmpobject, $action); // Note that $action and $tmpobject may have been modified by hook @@ -295,7 +342,7 @@ if (GETPOST("account") || GETPOST("ref")) { } print ""; print ""; - if ($conf->global->MULTICOMPANY_INVOICE_SHARING_ENABLED) { + if (getDolGlobalString("MULTICOMPANY_INVOICE_SHARING_ENABLED")) { if ($tmpobj->family == 'invoice') { $mc->getInfo($tmpobj->entity); print ""; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 15cc3faf7bc..79f338cef85 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -22,6 +22,7 @@ * \brief Page of various expenses */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -139,7 +140,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } - if (isModEnabled('banque') && !$object->accountid > 0) { + if (isModEnabled("banque") && !$object->accountid > 0) { $langs->load('errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); $error++; @@ -304,9 +305,6 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->banque->m /* * View */ - -llxHeader("", $langs->trans("VariousPayment")); - $form = new Form($db); if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); @@ -324,6 +322,13 @@ if ($id) { } } +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewVariousPayment"); +} +$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; +llxHeader('', $title, $help_url); + $options = array(); // Load bank groups @@ -409,7 +414,7 @@ if ($action == 'create') { print ''; // Bank - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; // Number - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; @@ -638,7 +643,7 @@ if ($id) { print $form->editfieldval('SubledgerAccount', 'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $user->rights->banque->modifier), 'string', '', 0); print ''; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { if ($object->fk_account > 0) { $bankline = new AccountLine($db); $bankline->fetch($object->fk_bank); diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index 6cbfd596c44..611d516613b 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -22,6 +22,7 @@ * \brief Page of linked files onto various payment */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index 51442fd20a1..7cca5c7b4ec 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -21,6 +21,7 @@ * \brief Page with info about various payment */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 5f8380dd9d8..c1d6e9f3ec4 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -24,6 +24,7 @@ * \brief List of various payments */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -151,9 +152,9 @@ $arrayfields = array( 'datep' =>array('label'=>"DatePayment", 'checked'=>1, 'position'=>120), 'datev' =>array('label'=>"DateValue", 'checked'=>-1, 'position'=>130), 'type' =>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>140), - 'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>!empty($conf->project->enabled)), - 'bank' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>300, "enabled"=>isModEnabled('banque')), - 'entry' =>array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>310, "enabled"=>isModEnabled('banque')), + 'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>isModEnabled('project')), + 'bank' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>300, "enabled"=>isModEnabled("banque")), + 'entry' =>array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>310, "enabled"=>isModEnabled("banque")), 'account' =>array('label'=>"AccountAccountingShort", 'checked'=>1, 'position'=>400, "enabled"=>isModEnabled('accounting')), 'subledger' =>array('label'=>"SubledgerAccount", 'checked'=>1, 'position'=>410, "enabled"=>isModEnabled('accounting')), 'debit' =>array('label'=>"Debit", 'checked'=>1, 'position'=>500), @@ -212,6 +213,9 @@ if ($arrayfields['account']['checked']) { $sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account, v.fk_projet as fk_project,"; $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"; + +$sqlfields = $sql; // $sql fields to remove for count total + $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"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON v.fk_bank = b.rowid"; @@ -262,14 +266,32 @@ if ($search_all) { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -$sql .= $db->order($sortfield, $sortorder); +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } else { + dol_print_error($db); + } -$totalnboflines = 0; -$resql = $db->query($sql); -if ($resql) { - $totalnboflines = $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; + } + $db->free($resql); +} + +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); } -$sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); if ($resql) { @@ -284,7 +306,7 @@ if ($resql) { } // must be place behind the last "header(...)" call - llxHeader(); + llxHeader('', $langs->trans("VariousPayments")); $i = 0; $total = 0; @@ -354,7 +376,7 @@ if ($resql) { print ''; print ''; - print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); if ($search_all) { foreach ($fieldstosearchall as $key => $val) { @@ -418,7 +440,7 @@ if ($resql) { // Payment type if ($arrayfields['type']['checked']) { print ''; } @@ -482,6 +504,7 @@ if ($resql) { print ''; + print ''; if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index d4cb958d64d..dfc8564b34c 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -27,6 +27,7 @@ * \brief Page to show a cash fence */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -95,7 +96,7 @@ if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } -if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { +if (!$user->hasRight("cashdesk", "run") && !$user->hasRight("takepos", "run")) { accessforbidden(); } @@ -104,10 +105,10 @@ if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { * Actions */ -$permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run); -$permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run) || ($permissiontoadd && $object->status == 0); +$permissiontoadd = ($user->hasRight("cashdesk", "run") || $user->hasRight("takepos", "run")); +$permissiontodelete = ($user->hasRight("cashdesk", "run") || $user->hasRight("takepos", "run")) || ($permissiontoadd && $object->status == 0); if (empty($backtopage)) { - $backtopage = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.(!empty($id) && $id > 0 ? $id : '__ID__'); } $backurlforlist = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_list.php'; $triggermodname = 'CACHCONTROL_MODIFY'; // Name of trigger action code to execute when we modify record @@ -128,7 +129,7 @@ if (GETPOST('cancel', 'alpha')) { if ($action == "reopen") { $result = $object->setStatut($object::STATUS_DRAFT, null, '', 'CASHFENCE_REOPEN'); if ($result < 0) { - setEventMessages($object->error, $object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } $action = 'view'; @@ -265,6 +266,10 @@ $initialbalanceforterminal = array(); $theoricalamountforterminal = array(); $theoricalnbofinvoiceforterminal = array(); + +llxHeader('', $langs->trans("CashControl")); + + if ($action == "create" || $action == "start" || $action == 'close') { if ($action == 'close') { $posmodule = $object->posmodule; @@ -376,8 +381,6 @@ if ($action == "create" || $action == "start" || $action == 'close') { //var_dump($theoricalamountforterminal); var_dump($theoricalnbofinvoiceforterminal); if ($action != 'close') { - llxHeader('', $langs->trans("NewCashFence")); - print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print '
    '; @@ -597,8 +600,6 @@ if ($action == "create" || $action == "start" || $action == 'close') { if (empty($action) || $action == "view" || $action == "close") { $result = $object->fetch($id); - llxHeader('', $langs->trans("CashControl")); - if ($result <= 0) { print $langs->trans("ErrorRecordNotFound"); } else { diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 2315f12757a..7d433282367 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -17,11 +17,12 @@ */ /** - * \file cashcontrol_list.php + * \file htdocs/compta/cashcontrol/cashcontrol_list.php * \ingroup cashdesk|takepos * \brief List page for cashcontrol */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -49,8 +50,9 @@ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; -} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -104,11 +106,11 @@ $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { - $visible = (int) dol_eval($val['visible'], 1, 1, '1'); + $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1, 1, '1')), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -193,7 +195,8 @@ $now = dol_now(); //$help_url="EN:Module_pos_cash_fence|FR:Module_pos_cash_fence_FR|ES:Módulo_pos_cash_fence"; $help_url = ''; $title = $langs->trans('CashControl'); - +$morejs = array(); +$morecss = array(); // Build and execute select // -------------------------------------------------------------------- @@ -210,6 +213,9 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; @@ -236,17 +242,17 @@ foreach ($search as $key => $val) { $mode_search = 2; } if ($search[$key] != '') { - $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search)); } } else { if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { if (preg_match('/_dtstart$/', $key)) { - $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; } if (preg_match('/_dtend$/', $key)) { - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'"; } } } @@ -266,11 +272,13 @@ $sql .= $hookmanager->resPrint; /* If a group by is required $sql.= " GROUP BY "; foreach($object->fields as $key => $val) { - $sql .= "t.".$key.", "; + $sql .= "t.".$db->escape($key).", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + } } // Add where from hooks $parameters=array(); @@ -279,35 +287,43 @@ $sql.=$hookmanager->resPrint; $sql=preg_replace('/,\s*$/','', $sql); */ -$sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { $obj = $db->fetch_object($resql); @@ -325,6 +341,9 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'classforhorizontalscroll $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } @@ -332,11 +351,17 @@ if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } foreach ($search as $key => $val) { - if (is_array($search[$key]) && count($search[$key])) { + if (is_array($search[$key])) { foreach ($search[$key] as $skey) { - $param .= '&search_'.$key.'[]='.urlencode($skey); + if ($skey != '') { + $param .= '&search_'.$key.'[]='.urlencode($skey); + } } - } else { + } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { + $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); + $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); + $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } } @@ -372,6 +397,7 @@ print ''; print ''; print ''; +print ''; print ''; $permforcashfence = 1; @@ -388,10 +414,13 @@ $trackid = 'cashfence'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($search_all) { + $setupstring = ''; foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; } - print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; + print ''."\n"; + print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '."\n"; } $moreforfilter = ''; @@ -432,13 +461,13 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } if (!empty($arrayfields['t.'.$key]['checked'])) { print '
    '; + $j = 0; + print ''; foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { @@ -545,7 +575,11 @@ while ($i < ($limit ? min($num, $limit) : $num)) { //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; if (!empty($arrayfields['t.'.$key]['checked'])) { - print ''; + print ''; if ($key == 'status') { print $object->getLibStatut(5); } elseif ($key == 'rowid') { @@ -608,13 +642,13 @@ if ($num == 0) { $colspan++; } } - print ''; + 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 +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; @@ -422,7 +469,7 @@ 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 +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['b.datec']['checked'])) { @@ -441,7 +488,7 @@ if (!empty($arrayfields['b.clos']['checked'])) { 'opened'=>$langs->trans("Opened"), 'closed'=>$langs->trans("Closed") ); - print $form->selectarray("search_status", $array, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray("search_status", $array, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth125 onrightofpage', 1); print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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($objecttmp->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$objecttmp->getNomUrl(1).''; - 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($objecttmp->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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($objecttmp->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '".$ref."".$mc->label."
    '; print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); @@ -424,7 +429,7 @@ if ($action == 'create') { print '
    '; - $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100'); + print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1); print '
    '; if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { - print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1); } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { @@ -524,7 +553,8 @@ while ($i < ($limit ? min($num, $limit) : $num)) { $object->setVarsFromFetchObj($obj); // Show here line of result - print '
    '.$langs->trans("NoRecordFound").'
    '.$langs->trans("NoRecordFound").'
    '."\n"; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index d7744f777fe..bc45f3b417d 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -258,7 +258,7 @@ class CashControl extends CommonObject /* $posmodule = $this->posmodule; - if (! empty($user->rights->$posmodule->use)) + if (!empty($user->rights->$posmodule->use)) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index af61af5e836..c3d625c01e4 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -38,6 +38,7 @@ if (!defined('NOBROWSERNOTIF')) { $_GET['optioncss'] = "print"; +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -359,21 +360,21 @@ if ($resql) { print '
    '; print '

    '; - print $langs->trans("Cash").($transactionspertype['CASH'] ? ' ('.$transactionspertype['CASH'].')' : '').' :
    '.price($cash).'
    '; + print $langs->trans("Cash").(!empty($transactionspertype['CASH']) ? ' ('.$transactionspertype['CASH'].')' : '').' :
    '.price($cash).'
    '; if ($object->status == $object::STATUS_VALIDATED && $cash != $object->cash) { print ' <>
    '.$langs->trans("Declared").': '.price($object->cash).'
    '; } print "
    "; //print '
    '; - print $langs->trans("PaymentTypeCHQ").($transactionspertype['CHQ'] ? ' ('.$transactionspertype['CHQ'].')' : '').' :
    '.price($cheque).'
    '; + print $langs->trans("PaymentTypeCHQ").(!empty($transactionspertype['CHQ']) ? ' ('.$transactionspertype['CHQ'].')' : '').' :
    '.price($cheque).'
    '; if ($object->status == $object::STATUS_VALIDATED && $cheque != $object->cheque) { print ' <>
    '.$langs->trans("Declared").' : '.price($object->cheque).'
    '; } print "
    "; //print '
    '; - print $langs->trans("PaymentTypeCB").($transactionspertype['CB'] ? ' ('.$transactionspertype['CB'].')' : '').' :
    '.price($bank).'
    '; + print $langs->trans("PaymentTypeCB").(!empty($transactionspertype['CB']) ? ' ('.$transactionspertype['CB'].')' : '').' :
    '.price($bank).'
    '; if ($object->status == $object::STATUS_VALIDATED && $bank != $object->card) { print ' <>
    '.$langs->trans("Declared").': '.price($object->card).'
    '; } diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 3d6923905be..b5fdd0da597 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -28,6 +28,7 @@ * \brief Page to list payments of special expenses */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php'; @@ -146,7 +147,7 @@ if (isModEnabled('tax') && $user->rights->tax->charges->lire) { print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder); - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); } print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder); @@ -220,7 +221,7 @@ if (isModEnabled('tax') && $user->rights->tax->charges->lire) { } print $obj->num_payment.'

    '; if ($obj->fk_bank > 0) { //$accountstatic->fetch($obj->fk_bank); @@ -254,7 +255,7 @@ if (isModEnabled('tax') && $user->rights->tax->charges->lire) { print '   '.price($totalpaid)."'; if ($obj->fk_bank > 0) { //$accountstatic->fetch($obj->fk_bank); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index bc1d3790280..cd472c270e3 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -23,6 +23,7 @@ * \brief Show list of customers to add an new invoice */ +// Load Dolibarr environment 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'; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 8259d40f694..e7929a12697 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -25,6 +25,7 @@ * \brief Page to show a trip card */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; @@ -491,11 +492,8 @@ if ($action == 'create') { } } - if ($user->rights->deplacement->supprimer) { - print ''.$langs->trans('Delete').''; - } else { - print ''.$langs->trans('Delete').''; - } + $permissiontodelete = $user->rights->deplacement->supprimer; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); print ''; } diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 2a16d6e4f49..77e8b695bf2 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -27,6 +27,7 @@ * \brief Page of linked files onto trip and expenses */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 8af897378f5..a4a782de603 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -23,6 +23,7 @@ * \brief Page list of expenses */ +// Load Dolibarr environment 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'; diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index e180e104eb4..cfbbf33ab22 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -22,6 +22,7 @@ * \brief Page to show a trip information */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 2aa03441e9b..cae06774332 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -25,6 +25,7 @@ * \brief Page to list trips and expenses */ +// Load Dolibarr environment 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'; diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 7da90915b18..1bf7706bf87 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -23,6 +23,7 @@ * \brief Page for statistics of module trips and expenses */ +// Load Dolibarr environment 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'; @@ -61,7 +62,7 @@ if ($userid > 0) { } } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 42fb64738e1..67f3becb6b5 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -25,6 +25,7 @@ * \brief Page to setup extra fields of customer invoice */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,18 +81,8 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* - * * Creation of an optional field - * */ if ($action == 'create') { @@ -102,9 +93,7 @@ if ($action == 'create') { } /* - * * Edition of an optional field - * */ if ($action == 'edit' && !empty($attrname)) { $langs->load("members"); diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 1c834134f6d..fb5282352fc 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of customer invoice */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,19 +81,8 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); - -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* - * * Creation of an optional field - * */ if ($action == 'create') { @@ -103,9 +93,7 @@ if ($action == 'create') { } /* - * * Edition of an optional field - * */ if ($action == 'edit' && !empty($attrname)) { $langs->load("members"); diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 7b7f62ed94c..5bd66c4f0f7 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of customer invoice */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,18 +82,8 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* - * * Creation of an optional field - * */ if ($action == 'create') { @@ -103,9 +94,7 @@ if ($action == 'create') { } /* - * * Edition of an optional field - * */ if ($action == 'edit' && !empty($attrname)) { print "
    "; diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index 900aab1e10b..01c6abc310a 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of customer invoice */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,18 +82,8 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* - * * Creation of an optional field - * */ if ($action == 'create') { @@ -103,9 +94,7 @@ if ($action == 'create') { } /* - * * Edition of an optional field - * */ if ($action == 'edit' && !empty($attrname)) { print "
    "; diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index c2701a4e05d..64a37dcbed4 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -30,6 +30,7 @@ * \brief Page to show predefined invoice */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -141,7 +142,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid' => $socid); +$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'); @@ -541,7 +542,7 @@ if (empty($reshook)) { $desc = ''; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -566,7 +567,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { $tmptxt = '('; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'alpha')) { @@ -650,9 +651,9 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -799,8 +800,10 @@ if (empty($reshook)) { $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); + $typeinvoice = Facture::TYPE_STANDARD; + // Check price is not lower than minimum (check is done only for standard or replacement invoices) - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) { + if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (($typeinvoice == Facture::TYPE_STANDARD || $typeinvoice == Facture::TYPE_REPLACEMENT) && $price_min && ((float) price2num($pu_ht) * (1 - (float) $remise_percent / 100) < (float) price2num($price_min)))) { setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error++; } @@ -857,11 +860,11 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -990,8 +993,8 @@ if ($action == 'create') { $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date, '%Y').')'; $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'y'), '%Y').')'; // Only on template invoices - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')'; - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency), 'dayhour').')'; + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), 'dayhour').')'; + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 2, 'm'), 'dayhour').')'; $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $langs->trans("Count"); $substitutionarray['__INVOICE_COUNTER_MAX__'] = $langs->trans("MaxPeriodNumber"); @@ -1176,6 +1179,15 @@ if ($action == 'create') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_deleteinvoice', '', 'no', 1); } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm); + $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 $formconfirm; $author = new User($db); @@ -1652,35 +1664,41 @@ if ($action == 'create') { */ print '
    '; - if (empty($object->suspended)) { - if ($user->rights->facture->creer) { - if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { - print ''; - } else { - if (empty($object->frequency) || $object->date_when <= $nowlasthour) { - print ''; - } else { - print ''; - } - } - } else { - print ''; - } - } - - if ($user->rights->facture->creer) { + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { + $params = array( + 'attr' => array( + 'class' => 'classfortooltip', + ), + ); if (empty($object->suspended)) { - print ''; - } else { - print ''; + if ($user->rights->facture->creer) { + if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { + print ''; + } else { + if (empty($object->frequency) || $object->date_when <= $nowlasthour) { + print ''; + } else { + print ''; + } + } + } else { + print ''; + } } - } - //if ($object->statut == Facture::STATUS_DRAFT && $user->rights->facture->supprimer) - if ($user->rights->facture->supprimer) { - print ''; - } + if ($user->rights->facture->creer) { + if (empty($object->suspended)) { + print ''; + } else { + print ''; + } + } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->rights->facture->supprimer); + } print '
    '; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e5cabbef206..36c98a495ec 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -37,11 +37,13 @@ * \brief Page to create/see an invoice */ +// Libraries require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -51,6 +53,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } @@ -76,9 +79,10 @@ if (isModEnabled('margin')) { $langs->load('margins'); } +// General $Variables $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0); -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'aZ09'); @@ -102,7 +106,7 @@ $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); -// Nombre de ligne pour choix de produit/service predefinis +// Number of lines for predefined product/service choices $NBLINES = 4; $usehm = (!empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE) ? $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE : 0); @@ -128,11 +132,14 @@ if ($id > 0 || !empty($ref)) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('invoicecard', 'globalcard')); +// Permissions $usercanread = $user->hasRight("facture", "lire"); $usercancreate = $user->hasRight("facture", "creer"); $usercanissuepayment = $user->hasRight("facture", "paiement"); $usercandelete = $user->hasRight("facture", "supprimer"); $usercancreatecontract = $user->hasRight("contrat", "creer"); + +// Advanced Permissions $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->validate))); $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->send))); $usercanreopen = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->reopen))); @@ -141,7 +148,7 @@ if (!empty($conf->global->INVOICE_DISALLOW_REOPEN)) { } $usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->unvalidate))); -$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); +$usermustrespectpricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $usercancreatemargin = (!empty($user->rights->margins->creer) ? $user->rights->margins->creer : 0); $usercanreadallmargin = (!empty($user->rights->margins->liretous) ? $user->rights->margins->liretous : 0); $usercancreatewithdrarequest = (!empty($user->rights->prelevement->bons->creer) ? $user->rights->prelevement->bons->creer : 0); @@ -272,10 +279,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id')) { $newlang = GETPOST('lang_id'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -520,10 +527,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -604,10 +611,10 @@ if (empty($reshook)) { if (empty($error) && empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -659,10 +666,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -749,10 +756,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1378,6 +1385,7 @@ if (empty($reshook)) { $object->note_public = trim(GETPOST('note_public', 'restricthtml')); $object->note_private = trim(GETPOST('note_private', 'restricthtml')); $object->ref_client = GETPOST('ref_client'); + $object->ref_customer = GETPOST('ref_client'); $object->model_pdf = GETPOST('model'); $object->fk_project = GETPOST('projectid', 'int'); $object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id')); @@ -1780,7 +1788,7 @@ if (empty($reshook)) { // Now we create same links to contact than the ones found on origin object /* Useless, already into the create - if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) + if (!empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) { $originforcontact = $object->origin; $originidforcontact = $object->origin_id; @@ -1956,10 +1964,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && count($object->lines)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -2008,19 +2016,39 @@ if (empty($reshook)) { // Set if we used free entry or predefined product $predef = ''; $product_desc =(GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); - $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); - $prod_entry_mode = GETPOST('prod_entry_mode', 'alpha'); + + $price_ht = ''; + $price_ht_devise = ''; + $price_ttc = ''; + $price_ttc_devise = ''; + + if (GETPOST('price_ht') !== '') { + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ht') !== '') { + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); + } + if (GETPOST('price_ttc') !== '') { + $price_ttc = price2num(GETPOST('price_ttc'), 'MU', 2); + } + if (GETPOST('multicurrency_price_ttc') !== '') { + $price_ttc_devise = price2num(GETPOST('multicurrency_price_ttc'), 'CU', 2); + } + + $prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09'); if ($prod_entry_mode == 'free') { $idprod = 0; - $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); + $tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0); } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'MS', 2); - $remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); + if (empty($remise_percent)) { + $remise_percent = 0; + } // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -2047,8 +2075,8 @@ if (empty($reshook)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } - if (($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (($price_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $price_ht == '') && $price_ht_devise == '') && $object->type != Facture::TYPE_CREDIT_NOTE) { // Unit price can be 0 but not '' - if ($price_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) { + if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (($price_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $price_ht == '') && (($price_ht_devise < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $price_ht_devise == '') && $price_ttc === '' && $price_ttc_devise === '' && $object->type != Facture::TYPE_CREDIT_NOTE) { // Unit price can be 0 but not '' + if (($price_ht < 0 || $price_ttc < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) { $langs->load("errors"); if ($object->type == $object::TYPE_DEPOSIT) { // Using negative lines on deposit lead to headach and blocking problems when you want to consume them. @@ -2126,20 +2154,24 @@ if (empty($reshook)) { $pu_ht = $datapriceofproduct['pu_ht']; $pu_ttc = $datapriceofproduct['pu_ttc']; $price_min = $datapriceofproduct['price_min']; + $price_min_ttc = $datapriceofproduct['price_min_ttc']; $price_base_type = $datapriceofproduct['price_base_type']; + $tva_tx = $datapriceofproduct['tva_tx']; $tva_npr = $datapriceofproduct['tva_npr']; $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); - // if price ht was forced (ie: from gui when calculated by margin rate and cost price). TODO Why this ? + // Set unit price to use if (!empty($price_ht) || $price_ht === '0') { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); + } elseif (!empty($price_ttc) || $price_ttc === '0') { + $pu_ttc = price2num($price_ttc, 'MU'); + $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } elseif ($tmpvat != $tmpprodvat) { - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + // Is this still used ? if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } else { @@ -2150,7 +2182,7 @@ if (empty($reshook)) { $desc = ''; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -2185,7 +2217,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { $tmptxt = '('; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'alpha')) { @@ -2227,7 +2259,7 @@ if (empty($reshook)) { $fk_unit = $prod->fk_unit; } else { $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); + $pu_ttc = price2num($price_ttc, 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); if (empty($tva_tx)) { @@ -2237,6 +2269,13 @@ if (empty($reshook)) { $desc = $product_desc; $type = GETPOST('type'); $fk_unit = GETPOST('units', 'alpha'); + + $pu_ht_devise = price2num($price_ht_devise, 'MU'); + $pu_ttc_devise = price2num($price_ttc_devise, 'MU'); + + if ($pu_ttc && !$pu_ht) { + $price_base_type = 'TTC'; + } } $pu_ht_devise = price2num($price_ht_devise, 'MU'); @@ -2257,6 +2296,7 @@ if (empty($reshook)) { $price2num_pu_ht = price2num($pu_ht); $price2num_remise_percent = price2num($remise_percent); $price2num_price_min = price2num($price_min); + $price2num_price_min_ttc = price2num($price_min_ttc); if (empty($price2num_pu_ht)) { $price2num_pu_ht = 0; } @@ -2266,13 +2306,26 @@ if (empty($reshook)) { if (empty($price2num_price_min)) { $price2num_price_min = 0; } + if (empty($price2num_price_min_ttc)) { + $price2num_price_min_ttc = 0; + } - if ($usercanproductignorepricemin && (!empty($price_min) && ($price2num_pu_ht * (1 - $price2num_remise_percent / 100) < $price2num_price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessages($mesg, null, 'errors'); - } else { + // Check price is not lower than minimum (check is done only for standard or replacement invoices) + if ($usermustrespectpricemin && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)) { + if ($pu_ht && $price_min && ((price2num($pu_ht) * (1 - $remise_percent / 100)) < price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + } + } + + if (!$error) { // Add batchinfo if the detail_batch array is defined - if (!empty($conf->productbatch->enabled) && !empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && !empty($conf->global->INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS)) { + if (isModEnabled('productbatch') && !empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && !empty($conf->global->INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS)) { $langs->load('productbatch'); foreach ($lines[$i]->detail_batch as $batchline) { $desc .= ' '.$langs->trans('Batch').' '.$batchline->batch.' '.$langs->trans('printQty', $batchline->qty).' '; @@ -2287,10 +2340,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -2361,10 +2414,16 @@ if (empty($reshook)) { $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml') ? GETPOST('product_desc', 'restricthtml') : GETPOST('desc', 'restricthtml')); - $pu_ht = price2num(GETPOST('price_ht'), '', 2); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - $qty = GETPOST('qty'); + $vat_rate = str_replace('*', '', $vat_rate); + + $pu_ht = price2num(GETPOST('price_ht'), '', 2); + $pu_ttc = price2num(GETPOST('price_ttc'), '', 2); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); + $pu_ttc_devise = price2num(GETPOST('multicurrency_subprice_ttc'), '', 2); + + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); // Define info_bits $info_bits = 0; @@ -2435,15 +2494,28 @@ if (empty($reshook)) { $price_min = $product->price_min; 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]; + $price_min = $product->multiprices_min[$object->thirdparty->price_level]; + } + $price_min_ttc = $product->price_min_ttc; + if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && !empty($object->thirdparty->price_level)) { + $price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level]; } $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); // Check price is not lower than minimum (check is done only for standard or replacement invoices) - if ($usercanproductignorepricemin && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) { - setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); - $error++; + if ($usermustrespectpricemin && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)) { + if ($pu_ht && $price_min && (((float) price2num($pu_ht) * (1 - (float) $remise_percent / 100)) < (float) price2num($price_min))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } elseif ($pu_ttc && $price_min_ttc && ((price2num($pu_ttc) * (1 - (float) $remise_percent / 100)) < price2num($price_min_ttc))) { + $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min_ttc, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); + setEventMessages($mesg, null, 'errors'); + $error++; + $action = 'editline'; + } } } else { $type = GETPOST('type'); @@ -2460,8 +2532,8 @@ if (empty($reshook)) { setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors'); $error++; } - if ((empty($productid) && (($pu_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $pu_ht == '') && $pu_ht_devise == '') && $object->type != Facture::TYPE_CREDIT_NOTE) { // Unit price can be 0 but not '' - if ($pu_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) { + if (empty($productid) && (($pu_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $pu_ht == '') && (($pu_ht_devise < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $pu_ht_devise == '') && $pu_ttc === '' && $pu_ttc_devise === '' && $object->type != Facture::TYPE_CREDIT_NOTE) { // Unit price can be 0 but not '' + if (($pu_ht < 0 || $pu_ttc < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) { $langs->load("errors"); if ($object->type == $object::TYPE_DEPOSIT) { // Using negative lines on deposit lead to headach and blocking problems when you want to consume them. @@ -2489,10 +2561,17 @@ if (empty($reshook)) { } } + $price_base_type = 'HT'; + $pu = $pu_ht; + if (empty($pu) && !empty($pu_ttc)) { + $pu = $pu_ttc; + $price_base_type = 'TTC'; + } + $result = $object->updateline( GETPOST('lineid', 'int'), $description, - $pu_ht, + $pu, $qty, $remise_percent, $date_start, @@ -2500,7 +2579,7 @@ if (empty($reshook)) { $vat_rate, $localtax1_rate, $localtax2_rate, - 'HT', + $price_base_type, $info_bits, $type, GETPOST('fk_parent_line', 'int'), @@ -2520,10 +2599,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -2881,8 +2960,10 @@ if (isModEnabled('project')) { $now = dol_now(); -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card'); - +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewBill"); +} $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); @@ -3117,7 +3198,7 @@ if ($action == 'create') { } else { print '
    '.$langs->trans('Customer').''; - print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status = 1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500'); + print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status = 1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500'); // Option to reload page to retrieve customer informations. if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print ''; if (!empty($hidemargininfos)) { - print ''; + print ''; } } print '
    '; print '' . "\n"; - print ''; + print '
    '; print ''; print ''; print ''; @@ -254,7 +254,7 @@ class FormMargin } print ''; - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { print ''; print ''; @@ -270,7 +270,7 @@ class FormMargin print ''; } - if (!empty($conf->service->enabled)) { + if (isModEnabled("service")) { print ''; print ''; print ''; @@ -285,7 +285,7 @@ class FormMargin print ''; } - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { + if (isModEnabled("product") && isModEnabled("service")) { print ''; print ''; print ''; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 5bee2f31dd4..7e14474bc96 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -429,8 +429,7 @@ class FormOther if (!is_numeric($showempty)) { $textforempty = $showempty; } - $moreforfilter .= ''."\n"; - //$moreforfilter .= ''; // Should use -1 to say nothing + $moreforfilter .= ''."\n"; } if (is_array($tab_categs)) { @@ -439,6 +438,7 @@ class FormOther if ($categ['id'] == $selected) { $moreforfilter .= ' selected'; } + $moreforfilter .= ' data-html="'.dol_escape_htmltag(img_picto('', 'category', 'class="pictofixedwidth" style="color: #'.$categ['color'].'"').dol_trunc($categ['fulllabel'], 50, 'middle')).'"'; $moreforfilter .= '>'.dol_trunc($categ['fulllabel'], 50, 'middle').''; } } @@ -1513,9 +1513,10 @@ class FormOther * @param array $search_xaxis Array of preselected fields * @param array $arrayofxaxis Array of groupby to fill * @param string $showempty '1' or 'text' + * @param string $morecss More css * @return string HTML string component */ - public function selectXAxisField($object, $search_xaxis, &$arrayofxaxis, $showempty = '1') + public function selectXAxisField($object, $search_xaxis, &$arrayofxaxis, $showempty = '1', $morecss = 'minwidth250 maxwidth500') { global $form; @@ -1523,7 +1524,7 @@ class FormOther foreach ($arrayofxaxis as $key => $val) { $arrayofxaxislabel[$key] = $val['label']; } - $result = $form->selectarray('search_xaxis', $arrayofxaxislabel, $search_xaxis, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth250 maxwidth500', 1); + $result = $form->selectarray('search_xaxis', $arrayofxaxislabel, $search_xaxis, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1); return $result; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index e6a580a7f71..a0e74c5cdd5 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -66,14 +66,15 @@ class FormProjets * @param int $forcefocus Force focus on field (works with javascript only) * @param int $disabled Disabled * @param int $mode 0 for HTML mode and 1 for JSON mode - * @param string $filterkey Key to filter + * @param string $filterkey Key to filter on ref or title * @param int $nooutput No print output. Return it only. * @param int $forceaddid Force to add project id in list, event if not qualified * @param string $morecss More css * @param int $htmlid Html id to use instead of htmlname + * @param string $morefilter More filters (Must be a sql sanitized string) * @return string Return html content */ - public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '') + public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '', $morefilter = '') { // phpcs:enable global $langs, $conf, $form; @@ -96,16 +97,14 @@ class FormProjets $selected_input_value = $project->ref; } $urloption = 'socid='.((int) $socid).'&htmlname='.urlencode($htmlname).'&discardclosed='.((int) $discard_closed); - + if ($morefilter == 'usage_organize_event=1') { + $urloption .= '&usage_organize_event=1'; + } $out .= ''; - $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array( - // 'update' => array( - // 'projectid' => 'id' - // ) - )); + $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array()); } else { - $out .= $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, abs($discard_closed), $forcefocus, $disabled, 0, $filterkey, 1, $forceaddid, $htmlid, $morecss); + $out .= $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, abs($discard_closed), $forcefocus, $disabled, 0, $filterkey, 1, $forceaddid, $htmlid, $morecss, $morefilter); } if ($discard_closed > 0) { if (!empty($form)) { @@ -135,14 +134,15 @@ class FormProjets * @param int $forcefocus Force focus on field (works with javascript only) * @param int $disabled Disabled * @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example) - * @param string $filterkey Key to filter + * @param string $filterkey Key to filter on title or ref * @param int $nooutput No print output. Return it only. * @param int $forceaddid Force to add project id in list, event if not qualified * @param int $htmlid Html id to use instead of htmlname * @param string $morecss More CSS + * @param string $morefilter More filters (Must be a sql sanitized string) * @return int Nb of project if OK, <0 if KO */ - public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500') + public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '') { // phpcs:enable global $user, $conf, $langs; @@ -187,6 +187,9 @@ class FormProjets if (!empty($filterkey)) { $sql .= natural_search(array('p.title', 'p.ref'), $filterkey); } + if ($morefilter) { + $sql .= ' AND ('.$this->db->sanitize($morefilter, 0, 1).')'; + } $sql .= " ORDER BY p.ref ASC"; $resql = $this->db->query($sql); @@ -206,7 +209,7 @@ class FormProjets while ($i < $num) { $obj = $this->db->fetch_object($resql); // If we ask to filter on a company and user has no permission to see all companies and project is linked to another company, we hide project. - if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($user->rights->societe->lire)) { + if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->hasRight('societe', 'lire')) { // Do nothing } else { if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected @@ -381,9 +384,9 @@ class FormProjets if (!empty($show_empty)) { $out .= ''; } if ($showallnone) { - $sellist .= ''; - $sellist .= ''; - $sellist .= ''; - $sellist .= ''; + $sellist .= ''; + $sellist .= ''; + $sellist .= ''; + $sellist .= ''; } while ($i < $num) { $obj = $this->db->fetch_object($resql); diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index 87919141727..e23e71a8124 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -134,6 +134,6 @@ class FormPropal } print ''; - print ajax_combobox($htmlname); + print ajax_combobox($htmlname, array(), 0, 0, 'resolve', ($showempty < 0 ? (string) $showempty : '-1'), $morecss); } } diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 1cfddb588fd..c57ee0c5106 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -758,6 +758,8 @@ class FormSetupItem $val = GETPOST($this->confKey, 'array'); if ($val && is_array($val)) { $val_const = implode(',', $val); + } else { + $val_const = ''; } } elseif ($this->type == 'html') { $val_const = GETPOST($this->confKey, 'restricthtml'); @@ -835,7 +837,11 @@ class FormSetupItem } elseif ($this->type== 'color') { $out.= $this->generateInputFieldColor(); } elseif ($this->type == 'yesno') { - $out.= $this->form->selectyesno($this->confKey, $this->fieldValue, 1); + if (!empty($conf->use_javascript_ajax)) { + $out.= ajax_constantonoff($this->confKey); + } else { + $out.= $this->form->selectyesno($this->confKey, $this->fieldValue, 1); + } } elseif (preg_match('/emailtemplate:/', $this->type)) { $out.= $this->generateInputFieldEmailTemplate(); } elseif (preg_match('/category:/', $this->type)) { @@ -847,7 +853,7 @@ class FormSetupItem } elseif ($this->type == 'securekey') { $out.= $this->generateInputFieldSecureKey(); } elseif ($this->type == 'product') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { $selected = (empty($this->fieldValue) ? '' : $this->fieldValue); $out.= $this->form->select_produits($selected, $this->confKey, '', 0, 0, 1, 2, '', 0, array(), 0, '1', 0, $this->cssClass, 0, '', null, 1); } @@ -952,21 +958,11 @@ class FormSetupItem if (!empty($conf->use_javascript_ajax)) { $out.= ' '.img_picto($this->langs->trans('Generate'), 'refresh', 'id="generate_token'.$this->confKey.'" class="linkobject"'); } - if (!empty($conf->use_javascript_ajax)) { - $out .= "\n" . ''; - } + + // Add button to autosuggest a key + include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $out .= dolJSToSetRandomPassword($this->confKey, 'generate_token'.$this->confKey); + return $out; } @@ -1042,7 +1038,7 @@ class FormSetupItem */ public function generateOutputField() { - global $conf, $user; + global $conf, $user, $langs; if (!empty($this->fieldOverride)) { return $this->fieldOverride; @@ -1067,7 +1063,15 @@ class FormSetupItem } elseif ($this->type== 'color') { $out.= $this->generateOutputFieldColor(); } elseif ($this->type == 'yesno') { - $out.= ajax_constantonoff($this->confKey); + if (!empty($conf->use_javascript_ajax)) { + $out.= ajax_constantonoff($this->confKey); + } else { + if ($this->fieldValue == 1) { + $out.= $langs->trans('yes'); + } else { + $out.= $langs->trans('no'); + } + } } elseif (preg_match('/emailtemplate:/', $this->type)) { include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; $formmail = new FormMail($this->db); @@ -1075,7 +1079,7 @@ class FormSetupItem $tmp = explode(':', $this->type); $template = $formmail->getEMailTemplate($this->db, $tmp[1], $user, $this->langs, $this->fieldValue); - if ($template<0) { + if (is_numeric($template) && $template < 0) { $this->setErrors($formmail->errors); } $out.= $this->langs->trans($template->label); @@ -1103,6 +1107,7 @@ class FormSetupItem $out.= $this->langs->trans("NorProspectNorCustomer"); } } elseif ($this->type == 'product') { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); $resprod = $product->fetch($this->fieldValue); if ($resprod > 0) { diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 68b8410e647..f08640c6e55 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -285,7 +285,7 @@ function limitChars(textarea, limit, infodiv) print ''; } else { print ''; - print '
    '.$langs->trans("SmsInfoCharRemain").': '.(160 - dol_strlen($defaultmessage)).'
    '; + print '
    '.$langs->trans("SmsInfoCharRemain").': '.(160 - dol_strlen($defaultmessage)).'
    '; } print "\n"; } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index b5ba0b0208e..3dc618c36ab 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -20,13 +20,14 @@ */ /** - * \file htdocs/core/class/html.formticket.class.php - * \ingroup ticket - * \brief File of class to generate the form for creating a new ticket. + * \file htdocs/core/class/html.formticket.class.php + * \ingroup ticket + * \brief File of class to generate the form for creating a new ticket. */ -require_once DOL_DOCUMENT_ROOT."/core/class/html.form.class.php"; -require_once DOL_DOCUMENT_ROOT."/core/class/html.formmail.class.php"; -require_once DOL_DOCUMENT_ROOT."/core/class/html.formprojet.class.php"; + +require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; if (!class_exists('FormCompany')) { include DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -35,8 +36,8 @@ if (!class_exists('FormCompany')) { /** * Class to generate the form for creating a new ticket. * Usage: $formticket = new FormTicket($db) - * $formticket->proprietes=1 ou chaine ou tableau de valeurs - * $formticket->show_form() affiche le formulaire + * $formticket->proprietes = 1 or string or array of values + * $formticket->show_form() shows the form * * @package Ticket */ @@ -64,8 +65,8 @@ class FormTicket public $withtopic; public $withemail; + /** - * * @var int $withsubstit Show substitution array */ public $withsubstit; @@ -75,18 +76,20 @@ class FormTicket public $backtopage; - public $ispublic; // To show information or not into public form + public $ispublic; // to show information or not into public form public $withtitletopic; public $withtopicreadonly; - public $withcompany; // affiche liste déroulante company + public $withreadid; + + public $withcompany; // to show company drop-down list public $withfromsocid; public $withfromcontactid; public $withnotifytiersatcreate; - public $withusercreate; // Show name of creating user in form + public $withusercreate; // to show name of creating user in form public $withcreatereadonly; - public $withref; // Show ref field + public $withref; // to show ref field public $withcancel; @@ -106,6 +109,7 @@ class FormTicket * @var string Error code (or message) */ public $error; + public $errors = array(); /** @@ -124,14 +128,14 @@ class FormTicket $this->withcompany = isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; - //$this->withreadid=0; + $this->withreadid=0; //$this->withtitletopic=''; $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; $this->withcreatereadonly = 1; $this->withemail = 0; $this->withref = 0; - $this->withextrafields = 0; // Show extrafields or not + $this->withextrafields = 0; // to show extrafields or not //$this->withtopicreadonly=0; } @@ -171,7 +175,7 @@ class FormTicket print dol_get_fiche_head(null, 'card', '', 0, ''); } - print 'param["returnurl"] : "").'">'; + print 'param["returnurl"] : $_SERVER['PHP_SELF']).'">'; print ''; print ''; foreach ($this->param as $key => $value) { @@ -315,42 +319,40 @@ class FormTicket print ''; } - // Type + // Type of Ticket print ''; - // Group + // Group => Category print ''; - // Severity - print ''; // Subject if ($this->withtitletopic) { print ''; } else { - if (isset($this->withreadid) && $this->withreadid > 0) { + if (isset($this->withreadid) && $this->withreadid > 0) { $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.''; } else { $subject = GETPOST('subject', 'alpha'); } print ''; - print ''; } + print ''; } if (!empty($conf->knowledgemanagement->enabled)) { @@ -418,7 +420,7 @@ class FormTicket $toolbarname = 'dolibarr_notes'; if ($this->ispublic) { $toolbarname = 'dolibarr_details'; - print '
    '.($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')).'
    '; + print '
    '.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'
    '; } include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $uselocalbrowser = true; @@ -624,7 +626,7 @@ class FormTicket } if ($subelement != 'project') { - if (!empty($conf->project->enabled) && !$this->ispublic) { + if (isModEnabled('project') && !$this->ispublic) { $formproject = new FormProjets($this->db); print ''; - - // Warning - print ''; - - print "\n"; - } - //} - //else - //{ - //$level--; - //} - } - - return $totalforeachline; -} - - /** * Output a task line into a pertime intput mode * @@ -1315,7 +1110,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $restrictBefore = null; - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); } @@ -1399,11 +1194,11 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print ''; // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); - if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); $extrafieldsobjectkey='projet'; $extrafieldsobjectprefix='efp.'; @@ -1413,32 +1208,32 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print ''; // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) + if (!empty($arrayfields['p.fk_opp_status']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.opp_amount']['checked'])) + if (!empty($arrayfields['p.opp_amount']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.opp_percent']['checked'])) + if (!empty($arrayfields['p.opp_percent']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.budget_amount']['checked'])) + if (!empty($arrayfields['p.budget_amount']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.usage_bill_time']['checked'])) + if (!empty($arrayfields['p.usage_bill_time']['checked'])) { print ''; // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); - if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); $extrafieldsobjectkey='projet'; $extrafieldsobjectprefix='efp.'; @@ -1818,32 +1614,32 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print ''; // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) + if (!empty($arrayfields['p.fk_opp_status']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.opp_amount']['checked'])) + if (!empty($arrayfields['p.opp_amount']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.opp_percent']['checked'])) + if (!empty($arrayfields['p.opp_percent']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.budget_amount']['checked'])) + if (!empty($arrayfields['p.budget_amount']['checked'])) { print '\n"; } - if (! empty($arrayfields['p.usage_bill_time']['checked'])) + if (!empty($arrayfields['p.usage_bill_time']['checked'])) { print ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -131,7 +131,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // On defini critere recherche compteur - $mask = $conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK; + $mask = getDolGlobalString("COMMANDE_FOURNISSEUR_ORCHIDEE_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 6919ffe69aa..74f90f1d68e 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -66,9 +66,9 @@ class pdf_standard extends ModelePDFSuppliersPayments /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -114,10 +114,10 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_multilang = 1; // Available in several languages @@ -131,7 +131,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->posxtva = 90; $this->posxtotalttc = 180; - //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + //if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; if ($this->page_largeur < 210) { // To work with US executive format $this->posxreffacturefourn -= 20; $this->posxreffacture -= 20; @@ -272,7 +272,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -291,7 +291,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -336,7 +336,7 @@ class pdf_standard extends ModelePDFSuppliersPayments if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -417,7 +417,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -437,7 +437,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -676,10 +676,10 @@ class pdf_standard extends ModelePDFSuppliersPayments } } - if (! empty($conf->global->PDF_SHOW_PROJECT)) + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (! empty($object->project->ref)) + if (!empty($object->project->ref)) { $outputlangs->load("projects"); $posy+=4; @@ -824,8 +824,7 @@ class pdf_standard extends ModelePDFSuppliersPayments */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 0bc0543e6cd..292662a14ad 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -61,11 +61,11 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments */ public function info() { - global $conf, $langs; + global $conf, $langs, $db; $langs->load("bills"); - $form = new Form($this->db); + $form = new Form($db); $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; $texte .= ''; @@ -82,7 +82,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -128,7 +128,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK; + $mask = getDolGlobalString("SUPPLIER_PAYMENT_BRODATOR_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 82475f7a016..55a7710c5a4 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -46,9 +46,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -179,7 +179,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; @@ -297,7 +299,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -306,11 +308,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -318,8 +320,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal dol_mkdir($conf->supplier_proposal->dir_temp); if (!is_writable($conf->supplier_proposal->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->supplier_proposal->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->supplier_proposal->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 70467c49f58..6cb651b49fd 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -65,9 +65,9 @@ class pdf_aurore extends ModelePDFSupplierProposal /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -140,10 +140,10 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -168,24 +168,18 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->postotalht = 174; if (!empty($conf->global->PRODUCT_USE_UNITS)) { - $this->posxtva = 101; - $this->posxup = 118; + $this->posxup = 112; $this->posxqty = 135; $this->posxunit = 151; } else { - $this->posxtva = 102; - $this->posxup = 126; + $this->posxup = 120; $this->posxqty = 145; $this->posxunit = 162; } - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { - $this->posxup = $this->posxtva; - } - $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images + $this->posxpicture = $this->posxup - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; - $this->posxtva -= 20; $this->posxup -= 20; $this->posxqty -= 20; $this->posxunit -= 20; @@ -247,7 +241,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -257,7 +251,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -276,7 +270,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } } if (count($realpatharray) == 0) { - $this->posxpicture = $this->posxtva; + $this->posxpicture = $this->posxup; } if ($conf->supplier_proposal->dir_output) { @@ -343,7 +337,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialAsk")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -358,7 +352,6 @@ class pdf_aurore extends ModelePDFSupplierProposal if (empty($this->atleastonediscount)) { $delta = ($this->postotalht - $this->posxdiscount); $this->posxpicture += $delta; - $this->posxtva += $delta; $this->posxup += $delta; $this->posxqty += $delta; $this->posxunit += $delta; @@ -378,7 +371,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Affiche notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; @@ -443,7 +436,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -460,7 +453,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (!empty($imglinesize['width']) && !empty($imglinesize['height'])) { $curX = $this->posxpicture - 1; - $pdf->Image($realpatharray[$i], $curX + (($this->posxtva - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi + $pdf->Image($realpatharray[$i], $curX + (($this->posxup - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually $posYAfterImage = $curY + $imglinesize['height']; } @@ -472,7 +465,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if ($posYAfterImage > 0) { $descWidth = $this->posxpicture - $curX; } else { - $descWidth = $this->posxtva - $curX; + $descWidth = $this->posxup - $curX; } pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc, 1); @@ -493,7 +486,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -528,22 +521,6 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut - // VAT Rate - /* - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-3, 3, $vat_rate, 0, 'R'); - } - - // Unit price before discount - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxup, $curY); - if ($up_excl_tax > 0) - $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); - */ - // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); @@ -573,7 +550,7 @@ class pdf_aurore extends ModelePDFSupplierProposal */ // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -656,7 +633,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -676,7 +653,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -805,7 +782,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $posy = $pdf->GetY() + 1; } - /* PHFAVRE + /* elseif ($object->availability_code || $object->availability) // Show availability conditions { $pdf->SetFont('','B', $default_font_size - 2); @@ -895,7 +872,7 @@ class pdf_aurore extends ModelePDFSupplierProposal // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (!empty($object->fk_bank) || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if (!empty($object->fk_bank) || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = (empty($object->fk_bank) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_bank); $account = new Account($this->db); $account->fetch($bankid); @@ -964,7 +941,7 @@ class pdf_aurore extends ModelePDFSupplierProposal // Nothing to do } else { //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -994,7 +971,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1048,7 +1025,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1078,7 +1055,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1138,22 +1115,6 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); - /* - if ($object->close_code == 'discount_vat') - { - $index++; - $pdf->SetFillColor(255,255,255); - - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1); - - $resteapayer=0; - } - */ - $index++; $pdf->SetTextColor(0, 0, 60); $pdf->SetFillColor(224, 224, 224); @@ -1226,16 +1187,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { - $pdf->line($this->posxtva, $tab_top, $this->posxtva, $tab_top + $tab_height); - //$pdf->line($this->posxtva-2, $tab_top, $this->posxtva-2, $tab_top + $tab_height); - if (empty($hidetop)) { - $pdf->SetXY($this->posxtva - 5, $tab_top + 1); - $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); - } - } - - $pdf->line($this->posxup - 3, $tab_top, $this->posxup - 3, $tab_top + $tab_height); + $pdf->line($this->posxup + 1, $tab_top, $this->posxup + 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); @@ -1323,7 +1275,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } } else { $text = $this->emetteur->name; - $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection); + $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0); } } @@ -1343,18 +1295,12 @@ class pdf_aurore extends ModelePDFSupplierProposal $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) { + if ($object->ref_fourn) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier")." : ".dol_trunc($outputlangs->convToOutputCharset($object->ref_fourn), 65), '', 'R'); } - /* PHFAVRE - $posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->delivery_date, "day", false, $outputlangs, true), '', 'R'); - */ if ($object->thirdparty->code_fournisseur) { $posy += 4; @@ -1497,8 +1443,7 @@ class pdf_aurore extends ModelePDFSupplierProposal */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 2e618b3ece3..cb4f76fa727 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_proposal/modules_supplier /** - * Class to manage customer order numbering rules Marbre + * Class to manage the Marbre numbering rule for Request for quotation */ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal { diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 57cba16c01b..c73a8a16db6 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -138,7 +138,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal return 0; } - $date = $supplier_proposal->datep; + $date = $supplier_proposal->date; $customercode = $objsoc->code_client; $numFinal = get_next_value($db, $mask, 'supplier_proposal', 'ref', '', $customercode, $date); diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index e99e16ef649..265741f35c6 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -113,11 +113,15 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface } if (!empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) { - if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) { // file depend on session key name (Note that session name is same for all users and is not a per user value) - $suffixinfilename .= '_'.session_name(); - } - if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) { // file depend on session value sor per user - $suffixinfilename .= '_'.session_name().'_'.$_SERVER["REMOTE_ADDR"]; + if (is_numeric($conf->global->SYSLOG_FILE_ONEPERSESSION)) { + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) { // file depend on instance session key name (Note that session name is same for the instance so for all users and is not a per user value) + $suffixinfilename .= '_'.session_name(); + } + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) { // file depend on instance session key name + ip so nearly per user + $suffixinfilename .= '_'.session_name().'_'.$_SERVER["REMOTE_ADDR"]; + } + } else { + $suffixinfilename .= '_'.$conf->global->SYSLOG_FILE_ONEPERSESSION; } } diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php index 41b7bb8c90e..31eb9345110 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php @@ -15,8 +15,8 @@ * 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/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -24,6 +24,7 @@ * \ingroup takepos * \brief File with Simple ref numbering module for takepos */ + dol_include_once('/core/modules/takepos/modules_takepos.php'); /** @@ -80,10 +81,10 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos } /** - * Test si les numeros deja en vigueur dans la base ne provoquent pas de - * de conflits qui empechera cette numerotation de fonctionner. + * Test if the numbers already in the database do not cause any conflicts that will prevent this + * of conflicts that will prevent this numbering from working. * - * @return boolean false si conflit, true si ok + * @return boolean false if KO (there is a conflict), true if OK */ public function canBeActivated() { diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 5d35bfd1214..7b515ca6b3b 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -17,8 +17,8 @@ * 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/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -26,6 +26,7 @@ * \ingroup takepos * \brief File with Universal ref numbering module for takepos */ + dol_include_once('/core/modules/takepos/modules_takepos.php'); /** @@ -51,7 +52,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos public $nom = 'Universal'; /** - * Renvoi la description du modele de numerotation + * return description of the numbering model * * @return string Texte descripif */ @@ -77,7 +78,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos $tooltip .= $langs->trans('GenericMaskCodes5'); $tooltip .= $langs->trans('CashDeskGenericMaskCodes6'); - // Parametrage du prefix + // Setting up the prefix $texte .= ''; $texte .= ''; @@ -92,7 +93,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos } /** - * Renvoi un exemple de numerotation + * Return an example of numbering * * @return string Example */ @@ -125,7 +126,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - // On defini critere recherche compteur + // We define search criteria counter $mask = getDolGlobalString('TAKEPOS_REF_UNIVERSAL_MASK'); if (!$mask) { diff --git a/htdocs/core/modules/takepos/modules_takepos.php b/htdocs/core/modules/takepos/modules_takepos.php index 24fa70b7f28..89b3dbde5bc 100644 --- a/htdocs/core/modules/takepos/modules_takepos.php +++ b/htdocs/core/modules/takepos/modules_takepos.php @@ -16,14 +16,14 @@ * 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/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** * \file htdocs/core/modules/takepos/modules_takepos.php * \ingroup takepos - * \brief Fichier contenant la classe mere de numerotation des tickets de caisse + * \brief File containing the parent class for the numbering of cash register receipts */ diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index cf358cae606..1a2d1e537cc 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -43,9 +43,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -161,7 +161,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -266,7 +268,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -275,11 +277,11 @@ class doc_generic_ticket_odt extends ModelePDFTicket if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -287,8 +289,8 @@ class doc_generic_ticket_odt extends ModelePDFTicket dol_mkdir($conf->ticket->dir_temp); if (!is_writable($conf->ticket->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->ticket->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->ticket->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 2c46376eea1..8efc2f6a4e5 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -81,7 +81,7 @@ class mod_ticket_universal extends ModeleNumRefTicket // Parametrage du prefix $texte .= '
    '; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -127,7 +127,7 @@ class mod_ticket_universal extends ModeleNumRefTicket include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // On defini critere recherche compteur - $mask = $conf->global->TICKET_UNIVERSAL_MASK; + $mask = getDolGlobalString("TICKET_UNIVERSAL_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 0c9f5263e09..1c3e346203b 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -43,9 +43,9 @@ class doc_generic_user_odt extends ModelePDFUser /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -192,7 +192,9 @@ class doc_generic_user_odt extends ModelePDFUser $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -297,7 +299,7 @@ class doc_generic_user_odt extends ModelePDFUser $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -306,11 +308,11 @@ class doc_generic_user_odt extends ModelePDFUser if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -318,8 +320,8 @@ class doc_generic_user_odt extends ModelePDFUser dol_mkdir($conf->user->dir_temp); if (!is_writable($conf->user->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->user->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 1744761fcf9..4bbb39c0086 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -46,9 +46,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -281,7 +281,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -290,11 +290,11 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -302,8 +302,8 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup dol_mkdir($conf->user->dir_temp); if (!is_writable($conf->user->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->user->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/workstation/mod_workstation_standard.php b/htdocs/core/modules/workstation/mod_workstation_standard.php index 7bef21a8599..758783316e4 100644 --- a/htdocs/core/modules/workstation/mod_workstation_standard.php +++ b/htdocs/core/modules/workstation/mod_workstation_standard.php @@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php'; /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Workstation */ class mod_workstation_standard extends ModeleNumRefWorkstation { diff --git a/htdocs/core/multicompany_page.php b/htdocs/core/multicompany_page.php index 4a3bcba51fb..690c971fd23 100644 --- a/htdocs/core/multicompany_page.php +++ b/htdocs/core/multicompany_page.php @@ -92,7 +92,7 @@ print '
    '; //print '
    '; -if (empty($conf->multicompany->enabled)) { +if (!isModEnabled('multicompany')) { $langs->load("admin"); $bookmarkList .= '
    '.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("MultiCompany")).''; $bookmarkList .= '

    '; diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index e35d09d7e3f..efbb3ba9c19 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -24,6 +24,7 @@ * \brief File of page to resize photos */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; @@ -33,7 +34,7 @@ $langs->loadLangs(array("products", "other")); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); -$modulepart = GETPOST('modulepart', 'alpha') ?GETPOST('modulepart', 'alpha') : 'produit|service'; +$modulepart = GETPOST('modulepart', 'alpha') ? GETPOST('modulepart', 'alpha') : 'produit|service'; $original_file = GETPOST("file"); $backtourl = GETPOST('backtourl'); $cancel = GETPOST('cancel', 'alpha'); @@ -284,45 +285,45 @@ if (empty($backtourl)) { $regs = array(); if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) { - $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/product/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('expensereport'))) { - $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('holiday'))) { - $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('member'))) { - $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('project'))) { - $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/projet/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('propal'))) { - $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('societe'))) { - $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/societe/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('tax'))) { - $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('ticket'))) { - $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('user'))) { - $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/user/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('facture'))) { - $backtourl = DOL_URL_ROOT."/compta/facture/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/compta/facture/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('facture_fourn', 'facture_fournisseur'))) { - $backtourl = DOL_URL_ROOT."/fourn/facture/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/fourn/facture/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) { $num = $regs[1]; - $backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".$id.'&num='.urlencode($num).'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".((int) $id).'&num='.urlencode($num).'&file='.urlencode($file); } elseif (in_array($modulepart, array('bank'))) { - $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('mrp'))) { - $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".((int) $id).'&file='.urlencode($file); } elseif (in_array($modulepart, array('medias'))) { $section_dir = dirname($file); if (!preg_match('/\/$/', $section_dir)) { $section_dir .= '/'; } - $backtourl = DOL_URL_ROOT."/website/index.php?action=file_manager&website=".$website.'§ion_dir='.urlencode($section_dir); + $backtourl = DOL_URL_ROOT.'/website/index.php?action=file_manager'.($website ? '&website='.urlencode($website) : '').'§ion_dir='.urlencode($section_dir); } else { // Generic case that should work for everybody else - $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($file); + $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".((int) $id).'&file='.urlencode($file); } } @@ -500,8 +501,9 @@ print '
    '."\n"; */ print ''."\n"; -print ''; +print ''; print ''; +print ''; print '
    '; print ''.$langs->trans("Resize").''; @@ -520,6 +522,7 @@ print ' '; print ''; print '
    '."\n"; print ''; + print '
    '."\n"; @@ -560,8 +563,9 @@ if (!empty($conf->use_javascript_ajax)) { print '
    '; print '
    '; - print ''; + print ''; print ''; + print ''; print '
    '.$langs->trans("NewSizeAfterCropping").': diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index 3c55f1a1e37..86b1dfc8875 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -22,6 +22,7 @@ * \brief Home page for top menu tools */ +// Load Dolibarr environment require '../main.inc.php'; // Load translation files required by the page diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 1dbc0861adb..d44c73129da 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -97,6 +97,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con else if (type == 'password') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helppassword").show();} else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} + else if (type == 'pricecy') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} else if (type == 'select') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpselect").show();} else if (type == 'sellist') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpsellist").show();} else if (type == 'radio') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpselect").show();} @@ -134,6 +135,12 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con jQuery("#computed_value").keyup(function() { init_typeoffields(jQuery('#type').val()); }); + + /* Autofill the code with label */ + jQuery("#label").keyup(function() { + console.log("Update new field"); + $("#attrname").val( $(this).val().replace(/[^a-zA-Z0-9_]/g, '').toLowerCase() ); + }); }); @@ -145,7 +152,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con
    ' . $langs->trans('Margins') . '' . $langs->trans('SellingPrice') . '
    ' . $langs->trans('MarginOnProducts') . '
    ' . $langs->trans('MarginOnServices') . '' . price($marginInfo['pv_services']) . '
    ' . $langs->trans('TotalMargin') . '' . price($marginInfo['pv_total']) . '
    '.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
    '; $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, 1, 0, 0, 'minwidth200'); print '
    '; $filter = ''; if ($public) { $filter = 'public=1'; } - $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 0, 0, 0, 'minwidth200'); + $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 1, 0, 0, 'minwidth200'); print '
    '; - $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 0); + // Severity => Priority + print '
    '; + $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 1); print '
    '; - - // Réponse à un ticket : affichage du titre du thread en readonly + // Answer to a ticket : display of the thread title in readonly if ($this->withtopicreadonly) { print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title; - print '
    '; print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); @@ -668,23 +670,25 @@ class FormTicket /** * Return html list of tickets type * - * @param string $selected Id du type pre-selectionne - * @param string $htmlname Nom de la zone select - * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz)) - * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code - * @param int $empty 1=peut etre vide, 0 sinon - * @param int $noadmininfo 0=Add admin info, 1=Disable admin info - * @param int $maxlength Max length of label - * @param string $morecss More CSS + * @param string|array $selected Id of preselected field or array of Ids + * @param string $htmlname Nom de la zone select + * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz)) + * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code + * @param int $empty 1=peut etre vide, 0 sinon + * @param int $noadmininfo 0=Add admin info, 1=Disable admin info + * @param int $maxlength Max length of label + * @param string $morecss More CSS + * @param int $multiselect Is multiselect ? * @return void */ - public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') + public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $multiselect = 0) { global $langs, $user; + $selected = is_array($selected) ? $selected : (!empty($selected) ? array($selected) : array()); $ticketstat = new Ticket($this->db); - dol_syslog(get_class($this)."::select_types_tickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); + dol_syslog(get_class($this) . "::select_types_tickets " . implode(';', $selected) . ", " . $htmlname . ", " . $filtertype . ", " . $format . ", " . $multiselect, LOG_DEBUG); $filterarray = array(); @@ -694,7 +698,7 @@ class FormTicket $ticketstat->loadCacheTypesTickets(); - print ''; if ($empty) { print ''; } @@ -706,7 +710,7 @@ class FormTicket continue; } - // We discard empty line if showempty is on because an empty line has already been output. + // If 'showempty' is enabled we discard empty line because an empty line has already been output. if ($empty && empty($arraytypes['code'])) { continue; } @@ -727,16 +731,17 @@ class FormTicket print ''; } } print ''; - if ($user->admin && !$noadmininfo) { + if (isset($user->admin) && $user->admin && !$noadmininfo) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } @@ -763,16 +768,16 @@ class FormTicket /** * Return html list of ticket anaytic codes * - * @param string $selected Id categorie pre-selectionnée + * @param string $selected Id pre-selected category * @param string $htmlname Name of select component * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users. - * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code - * @param int $empty 1=peut etre vide, 0 sinon - * @param int $noadmininfo 0=Add admin info, 1=Disable admin info + * @param int $format 0 = id+label, 1 = code+code, 2 = code+label, 3 = id+code + * @param int $empty 1 = can be empty, 0 = or not + * @param int $noadmininfo 0 = ddd admin info, 1 = disable admin info * @param int $maxlength Max length of label * @param string $morecss More CSS * @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes. - * @param Translate $outputlangs Output lnaguage + * @param Translate $outputlangs Output language * @return void */ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null) @@ -832,7 +837,7 @@ class FormTicket print ''; - /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - elseif ($disabledtask) - { - $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); - - print $form->textwithpicto('',$langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); - }*/ - print '
    '; $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); if ($code) print $langs->trans("OppStatus".$code); print "'; print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); print "'; print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; print "'; print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); print "'; print yn($lines[$i]->usage_bill_time); @@ -1596,7 +1391,8 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr // Duration print ''; - $dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$preselectedday][$lines[$i]->id]; + $dayWorkLoad = !empty($projectstatic->weekWorkLoadPerTask[$preselectedday][$lines[$i]->id]) ? $projectstatic->weekWorkLoadPerTask[$preselectedday][$lines[$i]->id] : 0; + if (!isset($totalforeachday[$preselectedday])) $totalforeachday[$preselectedday] = 0; $totalforeachday[$preselectedday] += $dayWorkLoad; $alreadyspent = ''; @@ -1720,7 +1516,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $restrictBefore = null; - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); } @@ -1804,11 +1600,11 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print '
    '; $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); if ($code) print $langs->trans("OppStatus".$code); print "'; print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); print "'; print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; print "'; print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); print "'; print yn($lines[$i]->usage_bill_time); @@ -1977,7 +1773,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $modeinput = 'hours'; for ($idw = 0; $idw < 7; $idw++) { $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); - + if (!isset($totalforeachday[$tmpday])) $totalforeachday[$tmpday] = 0; $cssonholiday = ''; if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { $cssonholiday .= 'onholidayallday '; @@ -1988,14 +1784,14 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ } $tmparray = dol_getdate($tmpday); - $dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id]; + $dayWorkLoad = (!empty($projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id]) ? $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id] : 0); $totalforeachday[$tmpday] += $dayWorkLoad; $alreadyspent = ''; if ($dayWorkLoad > 0) { $alreadyspent = convertSecondToTime($dayWorkLoad, 'allhourmin'); } - $alttitle = $langs->trans("AddHereTimeSpentForDay", $tmparray['day'], $tmparray['mon']); + $alttitle = $langs->trans("AddHereTimeSpentForDay", !empty($tmparray['day']) ? $tmparray['day'] : 0, $tmparray['mon']); global $numstartworkingday, $numendworkingday; $cssweekend = ''; @@ -2113,7 +1909,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & $restrictBefore = null; - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); } @@ -2275,7 +2071,8 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & $year = $firstdaytoshowarray['year']; $month = $firstdaytoshowarray['mon']; foreach ($TWeek as $weekIndex => $weekNb) { - $weekWorkLoad = $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]; + $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ; + if (!isset($totalforeachweek[$weekNb])) $totalforeachweek[$weekNb] = 0; $totalforeachweek[$weekNb] += $weekWorkLoad; $alreadyspent = ''; @@ -2434,6 +2231,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $arrayidtypeofcontact = array(); + print ''; print '
    '; print ''; @@ -2633,12 +2431,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $plannedworkload = $objp->planned_workload; $total_plannedworkload += $plannedworkload; if (!in_array('plannedworkload', $hiddenfields)) { - print ''; + print ''; } if (!in_array('declaredprogress', $hiddenfields)) { $declaredprogressworkload = $objp->declared_progess_workload; $total_declaredprogressworkload += $declaredprogressworkload; - print ''; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index c5d2a647a57..9d1401ea47a 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -18,9 +18,9 @@ */ /** - * \file htdocs/core/lib/propal.lib.php - * \brief Ensemble de fonctions de base pour le module propal - * \ingroup propal + * \file htdocs/core/lib/propal.lib.php + * \brief Ensemble de fonctions de base pour le module propal + * \ingroup propal */ /** @@ -42,8 +42,8 @@ function propal_prepare_head($object) $head[$h][2] = 'comm'; $h++; - if ((empty($conf->commande->enabled) && ((!empty($conf->expedition->enabled) && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->delivery->lire)))) { + if ((empty($conf->commande->enabled) && ((isModEnabled("expedition") && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) + || (isModEnabled("expedition") && !empty($conf->delivery_note->enabled) && $user->rights->expedition->delivery->lire)))) { $langs->load("sendings"); $text = ''; $head[$h][0] = DOL_URL_ROOT.'/expedition/propal.php?id='.$object->id; @@ -73,7 +73,7 @@ function propal_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -110,6 +110,8 @@ function propal_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'remove'); return $head; @@ -122,7 +124,11 @@ function propal_prepare_head($object) */ function propal_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('propal'); + $extrafields->fetch_name_optionals_label('propaldet'); $h = 0; $head = array(); @@ -140,11 +146,19 @@ function propal_admin_prepare_head() $head[$h][0] = DOL_URL_ROOT.'/comm/admin/propal_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['propal']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes'; $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/admin/propaldet_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $nbExtrafields = $extrafields->attributes['propaldet']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributeslines'; $h++; @@ -167,7 +181,7 @@ function getCustomerProposalPieChart($socid = 0) $result= ''; - if (empty($conf->propal->enabled) || empty($user->rights->propal->lire)) { + if (!isModEnabled('propal') || empty($user->rights->propal->lire)) { return ''; } diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index 26f6817ed24..e697908e8cb 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -66,7 +66,7 @@ function reception_prepare_head(Reception $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -96,6 +96,8 @@ function reception_prepare_head(Reception $object) $head[$h][2] = 'note'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'remove'); return $head; @@ -108,9 +110,13 @@ function reception_prepare_head(Reception $object) */ function reception_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user, $db; $langs->load("receptions"); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('reception'); + $extrafields->fetch_name_optionals_label('commande_fournisseur_dispatch'); + $h = 0; $head = array(); @@ -124,6 +130,10 @@ function reception_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['reception']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes_reception'; $h++; } @@ -131,6 +141,10 @@ function reception_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $nbExtrafields = $extrafields->attributes['commande_fournisseur_dispatch']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributeslines_reception'; $h++; } diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php index f222857b9d8..ebfbaf224f6 100644 --- a/htdocs/core/lib/resource.lib.php +++ b/htdocs/core/lib/resource.lib.php @@ -55,7 +55,7 @@ function resource_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -99,6 +99,8 @@ function resource_prepare_head($object) $head[$h][2] = 'info'; $h++;*/ + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'remove'); return $head; diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index 57cb9675e3f..51ec880e31e 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -42,7 +42,7 @@ function salaries_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -62,6 +62,8 @@ function salaries_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'remove'); return $head; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 798ba265643..deff1af567c 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -92,14 +92,116 @@ function dol_decode($chain, $key = '1') } /** - * Returns a hash of a string. + * Return a string of random bytes (hexa string) with length = $length fro cryptographic purposes. + * + * @param int $length Length of random string + * @return string Random string + */ +function dolGetRandomBytes($length) +{ + if (function_exists('random_bytes')) { // Available with PHP 7 only. + return bin2hex(random_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2 + } + + return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows. +} + +/** + * Encode a string with a symetric encryption. Used to encrypt sensitive data into database. + * Note: If a backup is restored onto another instance with a different $dolibarr_main_instance_unique_id, then decoded value will differ. + * + * @param string $chain string to encode + * @param string $key If '', we use $dolibarr_main_instance_unique_id + * @param string $ciphering Default ciphering algorithm + * @return string encoded string + * @see dolDecrypt(), dol_hash() + */ +function dolEncrypt($chain, $key = '', $ciphering = "AES-256-CTR") +{ + global $dolibarr_main_instance_unique_id; + + if ($chain === '' || is_null($chain)) { + return ''; + } + + $reg = array(); + if (preg_match('/^dolcrypt:([^:]+):(.+)$/', $chain, $reg)) { + // The $chain is already a crypted string + return $chain; + } + + if (empty($key)) { + $key = $dolibarr_main_instance_unique_id; + } + + $newchain = $chain; + + if (function_exists('openssl_encrypt')) { + $ivlen = 16; + if (function_exists('openssl_cipher_iv_length')) { + $ivlen = openssl_cipher_iv_length($ciphering); + } + if ($ivlen === false || $ivlen < 1 || $ivlen > 32) { + $ivlen = 16; + } + $ivseed = dolGetRandomBytes($ivlen); + + $newchain = openssl_encrypt($chain, $ciphering, $key, 0, $ivseed); + return 'dolcrypt:'.$ciphering.':'.$ivseed.':'.$newchain; + } else { + return $chain; + } +} + +/** + * Decode a string with a symetric encryption. Used to decrypt sensitive data saved into database. + * Note: If a backup is restored onto another instance with a different $dolibarr_main_instance_unique_id, then decoded value will differ. + * + * @param string $chain string to encode + * @param string $key If '', we use $dolibarr_main_instance_unique_id + * @return string encoded string + * @see dolEncrypt(), dol_hash() + */ +function dolDecrypt($chain, $key = '') +{ + global $dolibarr_main_instance_unique_id; + + if ($chain === '' || is_null($chain)) { + return ''; + } + + if (empty($key)) { + $key = $dolibarr_main_instance_unique_id; + } + + $reg = array(); + if (preg_match('/^dolcrypt:([^:]+):(.+)$/', $chain, $reg)) { + $ciphering = $reg[1]; + if (function_exists('openssl_decrypt')) { + $tmpexplode = explode(':', $reg[2]); + if (!empty($tmpexplode[1]) && is_string($tmpexplode[0])) { + $newchain = openssl_decrypt($tmpexplode[1], $ciphering, $key, 0, $tmpexplode[0]); + } else { + $newchain = openssl_decrypt($tmpexplode[0], $ciphering, $key, 0, null); + } + } else { + $newchain = 'Error function openssl_decrypt() not available'; + } + return $newchain; + } else { + return $chain; + } +} + +/** + * Returns a hash (non reversible encryption) of a string. * If constant MAIN_SECURITY_HASH_ALGO is defined, we use this function as hashing function (recommanded value is 'password_hash') * If constant MAIN_SECURITY_SALT is defined, we use it as a salt (used only if hashing algorightm is something else than 'password_hash'). * * @param string $chain String to hash * @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4': for OpenLdap, '5':sha256, '6':password_hash). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return string Hash of string - * @see getRandomPassword() + * @see getRandomPassword(), dol_verifyHash() */ function dol_hash($chain, $type = '0') { @@ -147,6 +249,7 @@ function dol_hash($chain, $type = '0') * @param string $hash hash to compare * @param string $type Type of hash ('0':auto, '1':sha1, '2':sha1+md5, '3':md5, '4': for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return bool True if the computed hash is the same as the given one + * @see dol_hash() */ function dol_verifyHash($chain, $hash, $type = '0') { @@ -216,27 +319,32 @@ function dolGetLdapPasswordHash($password, $type = 'md5') * If GETPOST('action','aZ09') defined, we also check write and delete permission. * This method check permission on module then call checkUserAccessToObject() for permission on object (according to entity and socid of user). * - * @param User $user User to check - * @param string $features Features to check (it must be module $object->element. Can be a 'or' check with 'levela|levelb'. - * Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...) - * This is used to check permission $user->rights->features->... - * @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). - * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional). - * @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'. - * This is used to check permission $user->rights->features->feature2... - * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) - * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) - * @param int $isdraft 1=The object with id=$objectid is a draft - * @param int $mode Mode (0=default, 1=return with not die) - * @return int If mode = 0 (default): Always 1, die process if not allowed. If mode = 1: Return 0 if access not allowed. + * @param User $user User to check + * @param string $features Features to check (it must be module $object->element. Can be a 'or' check with 'levela|levelb'. + * Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...) + * This is used to check permission $user->rights->features->... + * @param int|string|object $object Object or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). + * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional). + * @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'. + * This is used to check permission $user->rights->features->feature2... + * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional). Can use '' if NA. + * @param string $dbt_select Field name for select if not "rowid". Not used if objectid is null (optional) + * @param int $isdraft 1=The object with id=$objectid is a draft + * @param int $mode Mode (0=default, 1=return without dieing) + * @return int If mode = 0 (default): Always 1, die process if not allowed. If mode = 1: Return 0 if access not allowed. * @see dol_check_secure_access_document(), checkUserAccessToObject() */ -function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0, $mode = 0) +function restrictedArea(User $user, $features, $object = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0, $mode = 0) { global $db, $conf; global $hookmanager; - $objectid = ((int) $objectid); // For the case value is coming from a non sanitized user input + if (is_object($object)) { + $objectid = $object->id; + } else { + $objectid = $object; // $objectid can be X or 'X,Y,Z' + } + $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); //print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", objectid=".$objectid; @@ -289,11 +397,6 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f return 1; } - // To avoid access forbidden with numeric ref - if ($dbt_select != 'rowid' && $dbt_select != 'id') { - $objectid = "'".$objectid."'"; - } - // Features/modules to check $featuresarray = array($features); if (preg_match('/&/', $features)) { @@ -324,7 +427,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f } if ($feature == 'societe') { - if (empty($user->rights->societe->lire) && empty($user->rights->fournisseur->lire)) { + if (!$user->hasRight('societe', 'lire') && !$user->hasRight('fournisseur', 'lire')) { $readok = 0; $nbko++; } @@ -334,12 +437,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $nbko++; } } elseif ($feature == 'produit|service') { - if (!$user->rights->produit->lire && !$user->rights->service->lire) { + if (empty($user->rights->produit->lire) && empty($user->rights->service->lire)) { $readok = 0; $nbko++; } } elseif ($feature == 'prelevement') { - if (!$user->rights->prelevement->bons->lire) { + if (empty($user->rights->prelevement->bons->lire)) { $readok = 0; $nbko++; } @@ -349,12 +452,12 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $nbko++; } } elseif ($feature == 'projet') { - if (!$user->rights->projet->lire && empty($user->rights->projet->all->lire)) { + if (empty($user->rights->projet->lire) && empty($user->rights->projet->all->lire)) { $readok = 0; $nbko++; } } elseif ($feature == 'payment') { - if (!$user->rights->facture->lire) { + if (empty($user->rights->facture->lire)) { $readok = 0; $nbko++; } @@ -614,7 +717,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f // If we have a particular object to check permissions on, we check if $user has permission // for this given object (link to company, is contact for project, ...) if (!empty($objectid) && $objectid > 0) { - $ok = checkUserAccessToObject($user, $featuresarray, $objectid, $tableandshare, $feature2, $dbt_keyfield, $dbt_select, $parentfortableentity); + $ok = checkUserAccessToObject($user, $featuresarray, $object, $tableandshare, $feature2, $dbt_keyfield, $dbt_select, $parentfortableentity); $params = array('objectid' => $objectid, 'features' => join(',', $featuresarray), 'features2' => $feature2); //print 'checkUserAccessToObject ok='.$ok; if ($mode) { @@ -635,9 +738,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f * @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...) * @param int|string|Object $object Full object or object ID or list of object id. For example if we want to check a particular record (optional) is linked to a owned thirdparty (optional). * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional). - * @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'. - * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) - * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) + * @param array|string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'. + * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional). Can use '' if NA. + * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional). * @param string $parenttableforentity Parent table for entity. Example 'fk_website@website' * @return bool True if user has access, False otherwise * @see restrictedArea() @@ -651,9 +754,10 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl } else { $objectid = $object; // $objectid can be X or 'X,Y,Z' } + $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); - //print "user_id=".$user->id.", features=".join(',', $featuresarray).", feature2=".$feature2.", objectid=".$objectid; + //print "user_id=".$user->id.", features=".join(',', $featuresarray).", objectid=".$objectid; //print ", tableandshare=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select."
    "; // More parameters @@ -681,12 +785,13 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl // Array to define rules of checks to do $check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salaries', 'website', 'recruitment'); // Test on entity only (Objects with no link to company) - $checksoc = array('societe'); // Test for societe object + $checksoc = array('societe'); // Test for object Societe $checkother = array('contact', 'agenda'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet', 'project'); // Test for project object $checktask = array('projet_task'); // Test for task object - $checkhierarchy = array('expensereport', 'holiday'); + $checkhierarchy = array('expensereport', 'holiday'); // check permission among the hierarchy of user $nocheck = array('barcode', 'stock'); // No test + //$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...). // If dbtablename not defined, we use same name for table than module name @@ -695,11 +800,16 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename); // We change dbtablename, so we set sharedelement too. } - // Check permission for object on entity only - if (in_array($feature, $check)) { + // To avoid an access forbidden with a numeric ref + if ($dbt_select != 'rowid' && $dbt_select != 'id') { + $objectid = "'".$objectid."'"; // Note: $objectid was already cast into int at begin of this method. + } + + // Check permission for objectid on entity only + if (in_array($feature, $check) && $objectid > 0) { // For $objectid = 0, no check $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - if (($feature == 'user' || $feature == 'usergroup') && !empty($conf->multicompany->enabled)) { // Special for multicompany + if (($feature == 'user' || $feature == 'usergroup') && isModEnabled('multicompany')) { // Special for multicompany if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if ($conf->entity == 1 && $user->admin && !$user->entity) { $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; @@ -728,13 +838,13 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl } $checkonentitydone = 1; } - if (in_array($feature, $checksoc)) { // We check feature = checksoc + if (in_array($feature, $checksoc) && $objectid > 0) { // We check feature = checksoc. For $objectid = 0, no check // If external user: Check permission for external users if ($user->socid > 0) { if ($user->socid != $objectid) { return false; } - } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && empty($user->rights->societe->client->voir))) { + } elseif (isModEnabled("societe") && ($user->hasRight('societe', 'lire') && empty($user->rights->societe->client->voir))) { // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -743,7 +853,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $sql .= " AND sc.fk_user = ".((int) $user->id); $sql .= " AND sc.fk_soc = s.rowid"; $sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")"; - } elseif (!empty($conf->multicompany->enabled)) { + } elseif (isModEnabled('multicompany')) { // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(s.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -753,14 +863,14 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $checkonentitydone = 1; } - if (in_array($feature, $checkother)) { // Test on entity + link to thirdparty. Allowed if link is empty (Ex: contacts...). + if (in_array($feature, $checkother) && $objectid > 0) { // Test on entity + link to thirdparty. Allowed if link is empty (Ex: contacts...). // If external user: Check permission for external users if ($user->socid > 0) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.fk_soc = ".((int) $user->socid); - } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && empty($user->rights->societe->client->voir))) { + } elseif (isModEnabled("societe") && ($user->hasRight('societe', 'lire') && empty($user->rights->societe->client->voir))) { // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -768,7 +878,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND (dbt.fk_soc IS NULL OR sc.fk_soc IS NOT NULL)"; // Contact not linked to a company or to a company of user $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; - } elseif (!empty($conf->multicompany->enabled)) { + } elseif (isModEnabled('multicompany')) { // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -778,8 +888,8 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $checkonentitydone = 1; } - if (in_array($feature, $checkproject)) { - if (!empty($conf->project->enabled) && empty($user->rights->projet->all->lire)) { + if (in_array($feature, $checkproject) && $objectid > 0) { + if (isModEnabled('project') && empty($user->rights->projet->all->lire)) { $projectid = $objectid; include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -799,8 +909,8 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $checkonentitydone = 1; } - if (in_array($feature, $checktask)) { - if (!empty($conf->project->enabled) && empty($user->rights->projet->all->lire)) { + if (in_array($feature, $checktask) && $objectid > 0) { + if (isModEnabled('project') && empty($user->rights->projet->all->lire)) { $task = new Task($db); $task->fetch($objectid); $projectid = $task->fk_project; @@ -822,7 +932,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $checkonentitydone = 1; } - if (!$checkonentitydone && !in_array($feature, $nocheck)) { // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield + if (!$checkonentitydone && !in_array($feature, $nocheck) && $objectid > 0) { // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield // If external user: Check permission for external users if ($user->socid > 0) { if (empty($dbt_keyfield)) { @@ -832,7 +942,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.rowid IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.".$dbt_keyfield." = ".((int) $user->socid); - } elseif (!empty($conf->societe->enabled) && empty($user->rights->societe->client->voir)) { + } elseif (isModEnabled("societe") && empty($user->rights->societe->client->voir)) { // If internal user: Check permission for internal users that are restricted on their objects if ($feature != 'ticket') { if (empty($dbt_keyfield)) { @@ -854,7 +964,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; $sql .= " AND (sc.fk_user = ".((int) $user->id)." OR sc.fk_user IS NULL)"; } - } elseif (!empty($conf->multicompany->enabled)) { + } elseif (isModEnabled('multicompany')) { // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -865,7 +975,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl //print $sql; // For events, check on users assigned to event - if ($feature === 'agenda') { + if ($feature === 'agenda' && $objectid > 0) { // Also check owner or attendee for users without allactions->read if ($objectid > 0 && empty($user->rights->agenda->allactions->read)) { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; @@ -879,7 +989,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl // For some object, we also have to check it is in the user hierarchy // Param $object must be the full object and not a simple id to have this test possible. - if (in_array($feature, $checkhierarchy) && is_object($object)) { + if (in_array($feature, $checkhierarchy) && is_object($object) && $objectid > 0) { $childids = $user->getAllChildIds(1); $useridtocheck = 0; if ($feature == 'holiday') { @@ -919,8 +1029,35 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl return true; } + /** - * Show a message to say access is forbidden and stop program + * Show a message to say access is forbidden and stop program. + * This includes only HTTP header. + * Calling this function terminate execution of PHP. + * + * @param string $message Force error message + * @param int $http_response_code HTTP response code + * @param int $stringalreadysanitized 1 if string is already sanitized with HTML entities + * @return void + * @see accessforbidden() + */ +function httponly_accessforbidden($message = 1, $http_response_code = 403, $stringalreadysanitized = 0) +{ + top_httphead(); + http_response_code($http_response_code); + + if ($stringalreadysanitized) { + print $message; + } else { + print htmlentities($message); + } + + exit(1); +} + +/** + * Show a message to say access is forbidden and stop program. + * This includes HTTP and HTML header and footer (except if $printheader and $printfooter is 0, use this case inside an already started page). * Calling this function terminate execution of PHP. * * @param string $message Force error message @@ -929,10 +1066,12 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl * @param int $showonlymessage Show only message parameter. Otherwise add more information. * @param array|null $params More parameters provided to hook * @return void + * @see httponly_accessforbidden() */ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0, $params = null) { global $conf, $db, $user, $langs, $hookmanager; + if (!is_object($langs)) { include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs = new Translate('', $conf); @@ -949,10 +1088,10 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho } } print '
    '; - if (!$message) { + if (empty($message)) { print $langs->trans("ErrorForbidden"); } else { - print $message; + print $langs->trans($message); } print '
    '; print '
    '; @@ -980,6 +1119,7 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho if ($printfooter && function_exists("llxFooter")) { llxFooter(); } + exit(0); } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 4b70419630f..b33ad1333ef 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -159,7 +159,7 @@ if (!function_exists('dol_loginfunction')) { /* $conf->css = "/theme/".(GETPOST('theme','aZ09')?GETPOST('theme','aZ09'):$conf->theme)."/style.css.php"; $themepath=dol_buildpath($conf->css,1); - if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application + if (!empty($conf->modules_parts['theme'])) // Using this feature slow down application { foreach($conf->modules_parts['theme'] as $reldir) { @@ -191,8 +191,26 @@ if (!function_exists('dol_loginfunction')) { // and the conf file is loaded. $prefix = dol_getprefix(''); $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; + if (!empty($conf->global->MAIN_SESSION_TIMEOUT)) { - setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", null, (empty($dolibarr_main_force_https) ? false : true), true); + if (session_status() != PHP_SESSION_ACTIVE) { + if (PHP_VERSION_ID < 70300) { + session_set_cookie_params(0, '/', null, ((empty($dolibarr_main_force_https) && isHTTPS() === false) ? false : true), true); // Add tag secure and httponly on session cookie (same as setting session.cookie_httponly into php.ini). Must be called before the session_start. + } else { + // Only available for php >= 7.3 + $sessioncookieparams = array( + 'lifetime' => 0, + 'path' => '/', + //'domain' => '.mywebsite.com', // the dot at the beginning allows compatibility with subdomains + 'secure' => ((empty($dolibarr_main_force_https) && isHTTPS() === false) ? false : true), + 'httponly' => true, + 'samesite' => 'Lax' // None || Lax || Strict + ); + session_set_cookie_params($sessioncookieparams); + } + + setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", null, (empty($dolibarr_main_force_https) ? false : true), true); + } } if (GETPOST('urlfrom', 'alpha')) { @@ -374,13 +392,16 @@ function encodedecode_dbpassconf($level = 0) $lineofpass = 0; + $reg = array(); if (preg_match('/^[^#]*dolibarr_main_db_encrypted_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) { // Old way to save crypted value $val = trim($reg[1]); // This also remove CR/LF $val = preg_replace('/^["\']/', '', $val); $val = preg_replace('/["\'][\s;]*$/', '', $val); if (!empty($val)) { $passwd_crypted = $val; + // method dol_encode/dol_decode $val = dol_decode($val); + //$val = dolEncrypt($val); $passwd = $val; $lineofpass = 1; } @@ -389,10 +410,17 @@ function encodedecode_dbpassconf($level = 0) $val = preg_replace('/^["\']/', '', $val); $val = preg_replace('/["\'][\s;]*$/', '', $val); if (preg_match('/crypted:/i', $buffer)) { + // method dol_encode/dol_decode $val = preg_replace('/crypted:/i', '', $val); $passwd_crypted = $val; $val = dol_decode($val); $passwd = $val; + } elseif (preg_match('/^dolcrypt:([^:]+):(.*)$/i', $buffer, $reg)) { + // method dolEncrypt/dolDecrypt + $val = preg_replace('/crypted:([^:]+):/i', '', $val); + $passwd_crypted = $val; + $val = dolDecrypt($buffer); + $passwd = $val; } else { $passwd = $val; $val = dol_encode($val); @@ -449,7 +477,7 @@ function encodedecode_dbpassconf($level = 0) * @param array $replaceambiguouschars Discard ambigous characters. For example array('I'). * @param int $length Length of random string (Used only if $generic is true) * @return string New value for password - * @see dol_hash() + * @see dol_hash(), dolJSToSetRandomPassword() */ function getRandomPassword($generic = false, $replaceambiguouschars = null, $length = 32) { @@ -527,3 +555,34 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len return $generated_password; } + +/** + * Ouput javacript to autoset a generated password using default module into a HTML element. + * + * @param string $htmlname HTML name of element to insert key into + * @param string $htmlnameofbutton HTML name of button + * @return string HTML javascript code to set a password + * @see getRandomPassword() + */ +function dolJSToSetRandomPassword($htmlname, $htmlnameofbutton = 'generate_token') +{ + global $conf; + + if (!empty($conf->use_javascript_ajax)) { + print "\n".''; + } +} diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 10bbefde7e5..6d9598a04ae 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -276,11 +276,11 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } /*TODO Add link to expeditiondet_batch - if (! empty($conf->productbatch->enabled)) + if (!empty($conf->productbatch->enabled)) { print ''; @@ -305,7 +305,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') // Description if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object = new $origin($db); $object->fetch($origin_id); $object->fetch_thirdparty(); @@ -341,14 +341,14 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') $product_static->status_batch = $objp->product_tobatch; $text = $product_static->getNomUrl(1); $text .= ' - '.$label; - $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($objp->description)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($objp->description)); print $form->textwithtooltip($text, $description, 3, '', '', $i); // Show range print_date_range($objp->date_start, $objp->date_end); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($objp->description) && $objp->description != $objp->product) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } @@ -385,7 +385,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; // Warehouse - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; + print ''; + print ''; + } + + // TopMenuDisableImages if ($foruserprofile) { /* print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; @@ -1094,7 +1131,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) ); if ($edit) { - print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0); + print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0); } else { if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) { print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND]; diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index af48ec64885..c258e3198ce 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -213,6 +213,53 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c return $content; } +/** + * Converts smiley string into the utf8 sequence. + * @param string $content Content to replace + * @return string Replacement of all smiley strings with their utf8 code + * @see dolWebsiteOutput() + */ +function dolReplaceSmileyCodeWithUTF8($content) +{ + $map = array( + ":face_with_tears_of_joy:" => "\xF0\x9F\x98\x82", + ":grinning_face_with_smiling_eyes:" => "\xF0\x9F\x98\x81", + ":smiling_face_with_open_mouth:" => "\xF0\x9F\x98\x83", + ":smiling_face_with_open_mouth_and_cold_sweat:" => "\xF0\x9F\x98\x85", + ":smiling_face_with_open_mouth_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x86", + ":winking_face:" => "\xF0\x9F\x98\x89", + ":smiling_face_with_smiling_eyes:" => "\xF0\x9F\x98\x8A", + ":face_savouring_delicious_food:" => "\xF0\x9F\x98\x8B", + ":relieved_face:" => "\xF0\x9F\x98\x8C", + ":smiling_face_with_heart_shaped_eyes:" => "\xF0\x9F\x98\x8D", + ":smiling_face_with_sunglasses:" => "\xF0\x9F\x98\x8E", + ":smirking_face:" => "\xF0\x9F\x98\x8F", + ":neutral_face:" => "\xF0\x9F\x98\x90", + ":expressionless_face:" => "\xF0\x9F\x98\x91", + ":unamused_face:" => "\xF0\x9F\x98\x92", + ":face_with_cold_sweat:" => "\xF0\x9F\x98\x93", + ":pensive_face:" => "\xF0\x9F\x98\x94", + ":confused_face:" => "\xF0\x9F\x98\x95", + ":confounded_face:" => "\xF0\x9F\x98\x96", + ":kissing_face:" => "\xF0\x9F\x98\x97", + ":face_throwing_a_kiss:" => "\xF0\x9F\x98\x98", + ":kissing_face_with_smiling_eyes:" => "\xF0\x9F\x98\x99", + ":kissing_face_with_closed_eyes:" => "\xF0\x9F\x98\x9A", + ":face_with_stuck_out_tongue:" => "\xF0\x9F\x98\x9B", + ":face_with_stuck_out_tongue_and_winking_eye:" => "\xF0\x9F\x98\x9C", + ":face_with_stuck_out_tongue_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x9D", + ":disappointed_face:" => "\xF0\x9F\x98\x9E", + ":worried_face:" => "\xF0\x9F\x98\x9F", + ":angry_face:" => "\xF0\x9F\x98\xA0", + ":face_with_symbols_on_mouth:" => "\xF0\x9F\x98\xA1", + ); + foreach ($map as $key => $value) { + $content = str_replace($key, $value, $content); + } + return $content; +} + + /** * Render a string of an HTML content and output it. * Used to ouput the page when viewed from a server (Dolibarr or Apache). @@ -369,6 +416,8 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $content = str_replace('global->MAIN_UMASK)) { + @chmod($file, octdec($conf->global->MAIN_UMASK)); + } + + return $result; +} /** * Show list of themes. Show all thumbs of themes/skins @@ -542,7 +563,7 @@ function dolSaveReadme($file, $content) */ function showWebsiteTemplates(Website $website) { - global $conf, $langs, $db, $form; + global $conf, $langs, $db, $form, $user; $dirthemes = array('/doctemplates/websites'); if (!empty($conf->modules_parts['websitetemplates'])) { // Using this feature slow down application @@ -561,17 +582,21 @@ function showWebsiteTemplates(Website $website) // Title print ''; print ''; print ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -101,19 +101,19 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Prefix setting of credit note $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // Parametrage du prefix des replacement $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; } // Prefix setting of deposit $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= '
    '.($plannedworkload ?convertSecondToTime($plannedworkload) : '').''.($plannedworkload ?convertSecondToTime($plannedworkload) : '').''; + print ''; //print $objp->planned_workload.'-'.$objp->declared_progess_workload."
    "; print ($plannedworkload ?round(100 * $declaredprogressworkload / $plannedworkload, 0).'%' : ''); print '
    '.$langs->trans("DateCreation").''.$langs->trans("DateDeliveryPlanned").''.$langs->trans("QtyPreparedOrShipped").''.$langs->trans("Warehouse").''; print ''.$objp->qty_shipped.''; if ($objp->warehouse_id > 0) { $warehousestatic->fetch($objp->warehouse_id); @@ -396,7 +396,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') // Batch number managment /*TODO Add link to expeditiondet_batch - if (! empty($conf->productbatch->enabled)) + if (!empty($conf->productbatch->enabled)) { //var_dump($objp->edrowid); $lines[$i]->detail_batch diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index c59acbea209..d26b20219ff 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -90,7 +90,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1) if ($mode == 1) { $out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)"; } else { - $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(empty($conf->multicompany->enabled) ? '' : $object->entity), '0'); + $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(!isModEnabled('multicompany') ? '' : $object->entity), '0'); } /* if ($mode == 1) { @@ -116,10 +116,40 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1) $out .= '&hashp='.$hashp; } }*/ + } elseif ($type == 'contract') { + $securekeyseed = isset($conf->global->CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN) ? $conf->global->CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN : ''; + $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=contract&ref='.($mode ? '' : ''); + if ($mode == 1) { + $out .= 'contract_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } + $out .= ($mode ? '' : ''); + if ($mode == 1) { + $out .= "hash('".$securekeyseed."' + '".$type."' + contract_ref)"; + } else { + $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(!isModEnabled('multicompany') ? '' : $object->entity), '0'); + } + } elseif ($type == 'fichinter') { + $securekeyseed = isset($conf->global->FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN) ? $conf->global->FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN : ''; + $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=fichinter&ref='.($mode ? '' : ''); + if ($mode == 1) { + $out .= 'fichinter_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } + $out .= ($mode ? '' : ''); + if ($mode == 1) { + $out .= "hash('".$securekeyseed."' + '".$type."' + fichinter_ref)"; + } else { + $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(!isModEnabled('multicompany') ? '' : $object->entity), '0'); + } } // For multicompany - if (!empty($out) && !empty($conf->multicompany->enabled)) { + if (!empty($out) && isModEnabled('multicompany')) { $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities } diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index c6b1bdefe6c..131093659b9 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -17,8 +17,8 @@ */ /** - * \file htdocs/core/lib/stock.lib.php - * \brief Library file with function for stock module + * \file htdocs/core/lib/stock.lib.php + * \brief Library file with function for stock module */ /** @@ -54,7 +54,7 @@ function stock_prepare_head($object) */ /* Disabled because will never be implemented. Table always empty. - if (! empty($conf->global->STOCK_USE_WAREHOUSE_BY_USER)) + if (!empty($conf->global->STOCK_USE_WAREHOUSE_BY_USER)) { // Should not be enabled by defaut because does not work yet correctly because // personnal stocks are not tagged into table llx_entrepot @@ -69,13 +69,15 @@ function stock_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'add', 'core'); $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'remove'); return $head; @@ -88,7 +90,12 @@ function stock_prepare_head($object) */ function stock_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('entrepot'); + $extrafields->fetch_name_optionals_label('stock_mouvement'); + $extrafields->fetch_name_optionals_label('inventory'); $h = 0; $head = array(); @@ -106,16 +113,28 @@ function stock_admin_prepare_head() $head[$h][0] = DOL_URL_ROOT.'/product/admin/stock_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['entrepot']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes'; $h++; $head[$h][0] = DOL_URL_ROOT.'/product/admin/stock_mouvement_extrafields.php'; $head[$h][1] = $langs->trans("StockMouvementExtraFields"); + $nbExtrafields = $extrafields->attributes['stock_mouvement']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'stockMouvementAttributes'; $h++; $head[$h][0] = DOL_URL_ROOT.'/product/admin/inventory_extrafields.php'; $head[$h][1] = $langs->trans("InventoryExtraFields"); + $nbExtrafields = $extrafields->attributes['inventory']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'inventoryAttributes'; $h++; diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php index e5c0ed7dbf9..11c0786802f 100644 --- a/htdocs/core/lib/supplier_proposal.lib.php +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2022 Frédéric 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 @@ -59,7 +60,7 @@ function supplier_proposal_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -96,6 +97,8 @@ function supplier_proposal_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'remove'); return $head; @@ -108,7 +111,11 @@ function supplier_proposal_prepare_head($object) */ function supplier_proposal_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('supplier_proposal'); + $extrafields->fetch_name_optionals_label('supplier_proposaldet'); $h = 0; $head = array(); @@ -126,11 +133,19 @@ function supplier_proposal_admin_prepare_head() $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/admin/supplier_proposal_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['supplier_proposal']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes'; $h++; $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/admin/supplier_proposaldet_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $nbExtrafields = $extrafields->attributes['supplier_proposaldet']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributeslines'; $h++; diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 049c2308a22..c7714501d90 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -57,7 +57,7 @@ function takepos_admin_prepare_head() $numterminals = max(1, getDolGlobalInt('TAKEPOS_NUM_TERMINALS', 1)); for ($i = 1; $i <= $numterminals; $i++) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i; - $head[$h][1] = $langs->trans("Terminal")." ".$i; + $head[$h][1] = getDolGlobalString('TAKEPOS_TERMINAL_NAME_'.$i, $langs->trans("TerminalName", $i)); $head[$h][2] = 'terminal'.$i; $h++; } diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index ef2f6bcf286..5d0d691228e 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Christophe Battarel - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2022 Frédéric 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 @@ -18,9 +18,9 @@ */ /** - * \file core/lib/ticket.lib.php - * \ingroup ticket - * \brief This file is a library for Ticket module + * \file core/lib/ticket.lib.php + * \ingroup ticket + * \brief This file is a library for Ticket module */ /** @@ -30,7 +30,10 @@ */ function ticketAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('ticket'); $langs->load("ticket"); @@ -44,6 +47,10 @@ function ticketAdminPrepareHead() $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsTicket"); + $nbExtrafields = $extrafields->attributes['ticket']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes'; $h++; @@ -79,7 +86,7 @@ function ticket_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?action=view&track_id='.$object->track_id; + $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?track_id='.$object->track_id; $head[$h][1] = $langs->trans("Ticket"); $head[$h][2] = 'tabTicket'; $h++; @@ -95,7 +102,7 @@ function ticket_prepare_head($object) $h++; } - complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'add', 'core'); // Attached files include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -133,6 +140,9 @@ function ticket_prepare_head($object) $head[$h][2] = 'tabTicketLogs'; $h++; + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'remove'); return $head; @@ -206,7 +216,7 @@ function generate_random_id($car = 16) function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { global $user, $conf, $langs, $mysoc; - + $urllogo = ""; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, 1); // Show html headers print ''; @@ -250,7 +260,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ if (!empty($conf->global->TICKET_IMAGE_PUBLIC_INTERFACE)) { print '
    '; - print ''; + print ''; print '
    '; } @@ -258,718 +268,3 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
    '; } - - - -/** - * Show html area with actions for ticket messaging. - * Note: Global parameter $param must be defined. - * - * @param Conf $conf Object conf - * @param Translate $langs Object langs - * @param DoliDB $db Object db - * @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object - * @param Contact $objcon Filter on object contact to filter events on a contact - * @param int $noprint Return string but does not output it - * @param string $actioncode Filter on actioncode - * @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all). - * @param array $filters Filter on other fields - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @return string|void Return html part or void if noprint is 1 - */ -function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') -{ - global $user, $conf; - global $form; - - global $param, $massactionbutton; - - dol_include_once('/comm/action/class/actioncomm.class.php'); - - // Check parameters - if (!is_object($filterobj) && !is_object($objcon)) { - dol_print_error('', 'BadParameter'); - } - - $histo = array(); - $numaction = 0; - $now = dol_now(); - - $sortfield_list = explode(',', $sortfield); - $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); - $sortfield_new_list = array(); - foreach ($sortfield_list as $sortfield_value) { - $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; - } - $sortfield_new = implode(',', $sortfield_new_list); - - if (isModEnabled('agenda')) { - // Search histo on actioncomm - if (is_object($objcon) && $objcon->id > 0) { - $sql = "SELECT DISTINCT a.id, a.label as label,"; - } else { - $sql = "SELECT a.id, a.label as label,"; - } - $sql .= " a.datep as dp,"; - $sql .= " a.note as message,"; - $sql .= " a.datep2 as dp2,"; - $sql .= " a.percent as percent, 'action' as type,"; - $sql .= " a.fk_element, a.elementtype,"; - $sql .= " a.fk_contact,"; - $sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; - $sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; - if (is_object($filterobj) && get_class($filterobj) == 'Societe') { - $sql .= ", sp.lastname, sp.firstname"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { - $sql .= ", m.lastname, m.firstname"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { - $sql .= ", o.ref"; - } - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; - - $force_filter_contact = false; - if (is_object($objcon) && $objcon->id > 0) { - $force_filter_contact = true; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; - $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".((int) $objcon->id); - } - - if (is_object($filterobj) && get_class($filterobj) == 'Societe') { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; - $sql .= " ON er.resource_type = 'dolresource'"; - $sql .= " AND er.element_id = a.id"; - $sql .= " AND er.resource_id = ".((int) $filterobj->id); - } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { - $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { - $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { - $sql .= ", ".MAIN_DB_PREFIX."product as o"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { - $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { - $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { - $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; - } - - $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; - if ($force_filter_contact === false) { - if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) { - $sql .= " AND a.fk_soc = ".((int) $filterobj->id); - } elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) { - $sql .= " AND a.fk_project = ".((int) $filterobj->id); - } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { - $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; - if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); - } - } - } - - // Condition on actioncode - if (!empty($actioncode)) { - if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($actioncode == 'AC_NON_AUTO') { - $sql .= " AND c.type != 'systemauto'"; - } elseif ($actioncode == 'AC_ALL_AUTO') { - $sql .= " AND c.type = 'systemauto'"; - } else { - if ($actioncode == 'AC_OTH') { - $sql .= " AND c.type != 'systemauto'"; - } elseif ($actioncode == 'AC_OTH_AUTO') { - $sql .= " AND c.type = 'systemauto'"; - } - } - } else { - if ($actioncode == 'AC_NON_AUTO') { - $sql .= " AND c.type != 'systemauto'"; - } elseif ($actioncode == 'AC_ALL_AUTO') { - $sql .= " AND c.type = 'systemauto'"; - } else { - $sql .= " AND c.code = '".$db->escape($actioncode)."'"; - } - } - } - if ($donetodo == 'todo') { - $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - } elseif ($donetodo == 'done') { - $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - } - if (is_array($filters) && $filters['search_agenda_label']) { - $sql .= natural_search('a.label', $filters['search_agenda_label']); - } - } - - // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. - if (!empty($conf->mailing->enabled) && !empty($objcon->email) - && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) { - $langs->load("mails"); - - $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; - $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id"; - $sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; - $sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action - if (is_object($filterobj) && get_class($filterobj) == 'Societe') { - $sql2 .= ", '' as lastname, '' as firstname"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { - $sql2 .= ", '' as lastname, '' as firstname"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { - $sql2 .= ", '' as ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { - $sql2 .= ", '' as ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { - $sql2 .= ", '' as ref"; - } - $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; - $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. - $sql2 .= " AND mc.statut = 1"; - $sql2 .= " AND u.rowid = m.fk_user_valid"; - $sql2 .= " AND mc.fk_mailing=m.rowid"; - } - - if (!empty($sql) && !empty($sql2)) { - $sql = $sql." UNION ".$sql2; - } elseif (empty($sql) && !empty($sql2)) { - $sql = $sql2; - } - - // TODO Add limit in nb of results - if ($sql) { // May not be defined if module Agenda is not enabled and mailing module disabled too - $sql .= $db->order($sortfield_new, $sortorder); - - dol_syslog("ticket.lib::show_ticket_messaging", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) { - $i = 0; - $num = $db->num_rows($resql); - - while ($i < $num) { - $obj = $db->fetch_object($resql); - - if ($obj->type == 'action') { - $contactaction = new ActionComm($db); - $contactaction->id = $obj->id; - $result = $contactaction->fetchResources(); - if ($result < 0) { - dol_print_error($db); - setEventMessage("ticket.lib::show_ticket_messaging Error fetch ressource", 'errors'); - } - - //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - $tododone = ''; - if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) { - $tododone = 'todo'; - } - - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>$tododone, - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, - - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo, - - 'contact_id'=>$obj->fk_contact, - 'socpeopleassigned' => $contactaction->socpeopleassigned, - 'lastname'=>$obj->lastname, - 'firstname'=>$obj->firstname, - 'fk_element'=>$obj->fk_element, - 'elementtype'=>$obj->elementtype, - // Type of event - 'acode'=>$obj->acode, - 'alabel'=>$obj->alabel, - 'libelle'=>$obj->alabel, // deprecated - 'apicto'=>$obj->apicto - ); - } else { - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>'done', - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, - 'acode'=>$obj->acode, - - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo - ); - } - - $numaction++; - $i++; - } - } else { - dol_print_error($db); - } - } - - // Set $out to sow events - $out = ''; - - if (empty($conf->agenda->enabled)) { - $langs->loadLangs(array("admin", "errors")); - $out = info_admin($langs->trans("WarningModuleXDisabledSoYouMayMissEventHere", $langs->transnoentitiesnoconv("Module2400Name")), 0, 0, 'warning'); - } - - if (isModEnabled('agenda') || (!empty($conf->mailing->enabled) && !empty($objcon->email))) { - $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; - - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; - - $formactions = new FormActions($db); - - $actionstatic = new ActionComm($db); - $userstatic = new User($db); - $contactstatic = new Contact($db); - $userGetNomUrlCache = array(); - - $out .= '
    '; - $out .= ''; - $out .= ''; - - if ($objcon && get_class($objcon) == 'Contact' && - (is_null($filterobj) || get_class($filterobj) == 'Societe')) { - $out .= ''; - } else { - $out .= ''; - } - if ($filterobj && get_class($filterobj) == 'Societe') { - $out .= ''; - } - - $out .= "\n"; - - $out .= '
    '; - $out .= ''; - - $out .= ''; - - $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n"; - - $out .= ''; - if ($donetodo) { - $out .= ''; - } - $out .= ''; - $out .= ''; - - $out .= ''; - $out .= ''; - - - $out .= '
    '.$langs->trans("Search").' : '; - $out .= ''; - //$out .= img_picto($langs->trans("Type"), 'type'); - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, 0, 1, 'minwidth200imp'); - $out .= ''; - $out .= ''; - $out .= ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - $out .= $searchpicto; - $out .= '
    '; - - $out .= ''; - $out .= '
    '; - - $out .= "\n"; - - $out .= '\n"; - } - - if ($noprint) { - return $out; - } else { - print $out; - } -} - -/** - * Get timeline icon - * @param ActionComm $actionstatic actioncomm - * @param array $histo histo - * @param int $key key - * @return string - */ -function getTicketTimelineIcon($actionstatic, &$histo, $key) -{ - global $conf, $langs; - $out = ''."\n"; - $iconClass = 'fa fa-comments'; - $img_picto = ''; - $colorClass = ''; - $pictoTitle = ''; - - if ($histo[$key]['percent'] == -1) { - $colorClass = 'timeline-icon-not-applicble'; - $pictoTitle = $langs->trans('StatusNotApplicable'); - } elseif ($histo[$key]['percent'] == 0) { - $colorClass = 'timeline-icon-todo'; - $pictoTitle = $langs->trans('StatusActionToDo').' (0%)'; - } elseif ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100) { - $colorClass = 'timeline-icon-in-progress'; - $pictoTitle = $langs->trans('StatusActionInProcess').' ('.$histo[$key]['percent'].'%)'; - } elseif ($histo[$key]['percent'] >= 100) { - $colorClass = 'timeline-icon-done'; - $pictoTitle = $langs->trans('StatusActionDone').' (100%)'; - } - - if ($actionstatic->code == 'AC_TICKET_CREATE') { - $iconClass = 'fa fa-ticket'; - } elseif ($actionstatic->code == 'AC_TICKET_MODIFY') { - $iconClass = 'fa fa-pencilxxx'; - } elseif ($actionstatic->code == 'TICKET_MSG') { - $iconClass = 'fa fa-comments'; - } elseif ($actionstatic->code == 'TICKET_MSG_PRIVATE') { - $iconClass = 'fa fa-mask'; - } elseif (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($actionstatic->type_picto) { - $img_picto = img_picto('', $actionstatic->type_picto); - } else { - if ($actionstatic->type_code == 'AC_RDV') { - $iconClass = 'fa fa-handshake'; - } elseif ($actionstatic->type_code == 'AC_TEL') { - $iconClass = 'fa fa-phone'; - } elseif ($actionstatic->type_code == 'AC_FAX') { - $iconClass = 'fa fa-fax'; - } elseif ($actionstatic->type_code == 'AC_EMAIL') { - $iconClass = 'fa fa-envelope'; - } elseif ($actionstatic->type_code == 'AC_INT') { - $iconClass = 'fa fa-shipping-fast'; - } elseif ($actionstatic->type_code == 'AC_OTH_AUTO') { - $iconClass = 'fa fa-robot'; - } elseif (!preg_match('/_AUTO/', $actionstatic->type_code)) { - $iconClass = 'fa fa-robot'; - } - } - } - - $out .= ''.$img_picto.''."\n"; - return $out; -} - -/** - * getTicketActionCommEcmList - * - * @param ActionComm $object Object ActionComm - * @return array Array of documents in index table - */ -function getTicketActionCommEcmList($object) -{ - global $conf, $db; - - $documents = array(); - - $sql = 'SELECT ecm.rowid as id, ecm.src_object_type, ecm.src_object_id, ecm.filepath, ecm.filename'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'ecm_files ecm'; - $sql .= " WHERE ecm.filepath = 'agenda/".((int) $object->id)."'"; - //$sql.= " ecm.src_object_type = '".$db->escape($object->element)."' AND ecm.src_object_id = ".((int) $object->id); // Old version didn't add object_type during upload - $sql .= ' ORDER BY ecm.position ASC'; - - $resql = $db->query($sql); - if ($resql) { - if ($db->num_rows($resql)) { - while ($obj = $db->fetch_object($resql)) { - $documents[$obj->id] = $obj; - } - } - } - - return $documents; -} diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 16cd6cc6069..273e7285273 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -99,7 +99,7 @@ function user_prepare_head(User $object) $h++; } - if (!empty($conf->clicktodial->enabled)) { + if (isModEnabled('clicktodial')) { $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$object->id; $head[$h][1] = $langs->trans("ClickToDial"); $head[$h][2] = 'clicktodial'; @@ -107,7 +107,7 @@ function user_prepare_head(User $object) } // Notifications - if ($user->socid == 0 && !empty($conf->notification->enabled)) { + if ($user->socid == 0 && isModEnabled('notification')) { $nbNote = 0; $sql = "SELECT COUNT(n.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n"; @@ -142,9 +142,9 @@ function user_prepare_head(User $object) complete_head_from_modules($conf, $langs, $object, $head, $h, 'user'); if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read)) - || (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) - || (!empty($conf->holiday->enabled) && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->readall)) + || (isModEnabled('hrm') && !empty($user->rights->hrm->employee->read)) + || (isModEnabled('expensereport') && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) + || (isModEnabled('holiday') && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->readall)) ) { // Bank $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id; @@ -157,7 +157,10 @@ function user_prepare_head(User $object) if (empty($user->socid)) { // Notes $nbNote = 0; - if (!empty($object->note)) { + if (!empty($object->note_public)) { + $nbNote++; + } + if (!empty($object->note_private)) { $nbNote++; } $head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id; @@ -212,7 +215,7 @@ function group_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("GroupCard"); + $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'group'; $h++; @@ -250,7 +253,11 @@ function group_prepare_head($object) */ function user_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('user'); + $extrafields->fetch_name_optionals_label('usergroup'); $langs->load("users"); $h = 0; @@ -268,11 +275,19 @@ function user_admin_prepare_head() $head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Users").")"; + $nbExtrafields = $extrafields->attributes['user']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes'; $h++; $head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Groups").")"; + $nbExtrafields = $extrafields->attributes['usergroup']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'attributes_group'; $h++; @@ -455,13 +470,35 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; } + //Dark mode + if ($foruserprofile) { + //Nothing + } else { + $listofdarkmodes = array( + '0' => $langs->trans("AlwaysDisabled"), + '1' => $langs->trans("AccordingToBrowser"), + '2' => $langs->trans("AlwaysEnabled") + ); + print '
    '.$langs->trans("DarkThemeMode").''; + if ($edit) { + print $form->selectarray('THEME_DARKMODEENABLED', $listofdarkmodes, isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0); + } else { + print $listofdarkmodes[isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0]; + } + print $form->textwithpicto('', $langs->trans("DoesNotWorkWithAllThemes")); + print '
    '.$langs->trans("TopMenuDisableImages").''.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).'conf->THEME_ELDY_TEXTLINK)?" checked":""); + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -543,7 +580,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -586,7 +623,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -630,7 +667,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_VERMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -803,7 +840,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTLINK:$langs->trans("Default")).'conf->THEME_ELDY_TEXTLINK)?" checked":""); + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -946,7 +983,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_BTNACTION:$langs->trans("Default")).'conf->THEME_ELDY_BTNACTION)?" checked":""); + print 'conf->THEME_ELDY_BTNACTION)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -992,7 +1029,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTBTNACTION:$langs->trans("Default")).'conf->THEME_ELDY_TEXTBTNACTION)?" checked":""); + print 'conf->THEME_ELDY_TEXTBTNACTION)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -1041,10 +1078,10 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; //print ajax_constantonoff("MAIN_OPTIMIZEFORTEXTBROWSER", array(), null, 0, 0, 1, 0); if ($edit) { - print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1); + print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1); } else { if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER); + print yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0); } else { print yn(1); if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) { @@ -1077,8 +1114,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } - // Use MAIN_OPTIMIZEFORTEXTBROWSER - if ($foruserprofile && !empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND)) { + // Use MAIN_OPTIMIZEFORCOLORBLIND + if ($foruserprofile) { //$default=yn($conf->global->MAIN_OPTIMIZEFORCOLORBLIND); $default = $langs->trans('No'); print '
    '; print $form->textwithpicto($langs->trans("Templates"), $langs->trans("ThemeDir").' : '.join(", ", $dirthemes)); + print ' '; + print ''; + print img_picto('', 'refresh'); + print ''; print ''; $url = 'https://www.dolistore.com/43-web-site-templates'; print ''; - print $langs->trans('DownloadMoreSkins'); + print img_picto('', 'globe', 'class="pictofixedwidth"').$langs->trans('DownloadMoreSkins'); print ''; print '
    '; - print ''; - } elseif ($don->modepaymentcode == 'LIQ') { + } elseif ($modepaymentcode == 'LIQ') { $ModePaiement = ''; - } elseif ($don->modepaymentcode == 'VIR' || $don->modepaymentcode == 'PRE' || $don->modepaymentcode == 'CB') { + } elseif ($modepaymentcode == 'VIR' || $modepaymentcode == 'PRE' || $modepaymentcode == 'CB') { $ModePaiement = ''; } else { $ModePaiement = ''; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index f2035c89575..73793c5a757 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -175,7 +175,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -278,7 +280,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +289,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -299,8 +301,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition dol_mkdir($conf->expedition->dir_temp); if (!is_writable($conf->expedition->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->expedition->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 17999e59e4c..b87298d3dd8 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -63,9 +63,9 @@ class pdf_espadon extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -134,10 +134,10 @@ class pdf_espadon extends ModelePdfExpedition $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_draft_watermark = 1; // Support add of a watermark on drafts @@ -210,7 +210,7 @@ class pdf_espadon extends ModelePdfExpedition $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -221,7 +221,7 @@ class pdf_espadon extends ModelePdfExpedition $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -312,7 +312,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -330,7 +330,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift: 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift: 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -338,7 +338,7 @@ class pdf_espadon extends ModelePdfExpedition // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -428,7 +428,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->AddPage(); $pagenb++; if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); // $this->_pagefoot($pdf,$object,$outputlangs,1); $pdf->setTopMargin($tab_top_newpage); // The only function to edit the bottom margin of current page to set it. @@ -482,7 +482,7 @@ class pdf_espadon extends ModelePdfExpedition // apply note frame to last page $pdf->setPage($pageposafternote); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $height_note = $posyafter - $tab_top_newpage; $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); } else // No pagebreak @@ -500,7 +500,7 @@ class pdf_espadon extends ModelePdfExpedition $pageposafternote++; $pdf->setPage($pageposafternote); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $posyafter = $tab_top_newpage; } @@ -554,7 +554,7 @@ class pdf_espadon extends ModelePdfExpedition if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposbefore + 1); $curY = $tab_top_newpage; @@ -596,7 +596,7 @@ class pdf_espadon extends ModelePdfExpedition if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter + 1); } } else { @@ -705,7 +705,7 @@ class pdf_espadon extends ModelePdfExpedition $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -725,7 +725,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -994,20 +994,20 @@ class pdf_espadon extends ModelePdfExpedition } // Show barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -1197,8 +1197,7 @@ class pdf_espadon extends ModelePdfExpedition */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index e37977144d2..e847dc26fec 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -64,9 +64,9 @@ class pdf_merou extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -135,10 +135,10 @@ class pdf_merou extends ModelePdfExpedition $this->page_largeur = $formatarray['width']; $this->page_hauteur = round($formatarray['height'] / 2); $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo @@ -266,7 +266,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -281,7 +281,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetTextColor(0, 0, 0); $tab_top = 52; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 92ae5a6569f..71fb4c4c194 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -64,9 +64,9 @@ class pdf_rouget extends ModelePdfExpedition /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -135,10 +135,10 @@ class pdf_rouget extends ModelePdfExpedition $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_draft_watermark = 1; // Support add of a watermark on drafts @@ -235,7 +235,7 @@ class pdf_rouget extends ModelePdfExpedition $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -246,7 +246,7 @@ class pdf_rouget extends ModelePdfExpedition $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; @@ -337,7 +337,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -355,13 +355,13 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -465,7 +465,7 @@ class pdf_rouget extends ModelePdfExpedition if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -510,7 +510,7 @@ class pdf_rouget extends ModelePdfExpedition if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -611,7 +611,7 @@ class pdf_rouget extends ModelePdfExpedition $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -631,7 +631,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -939,20 +939,20 @@ class pdf_rouget extends ModelePdfExpedition } // Show barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -1142,8 +1142,7 @@ class pdf_rouget extends ModelePdfExpedition */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 43c1ae9e4de..f365173ddbe 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2016-2021 Philippe Grand + * Copyright (C) 2016-2022 Philippe Grand * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2018 Francis Appels * Copyright (C) 2019 Markus Welters @@ -71,9 +71,9 @@ class pdf_standard extends ModeleExpenseReport /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -119,10 +119,10 @@ class pdf_standard extends ModeleExpenseReport $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -152,7 +152,7 @@ class pdf_standard extends ModeleExpenseReport $this->posxqty = 150; $this->postotalht = 160; $this->postotalttc = 180; - // if (empty($conf->project->enabled)) { + // if (!isModEnabled('project')) { // $this->posxtva-=20; // $this->posxup-=20; // $this->posxqty-=20; @@ -268,7 +268,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Trips")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -286,7 +286,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetTextColor(0, 0, 0); $tab_top = 95; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 65 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 65 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -361,7 +361,7 @@ class pdf_standard extends ModeleExpenseReport if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -390,7 +390,7 @@ class pdf_standard extends ModeleExpenseReport if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -447,7 +447,7 @@ class pdf_standard extends ModeleExpenseReport $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -467,7 +467,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -584,7 +584,7 @@ class pdf_standard extends ModeleExpenseReport if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $nextColumnPosX = $this->posxtva; } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $nextColumnPosX = $this->posxprojet; } @@ -600,7 +600,7 @@ class pdf_standard extends ModeleExpenseReport //$pdf->MultiCell($nextColumnPosX-$this->posxtype-0.8, 4, $expensereporttypecodetoshow, 0, 'C'); // Project - //if (! empty($conf->project->enabled)) + //if (isModEnabled('project')) //{ // $pdf->SetFont('','', $default_font_size - 1); // $pdf->SetXY($this->posxprojet, $curY); @@ -958,7 +958,7 @@ class pdf_standard extends ModeleExpenseReport // $pdf->MultiCell($this->posxprojet-$this->posxtype - 1, 2, $outputlangs->transnoentities("Type"), '', 'C'); //} - //if (!empty($conf->project->enabled)) + //if (isModEnabled('project')) //{ // // Project // $pdf->line($this->posxprojet - 1, $tab_top, $this->posxprojet - 1, $tab_top + $tab_height); @@ -1043,7 +1043,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->MultiCell(15, 3, $outputlangs->transnoentities("Amount"), 0, 'C', 0); $pdf->SetXY($tab3_posx + 35, $tab3_top + 1); $pdf->MultiCell(30, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0); - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $pdf->SetXY($tab3_posx + 65, $tab3_top + 1); $pdf->MultiCell(25, 3, $outputlangs->transnoentities("BankAccount"), 0, 'L', 0); } @@ -1083,7 +1083,7 @@ class pdf_standard extends ModeleExpenseReport $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->p_code); $pdf->MultiCell(40, 3, $oper, 0, 'L', 0); - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $pdf->SetXY($tab3_posx + 65, $tab3_top + $y + 1); $pdf->MultiCell(30, 3, $row->baref, 0, 'L', 0); } @@ -1129,8 +1129,7 @@ class pdf_standard extends ModeleExpenseReport */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'EXPENSEREPORT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index c403aa8c228..d14f17de067 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -82,7 +82,8 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport // Parametrage du prefix $texte .= ''; - $texte .= ''; + $mask = empty($conf->global->EXPENSEREPORT_SAND_MASK) ? '' : $conf->global->EXPENSEREPORT_SAND_MASK; + $texte .= ''; $texte .= ''; @@ -128,7 +129,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->EXPENSEREPORT_SAND_MASK; + $mask = empty($conf->global->EXPENSEREPORT_SAND_MASK) ? '' : $conf->global->EXPENSEREPORT_SAND_MASK; if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 88ae937bb6d..26f20378b23 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -220,12 +220,21 @@ class ExportCsv extends ModeleExports } else { $outputlangs->charset_output = 'ISO-8859-1'; } + $selectlabel = array(); foreach ($array_selected_sorted as $code => $value) { $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded $newvalue = $this->csvClean($newvalue, $outputlangs->charset_output); fwrite($this->handle, $newvalue.$this->separator); + $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; + + if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { + $selectlabel[$code."_label"] = $newvalue."_label"; + } + } + foreach ($selectlabel as $key => $value) { + fwrite($this->handle, $value.$this->separator); } fwrite($this->handle, "\n"); return 0; @@ -256,7 +265,7 @@ class ExportCsv extends ModeleExports $this->col = 0; $reg = array(); - + $selectlabelvalues = array(); foreach ($array_selected_sorted as $code => $value) { if (strpos($code, ' as ') == 0) { $alias = str_replace(array('.', '-', '(', ')'), '_', $code); @@ -275,17 +284,26 @@ class ExportCsv extends ModeleExports $newvalue = $outputlangs->transnoentities($reg[1]); } + // Clean data and add encloser if required (depending on value of USE_STRICT_CSV_RULES) $newvalue = $this->csvClean($newvalue, $outputlangs->charset_output); if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { - $array = json_decode($typefield, true); - $array = $array['options']; - $newvalue = $array[$newvalue]; + $array = jsonOrUnserialize($typefield); + if (is_array($array) && !empty($newvalue)) { + $array = $array['options']; + $selectlabelvalues[$code."_label"] = $array[$newvalue]; + } else { + $selectlabelvalues[$code."_label"] = ""; + } } fwrite($this->handle, $newvalue.$this->separator); $this->col++; } + foreach ($selectlabelvalues as $key => $value) { + fwrite($this->handle, $value.$this->separator); + $this->col++; + } fwrite($this->handle, "\n"); return 0; @@ -338,13 +356,16 @@ class ExportCsv extends ModeleExports $newvalue = dol_htmlcleanlastbr($newvalue); //print $charset.' '.$newvalue."\n"; - // Rule 1 CSV: No CR, LF in cells (except if USE_STRICT_CSV_RULES is on, we can keep record as it is but we must add quotes) + // Rule 1 CSV: No CR, LF in cells (except if USE_STRICT_CSV_RULES is 1, we can keep record as it is but we must add quotes) $oldvalue = $newvalue; $newvalue = str_replace("\r", '', $newvalue); $newvalue = str_replace("\n", '\n', $newvalue); if (!empty($conf->global->USE_STRICT_CSV_RULES) && $oldvalue != $newvalue) { - // If strict use of CSV rules, we just add quote - $newvalue = $oldvalue; + // If we must use enclusure on text with CR/LF) + if ($conf->global->USE_STRICT_CSV_RULES == 1) { + // If we use strict CSV rules (original value must remain but we add quote) + $newvalue = $oldvalue; + } $addquote = 1; } diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 54842ff8278..fba0dfa1c4a 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -85,7 +85,7 @@ class ExportExcel2007 extends ModeleExports $this->extension = 'xlsx'; // Extension for generated file by this driver $this->picto = 'mime/xls'; // Picto $this->version = '1.30'; // Driver version - $this->phpmin = array(5, 6); // Minimum version of PHP required by module + $this->phpmin = array(7, 0); // Minimum version of PHP required by module $this->disabled = 0; @@ -253,6 +253,7 @@ class ExportExcel2007 extends ModeleExports // Create a format for the column headings $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); $this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT); + $selectlabel = array(); $this->col = 1; if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { @@ -264,6 +265,11 @@ class ExportExcel2007 extends ModeleExports if (empty($alias)) { dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); } + $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; + + if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { + $selectlabel[$code."_label"] = $alias."_label"; + } if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { $this->worksheet->write($this->row, $this->col, $outputlangs->transnoentities($alias), $formatheader); } else { @@ -274,6 +280,17 @@ class ExportExcel2007 extends ModeleExports } $this->col++; } + foreach ($selectlabel as $key => $value) { + if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { + $this->worksheet->write($this->row, $this->col, $outputlangs->transnoentities($value), $formatheader); + } else { + $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, $outputlangs->transnoentities($value)); + if (!empty($array_types[$code]) && in_array($array_types[$code], array('Date', 'Numeric', 'TextAuto'))) { // Set autowidth for some types + $this->workbook->getActiveSheet()->getColumnDimension($this->column2Letter($this->col + 1))->setAutoSize(true); + } + } + $this->col++; + } $this->row++; return 0; } @@ -300,7 +317,7 @@ class ExportExcel2007 extends ModeleExports } $reg = array(); - + $selectlabelvalues = array(); foreach ($array_selected_sorted as $code => $value) { if (strpos($code, ' as ') == 0) { $alias = str_replace(array('.', '-', '(', ')'), '_', $code); @@ -316,9 +333,13 @@ class ExportExcel2007 extends ModeleExports $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { - $array = json_decode($typefield, true); - $array = $array['options']; - $newvalue = $array[$newvalue]; + $array = jsonOrUnserialize($typefield); + if (is_array($array) && !empty($newvalue)) { + $array = $array['options']; + $selectlabelvalues[$code."_label"] = $array[$newvalue]; + } else { + $selectlabelvalues[$code."_label"] = ""; + } } // Traduction newvalue @@ -350,6 +371,29 @@ class ExportExcel2007 extends ModeleExports } $this->col++; } + foreach ($selectlabelvalues as $key => $newvalue) { + if (preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/i', $newvalue)) { + $newvalue = dol_stringtotime($newvalue); + $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($newvalue)); + $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); + $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('yyyy-mm-dd'); + } elseif (preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]$/i', $newvalue)) { + $newvalue = dol_stringtotime($newvalue); + $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($newvalue)); + $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); + $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('yyyy-mm-dd h:mm:ss'); + } else { + if ($typefield == 'Text' || $typefield == 'TextAuto') { + $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, (string) $newvalue); + $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); + $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@'); + $this->workbook->getActiveSheet()->getStyle($coord)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT); + } else { + $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, $newvalue); + } + } + $this->col++; + } $this->row++; return 0; } diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 7718dd3e350..40ee75a1749 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -205,11 +205,20 @@ class ExportTsv extends ModeleExports public function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable + $selectlabel = array(); foreach ($array_selected_sorted as $code => $value) { $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded $newvalue = $this->tsv_clean($newvalue, $outputlangs->charset_output); fwrite($this->handle, $newvalue.$this->separator); + $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; + + if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { + $selectlabel[$code."_label"] = $newvalue."_label"; + } + } + foreach ($selectlabel as $key => $value) { + fwrite($this->handle, $value.$this->separator); } fwrite($this->handle, "\n"); return 0; @@ -232,6 +241,7 @@ class ExportTsv extends ModeleExports global $conf; $this->col = 0; + $selectlabelvalues = array(); foreach ($array_selected_sorted as $code => $value) { if (strpos($code, ' as ') == 0) { $alias = str_replace(array('.', '-', '(', ')'), '_', $code); @@ -253,14 +263,22 @@ class ExportTsv extends ModeleExports $newvalue = $this->tsv_clean($newvalue, $outputlangs->charset_output); if (preg_match('/^Select:/i', $typefield) && $typefield = substr($typefield, 7)) { - $array = json_decode($typefield, true); - $array = $array['options']; - $newvalue = $array[$newvalue]; + $array = jsonOrUnserialize($typefield); + if (is_array($array) && !empty($newvalue)) { + $array = $array['options']; + $selectlabelvalues[$code."_label"] = $array[$newvalue]; + } else { + $selectlabelvalues[$code."_label"] = ""; + } } fwrite($this->handle, $newvalue.$this->separator); $this->col++; } + foreach ($selectlabelvalues as $key => $value) { + fwrite($this->handle, $value.$this->separator); + $this->col++; + } fwrite($this->handle, "\n"); return 0; } diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index fc73460bd1b..0b8fa2d4621 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -47,9 +47,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -174,7 +174,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -278,7 +280,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +289,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; //print "newdir=".$dir; //print "newfile=".$newfile; @@ -300,8 +302,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures dol_mkdir($conf->facture->dir_temp); if (!is_writable($conf->facture->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->facture->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->facture->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index af927f6d188..ee4cc9b5d0d 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -9,6 +9,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2017-2018 Ferran Marcet * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2022 Anthony Berton * * 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 @@ -70,9 +71,9 @@ class pdf_crabe extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -155,10 +156,10 @@ class pdf_crabe extends ModelePDFFactures $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -298,9 +299,9 @@ class pdf_crabe extends ModelePDFFactures if ($conf->facture->dir_output) { $object->fetch_thirdparty(); - $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $deja_regle = $object->getSommePaiement((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) { @@ -373,7 +374,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($mysoc->name.($user->id > 0 ? ' - '.$outputlangs->convToOutputCharset($user->getFullName($outputlangs)) : '')); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -448,14 +449,14 @@ class pdf_crabe extends ModelePDFFactures // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // You can add more thing under header here, if you increase $extra_under_address_shift too. $extra_under_address_shift = 0; $qrcodestring = ''; - if (! empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) { + if (!empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) { $qrcodestring = $object->buildZATCAQRString(); - } elseif (! empty($conf->global->INVOICE_ADD_SWISS_QR_CODE)) { + } elseif (!empty($conf->global->INVOICE_ADD_SWISS_QR_CODE)) { $qrcodestring = $object->buildSwitzerlandQRString(); } if ($qrcodestring) { @@ -491,7 +492,7 @@ class pdf_crabe extends ModelePDFFactures // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -578,8 +579,9 @@ class pdf_crabe extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } $pdf->setPage($pageposbefore + 1); @@ -621,8 +623,9 @@ class pdf_crabe extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } $pdf->setPage($pageposafter + 1); } @@ -707,13 +710,13 @@ class pdf_crabe extends ModelePDFFactures // Collection of totals by value of VAT in $this->tva["taux"]=total_tva $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } } else { - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $sign * $object->lines[$i]->total_tva; @@ -749,10 +752,18 @@ class pdf_crabe extends ModelePDFFactures // retrieve global local tax if ($localtax1_type && $localtax1ligne != 0) { - $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; + if (empty($this->localtax1[$localtax1_type][$localtax1_rate])) { + $this->localtax1[$localtax1_type][$localtax1_rate] = $localtax1ligne; + } else { + $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; + } } if ($localtax2_type && $localtax2ligne != 0) { - $this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne; + if (empty($this->localtax2[$localtax2_type][$localtax2_rate])) { + $this->localtax2[$localtax2_type][$localtax2_rate] = $localtax2ligne; + } else { + $this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne; + } } if (($object->lines[$i]->info_bits & 0x01) == 0x01) { @@ -797,8 +808,9 @@ class pdf_crabe extends ModelePDFFactures $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } if (!empty($tplidx)) { $pdf->useTemplate($tplidx); @@ -817,8 +829,9 @@ class pdf_crabe extends ModelePDFFactures $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } } } @@ -942,8 +955,9 @@ class pdf_crabe extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } $pdf->setPage($current_page); $this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height); @@ -966,7 +980,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx + 58, $tab3_top + $y); @@ -1004,8 +1018,9 @@ class pdf_crabe extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { - $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $top_shift = $this->_pagehead($pdf, $object, 0, $outputlangs); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); } $pdf->setPage($current_page); $this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height); @@ -1016,7 +1031,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); @@ -1134,10 +1149,10 @@ class pdf_crabe extends ModelePDFFactures // Check a payment mode is defined if (empty($object->mode_reglement_code) && empty($conf->global->FACTURE_CHQ_NUMBER) - && empty($conf->global->FACTURE_RIB_NUMBER)) { + && !getDolGlobalInt('FACTURE_RIB_NUMBER')) { $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); } elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) - || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) { + || ($object->mode_reglement_code == 'VIR' && !getDolGlobalInt('FACTURE_RIB_NUMBER') && empty($object->fk_account) && empty($object->fk_bank))) { // Avoid having any valid PDF with setup that is not complete $outputlangs->load("errors"); @@ -1163,22 +1178,42 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement); + //#21654: add account number used for the debit + if ($object->mode_reglement_code == "PRE") { + require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; + $bac = new CompanyBankAccount($this->db); + $bac->fetch(0, $object->thirdparty->id); + $iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; + $lib_mode_reg .= $outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1)); + } $pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L'); $posy = $pdf->GetY(); } + // Show if Option VAT debit option is on also if transmitter is french + // Decret n°2099-1299 2022-10-07 + // French mention : "Option pour le paiement de la taxe d'après les débits" + if ($this->emetteur->country_code == 'FR') { + if (isset($conf->global->TAX_MODE) && $conf->global->TAX_MODE == 1) { + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1); + + $posy = $pdf->GetY() + 1; + } + } + // Show online payment link if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') { $useonlinepayment = 0; if (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) { - if (!empty($conf->paypal->enabled)) { + if (isModEnabled('paypal')) { $useonlinepayment++; } - if (!empty($conf->stripe->enabled)) { + if (isModEnabled('stripe')) { $useonlinepayment++; } - if (!empty($conf->paybox->enabled)) { + if (isModEnabled('paybox')) { $useonlinepayment++; } } @@ -1239,7 +1274,7 @@ class pdf_crabe extends ModelePDFFactures // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -1315,14 +1350,14 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total") : ''), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -1333,7 +1368,7 @@ class pdf_crabe extends ModelePDFFactures // FIXME amount of vat not supported with multicurrency //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1365,7 +1400,7 @@ class pdf_crabe extends ModelePDFFactures } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1427,7 +1462,7 @@ class pdf_crabe extends ModelePDFFactures } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1457,7 +1492,7 @@ class pdf_crabe extends ModelePDFFactures } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1537,8 +1572,8 @@ class pdf_crabe extends ModelePDFFactures } $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) { @@ -2036,6 +2071,43 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection); + + // Show shipping address + if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS')) { + $idaddressshipping = $object->getIdContact('external', 'SHIPPING'); + + if (!empty($idaddressshipping)) { + $contactshipping = $object->fetch_Contact($idaddressshipping[0]); + $object->fetch_thirdparty($object->contact->fk_soc); + $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); + } else { + $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); + $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);; + } + if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) { + $posy += $hautcadre; + + // Show shipping frame + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->MultiCell($widthrecbox, '', $langs->trans('ShippingTo'), 0, 'L', 0); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + + // Show shipping name + $pdf->SetXY($posx + 2, $posy + 3); + $pdf->SetFont('', 'B', $default_font_size); + $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name_shipping, '', 'L'); + + $posy = $pdf->getY(); + + // Show shipping information + $pdf->SetXY($posx+2, $posy); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); + $top_shift += $hautcadre; + } + } } $pdf->SetTextColor(0, 0, 0); @@ -2054,8 +2126,7 @@ class pdf_crabe extends ModelePDFFactures */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 5733122ec13..1bea6b0db67 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -9,6 +9,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2018 Frédéric France + * Copyright (C) 2022 Anthony Berton * * 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 @@ -70,9 +71,9 @@ class pdf_sponge extends ModelePDFFactures /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -115,6 +116,32 @@ class pdf_sponge extends ModelePDFFactures */ public $marge_basse; + + /** + * @var int heightforinfotot + */ + public $heightforinfotot; + + /** + * @var int heightforfreetext + */ + public $heightforfreetext; + + /** + * @var int heightforfooter + */ + public $heightforfooter; + + /** + * @var int tab_top + */ + public $tab_top; + + /** + * @var int tab_top_newpage + */ + public $tab_top_newpage; + /** * Issuer * @var Societe Object that emits @@ -156,10 +183,10 @@ class pdf_sponge extends ModelePDFFactures $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -259,7 +286,7 @@ class pdf_sponge extends ModelePDFFactures $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -277,7 +304,7 @@ class pdf_sponge extends ModelePDFFactures } foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -305,9 +332,9 @@ class pdf_sponge extends ModelePDFFactures if ($conf->facture->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); - $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $deja_regle = $object->getSommePaiement((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) { @@ -345,9 +372,9 @@ class pdf_sponge extends ModelePDFFactures $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $pdf->SetAutoPageBreak(1, 0); - $heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part - $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page - $heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) + $this->heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part + $this->heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page + $this->heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); @@ -374,7 +401,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($mysoc->name.($user->id > 0 ? ' - '.$outputlangs->convToOutputCharset($user->getFullName($outputlangs)) : '')); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -422,23 +449,25 @@ class pdf_sponge extends ModelePDFFactures $pagenb++; // Output header (logo, ref and address blocks). This is first call for first page. - $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); + $pagehead = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); + $top_shift = $pagehead['top_shift']; + $shipp_shift = $pagehead['shipp_shift']; $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->SetTextColor(0, 0, 0); // $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher - // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) + $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // You can add more thing under header here, if you increase $extra_under_address_shift too. $extra_under_address_shift = 0; $qrcodestring = ''; - if (! empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) { + if (!empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) { $qrcodestring = $object->buildZATCAQRString(); - } elseif (! empty($conf->global->INVOICE_ADD_SWISS_QR_CODE)) { + } elseif (!empty($conf->global->INVOICE_ADD_SWISS_QR_CODE)) { $qrcodestring = $object->buildSwitzerlandQRString(); } if ($qrcodestring) { @@ -452,7 +481,7 @@ class pdf_sponge extends ModelePDFFactures 'module_width' => 1, // width of a single module in points 'module_height' => 1 // height of a single module in points ); - $pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $tab_top - 5, 25, 25, $styleQr, 'N'); + $pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $this->tab_top - 5, 25, 25, $styleQr, 'N'); $extra_under_address_shift += 25; } @@ -469,32 +498,32 @@ class pdf_sponge extends ModelePDFFactures $extra_under_address_shift += $hookmanager->resArray['extra_under_header_shift']; } - $tab_top += $extra_under_address_shift; - $tab_top_newpage += 0; + $this->tab_top += $extra_under_address_shift; + $this->tab_top_newpage += 0; // Define heigth of table for lines (for first page) - $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; + $tab_height = $this->page_hauteur - $this->tab_top - $this->heightforfooter - $this->heightforfreetext; - $nexY = $tab_top - 1; + $nexY = $this->tab_top - 1; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { - $tab_top -= 2; + $this->tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1); $nexY = max($pdf->GetY(), $nexY); - $height_incoterms = $nexY - $tab_top; + $height_incoterms = $nexY - $this->tab_top; // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); - $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); - $tab_top = $nexY + 6; + $this->tab_top = $nexY + 6; $height_incoterms += 4; } } @@ -521,7 +550,7 @@ class pdf_sponge extends ModelePDFFactures $pagenb = $pdf->getPage(); if ($notetoshow) { - $tab_top -= 2; + $this->tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; $pageposbeforenote = $pagenb; @@ -534,7 +563,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->startTransaction(); $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); // Description $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -549,33 +578,33 @@ class pdf_sponge extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } // $this->_pagefoot($pdf,$object,$outputlangs,1); - $pdf->setTopMargin($tab_top_newpage); + $pdf->setTopMargin($this->tab_top_newpage); // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); } // back to start $pdf->setPage($pageposbeforenote); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; $pdf->setPage($pageposafternote); - $pdf->setTopMargin($tab_top_newpage); + $pdf->setTopMargin($this->tab_top_newpage); // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); - //$posyafter = $tab_top_newpage; + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); + //$posyafter = $this->tab_top_newpage; } @@ -588,11 +617,11 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetDrawColor(128, 128, 128); // Draw note frame if ($i > $pageposbeforenote) { - $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + $height_note = $this->page_hauteur - ($this->tab_top_newpage + $this->heightforfooter); + $pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1); } else { - $height_note = $this->page_hauteur - ($tab_top + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + $height_note = $this->page_hauteur - ($this->tab_top + $this->heightforfooter); + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1); } // Add footer @@ -607,20 +636,20 @@ class pdf_sponge extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } - $height_note = $posyafter - $tab_top_newpage; - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + $height_note = $posyafter - $this->tab_top_newpage; + $pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1); } else { // No pagebreak $pdf->commitTransaction(); $posyafter = $pdf->GetY(); - $height_note = $posyafter - $tab_top; - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + $height_note = $posyafter - $this->tab_top; + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) { // not enough space, need to add page $pdf->AddPage('', '', true); $pagenb++; @@ -629,16 +658,16 @@ class pdf_sponge extends ModelePDFFactures if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } - $posyafter = $tab_top_newpage; + $posyafter = $this->tab_top_newpage; } } $tab_height = $tab_height - $height_note; - $tab_top = $posyafter + 6; + $this->tab_top = $posyafter + 6; } else { $height_note = 0; } @@ -648,10 +677,10 @@ class pdf_sponge extends ModelePDFFactures // Table simulation to know the height of the title line (this set this->tableTitleHeight) $pdf->startTransaction(); - $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); + $this->pdfTabTitles($pdf, $this->tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); - $nexY = $tab_top + $this->tabTitleHeight; + $nexY = $this->tab_top + $this->tabTitleHeight; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -667,8 +696,8 @@ class pdf_sponge extends ModelePDFFactures $imglinesize = pdf_getSizeForImage($realpatharray[$i]); } - $pdf->setTopMargin($tab_top_newpage); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. + $pdf->setTopMargin($this->tab_top_newpage); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore = $pdf->getPage(); $showpricebeforepagebreak = 1; @@ -677,14 +706,14 @@ class pdf_sponge extends ModelePDFFactures if ($this->getColumnStatus('photo')) { // We start with Photo of product line - if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } $pdf->setPage($pageposbefore + 1); - $curY = $tab_top_newpage; + $curY = $this->tab_top_newpage; // Allows data in the first page if description is long enough to break in multiples pages if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { @@ -711,14 +740,14 @@ class pdf_sponge extends ModelePDFFactures if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $this->heightforfooter); // The only function to edit the bottom margin of current page to set it. $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text + //var_dump($posyafter); var_dump(($this->page_hauteur - ($this->heightforfooter+$this->heightforfreetext+$this->heightforinfotot))); exit; + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // There is no space left for total+free text if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (!empty($tplidx)) { @@ -752,7 +781,7 @@ class pdf_sponge extends ModelePDFFactures // We suppose that a too long description or photo were moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { $pdf->setPage($pageposafter); - $curY = $tab_top_newpage; + $curY = $this->tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font @@ -845,13 +874,13 @@ class pdf_sponge extends ModelePDFFactures // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } } else { - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $sign * $object->lines[$i]->total_tva; @@ -923,15 +952,15 @@ class pdf_sponge extends ModelePDFFactures while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); } $this->_pagefoot($pdf, $object, $outputlangs, 1); $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } if (!empty($tplidx)) { @@ -941,9 +970,9 @@ class pdf_sponge extends ModelePDFFactures if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { if ($pagenb == $pageposafter) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); } $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page @@ -952,7 +981,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } } @@ -960,11 +989,11 @@ class pdf_sponge extends ModelePDFFactures // Show square if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1; } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1; } // Display infos area @@ -1102,7 +1131,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx + 58, $tab3_top + $y); @@ -1138,7 +1167,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); @@ -1216,55 +1245,78 @@ class pdf_sponge extends ModelePDFFactures // Check a payment mode is defined if (empty($object->mode_reglement_code) && empty($conf->global->FACTURE_CHQ_NUMBER) - && empty($conf->global->FACTURE_RIB_NUMBER)) { - $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); + && !getDolGlobalInt('FACTURE_RIB_NUMBER')) { + $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); } elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) - || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) { - // Avoid having any valid PDF with setup that is not complete - $outputlangs->load("errors"); + || ($object->mode_reglement_code == 'VIR' && !getDolGlobalInt('FACTURE_RIB_NUMBER') && empty($object->fk_account) && empty($object->fk_bank))) { + // Avoid having any valid PDF with setup that is not complete + $outputlangs->load("errors"); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200, 0, 0); + $pdf->SetFont('', 'B', $default_font_size - 2); + $this->error = $outputlangs->transnoentities("ErrorPaymentModeDefinedToWithoutSetup", $object->mode_reglement_code); + $pdf->MultiCell($posxend - $this->marge_gauche, 3, $this->error, 0, 'L', 0); + $pdf->SetTextColor(0, 0, 0); + + $posy = $pdf->GetY() + 1; + } + + // Show payment mode + if (!empty($object->mode_reglement_code) + && $object->mode_reglement_code != 'CHQ' + && $object->mode_reglement_code != 'VIR') { + $pdf->SetFont('', 'B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("PaymentMode").':'; + $pdf->MultiCell($posxend - $this->marge_gauche, 5, $titre, 0, 'L'); + + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posxval, $posy); + $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement); + + //#21654: add account number used for the debit + if ($object->mode_reglement_code == "PRE") { + require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; + $bac = new CompanyBankAccount($this->db); + $bac->fetch(0, $object->thirdparty->id); + $iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; + $lib_mode_reg .= $outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1)); + } + + $pdf->MultiCell($posxend - $posxval, 5, $lib_mode_reg, 0, 'L'); + + $posy = $pdf->GetY(); + } + + // Show if Option VAT debit option is on also if transmitter is french + // Decret n°2099-1299 2022-10-07 + // French mention : "Option pour le paiement de la taxe d'après les débits" + if ($this->emetteur->country_code == 'FR') { + if (isset($conf->global->TAX_MODE) && $conf->global->TAX_MODE == 1) { $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200, 0, 0); - $pdf->SetFont('', 'B', $default_font_size - 2); - $this->error = $outputlangs->transnoentities("ErrorPaymentModeDefinedToWithoutSetup", $object->mode_reglement_code); - $pdf->MultiCell($posxend - $this->marge_gauche, 3, $this->error, 0, 'L', 0); - $pdf->SetTextColor(0, 0, 0); + $pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1); $posy = $pdf->GetY() + 1; + } } - // Show payment mode - if (!empty($object->mode_reglement_code) - && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') { - $pdf->SetFont('', 'B', $default_font_size - 2); - $pdf->SetXY($this->marge_gauche, $posy); - $titre = $outputlangs->transnoentities("PaymentMode").':'; - $pdf->MultiCell($posxend - $this->marge_gauche, 5, $titre, 0, 'L'); - - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posxval, $posy); - $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement); - $pdf->MultiCell($posxend - $posxval, 5, $lib_mode_reg, 0, 'L'); - - $posy = $pdf->GetY(); - } - - // Show online payment link + // Show online payment link if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') { $useonlinepayment = 0; if (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) { - if (!empty($conf->paypal->enabled)) { + if (isModEnabled('paypal')) { $useonlinepayment++; } - if (!empty($conf->stripe->enabled)) { + if (isModEnabled('stripe')) { $useonlinepayment++; } - if (!empty($conf->paybox->enabled)) { + if (isModEnabled('paybox')) { $useonlinepayment++; } } + if ($object->statut != Facture::STATUS_DRAFT && $useonlinepayment) { require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; global $langs; @@ -1321,7 +1373,7 @@ class pdf_sponge extends ModelePDFFactures // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -1432,10 +1484,15 @@ class pdf_sponge extends ModelePDFFactures $posy = $pdf->GetY(); foreach ($TPreviousIncoice as &$fac) { - if ($posy > $this->page_hauteur - 4) { + if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) { $this->_pagefoot($pdf, $object, $outputlangs, 1); $pdf->addPage(); - $pdf->setY($this->marge_haute); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); + $pdf->setY($this->tab_top_newpage); + } else { + $pdf->setY($this->marge_haute); + } $posy = $pdf->GetY(); } @@ -1495,9 +1552,15 @@ class pdf_sponge extends ModelePDFFactures $posy += $tab2_hl; - if ($posy > $this->page_hauteur - 4) { + if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) { $pdf->addPage(); - $pdf->setY($this->marge_haute); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { + $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); + $pdf->setY($this->tab_top_newpage); + } else { + $pdf->setY($this->marge_haute); + } + $posy = $pdf->GetY(); } @@ -1509,7 +1572,7 @@ class pdf_sponge extends ModelePDFFactures // Get Total HT - $total_ht = (!empty($conf->multicurrency->enabled) && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = (isModEnabled("multicurrency") && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); // Total remise $total_line_remise = 0; @@ -1547,14 +1610,14 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total") : ''), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -1565,7 +1628,7 @@ class pdf_sponge extends ModelePDFFactures // FIXME amount of vat not supported with multicurrency //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1597,7 +1660,7 @@ class pdf_sponge extends ModelePDFFactures } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1682,7 +1745,7 @@ class pdf_sponge extends ModelePDFFactures } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1713,7 +1776,7 @@ class pdf_sponge extends ModelePDFFactures } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1799,8 +1862,8 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) { @@ -2162,6 +2225,7 @@ class pdf_sponge extends ModelePDFFactures $posy += 1; $top_shift = 0; + $shipp_shift = 0; // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); @@ -2184,7 +2248,6 @@ class pdf_sponge extends ModelePDFFactures $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; - // Show sender frame if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { $pdf->SetTextColor(0, 0, 0); @@ -2262,10 +2325,49 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection); + + // Show shipping address + if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS')) { + $idaddressshipping = $object->getIdContact('external', 'SHIPPING'); + + if (!empty($idaddressshipping)) { + $contactshipping = $object->fetch_Contact($idaddressshipping[0]); + $object->fetch_thirdparty($object->contact->fk_soc); + $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); + } else { + $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); + $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);; + } + if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) { + $posy += $hautcadre; + + // Show shipping frame + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->MultiCell($widthrecbox, '', $langs->trans('ShippingTo'), 0, 'L', 0); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + + // Show shipping name + $pdf->SetXY($posx + 2, $posy + 3); + $pdf->SetFont('', 'B', $default_font_size); + $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name_shipping, '', 'L'); + + $posy = $pdf->getY(); + + // Show shipping information + $pdf->SetXY($posx+2, $posy); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); + $shipp_shift += $hautcadre; + } + } } $pdf->SetTextColor(0, 0, 0); - return $top_shift; + + $pagehead = array('top_shift' => $top_shift, 'shipp_shift' => $shipp_shift); + return $pagehead; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore @@ -2280,8 +2382,7 @@ class pdf_sponge extends ModelePDFFactures */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 7a572615a21..321741ea8a0 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2007 Regis Houssin - * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2013 Juanjo Menent +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2013 uanjo Menent + * Copyright (C) 2022 Anthony Berton * * 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 @@ -143,16 +144,28 @@ class mod_facture_mercure extends ModeleNumRefFactures // Get Mask value $mask = ''; if (is_object($invoice) && $invoice->type == 1) { - $mask = $conf->global->FACTURE_MERCURE_MASK_REPLACEMENT; + if (isset($conf->global->FACTURE_MERCURE_MASK_REPLACEMENT)) { + $mask = $conf->global->FACTURE_MERCURE_MASK_REPLACEMENT; + } if (!$mask) { - $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; + if (isset($conf->global->FACTURE_MERCURE_MASK_INVOICE)) { + $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; + } } } elseif (is_object($invoice) && $invoice->type == 2) { - $mask = $conf->global->FACTURE_MERCURE_MASK_CREDIT; + if (isset($conf->global->FACTURE_MERCURE_MASK_CREDIT)) { + $mask = $conf->global->FACTURE_MERCURE_MASK_CREDIT; + } } elseif (is_object($invoice) && $invoice->type == 3) { - $mask = $conf->global->FACTURE_MERCURE_MASK_DEPOSIT; + if (isset($conf->global->FACTURE_MERCURE_MASK_DEPOSIT)) { + $mask = $conf->global->FACTURE_MERCURE_MASK_DEPOSIT; + } } else { - $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; + if (isset($conf->global->FACTURE_MERCURE_MASK_INVOICE)) { + $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; + } else { + $mask = ''; + } } if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index bb4a6826278..7616fba5c6b 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -66,9 +66,9 @@ class pdf_soleil extends ModelePDFFicheinter /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -137,10 +137,10 @@ class pdf_soleil extends ModelePDFFicheinter $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION @@ -258,7 +258,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("InterventionCard")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -275,7 +275,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -378,7 +378,7 @@ class pdf_soleil extends ModelePDFFicheinter if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -415,7 +415,7 @@ class pdf_soleil extends ModelePDFFicheinter $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -435,7 +435,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -741,8 +741,7 @@ class pdf_soleil extends ModelePDFFicheinter */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index cb5acddd6e9..8efd936601b 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -84,7 +84,7 @@ class mod_arctic extends ModeleNumRefFicheinter // Setting the prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We define the search criteria of the counter - $mask = $conf->global->FICHINTER_ARTIC_MASK; + $mask = getDolGlobalString("FICHINTER_ARTIC_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/hrm/mod_evaluation_standard.php b/htdocs/core/modules/hrm/mod_evaluation_standard.php index 4c5bb083870..b6b517b8fb9 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_standard.php +++ b/htdocs/core/modules/hrm/mod_evaluation_standard.php @@ -26,7 +26,7 @@ dol_include_once('/core/modules/hrm/modules_evaluation.php'); /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for HR evaluation */ class mod_evaluation_standard extends ModeleNumRefEvaluation { diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index ea1cb757223..e1699660acc 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -115,7 +115,7 @@ class ImportCsv extends ModeleImports $this->datatoimport = $datatoimport; if (preg_match('/^societe_/', $datatoimport)) { - $this->thirpartyobject = new Societe($this->db); + $this->thirdpartyobject = new Societe($this->db); } } @@ -570,8 +570,8 @@ class ImportCsv extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomercodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codeclient(0, 0); - $newval = $this->thirpartyobject->code_client; + $this->thirdpartyobject->get_codeclient(0, 0); + $newval = $this->thirdpartyobject->code_client; //print 'code_client='.$newval; } if (empty($newval)) { @@ -579,8 +579,8 @@ class ImportCsv extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsuppliercodeifauto') { if (strtolower($newval) == 'auto') { - $newval = $this->thirpartyobject->get_codefournisseur(0, 1); - $newval = $this->thirpartyobject->code_fournisseur; + $newval = $this->thirdpartyobject->get_codefournisseur(0, 1); + $newval = $this->thirdpartyobject->code_fournisseur; //print 'code_fournisseur='.$newval; } if (empty($newval)) { @@ -588,8 +588,8 @@ class ImportCsv extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomeraccountancycodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codecompta('customer'); - $newval = $this->thirpartyobject->code_compta; + $this->thirdpartyobject->get_codecompta('customer'); + $newval = $this->thirdpartyobject->code_compta; //print 'code_compta='.$newval; } if (empty($newval)) { @@ -597,8 +597,8 @@ class ImportCsv extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsupplieraccountancycodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codecompta('supplier'); - $newval = $this->thirpartyobject->code_compta_fournisseur; + $this->thirdpartyobject->get_codecompta('supplier'); + $newval = $this->thirdpartyobject->code_compta_fournisseur; if (empty($newval)) { $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" } @@ -736,7 +736,7 @@ class ImportCsv extends ModeleImports } // Define $listfields and $listvalues to build SQL request - if ($conf->socialnetworks->enabled && strpos($fieldname, "socialnetworks") !== false) { + if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) { if (!in_array("socialnetworks", $listfields)) { $listfields[] = "socialnetworks"; $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array @@ -853,7 +853,7 @@ class ImportCsv extends ModeleImports foreach ($updatekeys as $key) { $col = $objimport->array_import_updatekeys[0][$key]; $key = preg_replace('/^.*\./i', '', $key); - if ($conf->socialnetworks->enabled && strpos($key, "socialnetworks") !== false) { + if (isModEnabled("socialnetworks") && strpos($key, "socialnetworks") !== false) { $tmp = explode("_", $key); $key = $tmp[0]; $socialnetwork = $tmp[1]; @@ -994,7 +994,9 @@ class ImportCsv extends ModeleImports if ($sql) { $resql = $this->db->query($sql); if ($resql) { - $last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr). + if (!$is_table_category_link) { + $last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr). + } $insertdone = true; } else { //print 'E'; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index eb781b66586..0e63ea77075 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -133,7 +133,7 @@ class ImportXlsx extends ModeleImports $this->datatoimport = $datatoimport; if (preg_match('/^societe_/', $datatoimport)) { - $this->thirpartyobject = new Societe($this->db); + $this->thirdpartyobject = new Societe($this->db); } } @@ -615,8 +615,8 @@ class ImportXlsx extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomercodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codeclient(0, 0); - $newval = $this->thirpartyobject->code_client; + $this->thirdpartyobject->get_codeclient(0, 0); + $newval = $this->thirdpartyobject->code_client; //print 'code_client='.$newval; } if (empty($newval)) { @@ -624,8 +624,8 @@ class ImportXlsx extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsuppliercodeifauto') { if (strtolower($newval) == 'auto') { - $newval = $this->thirpartyobject->get_codefournisseur(0, 1); - $newval = $this->thirpartyobject->code_fournisseur; + $newval = $this->thirdpartyobject->get_codefournisseur(0, 1); + $newval = $this->thirdpartyobject->code_fournisseur; //print 'code_fournisseur='.$newval; } if (empty($newval)) { @@ -633,8 +633,8 @@ class ImportXlsx extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomeraccountancycodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codecompta('customer'); - $newval = $this->thirpartyobject->code_compta; + $this->thirdpartyobject->get_codecompta('customer'); + $newval = $this->thirdpartyobject->code_compta; //print 'code_compta='.$newval; } if (empty($newval)) { @@ -642,8 +642,8 @@ class ImportXlsx extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsupplieraccountancycodeifauto') { if (strtolower($newval) == 'auto') { - $this->thirpartyobject->get_codecompta('supplier'); - $newval = $this->thirpartyobject->code_compta_fournisseur; + $this->thirdpartyobject->get_codecompta('supplier'); + $newval = $this->thirdpartyobject->code_compta_fournisseur; if (empty($newval)) { $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" } @@ -947,6 +947,7 @@ class ImportXlsx extends ModeleImports // Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object' $sqlSelect = "SELECT rowid FROM " . $tablename; + if (empty($keyfield)) { $keyfield = 'rowid'; } @@ -1040,7 +1041,9 @@ class ImportXlsx extends ModeleImports if ($sql) { $resql = $this->db->query($sql); if ($resql) { - $last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr). + if (!$is_table_category_link) { + $last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr). + } $insertdone = true; } else { //print 'E'; diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 688db8b8e7f..7649c255d04 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -42,7 +42,7 @@ class mailing_advthirdparties extends MailingTargets */ public $db; - public $enabled = '$conf->societe->enabled'; + public $enabled = 'isModEnabled("societe")'; /** diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index decbc81716b..64097078147 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -38,7 +38,7 @@ class mailing_contacts1 extends MailingTargets public $require_module = array("societe"); // Module mailing actif si modules require_module actifs public $require_admin = 0; // Module mailing actif pour user admin ou non - public $enabled = '$conf->societe->enabled'; + public $enabled = 'isModEnabled("societe")'; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png @@ -388,6 +388,7 @@ class mailing_contacts1 extends MailingTargets } $sql .= " WHERE sp.entity IN (".getEntity('contact').")"; $sql .= " AND sp.email <> ''"; + $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = sp.email) = 0"; // Exclude unsubscribed email adresses $sql .= " AND sp.statut = 1"; @@ -409,7 +410,7 @@ class mailing_contacts1 extends MailingTargets // Filter on language if ($filter_lang != '') { - $sql .= " AND sp.default_lang = '".$this->db->escape($filter_lang)."'"; + $sql .= " AND sp.default_lang LIKE '".$this->db->escape($filter_lang)."%'"; } // Filter on nature diff --git a/htdocs/core/modules/mailings/eventorganization.modules.php b/htdocs/core/modules/mailings/eventorganization.modules.php new file mode 100644 index 00000000000..84c27c5f673 --- /dev/null +++ b/htdocs/core/modules/mailings/eventorganization.modules.php @@ -0,0 +1,212 @@ + + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * + * This file is an example to follow to add your own email selector inside + * the Dolibarr email tool. + * Follow instructions given in README file to know what to change to build + * your own emailing list selector. + * Code that need to be changed in this file are marked by "CHANGE THIS" tag. + */ + +/** + * \file htdocs/core/modules/mailings/eventorganization.modules.php + * \ingroup mailing + * \brief Example file to provide a list of recipients for mailing module + */ + + +// Load Dolibarr Environment +include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; + + +/** + * Class to manage a list of personalised recipients for mailing feature + */ +class mailing_eventorganization extends MailingTargets +{ + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + public $name = 'AttendeesOfOrganizedEvent'; + public $desc = "Attendees of an organized event"; + + public $require_admin = 0; + + public $require_module = array(); // This module allows to select by categories must be also enabled if category module is not activated + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'conferenceorbooth'; + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $enabled = 'isModEnabled("eventorganization")'; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $conf, $langs; + $langs->load('companies'); + + $this->db = $db; + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * This is the main function that returns the array of emails + * + * @param int $mailing_id Id of mailing. No need to use it. + * @return int <0 if error, number of emails added if ok + */ + public function add_to_target($mailing_id) + { + // phpcs:enable + global $conf, $langs; + + $cibles = array(); + $addDescription = ''; + + $sql = "SELECT p.ref, p.entity, e.rowid as id, e.fk_project, e.email as email, e.email_company as company_name, e.firstname as firstname, e.lastname as lastname,"; + $sql .= " 'eventorganizationattendee' as source"; + $sql .= " FROM ".MAIN_DB_PREFIX."eventorganization_conferenceorboothattendee as e,"; + $sql .= " ".MAIN_DB_PREFIX."projet as p"; + $sql .= " WHERE e.email <> ''"; + $sql .= " AND e.fk_project = p.rowid"; + $sql .= " AND p.entity IN (".getEntity('project').")"; + $sql .= " AND e.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".((int) $mailing_id).")"; + $sql .= " AND e.fk_project = ".((int) GETPOST('filter_eventorganization', 'int')); + $sql .= " ORDER BY e.email"; + + // Stock recipients emails into targets table + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + $i = 0; + $j = 0; + + dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); + + $old = ''; + while ($i < $num) { + $obj = $this->db->fetch_object($result); + if ($old <> $obj->email) { + $otherTxt = ($obj->ref ? $langs->transnoentities("Project").'='.$obj->ref : ''); + if (strlen($addDescription) > 0 && strlen($otherTxt) > 0) { + $otherTxt .= ";"; + } + $otherTxt .= $addDescription; + $cibles[$j] = array( + 'email' => $obj->email, + 'fk_project' => $obj->fk_project, + 'lastname' => $obj->lastname, + 'firstname' => $obj->firstname, + 'other' => $otherTxt, + 'source_url' => $this->url($obj->id, $obj->source), + 'source_id' => $obj->id, + 'source_type' => $obj->source + ); + $old = $obj->email; + $j++; + } + + $i++; + } + } else { + dol_syslog($this->db->error()); + $this->error = $this->db->error(); + return -1; + } + + return parent::addTargetsToDatabase($mailing_id, $cibles); + } + + + /** + * On the main mailing area, there is a box with statistics. + * If you want to add a line in this report you must provide an + * array of SQL request that returns two field: + * One called "label", One called "nb". + * + * @return array Array with SQL requests + */ + public function getSqlArrayForStats() + { + // CHANGE THIS: Optionnal + + //var $statssql=array(); + //$this->statssql[0]="SELECT field1 as label, count(distinct(email)) as nb FROM mytable WHERE email IS NOT NULL"; + return array(); + } + + + /** + * Return here number of distinct emails returned by your selector. + * For example if this selector is used to extract 500 different + * emails from a text file, this function must return 500. + * + * @param string $sql Requete sql de comptage + * @return int|string Nb of recipient, or <0 if error, or '' if NA + */ + public function getNbOfRecipients($sql = '') + { + global $conf; + + $sql = "SELECT COUNT(DISTINCT(e.email)) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."eventorganization_conferenceorboothattendee as e, "; + $sql .= " ".MAIN_DB_PREFIX."projet as p"; + $sql .= " WHERE e.email <> ''"; + $sql .= " AND e.fk_project = p.rowid"; + $sql .= " AND p.entity IN (".getEntity('project').")"; + + //print $sql; + + // La requete doit retourner un champ "nb" pour etre comprise par parent::getNbOfRecipients + return parent::getNbOfRecipients($sql); + } + + /** + * This is to add a form filter to provide variant of selector + * If used, the HTML select must be called "filter" + * + * @return string A html select zone + */ + public function formFilter() + { + global $conf, $langs; + + $langs->load("companies"); + + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; + $formproject = new FormProjets($this->db); + $s .= $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1'); + + return $s; + } + + + /** + * Can include an URL link on each record provided by selector shown on target page. + * + * @param int $id ID + * @param string $sourcetype Source type + * @return string Url link + */ + public function url($id, $sourcetype = 'thirdparty') + { + if ($sourcetype == 'project') { + return ''.img_object('', "eventorganization").''; + } + + return ''; + } +} diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php deleted file mode 100644 index 739ab773196..00000000000 --- a/htdocs/core/modules/mailings/example.modules.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * This file is an example to follow to add your own email selector inside - * the Dolibarr email tool. - * Follow instructions given in README file to know what to change to build - * your own emailing list selector. - * Code that need to be changed in this file are marked by "CHANGE THIS" tag. - */ - -/** - * \file htdocs/core/modules/mailings/example.modules.php - * \ingroup mailing - * \brief Example file to provide a list of recipients for mailing module - */ - -include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; - - -// CHANGE THIS: Class name must be called mailing_xxx with xxx=name of your selector - -/** - \class mailing_example - \brief Class to manage a list of personalised recipients for mailing feature -*/ -class mailing_example extends MailingTargets -{ - // CHANGE THIS: Put here a name not already used - public $name = 'example'; - // CHANGE THIS: Put here a description of your selector module. - // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found - public $desc = 'Put here a description'; - // CHANGE THIS: Set to 1 if selector is available for admin users only - public $require_admin = 0; - // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector - public $tooltip = 'MyTooltipLangKey'; - - public $require_module = array(); - - /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = ''; - - /** - * @var DoliDB Database handler. - */ - public $db; - - - // CHANGE THIS: Constructor name must be called mailing_xxx with xxx=name of your selector - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * This is the main function that returns the array of emails - * - * @param int $mailing_id Id of mailing. No need to use it. - * @return int <0 if error, number of emails added if ok - */ - public function add_to_target($mailing_id) - { - // phpcs:enable - $target = array(); - - // CHANGE THIS - // ----- Your code start here ----- - - // You must fill the $target array with record like this - // $target[0]=array('email'=>'email_0','name'=>'name_0','firstname'=>'firstname_0', 'other'=>'other_0'); - // ... - // $target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n'); - - // Example: $target[0]=array('email'=>'myemail@example.com', 'name'=>'Doe', 'firstname'=>'John', 'other'=>'Other information'); - - // ----- Your code end here ----- - - return parent::addTargetsToDatabase($mailing_id, $target); - } - - - /** - * On the main mailing area, there is a box with statistics. - * If you want to add a line in this report you must provide an - * array of SQL request that returns two field: - * One called "label", One called "nb". - * - * @return array Array with SQL requests - */ - public function getSqlArrayForStats() - { - // CHANGE THIS: Optionnal - - //var $statssql=array(); - //$this->statssql[0]="SELECT field1 as label, count(distinct(email)) as nb FROM mytable WHERE email IS NOT NULL"; - return array(); - } - - - /** - * Return here number of distinct emails returned by your selector. - * For example if this selector is used to extract 500 different - * emails from a text file, this function must return 500. - * - * @param string $sql Requete sql de comptage - * @return int|string Nb of recipient, or <0 if error, or '' if NA - */ - public function getNbOfRecipients($sql = '') - { - // CHANGE THIS: Optionnal - - // Example: return parent::getNbOfRecipients("SELECT count(*) as nb from dolibarr_table"); - // Example: return 500; - return '?'; - } - - /** - * This is to add a form filter to provide variant of selector - * If used, the HTML select must be called "filter" - * - * @return string A html select zone - */ - public function formFilter() - { - // CHANGE THIS: Optionnal - - $s = ''; - return $s; - } - - - /** - * Can include an URL link on each record provided by selector - * shown on target page. - * - * @param int $id ID - * @return string Url link - */ - public function url($id) - { - // CHANGE THIS: Optionnal - - return ''; - } -} diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 992539cc303..9fe6a615f5d 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -41,7 +41,7 @@ class mailing_fraise extends MailingTargets public $require_module = array('adherent'); - public $enabled = '$conf->adherent->enabled'; + public $enabled = 'isModEnabled("adherent")'; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/core/modules/mailings/partnership.modules.php b/htdocs/core/modules/mailings/partnership.modules.php index 7813d93f54d..b4a8e9d8fd9 100644 --- a/htdocs/core/modules/mailings/partnership.modules.php +++ b/htdocs/core/modules/mailings/partnership.modules.php @@ -16,6 +16,8 @@ * \brief Example file to provide a list of recipients for mailing module */ + +// Load Dolibarr Environment include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; @@ -24,9 +26,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; */ class mailing_partnership extends MailingTargets { - public $name = 'PartnershipThirdartiesOrMembers'; // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + public $name = 'PartnershipThirdpartiesOrMembers'; public $desc = "Thirdparties or members included into a partnership program"; + public $require_admin = 0; public $require_module = array(); // This module allows to select by categories must be also enabled if category module is not activated @@ -41,7 +44,7 @@ class mailing_partnership extends MailingTargets */ public $db; - public $enabled = '$conf->partnership->enabled'; + public $enabled = 'isModEnabled("partnership")'; /** @@ -52,7 +55,7 @@ class mailing_partnership extends MailingTargets public function __construct($db) { global $conf, $langs; - $langs->load("companies"); + $langs->load('companies'); $this->db = $db; } @@ -218,7 +221,7 @@ class mailing_partnership extends MailingTargets $num = $this->db->num_rows($resql); if (empty($conf->partnership->enabled)) { - $num = 0; // Force empty list if category module is not enabled + $num = 0; // Force empty list if category module is not enabled } if ($num) { @@ -253,7 +256,7 @@ class mailing_partnership extends MailingTargets */ public function url($id, $sourcetype = 'thirdparty') { - if ($sourcetype == 'thirparty') { + if ($sourcetype == 'thirdparty') { return ''.img_object('', "societe").''; } if ($sourcetype == 'member') { diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 89bc2cf2b5e..2f8040d4b75 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -31,7 +31,7 @@ class mailing_thirdparties extends MailingTargets public $require_module = array("societe"); // This module allows to select by categories must be also enabled if category module is not activated - public $enabled = '$conf->societe->enabled'; + public $enabled = 'isModEnabled("societe")'; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png @@ -226,7 +226,7 @@ class mailing_thirdparties extends MailingTargets $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE s.email <> ''"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - + $sql .= " AND NOT EXISTS (SELECT rowid FROM ".MAIN_DB_PREFIX."mailing_unsubscribe as mu WHERE mu.email = s.email and mu.entity = ".((int) $conf->entity).")"; // La requete doit retourner un champ "nb" pour etre comprise par parent::getNbOfRecipients return parent::getNbOfRecipients($sql); } @@ -316,11 +316,13 @@ class mailing_thirdparties extends MailingTargets $s .= ''; $s .= ajax_combobox("filter_status_thirdparties"); - // Choose language - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; - $formadmin = new FormAdmin($this->db); - $s .= ''.$langs->trans("DefaultLang").': '; - $s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang_thirdparties', 0, null, 1, 0, 0, '', 0, 0, 0, null, 1); + if (getDolGlobalInt('MAIN_MULTILANGS')) { + // Choose language + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($this->db); + $s .= ''.$langs->trans("DefaultLang").': '; + $s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang_thirdparties', 0, null, 1, 0, 0, '', 0, 0, 0, null, 1); + } return $s; } diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 979782e61a5..9fc43e37388 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -29,7 +29,7 @@ class mailing_thirdparties_services_expired extends MailingTargets public $require_module = array('contrat'); - public $enabled = '$conf->societe->enabled'; + public $enabled = 'isModEnabled("societe")'; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png @@ -108,7 +108,7 @@ class mailing_thirdparties_services_expired extends MailingTargets $now = dol_now(); // La requete doit retourner: id, email, name - $sql = "SELECT s.rowid as id, s.email, s.nom as name, cd.rowid as cdid, cd.date_ouverture, cd.date_fin_validite, cd.fk_contrat"; + $sql = "SELECT s.rowid as id, s.email, s.nom as name, cd.rowid as cdid, cd.date_ouverture as date_start_real, cd.date_fin_validite as date_end, cd.fk_contrat"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; @@ -135,8 +135,8 @@ class mailing_thirdparties_services_expired extends MailingTargets 'lastname' => $obj->name, // For thirdparties, lastname must be name 'firstname' => '', // For thirdparties, firstname is '' 'other' => - ('DateStart='.dol_print_date($this->db->jdate($obj->date_ouverture), 'day')).';'. - ('DateEnd='.dol_print_date($this->db->jdate($obj->date_fin_validite), 'day')).';'. + ('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'. // date start real + ('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'. // date end planned ('Contract='.$obj->fk_contrat).';'. ('ContactLine='.$obj->cdid), 'source_url' => $this->url($obj->id), @@ -219,6 +219,7 @@ class mailing_thirdparties_services_expired extends MailingTargets $s = '
    '; + print ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -128,7 +128,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->COMMANDE_SAPHIR_MASK; + $mask = getDolGlobalString("COMMANDE_SAPHIR_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 9050e1accf5..dad1ebc9122 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -46,13 +46,12 @@ class doc_generic_contract_odt extends ModelePDFContract /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** - * Dolibarr version of the loaded document - * @var string + * @var string Dolibarr version of the loaded document */ public $version = 'dolibarr'; @@ -94,7 +93,7 @@ class doc_generic_contract_odt extends ModelePDFContract $this->option_freetext = 1; // Support add of a personalised text $this->option_draft_watermark = 0; // Support add of a watermark on drafts - // Recupere emetteur + // Get source company $this->emetteur = $mysoc; if (!$this->emetteur->country_code) { $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined @@ -123,7 +122,7 @@ class doc_generic_contract_odt extends ModelePDFContract $texte .= ''; $texte .= ''; $texte .= ''; - $texte .= '
    '; if (count($dirthemes)) { $i = 0; @@ -582,11 +607,10 @@ function showWebsiteTemplates(Website $website) $handle = opendir($dirtheme); if (is_resource($handle)) { while (($subdir = readdir($handle)) !== false) { - if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' - && substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir)) { - $subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir); + if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' && substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir)) { + $subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir); - // Disable not stable themes (dir ends with _exp or _dev) + // Disable not stable themes (dir ends with _exp or _dev) if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) { continue; } @@ -594,38 +618,44 @@ function showWebsiteTemplates(Website $website) continue; } - print '
    '; + print '
    '; - $file = $dirtheme."/".$subdirwithoutzip.".jpg"; - $url = DOL_URL_ROOT.'/viewimage.php?modulepart=doctemplateswebsite&file='.$subdirwithoutzip.".jpg"; + $templatedir = $dirtheme."/".$subdir; + $file = $dirtheme."/".$subdirwithoutzip.".jpg"; + $url = DOL_URL_ROOT.'/viewimage.php?modulepart=doctemplateswebsite&file='.$subdirwithoutzip.".jpg"; if (!file_exists($file)) { $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png'; } - $originalfile = basename($file); - $entity = $conf->entity; - $modulepart = 'doctemplateswebsite'; - $cache = ''; - $title = $file; + $originalfile = basename($file); + $entity = $conf->entity; + $modulepart = 'doctemplateswebsite'; + $cache = ''; + $title = $file; - $ret = ''; - $urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 1, '&entity='.$entity); + $ret = ''; + $urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 1, '&entity='.$entity); if (!empty($urladvanced)) { $ret .= ''; } else { - $ret .= ''; + $ret .= ''; } - print $ret; - print ''.$title.''; - print ''; + print $ret; + print ''.$title.''; + print ''; - print '
    '; - print $subdir.' ('.dol_print_size(dol_filesize($dirtheme."/".$subdir), 1, 1).')'; - print '
    ref.'&templateuserfile='.$subdir.'" class="button">'.$langs->trans("Load").''; - print '
    '; + print '
    '; + print $subdir; + print '
    '; + print ''.dol_print_size(dol_filesize($dirtheme."/".$subdir), 1, 1).' - '.dol_print_date(dol_filemtime($templatedir), 'dayhour', 'tzuserrel').''; + if ($user->hasRight('website', 'delete')) { + print ' ref).'&templateuserfile='.urlencode($subdir).'">'.img_picto('', 'delete').''; + } + print '
    ref).'&templateuserfile='.urlencode($subdir).'" class="button">'.$langs->trans("Load").''; + print '
    '; - $i++; + $i++; } } } @@ -692,11 +722,31 @@ function checkPHPCode($phpfullcodestringold, $phpfullcodestring) setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", '$...('), null, 'errors'); } - if (!$error && empty($user->rights->website->writephp)) { - if ($phpfullcodestringold != $phpfullcodestring) { + if ($phpfullcodestringold != $phpfullcodestring) { + if (!$error && empty($user->rights->website->writephp)) { $error++; setEventMessages($langs->trans("NotAllowedToAddDynamicContent"), null, 'errors'); } + if (!$error) { + $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); + $allowimportsite = true; + if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) { + $allowimportsite = false; + } + + if (!$allowimportsite) { + $error++; + // Blocked by installmodules.lock + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean corporate message + $message = $langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'); + } else { + // Show technical generic message + $message = $langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'); + } + setEventMessages($message, null, 'errors'); + } + } } return $error; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 97ada3e3d4f..6b5c92881c5 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -301,7 +301,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) * @param string $format "rss" * @param string $title Title of export * @param string $desc Description of export - * @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category") or Array of WebsitePage + * @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category","image") or Array of WebsitePage * @param string $outputfile Output file * @param string $filter (optional) Filter * @param string $url Url (If empty, forge URL for agenda RSS export) @@ -377,7 +377,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $tmpevent['author'] = $event->author_alias ? $event->author_alias : 'unknown'; //$tmpevent['category'] = ''; $tmpevent['desc'] = $event->description; - + $tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$event->image; $event = $tmpevent; } @@ -387,7 +387,9 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $url = $event["url"]; $author = $event["author"]; $category = $event["category"]; - + if (!empty($event["image"])) { + $image = $event["image"]; + } /* No place inside a RSS $priority = $event["priority"]; $fulldayevent = $event["fulldayevent"]; @@ -404,6 +406,10 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, "\n"); fwrite($fichier, "

    '); + } + if ($description) { fwrite($fichier, $description); } diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 990390235a7..e8c3ab38e46 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -40,7 +40,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes // Force master entity in transversal mode $entity = $entitytotest; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $entity = 1; } @@ -124,8 +124,8 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes if ($passok) { $login = $obj->login; } else { - sleep(1); // Anti brut force protection dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO bad password for '".$usertotest."', cryptType=".$cryptType, LOG_NOTICE); + sleep(1); // Anti brut force protection. Must be same delay when login is not valid // Load translation files required by the page $langs->loadLangs(array('main', 'errors')); @@ -134,11 +134,11 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes } // We must check entity - if ($passok && !empty($conf->multicompany->enabled)) { // We must check entity + if ($passok && isModEnabled('multicompany')) { // We must check entity global $mc; if (!isset($mc)) { - $conf->multicompany->enabled = false; // Global not available, disable $conf->multicompany->enabled for safety + !isModEnabled('multicompany'); // Global not available, disable $conf->multicompany->enabled for safety } else { $ret = $mc->checkRight($obj->rowid, $entitytotest); if ($ret < 0) { @@ -153,7 +153,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes } } else { dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE); - sleep(1); + sleep(1); // Anti brut force protection. Must be same delay when password is not valid // Load translation files required by the page $langs->loadLangs(array('main', 'errors')); diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 68ad25168f0..faf0024d801 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -46,7 +46,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // Force master entity in transversal mode $entity = $entitytotest; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $entity = 1; } @@ -122,7 +122,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) print "DEBUG: User ".$usertotest." must change password
    \n"; } $ldap->unbind(); - sleep(1); + sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid. $langs->load('ldap'); $_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN); return ''; @@ -228,7 +228,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) unset($usertmp); } - if (!empty($conf->multicompany->enabled)) { // We must check entity (even if sync is not active) + if (isModEnabled('multicompany')) { // We must check entity (even if sync is not active) global $mc; $usertmp = new User($db); @@ -245,7 +245,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) } if ($result == 1) { dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE); - sleep(1); + sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid. // Load translation files required by the page $langs->loadLangs(array('main', 'other')); @@ -267,7 +267,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $ldap->ldapErrorText = ldap_error($ldap->connection); dol_syslog("functions_ldap::check_user_password_ldap ".$ldap->ldapErrorCode." ".$ldap->ldapErrorText); } - sleep(1); // Anti brut force protection + sleep(1); // Anti brut force protection. Must be same delay when user and password are not valid. // Load translation files required by the page $langs->loadLangs(array('main', 'other', 'errors')); diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 96625dd1f95..e6fc16a62d6 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -12,7 +12,7 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; -- Top-Menu -- old: (module, enabled, rowid, ...) insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 1__+MAX_llx_menu__, '', '1', __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); -insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 2__+MAX_llx_menu__, 'societe|fournisseur|supplier_order|supplier_invoice', '($conf->societe->enabled && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || $conf->supplier_order->enabled || $conf->supplier_invoice->enabled))', __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); +insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 2__+MAX_llx_menu__, 'societe|fournisseur|supplier_order|supplier_invoice', '($conf->societe->enabled && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) || isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || $conf->supplier_order->enabled || $conf->supplier_invoice->enabled))', __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 3__+MAX_llx_menu__, 'product|service', '$conf->product->enabled || $conf->service->enabled', __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 16__+MAX_llx_menu__, 'bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 7__+MAX_llx_menu__, 'projet', '$conf->project->enabled', __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__); @@ -86,8 +86,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?mainmenu=companies&leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&leftmenu=thirdparties', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=c&leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); @@ -99,7 +99,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__); -- Third parties - Category customer @@ -107,8 +107,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category supplier -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category contact insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 670__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); @@ -119,7 +119,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/card.php?mainmenu=products&leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?mainmenu=products&leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?mainmenu=products&type=0', 'MenuStocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassortlot.php?mainmenu=products&type=0', 'StocksByLotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassortlot.php?mainmenu=products&type=0&search_subjecttolotserial=1', 'StocksByLotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2806__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/stock/productlot_list.php?mainmenu=products', 'LotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->variants->enabled', __HANDLER__, 'left', 2807__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/variants/list.php?mainmenu=products', 'VariantAttributes', 1, 'products', '$user->rights->produit->lire', '', 2, 7, __ENTITY__); @@ -138,7 +138,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/list.php?mainmenu=products', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/movement_list.php?mainmenu=products', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->supplier_order->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php?mainmenu=products', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php?mainmenu=products', 'MassStockTransferShort', 1, 'stocks', '$user->rights->stock->mouvement->creer', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php?init=1&mainmenu=products', 'MassStockTransferShort', 1, 'stocks', '$user->rights->stock->mouvement->creer', '', 2, 5, __ENTITY__); -- Product - Categories insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3200__+MAX_llx_menu__, 'products', 'cat', 3__+MAX_llx_menu__, '/categories/index.php?mainmenu=products&leftmenu=cat&type=0', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); @@ -157,15 +157,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->reception->enabled && $leftmenu=="receptions"', __HANDLER__, 'left', 1353__+MAX_llx_menu__, 'commercial', '', 1350__+MAX_llx_menu__, '/reception/stats/index.php?mainmenu=commercial&leftmenu=receptions', 'Statistics', 1, 'receptions', '$user->rights->reception->lire', '', 2, 2, __ENTITY__); -- Commercial - Proposals -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&action=create&leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propale->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', 'List', 1, 'propal', '$user->rights->propale->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propale->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propale->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propale->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&action=create&leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propal->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', 'List', 1, 'propal', '$user->rights->propal->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propal->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propal->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propal->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__); -- Commercial - Customer's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?mainmenu=commercial&leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); @@ -257,7 +257,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/card.php?mainmenu=billing&leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/payments.php?mainmenu=billing&leftmenu=tax_social', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); --- VAT/TVA/IVA +-- VAT/TVA/IVA insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'billing', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?mainmenu=billing&leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); @@ -313,9 +313,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_invoice")) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_invoice")) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_invoice")) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); @@ -450,7 +450,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=withoutsubscription', 'WithoutSubscription', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=waitingsubscription', 'WaitingSubscription', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=outofdate', 'UpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=uptodate', 'OutOfDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); @@ -473,17 +473,18 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- HRM - Employee -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->user->user->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&contextpage=employeelist', 'Employees', 0, 'hrm', '$user->rights->user->user->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?mainmenu=hrm&action=create&employee=1', 'NewEmployee', 1, 'hrm', '$user->rights->user->user->creer', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist', 'List', 1, 'hrm', '$user->rights->user->user->lire', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&contextpage=employeelist', 'List', 1, 'hrm', '$user->rights->user->user->lire', '', 0, 2, __ENTITY__); -- HRM - Holiday insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?mainmenu=hrm&action=create', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?mainmenu=hrm&action=create', 'New', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card_group.php?mainmenu=hrm&action=create', 'NewHolidayForGroup', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&search_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?mainmenu=hrm&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?mainmenu=hrm&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?mainmenu=hrm', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?mainmenu=hrm', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); -- HRM - Trips and expenses (old module) insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?mainmenu=accountancy&leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 71f399497c7..037d1fee8c2 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -148,7 +148,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - /*} elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + /*} elseif (!empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); }*/ diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index cdba19dd38a..398aa6421a7 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -95,8 +95,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Members $tmpentry = array( - 'enabled' => (isModEnabled('adherent')), - 'perms' => (!empty($user->rights->adherent->lire)), + 'enabled' => isModEnabled('adherent'), + 'perms' => $user->hasRight('adherent', 'lire'), 'module' => 'adherent' ); $menu_arr[] = array( @@ -114,7 +114,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "members") ? 'class="tmenusel"' : 'class="tmenu"', 'prefix' => img_picto('', 'member', 'class="fa-fw paddingright pictofixedwidth"'), 'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "members") ? 0 : 1), - 'loadLangs' => array(), + 'loadLangs' => array("members"), 'submenus' => array(), ); @@ -125,7 +125,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ) || ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) ), - 'perms'=> (!empty($user->rights->societe->lire) || !empty($user->rights->fournisseur->lire) || !empty($user->rights->supplier_order->lire) || !empty($user->rights->supplier_invoice->lire) || !empty($user->rights->supplier_proposal->lire)), + 'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), 'module'=>'societe|fournisseur' ); $menu_arr[] = array( @@ -150,7 +150,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Products-Services $tmpentry = array( 'enabled'=> (isModEnabled('product') || isModEnabled('service') || isModEnabled('expedition')), - 'perms'=> (!empty($user->rights->produit->lire) || !empty($user->rights->service->lire) || !empty($user->rights->expedition->lire)), + 'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')), 'module'=>'product|service' ); $menu_arr[] = array( @@ -170,14 +170,14 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "products") ? 'class="tmenusel"' : 'class="tmenu"', 'prefix' => img_picto('', 'product', 'class="fa-fw paddingright pictofixedwidth"'), 'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "products") ? 0 : 1), - 'loadLangs' => array("products"), + 'loadLangs' => array("products", "stocks"), 'submenus' => array(), ); // MRP - GPAO $tmpentry = array( 'enabled'=>(isModEnabled('bom') || isModEnabled('mrp')), - 'perms'=>(!empty($user->rights->bom->read) || !empty($user->rights->mrp->read)), + 'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')), 'module'=>'bom|mrp' ); $menu_arr[] = array( @@ -202,13 +202,26 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Projects $tmpentry = array( 'enabled'=> (isModEnabled('projet') ? 1 : 0), - 'perms'=> (!empty($user->rights->projet->lire) ? 1 : 0), + 'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0), 'module'=>'projet' ); + + if ($mode == 'jmobile') { + $titleboth = $langs->trans("LeadsOrProjects"); + } else { + $titleboth = $langs->trans("Projects"); + } + if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + $titleboth = $langs->trans("Projects"); + } + if (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only + $titleboth = $langs->trans("Leads"); + } + $menu_arr[] = array( - 'name' => 'Projet', + 'name' => 'Project', 'link' => '/projet/index.php?mainmenu=project&leftmenu=', - 'title' => (! empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2 ? "Leads" : "Projects"), + 'title' => $titleboth, 'level' => 0, 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, @@ -234,25 +247,25 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = || isModEnabled('contrat') || isModEnabled('ficheinter') ) ? 1 : 0, - 'perms'=>(!empty($user->rights->propal->lire) - || !empty($user->rights->commande->lire) - || !empty($user->rights->supplier_proposal->lire) - || !empty($user->rights->fournisseur->lire) - || !empty($user->rights->fournisseur->commande->lire) - || !empty($user->rights->supplier_order->lire) - || !empty($user->rights->contrat->lire) - || !empty($user->rights->ficheinter->lire) + 'perms'=>($user->hasRight('propal', 'read') + || $user->hasRight('commande', 'lire') + || $user->hasRight('supplier_proposal', 'lire') + || $user->hasRight('fournisseur', 'lire') + || $user->hasRight('fournisseur', 'commande', 'lire') + || $user->hasRight('supplier_order', 'lire') + || $user->hasRight('contrat', 'lire') + || $user->hasRight('ficheinter', 'lire') ), 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' ); - $onlysupplierorder = !empty($user->rights->fournisseur->commande->lire) && - empty($user->rights->propal->lire) && - empty($user->rights->commande->lire) && - empty($user->rights->supplier_order->lire) && - empty($user->rights->supplier_proposal->lire) && - empty($user->rights->contrat->lire) && - empty($user->rights->ficheinter->lire); + $onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') && + !$user->hasRight('propal', 'lire') && + !$user->hasRight('commande', 'lire') && + !$user->hasRight('supplier_order', 'lire') && + !$user->hasRight('supplier_proposal', 'lire') && + !$user->hasRight('contrat', 'lire') && + !$user->hasRight('ficheinter', 'lire'); $menu_arr[] = array( 'name' => 'Commercial', @@ -283,9 +296,9 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = isModEnabled('loan') || isModEnabled('margins') ) ? 1 : 0, - 'perms'=>(!empty($user->rights->facture->lire) || !empty($user->rights->don->contact->lire) - || !empty($user->rights->tax->charges->lire) || !empty($user->rights->salaries->read) - || !empty($user->rights->fournisseur->facture->lire) || !empty($user->rights->loan->read) || !empty($user->rights->margins->liretous)), + 'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire') + || $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read') + || $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')), 'module'=>'facture|supplier_invoice|don|tax|salaries|loan' ); $menu_arr[] = array( @@ -310,7 +323,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Bank $tmpentry = array( 'enabled'=>(isModEnabled('banque') || isModEnabled('prelevement')), - 'perms'=>(!empty($user->rights->banque->lire) || !empty($user->rights->prelevement->lire) || !empty($user->rights->paymentbybanktransfer->read)), + 'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')), 'module'=>'banque|prelevement|paymentbybanktransfer' ); $menu_arr[] = array( @@ -335,7 +348,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Accounting $tmpentry = array( 'enabled'=>(isModEnabled('comptabilite') || isModEnabled('accounting') || isModEnabled('asset') || isModEnabled('intracommreport')), - 'perms'=>(!empty($user->rights->compta->resultat->lire) || !empty($user->rights->accounting->comptarapport->lire) || !empty($user->rights->accounting->mouvements->lire) || !empty($user->rights->asset->read) || !empty($user->rights->intracommreport->read)), + 'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')), 'module'=>'comptabilite|accounting|asset|intracommreport' ); $menu_arr[] = array( @@ -360,7 +373,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // HRM $tmpentry = array( 'enabled'=>(isModEnabled('hrm') || (isModEnabled('holiday')) || isModEnabled('deplacement') || isModEnabled('expensereport') || isModEnabled('recruitment')), - 'perms'=>(!empty($user->rights->user->user->lire) || !empty($user->rights->holiday->read) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), + 'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')), 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' ); @@ -379,14 +392,14 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "hrm") ? 'class="tmenusel"' : 'class="tmenu"', 'prefix' => img_picto('', 'hrm', 'class="fa-fw paddingright pictofixedwidth"'), 'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "hrm") ? 0 : 1), - 'loadLangs' => array("holiday"), + 'loadLangs' => array("hrm", "holiday"), 'submenus' => array(), ); // Tickets and knowledge base $tmpentry = array( 'enabled'=>(isModEnabled('ticket') || isModEnabled('knowledgemanagement')), - 'perms'=>(!empty($user->rights->ticket->read) || !empty($user->rights->knowledgemanagement->knowledgerecord->read)), + 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), 'module'=>'ticket|knowledgemanagement' ); $link = ''; @@ -397,7 +410,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = } $menu_arr[] = array( 'name' => 'Ticket', - 'link' => '/ticket/index.php?mainmenu=ticket&leftmenu=', + 'link' => $link, 'title' => "Tickets", 'level' => 0, 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), @@ -410,7 +423,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "ticket") ? 'class="tmenusel"' : 'class="tmenu"', 'prefix' => img_picto('', 'ticket', 'class="fa-fw paddingright pictofixedwidth"'), 'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "ticket") ? 0 : 1), - 'loadLangs' => array("other"), + 'loadLangs' => array("ticket", "knowledgemanagement"), 'submenus' => array(), ); @@ -544,7 +557,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - /*} elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + /*} elseif (!empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); }*/ @@ -1102,7 +1115,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = $newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1); $warnpicto = ''; - if (!empty($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningPHPMailD")); } @@ -1150,20 +1163,20 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = } } - $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); - if ($user->rights->user->user->lire) { + $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->hasRight('user', 'user', 'read'), '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); + if ($user->hasRight('user', 'user', 'read')) { if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { - $newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->rights->user->user->creer || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home'); - $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin); + $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); + $newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home'); + $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); + $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); } - $newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); - $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); - $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); } } } @@ -1187,9 +1200,9 @@ function get_left_menu_thridparties($mainmenu, &$newmenu, $usemenuhider = 1, $le // Societes if (isModEnabled('societe')) { $langs->load("companies"); - $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire, '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); - if ($user->rights->societe->creer) { + if ($user->hasRight('societe', 'creer')) { $newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1); if (!$conf->use_javascript_ajax) { $newmenu->add("/societe/card.php?action=create&private=1", $langs->trans("MenuNewPrivateIndividual"), 1); @@ -1202,30 +1215,30 @@ function get_left_menu_thridparties($mainmenu, &$newmenu, $usemenuhider = 1, $le // Prospects if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $langs->load("commercial"); - $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'prospects'); + $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); /* no more required, there is a filter that can do more - if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire); - if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire); - if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->rights->societe->lire); - if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire); - if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire); + if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->hasRight('societe', 'lire')); + if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->hasRight('societe', 'lire')); + if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->hasRight('societe', 'lire')); + if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->hasRight('societe', 'lire')); + if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->hasRight('societe', 'lire')); */ - $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->rights->societe->creer); + $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); } // Customers/Prospects if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $langs->load("commercial"); - $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'customers'); + $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); - $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->rights->societe->creer); + $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); } // Suppliers if (isModEnabled('societe') && (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) || isModEnabled('supplier_proposal'))) { $langs->load("suppliers"); - $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->rights->fournisseur->lire || $user->rights->supplier_order->lire || $user->rights->supplier_invoice->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers'); - $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_order->lire || $user->rights->supplier_invoice->lire || $user->rights->supplier_proposal->lire)); + $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers'); + $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire'))); } // Categories @@ -1240,36 +1253,36 @@ function get_left_menu_thridparties($mainmenu, &$newmenu, $usemenuhider = 1, $le if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $menutoshow = $langs->trans("ProspectsCategoriesShort"); } - $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); } // Categories suppliers if ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { - $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->rights->categorie->lire); + $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); } } // Contacts - $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->rights->societe->contact->lire, '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer); - $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire); + $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer')); + $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { - $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire); + $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); } if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { - $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire); + $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); } if ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { - $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire); + $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('societe', 'contact', 'lire')); } - $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->rights->societe->contact->lire); - //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire); + $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); + //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->hasRight('societe', 'contact', 'lire')); // Categories if (isModEnabled('categorie')) { $langs->load("categories"); // Categories Contact - $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); } } } @@ -1294,98 +1307,98 @@ function get_left_menu_commercial($mainmenu, &$newmenu, $usemenuhider = 1, $left // Customer proposal if (isModEnabled('propal')) { $langs->load("propal"); - $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->rights->propale->lire, '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->rights->propale->creer); - $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->rights->propale->lire); + $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); + $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") { - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->rights->propale->lire); - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->rights->propale->lire); - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->rights->propale->lire); - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->rights->propale->lire); - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->rights->propale->lire); - //$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->rights->propale->lire); + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); + //$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->hasRight('propal', 'read')); } - $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->rights->propale->lire); + $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); } // Customers orders if (isModEnabled('commande')) { $langs->load("orders"); - $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); - $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); + $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); + $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") { - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); if (isModEnabled('expedition')) { - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); } - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->rights->commande->lire); - //$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire); - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); + //$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->hasRight('commande', 'lire')); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); } - $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire); + $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); } // Supplier proposal if (isModEnabled('supplier_proposal')) { $langs->load("supplier_proposal"); - $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->rights->supplier_proposal->lire, '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->rights->supplier_proposal->creer); - $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->rights->supplier_proposal->lire); - $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->supplier_proposal->lire); + $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); + $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); + $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); } // Suppliers orders if (isModEnabled('supplier_order')) { $langs->load("orders"); - $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->rights->fournisseur->commande->creer); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") { - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) { - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); } - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); } - // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->rights->fournisseur->commande->lire); + // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); - $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); + $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); } // Contrat if (isModEnabled('contrat')) { $langs->load("contracts"); - $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->rights->contrat->lire, '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->rights->contrat->creer); - $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->rights->contrat->lire); - $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->rights->contrat->lire); + $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); + $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); + $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") { - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=0", $langs->trans("MenuInactiveServices"), 2, $user->rights->contrat->lire); - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=4", $langs->trans("MenuRunningServices"), 2, $user->rights->contrat->lire); - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->rights->contrat->lire); - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=5", $langs->trans("MenuClosedServices"), 2, $user->rights->contrat->lire); + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); } } // Interventions if (isModEnabled('ficheinter')) { $langs->load("interventions"); - $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201); - $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202); + $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); + $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->rights->ficheinter->lire, '', '', '', 203); + $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); } - $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->ficheinter->lire); + $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); } } } @@ -1410,69 +1423,69 @@ function get_left_menu_billing($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen // Customers invoices if (isModEnabled('facture')) { $langs->load("bills"); - $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->rights->facture->lire, '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->rights->facture->creer); - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->rights->facture->lire, '', $mainmenu, 'customers_bills_list'); + $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) { - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->rights->facture->lire); - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->rights->facture->lire); - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->rights->facture->lire); - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->rights->facture->lire); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); } - $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->rights->facture->creer, '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. + $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. - $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->rights->facture->lire, '', $mainmenu, 'customers_bills_payment'); + $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { - $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->rights->facture->lire, '', $mainmenu, 'customer_bills_tovalid'); + $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); } if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) { - $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->rights->facture->lire, '', $mainmenu, 'customers_bills_payment_report'); + $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); } - $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->rights->facture->lire, '', $mainmenu, 'customers_bills_stats'); + $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); } // Suppliers invoices if (isModEnabled('societe') && isModEnabled('supplier_invoice')) { $langs->load("bills"); - $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), '', $mainmenu, 'suppliers_bills_create'); - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_list'); + $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create'); + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_draft'); - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_notpaid'); - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_paid'); + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft'); + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid'); + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid'); } - $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'supplierinvoicestemplate_list'); + $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); - $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_payment'); + $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { - $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_payment_report'); + $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report'); } - $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_stats'); + $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats'); } // Orders if (isModEnabled('commande')) { $langs->load("orders"); if (isModEnabled('facture')) { - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); } - //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); + //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); } // Supplier Orders to bill if (isModEnabled('supplier_invoice')) { if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { $langs->load("supplier"); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); - //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); + //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); } } @@ -1480,58 +1493,58 @@ function get_left_menu_billing($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen // Donations if (isModEnabled('don')) { $langs->load("donations"); - $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") { - $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->rights->don->creer); - $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->rights->don->lire); + $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); + $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); } - // if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->rights->don->lire); + // if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->hasRight('don', 'lire')); } // Taxes and social contributions if (isModEnabled('tax')) { - $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->rights->tax->charges->lire, '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->rights->tax->charges->lire); + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) { - $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->rights->tax->charges->creer); - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); } // VAT if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { global $mysoc; - $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat'); + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat'); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) { - $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->rights->tax->charges->creer); - $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); } //Local Taxes 1 if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) { - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) { - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->rights->tax->charges->creer); - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); } } //Local Taxes 2 if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) { - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) { - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->rights->tax->charges->creer); - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); } } } @@ -1540,32 +1553,32 @@ function get_left_menu_billing($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen // Salaries if (isModEnabled('salaries')) { $langs->load("salaries"); - $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->rights->salaries->read, '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) { - $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->rights->salaries->write); - $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->rights->salaries->read); - $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->rights->salaries->read); - $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->rights->salaries->read); + $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); + $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); + $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); + $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); } } // Loan if (isModEnabled('loan')) { $langs->load("loan"); - $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->rights->loan->read, '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) { - $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->rights->loan->write); - //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->rights->loan->read); + $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); + //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->hasRight('loan', 'read')); } } // Various payment if (isModEnabled('banque') && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) { $langs->load("banks"); - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->rights->banque->lire, '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) { - $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->rights->banque->modifier); - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->rights->banque->lire); + $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); } } } @@ -1591,75 +1604,75 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef // Accounting (Double entries) if (isModEnabled('accounting')) { - //$permtoshowmenu = (isModEnabled('accounting') || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire); + //$permtoshowmenu = (isModEnabled('accounting') || $user->hasRight('accounting', 'bind', 'write') || $user->hasRight('compta', 'resultat', 'lire')); //$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy'); // Configuration - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) { global $mysoc; - $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10); + $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); // Fiscal year - Not really yet used. In a future will lock some periods. if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'fiscalyear', 20); + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); } - $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 30); - $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 40); - $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41); - $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41); - $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 50); - $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 60); + $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30); + $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40); + $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); + $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); + $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 50); + $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); if (isModEnabled('banque')) { - $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 70); + $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70); } if (isModEnabled('facture') || ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { - $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 80); + $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80); } if (isModEnabled('tax')) { - $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 90); + $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90); } if (isModEnabled('expensereport')) { - $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 100); + $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100); } - $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 110); + $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_closure', 120); + $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); } - $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 130); + $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); } // Transfer in accounting - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); // Binding - // $newmenu->add("", $langs->trans("Binding"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch'); + // $newmenu->add("", $langs->trans("Binding"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch'); if (isModEnabled('facture') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { - $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer'); + $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) { - $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write); - $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write); + $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); + $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); } } if (isModEnabled('supplier_invoice') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { - $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier'); + $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) { - $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write); - $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write); + $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); + $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); } } if (isModEnabled('expensereport') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { - $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport'); + $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) { - $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write); - $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write); + $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); + $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); } } // Journals - if (isModEnabled('accounting') && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { - $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', '', ''); + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', '', ''); // Multi journal $sql = "SELECT rowid, code, label, nature"; @@ -1713,14 +1726,18 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef if ($nature) { $langs->load('accountancy'); - $journallabel = $langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ... - $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); + $journallabel = $langs->transnoentities($objp->label); // Label of bank account in llx_accounting_journal + + $key = $langs->trans("AccountingJournalType".strtoupper($objp->nature)); + $transferlabel = ($objp->nature && $key != "AccountingJournalType".strtoupper($langs->trans($objp->nature)) ? $key.($journallabel != $key ? ' '.$journallabel : ''): $journallabel); + + $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); } - $i++; + $i++; } } else { // Should not happend. Entries are added - $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->rights->accounting->comptarapport->lire); + $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); } } else { dol_print_error($db); @@ -1730,80 +1747,80 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef // Files if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { - $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire); + $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); } // Accounting - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire || $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); // General Ledger - $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->rights->accounting->mouvements->lire); + $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); // Journals - $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->rights->accounting->mouvements->lire); + $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); // Account Balance - $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire); + $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); // Closure - $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure'); + $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); // Reports - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca'); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { - $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); } $modecompta = 'CREANCES-DETTES'; - if (isModEnabled('accounting') && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { $modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED } if ($modecompta) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); } } $modecompta = 'RECETTES-DEPENSES'; - //if (isModEnabled('accounting') && ! empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED + //if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED if ($modecompta) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->rights->accounting->comptarapport->lire); - //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire); - //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); + //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); } } $modecompta = 'CREANCES-DETTES'; - if (isModEnabled('accounting') && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { $modecompta = 'BOOKKEEPING'; // Not yet implemented. } if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); } } $modecompta = 'RECETTES-DEPENSES'; - if (isModEnabled('accounting') && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { $modecompta = 'BOOKKEEPINGCOLLECTED'; // Not yet implemented. } if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); } } } @@ -1812,79 +1829,79 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef if (isModEnabled('comptabilite')) { // Files if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { - $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); } // Bilan, resultats - $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) { - $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); /* On verra ca avec module compabilite expert - $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire); - $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->rights->compta->resultat->lire); + $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->hasRight('compta', 'resultat', 'lire')); */ /* - $newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->hasRight('compta', 'resultat', 'lire')); if (isModEnabled('propal')) { - $newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->hasRight('compta', 'resultat', 'lire')); } */ $modecompta = 'CREANCES-DETTES'; - $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); $modecompta = 'RECETTES-DEPENSES'; - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); //Achats $modecompta = 'CREANCES-DETTES'; - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); /* $modecompta = 'RECETTES-DEPENSES'; - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 1, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); */ // Journals - $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50); - $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51); + $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); + $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); } - //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journals"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); + //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journals"),1,$user->hasRight('compta', 'resultat', 'lire')||$user->hasRight('accounting', 'comptarapport', 'lire')); } // Intracomm report if (isModEnabled('intracommreport')) { - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) { // DEB / DES - $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->rights->intracommreport->write, '', $mainmenu, 'intracommreport', 1); - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1); + $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); } } // Assets if (isModEnabled('asset')) { - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->rights->asset->read, '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->rights->asset->write); - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->rights->asset->read); - $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->read) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->asset->model_advance->read)), '', $mainmenu, 'asset_model'); + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); + $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model'); if ($usemenuhider || empty($leftmenu) || preg_match('/asset_model/', $leftmenu)) { - $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->write) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->asset->model_advance->write))); - $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->read) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->asset->model_advance->read))); + $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); + $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read'))); } } } @@ -1910,56 +1927,56 @@ function get_left_menu_bank($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = // Bank-Cash account if (isModEnabled('banque')) { - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->rights->banque->lire, '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->rights->banque->configurer); - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->rights->banque->lire, '', $mainmenu, 'bank'); - $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->rights->banque->lire); - $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->rights->banque->lire); + $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); + $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); + $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); - $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->rights->banque->transfer); + $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); } if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->rights->categorie->creer, '', $mainmenu, 'tags'); - $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->rights->banque->configurer, '', $mainmenu, 'tags'); + $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); + $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); } // Direct debit order if (isModEnabled('prelevement')) { - $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") { - $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->rights->prelevement->bons->creer); + $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); - $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->rights->prelevement->bons->lire); - $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->rights->prelevement->bons->lire); - $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->prelevement->bons->lire); - $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->prelevement->bons->lire); + $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); + $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); + $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); + $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); } } // Bank transfer order if (isModEnabled('paymentbybanktransfer')) { - $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->rights->paymentbybanktransfer->read, '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") { - $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->rights->paymentbybanktransfer->create); + $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); - $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->rights->paymentbybanktransfer->read); - $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->rights->paymentbybanktransfer->read); - $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->paymentbybanktransfer->read); - $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->paymentbybanktransfer->read); + $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); + $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); + $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); + $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); } } // Management of checks if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled('banque') && (isModEnabled('facture') || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) { - $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->rights->banque->cheque, '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if (preg_match('/checks/', $leftmenu)) { - $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->rights->banque->cheque); - $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->rights->banque->cheque); + $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); + $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); } } @@ -1990,88 +2007,88 @@ function get_left_menu_products($mainmenu, &$newmenu, $usemenuhider = 1, $leftme if ($mainmenu == 'products') { // Products if (isModEnabled('product')) { - $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"')); - $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); - $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); + $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"')); + $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); + $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); if (isModEnabled('stock')) { - $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->rights->produit->lire && $user->rights->stock->lire); + $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); } if (isModEnabled('productbatch')) { $langs->load("stocks"); - $newmenu->add("/product/reassortlot.php?type=0", $langs->trans("StocksByLotSerial"), 1, $user->rights->produit->lire && $user->rights->stock->lire); - $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->rights->produit->lire && $user->rights->stock->lire); + $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); + $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); } if (isModEnabled('variants')) { - $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->rights->produit->lire); + $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); } if (isModEnabled('propal') || (isModEnabled('commande') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('facture') || isModEnabled('fournisseur') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire); + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); } // Categories if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); + //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); } } // Services if (isModEnabled('service')) { - $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"')); - $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); - $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); + $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"')); + $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); + $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || (isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire); + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); } // Categories if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); + //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); } } // Warehouse if (isModEnabled('stock')) { $langs->load("stocks"); - $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); - $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); - $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); - $newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); + $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); + $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->hasRight('stock', 'creer')); + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); + $newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->hasRight('stock', 'mouvement', 'lire')); - $newmenu->add("/product/stock/massstockmove.php", $langs->trans("MassStockTransferShort"), 1, $user->rights->stock->mouvement->creer); + $newmenu->add("/product/stock/massstockmove.php?init=1", $langs->trans("MassStockTransferShort"), 1, $user->hasRight('stock', 'mouvement', 'creer')); if (isModEnabled('supplier_order')) { - $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire); + $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); } - $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->rights->produit->lire && $user->rights->stock->lire); + $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read', '', 1) && $user->hasRight('stock', 'lire')); // Categories for warehouses if (isModEnabled('categorie')) { - $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); } } if (isModEnabled('stocktransfer')) { - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->rights->stocktransfer->stocktransfer->read, '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); - $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->rights->stocktransfer->stocktransfer->write); - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->rights->stocktransfer->stocktransfer->read); + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); + $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); } // Inventory if (isModEnabled('stock')) { $langs->load("stocks"); if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer); - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire); + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); } } else { - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write); - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read); + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); } } } @@ -2079,33 +2096,33 @@ function get_left_menu_products($mainmenu, &$newmenu, $usemenuhider = 1, $leftme // Shipments if (isModEnabled('expedition')) { $langs->load("sendings"); - $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"')); - $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); - $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); + $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"')); + $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); + $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") { - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->rights->expedition->lire); - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->rights->expedition->lire); - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->rights->expedition->lire); + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); } - $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); + $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); } // Receptions if (isModEnabled('reception')) { $langs->load("receptions"); - $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"')); - $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer); - $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire); + $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"')); + $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); + $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->rights->reception->lire); + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); } if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->rights->reception->lire); + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); } if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->rights->reception->lire); + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); } - $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->rights->reception->lire); + $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); } } } @@ -2129,17 +2146,17 @@ function get_left_menu_mrp($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = if (isModEnabled('bom') || isModEnabled('mrp')) { $langs->load("mrp"); - $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->bom->read, '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write, '', $mainmenu, 'bom'); - $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read, '', $mainmenu, 'bom'); + $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); + $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); } if (isModEnabled('mrp')) { $langs->load("mrp"); - $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->rights->mrp->read, '', $mainmenu, 'mo', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->rights->mrp->write, '', $mainmenu, 'mo'); - $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->rights->mrp->read, '', $mainmenu, 'mo'); + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mo', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, 'mo'); + $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mo'); } } } @@ -2165,8 +2182,8 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme $search_project_user = GETPOST('search_project_user', 'int'); $tmpentry = array( - 'enabled'=>(isModEnabled('projet')), - 'perms'=>(!empty($user->rights->projet->lire)), + 'enabled'=>isModEnabled('projet'), + 'perms'=>$user->hasRight('projet', 'lire'), 'module'=>'projet' ); $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); @@ -2184,8 +2201,8 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme } // Project assigned to user - $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->rights->projet->creer); + $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list'); @@ -2197,23 +2214,23 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme $newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode); } - $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); // Categories if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); } if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Project affected to user - $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer); - $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire); - $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); + $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); + $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); } } } @@ -2238,32 +2255,32 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = if (isModEnabled('hrm')) { $langs->load("hrm"); - $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->user->user->lire, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer); - $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire); + $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&contextpage=employeelist", $langs->trans("Employees"), 0, $user->hasRight('user', 'user', 'read'), '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->hasRight('user', 'user', 'write')); + $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&contextpage=employeelist", $langs->trans("List"), 1, $user->hasRight('user', 'user', 'read')); - $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="paddingright pictofixedwidth"')); // Skills - $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="paddingright pictofixedwidth"')); - //$newmenu->add("/hrm/skill_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->trans("NewSkill"), 1, $user->rights->hrm->all->write); - //$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->rights->hrm->all->read); + $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="paddingright pictofixedwidth"')); + //$newmenu->add("/hrm/skill_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->trans("NewSkill"), 1, $user->hasRight('hrm', 'all', 'write')); + //$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'all', 'read')); // Job (Description of work to do and skills required) - $newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("JobsPosition"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); - //$newmenu->add("/hrm/job_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->transnoentities("NewObject", $langs->trans("Job")), 1, $user->rights->hrm->all->write); - //$newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->rights->hrm->all->read); + $newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("JobsPosition"), 1, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); + //$newmenu->add("/hrm/job_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->transnoentities("NewObject", $langs->trans("Job")), 1, $user->hasRight('hrm', 'all', 'write')); + //$newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'all', 'read')); // Position = Link job - user - $newmenu->add("/hrm/position_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("EmployeePositions"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user-cog', 'class="paddingright pictofixedwidth"')); - //$newmenu->add("/hrm/position.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->transnoentities("NewObject", $langs->trans("Position")), 1, $user->rights->hrm->all->write); - //$newmenu->add("/hrm/position_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->rights->hrm->all->read); + $newmenu->add("/hrm/position_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("EmployeePositions"), 1, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user-cog', 'class="paddingright pictofixedwidth"')); + //$newmenu->add("/hrm/position.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->transnoentities("NewObject", $langs->trans("Position")), 1, $user->hasRight('hrm', 'all', 'write')); + //$newmenu->add("/hrm/position_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'all', 'read')); // Evaluation - $newmenu->add("/hrm/evaluation_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Evals"), 1, $user->rights->hrm->evaluation->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); - //$newmenu->add("/hrm/evaluation_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->trans("NewEval"), 1, $user->rights->hrm->evaluation->write); - //$newmenu->add("/hrm/evaluation_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->rights->hrm->evaluation->read); - $newmenu->add("/hrm/compare.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillComparison"), 1, $user->rights->hrm->evaluation->read || $user->rights->hrm->compare_advance->read); + $newmenu->add("/hrm/evaluation_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Evals"), 1, $user->hasRight('hrm', 'evaluation', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); + //$newmenu->add("/hrm/evaluation_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->trans("NewEval"), 1, $user->hasRight('hrm', 'evaluation', 'write')); + //$newmenu->add("/hrm/evaluation_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'evaluation', 'read')); + $newmenu->add("/hrm/compare.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillComparison"), 1, $user->hasRight('hrm', 'evaluation', 'read') || $user->hasRight('hrm', 'compare_advance', 'read')); } // Leave/Holiday/Vacation module @@ -2271,46 +2288,47 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = // Load translation files required by the page $langs->loadLangs(array("holiday", "trips")); - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write, '', $mainmenu); - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->rights->holiday->read, '', $mainmenu); + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); + $newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); if ($usemenuhider || empty($leftmenu) || $leftmenu == "holiday") { - $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); } - $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->readall, '', $mainmenu, 'holiday_sm'); - $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday&action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday, '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); + $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); } // Trips and expenses (old module) if (isModEnabled('deplacement')) { $langs->load("trips"); - $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->deplacement->creer); - $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); - $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); + $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); + $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); + $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); } // Expense report if (isModEnabled('expensereport')) { $langs->loadLangs(array("trips", "bills")); - $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer); - $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire); + $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); + $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") { - $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->rights->expensereport->lire); + $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); } - $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->rights->expensereport->lire); - $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire); + $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire')); + $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); } if (isModEnabled('projet')) { @@ -2319,7 +2337,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = $search_project_user = GETPOST('search_project_user', 'int'); - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); } } } @@ -2347,22 +2365,22 @@ function get_left_menu_tools($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu } if (isModEnabled('mailing')) { - $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); - $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); + $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); + $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); } if (isModEnabled('export')) { $langs->load("exports"); - $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->rights->export->creer); - //$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire); + $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); + //$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->hasRight('export', 'lire')); } if (isModEnabled('import')) { $langs->load("exports"); - $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->rights->import->run); + $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); } } } @@ -2386,39 +2404,40 @@ function get_left_menu_members($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen // Load translation files required by the page $langs->loadLangs(array("members", "compta")); - $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Members"), 0, $user->rights->adherent->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'member', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/adherents/card.php?leftmenu=members&action=create", $langs->trans("NewMember"), 1, $user->rights->adherent->creer); - $newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=1", $langs->trans("MenuMembersValidated"), 2, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=withoutsubscription", $langs->trans("WithoutSubscription"), 3, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate", $langs->trans("UpToDate"), 3, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate", $langs->trans("OutOfDate"), 3, $user->rights->adherent->lire); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=0", $langs->trans("MenuMembersResiliated"), 2, $user->rights->adherent->lire); - $newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire); + $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Members"), 0, $user->hasRight('adherent', 'read'), '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'member', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/adherents/card.php?leftmenu=members&action=create", $langs->trans("NewMember"), 1, $user->hasRight('adherent', 'write')); + $newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1", $langs->trans("MenuMembersValidated"), 2, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=waitingsubscription", $langs->trans("WaitingSubscription"), 3, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate", $langs->trans("UpToDate"), 3, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate", $langs->trans("OutOfDate"), 3, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=0", $langs->trans("MenuMembersResiliated"), 2, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=-2", $langs->trans("MenuMembersExcluded"), 2, $user->hasRight('adherent', 'read')); + $newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->hasRight('adherent', 'read')); - $newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->rights->adherent->export); + $newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export')); if (!empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) { - $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->rights->adherent->export); + $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); } if (isModEnabled('categorie')) { $langs->load("categories"); - $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'read'), '', $mainmenu, 'cat'); } - $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->rights->adherent->cotisation->creer); - $newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->cotisation->lire); - $newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire); + $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->hasRight('adherent', 'cotisation', 'read'), '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->hasRight('adherent', 'cotisation', 'write')); + $newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->hasRight('adherent', 'cotisation', 'read')); + $newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->hasRight('adherent', 'read')); - //$newmenu->add("/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Tools"),0,$user->rights->adherent->export, '', $mainmenu, 'export'); - //if (isModEnabled('export') && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export); + //$newmenu->add("/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Tools"),0,$user->hasRight('adherent', 'export'), '', $mainmenu, 'export'); + //if (isModEnabled('export') && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->hasRight('adherent', 'export')); // Type - $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup', 0, '', '', '', img_picto('', 'members', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->rights->adherent->configurer); - $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->rights->adherent->configurer); + $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->hasRight('adherent', 'configurer'), '', $mainmenu, 'setup', 0, '', '', '', img_picto('', 'members', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->hasRight('adherent', 'configurer')); + $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->hasRight('adherent', 'configurer')); } } } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 627a13a7844..f6ee9da7d60 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -333,7 +333,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ public $phpmin; @@ -1368,7 +1368,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // For the moment, we manage this with hard coded exception //print "Remove box ".$file.'
    '; if ($file == 'box_graph_product_distribution.php') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { dol_syslog("We discard deleting module ".$file." because another module still active requires it."); continue; } @@ -1881,7 +1881,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $i = 0; while ($i < $num) { $obj2 = $this->db->fetch_object($resqlseladmin); - dol_syslog(get_class($this)."::insert_permissions Add permission id '.$r_id.' to user id=".$obj2->rowid); + dol_syslog(get_class($this)."::insert_permissions Add permission id ".$r_id." to user id=".$obj2->rowid); $tmpuser = new User($this->db); $result = $tmpuser->fetch($obj2->rowid); @@ -1968,13 +1968,14 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $menu->menu_handler = 'all'; //$menu->module=strtolower($this->name); TODO When right_class will be same than module name - $menu->module = empty($this->rights_class) ?strtolower($this->name) : $this->rights_class; + $menu->module = (empty($this->rights_class) ? strtolower($this->name) : $this->rights_class); if (!$this->menu[$key]['fk_menu']) { $menu->fk_menu = 0; } else { $foundparent = 0; $fk_parent = $this->menu[$key]['fk_menu']; + $reg = array(); if (preg_match('/^r=/', $fk_parent)) { // old deprecated method $fk_parent = str_replace('r=', '', $fk_parent); if (isset($this->menu[$fk_parent]['rowid'])) { diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.class.php similarity index 95% rename from htdocs/core/modules/action/rapport.pdf.php rename to htdocs/core/modules/action/rapport.class.php index 2b4ec29c880..8c0964b1378 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.class.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/modules/action/rapport.pdf.php + * \file htdocs/core/modules/action/rapport.class.php * \ingroup commercial * \brief File to build PDF with events */ @@ -98,10 +98,10 @@ class CommActionRapport $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->title = $langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month; $this->subject = $langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month; @@ -234,7 +234,7 @@ class CommActionRapport $sql = "SELECT s.nom as thirdparty, s.rowid as socid, s.client,"; $sql .= " a.id, a.datep as dp, a.datep2 as dp2,"; - $sql .= " a.fk_contact, a.note, a.percent as percent, a.label, a.fk_project,"; + $sql .= " a.fk_contact, a.note, a.percent as percent, a.fulldayevent, a.label, a.fk_project,"; $sql .= " c.code, c.libelle,"; $sql .= " u.login"; $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; @@ -332,7 +332,7 @@ class CommActionRapport // Description of event $pdf->SetXY(106, $y); - $pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset(dol_string_nohtmltag($text, 0)), 0, 'L', 0); + $pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset(dol_trunc(dol_string_nohtmltag($text, 0), 250, 'right', 'UTF-8', 0)), 0, 'L', 0); $y3 = $pdf->GetY(); $i++; diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index 247362b41dd..8be86dda944 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_asset_odt extends ModelePDFAsset /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -173,7 +173,9 @@ class doc_generic_asset_odt extends ModelePDFAsset if ($nbofiles) { $texte .= ''; } @@ -284,8 +286,8 @@ class doc_generic_asset_odt extends ModelePDFAsset dol_mkdir($conf->asset->dir_temp); if (!is_writable($conf->asset->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->asset->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->asset->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index de378ee79a8..f3bb6f57867 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -70,9 +70,9 @@ class pdf_standard_asset extends ModelePDFAsset /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -156,10 +156,10 @@ class pdf_standard_asset extends ModelePDFAsset $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); // Get source company $this->emetteur = $mysoc; @@ -241,7 +241,7 @@ class pdf_standard_asset extends ModelePDFAsset if (empty($object->lines[$i]->fk_product)) continue; //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -258,7 +258,7 @@ class pdf_standard_asset extends ModelePDFAsset foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo { if ($obj['photo_vignette']) { @@ -347,7 +347,7 @@ class pdf_standard_asset extends ModelePDFAsset $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -383,10 +383,10 @@ class pdf_standard_asset extends ModelePDFAsset $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); $tab_height = 130 - $top_shift; $tab_height_newpage = 150; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $tab_height_newpage -= $top_shift; } @@ -430,7 +430,7 @@ class pdf_standard_asset extends ModelePDFAsset if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } // $this->_pagefoot($pdf,$object,$outputlangs,1); @@ -488,7 +488,7 @@ class pdf_standard_asset extends ModelePDFAsset if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $height_note = $posyafter - $tab_top_newpage; @@ -510,7 +510,7 @@ class pdf_standard_asset extends ModelePDFAsset if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } @@ -669,13 +669,13 @@ class pdf_standard_asset extends ModelePDFAsset // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } } else { - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $sign * $object->lines[$i]->total_tva; @@ -748,7 +748,7 @@ class pdf_standard_asset extends ModelePDFAsset $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -766,7 +766,7 @@ class pdf_standard_asset extends ModelePDFAsset $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -1170,8 +1170,7 @@ class pdf_standard_asset extends ModelePDFAsset */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } diff --git a/htdocs/core/modules/asset/mod_asset_standard.php b/htdocs/core/modules/asset/mod_asset_standard.php index af28c0f9c5b..2e3ee3938e1 100644 --- a/htdocs/core/modules/asset/mod_asset_standard.php +++ b/htdocs/core/modules/asset/mod_asset_standard.php @@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/asset/modules_asset.php'; /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Asset */ class mod_asset_standard extends ModeleNumRefAsset { diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 3ab1cdcc193..ddc65b1ff8c 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -67,10 +67,10 @@ class pdf_ban extends ModeleBankAccountDoc $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -170,7 +170,7 @@ class pdf_ban extends ModeleBankAccountDoc $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("BAN")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 314a1fa7853..2995321eeb5 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -70,10 +70,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -182,7 +182,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("SepaMandate")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -654,9 +654,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 443e3f436f8..4add94ffafb 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -183,16 +183,16 @@ class modPhpbarcode extends ModeleBarCode */ public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { - global $conf, $filebarcode; + global $conf, $filebarcode, $langs; dol_mkdir($conf->barcode->dir_temp); if (!is_writable($conf->barcode->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } - $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; $filebarcode = $file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed32667a67e..9536251c36a 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -155,16 +155,16 @@ class modTcpdfbarcode extends ModeleBarCode */ public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { - global $conf, $_GET; + global $conf, $langs, $_GET; dol_mkdir($conf->barcode->dir_temp); if (!is_writable($conf->barcode->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } - $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; $tcpdfEncoding = $this->getTcpdfEncodingType($encoding); if (empty($tcpdfEncoding)) { diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php new file mode 100644 index 00000000000..e25cd1dd115 --- /dev/null +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -0,0 +1,358 @@ + + * Copyright (C) 2006-2014 Laurent Destailleur + * Copyright (C) 2007-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2022 Faustin Boitel + * + * 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 https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php + * \ingroup barcode + * \brief File of class to manage barcode numbering with standard rule + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.class.php'; + + +/** + * Class to manage barcode with standard rule + */ +class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode +{ + public $name = 'Standard'; // Model Name + + public $code_modifiable; // Editable code + + public $code_modifiable_invalide; // Modified code if it is invalid + + public $code_modifiable_null; // Modified code if it is null + + public $code_null; // Optional code + + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var int Automatic numbering + */ + public $code_auto; + + public $searchcode; // Search string + + public $numbitcounter; // Number of digits the counter + + public $prefixIsRequired; // The prefix field of third party must be filled when using {pre} + + + /** + * Constructor + */ + public function __construct() + { + $this->code_null = 0; + $this->code_modifiable = 1; + $this->code_modifiable_invalide = 1; + $this->code_modifiable_null = 1; + $this->code_auto = 1; + $this->prefixIsRequired = 0; + } + + + /** Return description of module + * + * @param Translate $langs Object langs + * @return string Description of module + */ + public function info($langs) + { + global $conf, $mc; + global $form; + + $langs->load("thirdparties"); + + $disabled = ((!empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? ' disabled' : ''); + + $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; + $texte .= '
    '; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode")); + $tooltip .= $langs->trans("GenericMaskCodes3EAN"); + $tooltip .= ''.$langs->trans("Example").':
    '; + $tooltip .= '020{000000000}? (for internal use)
    '; + $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; + $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; + //$tooltip.=$langs->trans("GenericMaskCodes5"); + + // Mask parameter + //$texte.= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + + $texte .= '
    '.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; + $texte .= '
    '; + + return $texte; + } + + + /** + * Return an example of result returned by getNextValue + * + * @param Translate $langs Object langs + * @param Societe $objthirdparty Object third-party + * @return string Return string example + */ + public function getExample($langs, $objthirdparty = 0) + { + $examplebarcode = $this->getNextValue($objthirdparty, ''); + if (!$examplebarcode) { + $examplebarcode = $langs->trans('NotConfigured'); + } + if ($examplebarcode == "ErrorBadMask") { + $langs->load("errors"); + $examplebarcode = $langs->trans($examplebarcode); + } + + return $examplebarcode; + } + /** + * Return literal barcode type code from numerical rowid type of barcode + * + * @param Database $db Database + * @param int $type Type of barcode (EAN, ISBN, ...) as rowid + * @return string + */ + public function literalBarcodeType($db, $type = '') + { + global $conf; + $out = ''; + + $sql = "SELECT rowid, code, libelle as label"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; + $sql .= " WHERE rowid = '".$db->escape($type)."'"; + $sql .= " AND entity = ".((int) $conf->entity); + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + + if ($num > 0) { + $obj = $db->fetch_object($result); + $out .= $obj->label; //take the label corresponding to the type rowid in the database + } + } else { + dol_print_error($db); + } + + return $out; + } + /** + * Return next value + * + * @param Societe $objthirdparty Object third-party + * @param string $type Type of barcode (EAN, ISBN, ...) + * @return string Value if OK, '' if module not configured, <0 if KO + */ + public function getNextValue($objthirdparty, $type = '') + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean) + + if (empty($type)) { + $type = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; + } //get barcode type configuration for companies if $type not set + + // TODO + + // Get Mask value + $mask = ''; + if (!empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $mask = $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK; + } + + if (empty($mask)) { + $this->error = 'NotConfigured'; + return ''; + } + + $field = 'barcode'; + $where = ''; + + $now = dol_now(); + + $numFinal = get_next_value($db, $mask, 'societe', $field, $where, '', $now); + //Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key + if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...) + $literaltype = ''; + $literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type + switch ($literaltype) { + case 'EAN13': //EAN13 rowid = 2 + if (strlen($numFinal)==13) {// be sure that the mask length is correct for EAN13 + $ean = substr($numFinal, 0, 12); //take first 12 digits + $eansum = barcode_gen_ean_sum($ean); + $ean .= $eansum; //substitute the las character by the key + $numFinal = $ean; + } + break; + // Other barcode cases with key could be written here + default: + break; + } + } + //End barcode with key + return $numFinal; + } + + + /** + * Check validity of code according to its rules + * + * @param DoliDB $db Database handler + * @param string $code Code to check/correct + * @param Societe $thirdparty Object third-party + * @param int $thirdparty_type 0 = customer/prospect , 1 = supplier + * @param string $type type of barcode (EAN, ISBN, ...) + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired + */ + public function verif($db, &$code, $thirdparty, $thirdparty_type, $type) + { + global $conf; + + //var_dump($code.' '.$thirdparty->ref.' '.$thirdparty_type);exit; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + $result = 0; + $code = strtoupper(trim($code)); + + if (empty($code) && $this->code_null && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $result = 0; + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK))) { + $result = -2; + } else { + if ($this->verif_syntax($code, $type) >= 0) { + $is_dispo = $this->verif_dispo($db, $code, $thirdparty); + if ($is_dispo <> 0) { + $result = -3; + } else { + $result = 0; + } + } else { + if (dol_strlen($code) == 0) { + $result = -2; + } else { + $result = -1; + } + } + } + + dol_syslog(get_class($this)."::verif type=".$thirdparty_type." result=".$result); + return $result; + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return if a code is used (by other element) + * + * @param DoliDB $db Handler acces base + * @param string $code Code to check + * @param Societe $thirdparty Objet third-party + * @return int 0 if available, <0 if KO + */ + public function verif_dispo($db, $code, $thirdparty) + { + // phpcs:enable + $sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."societe"; + $sql .= " WHERE barcode = '".$db->escape($code)."'"; + if ($thirdparty->id > 0) { + $sql .= " AND rowid <> ".$thirdparty->id; + } + + $resql = $db->query($sql); + if ($resql) { + if ($db->num_rows($resql) == 0) { + return 0; + } else { + return -1; + } + } else { + return -2; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return if a barcode value match syntax + * + * @param string $codefortest Code to check syntax + * @param string $typefortest Type of barcode (ISBN, EAN, ...) + * @return int 0 if OK, <0 if KO + */ + public function verif_syntax($codefortest, $typefortest) + { + // phpcs:enable + global $conf; + + $result = 0; + + // Get Mask value + $mask = empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK) ? '' : $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK; + if (!$mask) { + $this->error = 'NotConfigured'; + return -1; + } + + dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest); + + $newcodefortest = $codefortest; + + // Special case, if mask is on 12 digits instead of 13, we remove last char into code to test + if (in_array($typefortest, array('EAN13', 'ISBN'))) { // We remove the CRC char not included into mask + if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) { + if (strlen($reg[1]) == 12) { + $newcodefortest = substr($newcodefortest, 0, 12); + } + dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest); + } + } + + $result = check_value($mask, $newcodefortest); + if (is_string($result)) { + $this->error = $result; + return -1; + } + + return $result; + } +} diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 01a00405452..dac575cbb17 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -75,7 +75,7 @@ abstract class ModeleNumRefBarCode */ public function getNom($langs) { - return empty($this->name) ? $this->nom : $this->name; + return empty($this->name) ? get_class($this) : $this->name; } /** Return a numbering example diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 43bf3ecd2cb..bec28b941aa 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_bom_odt extends ModelePDFBom /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -169,7 +169,9 @@ class doc_generic_bom_odt extends ModelePDFBom $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -274,7 +276,7 @@ class doc_generic_bom_odt extends ModelePDFBom $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -283,11 +285,11 @@ class doc_generic_bom_odt extends ModelePDFBom if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -295,8 +297,8 @@ class doc_generic_bom_odt extends ModelePDFBom dol_mkdir($conf->bom->dir_temp); if (!is_writable($conf->bom->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->bom->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->bom->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/bom/mod_bom_standard.php b/htdocs/core/modules/bom/mod_bom_standard.php index f5a9fb75976..db2d0f2ed7f 100644 --- a/htdocs/core/modules/bom/mod_bom_standard.php +++ b/htdocs/core/modules/bom/mod_bom_standard.php @@ -25,7 +25,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/bom/modules_bom.php'; /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for BOM */ class mod_bom_standard extends ModeleNumRefboms { diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 21c131ad2a6..3985cb6be90 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -63,10 +63,10 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); // Retrieves transmitter $this->emetteur = $mysoc; @@ -155,7 +155,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->transnoentities("CheckReceipt")." ".$number); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -407,7 +407,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts { global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); // Line of free text $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 86e43a9c021..5e94397bc91 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_order_odt extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -159,7 +159,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $texte .= $conf->global->COMMANDE_ADDON_PDF_ODT_PATH; $texte .= ''; $texte .= '
    '; - $texte .= ''; + $texte .= ''; $texte .= '
    '; // Scan directories @@ -176,7 +176,9 @@ class doc_generic_order_odt extends ModelePDFCommandes $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -280,7 +282,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -289,11 +291,11 @@ class doc_generic_order_odt extends ModelePDFCommandes if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -301,8 +303,8 @@ class doc_generic_order_odt extends ModelePDFCommandes dol_mkdir($conf->commande->dir_temp); if (!is_writable($conf->commande->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->commande->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->commande->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index cb73b6fc282..e0dff278f96 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -74,9 +74,9 @@ class pdf_einstein extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -149,10 +149,10 @@ class pdf_einstein extends ModelePDFCommandes $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -323,7 +323,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -359,11 +359,11 @@ class pdf_einstein extends ModelePDFCommandes $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -456,7 +456,7 @@ class pdf_einstein extends ModelePDFCommandes if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -529,7 +529,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by value of vat in $this->vat["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -608,7 +608,7 @@ class pdf_einstein extends ModelePDFCommandes $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -628,7 +628,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -774,7 +774,7 @@ class pdf_einstein extends ModelePDFCommandes } */ /* TODO - else if (! empty($object->availability_code)) + else if (!empty($object->availability_code)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetTextColor(200,0,0); @@ -871,7 +871,7 @@ class pdf_einstein extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -938,14 +938,14 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -954,7 +954,7 @@ class pdf_einstein extends ModelePDFCommandes // Nothing to do } else { //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -984,7 +984,7 @@ class pdf_einstein extends ModelePDFCommandes } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1044,7 +1044,7 @@ class pdf_einstein extends ModelePDFCommandes } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1075,7 +1075,7 @@ class pdf_einstein extends ModelePDFCommandes } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1535,8 +1535,7 @@ class pdf_einstein extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 8930481d219..c8196d41a63 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -74,9 +74,9 @@ class pdf_eratosthene extends ModelePDFCommandes /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -154,10 +154,10 @@ class pdf_eratosthene extends ModelePDFCommandes $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -253,7 +253,7 @@ class pdf_eratosthene extends ModelePDFCommandes $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -271,7 +271,7 @@ class pdf_eratosthene extends ModelePDFCommandes } foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -365,7 +365,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -392,13 +392,13 @@ class pdf_eratosthene extends ModelePDFCommandes $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -466,7 +466,7 @@ class pdf_eratosthene extends ModelePDFCommandes if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } // $this->_pagefoot($pdf,$object,$outputlangs,1); @@ -524,7 +524,7 @@ class pdf_eratosthene extends ModelePDFCommandes if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $height_note = $posyafter - $tab_top_newpage; @@ -546,7 +546,7 @@ class pdf_eratosthene extends ModelePDFCommandes if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } @@ -642,7 +642,7 @@ class pdf_eratosthene extends ModelePDFCommandes if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter + 1); } } else { @@ -754,7 +754,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -832,7 +832,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -852,7 +852,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -992,7 +992,7 @@ class pdf_eratosthene extends ModelePDFCommandes } */ /* TODO - else if (! empty($object->availability_code)) + else if (!empty($object->availability_code)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetTextColor(200,0,0); @@ -1088,7 +1088,7 @@ class pdf_eratosthene extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -1152,14 +1152,14 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -1168,7 +1168,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Nothing to do } else { //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1197,7 +1197,7 @@ class pdf_eratosthene extends ModelePDFCommandes } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1257,7 +1257,7 @@ class pdf_eratosthene extends ModelePDFCommandes } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1288,7 +1288,7 @@ class pdf_eratosthene extends ModelePDFCommandes } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1720,8 +1720,7 @@ class pdf_eratosthene extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 8c9ef0385eb..71a41d0b3c4 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -20,12 +20,12 @@ /** * \file htdocs/core/modules/commande/mod_commande_marbre.php * \ingroup commande - * \brief File of class to manage customer order numbering rules Marbre + * \brief File of class to manage Sales Order numbering rules Marbre */ require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; /** - * Class to manage customer order numbering rules Marbre + * Class to manage Sales Order numbering rules Marbre */ class mod_commande_marbre extends ModeleNumRefCommandes { diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 36efdcc1d88..07dcfdced9e 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -23,14 +23,14 @@ /** * \file htdocs/core/modules/commande/mod_commande_saphir.php * \ingroup commande - * \brief Fichier contenant la classe du modele de numerotation de reference de commande Saphir + * \brief File of class to manage Sales Order numbering rules Saphir */ require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; /** - * Class to manage customer order numbering rules Saphir + * Class to manage Sales Order numbering rules Saphir */ class mod_commande_saphir extends ModeleNumRefCommandes { @@ -79,7 +79,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes // Parametrage du prefix $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; + $texte .= '
    '; // List of directories area $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '
    '; @@ -161,10 +160,25 @@ class doc_generic_contract_odt extends ModelePDFContract $texte .= '
    '; // Scan directories - if (count($listofdir)) { - $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; + $nbofiles = count($listoffiles); + if (!empty($conf->global->CONTRACT_ADDON_PDF_ODT_PATH)) { + $texte .= $langs->trans("NumberOfModelFilesFound").': '; + //$texte.=$nbofiles?'':''; + $texte .= count($listoffiles); + //$texte.=$nbofiles?'':''; + $texte .= ''; } + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; + } + $texte .= '
    '; + } // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate"); $maxfilesizearray = getMaxFileSizeArray(); @@ -228,7 +242,7 @@ class doc_generic_contract_odt extends ModelePDFContract $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; - // Load traductions files required by page + // Load translation files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); if ($conf->contrat->multidir_output[$object->entity]) { @@ -266,7 +280,7 @@ class doc_generic_contract_odt extends ModelePDFContract $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -275,11 +289,11 @@ class doc_generic_contract_odt extends ModelePDFContract if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -287,8 +301,8 @@ class doc_generic_contract_odt extends ModelePDFContract dol_mkdir($conf->contrat->dir_temp); if (!is_writable($conf->contrat->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->contrat->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->contrat->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } @@ -382,16 +396,21 @@ class doc_generic_contract_odt extends ModelePDFContract dol_syslog($e->getMessage(), LOG_INFO); } + // Call the ODTSubstitution hook + $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); + $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) { // Image + if (preg_match('/logo$/', $key)) { + // Image if (file_exists($value)) { $odfHandler->setImage($key, $value); } else { $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); } - } else // Text - { + } else { + // Text $odfHandler->setVars($key, $value, true, 'UTF-8'); } } catch (OdfException $e) { @@ -448,7 +467,7 @@ class doc_generic_contract_odt extends ModelePDFContract } // Call the beforeODTSave hook - $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -457,6 +476,7 @@ class doc_generic_contract_odt extends ModelePDFContract $odfHandler->exportAsAttachedPDF($file); } catch (Exception $e) { $this->error = $e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); return -1; } } else { @@ -464,10 +484,12 @@ class doc_generic_contract_odt extends ModelePDFContract $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error = $e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); return -1; } } + $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if (!empty($conf->global->MAIN_UMASK)) { diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 1875cfb833c..bc938accc92 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -67,9 +67,9 @@ class pdf_strato extends ModelePDFContract /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -145,10 +145,10 @@ class pdf_strato extends ModelePDFContract $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION @@ -256,7 +256,7 @@ class pdf_strato extends ModelePDFContract $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -274,7 +274,7 @@ class pdf_strato extends ModelePDFContract $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); // Display notes if (!empty($object->note_public)) { @@ -390,7 +390,7 @@ class pdf_strato extends ModelePDFContract if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -783,8 +783,7 @@ class pdf_strato extends ModelePDFContract */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'CONTRACT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index e0c54c1d022..e88d2c46b32 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -85,7 +85,7 @@ class mod_contract_magre extends ModelNumRefContracts $tooltip .= $langs->trans("GenericMaskCodes5"); $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; @@ -127,7 +127,7 @@ class mod_contract_magre extends ModelNumRefContracts require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $mask = $conf->global->CONTRACT_MAGRE_MASK; + $mask = getDolGlobalString("CONTRACT_MAGRE_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 7d880328663..46a70464583 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -66,9 +66,9 @@ class pdf_storm extends ModelePDFDeliveryOrder /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -140,10 +140,10 @@ class pdf_storm extends ModelePDFDeliveryOrder $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -238,7 +238,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -252,7 +252,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $dir = $conf->product->dir_output.'/'.$midir; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -324,7 +324,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -343,7 +343,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -351,7 +351,7 @@ class pdf_storm extends ModelePDFDeliveryOrder // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -445,7 +445,7 @@ class pdf_storm extends ModelePDFDeliveryOrder if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposbefore + 1); $curY = $tab_top_newpage; @@ -485,7 +485,7 @@ class pdf_storm extends ModelePDFDeliveryOrder if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -571,7 +571,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -591,7 +591,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -921,8 +921,7 @@ class pdf_storm extends ModelePDFDeliveryOrder */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index 2e0c3f2d05c..5936f874a1b 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -65,9 +65,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -139,10 +139,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -284,7 +284,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -322,13 +322,13 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -401,7 +401,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -495,7 +495,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -515,7 +515,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -920,8 +920,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 792c8434ba4..d859ae0ca56 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -120,18 +120,18 @@ class html_cerfafr extends ModeleDon // This is not the proper way to do it but $formclass->form_modes_reglement // prints the translation instead of returning it - if ($don->modepaiementid) { - $formclass->load_cache_types_paiements(); - $paymentmode = $formclass->cache_types_paiements[$don->modepaiementid]['label']; + $formclass->load_cache_types_paiements(); + if ($don->modepaymentid) { + $paymentmode = $formclass->cache_types_paiements[$don->modepaymentid]['label']; } else { $paymentmode = ''; } - - if ($don->modepaymentcode == 'CHQ') { + $modepaymentcode = !empty($formclass->cache_types_paiements[$don->modepaymentid]['code']) ? $formclass->cache_types_paiements[$don->modepaymentid]['code'] : ""; + if ($modepaymentcode == 'CHQ') { $ModePaiement = '
    Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; + + // This was a callback request from service, get the token + try { + //var_dump($_GET['code']); + //var_dump($state); + //var_dump($apiService); // OAuth\OAuth2\Service\GitHub + + //$token = $apiService->requestAccessToken(GETPOST('code'), $state); + $token = $apiService->requestAccessToken(GETPOST('code')); + // Github is a service that does not need state to be stored. + // Into constructor of GitHub, the call + // parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri) + // has not the ending parameter to true like the Google class constructor. + + setEventMessages($langs->trans('NewTokenStored'), null, 'mesgs'); // Stored into object managed by class DoliStorage so into table oauth_token + + $backtourl = $_SESSION["backtourlsavedbeforeoauthjump"]; + unset($_SESSION["backtourlsavedbeforeoauthjump"]); + + header('Location: '.$backtourl); + exit(); + } catch (Exception $e) { + print $e->getMessage(); + } +} else { // If entry on page with no parameter, we arrive here + $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; + $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; + $_SESSION['oauthstateanticsrf'] = $state; + + // This may create record into oauth_state before the header redirect. + // Creation of record with state in this tables depend on the Provider used (see its constructor). + if (GETPOST('state')) { + $url = $apiService->getAuthorizationUri(array('state' => GETPOST('state'))); + } else { + $url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated + } + + // we go on oauth provider authorization page + header('Location: '.$url); + exit(); +} + + +/* + * View + */ + +// No view at all, just actions + +$db->close(); diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index 5c24e23aafa..24140718880 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -1,5 +1,5 @@ * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -22,6 +22,7 @@ * \brief Page to get oauth callback */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; use OAuth\Common\Storage\DoliStorage; @@ -86,7 +87,7 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { //var_dump($requestedpermissionsarray);exit; // Instantiate the Api service using the credentials, http client and storage mechanism for the token -$apiService = $serviceFactory->createService('GitHub'.($keyforprovider ? '-'.$keyforprovider : ''), $credentials, $storage, $requestedpermissionsarray); +$apiService = $serviceFactory->createService('GitHub', $credentials, $storage, $requestedpermissionsarray); // access type needed to have oauth provider refreshing token //$apiService->setAccessType('offline'); diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 2812c4f7163..b993cbdd81e 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -1,5 +1,5 @@ * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -25,6 +25,7 @@ * \brief Page to get oauth callback */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; use OAuth\Common\Storage\DoliStorage; @@ -88,10 +89,13 @@ if ($state) { $requestedpermissionsarray = explode(',', $statewithscopeonly); // Example: 'userinfo_email,userinfo_profile,openid,email,profile,cloud_print'. $statewithanticsrfonly = preg_replace('/^.*\-/', '', $state); } -if ($action != 'delete' && empty($requestedpermissionsarray)) { - print 'Error, parameter state is not defined'; - exit; + +if ($action != 'delete' && (empty($statewithscopeonly) || empty($requestedpermissionsarray))) { + setEventMessages($langs->trans('ScopeUndefined'), null, 'errors'); + header('Location: '.$backtourl); + exit(); } + //var_dump($requestedpermissionsarray);exit; diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index bf9656df783..ef35b6573cc 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -1,5 +1,5 @@ * Copyright (C) 2019 Thibault FOUCART * * This program is free software; you can redistribute it and/or modify @@ -22,6 +22,7 @@ * \brief Page to get oauth callback */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; use OAuth\Common\Storage\DoliStorage; diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index 64d55fba760..a5d481dbef5 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -1,5 +1,5 @@ * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify @@ -22,6 +22,7 @@ * \brief Page to get oauth callback */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; use OAuth\Common\Storage\DoliStorage; diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 964558de8df..c04d3ac9ca5 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -137,7 +137,6 @@ class printing_printgcp extends PrintingDriver $this->errors[] = $e->getMessage(); $token_ok = false; } - //var_dump($this->errors);exit; $expire = false; // Is token expired or will token expire in the next 30 seconds @@ -333,6 +332,7 @@ class printing_printgcp extends PrintingDriver } $fileprint .= '/'.$file; $mimetype = dol_mimetype($fileprint); + $printer_id = ''; // select printer uri for module order, propal,... $sql = "SELECT rowid, printer_id, copy FROM ".MAIN_DB_PREFIX."printing WHERE module='".$this->db->escape($module)."' AND driver='printgcp' AND userid=".((int) $user->id); $result = $this->db->query($sql); diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index bf1da990923..0e9eefa1e45 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -141,8 +141,8 @@ class pdf_standardlabel extends CommonStickerGenerator $widthtouse = $maxwidthtouse; $heighttouse = round($widthtouse / $imgratio); } else { - $heightouse = $maxheighttouse; - $widthtouse = round($heightouse * $imgratio); + $heighttouse = $maxheighttouse; + $widthtouse = round($heighttouse * $imgratio); } } //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; @@ -294,7 +294,7 @@ class pdf_standardlabel extends CommonStickerGenerator $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($keywords); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index 907b18daef3..0d380ce1537 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -317,7 +317,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($keywords); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 5d228da7d8c..d5321b92ceb 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -45,9 +45,9 @@ class doc_generic_product_odt extends ModelePDFProduct /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -153,7 +153,7 @@ class doc_generic_product_odt extends ModelePDFProduct $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); $texte .= '
    '; $texte .= ''; $texte .= '
    '; $texte .= ''; @@ -278,7 +278,7 @@ class doc_generic_product_odt extends ModelePDFProduct $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +287,11 @@ class doc_generic_product_odt extends ModelePDFProduct if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -299,8 +299,8 @@ class doc_generic_product_odt extends ModelePDFProduct dol_mkdir($conf->product->dir_temp); if (!is_writable($conf->product->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->product->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } @@ -334,7 +334,7 @@ class doc_generic_product_odt extends ModelePDFProduct '__FROM_EMAIL__' => $this->emetteur->email, '__TOTAL_TTC__' => $object->total_ttc, '__TOTAL_HT__' => $object->total_ht, - '__TOTAL_VAT__' => $object->total_vat + '__TOTAL_VAT__' => $object->total_tva ); complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index ea52b9c3c70..89df34f8f73 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -97,10 +97,10 @@ class pdf_standard extends ModelePDFProduct $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_multilang = 1; // Available in several languages @@ -213,7 +213,7 @@ class pdf_standard extends ModelePDFProduct $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -233,7 +233,7 @@ class pdf_standard extends ModelePDFProduct $tab_top = 42; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -351,8 +351,8 @@ class pdf_standard extends ModelePDFProduct if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('','',true); - if (! empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter+1); } } @@ -421,7 +421,7 @@ class pdf_standard extends ModelePDFProduct $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; $localtax1ligne=$object->lines[$i]->total_localtax1; @@ -439,7 +439,7 @@ class pdf_standard extends ModelePDFProduct // Retrieve type from database for backward compatibility with old records if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined - && (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax + && (!empty($localtax1_rate) || !empty($localtax2_rate))) // and there is local tax { $localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$object->thirdparty,$mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; @@ -457,7 +457,7 @@ class pdf_standard extends ModelePDFProduct $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) + if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak) { @@ -499,9 +499,9 @@ class pdf_standard extends ModelePDFProduct $this->_pagefoot($pdf,$object,$outputlangs,1); // New page $pdf->AddPage(); - if (! empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -775,7 +775,7 @@ class pdf_standard extends ModelePDFProduct // Show sender $posy=42; $posx=$this->marge_gauche; - if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; $hautcadre=40; // Show sender frame @@ -816,8 +816,7 @@ class pdf_standard extends ModelePDFProduct */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index b2164e80175..c883de79c5e 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -139,7 +139,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * Return an example of result returned by getNextValue * * @param Translate $langs Object langs - * @param product $objproduct Object product + * @param Product $objproduct Object product * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index f7578d696f6..5819821f814 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -33,10 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php' class mod_codeproduct_leopard extends ModeleProductCode { /* - * Attention ce module est utilise par defaut si aucun module n'a - * ete definit dans la configuration + * Please note this module is used by default if no module has been defined in the configuration * - * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible + * Its operation must therefore remain as open as possible */ /** @@ -100,7 +99,7 @@ class mod_codeproduct_leopard extends ModeleProductCode /** * Return an example of result returned by getNextValue * - * @param product $objproduct Object product + * @param Product $objproduct Object product * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return next value */ diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 0e108b6b021..d6128573f97 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -132,7 +132,7 @@ class mod_lot_advanced extends ModeleNumRefBatch * Return next free value * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Value if KO, <0 if KO */ public function getNextValue($objsoc, $object) @@ -143,6 +143,15 @@ class mod_lot_advanced extends ModeleNumRefBatch // We get cursor rule $mask = getDolGlobalString('LOT_ADVANCED_MASK'); + $filter = ''; + if (getDolGlobalString('PRODUCTBATCH_LOT_USE_PRODUCT_MASKS') && !empty($object->fk_product)) { + $product = new Product($db); + $res = $product->fetch($object->fk_product); + if ($res > 0 && !empty($product->batch_mask)) { + $mask = $product->batch_mask; + $filter = ''; + } + } if (!$mask) { $this->error = 'NotConfigured'; @@ -151,7 +160,7 @@ class mod_lot_advanced extends ModeleNumRefBatch $date = dol_now(); - $numFinal = get_next_value($db, $mask, 'product_lot', 'batch', '', null, $date); + $numFinal = get_next_value($db, $mask, 'product_lot', 'batch', $filter, null, $date); return $numFinal; } diff --git a/htdocs/core/modules/product_batch/mod_lot_free.php b/htdocs/core/modules/product_batch/mod_lot_free.php index d6b24945ab0..8d14a25374f 100644 --- a/htdocs/core/modules/product_batch/mod_lot_free.php +++ b/htdocs/core/modules/product_batch/mod_lot_free.php @@ -1,6 +1,7 @@ * Copyright (C) 2006-2009 Laurent Destailleur + * Copyright (C) 2022 Frédéric 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 @@ -26,16 +27,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; /** - * \class mod_codeproduct_leopard - * \brief Classe permettant la gestion leopard des codes produits + * \class mod_lot_free + * \brief Class allowing lot_free management of batch numbers */ class mod_lot_free extends ModeleNumRefBatch { /* - * Attention ce module est utilise par defaut si aucun module n'a - * ete definit dans la configuration + * Please note this module is used by default if no module has been defined in the configuration * - * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible + * Its operation must therefore remain as open as possible */ @@ -44,7 +44,10 @@ class mod_lot_free extends ModeleNumRefBatch */ public $name = 'lot_free'; - public $code_modifiable; // Code modifiable + /** + * @var string Code modifiable + */ + public $code_modifiable; public $code_modifiable_invalide; // Code modifiable si il est invalide @@ -94,12 +97,11 @@ class mod_lot_free extends ModeleNumRefBatch * Return an example of result returned by getNextValue * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Return next value */ public function getNextValue($objsoc, $object) { - global $langs; return ''; } } diff --git a/htdocs/core/modules/product_batch/mod_lot_standard.php b/htdocs/core/modules/product_batch/mod_lot_standard.php index fc8d1389a00..ef3918fd167 100644 --- a/htdocs/core/modules/product_batch/mod_lot_standard.php +++ b/htdocs/core/modules/product_batch/mod_lot_standard.php @@ -112,7 +112,7 @@ class mod_lot_standard extends ModeleNumRefBatch * Return next free value * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Value if KO, <0 if KO */ public function getNextValue($objsoc, $object) diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index f8d61c43c61..6c796f06c3b 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -132,7 +132,7 @@ class mod_sn_advanced extends ModeleNumRefBatch * Return next free value * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Value if KO, <0 if KO */ public function getNextValue($objsoc, $object) @@ -144,6 +144,16 @@ class mod_sn_advanced extends ModeleNumRefBatch // We get cursor rule $mask = getDolGlobalString('SN_ADVANCED_MASK'); + $filter = ''; + if (getDolGlobalString('PRODUCTBATCH_SN_USE_PRODUCT_MASKS') && !empty($object->fk_product)) { + $product = new Product($db); + $res = $product->fetch($object->fk_product); + if ($res > 0 && !empty($product->batch_mask)) { + $mask = $product->batch_mask; + $filter = ''; + } + } + if (!$mask) { $this->error = 'NotConfigured'; return 0; @@ -151,7 +161,7 @@ class mod_sn_advanced extends ModeleNumRefBatch $date = dol_now(); - $numFinal = get_next_value($db, $mask, 'product_lot', 'batch', '', null, $date); + $numFinal = get_next_value($db, $mask, 'product_lot', 'batch', $filter, null, $date); return $numFinal; } diff --git a/htdocs/core/modules/product_batch/mod_sn_free.php b/htdocs/core/modules/product_batch/mod_sn_free.php index f6b2417d34b..8ada51fb93b 100644 --- a/htdocs/core/modules/product_batch/mod_sn_free.php +++ b/htdocs/core/modules/product_batch/mod_sn_free.php @@ -93,7 +93,7 @@ class mod_sn_free extends ModeleNumRefBatch * Return an example of result returned by getNextValue * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Return next value */ public function getNextValue($objsoc, $object) diff --git a/htdocs/core/modules/product_batch/mod_sn_standard.php b/htdocs/core/modules/product_batch/mod_sn_standard.php index d6c109cff81..ccd49d03b8f 100644 --- a/htdocs/core/modules/product_batch/mod_sn_standard.php +++ b/htdocs/core/modules/product_batch/mod_sn_standard.php @@ -112,7 +112,7 @@ class mod_sn_standard extends ModeleNumRefBatch * Return next free value * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Value if KO, <0 if KO */ public function getNextValue($objsoc, $object) diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index 42d4d052bfe..ea64bd98609 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -125,7 +125,7 @@ abstract class ModeleNumRefBatch * Returns next assigned value * * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for + * @param Productlot $object Object we need next value for * @return string Valeur */ public function getNextValue($objsoc, $object) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 8bd8d030a37..2015da21f61 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } if (isModEnabled('facture')) { @@ -46,28 +46,30 @@ if (isModEnabled('facture')) { if (isModEnabled('facture')) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } -if (!empty($conf->deplacement->enabled)) { +if (isModEnabled('deplacement')) { require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; } if (isModEnabled('agenda')) { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; } - +if (isModEnabled('expedition')) { + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; +} /** * Class to build documents using ODF templates generator @@ -82,9 +84,9 @@ class doc_generic_project_odt extends ModelePDFProjects /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -132,8 +134,8 @@ class doc_generic_project_odt extends ModelePDFProjects // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->pays_code) { - $this->emetteur->pays_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini } } @@ -466,7 +468,9 @@ class doc_generic_project_odt extends ModelePDFProjects $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -556,7 +560,7 @@ class doc_generic_project_odt extends ModelePDFProjects $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -565,11 +569,11 @@ class doc_generic_project_odt extends ModelePDFProjects if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -577,8 +581,8 @@ class doc_generic_project_odt extends ModelePDFProjects dol_mkdir($conf->project->dir_temp); if (!is_writable($conf->project->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->project->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } @@ -941,7 +945,7 @@ class doc_generic_project_odt extends ModelePDFProjects 'title' => "ListProposalsAssociatedProject", 'class' => 'Propal', 'table' => 'propal', - 'test' => $conf->propal->enabled && $user->rights->propale->lire + 'test' => $conf->propal->enabled && $user->rights->propal->lire ), 'order' => array( 'title' => "ListOrdersAssociatedProject", @@ -971,13 +975,13 @@ class doc_generic_project_odt extends ModelePDFProjects 'title' => "ListSupplierOrdersAssociatedProject", 'table' => 'commande_fournisseur', 'class' => 'CommandeFournisseur', - 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire) + 'test' => (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (isModEnabled("supplier_order") && $user->rights->supplier_order->lire) ), 'invoice_supplier' => array( 'title' => "ListSupplierInvoicesAssociatedProject", 'table' => 'facture_fourn', 'class' => 'FactureFournisseur', - 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire) + 'test' => (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (isModEnabled("supplier_invoice") && $user->rights->supplier_invoice->lire) ), 'contract' => array( 'title' => "ListContractAssociatedProject", diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index df013a2fad0..b5c3c6d215b 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -65,9 +65,9 @@ class pdf_baleine extends ModelePDFProjects /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -139,10 +139,10 @@ class pdf_baleine extends ModelePDFProjects $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -266,7 +266,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -284,7 +284,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetTextColor(0, 0, 0); $tab_top = 50; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -360,7 +360,7 @@ class pdf_baleine extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -385,7 +385,7 @@ class pdf_baleine extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -467,7 +467,7 @@ class pdf_baleine extends ModelePDFProjects $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -487,7 +487,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -695,8 +695,7 @@ class pdf_baleine extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index fba5e02b098..9947bb49b0b 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -81,9 +81,9 @@ class pdf_beluga extends ModelePDFProjects /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -175,10 +175,10 @@ class pdf_beluga extends ModelePDFProjects $this->page_hauteur = $formatarray['height']; } $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -315,7 +315,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -333,7 +333,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetTextColor(0, 0, 0); $tab_top = 50; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -374,7 +374,7 @@ class pdf_beluga extends ModelePDFProjects 'class'=>'Propal', 'table'=>'propal', 'datefieldname'=>'datep', - 'test'=>$conf->propal->enabled && $user->rights->propale->lire, + 'test'=>$conf->propal->enabled && $user->rights->propal->lire, 'lang'=>'propal'), 'order'=>array( 'name'=>"CustomersOrders", @@ -407,7 +407,7 @@ class pdf_beluga extends ModelePDFProjects 'class'=>'CommandeFournisseur', 'table'=>'commande_fournisseur', 'datefieldname'=>'date_commande', - 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire), + 'test'=>(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (isModEnabled("supplier_order") && $user->rights->supplier_order->lire), 'lang'=>'orders'), 'invoice_supplier'=>array( 'name'=>"BillsSuppliers", @@ -416,7 +416,7 @@ class pdf_beluga extends ModelePDFProjects 'margin'=>'minus', 'table'=>'facture_fourn', 'datefieldname'=>'datef', - 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire), + 'test'=>(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (isModEnabled("supplier_invoice") && $user->rights->supplier_invoice->lire), 'lang'=>'bills'), 'contract'=>array( 'name'=>"Contracts", @@ -587,7 +587,7 @@ class pdf_beluga extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -612,7 +612,7 @@ class pdf_beluga extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -740,7 +740,7 @@ class pdf_beluga extends ModelePDFProjects $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation($this->orientation, 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -895,8 +895,7 @@ class pdf_beluga extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 9d118b2a555..7af10dd170d 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -64,9 +64,9 @@ class pdf_timespent extends ModelePDFProjects /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -138,10 +138,10 @@ class pdf_timespent extends ModelePDFProjects $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -266,7 +266,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -284,7 +284,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetTextColor(0, 0, 0); $tab_top = 50; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -364,7 +364,7 @@ class pdf_timespent extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -389,7 +389,7 @@ class pdf_timespent extends ModelePDFProjects if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -470,7 +470,7 @@ class pdf_timespent extends ModelePDFProjects $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -490,7 +490,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -691,8 +691,7 @@ class pdf_timespent extends ModelePDFProjects */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 47fd83842ed..1020c42ebf6 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -30,6 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php'; */ class mod_project_universal extends ModeleNumRefProjects { + /** + * @var DoliDB $db + */ + public $db; + /** * Dolibarr version of the loaded document * @var string diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index dc3f19d72fd..894df4bf8f3 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -127,6 +127,11 @@ abstract class ModeleNumRefProjects */ public $error = ''; + /** + * @var string $version + */ + public $version; + /** * Return if a module can be used or not * diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index e26318b749c..a7f3eab4a30 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } if (isModEnabled('facture')) { @@ -47,22 +47,22 @@ if (isModEnabled('facture')) { if (isModEnabled('facture')) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } -if (!empty($conf->deplacement->enabled)) { +if (isModEnabled('deplacement')) { require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; } if (isModEnabled('agenda')) { @@ -83,9 +83,9 @@ class doc_generic_task_odt extends ModelePDFTask /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -433,7 +433,9 @@ class doc_generic_task_odt extends ModelePDFTask $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -517,9 +519,9 @@ class doc_generic_task_odt extends ModelePDFTask $newfiletmp = preg_replace('/\.(ods|odt)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; - $file = $dir.'/'.$newfiletmp.'.odt'; + $file = $dir . '/' . $newfiletmp . '.odt'; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -527,8 +529,8 @@ class doc_generic_task_odt extends ModelePDFTask dol_mkdir($conf->project->dir_temp); if (!is_writable($conf->project->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->project->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7f2e0733e9d..6715b2e39a5 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -46,9 +46,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -123,7 +123,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { + if (getDolGlobalInt("MAIN_PROPAL_CHOOSE_ODT_DOCUMENT") > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -187,7 +187,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= '
    '; // Set default template for different status of proposal - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { + if (getDolGlobalInt("MAIN_PROPAL_CHOOSE_ODT_DOCUMENT") > 0) { // Model for creation $list = ModelePDFPropales::liste_modeles($this->db); $texte .= '
    '; @@ -311,7 +311,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -320,11 +320,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -332,8 +332,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales dol_mkdir($conf->propal->multidir_temp[$object->entity]); if (!is_writable($conf->propal->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->propal->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->propal->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 177443153ce..e1afcc0c7a0 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -70,9 +70,9 @@ class pdf_azur extends ModelePDFPropales /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -145,10 +145,10 @@ class pdf_azur extends ModelePDFPropales $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -243,8 +243,8 @@ class pdf_azur extends ModelePDFPropales } // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) { - $this->watermark = $conf->global->PROPALE_DRAFT_WATERMARK; + if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('PROPALE_DRAFT_WATERMARK')) { + $this->watermark = getDolGlobalString('PROPALE_DRAFT_WATERMARK'); } $nblines = count($object->lines); @@ -262,7 +262,7 @@ class pdf_azur extends ModelePDFPropales $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -280,7 +280,7 @@ class pdf_azur extends ModelePDFPropales $dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product } foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -373,7 +373,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -419,11 +419,11 @@ class pdf_azur extends ModelePDFPropales $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -522,7 +522,7 @@ class pdf_azur extends ModelePDFPropales if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -566,7 +566,7 @@ class pdf_azur extends ModelePDFPropales if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -640,7 +640,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -723,7 +723,7 @@ class pdf_azur extends ModelePDFPropales $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -743,7 +743,7 @@ class pdf_azur extends ModelePDFPropales $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -793,7 +793,7 @@ class pdf_azur extends ModelePDFPropales // Find the desire PDF $filetomerge = new Propalmergepdfproduct($this->db); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $filetomerge->fetch_by_product($line->fk_product, $outputlangs->defaultlang); } else { $filetomerge->fetch_by_product($line->fk_product); @@ -814,16 +814,16 @@ class pdf_azur extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (!empty($linefile->id) && !empty($linefile->file_name)) { - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { - if (!empty($conf->product->enabled)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { + if (isModEnabled("product")) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; } } else { - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } } @@ -961,8 +961,33 @@ class pdf_azur extends ModelePDFPropales $posy = $pdf->GetY() + 1; } + // Show delivery mode + if (empty($conf->global->PROPOSAL_PDF_HIDE_DELIVERYMODE) && $object->shipping_method_id > 0) { + $outputlangs->load("sendings"); + + $shipping_method_id = $object->shipping_method_id; + if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD) && !empty($this->emetteur->shipping_method_id)) { + $shipping_method_id = $this->emetteur->shipping_method_id; + } + $shipping_method_code = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); + $shipping_method_label = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'libelle'); + + $pdf->SetFont('', 'B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("SendingMethod").':'; + $pdf->MultiCell(43, 4, $titre, 0, 'L'); + + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posxval, $posy); + $lib_condition_paiement = ($outputlangs->transnoentities("SendingMethod".strtoupper($shipping_method_code)) != "SendingMethod".strtoupper($shipping_method_code)) ? $outputlangs->trans("SendingMethod".strtoupper($shipping_method_code)) : $shipping_method_label; + $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); + $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); + + $posy = $pdf->GetY() + 1; + } + // Show payments conditions - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && $object->cond_reglement_code) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -981,22 +1006,6 @@ class pdf_azur extends ModelePDFPropales } if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) { - // Check a payment mode is defined - /* Not required on a proposal - if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) - { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); - $pdf->SetTextColor(0,0,0); - - $posy=$pdf->GetY()+1; - } - */ - // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' @@ -1053,7 +1062,7 @@ class pdf_azur extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (!empty($object->fk_account) || !empty($object->fk_bank) || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if (!empty($object->fk_account) || !empty($object->fk_bank) || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = (empty($object->fk_account) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if (!empty($object->fk_bank)) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -1113,14 +1122,14 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -1129,7 +1138,7 @@ class pdf_azur extends ModelePDFPropales // Nothing to do } else { //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1159,7 +1168,7 @@ class pdf_azur extends ModelePDFPropales } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1221,7 +1230,7 @@ class pdf_azur extends ModelePDFPropales } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1251,7 +1260,7 @@ class pdf_azur extends ModelePDFPropales } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1299,7 +1308,7 @@ class pdf_azur extends ModelePDFPropales /* $resteapayer = $object->total_ttc - $deja_regle; - if (! empty($object->paye)) $resteapayer=0; + if (!empty($object->paye)) $resteapayer=0; */ if ($deja_regle > 0) { @@ -1731,8 +1740,7 @@ class pdf_azur extends ModelePDFPropales */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 1ed76728b92..3444664effa 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -68,9 +68,9 @@ class pdf_cyan extends ModelePDFPropales /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -148,10 +148,10 @@ class pdf_cyan extends ModelePDFPropales $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -217,8 +217,8 @@ class pdf_cyan extends ModelePDFPropales $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal")); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) { - $this->watermark = $conf->global->PROPALE_DRAFT_WATERMARK; + if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('PROPALE_DRAFT_WATERMARK')) { + $this->watermark = getDolGlobalString('PROPALE_DRAFT_WATERMARK'); } global $outputlangsbis; @@ -249,7 +249,7 @@ class pdf_cyan extends ModelePDFPropales $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -267,7 +267,7 @@ class pdf_cyan extends ModelePDFPropales } foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -360,7 +360,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -394,12 +394,12 @@ class pdf_cyan extends ModelePDFPropales $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -481,7 +481,7 @@ class pdf_cyan extends ModelePDFPropales if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } // $this->_pagefoot($pdf,$object,$outputlangs,1); @@ -539,7 +539,7 @@ class pdf_cyan extends ModelePDFPropales if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $height_note = $posyafter - $tab_top_newpage; @@ -561,7 +561,7 @@ class pdf_cyan extends ModelePDFPropales if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } @@ -764,7 +764,7 @@ class pdf_cyan extends ModelePDFPropales // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -847,7 +847,7 @@ class pdf_cyan extends ModelePDFPropales $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -868,7 +868,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -918,7 +918,7 @@ class pdf_cyan extends ModelePDFPropales // Find the desire PDF $filetomerge = new Propalmergepdfproduct($this->db); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $filetomerge->fetch_by_product($line->fk_product, $outputlangs->defaultlang); } else { $filetomerge->fetch_by_product($line->fk_product); @@ -939,16 +939,16 @@ class pdf_cyan extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (!empty($linefile->id) && !empty($linefile->file_name)) { - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { - if (!empty($conf->product->enabled)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { + if (isModEnabled("product")) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; } } else { - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } } @@ -1080,8 +1080,33 @@ class pdf_cyan extends ModelePDFPropales $posy = $pdf->GetY() + 1; } + // Show delivery mode + if (empty($conf->global->PROPOSAL_PDF_HIDE_DELIVERYMODE) && $object->shipping_method_id > 0) { + $outputlangs->load("sendings"); + + $shipping_method_id = $object->shipping_method_id; + if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD) && !empty($this->emetteur->shipping_method_id)) { + $shipping_method_id = $this->emetteur->shipping_method_id; + } + $shipping_method_code = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); + $shipping_method_label = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'libelle'); + + $pdf->SetFont('', 'B', $default_font_size - 2); + $pdf->SetXY($this->marge_gauche, $posy); + $titre = $outputlangs->transnoentities("SendingMethod").':'; + $pdf->MultiCell(43, 4, $titre, 0, 'L'); + + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posxval, $posy); + $lib_condition_paiement = ($outputlangs->transnoentities("SendingMethod".strtoupper($shipping_method_code)) != "SendingMethod".strtoupper($shipping_method_code)) ? $outputlangs->trans("SendingMethod".strtoupper($shipping_method_code)) : $shipping_method_label; + $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); + $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); + + $posy = $pdf->GetY() + 1; + } + // Show payments conditions - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && $object->cond_reglement_code) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -1100,22 +1125,6 @@ class pdf_cyan extends ModelePDFPropales } if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) { - // Check a payment mode is defined - /* Not required on a proposal - if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) - { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); - $pdf->SetTextColor(0,0,0); - - $posy=$pdf->GetY()+1; - } - */ - // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' @@ -1172,7 +1181,7 @@ class pdf_cyan extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank @@ -1238,14 +1247,14 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { @@ -1254,7 +1263,7 @@ class pdf_cyan extends ModelePDFPropales // Nothing to do } else { //Local tax 1 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1285,7 +1294,7 @@ class pdf_cyan extends ModelePDFPropales } //} //Local tax 2 before VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('1', '3', '5'))) { @@ -1342,7 +1351,7 @@ class pdf_cyan extends ModelePDFPropales } //Local tax 1 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1373,7 +1382,7 @@ class pdf_cyan extends ModelePDFPropales } //} //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ foreach ($this->localtax2 as $localtax_type => $localtax_rate) { if (in_array((string) $localtax_type, array('2', '4', '6'))) { @@ -1423,7 +1432,7 @@ class pdf_cyan extends ModelePDFPropales $resteapayer = 0; /* $resteapayer = $object->total_ttc - $deja_regle; - if (! empty($object->paye)) $resteapayer=0; + if (!empty($object->paye)) $resteapayer=0; */ if ($deja_regle > 0) { @@ -1819,8 +1828,7 @@ class pdf_cyan extends ModelePDFPropales */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index 28d66dfc40a..54dd0096b2e 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; /** - * Class to manage customer order numbering rules Marbre + * Class to manage business proposition rules Marbre */ class mod_propale_marbre extends ModeleNumRefPropales { diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 3e6ec1507e5..98c9803d55c 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -85,7 +85,8 @@ class mod_propale_saphir extends ModeleNumRefPropales // Parametrage du prefix $texte .= ''; - $texte .= ''; + $mask = empty($conf->global->PROPALE_SAPHIR_MASK) ? '' : $conf->global->PROPALE_SAPHIR_MASK; + $texte .= ''; $texte .= ''; @@ -134,7 +135,7 @@ class mod_propale_saphir extends ModeleNumRefPropales require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // On defini critere recherche compteur - $mask = $conf->global->PROPALE_SAPHIR_MASK; + $mask = empty($conf->global->PROPALE_SAPHIR_MASK) ? '' : $conf->global->PROPALE_SAPHIR_MASK; if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 215987054ce..5440c8e1201 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -54,10 +54,10 @@ class pdf_paiement $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->tab_top = 30; @@ -185,14 +185,14 @@ class pdf_paiement $sql .= ", c.code as paiement_code, p.num_paiement as num_payment"; $sql .= ", p.amount as paiement_amount, f.total_ttc as facture_amount"; $sql .= ", pf.amount as pf_amount"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= ", ba.ref as bankaccount"; } $sql .= ", p.rowid as prowid"; $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 .= " ".MAIN_DB_PREFIX."paiement_facture as pf,"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; } $sql .= " ".MAIN_DB_PREFIX."societe as s"; @@ -200,7 +200,7 @@ class pdf_paiement $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= " AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "; } $sql .= " AND f.entity IN (".getEntity('invoice').")"; @@ -223,14 +223,14 @@ class pdf_paiement $sql .= ", c.code as paiement_code, p.num_paiement as num_payment"; $sql .= ", p.amount as paiement_amount, f.total_ttc as facture_amount"; $sql .= ", pf.amount as pf_amount"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= ", ba.ref as bankaccount"; } $sql .= ", p.rowid as prowid"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f,"; $sql .= " ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf,"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; } $sql .= " ".MAIN_DB_PREFIX."societe as s"; @@ -238,7 +238,7 @@ class pdf_paiement $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facturefourn = f.rowid AND pf.fk_paiementfourn = p.rowid"; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $sql .= " AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "; } $sql .= " AND f.entity IN (".getEntity('invoice').")"; @@ -303,7 +303,7 @@ class pdf_paiement $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); //$pdf->SetKeyWords(); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 1976dea773f..4ebc742b4bb 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -43,9 +43,9 @@ class doc_generic_reception_odt extends ModelePdfReception /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -168,7 +168,9 @@ class doc_generic_reception_odt extends ModelePdfReception $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -271,7 +273,7 @@ class doc_generic_reception_odt extends ModelePdfReception $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -280,11 +282,11 @@ class doc_generic_reception_odt extends ModelePdfReception if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -292,8 +294,8 @@ class doc_generic_reception_odt extends ModelePdfReception dol_mkdir($conf->reception->dir_temp); if (!is_writable($conf->reception->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->reception->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 61fab1ab02d..127cc790e0c 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -57,10 +57,10 @@ class pdf_squille extends ModelePdfReception $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_draft_watermark = 1; // Support add of a watermark on drafts @@ -152,7 +152,7 @@ class pdf_squille extends ModelePdfReception $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -163,7 +163,7 @@ class pdf_squille extends ModelePdfReception $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; @@ -251,7 +251,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Reception")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -269,13 +269,13 @@ class pdf_squille extends ModelePdfReception $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -353,6 +353,8 @@ class pdf_squille extends ModelePdfReception $nexY = $tab_top + 7; $fk_commandefourndet = 0; $totalOrdered = 0; + $totalAmount = 0; + // Loop on each lines for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; @@ -379,7 +381,7 @@ class pdf_squille extends ModelePdfReception if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -437,7 +439,7 @@ class pdf_squille extends ModelePdfReception if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -479,19 +481,21 @@ class pdf_squille extends ModelePdfReception $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + // Description $pdf->SetXY($this->posxweightvol, $curY); $weighttxt = ''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight) { - $weighttxt = round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units); + $weighttxt = round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units, 1); } $voltxt = ''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume) { - $voltxt = round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units ? $object->lines[$i]->product->volume_units : 0); + $voltxt = round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units ? $object->lines[$i]->product->volume_units : 0, 1); } $pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt) ? '
    ' : '').$voltxt, 0, 0, false, true, 'C'); //$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'
    ':'').$voltxt,'','C'); + // Qty ordered if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $pdf->SetXY($this->posxqtyordered, $curY); if ($object->lines[$i]->fk_commandefourndet != $fk_commandefourndet) { @@ -501,15 +505,20 @@ class pdf_squille extends ModelePdfReception $fk_commandefourndet = $object->lines[$i]->fk_commandefourndet; } + // Qty received $pdf->SetXY($this->posxqtytoship, $curY); $pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 3, $object->lines[$i]->qty, '', 'C'); + // Amount if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { $pdf->SetXY($this->posxpuht, $curY); $pdf->MultiCell(($this->posxtotalht - $this->posxpuht - 1), 3, price($object->lines[$i]->subprice, 0, $outputlangs), '', 'R'); + $amountreceived = price2num($object->lines[$i]->subprice * $object->lines[$i]->qty, 'MT'); $pdf->SetXY($this->posxtotalht, $curY); - $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 3, price($object->lines[$i]->total_ht, 0, $outputlangs), '', 'R'); + $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 3, price($amountreceived, 0, $outputlangs), '', 'R'); + + $totalAmount += $amountreceived; } $nexY += 3; @@ -568,7 +577,7 @@ class pdf_squille extends ModelePdfReception } // Affiche zone totaux - $posy = $this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs, $totalOrdered); + $posy = $this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs, $totalOrdered, $totalAmount); // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); @@ -616,9 +625,10 @@ class pdf_squille extends ModelePdfReception * @param int $posy Position depart * @param Translate $outputlangs Objet langs * @param int $totalOrdered Total ordered + * @param int $totalAmount Total amount * @return int Position pour suite */ - protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOrdered) + protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOrdered, $totalAmount = 0) { // phpcs:enable global $conf, $mysoc; @@ -664,57 +674,62 @@ class pdf_squille extends ModelePdfReception } if ($totalWeight != '') { - $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); + $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs, -1, 'no', 1); } if ($totalVolume != '') { - $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); + $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1); } if ($object->trueWeight) { - $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); + $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs, -1, 'no', 1); } if ($object->trueVolume) { - $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs, -1, 'no', 1); } $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Total"), 0, 'L', 1); + $index2 = 0; + + // Total Weight + if ($totalWeighttoshow) { + $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * ($index + $index2)); + $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalWeighttoshow, 0, 'C', 1); + $index2++; + } + if ($totalVolumetoshow) { + $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * ($index + $index2)); + $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalVolumetoshow, 0, 'C', 1); + $index2++; + } + + // Total qty ordered if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $pdf->SetXY($this->posxqtyordered, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxqtytoship - $this->posxqtyordered, $tab2_hl, $totalOrdered, 0, 'C', 1); } + // Total received $pdf->SetXY($this->posxqtytoship, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxpuht - $this->posxqtytoship, $tab2_hl, $totalToShip, 0, 'C', 1); + // Amount if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { $pdf->SetXY($this->posxpuht, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxtotalht - $this->posxpuht, $tab2_hl, '', 0, 'C', 1); $pdf->SetXY($this->posxtotalht, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1); - } - - // Total Weight - if ($totalWeighttoshow) { - $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalWeighttoshow, 0, 'C', 1); - - $index++; - } - if ($totalVolumetoshow) { - $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalVolumetoshow, 0, 'C', 1); - - $index++; - } - if (!$totalWeighttoshow && !$totalVolumetoshow) { - $index++; + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($totalAmount, 0, $outputlangs), 0, 'C', 1); } $pdf->SetTextColor(0, 0, 0); + $index++; + if ($index2) { + $index++; + } + return ($tab2_top + ($tab2_hl * $index)); } @@ -754,6 +769,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); + // Description if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); @@ -761,12 +777,14 @@ class pdf_squille extends ModelePdfReception $pdf->MultiCell($this->posxqtyordered - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L'); } + // Volume / Weight $pdf->line($this->posxweightvol - 1, $tab_top, $this->posxweightvol - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxweightvol - 1, $tab_top + 1); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 2, $outputlangs->transnoentities("WeightVolShort"), '', 'C'); } + // Qty ordered if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $pdf->line($this->posxqtyordered - 1, $tab_top, $this->posxqtyordered - 1, $tab_top + $tab_height); if (empty($hidetop)) { @@ -775,6 +793,7 @@ class pdf_squille extends ModelePdfReception } } + // Qty reception $pdf->line($this->posxqtytoship - 1, $tab_top, $this->posxqtytoship - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxqtytoship, $tab_top + 1); @@ -792,6 +811,7 @@ class pdf_squille extends ModelePdfReception } } + // Amount if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { $pdf->line($this->posxpuht - 1, $tab_top, $this->posxpuht - 1, $tab_top + $tab_height); if (empty($hidetop)) { @@ -856,20 +876,20 @@ class pdf_squille extends ModelePdfReception } // Show barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for reception ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for reception ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -917,7 +937,7 @@ class pdf_squille extends ModelePdfReception $origin_id = $object->origin_id; // TODO move to external function - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { // commonly $origin='commande' + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { // commonly $origin='commande' $outputlangs->load('orders'); $classname = 'CommandeFournisseur'; @@ -1058,8 +1078,7 @@ class pdf_squille extends ModelePdfReception */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'RECEPTION_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark); } } diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index e1a5669dc09..40aaa63a7a8 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -61,7 +61,7 @@ class mod_reception_moonstone extends ModelNumRefReception $tooltip .= $langs->trans("GenericMaskCodes5"); $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; @@ -106,7 +106,7 @@ class mod_reception_moonstone extends ModelNumRefReception require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $mask = $conf->global->RECEPTION_MOONSTONE_MASK; + $mask = getDolGlobalString("RECEPTION_MOONSTONE_MASK"); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index c6cfb733f73..3ec764c6ab2 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -35,6 +35,8 @@ class modGeneratePassNone extends ModeleGenPassword */ public $id; + public $picto = 'fa-keyboard'; + /** * Minimum length (text visible by end user) * diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index baa818aa63b..e0dd2046020 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -37,6 +37,8 @@ class modGeneratePassPerso extends ModeleGenPassword */ public $id; + public $picto = 'fa-shield-alt'; + /** * Minimum length (text visible by end user) * @@ -98,8 +100,8 @@ class modGeneratePassPerso extends ModeleGenPassword $this->user = $user; if (empty($conf->global->USER_PASSWORD_PATTERN)) { - // default value at auto generation (12 chars, 1 upercase, 1 digit, 1 special char, 3 repeat, exclude ambiguous characters). - dolibarr_set_const($db, "USER_PASSWORD_PATTERN", '12;1;1;1;3;1', 'chaine', 0, '', $conf->entity); + // default value at auto generation (12 chars, 1 uppercase, 1 digit, 0 special char, 3 repeat max, exclude ambiguous characters). + dolibarr_set_const($db, "USER_PASSWORD_PATTERN", '12;1;1;0;3;1', 'chaine', 0, '', $conf->entity); } $this->Maj = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index f0e6fcf2a7f..b2d0b260ccb 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -35,6 +35,8 @@ class modGeneratePassStandard extends ModeleGenPassword */ public $id; + public $picto = 'fa-shield-alt'; + /** * Minimum length (text visible by end user) * diff --git a/htdocs/core/modules/security/generate/modules_genpassword.php b/htdocs/core/modules/security/generate/modules_genpassword.php index 4d397605240..bb1e02774c6 100644 --- a/htdocs/core/modules/security/generate/modules_genpassword.php +++ b/htdocs/core/modules/security/generate/modules_genpassword.php @@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; */ abstract class ModeleGenPassword { + public $picto = 'generic'; + /** * Flag to 1 if we must clean ambiguous charaters for the autogeneration of password (List of ambiguous char is in $this->Ambi) * diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index a19c90215b0..d6804c3a397 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -44,9 +44,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** @@ -256,7 +256,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) { - $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp; + $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)) . '-' . $newfiletmp; $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) } if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { @@ -264,11 +264,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; $object->builddoc_filename = $filename; // For triggers //print "newfileformat=".$newfileformat; //print "newdir=".$dir; @@ -279,8 +279,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc dol_mkdir($conf->societe->multidir_temp[$object->entity]); if (!is_writable($conf->societe->multidir_temp[$object->entity])) { - $this->error = "Failed to write in temp directory ".$conf->societe->multidir_temp[$object->entity]; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->societe->multidir_temp[$object->entity]); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index a7ae44323a1..19a5309a374 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -151,7 +151,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } $date = dol_now(); - $yymm = strftime("%y%m", $date); + $yymm = dol_print_date($date, "%y%m", 'tzuserrel'); if ($max >= (pow(10, 5) - 1)) { $num = $max + 1; // If counter > 99999, we do not format on 5 chars, we take number as it is diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 4d1d01db682..257bdf55e52 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -98,7 +98,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode if (!isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || !empty($conf->global->$conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) { $texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."
    \n"; } - //if (! empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_ALPHA').' = '.yn($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)."
    \n"; + //if (!empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_ALPHA').' = '.yn($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)."
    \n"; if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) { $texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX."
    \n"; } diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index dddd01a602d..2ff2313c998 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -102,7 +102,8 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $texte .= ''; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; + $texte .= '
    '; $s1 = $form->textwithpicto('', $tooltip, 1, 1); $s2 = $form->textwithpicto('', $tooltip, 1, 1); $s3 = $form->textwithpicto('', $tooltip, 1, 1); @@ -127,7 +128,23 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode } $texte .= ''; $texte .= ''; + $texte .= ''; + + $texte .= '
    '; + $texte .= "
    \n"; + + $texthelp = $langs->trans("RemoveSpecialWordsHelp"); + $texttitle = $langs->trans("RemoveSpecialWords"); + + $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); + $texte .= "
    \n"; + $texte .= ''; $texte .= '
    '; + $texte .= ''; return $texte; @@ -192,6 +209,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode return -1; } + // Clean declared words + if (!empty($conf->global->COMPANY_DIGITARIA_CLEAN_WORDS)) { + $cleanWords = explode(";", $conf->global->COMPANY_DIGITARIA_CLEAN_WORDS); + $codetouse = str_replace($cleanWords, "", $codetouse); + } // Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default) if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || !empty($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) { $codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse); @@ -202,7 +224,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode } $this->code = $prefix.strtoupper(substr($codetouse, 0, $width)); - dol_syslog("mod_codecompta_digitaria::get_code search code proposed=".$this->code); + dol_syslog("mod_codecompta_digitaria::get_code search code proposed=".$this->code, LOG_DEBUG); // Unique index on code if COMPANY_DIGITARIA_UNIQUE_CODE is set to 1 or not set (default) if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) { @@ -279,6 +301,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $sql = "SELECT " . $typethirdparty . " FROM " . MAIN_DB_PREFIX . "societe"; $sql .= " WHERE " . $typethirdparty . " = '" . $db->escape($code) . "'"; } + $sql .= " AND entity IN (".getEntity('societe').")"; $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index c54e5f4f02a..eb6ba838d7a 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -45,9 +45,9 @@ class doc_generic_stock_odt extends ModelePDFStock /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -172,7 +172,9 @@ class doc_generic_stock_odt extends ModelePDFStock $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
    '; } $texte .= '
    '; } @@ -279,7 +281,7 @@ class doc_generic_stock_odt extends ModelePDFStock $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -288,11 +290,11 @@ class doc_generic_stock_odt extends ModelePDFStock if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -300,8 +302,8 @@ class doc_generic_stock_odt extends ModelePDFStock dol_mkdir($conf->product->dir_temp); if (!is_writable($conf->product->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->product->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 3fd3917da2d..ed1877ec8f7 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -60,9 +60,9 @@ class pdf_standard extends ModelePDFStock /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -111,10 +111,10 @@ class pdf_standard extends ModelePDFStock $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_codestockservice = 0; // Display product-service code @@ -251,7 +251,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -270,7 +270,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetTextColor(0, 0, 0); $tab_top = 65 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; @@ -306,7 +306,7 @@ class pdf_standard extends ModelePDFStock $objp = $this->db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active + if (getDolGlobalInt('MAIN_MULTILANGS')) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product = ".((int) $objp->rowid); @@ -353,7 +353,7 @@ class pdf_standard extends ModelePDFStock if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -457,7 +457,7 @@ class pdf_standard extends ModelePDFStock $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -477,7 +477,7 @@ class pdf_standard extends ModelePDFStock $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -891,8 +891,7 @@ class pdf_standard extends ModelePDFStock */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index c00bf34621e..22601d93dae 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -63,7 +63,7 @@ class pdf_eagle extends ModelePdfStockTransfer * @var array Minimum version of PHP required by module. * e.g.: PHP ≥ 5.5 = array(5, 5) */ - public $phpmin = array(5, 5); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -131,10 +131,10 @@ class pdf_eagle extends ModelePdfStockTransfer $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo @@ -219,7 +219,7 @@ class pdf_eagle extends ModelePdfStockTransfer $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -230,7 +230,7 @@ class pdf_eagle extends ModelePdfStockTransfer $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; @@ -319,7 +319,9 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -333,7 +335,7 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->SetTextColor(0, 0, 0); $tab_top = 90; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10); $tab_height = 130; $tab_height_newpage = 150; @@ -438,7 +440,7 @@ class pdf_eagle extends ModelePdfStockTransfer if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposbefore + 1); $curY = $tab_top_newpage; @@ -494,7 +496,7 @@ class pdf_eagle extends ModelePdfStockTransfer if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter + 1); } } else { @@ -531,7 +533,7 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // Lot / série - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { $pdf->SetXY($this->posxlot, $curY); $pdf->MultiCell(($this->posxweightvol - $this->posxlot), 3, $object->lines[$i]->batch, '', 'C'); } @@ -610,7 +612,7 @@ class pdf_eagle extends ModelePdfStockTransfer $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { if ($pagenb == 1) { @@ -623,7 +625,7 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->AddPage(); if (!empty($tplidx)) $pdf->useTemplate($tplidx); $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -813,7 +815,7 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->MultiCell($this->posxlot - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L'); } - if (!empty($conf->productbatch->enabled) && $this->atLeastOneBatch) { + if (isModEnabled('productbatch') && $this->atLeastOneBatch) { $pdf->line($this->posxlot - 1, $tab_top, $this->posxlot - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxlot, $tab_top + 1); @@ -944,20 +946,20 @@ class pdf_eagle extends ModelePdfStockTransfer } // Show barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -1167,8 +1169,7 @@ class pdf_eagle extends ModelePdfStockTransfer protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 5bff26a9d1d..2ab70767205 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -72,7 +72,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes * @var array Minimum version of PHP required by module. * e.g.: PHP ≥ 5.5 = array(5, 5) */ - public $phpmin = array(5, 5); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -145,10 +145,10 @@ class pdf_eagle_proforma extends ModelePDFCommandes $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -227,7 +227,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -241,7 +241,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $dir = $conf->product->dir_output.'/'.$midir; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -326,7 +326,9 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -350,7 +352,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm if ($conf->incoterm->enabled) { @@ -417,7 +419,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pdf->AddPage(); $pagenb++; if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); // $this->_pagefoot($pdf,$object,$outputlangs,1); $pdf->setTopMargin($tab_top_newpage); // The only function to edit the bottom margin of current page to set it. @@ -471,7 +473,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes // apply note frame to last page $pdf->setPage($pageposafternote); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $height_note = $posyafter - $tab_top_newpage; $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); } else // No pagebreak @@ -489,7 +491,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pageposafternote++; $pdf->setPage($pageposafternote); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $posyafter = $tab_top_newpage; } @@ -580,7 +582,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (!empty($tplidx)) $pdf->useTemplate($tplidx); - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter + 1); } } else { @@ -682,7 +684,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -738,7 +740,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { if ($pagenb == $pageposafter) { @@ -751,7 +753,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pdf->AddPage(); if (!empty($tplidx)) $pdf->useTemplate($tplidx); $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -882,7 +884,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes } */ /* TODO - else if (! empty($object->availability_code)) + else if (!empty($object->availability_code)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetTextColor(200,0,0); @@ -976,7 +978,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (!empty($object->fk_account) || !empty($object->fk_bank) || !empty($conf->global->FACTURE_RIB_NUMBER)) { + if (!empty($object->fk_account) || !empty($object->fk_bank) || getDolGlobalInt('FACTURE_RIB_NUMBER')) { $bankid = (empty($object->fk_account) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); if (!empty($object->fk_bank)) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); @@ -1035,7 +1037,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes /*$pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);*/ @@ -1432,8 +1434,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable - global $conf; - $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php index 6a6c7c556e6..fc647d3135c 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktrans /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Stock */ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer { diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 76c0ed56851..29231e62966 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -65,9 +65,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -141,10 +141,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -167,7 +167,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->posxqty = 130; $this->posxunit = 147; } - //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + //if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; @@ -232,9 +232,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nblines = count($object->lines); if ($conf->fournisseur->facture->dir_output) { - $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $deja_regle = $object->getSommePaiement((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) { @@ -307,7 +307,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -342,10 +342,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -428,7 +428,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -499,7 +499,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by VAT value in $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -559,7 +559,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -576,7 +576,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -683,14 +683,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; foreach ($this->tva as $tvakey => $tvaval) { @@ -740,7 +740,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2, 0, $outputlangs), 0, 'R', 1); } } else { - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ //Local tax 1 foreach ($this->localtax1 as $tvakey => $tvaval) { @@ -765,7 +765,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } //} - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ //Local tax 2 foreach ($this->localtax2 as $tvakey => $tvaval) { @@ -802,8 +802,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) { @@ -1036,7 +1036,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); @@ -1295,8 +1295,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index e6838b9c4c4..0aacecc69da 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -67,12 +67,12 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices */ public function info() { - global $conf, $langs; + global $conf, $langs, $db; // Load translation files required by the page $langs->loadLangs(array("bills", "admin")); - $form = new Form($this->db); + $form = new Form($db); $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; $texte .= '
    '; @@ -93,7 +93,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Setting the prefix $texte .= '
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte .= ':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'
    '; @@ -159,16 +159,16 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Get Mask value $mask = ''; if (is_object($object) && $object->type == 1) { - $mask = $conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK; + $mask = getDolGlobalString("SUPPLIER_REPLACEMENT_TULIP_MASK"); if (!$mask) { - $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK; + $mask = getDolGlobalString("SUPPLIER_INVOICE_TULIP_MASK"); } } elseif (is_object($object) && $object->type == 2) { - $mask = $conf->global->SUPPLIER_CREDIT_TULIP_MASK; + $mask = getDolGlobalString("SUPPLIER_CREDIT_TULIP_MASK"); } elseif (is_object($object) && $object->type == 3) { - $mask = $conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; + $mask = getDolGlobalString("SUPPLIER_DEPOSIT_TULIP_MASK"); } else { - $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK; + $mask = getDolGlobalString("SUPPLIER_INVOICE_TULIP_MASK"); } if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index a9a8f612578..12bbcc12edc 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -49,9 +49,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -163,7 +163,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) { + if (!empty($conf->global->SUPPLIER_ORDER_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -175,7 +175,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $texte .= ''; } @@ -262,7 +264,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -271,11 +273,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -283,8 +285,8 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders dol_mkdir($conf->fournisseur->commande->dir_temp); if (!is_writable($conf->fournisseur->commande->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->fournisseur->commande->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->fournisseur->commande->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 233d18ce229..df584684f62 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -5,7 +5,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric 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 @@ -68,9 +68,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -143,10 +143,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -230,7 +230,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -240,7 +240,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -335,7 +335,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -361,12 +361,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; // Incoterm - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -423,7 +423,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } // $this->_pagefoot($pdf,$object,$outputlangs,1); @@ -481,7 +481,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $height_note = $posyafter - $tab_top_newpage; @@ -503,7 +503,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } @@ -592,7 +592,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + //if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposafter + 1); } } else { @@ -693,7 +693,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -774,7 +774,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -794,7 +794,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -975,7 +975,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1); @@ -1031,7 +1031,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1); } } else { - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ //Local tax 1 foreach ($this->localtax1 as $localtax_type => $localtax_rate) { @@ -1061,7 +1061,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders } } - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ //Local tax 2 foreach ($this->localtax2 as $localtax_type => $localtax_rate) { @@ -1099,7 +1099,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFillColor(224, 224, 224); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); @@ -1241,7 +1241,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur); //Affiche le filigrane brouillon - Print Draft Watermark - /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) + /*if($object->statut==0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) { pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); }*/ @@ -1484,8 +1484,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } @@ -1568,7 +1567,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) { + if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { $this->cols['photo']['status'] = true; } diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 5498800aefc..5082c14a144 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -68,9 +68,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -143,10 +143,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -245,7 +245,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -254,7 +254,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { @@ -350,7 +350,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PurchaseOrder")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -385,10 +385,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 0); $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -452,7 +452,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposbefore + 1); @@ -499,7 +499,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } $pdf->setPage($pageposafter + 1); @@ -573,7 +573,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $object->lines[$i]->total_tva; @@ -656,7 +656,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } if (!empty($tplidx)) { @@ -676,7 +676,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->useTemplate($tplidx); } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { $this->_pagehead($pdf, $object, 0, $outputlangs); } } @@ -856,7 +856,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1); @@ -912,7 +912,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1); } } else { - //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ //Local tax 1 foreach ($this->localtax1 as $localtax_type => $localtax_rate) { @@ -942,7 +942,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } } - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ //Local tax 2 foreach ($this->localtax2 as $localtax_type => $localtax_rate) { @@ -980,7 +980,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFillColor(224, 224, 224); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); @@ -1150,7 +1150,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur); //Affiche le filigrane brouillon - Print Draft Watermark - /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) + /*if($object->statut==0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) { pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); }*/ @@ -1392,8 +1392,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { - global $conf; - $showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 473664cb44c..8f67f28b42d 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -85,7 +85,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders // Parametrage du prefix $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    - + @@ -192,9 +199,9 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con - + - + @@ -203,9 +210,15 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con + + + + + + -multicompany->enabled)) { ?> + diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index c055dd1d3b5..2e8511acf8e 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -96,6 +96,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con else if (type == 'password') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helppassword").show();} else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + else if (type == 'pricecy') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} else if (type == 'select') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpselect").show();} else if (type == 'sellist') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpsellist").show();} else if (type == 'radio') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpselect").show();} @@ -167,6 +168,9 @@ $help = $extrafields->attributes[$elementtype]['help'][$attrname]; $entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname]; $printable = $extrafields->attributes[$elementtype]['printable'][$attrname]; $enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname]; +$css = $extrafields->attributes[$elementtype]['css'][$attrname]; +$cssview = $extrafields->attributes[$elementtype]['cssview'][$attrname]; +$csslist = $extrafields->attributes[$elementtype]['csslist'][$attrname]; if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { $param_chain = ''; @@ -191,16 +195,17 @@ if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_a array('varchar', 'phone', 'mail', 'url', 'select', 'password', 'text', 'html'), + 'varchar'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select', 'password', 'text', 'html'), 'double'=>array('double', 'price'), 'price'=>array('double', 'price'), 'text'=>array('text', 'html'), 'html'=>array('text', 'html'), 'password'=>array('password', 'varchar'), - 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), - 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), - 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), - 'select'=>array('varchar', 'phone', 'mail', 'url', 'select'), + 'mail'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'), + 'url'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'), + 'phone'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'), + 'ip'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'), + 'select'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'), 'date'=>array('date', 'datetime') ); /* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert @@ -278,10 +283,10 @@ if (in_array($type, array_keys($typewecanchangeinto))) { - + - + + + + + + + + + + + + -multicompany->enabled)) { ?> + diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index da1d2d58558..c93501ead18 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -38,14 +38,25 @@ $langs->load("modulebuilder"); '.$langs->trans("DefineHereComplementaryAttributes", empty($textobject) ? '': $textobject).'
    '."\n"; -print '
    '; +$title = ''.$langs->trans("DefineHereComplementaryAttributes", empty($textobject) ? '': $textobject).'
    '."\n"; +//if ($action != 'create' && $action != 'edit') { +$newcardbutton = dolGetButtonTitle($langs->trans('NewAttribute'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=create', '', (($action != 'create' && $action != 'edit') ? 1 : 1)); +/*} else { + $newcardbutton = ''; +}*/ + +print '
    '; +print '
    '; +print '
    '.$title.'
    '; +print '
    '.$newcardbutton.'
    '; +print '
    '; +print '
    '; // Load $extrafields->attributes $extrafields->fetch_name_optionals_label($elementtype); print '
    '; -print '
    trans("LabelOrTranslationKey"); ?>
    trans("LabelOrTranslationKey"); ?>
    trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)
    trans("Unique"); ?>>
    trans("Required"); ?>>
    trans("Mandatory"); ?>>
    trans("AlwaysEditable"); ?>>
    textwithpicto($langs->trans("AlwaysEditable"), $langs->trans("EditableWhenDraftOnly")); ?>>
    textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
    trans("Totalizable"); ?>>
    textwithpicto($langs->trans("CssOnEdit"), $langs->trans("HelpCssOnEditDesc")); ?>
    textwithpicto($langs->trans("CssOnView"), $langs->trans("HelpCssOnViewDesc")); ?>
    textwithpicto($langs->trans("CssOnList"), $langs->trans("HelpCssOnListDesc")); ?>
    textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
    trans("AllEntities"); ?>>
    trans("Unique"); ?>>
    trans("Required"); ?>>
    trans("Mandatory"); ?>>
    trans("AlwaysEditable"); ?>>
    textwithpicto($langs->trans("AlwaysEditable"), $langs->trans("EditableWhenDraftOnly")); ?>>
    textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?> @@ -290,12 +295,23 @@ if (in_array($type, array_keys($typewecanchangeinto))) {
    textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
    textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?>>
    textwithpicto($langs->trans("CssOnEdit"), $langs->trans("HelpCssOnEditDesc")); ?>
    textwithpicto($langs->trans("CssOnView"), $langs->trans("HelpCssOnViewDesc")); ?>
    textwithpicto($langs->trans("CssOnList"), $langs->trans("HelpCssOnListDesc")); ?>
    textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
    trans("AllEntities"); ?>>
    '; +print '
    '; print ''; print ''; print ''; print ''; print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; print ''; print ''; -if (!empty($conf->multicompany->enabled)) { +print ''; +print ''; +print ''; +if (isModEnabled('multicompany')) { print ''; } print ''; @@ -87,14 +101,14 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel // Position print "\n"; // Label - print "\n"; // We don't translate here, we want admin to know what is the key not translated value + print '\n"; // We don't translate here, we want admin to know what is the key not translated value // Label translated print '\n"; // Key - print "\n"; + print '\n"; // Type $typetoshow = $type2label[$extrafields->attributes[$elementtype]['type'][$key]]; - print '\n"; // Size @@ -113,7 +127,14 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel print '\n"; // Summable print '\n"; - if (!empty($conf->multicompany->enabled)) { + // CSS + print '\n"; + // CSS view + print '\n"; + // CSS list + print '\n"; + // Multicompany + if (isModEnabled('multicompany')) { print ''; } + // Actions print '"; } } else { - $colspan = 14; - if (!empty($conf->multicompany->enabled)) { + $colspan = 17; + if (isModEnabled('multicompany')) { $colspan++; } diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 86292ec0ff4..8f27d747fab 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } @@ -243,7 +243,7 @@ print ''."\n"; // Customer Default Langauge -if (!empty($conf->global->MAIN_MULTILANGS)) { +if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''."\n"; } -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { // Customer Categories print '
    '.$langs->trans("Position"); @@ -60,12 +71,15 @@ print ''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("ComputedFormula").''.$langs->trans("Unique").''.$langs->trans("Required").''.$langs->trans("AlwaysEditable").''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''.$langs->trans("Mandatory").''.$form->textwithpicto($langs->trans("AlwaysEditable"), $langs->trans("EditableWhenDraftOnly")).''.$form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")).''.$form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")).''.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).''.$form->textwithpicto($langs->trans("CssOnEdit"), $langs->trans("HelpCssOnEditDesc")).''.$form->textwithpicto($langs->trans("CssOnView"), $langs->trans("HelpCssOnViewDesc")).''.$form->textwithpicto($langs->trans("CssOnList"), $langs->trans("HelpCssOnListDesc")).''.$langs->trans("Entity").' ".dol_escape_htmltag($extrafields->attributes[$elementtype]['pos'][$key])."".dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key])."'.dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key])."'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]))."".dol_escape_htmltag($key)."'.dol_escape_htmltag($key)."'; + print ''; print dol_escape_htmltag($typetoshow); print "'.dol_escape_htmltag($extrafields->attributes[$elementtype]['printable'][$key])."'.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."'.dol_escape_htmltag($extrafields->attributes[$elementtype]['css'][$key])."'.dol_escape_htmltag($extrafields->attributes[$elementtype]['cssview'][$key])."'.dol_escape_htmltag($extrafields->attributes[$elementtype]['csslist'][$key])."'; if (empty($extrafields->attributes[$elementtype]['entityid'][$key])) { print $langs->trans("All"); @@ -131,6 +152,7 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel } print ''; print ''.img_edit().''; print '  '.img_delete().''; @@ -138,8 +160,8 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel print "
    '."\n"; print '
    '.$langs->trans("DefaultLang"); if (!empty($array_query['cust_language'])) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); @@ -254,7 +254,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) { print '
    '.$langs->trans("CustomersCategoryShort"); if (!empty($array_query['cust_categ'])) { @@ -451,7 +451,7 @@ print '
    '; print '
    '."\n"; print '
    '.$langs->trans("ContactCategoriesShort"); if (!empty($array_query['contact_categ'])) { diff --git a/htdocs/core/tpl/ajax/fileupload_main.tpl.php b/htdocs/core/tpl/ajax/fileupload_main.tpl.php deleted file mode 100644 index 8be24f7450f..00000000000 --- a/htdocs/core/tpl/ajax/fileupload_main.tpl.php +++ /dev/null @@ -1,96 +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 . - */ - -// Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) { - print "Error, template page can't be called as URL"; - exit; -} - -?> - - - - diff --git a/htdocs/core/tpl/ajax/fileupload_view.tpl.php b/htdocs/core/tpl/ajax/fileupload_view.tpl.php deleted file mode 100644 index 22f8d687db0..00000000000 --- a/htdocs/core/tpl/ajax/fileupload_view.tpl.php +++ /dev/null @@ -1,147 +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 . - */ - -// Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) { - print "Error, template page can't be called as URL"; - exit; -} - -?> - - - - - - - - - -
    -
    - - - - trans('AddFiles'); ?> - 0) { - print ''; // MAX_FILE_SIZE must precede the field type=file - } - ?> - - - - - -
    - -
    - - - -
     
    -
    -
    - -
    -
    - - - - - - - - - - -
    - diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 2f6acb67ece..24604388af1 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -41,16 +41,20 @@ if ($action == 'presend') { $object->fetch_projet(); - if (!in_array($object->element, array('societe', 'user', 'member'))) { - // TODO get also the main_lastdoc field of $object. If not found, try to guess with following code - - $ref = dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - // Special case - if ($object->element == 'invoice_supplier') { - $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); + $ref = dol_sanitizeFileName($object->ref); + if (!in_array($object->element, array('user', 'member'))) { + //$fileparams['fullname'] can be filled from the card + //Get also the main_lastdoc field of $object. If not found, try to guess with following code + if (!empty($object->last_main_doc) && is_readable(DOL_DATA_ROOT.'/'.$object->last_main_doc) && is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { + $fileparams['fullname'] = DOL_DATA_ROOT.'/'.$object->last_main_doc; } else { - $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + // Special case + if ($object->element == 'invoice_supplier') { + $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); + } else { + $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); + } } $file = $fileparams['fullname']; @@ -59,7 +63,7 @@ if ($action == 'presend') { // Define output language $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; if (GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); @@ -82,12 +86,15 @@ if ($action == 'presend') { // Build document if it not exists $forcebuilddoc = true; - if (in_array($object->element, array('societe', 'user', 'member'))) { + if (in_array($object->element, array('user', 'member'))) { $forcebuilddoc = false; } if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) { $forcebuilddoc = false; } + if ($object->element == 'societe' && empty($conf->global->COMPANY_ADDON_PDF)) { + $forcebuilddoc = false; + } if ($forcebuilddoc) { // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation if ((!$file || !is_readable($file)) && method_exists($object, 'generateDocument')) { $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -143,8 +150,30 @@ if ($action == 'presend') { $formmail->fromname = (!empty($conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME) ? $conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME : ''); $formmail->fromtype = 'special'; } + if ($object->element === 'recruitmentcandidature' ) { + $formmail->frommail = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER) ? $conf->global->RECRUITMENT_EMAIL_SENDER : $recruitermail); + $formmail->fromname = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER_NAME) ? $conf->global->RECRUITMENT_EMAIL_SENDER_NAME : (!empty($recruitername) ? $recruitername : '')); + $formmail->fromtype = 'special'; + } - $formmail->trackid = $trackid; + // Set the default "From" + $defaultfrom = ''; + if (GETPOSTISSET('fromtype')) { + $defaultfrom = GETPOST('fromtype'); + } else { + $parameters = array(); + $reshook = $hookmanager->executeHooks('getDefaultFromEmail', $parameters, $formmail); + if (empty($reshook)) { + $defaultfrom = $formmail->fromtype; + } + if (!empty($hookmanager->resArray['defaultfrom'])) { + $defaultfrom = $hookmanager->resArray['defaultfrom']; + } + } + $formmail->fromtype = $defaultfrom; + + $formmail->trackid = empty($trackid) ? '' : $trackid; + $formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto; $formmail->withfrom = 1; // Define $liste, a list of recipients with email inside <>. @@ -199,11 +228,33 @@ if ($action == 'presend') { } // Make substitution in email content - if ($object) { + if (!empty($object)) { // First we set ->substit (useless, it will be erased later) and ->substit_lines $formmail->setSubstitFromObject($object, $langs); } $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, $arrayoffamiliestoexclude, $object); + + // Overwrite __SENDEREMAIL_SIGNATURE__ with value select into form + if ($formmail->fromtype) { + $reg = array(); + if (preg_match('/user/', $formmail->fromtype, $reg)) { + $emailsendersignature = $user->signature; + } elseif (preg_match('/company/', $formmail->fromtype, $reg)) { + $emailsendersignature = ''; + } elseif (preg_match('/senderprofile_(\d+)/', $formmail->fromtype, $reg)) { + $sql = "SELECT rowid, label, email, signature FROM ".$db->prefix()."c_email_senderprofile"; + $sql .= " WHERE rowid = ".((int) $reg[1]); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $emailsendersignature = $obj->signature; + } + } + } + } + $substitutionarray['__SENDEREMAIL_SIGNATURE__'] = $emailsendersignature; + $substitutionarray['__CHECK_READ__'] = ""; if (is_object($object) && is_object($object->thirdparty)) { $checkRead= ''; + + $labeltoshow = ''; if (!empty($val['help'])) { - print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + $labeltoshow .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); } else { if (isset($val['copytoclipboard']) && $val['copytoclipboard'] == 1) { - print showValueWithClipboardCPButton($value, 0, $langs->transnoentitiesnoconv($val['label'])); + $labeltoshow .= showValueWithClipboardCPButton($value, 0, $langs->transnoentitiesnoconv($val['label'])); } else { - print $langs->trans($val['label']); + $labeltoshow .= $langs->trans($val['label']); } } + if (empty($val['alwayseditable'])) { + print $labeltoshow; + } else { + print $form->editfieldkey($labeltoshow, $key, $value, $object, 1, $val['type']); + } + print '
    '; - if (in_array($val['type'], array('text', 'html'))) { - print '
    '; - } - if ($key == 'lang') { - $langs->load("languages"); - $labellang = ($value ? $langs->trans('Language_'.$value) : ''); - print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"'); - print $labellang; - } else { - if (isset($val['copytoclipboard']) && $val['copytoclipboard'] == 2) { - $out = $object->showOutputField($val, $key, $value, '', '', '', 0); - print showValueWithClipboardCPButton($out, 0, $out); - } else { - print $object->showOutputField($val, $key, $value, '', '', '', 0); + if (empty($val['alwayseditable'])) { + if (preg_match('/^(text|html)/', $val['type'])) { + print '
    '; } - } - //print dol_escape_htmltag($object->$key, 1, 1); - if (in_array($val['type'], array('text', 'html'))) { - print '
    '; + if ($key == 'lang') { + $langs->load("languages"); + $labellang = ($value ? $langs->trans('Language_'.$value) : ''); + print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"'); + print $labellang; + } else { + if (isset($val['copytoclipboard']) && $val['copytoclipboard'] == 2) { + $out = $object->showOutputField($val, $key, $value, '', '', '', 0); + print showValueWithClipboardCPButton($out, 0, $out); + } else { + print $object->showOutputField($val, $key, $value, '', '', '', 0); + } + } + //print dol_escape_htmltag($object->$key, 1, 1); + if (preg_match('/^(text|html)/', $val['type'])) { + print '
    '; + } + } else { + print $form->editfieldval($labeltoshow, $key, $value, $object, 1, $val['type']); } print '
    '; - if (in_array($val['type'], array('text', 'html'))) { - $rightpart .= '
    '; - } - $rightpart .= $object->showOutputField($val, $key, $value, '', '', '', 0); - //$rightpart .= dol_escape_htmltag($object->$key, 1, 1); - if (in_array($val['type'], array('text', 'html'))) { - $rightpart .= '
    '; + + if (empty($val['alwayseditable'])) { + if (preg_match('/^(text|html)/', $val['type'])) { + $rightpart .= '
    '; + } + if ($key == 'lang') { + $langs->load("languages"); + $labellang = ($value ? $langs->trans('Language_'.$value) : ''); + $rightpart .= picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"'); + $rightpart .= $labellang; + } else { + if (isset($val['copytoclipboard']) && $val['copytoclipboard'] == 2) { + $out = $object->showOutputField($val, $key, $value, '', '', '', 0); + $rightpart .= showValueWithClipboardCPButton($out, 0, $out); + } else { + $rightpart.= $object->showOutputField($val, $key, $value, '', '', '', 0); + } + } + if (preg_match('/^(text|html)/', $val['type'])) { + $rightpart .= '
    '; + } + } else { + $rightpart .= $form->editfieldval($labeltoshow, $key, $value, $object, 1, $val['type']); } + $rightpart .= '
    '; + print '
    '; // Show filemanager tree (will be filled by a call of ajax /ecm/tpl/enablefiletreeajax.tpl.php, later, that executes ajaxdirtree.php) print '
    '; @@ -272,7 +289,8 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg } print '
    '; $_POST['modulepart'] = $module; @@ -309,10 +327,15 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg $valtotalizable) { $totalarray['pos'][$valtotalizable['pos']] = $keytotalizable; - $totalarray['val'][$keytotalizable] = $valtotalizable['total']; + $totalarray['val'][$keytotalizable] = isset($valtotalizable['total']) ? $valtotalizable['total'] : 0; } } // Show total line diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 5965132d68c..eaf2d602571 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -33,10 +33,8 @@ if (empty($conf) || !is_object($conf)) { // DDOS protection $size = (empty($_SERVER['CONTENT_LENGTH']) ? 0 : (int) $_SERVER['CONTENT_LENGTH']); if ($size > 10000) { - http_response_code(413); $langs->loadLangs(array("errors", "install")); - accessforbidden('
    '.$langs->trans("ErrorRequestTooLarge").'.
    '.$langs->trans("ClickHereToGoToApp").'
    ', 0, 0, 1); - exit; + httponly_accessforbidden('
    '.$langs->trans("ErrorRequestTooLarge").'.
    '.$langs->trans("ClickHereToGoToApp").'
    ', 413, 1); } require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -139,9 +137,11 @@ $(document).ready(function () {
    +
    trans('AddNewLine'); ?>
    trans('VAT'); ?> trans('PriceUHT'); ?>trans('PriceUHTCurrency'); ?> - + global->MAIN_DISABLE_FREE_LINES)) { $freelines = true; $forceall = 1; // We always force all type for free lines (module product or service means we use predefined product or service) if ($object->element == 'contrat') { - if (empty($conf->product->enabled) && empty($conf->service->enabled) && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { + if (!isModEnabled('product') && !isModEnabled('service') && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { $forceall = -1; // With contract, by default, no choice at all, except if CONTRACT_SUPPORT_PRODUCTS is set } elseif (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { $forceall = 3; @@ -192,10 +192,10 @@ if ($nolinesbefore) { // Free line echo ''; // Show radio free line - if ($forceall >= 0 && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { + if ($forceall >= 0 && (isModEnabled("product") || isModEnabled("service"))) { echo ''; } // Predefined product/service - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { if ($forceall >= 0 && $freelines) { echo '
    '; } else { @@ -229,17 +229,17 @@ if ($nolinesbefore) { $labelforradio = ''; if (empty($conf->dol_optimize_smallscreen)) { if (empty($senderissupplier)) { - if (!empty($conf->product->enabled) && empty($conf->service->enabled)) { + if (isModEnabled("product") && !isModEnabled('service')) { $labelforradio = $langs->trans('PredefinedProductsToSell'); - } elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) { + } elseif ((!isModEnabled('product') && isModEnabled('service')) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) { $labelforradio = $langs->trans('PredefinedServicesToSell'); } else { $labelforradio = $langs->trans('PredefinedProductsAndServicesToSell'); } } else { - if (!empty($conf->product->enabled) && empty($conf->service->enabled)) { + if (isModEnabled("product") && !isModEnabled('service')) { $labelforradio = $langs->trans('PredefinedProductsToPurchase'); - } elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) { + } elseif (!isModEnabled('product') && isModEnabled('service')) { $labelforradio = $langs->trans('PredefinedServicesToPurchase'); } else { $labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase'); @@ -257,9 +257,11 @@ if ($nolinesbefore) { } if (empty($senderissupplier)) { $statustoshow = 1; + $statuswarehouse = 'warehouseopen,warehouseinternal'; + if (!empty($conf->global->ENTREPOT_WAREHOUSEINTERNAL_NOT_SELL)) $statuswarehouse = 'warehouseopen'; if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) { // hide products in closed warehouse, but show products for internal transfer - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, $statuswarehouse, GETPOST('combinations', 'array')); } else { $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } @@ -337,9 +339,9 @@ if ($nolinesbefore) { print $hookmanager->resPrint; } } - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { echo '
    '; - if (!empty($conf->variants->enabled)) { + if (isModEnabled('variants')) { echo '
    '; } } @@ -357,7 +359,7 @@ if ($nolinesbefore) { $doleditor = new DolEditor('dp_desc', GETPOST('dp_desc', 'restricthtml'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT) ? 100 : $conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%'); $doleditor->Create(); // Show autofill date for recurring invoices - if (!empty($conf->service->enabled) && ($object->element == 'facturerec' || $object->element == 'invoice_supplier_rec')) { + if (isModEnabled("service") && ($object->element == 'facturerec' || $object->element == 'invoice_supplier_rec')) { echo '

    '; echo $langs->trans('AutoFillDateFrom').' '; if (!empty($conf->global->INVOICE_REC_DATE_TO_YES)) { @@ -383,7 +385,7 @@ if ($nolinesbefore) { if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') { // We must have same test in printObjectLines $coldisplay++; ?> -
    ">"> @@ -412,13 +414,14 @@ if ($nolinesbefore) { $coldisplay++; ?> - "> + "> "> + + "> ">%">% %% - product->enabled) || !empty($conf->service->enabled)) { ?> + @@ -455,11 +459,11 @@ if ($nolinesbefore) { %%%%
    '.$form->load_tva('tva_tx', GETPOSTISSET('tva_tx') ? GETPOST('tva_tx', 'alpha') : ($line->tva_tx.($line->vat_src_code ? (' ('.$line->vat_src_code.')') : '')), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1).''; + print $form->load_tva('tva_tx', GETPOSTISSET('tva_tx') ? GETPOST('tva_tx', 'alpha') : ($line->tva_tx.($line->vat_src_code ? (' ('.$line->vat_src_code.')') : '')), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1); + print '% - info_bits & 2) != 2) { - print '%'; + print '>%'; } else { ?>   % - product->enabled) || !empty($conf->service->enabled)) { ?> + @@ -303,9 +312,9 @@ $coldisplay++; $margin_rate = (GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", "alpha", 2) : (($line->pa_ht == 0) ? '' : price($line->marge_tx))); // if credit note, dont allow to modify margin if ($line->subprice < 0) { - echo ''.$margin_rate.'%'.$margin_rate.'%%%'.$mark_rate.'%'.$mark_rate.'%%% - ">
    - "> + ">
    + ">
      '.$langs->trans('Description').''.$langs->trans('Description').''.$langs->trans("SupplierRef").''.$langs->trans("SupplierRef").''; +print ''; if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || !empty($conf->global->FACTURE_LOCAL_TAX2_OPTION)) { print $langs->trans('Taxes'); } else { print $langs->trans('VAT'); } -if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT) { +if (in_array($object->element, array('propal', 'commande', 'facture', 'supplier_proposal', 'order_supplier', 'invoice_supplier')) && $object->status == $object::STATUS_DRAFT) { global $mysoc; if (empty($disableedit)) { @@ -82,30 +82,30 @@ if (in_array($object->element, array('propal', 'commande', 'facture')) && $objec print ''; } } -print ''; +print ''.$langs->trans('PriceUHT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''.$langs->trans('PriceUTTC').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').''.$langs->trans('Qty').''.$langs->trans('Unit').''.$langs->trans('Unit').''; +print ''; print $langs->trans('ReductionShort'); if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT) { @@ -122,59 +122,59 @@ if (in_array($object->element, array('propal', 'commande', 'facture')) && $objec print ''; } } -print ''; +print ''.$langs->trans('Progress').''.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).''.$langs->trans('Progress').''.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).''.$langs->trans('BuyingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('CostPrice').''.$langs->trans('MarginRate').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').''.$langs->trans('MarkRate').''.$langs->trans('TotalHTShort').''.$langs->trans('TotalHTShort').''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''.$langs->trans('TotalTTCShort').''.$langs->trans('TotalTTCShort').''; + print ''; print ''; print ''; - print ''; + print '
    subprice); ?>subprice); ?>multicurrency_subprice); ?>multicurrency_subprice); ?> pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?>pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?> + info_bits & 2) != 2) && $line->special_code != 3) { // I comment this because it shows info even when not required @@ -333,7 +333,7 @@ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) { print ''.price($sign * $tmp[0]).'pa_ht); ?> '.price($sign * $line->multicurrency_total_ht).''; $coldisplay++; if (!empty($product_static->accountancy_code_buy) || @@ -418,7 +426,7 @@ if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlin print 'Error SQL: ' . $this->db->lasterror(); } elseif ($obj = $this->db->fetch_object($resql_asset)) { if (!empty($obj->found)) { - print ''; + print ''; print img_edit_add() . ''; } } @@ -430,7 +438,7 @@ if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlin $coldisplay++; if (($line->info_bits & 2) == 2 || !empty($disableedit)) { } else { ?> - id.'#line_'.$line->id; ?>"> + id; ?>"> '; } print ''.$this->tpl['label'].''.$this->tpl['description'].''.$this->tpl['vat_rate'].''.$this->tpl['price'].''.$this->tpl['multicurrency_price'].'
    '; print $langs->trans('CronLabel')."label."\" /> "; + print ' '; print ""; print "
    '; print $langs->trans('CronModule').""; - print "module_name."\" /> "; + print ' '; print ""; print $form->textwithpicto('', $langs->trans("CronModuleHelp"), 1, 'help'); @@ -362,7 +365,7 @@ if (($action == "create") || ($action == "edit")) { print '
    '; print $langs->trans('CronClassFile').""; - print ' '; + print ' '; print ""; print $form->textwithpicto('', $langs->trans("CronClassFileHelp"), 1, 'help'); @@ -371,7 +374,7 @@ if (($action == "create") || ($action == "edit")) { print '
    '; print $langs->trans('CronObject').""; - print "objectname."\" /> "; + print ' '; print ""; print $form->textwithpicto('', $langs->trans("CronObjectHelp"), 1, 'help'); @@ -380,7 +383,7 @@ if (($action == "create") || ($action == "edit")) { print '
    '; print $langs->trans('CronMethod').""; - print ' '; + print ' '; print ""; print $form->textwithpicto('', $langs->trans("CronMethodHelp"), 1, 'help'); @@ -414,6 +417,15 @@ if (($action == "create") || ($action == "edit")) { print "
    '; + print $langs->trans('EmailIfError').""; + print ' '; + print ""; + //print $form->textwithpicto('', $langs->trans("CronCommandHelp"), 1, 'help'); + print "
    '; print $langs->trans('CronEvery').""; @@ -461,6 +473,16 @@ if (($action == "create") || ($action == "edit")) { } $input .= ""; print $input; + + $input = " unitfrequency == "2678400") { + $input .= ' checked />'; + } else { + $input .= ' />'; + } + $input .= ""; + print $input; + print ""; print ""; @@ -483,7 +505,7 @@ if (($action == "create") || ($action == "edit")) { if (!empty($object->dateend)) { print $form->selectDate($object->dateend, 'dateend', 1, 1, '', "cronform"); } else { - print $form->selectDate(-1, 'dateend', 1, 1, '', "cronform"); + print $form->selectDate(-1, 'dateend', 1, 1, 1, "cronform"); } print ""; @@ -496,7 +518,7 @@ if (($action == "create") || ($action == "edit")) { if (!empty($object->priority)) { $priority = $object->priority; } - print " "; + print ' '; print ""; print " "; + print ' '; print ""; print "
    '; print $langs->trans('CronDtNextLaunch'); - print ' ('.$langs->trans('CronFrom').')'; + //print ' ('.$langs->trans('CronFrom').')'; print ""; if (!empty($object->datenextrun)) { print $form->selectDate($object->datenextrun, 'datenextrun', 1, 1, '', "cronform"); } else { - print $form->selectDate(-1, 'datenextrun', 1, 1, '', "cronform"); + print $form->selectDate(-1, 'datenextrun', 1, 1, '', "cronform", 1, 1); } print ""; @@ -545,8 +567,15 @@ if (($action == "create") || ($action == "edit")) { $linkback = ''.$langs->trans("BackToList").''; + $reg = array(); + if (preg_match('/:(.*)$/', $object->label, $reg)) { + $langs->load($reg[1]); + } + + $labeltoshow = preg_replace('/:.*$/', '', $object->label); + $morehtmlref = '
    '; - $morehtmlref .= $langs->trans($object->label); + $morehtmlref .= $langs->trans($labeltoshow); $morehtmlref .= '
    '; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); @@ -570,32 +599,32 @@ if (($action == "create") || ($action == "edit")) { print '
    '; print $langs->trans('CronModule').""; - print $object->module_name; + print dol_escape_htmltag($object->module_name); print "
    '; print $langs->trans('CronClassFile').""; - print $object->classesname; + print dol_escape_htmltag($object->classesname); print "
    '; print $langs->trans('CronObject').""; - print $object->objectname; + print dol_escape_htmltag($object->objectname); print "
    '; print $langs->trans('CronMethod').""; - print $object->methodename; + print dol_escape_htmltag($object->methodename); print "
    '; print $langs->trans('CronArgs').""; - print $object->params; + print dol_escape_htmltag($object->params); print "
    '; print $langs->trans('CronCommand').""; - print $object->command; + print dol_escape_htmltag($object->command); print "
    '; @@ -605,7 +634,12 @@ if (($action == "create") || ($action == "edit")) { } print "
    '; + print $langs->trans('EmailIfError').""; + print dol_escape_htmltag($object->email_alert); + print "
    '; print $langs->trans('Entity').""; if (empty($object->entity)) { @@ -640,6 +674,9 @@ if (($action == "create") || ($action == "edit")) { if ($object->unitfrequency == "604800") { print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Weeks'); } + if ($object->unitfrequency == "2678400") { + print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Month'); + } print "
    '; @@ -737,7 +774,7 @@ if (($action == "create") || ($action == "edit")) { print '
    '; print $langs->trans('CronLastOutput').""; - print nl2br($object->lastoutput); + print ''.nl2br($object->lastoutput).''; print "
    '; @@ -750,7 +787,7 @@ if (($action == "create") || ($action == "edit")) { print dol_get_fiche_end(); - print "\n\n
    \n"; + print "\n\n".'
    '."\n"; if (!$user->rights->cron->create) { print ''.$langs->trans("Edit").''; } else { diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index b18c7146795..d26c83f4772 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2022 Laurent Destailleur * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -23,6 +23,7 @@ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; +require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; /** @@ -108,57 +109,67 @@ class Cronjob extends CommonObject public $datelastresult = ''; /** - * @var string Last result from end job execution + * @var string Last result from end job execution */ public $lastresult; /** - * @var string Last output from end job execution + * @var string Last output from end job execution */ public $lastoutput; /** - * @var string Unit frequency of job execution + * @var string Unit frequency of job execution */ public $unitfrequency; /** - * @var int Frequency of job execution + * @var int Frequency of job execution */ public $frequency; /** - * @var int Status + * @var int Status */ public $status; /** - * @var int Is job processing + * @var int Is job running ? */ public $processing; /** - * @var int ID + * @var int The job current PID + */ + public $pid; + + /** + * @var string Email when an error occurs + */ + public $email_alert; + + /** + * @var int User ID of creation */ public $fk_user_author; /** - * @var int ID + * @var int User ID of last modification */ public $fk_user_mod; /** - * @var int Number of run job execution + * @var int Number of run job execution */ public $nbrun; /** - * @var int Maximum run job execution + * @var int Maximum run job execution */ public $maxrun; /** - * @var string Libname + * @var string Libname */ public $libname; @@ -428,6 +439,8 @@ class Cronjob extends CommonObject $sql .= " t.frequency,"; $sql .= " t.status,"; $sql .= " t.processing,"; + $sql .= " t.pid,"; + $sql .= " t.email_alert,"; $sql .= " t.fk_user_author,"; $sql .= " t.fk_user_mod,"; $sql .= " t.note as note_private,"; @@ -476,6 +489,8 @@ class Cronjob extends CommonObject $this->frequency = $obj->frequency; $this->status = $obj->status; $this->processing = $obj->processing; + $this->pid = $obj->pid; + $this->email_alert = $obj->email_alert; $this->fk_user_author = $obj->fk_user_author; $this->fk_user_mod = $obj->fk_user_mod; $this->note_private = $obj->note_private; @@ -536,6 +551,8 @@ class Cronjob extends CommonObject $sql .= " t.frequency,"; $sql .= " t.status,"; $sql .= " t.processing,"; + $sql .= " t.pid,"; + $sql .= " t.email_alert,"; $sql .= " t.fk_user_author,"; $sql .= " t.fk_user_mod,"; $sql .= " t.note as note_private,"; @@ -574,7 +591,7 @@ class Cronjob extends CommonObject $sql .= " WHERE ".implode(' AND ', $sqlwhere); } - dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); + dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); @@ -612,6 +629,8 @@ class Cronjob extends CommonObject $line->frequency = $obj->frequency; $line->status = $obj->status; $line->processing = $obj->processing; + $line->pid = $obj->pid; + $line->email_alert = $obj->email_alert; $line->fk_user_author = $obj->fk_user_author; $line->fk_user_mod = $obj->fk_user_mod; $line->note_private = $obj->note_private; @@ -713,6 +732,12 @@ class Cronjob extends CommonObject if (empty($this->processing)) { $this->processing = 0; } + if (empty($this->pid)) { + $this->pid = null; + } + if (empty($this->email_alert)) { + $this->email_alert = ''; + } // Check parameters // Put here code to add a control on parameters values @@ -757,7 +782,7 @@ class Cronjob extends CommonObject // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."cronjob SET"; - $sql .= " entity=".(isset($this->entity) ? $this->db->escape($this->entity) : $conf->entity).","; + $sql .= " entity=".(isset($this->entity) ? ((int) $this->entity) : $conf->entity).","; $sql .= " label=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; $sql .= " jobtype=".(isset($this->jobtype) ? "'".$this->db->escape($this->jobtype)."'" : "null").","; $sql .= " command=".(isset($this->command) ? "'".$this->db->escape($this->command)."'" : "null").","; @@ -767,7 +792,7 @@ class Cronjob extends CommonObject $sql .= " params=".(isset($this->params) ? "'".$this->db->escape($this->params)."'" : "null").","; $sql .= " md5params=".(isset($this->md5params) ? "'".$this->db->escape($this->md5params)."'" : "null").","; $sql .= " module_name=".(isset($this->module_name) ? "'".$this->db->escape($this->module_name)."'" : "null").","; - $sql .= " priority=".(isset($this->priority) ? $this->priority : "null").","; + $sql .= " priority=".(isset($this->priority) ? ((int) $this->priority) : "null").","; $sql .= " datelastrun=".(dol_strlen($this->datelastrun) != 0 ? "'".$this->db->idate($this->datelastrun)."'" : 'null').","; $sql .= " datenextrun=".(dol_strlen($this->datenextrun) != 0 ? "'".$this->db->idate($this->datenextrun)."'" : 'null').","; $sql .= " dateend=".(dol_strlen($this->dateend) != 0 ? "'".$this->db->idate($this->dateend)."'" : 'null').","; @@ -779,7 +804,9 @@ class Cronjob extends CommonObject $sql .= " frequency=".(isset($this->frequency) ? $this->frequency : "null").","; $sql .= " status=".(isset($this->status) ? $this->status : "null").","; $sql .= " processing=".((isset($this->processing) && $this->processing > 0) ? $this->processing : "0").","; - $sql .= " fk_user_mod=".$user->id.","; + $sql .= " pid=".(isset($this->pid) ? ((int) $this->pid) : "null").","; + $sql .= " email_alert = ".(isset($this->email_alert) ? "'".$this->db->escape($this->email_alert)."'" : "null").","; + $sql .= " fk_user_mod = ".((int) $user->id).","; $sql .= " note=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; $sql .= " nbrun=".((isset($this->nbrun) && $this->nbrun > 0) ? $this->nbrun : "null").","; $sql .= " maxrun=".((isset($this->maxrun) && $this->maxrun > 0) ? $this->maxrun : "0").","; @@ -931,6 +958,8 @@ class Cronjob extends CommonObject $this->frequency = ''; $this->status = 0; $this->processing = 0; + $this->pid = null; + $this->email_alert = ''; $this->fk_user_author = 0; $this->fk_user_mod = 0; $this->note_private = ''; @@ -1121,6 +1150,7 @@ class Cronjob extends CommonObject @set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64 error_reporting($err); } + $MemoryLimit = 0; if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } @@ -1131,6 +1161,7 @@ class Cronjob extends CommonObject $this->lastoutput = ''; $this->lastresult = ''; $this->processing = 1; // To know job was started + $this->pid = function_exists('getmypid') ? getmypid() : null; // Avoid dol_getmypid to get null if the function is not available $this->nbrun = $this->nbrun + 1; $result = $this->update($user); // This include begin/commit if ($result < 0) { @@ -1231,13 +1262,13 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::run_jobs END result=".$result." error=".$errmsg, LOG_ERR); $this->error = $errmsg; - $this->lastoutput = ($object->output ? $object->output."\n" : "").$errmsg; + $this->lastoutput = (!empty($object->output) ? $object->output."\n" : "").$errmsg; $this->lastresult = is_numeric($result) ? $result : -1; $retval = $this->lastresult; $error++; } else { dol_syslog(get_class($this)."::run_jobs END"); - $this->lastoutput = $object->output; + $this->lastoutput = (!empty($object->output) ? $object->output : ""); $this->lastresult = var_export($result, true); $retval = $this->lastresult; } @@ -1323,6 +1354,7 @@ class Cronjob extends CommonObject $this->datelastresult = dol_now(); $this->processing = 0; + $this->pid = null; $result = $this->update($user); // This include begin/commit if ($result < 0) { dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); @@ -1331,6 +1363,16 @@ class Cronjob extends CommonObject } $conf->setEntityValues($this->db, $savcurrententity); + + if ($error && !empty($this->email_alert)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $subject = $langs->trans("ErrorInBatch", $this->label); + $msg = $langs->trans("ErrorInBatch", $this->label); + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); + $cmailfile = new CMailFile($subject, $this->email_alert, $from, $msg); + $result = $cmailfile->sendfile(); // Do not test result + } + return $error ?-1 : 1; } @@ -1367,21 +1409,30 @@ class Cronjob extends CommonObject if (empty($this->datenextrun)) { if (empty($this->datestart)) { - $this->datenextrun = $now + ($this->frequency * $this->unitfrequency); + if ($this->unitfrequency == 2678400) { + $this->datenextrun = dol_time_plus_duree($now, $this->frequency, 'm'); + } else { + $this->datenextrun = $now + ($this->frequency * $this->unitfrequency); + } } else { - $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency); + if ($this->unitfrequency == 2678400) { + $this->datenextrun = dol_time_plus_duree($this->datestart, $this->frequency, 'm'); + } else { + $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency); + } } } if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0) { // Loop until date is after future while ($this->datenextrun < $now) { - $this->datenextrun += ($this->frequency * $this->unitfrequency); - - // TODO For exact frequency (every month, every year, ...), use instead a dol_time_plus_duree($time, $duration_value, $duration_unit) + if ($this->unitfrequency == 2678400) { + $this->datenextrun = dol_time_plus_duree($this->datenextrun, $this->frequency, 'm'); + } else { + $this->datenextrun += ($this->frequency * $this->unitfrequency); + } } } else { - //$this->datenextrun=$this->datenextrun + ($this->frequency * $this->unitfrequency); dol_syslog(get_class($this)."::reprogram_jobs datenextrun is already in future, we do not change it"); } @@ -1503,10 +1554,12 @@ class Cronjobline public $datenextrun = ''; public $dateend = ''; public $datestart = ''; + public $datelastresult = ''; public $lastresult = ''; public $lastoutput; public $unitfrequency; public $frequency; + public $processing; /** * @var int Status @@ -1524,8 +1577,10 @@ class Cronjobline public $fk_user_mod; public $note; + public $note_private; public $nbrun; public $libname; + public $test; /** * Constructor diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php index 689daf8eff5..aff0a6919d0 100644 --- a/htdocs/cron/info.php +++ b/htdocs/cron/info.php @@ -20,6 +20,7 @@ * \brief Page of info of a cron job */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php"; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 40fe27d3404..30f195b550b 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -24,6 +24,7 @@ * \brief Lists Jobs */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; @@ -64,6 +65,7 @@ $search_status = (GETPOSTISSET('search_status') ?GETPOST('search_status', 'int') $search_label = GETPOST("search_label", 'alpha'); $search_module_name = GETPOST("search_module_name", 'alpha'); $search_lastresult = GETPOST("search_lastresult", "alphawithlgt"); +$search_processing = GETPOST("search_processing", "int"); $securitykey = GETPOST('securitykey', 'alpha'); $outputdir = $conf->cron->dir_output; @@ -277,6 +279,9 @@ if ($search_status >= 0 && $search_status < 2 && $search_status != '') { if ($search_lastresult != '') { $sql .= natural_search("t.lastresult", $search_lastresult, 1); } +if (GETPOSTISSET('search_processing')) { + $sql .= " AND t.processing = ".((int) $search_processing); +} //Manage filter if (is_array($filter) && count($filter) > 0) { foreach ($filter as $key => $value) { @@ -415,7 +420,7 @@ if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) { $text .= $langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS); } print info_admin($text); -print '
    '; +//print '
    '; //$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = ''; @@ -442,8 +447,8 @@ print '
       '; -print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Scheduled")), $search_status, 1); +print ''; +print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Scheduled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'onrightofpage'); print ''; $searchpicto = $form->showFilterButtons(); print $searchpicto; @@ -455,18 +460,18 @@ print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "t.rowid", "", $param, '', print_liste_field_titre("CronLabel", $_SERVER["PHP_SELF"], "t.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Prority", $_SERVER["PHP_SELF"], "t.priority", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("CronModule", $_SERVER["PHP_SELF"], "t.module_name", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("CronType", '', '', "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("CronType", '', '', "", $param, '', $sortfield, $sortorder, 'tdoverflowmax100 '); print_liste_field_titre("CronFrequency", '', "", "", $param, '', $sortfield, $sortorder); //print_liste_field_titre("CronDtStart", $_SERVER["PHP_SELF"], "t.datestart", "", $param, 'align="center"', $sortfield, $sortorder); //print_liste_field_titre("CronDtEnd", $_SERVER["PHP_SELF"], "t.dateend", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("CronNbRun", $_SERVER["PHP_SELF"], "t.nbrun", "", $param, 'align="right"', $sortfield, $sortorder); -print_liste_field_titre("CronDtLastLaunch", $_SERVER["PHP_SELF"], "t.datelastrun", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("CronLastResult", $_SERVER["PHP_SELF"], "t.lastresult", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("CronNbRun", $_SERVER["PHP_SELF"], "t.nbrun", "", $param, '', $sortfield, $sortorder, 'right tdoverflowmax50'); +print_liste_field_titre("CronDtLastLaunch", $_SERVER["PHP_SELF"], "t.datelastrun", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("CronLastResult", $_SERVER["PHP_SELF"], "t.lastresult", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("CronLastOutput", $_SERVER["PHP_SELF"], "t.lastoutput", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("CronDtNextLaunch", $_SERVER["PHP_SELF"], "t.datenextrun", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "t.status,t.priority", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +print_liste_field_titre("CronDtNextLaunch", $_SERVER["PHP_SELF"], "t.datenextrun", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "t.status,t.priority", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center maxwidthsearch '); print "
    '; - if (!empty($obj->label)) { - $object->ref = $langs->trans($obj->label); - print ''.$object->getNomUrl(0, '', 1).''; + if (!empty($object->label)) { + $object->ref = $langs->trans($object->label); + print ''.$object->getNomUrl(0, '', 1).''; $object->ref = $obj->rowid; } else { //print $langs->trans('CronNone'); @@ -550,19 +560,20 @@ if ($num > 0) { print $form->textwithpicto($text, $texttoshow, 1); print ''; + $s = ''; if ($obj->unitfrequency == "60") { - print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Minutes'); - } - if ($obj->unitfrequency == "3600") { - print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Hours'); - } - if ($obj->unitfrequency == "86400") { - print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Days'); - } - if ($obj->unitfrequency == "604800") { - print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Weeks'); + $s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('Minutes') : $langs->trans('Minute')); + } elseif ($obj->unitfrequency == "3600") { + $s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('Hours') : $langs->trans('Hour')); + } elseif ($obj->unitfrequency == "86400") { + $s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('Days') : $langs->trans('Day')); + } elseif ($obj->unitfrequency == "604800") { + $s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('Weeks') : $langs->trans('Week')); + } elseif ($obj->unitfrequency == "2678400") { + $s = ($obj->frequency)." ".($obj->frequency > 1 ? $langs->trans('Months') : $langs->trans('Month')); } + print ''; + print $s; print '
    '; print $val['picto']; - print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); + print $form->textwithpicto($langs->trans($key), $langs->trans('DATAPOLICY_Tooltip_SETUP')); print ''; print ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects($expedition->socid, $expedition->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= ''; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$expedition->id, $expedition->socid, $expedition->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - $morehtmlref .= ' : '; if (!empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -401,7 +390,7 @@ if ($action == 'create') { */ // Document origine - if ($typeobject == 'commande' && $expedition->origin_id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $expedition->origin_id && isModEnabled('commande')) { print '
    '.$langs->trans("RefOrder").'
    '.$langs->trans("RefProposal").'
    '; print '\n"; print '';*/ - if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) { + if (!$conf->expedition_bon->enabled && isModEnabled('stock')) { // Entrepot $entrepot = new Entrepot($db); $entrepot->fetch($object->entrepot_id); @@ -546,7 +535,7 @@ if ($action == 'create') { $product->fetch($object->lines[$i]->fk_product); // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -576,11 +565,11 @@ if ($action == 'create') { } $text .= ' '.$object->lines[$i]->product_ref.''; $text .= ' - '.$label; - $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($object->lines[$i]->description)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($object->lines[$i]->description)); //print $description; print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label) ? '
    '.dol_htmlentitiesbr($object->lines[$i]->description) : ''; } } else { diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 9edc080701b..73fc15e6911 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -31,10 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } @@ -638,7 +638,7 @@ class Delivery extends CommonObject $sql .= " WHERE rowid = ".((int) $lineid); if ($this->db->query($sql)) { - $this->update_price(); + $this->update_price(1); return 1; } else { @@ -973,7 +973,7 @@ class Delivery extends CommonObject $sqlSourceLine .= ", p.ref, p.label"; $sqlSourceLine .= " FROM ".MAIN_DB_PREFIX.$this->linkedObjectsIds[0]['type']."det as st"; $sqlSourceLine .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON st.fk_product = p.rowid"; - $sqlSourceLine .= " WHERE fk_".$this->linked_object[0]['type']." = ".((int) $this->linked_object[0]['linkid']); + $sqlSourceLine .= " WHERE fk_".$this->linked_objects[0]['type']." = ".((int) $this->linked_objects[0]['linkid']); $resultSourceLine = $this->db->query($sqlSourceLine); if ($resultSourceLine) { @@ -986,12 +986,12 @@ class Delivery extends CommonObject // Get lines of sources alread delivered $sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."deliverydet as ld, ".MAIN_DB_PREFIX."delivery as l,"; - $sql .= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c"; - $sql .= ", ".MAIN_DB_PREFIX.$this->linked_object[0]['type']."det as cd"; + $sql .= " ".MAIN_DB_PREFIX.$this->linked_objects[0]['type']." as c"; + $sql .= ", ".MAIN_DB_PREFIX.$this->linked_objects[0]['type']."det as cd"; $sql .= " WHERE ld.fk_delivery = l.rowid"; $sql .= " AND ld.fk_origin_line = cd.rowid"; - $sql .= " AND cd.fk_".$this->linked_object[0]['type']." = c.rowid"; - $sql .= " AND cd.fk_".$this->linked_object[0]['type']." = ".((int) $this->linked_object[0]['linkid']); + $sql .= " AND cd.fk_".$this->linked_objects[0]['type']." = c.rowid"; + $sql .= " AND cd.fk_".$this->linked_objects[0]['type']." = ".((int) $this->linked_objects[0]['linkid']); $sql .= " AND ld.fk_origin_line = ".((int) $objSourceLine->rowid); $sql .= " GROUP BY ld.fk_origin_line"; diff --git a/htdocs/document.php b/htdocs/document.php index a33708e3e77..4f6652fafda 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -104,10 +104,10 @@ $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity; // Security check if (empty($modulepart) && empty($hashp)) { - accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); + httponly_accessforbidden('Bad link. Bad value for parameter modulepart', 400); } if (empty($original_file) && empty($hashp)) { - accessforbidden('Bad link. Missing identification to find file (original_file or hashp)', 0, 0, 1); + httponly_accessforbidden('Bad link. Missing identification to find file (original_file or hashp)', 400); } if ($modulepart == 'fckeditor') { $modulepart = 'medias'; // For backward compatibility @@ -120,7 +120,7 @@ if ($user->socid > 0) { // For some module part, dir may be privates if (in_array($modulepart, array('facture_paiement', 'unpaid'))) { - if (empty($user->rights->societe->client->voir) || $socid) { + if (!$user->hasRight('societe', 'client', 'voir') || $socid) { $original_file = 'private/'.$user->id.'/'.$original_file; // If user has no permission to see all, output dir is specific to user } } @@ -158,7 +158,7 @@ if (!empty($hashp)) { $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir //var_dump($original_file); exit; } else { - accessforbidden('Bad link. File is from another module part.', 0, 0, 1); + httponly_accessforbidden('Bad link. File is from another module part.', 403); } } else { $modulepart = $moduleparttocheck; @@ -171,7 +171,7 @@ if (!empty($hashp)) { } } else { $langs->load("errors"); - accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 0, 0, 1); + httponly_accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 403, 1); } } diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index c56effea73a..a78935c74fd 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } @@ -169,7 +169,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $dir = "../../core/modules/dons/"; $form = new Form($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } @@ -310,7 +310,7 @@ print '\n"; print ''; print "\n"; -if (!empty($conf->societe->enabled)) { +if (isModEnabled("societe")) { print ''; print ''; print ''; // Company - if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { // Thirdparty if ($soc->id > 0) { print ''; @@ -458,7 +466,7 @@ if ($action == 'create') { print $form->selectyesno("public", $public_donation, 1); print "\n"; - if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (!isModEnabled('societe') || empty($conf->global->DONATION_USE_THIRDPARTIES)) { print "".''; print "".''; print "".''; @@ -486,14 +494,17 @@ if ($action == 'create') { // Payment mode print "\n"; // Public note print ''; print ''; print ''; @@ -503,15 +514,18 @@ if ($action == 'create') { print ''; print ''; print ''; } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print "\n"; } @@ -589,7 +603,7 @@ if (!empty($id) && $action == 'edit') { print ""; print "\n"; - if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { $company = new Societe($db); print '".''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); $langs->load('projects'); @@ -671,6 +685,7 @@ if (!empty($id) && $action == 'edit') { /* */ /* ************************************************************ */ if (!empty($id) && $action != 'edit') { + $formconfirm = ""; // Confirmation delete if ($action == 'delete') { $text = $langs->trans("ConfirmDeleteADonation"); @@ -698,7 +713,7 @@ if (!empty($id) && $action != 'edit') { $morehtmlref = '
    '; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($user->rights->don->creer) { @@ -754,7 +769,7 @@ if (!empty($id) && $action != 'edit') { print yn($object->public); print ''; - if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { $company = new Societe($db); print '
    '; } print '
    '; print $langs->trans('IncotermLabel'); @@ -490,7 +479,7 @@ if ($action == 'create') { print ''.$object->getLibStatut(4)."
    '.$langs->trans("Value")."
    '; print $langs->trans("DonationUseThirdparties"); @@ -335,7 +335,7 @@ print ''; $label = $langs->trans("AccountAccounting"); print ''; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { print $formaccounting->select_account($conf->global->DONATION_ACCOUNTINGACCOUNT, 'DONATION_ACCOUNTINGACCOUNT', 1, '', 1, 1); } else { print ''; diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index 1fc28065a5c..a0454ea08d7 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -22,6 +22,7 @@ * \brief Page to setup extra fields of donations */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -77,13 +78,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - /* ************************************************************************** */ /* */ diff --git a/htdocs/don/card.php b/htdocs/don/card.php index ae0e510d135..459c892a1d9 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -27,6 +27,7 @@ * \brief Page of donation card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/dons/modules_don.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; @@ -38,15 +39,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -$langs->loadLangs(array("bills", "companies", "donations", "users")); +$langs->loadLangs(array('bills', 'companies', 'donations', 'users')); $id = GETPOST('rowid') ?GETPOST('rowid', 'int') : GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); @@ -57,10 +59,11 @@ $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); $public_donation = (int) GETPOST("public", 'int'); $object = new Don($db); -$extrafields = new ExtraFields($db); +if ($id > 0 || $ref) { + $object->fetch($id, $ref); +} -// Security check -$result = restrictedArea($user, 'don', $id); +$extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -70,6 +73,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen $hookmanager->initHooks(array('doncard', 'globalcard')); $upload_dir = $conf->don->dir_output; + + +// Security check +$result = restrictedArea($user, 'don', $object->id); + $permissiontoadd = $user->rights->don->creer; @@ -119,10 +127,10 @@ if (empty($reshook)) { if (method_exists($object, 'generateDocument')) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -209,7 +217,7 @@ if (empty($reshook)) { $error = 0; - if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES) && !(GETPOST("socid", 'int') > 0)) { + if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES) && !(GETPOST("socid", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")), null, 'errors'); $action = "create"; $error++; @@ -349,9 +357,9 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->thirdparty->default_lang; - if (! empty($newlang)) + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && !empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) $newlang=$object->thirdparty->default_lang; + if (!empty($newlang)) { $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); @@ -380,7 +388,7 @@ llxHeader('', $title, $help_url); $form = new Form($db); $formfile = new FormFile($db); $formcompany = new FormCompany($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -400,7 +408,7 @@ if ($action == 'create') { print '
    '.$langs->trans('Ref').''.$langs->trans('Draft').'
    '.$langs->trans('ThirdParty').'
    '.$langs->trans("Company").'
    '.$langs->trans("Lastname").'
    '.$langs->trans("Firstname").'
    ".$langs->trans("PaymentMode")."\n"; $selected = GETPOST('modepayment', 'int'); - $form->select_types_paiements($selected, 'modepayment', 'CRDT', 0, 1); + print img_picto('', 'payment', 'class="pictofixedwidth"'); + print $form->select_types_paiements($selected, 'modepayment', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); print "
    '.$langs->trans('NotePublic').''; - + if (!isset($note_public)) { + $note_public = $object->getDefaultCreateValueFor('note_public'); + } $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    '.$langs->trans('NotePrivate').''; - + if (!isset($note_private)) { + $note_private = $object->getDefaultCreateValueFor('note_private'); + } $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    ".$langs->trans("Project").""; - $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project', 'class="pictofixedwidth"'); + print $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print "
    '.$langs->trans("ThirdParty").''; @@ -637,7 +651,7 @@ if (!empty($id) && $action == 'edit') { print "
    '.$langs->trans("Status").''.$object->getLibStatut(4).'
    '.$langs->trans("ThirdParty").''; @@ -801,7 +816,7 @@ if (!empty($id) && $action != 'edit') { $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - $i = 0; $total = 0; + $i = 0; $total = 0; $totalpaid = 0; print ''; print ''; print ''; @@ -831,7 +846,7 @@ if (!empty($id) && $action != 'edit') { $remaintopay = $object->amount - $totalpaid; print ""; - print '\n"; + print '\n"; } print "
    '.$langs->trans("RefPayment").'
    ".$langs->trans("RemainderToPay")." :'.price($remaintopay)."
    '.price($remaintopay)."
    "; $db->free($resql); @@ -913,7 +928,7 @@ if (!empty($id) && $action != 'edit') { $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); // Show online payment link - $useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)); + $useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox')); if ($useonlinepayment) { //$object->statut != Facture::STATUS_DRAFT && print '
    '."\n"; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 4c0811e70c9..b52e0974b9a 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -406,9 +406,9 @@ class Don extends CommonObject $sql .= ", ".((int) $user->id); $sql .= ", null"; $sql .= ", '".$this->db->idate($this->date)."'"; - $sql .= ", '".$this->db->escape(trim($this->email))."'"; - $sql .= ", '".$this->db->escape(trim($this->phone))."'"; - $sql .= ", '".$this->db->escape(trim($this->phone_mobile))."'"; + $sql .= ", '".(!empty($this->email) ? $this->db->escape(trim($this->email)) : "")."'"; + $sql .= ", '".(!empty($this->phone) ? $this->db->escape(trim($this->phone)) : "")."'"; + $sql .= ", '".(!empty($this->phone_mobile) ? $this->db->escape(trim($this->phone_mobile)) : "")."'"; $sql .= ")"; $resql = $this->db->query($sql); @@ -832,8 +832,8 @@ class Don extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -989,7 +989,7 @@ class Don extends CommonObject $this->user_creation_id = $obj->fk_user_author; $this->user_validation_id = $obj->fk_user_valid; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->tms); + $this->date_modification = (!empty($obj->tms) ? $this->db->jdate($obj->tms) : ""); } $this->db->free($result); } else { diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 6de83f5570e..b42f5fb4e4d 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -65,7 +65,7 @@ class PaymentDonation extends CommonObject public $amounts = array(); // Array of amounts public $fk_typepayment; // Payment mode ID - public $paymenttype; // Payment mode ID + public $paymenttype; // Payment mode ID or Code. TODO Use only the code in this field. public $num_payment; @@ -188,12 +188,12 @@ class PaymentDonation extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_donation (fk_donation, datec, datep, amount,"; $sql .= " fk_typepayment, num_payment, note, ext_payment_id, ext_payment_site,"; $sql .= " fk_user_creat, fk_bank)"; - $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; + $sql .= " VALUES (".((int) $this->chid).", '".$this->db->idate($now)."',"; $sql .= " '".$this->db->idate($this->datepaid)."',"; - $sql .= " ".price2num($totalamount).","; + $sql .= " ".((float) price2num($totalamount)).","; $sql .= " ".((int) $this->paymenttype).", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_public)."', "; $sql .= " ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").","; - $sql .= " ".$user->id.", 0)"; + $sql .= " ".((int) $user->id).", 0)"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); @@ -269,8 +269,8 @@ class PaymentDonation extends CommonObject $this->tms = $this->db->jdate($obj->tms); $this->datep = $this->db->jdate($obj->datep); $this->amount = $obj->amount; - $this->fk_typepayment = $obj->fk_typepayment; // For backward compatibility - $this->paymenttype = $obj->fk_typepayment; + $this->fk_typepayment = $obj->fk_typepayment; // Id on type of payent + $this->paymenttype = $obj->fk_typepayment; // Id on type of payment. We should store the code into paymenttype. $this->num_payment = $obj->num_payment; $this->note_public = $obj->note_public; $this->fk_bank = $obj->fk_bank; @@ -574,7 +574,7 @@ class PaymentDonation extends CommonObject $error = 0; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 030ca5cb085..a5aa3984202 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -29,18 +29,19 @@ * \brief Page of linked files onto donation */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page -$langs->loadLangs(array("companies", "other", "donations")); +$langs->loadLangs(array('companies', 'other', 'donations')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -48,13 +49,6 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); -// Security check -if ($user->socid) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'don', $id, ''); - - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -73,13 +67,20 @@ if (!$sortfield) { $sortfield = "name"; } - $object = new Don($db); -$object->fetch($id, $ref); +if ($id > 0 || $ref) { + $object->fetch($id, $ref); +} -$upload_dir = $conf->don->dir_output.'/'.get_exdir($filename, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref); +$upload_dir = $conf->don->dir_output.'/'.get_exdir($id, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref); $modulepart = 'don'; +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'don', $object->id); + $permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php @@ -99,7 +100,7 @@ if ($action == 'classin' && $user->rights->don->creer) { */ $form = new Form($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -129,7 +130,7 @@ if ($object->id) { $morehtmlref = '
    '; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($user->rights->don->creer) { diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 85e2eb3e48f..c402ecd6f0e 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -24,6 +24,7 @@ * \brief Home page of donation module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; @@ -34,11 +35,11 @@ $hookmanager->initHooks(array('donationindex')); $langs->load("donations"); +$donation_static = new Don($db); + // Security check $result = restrictedArea($user, 'don'); -$donation_static = new Don($db); - /* * Actions @@ -90,7 +91,7 @@ print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation'); print '
    '; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // TODO Add a search into global search combo so we can remove this - if (!empty($conf->don->enabled) && $user->rights->don->lire) { + if (isModEnabled('don') && $user->rights->don->lire) { $listofsearchfields['search_donation'] = array('text'=>'Donation'); } diff --git a/htdocs/don/info.php b/htdocs/don/info.php index f326972f782..ad67cceb30c 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -21,41 +21,50 @@ * \brief Page to show a donation information */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -$langs->load("donations"); +$langs->load('donations'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); +$object = new Don($db); +if ($id > 0 || $ref) { + $object->fetch($id, $ref); +} + // Security check if ($user->socid) { $socid = $user->socid; } -$result = restrictedArea($user, 'don', $id, ''); +$result = restrictedArea($user, 'don', $object->id); + + -$object = new Don($db); -$object->fetch($id); /* * Actions */ + if ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); } + /* * View */ + $title = $langs->trans('Donation')." - ".$langs->trans('Info'); $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; @@ -63,7 +72,7 @@ $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:M llxHeader('', $title, $help_url); $form = new Form($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -77,7 +86,7 @@ $linkback = ''; // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($user->rights->don->creer) { diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 891f7e6877b..ac704571daa 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -25,14 +25,15 @@ * \brief List of donations */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page -$langs->loadLangs(array("companies", "donations")); +$langs->loadLangs(array('companies', 'donations')); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'sclist'; @@ -40,6 +41,7 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$type = GETPOST('type', 'aZ'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 @@ -60,7 +62,7 @@ $search_company = GETPOST('search_company', 'alpha'); $search_name = GETPOST('search_name', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); - +$moreforfilter = GETPOST('moreforfilter', 'alpha'); if (!$user->rights->don->lire) { accessforbidden(); } @@ -86,6 +88,11 @@ $fieldstosearchall = array( 'd.firstname'=>'Firstname', ); +// Security check +$result = restrictedArea($user, 'don'); + + + /* * View @@ -93,7 +100,7 @@ $fieldstosearchall = array( $donationstatic = new Don($db); $form = new Form($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $projectstatic = new Project($db); } @@ -197,7 +204,7 @@ if ($resql) { } print '
    '; - print ''."\n"; + print '
    '."\n"; // Filters lines print ''; @@ -219,7 +226,7 @@ if ($resql) { print ''; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; @@ -232,7 +239,7 @@ if ($resql) { Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"), Don::STATUS_CANCELED=>$langs->trans("Canceled") ); - print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); + print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100 onrightofpage'); print ''; print '"; print ''; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print "'; // Bank account -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); @@ -213,9 +214,9 @@ print '
    '; if (empty($action)) { if ($user->rights->don->supprimer) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1); } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1); } } } diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 80ef94e6213..358c0b208e9 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -22,6 +22,7 @@ * \brief Page to add payment of a donation */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; @@ -66,7 +67,7 @@ if ($action == 'add_payment') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !(GETPOST("accountid", 'int') > 0)) { + if (isModEnabled("banque") && !(GETPOST("accountid", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); $error++; } @@ -94,7 +95,7 @@ if ($action == 'add_payment') { // Create a line of payments $payment = new PaymentDonation($db); $payment->chid = $chid; - $payment->datepaid = $datepaid; + $payment->datep = $datepaid; $payment->amounts = $amounts; // Tableau de montant $payment->paymenttype = GETPOST("paymenttype", 'int'); $payment->num_payment = GETPOST("num_payment", 'alphanohtml'); @@ -191,14 +192,14 @@ if ($action == 'create') { print ''; print '
    \n"; print ''; print ''; print ''; print ''; // Number diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index f56bdcd15ac..e9c2b82ae22 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -24,6 +24,7 @@ * \brief Page with donations statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/donstats.class.php'; @@ -40,7 +41,7 @@ if ($user->socid > 0) { $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/ecm/ajax/ecmdatabase.php b/htdocs/ecm/ajax/ecmdatabase.php index 2ce35973483..475e22754b0 100644 --- a/htdocs/ecm/ajax/ecmdatabase.php +++ b/htdocs/ecm/ajax/ecmdatabase.php @@ -33,6 +33,7 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index d70f5c863d7..ab7b13aba90 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -407,7 +407,7 @@ class EcmFiles extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; $sql .= ' WHERE 1 = 1'; /* Fetching this table depends on filepath+filename, it must not depends on entity because filesystem on disk does not know what is Dolibarr entities - if (! empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $sql .= " AND entity IN (" . getEntity('ecmfiles') . ")"; }*/ if ($relativepath) { @@ -546,7 +546,7 @@ class EcmFiles extends CommonObject } $sql .= ' WHERE 1 = 1'; /* Fetching this table depends on filepath+filename, it must not depends on entity - if (! empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $sql .= " AND entity IN (" . getEntity('ecmfiles') . ")"; }*/ if (count($sqlwhere) > 0) { @@ -751,7 +751,13 @@ class EcmFiles extends CommonObject } // If you need to delete child tables to, you can insert them here - + if (!$error) { + $result = $this->deleteExtraFields(); + if (!$result) { + dol_syslog(get_class($this)."::delete error ".$this->error, LOG_ERR); + $error++; + } + } if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; $sql .= ' WHERE rowid='.((int) $this->id); diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index c6f97adb6ba..acdc6c2990a 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -25,6 +25,7 @@ if (! defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/htmlecm.form.class.php'; @@ -92,18 +93,18 @@ if (!empty($section)) { } // Permissions -$permtoadd = 0; -$permtoupload = 0; +$permissiontoadd = 0; +$permissiontoupload = 0; if ($module == 'ecm') { - $permtoadd = $user->rights->ecm->setup; - $permtoupload = $user->rights->ecm->upload; + $permissiontoadd = $user->rights->ecm->setup; + $permissiontoupload = $user->rights->ecm->upload; } if ($module == 'medias') { - $permtoadd = ($user->rights->mailing->creer || $user->rights->website->write); - $permtoupload = ($user->rights->mailing->creer || $user->rights->website->write); + $permissiontoadd = ($user->rights->mailing->creer || $user->rights->website->write); + $permissiontoupload = ($user->rights->mailing->creer || $user->rights->website->write); } -if (!$permtoadd) { +if (!$permissiontoadd) { accessforbidden(); } @@ -114,7 +115,7 @@ if (!$permtoadd) { */ // Action ajout d'un produit ou service -if ($action == 'add' && $permtoadd) { +if ($action == 'add' && $permissiontoadd) { if ($cancel) { if (!empty($backtopage)) { header("Location: ".$backtopage); @@ -188,7 +189,7 @@ if ($action == 'add' && $permtoadd) { exit; } } -} elseif ($action == 'confirm_deletesection' && $confirm == 'yes' && $permtoadd) { +} elseif ($action == 'confirm_deletesection' && $confirm == 'yes' && $permissiontoadd) { // Deleting file $result = $ecmdir->delete($user); setEventMessages($langs->trans("ECMSectionWasRemoved", $ecmdir->label), null, 'mesgs'); @@ -230,7 +231,7 @@ if ($action == 'create') { print '
    '; print ' '; print ''; print ' '; print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); @@ -249,7 +256,7 @@ if ($resql) { } print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder); } @@ -280,7 +287,7 @@ if ($resql) { } print "".$donationstatic->getFullName($langs)."'.dol_print_date($db->jdate($objp->datedon), 'day').'"; if ($objp->pid) { $projectstatic->id = $objp->pid; diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 8e1b5192ee2..dd3f4e176ce 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -25,34 +25,37 @@ * \brief Page to show a donation notes */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page -$langs->loadLangs(array("companies", "bills", "donations")); +$langs->loadLangs(array('companies', 'bills', 'donations')); $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); +$hookmanager->initHooks(array('donnote')); + +$object = new Don($db); +if ($id > 0 || $ref) { + $object->fetch($id, $ref); +} + // Security check $socid = 0; if ($user->socid) { $socid = $user->socid; } -$hookmanager->initHooks(array('donnote')); - -$result = restrictedArea($user, 'don', $id, ''); - -$object = new Don($db); -$object->fetch($id); +$result = restrictedArea($user, 'don', $object->id, ''); $permissionnote = $user->rights->don->creer; // Used by the include of actions_setnotes.inc.php @@ -60,6 +63,7 @@ $permissionnote = $user->rights->don->creer; // Used by the include of actions_s /* * Actions */ + $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -73,6 +77,7 @@ if ($action == 'classin' && $user->rights->don->creer) { $object->setProject($projectid); } + /* * View */ @@ -84,7 +89,7 @@ $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:M llxHeader('', $title, $help_url); $form = new Form($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -100,7 +105,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref = '
    '; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($user->rights->don->creer) { diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index 363ef6d34ef..19f40bc984e 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -22,12 +22,13 @@ * \brief Tab payment of a donation */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; 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)) { +if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } @@ -124,7 +125,7 @@ print '
    '.$langs->trans('Amount').''.price($object->amount, 0, $ print '
    '.$langs->trans('Note').''.nl2br($object->note_public).'
    '.$langs->trans("PaymentMode").''; - $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype") : $object->paymenttype, "paymenttype"); + $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype") : $object->fk_typepayment, "paymenttype"); print "
    '.$langs->trans('AccountToCredit').''; - $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, '', 2); // Show open bank account list + $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : "0", "accountid", 0, '', 2); // Show open bank account list print '
    '; // Label - print ''."\n"; + print ''."\n"; print ''; // Bank account - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { print ''; @@ -309,7 +310,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); // Projet associe @@ -341,7 +342,7 @@ if ($action == 'create') { print ''; // Accountancy - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { // Accountancy_account_capital print ''; print ''; // Bank account -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { if ($payment->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($payment->bank_line); @@ -222,9 +223,9 @@ print '
    '; if (empty($action) && !empty($user->rights->loan->delete)) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1); } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0); } } diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 113c1151e24..6a136f8ba2e 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -23,6 +23,7 @@ * \brief Page to add payment of a loan */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; @@ -105,7 +106,7 @@ if ($action == 'add_payment') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !GETPOST('accountid', 'int') > 0) { + if (isModEnabled("banque") && !GETPOST('accountid', 'int') > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); $error++; } diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index cd5faa1afe3..8887c82ef42 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -23,6 +23,7 @@ * \brief Schedule card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 9635c0e2c1f..bcfb1b83d6e 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -141,7 +141,7 @@ class MailmanSpip $list, $object->email, $object->pass, - $conf->global->ADHERENT_MAILMAN_ADMINPW + $conf->global->ADHERENT_MAILMAN_ADMIN_PASSWORD ); $curl_url = str_replace($patterns, $replace, $url); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 98de8c12e5c..b383a6eb7c2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -80,7 +80,7 @@ function realCharForNumericEntities($matches) * Warning: Such a protection can't be enough. It is not reliable as it will always be possible to bypass this. Good protection can * only be guaranted by escaping data during output. * - * @param string $val Brut value found into $_GET, $_POST or PHP_SELF + * @param string $val Brute value found into $_GET, $_POST or PHP_SELF * @param string $type 0=POST, 1=GET, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) * @return int >0 if there is an injection, 0 if none */ @@ -89,18 +89,22 @@ function testSqlAndScriptInject($val, $type) // Decode string first because a lot of things are obfuscated by encoding or multiple encoding. // So error=alert(1) $val = preg_replace('//', '', $val); - $val = preg_replace('/[\r\n]/', '', $val); + $val = preg_replace('/[\r\n\t]/', '', $val); } while ($oldval != $val); //print "type = ".$type." after decoding: ".$val."\n"; @@ -123,11 +127,12 @@ function testSqlAndScriptInject($val, $type) // For SQL Injection (only GET are used to scan for such injection strings) if ($type == 1 || $type == 3) { - $inj += preg_match('/delete\s+from/i', $val); - $inj += preg_match('/create\s+table/i', $val); - $inj += preg_match('/insert\s+into/i', $val); - $inj += preg_match('/select\s+from/i', $val); - $inj += preg_match('/into\s+(outfile|dumpfile)/i', $val); + // Note the \s+ is replaced into \s* because some spaces may have been modified in previous loop + $inj += preg_match('/delete\s*from/i', $val); + $inj += preg_match('/create\s*table/i', $val); + $inj += preg_match('/insert\s*into/i', $val); + $inj += preg_match('/select\s*from/i', $val); + $inj += preg_match('/into\s*(outfile|dumpfile)/i', $val); $inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login $inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database $inj += preg_match('/= 3) { // All GET actions and mass actions are processed as sensitive. - if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'file_manager', 'presend', 'presend_addmessage'))) { // We exclude the case action='create' and action='file_manager' that are legitimate + if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'specimen'))) { // We exclude the case action='create' and action='file_manager' that are legitimate $sensitiveget = true; } } elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) { @@ -524,19 +535,20 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( $arrayofactiontoforcetokencheck = array( 'activate', 'doprev', 'donext', 'dvprev', 'dvnext', - 'install', + 'freezone', 'install', 'reopen' ); if (in_array(GETPOST('action', 'aZ09'), $arrayofactiontoforcetokencheck)) { $sensitiveget = true; } + // We also match for value with just a simple string that must match if (preg_match('/^(add|classify|close|confirm|copy|del|disable|enable|remove|set|unset|update|save)/', GETPOST('action', 'aZ09'))) { $sensitiveget = true; } } // Check a token is provided for all cases that need a mandatory token - // (all POST actions + all login, actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set + all sensitive GET actions) + // (all POST actions + all sensitive GET actions + all mass actions + all login/actions/logout on pages with CSRFCHECK_WITH_TOKEN set) if ( $_SERVER['REQUEST_METHOD'] == 'POST' || $sensitiveget || @@ -545,12 +557,12 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( ) { // If token is not provided or empty, error (we are in case it is mandatory) if (!GETPOST('token', 'alpha') || GETPOST('token', 'alpha') == 'notrequired') { + top_httphead(); if (GETPOST('uploadform', 'int')) { dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused. File size too large or not provided."); $langs->loadLangs(array("errors", "install")); print $langs->trans("ErrorFileSizeTooLarge").' '; print $langs->trans("ErrorGoBackAndCorrectParameters"); - die; } else { http_response_code(403); if (defined('CSRFCHECK_WITH_TOKEN')) { @@ -565,8 +577,8 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( } print " into setup).\n"; } - die; } + die; } } @@ -627,11 +639,15 @@ $modulepart = explode("/", $_SERVER["PHP_SELF"]); if (is_array($modulepart) && count($modulepart) > 0) { foreach ($conf->modules as $module) { if (in_array($module, $modulepart)) { - $conf->modulepart = $module; + $modulepart = $module; break; } } } +if (is_array($modulepart)) { + $modulepart = ''; +} + /* * Phase authentication / login @@ -847,14 +863,18 @@ if (!defined('NOLOGIN')) { // End test login / passwords if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success. // No data to test login, so we show the login page. - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_NOTICE); if (defined('NOREDIRECTBYMAINTOLOGIN')) { + // When used with NOREDIRECTBYMAINTOLOGIN set, the http header must already be set when including the main. + // See example with selectsearchbox.php. This case is reserverd for the selectesearchbox.php so we can + // report a message to ask to login when search ajax component is used after a timeout. + //top_httphead(); return 'ERROR_NOT_LOGGED'; } else { if ($_SERVER["HTTP_USER_AGENT"] == 'securitytest') { http_response_code(401); // It makes easier to understand if session was broken during security tests } - dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); + dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); // This include http headers } exit; } @@ -1200,14 +1220,22 @@ if (GETPOST('dol_no_mouse_hover', 'int') || !empty($_SESSION['dol_no_mouse_hover if (GETPOST('dol_use_jmobile', 'int') || !empty($_SESSION['dol_use_jmobile'])) { $conf->dol_use_jmobile = 1; } +// If not on Desktop if (!empty($conf->browser->layout) && $conf->browser->layout != 'classic') { $conf->dol_no_mouse_hover = 1; } + +// If on smartphone or optmized for small screen if ((!empty($conf->browser->layout) && $conf->browser->layout == 'phone') || (!empty($_SESSION['dol_screenwidth']) && $_SESSION['dol_screenwidth'] < 400) - || (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400) + || (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400 + || !empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) ) { $conf->dol_optimize_smallscreen = 1; + + if (isset($conf->global->PRODUIT_DESC_IN_FORM) && $conf->global->PRODUIT_DESC_IN_FORM == 1) { + $conf->global->PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE = 0; + } } // Replace themes bugged with jmobile with eldy if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea', 'cameleo', 'amarok'))) { @@ -1240,8 +1268,7 @@ if (!defined('NOLOGIN')) { // If not active, we refuse the user $langs->loadLangs(array("errors", "other")); dol_syslog("Authentication KO as login is disabled", LOG_NOTICE); - accessforbidden($langs->trans("ErrorLoginDisabled")); - exit; + accessforbidden("ErrorLoginDisabled"); } // Load permissions @@ -1354,7 +1381,7 @@ if (!function_exists("llxHeader")) { */ function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0) { - global $conf; + global $conf, $hookmanager; // html header top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow, $disablenoindex); @@ -1374,6 +1401,12 @@ if (!function_exists("llxHeader")) { print ''."\n"; + $parameters = array('help_url' => $help_url); + $reshook = $hookmanager->executeHooks('changeHelpURL', $parameters); + if ($reshook > 0) { + $help_url = $hookmanager->resPrint; + } + // top menu and left menu area if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && !GETPOST('dol_openinpopup', 'aZ09')) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url); @@ -1411,21 +1444,27 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) } // Security options + + // X-Content-Type-Options header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on) + + // X-Frame-Options if (!defined('XFRAMEOPTIONS_ALLOWALL')) { header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks) } else { header("X-Frame-Options: ALLOWALL"); } + + // X-XSS-Protection //header("X-XSS-Protection: 1"); // XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated. - if (!defined('FORCECSP')) { - //if (! isset($conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY)) - //{ - // // A default security policy that keep usage of js external component like ckeditor, stripe, google, working + + // Content-Security-Policy + if (!defined('MAIN_SECURITY_FORCECSP')) { + // If CSP not forced from the page + + // A default security policy that keep usage of js external component like ckeditor, stripe, google, working // $contentsecuritypolicy = "font-src *; img-src *; style-src * 'unsafe-inline' 'unsafe-eval'; default-src 'self' *.stripe.com 'unsafe-inline' 'unsafe-eval'; script-src 'self' *.stripe.com 'unsafe-inline' 'unsafe-eval'; frame-src 'self' *.stripe.com; connect-src 'self';"; - //} - //else - $contentsecuritypolicy = empty($conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY) ? '' : $conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY; + $contentsecuritypolicy = getDolGlobalString('MAIN_SECURITY_FORCECSP'); if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; @@ -1448,16 +1487,29 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) // default-src https://cdn.example.net; object-src 'none' // For example, to restrict everything to itself except img that can be on other servers: // default-src 'self'; img-src *; - // Pre-existing site that uses too much inline code to fix but wants to ensure resources are loaded only over https and disable plugins: - // default-src http: https: 'unsafe-eval' 'unsafe-inline'; object-src 'none' + // Pre-existing site that uses too much js code to fix but wants to ensure resources are loaded only over https and disable plugins: + // default-src https: 'unsafe-inline' 'unsafe-eval'; object-src 'none' header("Content-Security-Policy: ".$contentsecuritypolicy); } - } elseif (constant('FORCECSP')) { - header("Content-Security-Policy: ".constant('FORCECSP')); + } else { + header("Content-Security-Policy: ".constant('MAIN_SECURITY_FORCECSP')); } + + // Referrer-Policy + // Say if we must provide the referrer when we jump onto another web page. + // Default browser are 'strict-origin-when-cross-origin' (only domain is sent on other domain switching), we want more so we use 'same-origin' so browser doesn't send any referrer when going into another web site domain. + if (!defined('MAIN_SECURITY_FORCERP')) { + $referrerpolicy = getDolGlobalString('MAIN_SECURITY_FORCERP', "same-origin"); + + header("Referrer-Policy: ".$referrerpolicy); + } + if ($forcenocache) { header("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"); } + + // No need to add this token in header, we use instead the one into the forms. + //header("anti-csrf-token: ".newToken()); } /** @@ -1509,6 +1561,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Do not index print ''."\n"; // Scale for mobile device print ''."\n"; + print ''."\n"; if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { print ''."\n"; } @@ -1517,8 +1570,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (!empty($mysoc->logo_squarred_mini)) { $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); } - if (!empty($conf->global->MAIN_FAVICON_URL)) { - $favicon = $conf->global->MAIN_FAVICON_URL; + if (getDolGlobalString('MAIN_FAVICON_URL')) { + $favicon = getDolGlobalString('MAIN_FAVICON_URL'); } if (empty($conf->dol_use_jmobile)) { print ''."\n"; // Not required into an Android webview @@ -1581,7 +1634,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity); } - $themeparam = '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').'&userid='.$user->id.'&entity='.$conf->entity; + $themeparam = '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').(empty($user->id) ? '' : ('&userid='.$user->id)).'&entity='.$conf->entity; $themeparam .= ($ext ? '&'.$ext : '').'&revision='.getDolGlobalInt("MAIN_IHM_PARAMS_REV"); if (GETPOSTISSET('dol_hide_topmenu')) { @@ -2413,7 +2466,7 @@ function printDropdownQuickadd() "title" => "MenuNewMember@members", "name" => "Adherent@members", "picto" => "object_member", - "activation" => !empty($conf->adherent->enabled) && $user->rights->adherent->creer, // vs hooking + "activation" => isModEnabled('adherent') && $user->hasRight("adherent", "write"), // vs hooking "position" => 5, ), array( @@ -2421,7 +2474,7 @@ function printDropdownQuickadd() "title" => "MenuNewThirdParty@companies", "name" => "ThirdParty@companies", "picto" => "object_company", - "activation" => !empty($conf->societe->enabled) && $user->rights->societe->creer, // vs hooking + "activation" => isModEnabled("societe") && $user->hasRight("societe", "write"), // vs hooking "position" => 10, ), array( @@ -2429,7 +2482,7 @@ function printDropdownQuickadd() "title" => "NewContactAddress@companies", "name" => "Contact@companies", "picto" => "object_contact", - "activation" => !empty($conf->societe->enabled) && $user->rights->societe->contact->creer, // vs hooking + "activation" => isModEnabled("societe") && $user->hasRight("societe", "contact", "write"), // vs hooking "position" => 20, ), array( @@ -2437,7 +2490,7 @@ function printDropdownQuickadd() "title" => "NewPropal@propal", "name" => "Proposal@propal", "picto" => "object_propal", - "activation" => !empty($conf->propal->enabled) && $user->rights->propale->creer, // vs hooking + "activation" => isModEnabled("propal") && $user->hasRight("propal", "write"), // vs hooking "position" => 30, ), @@ -2446,7 +2499,7 @@ function printDropdownQuickadd() "title" => "NewOrder@orders", "name" => "Order@orders", "picto" => "object_order", - "activation" => !empty($conf->commande->enabled) && $user->rights->commande->creer, // vs hooking + "activation" => isModEnabled('commande') && $user->hasRight("commande", "write"), // vs hooking "position" => 40, ), array( @@ -2454,7 +2507,7 @@ function printDropdownQuickadd() "title" => "NewBill@bills", "name" => "Bill@bills", "picto" => "object_bill", - "activation" => isModEnabled('facture') && $user->rights->facture->creer, // vs hooking + "activation" => isModEnabled('facture') && $user->hasRight("facture", "write"), // vs hooking "position" => 50, ), array( @@ -2462,7 +2515,7 @@ function printDropdownQuickadd() "title" => "NewContractSubscription@contracts", "name" => "Contract@contracts", "picto" => "object_contract", - "activation" => !empty($conf->contrat->enabled) && $user->rights->contrat->creer, // vs hooking + "activation" => isModEnabled('contrat') && $user->hasRight("contrat", "write"), // vs hooking "position" => 60, ), array( @@ -2470,7 +2523,7 @@ function printDropdownQuickadd() "title" => "SupplierProposalNew@supplier_proposal", "name" => "SupplierProposal@supplier_proposal", "picto" => "supplier_proposal", - "activation" => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer, // vs hooking + "activation" => isModEnabled('supplier_proposal') && $user->hasRight("supplier_invoice", "write"), // vs hooking "position" => 70, ), array( @@ -2478,7 +2531,7 @@ function printDropdownQuickadd() "title" => "NewSupplierOrderShort@orders", "name" => "SupplierOrder@orders", "picto" => "supplier_order", - "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->creer) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->creer), // vs hooking + "activation" => (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "commande", "write")) || (isModEnabled("supplier_order") && $user->hasRight("supplier_invoice", "write")), // vs hooking "position" => 80, ), array( @@ -2486,31 +2539,47 @@ function printDropdownQuickadd() "title" => "NewBill@bills", "name" => "SupplierBill@bills", "picto" => "supplier_invoice", - "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->creer) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->creer), // vs hooking + "activation" => (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "write")) || (isModEnabled("supplier_invoice") && $user->hasRight("supplier_invoice", "write")), // vs hooking "position" => 90, ), + array( + "url" => "/ticket/card.php?action=create&mainmenu=ticket", + "title" => "NewTicket@ticket", + "name" => "Ticket@ticket", + "picto" => "ticket", + "activation" => isModEnabled('ticket') && $user->hasRight("ticket", "write"), // vs hooking + "position" => 100, + ), + array( + "url" => "/fichinter/card.php?action=create&mainmenu=commercial", + "title" => "NewIntervention@interventions", + "name" => "Intervention@interventions", + "picto" => "intervention", + "activation" => isModEnabled('ficheinter') && $user->hasRight("ficheinter", "creer"), // vs hooking + "position" => 110, + ), array( "url" => "/product/card.php?action=create&type=0&mainmenu=products", "title" => "NewProduct@products", "name" => "Product@products", "picto" => "object_product", - "activation" => !empty($conf->product->enabled) && $user->rights->produit->creer, // vs hooking - "position" => 100, + "activation" => isModEnabled("product") && $user->hasRight("produit", "write"), // vs hooking + "position" => 400, ), array( "url" => "/product/card.php?action=create&type=1&mainmenu=products", "title" => "NewService@products", "name" => "Service@products", "picto" => "object_service", - "activation" => !empty($conf->service->enabled) && $user->rights->service->creer, // vs hooking - "position" => 110, + "activation" => isModEnabled("service") && $user->hasRight("service", "write"), // vs hooking + "position" => 410, ), array( "url" => "/user/card.php?action=create&type=1&mainmenu=home", "title" => "AddUser@users", "name" => "User@users", "picto" => "user", - "activation" => $user->rights->user->user->creer, // vs hooking + "activation" => $user->hasRight("user", "user", "write"), // vs hooking "position" => 500, ), ), @@ -2572,7 +2641,7 @@ function top_menu_bookmark() $html = ''; // Define $bookmarks - if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) { + if (!isModEnabled('bookmark') || empty($user->rights->bookmark->lire)) { return $html; } @@ -2973,7 +3042,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ } print ''; } @@ -3040,7 +3109,7 @@ function main_area($title = '') print '
    '; print ''."\n"; print ''."\n"; @@ -3273,7 +3342,7 @@ if (!function_exists("llxFooter")) { } // Wrapper to add log when clicking on download or preview - if (!empty($conf->blockedlog->enabled) && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) { + if (isModEnabled('blockedlog') && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) { if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture' print "\n\n"; ?> diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 5f8c7320cd1..3bb84086b1e 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -23,6 +23,7 @@ * \brief Page des marges par agent commercial */ +// Load Dolibarr environment 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'; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index e5f21b5095f..f3254c3a8dd 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -22,6 +22,7 @@ * \brief Page des marges par client */ +// Load Dolibarr environment 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'; diff --git a/htdocs/margin/index.php b/htdocs/margin/index.php index 0dcab7435f7..79595d5a8ee 100644 --- a/htdocs/margin/index.php +++ b/htdocs/margin/index.php @@ -22,11 +22,12 @@ * \brief Page d'index du module margin */ +// Load Dolibarr environment require '../main.inc.php'; if ($user->rights->produit->lire) { $page = 'productMargins'; -} elseif ($user->rights->societe->lire) { +} elseif ($user->hasRight('societe', 'lire')) { $page = 'customerMargins'; } else { $page = 'agentMargins'; diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 802541b98ca..710862b250c 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -71,7 +71,7 @@ function marges_prepare_head() $h++; } - if ($user->rights->societe->lire) { + if ($user->hasRight('societe', 'lire')) { $head[$h][0] = DOL_URL_ROOT."/margin/customerMargins.php"; $head[$h][1] = $langs->trans("CustomerMargins"); $head[$h][2] = 'customerMargins'; @@ -96,9 +96,10 @@ function marges_prepare_head() $head[$h][2] = 'checkMargins'; } - complete_head_from_modules($conf, $langs, null, $head, $h, 'margins', 'remove'); complete_head_from_modules($conf, $langs, null, $head, $h, 'margins'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'margins', 'remove'); + return $head; } diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 48e0d50cd4c..5b2a7593d42 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -23,6 +23,7 @@ * \brief Page des marges par produit */ +// Load Dolibarr environment 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'; diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index 93895b01e2f..107189e5181 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -21,6 +21,7 @@ * \brief Page des marges des factures clients pour un produit */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -73,7 +74,9 @@ if (empty($user->rights->margins->liretous)) { $invoicestatic = new Facture($db); $form = new Form($db); - +$totalMargin = 0; +$marginRate = 0; +$markRate = 0; if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); @@ -135,7 +138,7 @@ if ($id > 0 || !empty($ref)) { print dol_get_fiche_end(); - if ($user->rights->facture->lire) { + if ($user->hasRight("facture", "read")) { $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " f.rowid as facid, f.ref, f.total_ht,"; $sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,"; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index c69c0443e28..00188256619 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -21,6 +21,7 @@ * \brief Page for invoice margins of a thirdparty */ +// Load Dolibarr environment 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'; @@ -129,7 +130,7 @@ if ($socid > 0) { print ''; } - if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { + if (((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print ''; print ''; print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - - print ''; - print '
    '.$langs->trans("Label").'
    '.$langs->trans("Label").'label).'" autofocus>
    '.$langs->trans("AddIn").''; print $formecm->selectAllSections((GETPOST("catParent", 'alpha') ? GETPOST("catParent", 'alpha') : $ecmdir->fk_parent), 'catParent', $module); @@ -282,11 +283,10 @@ if (empty($action) || $action == 'delete_section') { // Actions buttons print '
    '; - if ($user->rights->ecm->setup) { - print ''.$langs->trans('Delete').''; - } else { - print ''.$langs->trans('Delete').''; - } + + // Delete + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', $user->rights->ecm->setup); + print '
    '; } diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index 930575d1778..e45175bb5c7 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -22,6 +22,7 @@ * \brief Card of a directory for ECM module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; @@ -89,21 +90,21 @@ if ($module == 'ecm') { } // Permissions -$permtoread = 0; -$permtoadd = 0; -$permtoupload = 0; +$permissiontoread = 0; +$permissiontoadd = 0; +$permissiontoupload = 0; if ($module == 'ecm') { - $permtoread = $user->rights->ecm->read; - $permtoadd = $user->rights->ecm->setup; - $permtoupload = $user->rights->ecm->upload; + $permissiontoread = $user->hasRight("ecm", "read"); + $permissiontoadd = $user->hasRight("ecm", "setup"); + $permissiontoupload = $user->hasRight("ecm", "upload"); } if ($module == 'medias') { - $permtoread = ($user->rights->mailing->lire || $user->rights->website->read); - $permtoadd = ($user->rights->mailing->creer || $user->rights->website->write); - $permtoupload = ($user->rights->mailing->creer || $user->rights->website->write); + $permissiontoread = ($user->hasRight("mailing", "lire") || $user->hasRight("website", "read")); + $permissiontoadd = ($user->hasRight("mailing", "creer") || $user->hasRight("website", "write")); + $permissiontoupload = ($user->hasRight("mailing", "creer") || $user->hasRight("website", "write")); } -if (!$permtoread) { +if (!$permissiontoread) { accessforbidden(); } @@ -113,7 +114,7 @@ if (!$permtoread) { */ // Upload file -if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC) && $permtoupload) { +if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC) && $permissiontoupload) { if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir."/".dol_unescapefile($_FILES['userfile']['name']), 0, 0, $_FILES['userfile']['error']); if (is_numeric($resupload) && $resupload > 0) { @@ -138,7 +139,7 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC) && $permtoupload } // Remove file -if ($action == 'confirm_deletefile' && $confirm == 'yes' && $permtoupload) { +if ($action == 'confirm_deletefile' && $confirm == 'yes' && $permissiontoupload) { $langs->load("other"); $file = $upload_dir."/".GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret = dol_delete_file($file); @@ -152,7 +153,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && $permtoupload) { } // Remove dir -if ($action == 'confirm_deletedir' && $confirm == 'yes' && $permtoupload) { +if ($action == 'confirm_deletedir' && $confirm == 'yes' && $permissiontoupload) { $backtourl = DOL_URL_ROOT."/ecm/index.php"; if ($module == 'medias') { $backtourl = DOL_URL_ROOT."/website/index.php?file_manager=1"; @@ -188,7 +189,7 @@ if ($action == 'confirm_deletedir' && $confirm == 'yes' && $permtoupload) { } // Update dirname or description -if ($action == 'update' && !GETPOST('cancel', 'alpha') && $permtoadd) { +if ($action == 'update' && !GETPOST('cancel', 'alpha') && $permissiontoadd) { $error = 0; if ($module == 'ecm') { @@ -453,41 +454,29 @@ print dol_get_fiche_end(); if ($action != 'edit' && $action != 'delete' && $action != 'deletefile') { print '
    '; - if ($permtoadd) { + if ($permissiontoadd) { print ''.$langs->trans('Edit').''; } - if ($permtoadd) { + if ($permissiontoadd) { print ''.$langs->trans('ECMAddSection').''; } else { print ''.$langs->trans('ECMAddSection').''; } - //if (count($filearrayall) == 0) - //{ - if ($permtoadd) { - print ''.$langs->trans('Delete').''; - } else { - print ''.$langs->trans('Delete').''; - } - /*} - else - { - if (count($filearray) > 0) - print ''.$langs->trans('Delete').''; - else - print ''.$langs->trans('Delete').''; - }*/ + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().($module ? '&module='.urlencode($module) : '').'§ion='.urlencode($section).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), '', $permissiontoadd); + print '
    '; } + // Confirm remove file if ($action == 'deletefile') { print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode(GETPOST("section", 'alpha')).'&urlfile='.urlencode(GETPOST("urlfile")).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); } -// Confirm remove file -if ($action == 'delete_dir') { +// Confirm remove dir +if ($action == 'delete' || $action == 'delete_dir') { $relativepathwithoutslash = preg_replace('/[\/]$/', '', $relativepath); //Form to close proposal (signed or not) diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index 624f8d6ddf0..e1443974bf7 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -21,6 +21,7 @@ * \brief Card of a file for ECM module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; @@ -102,11 +103,11 @@ if ($result < 0) { } // Permissions -$permtoread = $user->rights->ecm->read; -$permtoadd = $user->rights->ecm->setup; -$permtoupload = $user->rights->ecm->upload; +$permissiontoread = $user->rights->ecm->read; +$permissiontoadd = $user->rights->ecm->setup; +$permissiontoupload = $user->rights->ecm->upload; -if (!$permtoread) { +if (!$permissiontoread) { accessforbidden(); } @@ -127,7 +128,7 @@ if ($cancel) { } // Rename file -if ($action == 'update' && $permtoadd) { +if ($action == 'update' && $permissiontoadd) { $error = 0; $oldlabel = GETPOST('urlfile', 'alpha'); @@ -341,7 +342,7 @@ $rellink .= '&file='.urlencode($filepath); $fulllink = $urlwithroot.$rellink; print img_picto('', 'globe').' '; if ($action != 'edit') { - print ''; + print ''; } else { print $fulllink; } @@ -371,8 +372,8 @@ if (!empty($object->share)) { } $fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : ''); - //if (! empty($object->ref)) $fulllink.='&hashn='.$object->ref; // Hash of file path - //elseif (! empty($object->label)) $fulllink.='&hashc='.$object->label; // Hash of file content + //if (!empty($object->ref)) $fulllink.='&hashn='.$object->ref; // Hash of file path + //elseif (!empty($object->label)) $fulllink.='&hashc='.$object->label; // Hash of file content print img_picto('', 'globe').' '; if ($action != 'edit') { @@ -423,16 +424,9 @@ if ($action != 'edit') { if ($user->rights->ecm->setup) { print ''.$langs->trans('Edit').''; } - /* - if ($user->rights->ecm->setup) - { - print ''.$langs->trans('Delete').''; - } - else - { - print ''.$langs->trans('Delete').''; - } - */ + + //print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->rights->ecm->setup); + print ''; } diff --git a/htdocs/ecm/file_note.php b/htdocs/ecm/file_note.php index 53b120d3191..6804714757c 100644 --- a/htdocs/ecm/file_note.php +++ b/htdocs/ecm/file_note.php @@ -25,6 +25,7 @@ * \brief Tab for notes on an ECM file */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; @@ -107,9 +108,9 @@ if ($result < 0) { $permissionnote = $user->rights->ecm->setup; // Used by the include of actions_setnotes.inc.php -$permtoread = $user->rights->ecm->read; +$permissiontoread = $user->rights->ecm->read; -if (!$permtoread) { +if (!$permissiontoread) { accessforbidden(); } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index aec4b54bc6c..9eb512bc96d 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -24,6 +24,7 @@ * \brief Main page for ECM section area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; @@ -32,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; // Load translation files required by the page -$langs->loadLangs(array("ecm", "companies", "other", "users", "orders", "propal", "bills", "contracts")); +$langs->loadLangs(array('ecm', 'companies', 'other', 'users', 'orders', 'propal', 'bills', 'contracts')); // Get parameters $socid = GETPOST('socid', 'int'); @@ -327,6 +328,9 @@ print dol_get_fiche_head($head, 'index', '', -1, ''); // Add filemanager component $module = 'ecm'; +if (empty($url)) { + $url = DOL_URL_ROOT.'/ecm/index.php'; // Must be an url without param +} include DOL_DOCUMENT_ROOT.'/core/tpl/filemanager.tpl.php'; // End of page diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 90ce79be330..342d7d74129 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -23,6 +23,7 @@ * \brief Main page for ECM section area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; @@ -309,72 +310,72 @@ llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $m $rowspan = 0; $sectionauto = array(); if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { $langs->load("products"); - $rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(!empty($conf->product->enabled) || !empty($conf->service->enabled)), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); + $rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); } - if (!empty($conf->societe->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); + if (isModEnabled("societe")) { + $rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); } - if (!empty($conf->propal->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals"))); + if (isModEnabled("propal")) { + $rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>isModEnabled('propal'), 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals"))); } - if (!empty($conf->contrat->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>40, 'level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts"))); + if (isModEnabled('contrat')) { + $rowspan++; $sectionauto[] = array('position'=>40, 'level'=>1, 'module'=>'contract', 'test'=>isModEnabled('contrat'), 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts"))); } - if (!empty($conf->commande->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>50, 'level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled, 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders"))); + if (isModEnabled('commande')) { + $rowspan++; $sectionauto[] = array('position'=>50, 'level'=>1, 'module'=>'order', 'test'=>isModEnabled('commande'), 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders"))); } if (isModEnabled('facture')) { - $rowspan++; $sectionauto[] = array('position'=>60, 'level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices"))); + $rowspan++; $sectionauto[] = array('position'=>60, 'level'=>1, 'module'=>'invoice', 'test'=>isModEnabled('facture'), 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices"))); } - if (!empty($conf->supplier_proposal->enabled)) { + if (isModEnabled('supplier_proposal')) { $langs->load("supplier_proposal"); - $rowspan++; $sectionauto[] = array('position'=>70, 'level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals"))); + $rowspan++; $sectionauto[] = array('position'=>70, 'level'=>1, 'module'=>'supplier_proposal', 'test'=>isModEnabled('supplier_proposal'), 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals"))); } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>80, 'level'=>1, 'module'=>'order_supplier', 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders"))); + if (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order")) { + $rowspan++; $sectionauto[] = array('position'=>80, 'level'=>1, 'module'=>'order_supplier', 'test'=>(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order")), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders"))); } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>90, 'level'=>1, 'module'=>'invoice_supplier', 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)), 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierInvoices"))); + if (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_invoice")) { + $rowspan++; $sectionauto[] = array('position'=>90, 'level'=>1, 'module'=>'invoice_supplier', 'test'=>(isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_invoice")), 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierInvoices"))); } - if (!empty($conf->tax->enabled)) { + if (isModEnabled('tax')) { $langs->load("compta"); - $rowspan++; $sectionauto[] = array('position'=>100, 'level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions"))); - $rowspan++; $sectionauto[] = array('position'=>110, 'level'=>1, 'module'=>'tax-vat', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("VAT"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("VAT"))); + $rowspan++; $sectionauto[] = array('position'=>100, 'level'=>1, 'module'=>'tax', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions"))); + $rowspan++; $sectionauto[] = array('position'=>110, 'level'=>1, 'module'=>'tax-vat', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("VAT"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("VAT"))); } if (!empty($conf->salaries->enabled)) { $langs->load("compta"); - $rowspan++; $sectionauto[] = array('position'=>120, 'level'=>1, 'module'=>'salaries', 'test'=>$conf->salaries->enabled, 'label'=>$langs->trans("Salaries"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Salaries"))); + $rowspan++; $sectionauto[] = array('position'=>120, 'level'=>1, 'module'=>'salaries', 'test'=>isModEnabled('salaries'), 'label'=>$langs->trans("Salaries"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Salaries"))); } - if (!empty($conf->project->enabled)) { - $rowspan++; $sectionauto[] = array('position'=>130, 'level'=>1, 'module'=>'project', 'test'=>$conf->project->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects"))); - $rowspan++; $sectionauto[] = array('position'=>140, 'level'=>1, 'module'=>'project_task', 'test'=>$conf->project->enabled, 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks"))); + if (isModEnabled('project')) { + $rowspan++; $sectionauto[] = array('position'=>130, 'level'=>1, 'module'=>'project', 'test'=>isModEnabled('project'), 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects"))); + $rowspan++; $sectionauto[] = array('position'=>140, 'level'=>1, 'module'=>'project_task', 'test'=>isModEnabled('project'), 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks"))); } - if (!empty($conf->ficheinter->enabled)) { + if (isModEnabled('ficheinter')) { $langs->load("interventions"); - $rowspan++; $sectionauto[] = array('position'=>150, 'level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions"))); + $rowspan++; $sectionauto[] = array('position'=>150, 'level'=>1, 'module'=>'fichinter', 'test'=>isModEnabled('ficheinter'), 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions"))); } - if (!empty($conf->expensereport->enabled)) { + if (isModEnabled('expensereport')) { $langs->load("trips"); - $rowspan++; $sectionauto[] = array('position'=>160, 'level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports"))); + $rowspan++; $sectionauto[] = array('position'=>160, 'level'=>1, 'module'=>'expensereport', 'test'=>isModEnabled('expensereport'), 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports"))); } - if (!empty($conf->holiday->enabled)) { + if (isModEnabled('holiday')) { $langs->load("holiday"); - $rowspan++; $sectionauto[] = array('position'=>170, 'level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays"))); + $rowspan++; $sectionauto[] = array('position'=>170, 'level'=>1, 'module'=>'holiday', 'test'=>isModEnabled('holiday'), 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays"))); } - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $langs->load("banks"); - $rowspan++; $sectionauto[] = array('position'=>180, 'level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount"))); - $rowspan++; $sectionauto[] = array('position'=>190, 'level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt"))); + $rowspan++; $sectionauto[] = array('position'=>180, 'level'=>1, 'module'=>'banque', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount"))); + $rowspan++; $sectionauto[] = array('position'=>190, 'level'=>1, 'module'=>'chequereceipt', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt"))); } - if (!empty($conf->mrp->enabled)) { + if (isModEnabled('mrp')) { $langs->load("mrp"); - $rowspan++; $sectionauto[] = array('position'=>200, 'level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); + $rowspan++; $sectionauto[] = array('position'=>200, 'level'=>1, 'module'=>'mrp-mo', 'test'=>isModEnabled('mrp'), 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); } - if (!empty($conf->recruitment->enabled)) { + if (isModEnabled('recruitment')) { $langs->load("recruitment"); - $rowspan++; $sectionauto[] = array('position'=>210, 'level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications"))); + $rowspan++; $sectionauto[] = array('position'=>210, 'level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>isModEnabled('recruitment'), 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications"))); } $rowspan++; $sectionauto[] = array('position'=>220, 'level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Users"))); @@ -442,6 +443,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i', $act // Auto section if (count($sectionauto)) { $htmltooltip = $langs->trans("ECMAreaDesc2"); + $htmltooltip .= '
    '.$langs->trans("ECMAreaDesc2b"); $sectionauto = dol_sort_array($sectionauto, 'label', 'ASC', true, false); @@ -475,6 +477,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i', $act $htmltooltip .= ''.$langs->trans("Description").': '.$val['desc']; print $form->textwithpicto('', $htmltooltip, 1, 'info'); print ''; + print ''; $nbofentries++; diff --git a/htdocs/ecm/index_medias.php b/htdocs/ecm/index_medias.php new file mode 100644 index 00000000000..2e1edcdc269 --- /dev/null +++ b/htdocs/ecm/index_medias.php @@ -0,0 +1,314 @@ + + * Copyright (C) 2008-2010 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 . + * + * You can call this page with param module=medias to get a filemanager for medias. + */ + +/** + * \file htdocs/ecm/index_medias.php + * \ingroup ecm + * \brief Main page for ECM section of public media directories area + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('ecm', 'companies', 'other', 'users', 'orders', 'propal', 'bills', 'contracts')); + +// Get parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +$socid = GETPOST('socid', 'int'); +$file_manager = GETPOST('file_manager', 'alpha'); +$section = GETPOST('section', 'int') ? GETPOST('section', 'int') : GETPOST('section_id', 'int'); +if (!$section) { + $section = 0; +} +$section_dir = GETPOST('section_dir', 'alpha'); +$overwritefile = GETPOST('overwritefile', 'int'); + +if (empty($action) && $file_manager) { + $action = 'file_manager'; +} +$pageid = GETPOST('pageid', 'int'); + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} + + +$ecmdir = new EcmDirectory($db); +if ($section > 0) { + $result = $ecmdir->fetch($section); + if (!($result > 0)) { + dol_print_error($db, $ecmdir->error); + exit; + } +} + +$form = new Form($db); +$ecmdirstatic = new EcmDirectory($db); +$userstatic = new User($db); + +$error = 0; + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'ecm', 0); + +$permissiontouploadfile = ($user->hasRight('ecm', 'setup') || $user->hasRight('mailing', 'creer') || $user->hasRight('website', 'write')); +$diroutput = $conf->medias->multidir_output[$conf->entity]; + +$relativepath = $section_dir; +$upload_dir = preg_replace('/\/$/', '', $diroutput).'/'.preg_replace('/^\//', '', $relativepath); + +$websitekey = ''; + +$permissiontoadd = $permissiontouploadfile; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles + + +/* + * Actions + */ + +$savbacktopage = $backtopage; +$backtopage = $_SERVER["PHP_SELF"].'?file_manager=1&website='.urlencode($websitekey).'&pageid='.urlencode($pageid).(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : ''); // used after a confirm_deletefile into actions_linkedfiles.inc.php +if ($sortfield) { + $backtopage .= '&sortfield='.urlencode($sortfield); +} +if ($sortorder) { + $backtopage .= '&sortorder='.urlencode($sortorder); +} +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. + +$backtopage = $savbacktopage; + +if ($action == 'renamefile') { // Must be after include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; If action were renamefile, we set it to 'file_manager' + $action = 'file_manager'; +} + + +// Add directory +if ($action == 'add' && $permissiontouploadfile) { + $ecmdir->ref = 'NOTUSEDYET'; + $ecmdir->label = GETPOST("label"); + $ecmdir->description = GETPOST("desc"); + + $id = $ecmdir->create($user); + if ($id > 0) { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + setEventMessages('Error '.$langs->trans($ecmdir->error), null, 'errors'); + $action = "create"; + } + + clearstatcache(); +} + +// Remove directory +if ($action == 'confirm_deletesection' && GETPOST('confirm', 'alpha') == 'yes') { + $result = $ecmdir->delete($user); + setEventMessages($langs->trans("ECMSectionWasRemoved", $ecmdir->label), null, 'mesgs'); + + clearstatcache(); +} + +// Refresh directory view +// This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized. +// To refresh content of dir with cache, just open the dir in edit mode. +if ($action == 'refreshmanual') { + $ecmdirtmp = new EcmDirectory($db); + + // This part of code is same than into file ecm/ajax/ecmdatabase.php TODO Remove duplicate + clearstatcache(); + + $diroutputslash = str_replace('\\', '/', $conf->ecm->dir_output); + $diroutputslash .= '/'; + + // Scan directory tree on disk + $disktree = dol_dir_list($conf->ecm->dir_output, 'directories', 1, '', '^temp$', '', '', 0); + + // Scan directory tree in database + $sqltree = $ecmdirstatic->get_full_arbo(0); + + $adirwascreated = 0; + + // Now we compare both trees to complete missing trees into database + //var_dump($disktree); + //var_dump($sqltree); + foreach ($disktree as $dirdesc) { // Loop on tree onto disk + $dirisindatabase = 0; + foreach ($sqltree as $dirsqldesc) { + if ($conf->ecm->dir_output.'/'.$dirsqldesc['fullrelativename'] == $dirdesc['fullname']) { + $dirisindatabase = 1; + break; + } + } + + if (!$dirisindatabase) { + $txt = "Directory found on disk ".$dirdesc['fullname'].", not found into database so we add it"; + dol_syslog($txt); + //print $txt."
    \n"; + + // We must first find the fk_parent of directory to create $dirdesc['fullname'] + $fk_parent = -1; + $relativepathmissing = str_replace($diroutputslash, '', $dirdesc['fullname']); + $relativepathtosearchparent = $relativepathmissing; + //dol_syslog("Try to find parent id for directory ".$relativepathtosearchparent); + if (preg_match('/\//', $relativepathtosearchparent)) { + //while (preg_match('/\//',$relativepathtosearchparent)) + $relativepathtosearchparent = preg_replace('/\/[^\/]*$/', '', $relativepathtosearchparent); + $txt = "Is relative parent path ".$relativepathtosearchparent." for ".$relativepathmissing." found in sql tree ?"; + dol_syslog($txt); + //print $txt." -> "; + $parentdirisindatabase = 0; + foreach ($sqltree as $dirsqldesc) { + if ($dirsqldesc['fullrelativename'] == $relativepathtosearchparent) { + $parentdirisindatabase = $dirsqldesc['id']; + break; + } + } + if ($parentdirisindatabase > 0) { + dol_syslog("Yes with id ".$parentdirisindatabase); + //print "Yes with id ".$parentdirisindatabase."
    \n"; + $fk_parent = $parentdirisindatabase; + //break; // We found parent, we can stop the while loop + } else { + dol_syslog("No"); + //print "No
    \n"; + } + } else { + dol_syslog("Parent is root"); + $fk_parent = 0; // Parent is root + } + + if ($fk_parent >= 0) { + $ecmdirtmp->ref = 'NOTUSEDYET'; + $ecmdirtmp->label = dol_basename($dirdesc['fullname']); + $ecmdirtmp->description = ''; + $ecmdirtmp->fk_parent = $fk_parent; + + $txt = "We create directory ".$ecmdirtmp->label." with parent ".$fk_parent; + dol_syslog($txt); + //print $ecmdirtmp->cachenbofdoc."
    \n";exit; + $id = $ecmdirtmp->create($user); + if ($id > 0) { + $newdirsql = array('id'=>$id, + 'id_mere'=>$ecmdirtmp->fk_parent, + 'label'=>$ecmdirtmp->label, + 'description'=>$ecmdirtmp->description, + 'fullrelativename'=>$relativepathmissing); + $sqltree[] = $newdirsql; // We complete fulltree for following loops + //var_dump($sqltree); + $adirwascreated = 1; + } else { + dol_syslog("Failed to create directory ".$ecmdirtmp->label, LOG_ERR); + } + } else { + $txt = "Parent of ".$dirdesc['fullname']." not found"; + dol_syslog($txt); + //print $txt."
    \n"; + } + } + } + + // Loop now on each sql tree to check if dir exists + foreach ($sqltree as $dirdesc) { // Loop on each sqltree to check dir is on disk + $dirtotest = $conf->ecm->dir_output.'/'.$dirdesc['fullrelativename']; + if (!dol_is_dir($dirtotest)) { + $ecmdirtmp->id = $dirdesc['id']; + $ecmdirtmp->delete($user, 'databaseonly'); + //exit; + } + } + + $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown" + dol_syslog("sql = ".$sql); + $db->query($sql); + + // If a directory was added, the fulltree array is not correctly completed and sorted, so we clean + // it to be sure that fulltree array is not used without reloading it. + if ($adirwascreated) { + $sqltree = null; + } +} + + + +/* + * View + */ + +// Define height of file area (depends on $_SESSION["dol_screenheight"]) +//print $_SESSION["dol_screenheight"]; +$maxheightwin = (isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 466) ? ($_SESSION["dol_screenheight"] - 136) : 660; // Also into index_auto.php file + +$moreheadcss = ''; +$moreheadjs = ''; + +//$morejs=array(); +$morejs = array('includes/jquery/plugins/blockUI/jquery.blockUI.js', 'core/js/blockUI.js'); // Used by ecm/tpl/enabledfiletreeajax.tpl.pgp +if (empty($conf->global->MAIN_ECM_DISABLE_JS)) { + $morejs[] = "includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js"; +} + +$moreheadjs .= ''."\n"; + +llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0); + +$head = ecm_prepare_dasboard_head(''); +print dol_get_fiche_head($head, 'index_medias', '', -1, ''); + + +// Add filemanager component +$module = 'medias'; +if (empty($url)) { + $url = DOL_URL_ROOT.'/ecm/index_medias.php'; // Must be an url without param +} +include DOL_DOCUMENT_ROOT.'/core/tpl/filemanager.tpl.php'; + +// End of page +print dol_get_fiche_end(); + +llxFooter(); + +$db->close(); diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index f348e0835e7..e37a1ce88f3 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -22,6 +22,7 @@ * \brief Page to make advanced search into ECM */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; @@ -84,9 +85,9 @@ if (!empty($section)) { } } -$permtoread = $user->rights->ecm->read; +$permissiontoread = $user->rights->ecm->read; -if (!$permtoread) { +if (!$permissiontoread) { accessforbidden(); } @@ -113,56 +114,56 @@ $userstatic = new User($db); // Ajout rubriques automatiques $rowspan = 0; $sectionauto = array(); -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - $langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(!empty($conf->product->enabled) || !empty($conf->service->enabled)), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); +if (isModEnabled("product") || isModEnabled("service")) { + $langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); } -if (!empty($conf->societe->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); +if (isModEnabled("societe")) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties"))); } -if (!empty($conf->propal->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals"))); +if (isModEnabled("propal")) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>isModEnabled('propal'), 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals"))); } -if (!empty($conf->contrat->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts"))); +if (isModEnabled('contrat')) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'contract', 'test'=>isModEnabled('contrat'), 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts"))); } -if (!empty($conf->commande->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled, 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders"))); +if (isModEnabled('commande')) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order', 'test'=>isModEnabled('commande'), 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Orders"))); } if (isModEnabled('facture')) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices"))); + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice', 'test'=>isModEnabled('facture'), 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices"))); } -if (!empty($conf->supplier_proposal->enabled)) { - $langs->load("supplier_proposal"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals"))); +if (isModEnabled('supplier_proposal')) { + $langs->load("supplier_proposal"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'supplier_proposal', 'test'=>isModEnabled('supplier_proposal'), 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals"))); } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order_supplier', 'test'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders"))); +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'order_supplier', 'test'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")), 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("PurchaseOrders"))); } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice_supplier', 'test'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)), 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierInvoices"))); +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice_supplier', 'test'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")), 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierInvoices"))); } -if (!empty($conf->tax->enabled)) { - $langs->load("compta"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions"))); +if (isModEnabled('tax')) { + $langs->load("compta"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'tax', 'test'=>isModEnabled('tax'), 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SocialContributions"))); } -if (!empty($conf->project->enabled)) { - $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>$conf->project->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects"))); +if (isModEnabled('project')) { + $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>isModEnabled('project'), 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects"))); } -if (!empty($conf->ficheinter->enabled)) { - $langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions"))); +if (isModEnabled('ficheinter')) { + $langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>isModEnabled('ficheinter'), 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions"))); } -if (!empty($conf->expensereport->enabled)) { - $langs->load("trips"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports"))); +if (isModEnabled('expensereport')) { + $langs->load("trips"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'expensereport', 'test'=>isModEnabled('expensereport'), 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ExpenseReports"))); } -if (!empty($conf->holiday->enabled)) { - $langs->load("holiday"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays"))); +if (isModEnabled('holiday')) { + $langs->load("holiday"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'holiday', 'test'=>isModEnabled('holiday'), 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Holidays"))); } -if (!empty($conf->banque->enabled)) { - $langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount"))); +if (isModEnabled("banque")) { + $langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount"))); } -if (!empty($conf->mrp->enabled)) { - $langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); +if (isModEnabled('mrp')) { + $langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>isModEnabled('mrp'), 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); } -if (!empty($conf->recruitment->enabled)) { - $langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications"))); +if (isModEnabled('recruitment')) { + $langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>isModEnabled('recruitment'), 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications"))); } @@ -171,9 +172,6 @@ if (!empty($conf->recruitment->enabled)) { //*********************** print load_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("Search")); -//print $langs->trans("ECMAreaDesc")."
    "; -//print $langs->trans("ECMAreaDesc2")."
    "; -//print "
    \n"; print $langs->trans("FeatureNotYetAvailable").'.

    '; // Tool bar diff --git a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php index 1f5e52e4577..a7e601bf053 100644 --- a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php +++ b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php @@ -24,6 +24,7 @@ if (empty($conf) || !is_object($conf)) { print "Error, template enablefiletreeajax.tpl.php can't be called as URL"; exit; } +// Must have set $module, $nameforformuserfile, $preopened ?> @@ -57,7 +58,7 @@ $(document).ready(function() { multiFolder: false }, // Called if we click on a file (not a dir) function(file) { - console.log("We click on a file"); + console.log("We click on a file "+file); $("#mesg").hide(); loadandshowpreview(file,0); }, @@ -65,7 +66,7 @@ $(document).ready(function() { function(elem) { id=elem.attr('id').substr(12); // We get id that is 'fmdirlia_id_xxx' (id we want is xxx) rel=elem.attr('rel') - console.log("We click on a dir, we call the ajaxdirtree.php with modulepart=, param="); + console.log("We click on a dir id="+id+", we call the ajaxdirtree.php with modulepart=, param="); console.log("We also save id and dir name into _section_id|dir (vars into form to attach new file in filemanager.tpl.php) with id="+id+" and rel="+rel); jQuery("#_section_dir").val(rel); jQuery("#_section_id").val(id); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1c8c0b8698f..8d72666ad53 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -16,31 +16,44 @@ */ /** - * \file emailcollector/class/emailcollector.class.php - * \ingroup emailcollector - * \brief This file is a CRUD class file for EmailCollector (Create/Read/Update/Delete) + * \file htdocs/emailcollector/class/emailcollector.class.php + * \ingroup emailcollector + * \brief This file is a CRUD class file for EmailCollector (Create/Read/Update/Delete) */ // Put here all includes required by your class file -require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; -require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; +include_once DOL_DOCUMENT_ROOT .'/emailcollector/lib/emailcollector.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; // customer proposal -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; // customer order -require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Shipment -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // supplier invoice -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // supplier order -require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // supplier proposal -require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; // reception -include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; -//require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; // Holidays (leave request) -//require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // expernse report +require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; + +require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; // Customer Proposal +require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; // Sale Order +require_once DOL_DOCUMENT_ROOT .'/compta/facture/class/facture.class.php'; // Customer Invoice +require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; // Contact / Address +require_once DOL_DOCUMENT_ROOT .'/expedition/class/expedition.class.php'; // Shipping / Delivery +require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.commande.class.php'; // Purchase Order +require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice +require_once DOL_DOCUMENT_ROOT .'/projet/class/project.class.php'; // Project +require_once DOL_DOCUMENT_ROOT .'/reception/class/reception.class.php'; // Reception +require_once DOL_DOCUMENT_ROOT .'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting +require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; // Third-Party +require_once DOL_DOCUMENT_ROOT .'/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal +require_once DOL_DOCUMENT_ROOT .'/ticket/class/ticket.class.php'; // Ticket +//require_once DOL_DOCUMENT_ROOT .'/expensereport/class/expensereport.class.php'; // Expense Report +//require_once DOL_DOCUMENT_ROOT .'/holiday/class/holiday.class.php'; // Holidays (leave request) + + +// use Webklex\PHPIMAP; +require DOL_DOCUMENT_ROOT .'/includes/webklex/php-imap/vendor/autoload.php'; + +use Webklex\PHPIMAP\ClientManager; +use Webklex\PHPIMAP\Exceptions\ConnectionFailedException; +use Webklex\PHPIMAP\Exceptions\InvalidWhereQueryCriteriaException; +use Webklex\PHPIMAP\Exceptions\GetMessagesFailedException; + +use OAuth\Common\Storage\DoliStorage; +use OAuth\Common\Consumer\Credentials; /** @@ -52,14 +65,17 @@ class EmailCollector extends CommonObject * @var string ID to identify managed object */ public $element = 'emailcollector'; + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'emailcollector_emailcollector'; + /** * @var int Does emailcollector support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; + /** * @var int Does emailcollector support extrafields ? 0=No, 1=Yes */ @@ -79,6 +95,7 @@ class EmailCollector extends CommonObject * @var array List of child tables. To test if we can delete object. */ protected $childtables = array(); + /** * @var array List of child tables. To know object to delete on cascade. */ @@ -114,11 +131,14 @@ class EmailCollector extends CommonObject 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'help'=>'Example: MyCollector1', 'csslist'=>'tdoverflowmax150'), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector', 'csslist'=>'tdoverflowmax150'), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1, 'csslist'=>'small'), - 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflow125'), - 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'), - 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), - 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), - 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), + 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflowmax125'), + 'port' => array('type'=>'varchar(10)', 'label'=>'EMailHostPort', 'visible'=>1, 'enabled'=>1, 'position'=>91, 'notnull'=>1, 'searchall'=>0, 'comment'=>"IMAP server port", 'help'=>'Example: 993', 'csslist'=>'tdoverflowmax50', 'default'=>'993'), + 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)', 'default'=>'UTF-8'), + 'acces_type' => array('type'=>'integer', 'label'=>'accessType', 'visible'=>-1, 'enabled'=>"getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login type", 'arrayofkeyval'=>array('0'=>'loginPassword', '1'=>'oauthToken'), 'default'=>'0', 'help'=>''), + 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), + 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>"1", 'position'=>103, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), + 'oauth_service' => array('type'=>'varchar(128)', 'label'=>'oauthService', 'visible'=>-1, 'enabled'=>"getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP')", 'position'=>104, 'notnull'=>0, 'index'=>1, 'comment'=>"IMAP login oauthService", 'arrayofkeyval'=>array(), 'help'=>'TokenMustHaveBeenCreated'), + 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>104, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), //'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105), //'actiontodo' => array('type'=>'varchar(255)', 'label'=>'ActionToDo', 'visible'=>1, 'enabled'=>1, 'position'=>106), 'target_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxTargetDirectory', 'visible'=>1, 'enabled'=>1, 'position'=>110, 'notnull'=>0, 'help'=>"EmailCollectorTargetDir"), @@ -191,11 +211,13 @@ class EmailCollector extends CommonObject */ public $import_key; - public $host; + public $port; public $hostcharset; public $login; public $password; + public $acces_type; + public $oauth_service; public $source_directory; public $target_directory; public $maxemailpercollect; @@ -233,10 +255,31 @@ class EmailCollector extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } + // List of oauth services + $oauthservices = array(); + + foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $key = preg_replace('/^OAUTH_/', '', $key); + $key = preg_replace('/_ID$/', '', $key); + if (preg_match('/^.*-/', $key)) { + $name = preg_replace('/^.*-/', '', $key); + } else { + $name = $langs->trans("NoName"); + } + $provider = preg_replace('/-.*$/', '', $key); + $provider = ucfirst(strtolower($provider)); + + $oauthservices[$key] = $name." (".$provider.")"; + } + } + + $this->fields['oauth_service']['arrayofkeyval'] = $oauthservices; + // Unset fields that are disabled foreach ($this->fields as $key => $val) { if (isset($val['enabled']) && empty($val['enabled'])) { @@ -272,8 +315,13 @@ class EmailCollector extends CommonObject return -1; } + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $this->password = dolEncrypt($this->password); + $id = $this->createCommon($user, $notrigger); + $this->password = dolDecrypt($this->password); + if (is_array($this->filters) && count($this->filters)) { $emailcollectorfilter = new EmailCollectorFilter($this->db); @@ -332,6 +380,7 @@ class EmailCollector extends CommonObject unset($object->id); unset($object->fk_user_creat); unset($object->import_key); + unset($object->password); // Clear fields $object->ref = "copy_of_".$object->ref; @@ -383,7 +432,11 @@ class EmailCollector extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $this->password = dolDecrypt($this->password); + + //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } @@ -478,7 +531,14 @@ class EmailCollector extends CommonObject return -1; } - return $this->updateCommon($user, $notrigger); + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $this->password = dolEncrypt($this->password); + + $result = $this->updateCommon($user, $notrigger); + + $this->password = dolDecrypt($this->password); + + return $result; } /** @@ -746,7 +806,7 @@ class EmailCollector extends CommonObject $flags .= '/authuser='.$partofauth[0].'/user='.$partofauth[1]; } - $connectstringserver = '{'.$this->host.':993'.$flags.'}'; + $connectstringserver = '{'.$this->host.':'.$this->port.$flags.'}'; return $connectstringserver; } @@ -795,7 +855,7 @@ class EmailCollector extends CommonObject // Loop on each collector foreach ($arrayofcollectors as $emailcollector) { - $result = $emailcollector->doCollectOneCollector(); + $result = $emailcollector->doCollectOneCollector(0); dol_syslog("doCollect result = ".$result." for emailcollector->id = ".$emailcollector->id); $this->error .= 'EmailCollector ID '.$emailcollector->id.':'.$emailcollector->error.'
    '; @@ -816,9 +876,10 @@ class EmailCollector extends CommonObject * @param string $messagetext Body * @param string $subject Subject * @param string $header Header + * @param string $operationslog String with logs of operations done * @return int 0=OK, Nb of error if error */ - private function overwritePropertiesOfObject(&$object, $actionparam, $messagetext, $subject, $header) + private function overwritePropertiesOfObject(&$object, $actionparam, $messagetext, $subject, $header, &$operationslog) { $errorforthisaction = 0; @@ -853,6 +914,7 @@ class EmailCollector extends CommonObject $sourcefield = $regforregex[1]; $regexstring = $regforregex[2]; } + if (!empty($sourcefield) && !empty($regexstring)) { if (strtolower($sourcefield) == 'body') { $sourcestring = $messagetext; @@ -874,7 +936,6 @@ class EmailCollector extends CommonObject //var_dump($tmpproperty.' - '.$regexstring.' - '.$regexoptions.' - '.$sourcestring); if (preg_match('/'.$regexstring.'/'.$regexoptions, $sourcestring, $regforval)) { - //var_dump($regforval[count($regforval)-1]);exit; // Overwrite param $tmpproperty $valueextracted = isset($regforval[count($regforval) - 1]) ?trim($regforval[count($regforval) - 1]) : null; if (strtolower($sourcefield) == 'header') { @@ -890,9 +951,16 @@ class EmailCollector extends CommonObject $object->$tmpproperty = $this->decodeSMTPSubject($valueextracted); } } + if (preg_match('/^options_/', $tmpproperty)) { + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/'.dol_escape_htmltag($regexoptions).' into '.strtolower($sourcefield).' -> found '.dol_escape_htmltag(dol_trunc($object->array_options[preg_replace('/^options_/', '', $tmpproperty)], 128)); + } else { + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/'.dol_escape_htmltag($regexoptions).' into '.strtolower($sourcefield).' -> found '.dol_escape_htmltag(dol_trunc($object->$tmpproperty, 128)); + } } else { // Regex not found $object->$tmpproperty = null; + + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/'.dol_escape_htmltag($regexoptions).' into '.strtolower($sourcefield).' -> not found, so property '.dol_escape_htmltag($tmpproperty).' is set to null.'; } } else { // Nothing can be done for this param @@ -930,6 +998,8 @@ class EmailCollector extends CommonObject } else { $object->$tmpproperty = $valuetouse; } + + $operationslog .= '
    Set value '.dol_escape_htmltag($valuetouse).' into variable '.dol_escape_htmltag($tmpproperty); } } else { $errorforthisaction++; @@ -945,11 +1015,12 @@ class EmailCollector extends CommonObject /** * Execute collect for current collector loaded previously with fetch. * - * @return int <0 if KO, >0 if OK + * @param int $mode 0=Mode production, 1=Mode test (read IMAP and try SQL update then rollback), 2=Mode test with no SQL updates + * @return int <0 if KO, >0 if OK */ - public function doCollectOneCollector() + public function doCollectOneCollector($mode = 0) { - global $conf, $langs, $user; + global $db, $conf, $langs, $user; global $hookmanager; //$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log'; @@ -963,9 +1034,19 @@ class EmailCollector extends CommonObject $error = 0; $this->output = ''; $this->error = ''; + $this->debuginfo = ''; + + $search = ''; + $searchhead = ''; + $searchfilterdoltrackid = 0; + $searchfilternodoltrackid = 0; + $searchfilterisanswer = 0; + $searchfilterisnotanswer = 0; + $operationslog = ''; $now = dol_now(); + if (empty($this->host)) { $this->error = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('EMailHost')); return -1; @@ -978,149 +1059,375 @@ class EmailCollector extends CommonObject $this->error = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('MailboxSourceDirectory')); return -1; } - if (!function_exists('imap_open')) { - $this->error = 'IMAP function not enabled on your PHP'; - return -2; - } $this->fetchFilters(); $this->fetchActions(); - $sourcedir = $this->source_directory; - $targetdir = ($this->target_directory ? $this->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + if ($this->acces_type == 1) { + // Mode OAUth2 with PHP-IMAP + require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; // define $supportedoauth2array + $keyforsupportedoauth2array = $this->oauth_service; + if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { + $keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array); + } else { + $keyforprovider = ''; + } + $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - $connectstringserver = $this->getConnectStringIMAP(); - $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); - $connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); + $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); - $connection = imap_open($connectstringsource, $this->login, $this->password); - if (!$connection) { - $this->error = 'Failed to open IMAP connection '.$connectstringsource; - return -3; - } - imap_errors(); // Clear stack of errors. + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; + //$debugtext = "Host: ".$this->host."
    Port: ".$this->port."
    Login: ".$this->login."
    Password: ".$this->password."
    access type: ".$this->acces_type."
    oauth service: ".$this->oauth_service."
    Max email per collect: ".$this->maxemailpercollect; + //dol_syslog($debugtext); - $host = dol_getprefix('email'); - //$host = '123456'; + $storage = new DoliStorage($db, $conf); - // Define the IMAP search string - // See https://tools.ietf.org/html/rfc3501#section-6.4.4 for IMAPv4 (PHP not yet compatible) - // See https://tools.ietf.org/html/rfc1064 page 13 for IMAPv2 - //$search='ALL'; - $search = 'UNDELETED'; // Seems not supported by some servers - $searchhead = ''; - $searchfilterdoltrackid = 0; - $searchfilternodoltrackid = 0; - $searchfilterisanswer = 0; - $searchfilterisnotanswer = 0; - foreach ($this->filters as $rule) { - if (empty($rule['status'])) { - continue; + try { + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + $expire = true; + // Is token expired or will token expire in the next 30 seconds + // if (is_object($tokenobj)) { + // $expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30)); + // } + // Token expired so we refresh it + if (is_object($tokenobj) && $expire) { + $credentials = new Credentials( + getDolGlobalString('OAUTH_'.$this->oauth_service.'_ID'), + getDolGlobalString('OAUTH_'.$this->oauth_service.'_SECRET'), + getDolGlobalString('OAUTH_'.$this->oauth_service.'_URLAUTHORIZE') + ); + $serviceFactory = new \OAuth\ServiceFactory(); + $oauthname = explode('-', $OAUTH_SERVICENAME); + // ex service is Google-Emails we need only the first part Google + $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); + // We have to save the token because Google give it only once + $refreshtoken = $tokenobj->getRefreshToken(); + $tokenobj = $apiService->refreshAccessToken($tokenobj); + $tokenobj->setRefreshToken($refreshtoken); + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + } + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + if (is_object($tokenobj)) { + $token = $tokenobj->getAccessToken(); + } else { + $this->error = "Token not found"; + return -1; + } + } catch (Exception $e) { + // Return an error if token not found + $this->error = $e->getMessage(); + dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); + return -1; + } + + + $cm = new ClientManager(); + $client = $cm->make([ + 'host' => $this->host, + 'port' => $this->port, + 'encryption' => 'ssl', + 'validate_cert' => true, + 'protocol' => 'imap', + 'username' => $this->login, + 'password' => $token, + 'authentication' => "oauth", + ]); + } else { + // Mode login/pass with PHP-IMAP + $cm = new ClientManager(); + $client = $cm->make([ + 'host' => $this->host, + 'port' => $this->port, + 'encryption' => 'ssl', + 'validate_cert' => true, + 'protocol' => 'imap', + 'username' => $this->login, + 'password' => $this->password, + 'authentication' => "login", + ]); } - if ($rule['type'] == 'to') { - $tmprulevaluearray = explode('*', $rule['rulevalue']); - if (count($tmprulevaluearray) >= 2) { - foreach ($tmprulevaluearray as $tmprulevalue) { - $search .= ($search ? ' ' : '').'TO "'.str_replace('"', '', $tmprulevalue).'"'; + try { + $client->connect(); + } catch (ConnectionFailedException $e) { + $this->error = $e->getMessage(); + $this->errors[] = $this->error; + dol_syslog("EmailCollector::doCollectOneCollector ".$this->error, LOG_ERR); + return -1; + } + + $host = dol_getprefix('email'); + } else { + // Use native IMAP functions + if (!function_exists('imap_open')) { + $this->error = 'IMAP function not enabled on your PHP'; + return -2; + } + $sourcedir = $this->source_directory; + $targetdir = ($this->target_directory ? $this->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' + + $connectstringserver = $this->getConnectStringIMAP(); + $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); + $connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); + + $connection = imap_open($connectstringsource, $this->login, $this->password); + if (!$connection) { + $this->error = 'Failed to open IMAP connection '.$connectstringsource.' '.imap_last_error(); + return -3; + } + imap_errors(); // Clear stack of errors. + + $host = dol_getprefix('email'); + //$host = '123456'; + + // Define the IMAP search string + // See https://tools.ietf.org/html/rfc3501#section-6.4.4 for IMAPv4 (PHP not yet compatible) + // See https://tools.ietf.org/html/rfc1064 page 13 for IMAPv2 + //$search='ALL'; + } + + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + $criteria = array(array('UNDELETED')); // Seems not supported by some servers + foreach ($this->filters as $rule) { + if (empty($rule['status'])) { + continue; + } + if ($rule['type'] == 'to') { + $tmprulevaluearray = explode('*', $rule['rulevalue']); + if (count($tmprulevaluearray) >= 2) { + foreach ($tmprulevaluearray as $tmprulevalue) { + array_push($criteria, array("TO" => $tmprulevalue)); + } + } else { + array_push($criteria, array("TO" => $rule['rulevalue'])); } - } else { - $search .= ($search ? ' ' : '').'TO "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'bcc') { + array_push($criteria, array("BCC" => $rule['rulevalue'])); + } + if ($rule['type'] == 'cc') { + array_push($criteria, array("CC" => $rule['rulevalue'])); + } + if ($rule['type'] == 'from') { + array_push($criteria, array("FROM" => $rule['rulevalue'])); + } + if ($rule['type'] == 'subject') { + array_push($criteria, array("SUBJECT" => $rule['rulevalue'])); + } + if ($rule['type'] == 'body') { + array_push($criteria, array("BODY" => $rule['rulevalue'])); + } + if ($rule['type'] == 'header') { + array_push($criteria, array("HEADER" => $rule['rulevalue'])); + } + + if ($rule['type'] == 'notinsubject') { + array_push($criteria, array("SUBJECT NOT" => $rule['rulevalue'])); + } + if ($rule['type'] == 'notinbody') { + array_push($criteria, array("BODY NOT" => $rule['rulevalue'])); + } + + if ($rule['type'] == 'seen') { + array_push($criteria, array("SEEN")); + } + if ($rule['type'] == 'unseen') { + array_push($criteria, array("UNSEEN")); + } + if ($rule['type'] == 'unanswered') { + array_push($criteria, array("UNANSWERED")); + } + if ($rule['type'] == 'answered') { + array_push($criteria, array("ANSWERED")); + } + if ($rule['type'] == 'smaller') { + array_push($criteria, array("SMALLER")); + } + if ($rule['type'] == 'larger') { + array_push($criteria, array("LARGER")); + } + + // Rules to filter after the search imap + if ($rule['type'] == 'withtrackingidinmsgid') { + $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withouttrackingidinmsgid') { + $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withtrackingid') { + $searchfilterdoltrackid++; $searchhead .= '/References.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withouttrackingid') { + $searchfilternodoltrackid++; $searchhead .= '! /References.*@'.preg_quote($host, '/').'/'; + } + + if ($rule['type'] == 'isanswer') { + $searchfilterisanswer++; $searchhead .= '/References.*@.*/'; + } + if ($rule['type'] == 'isnotanswer') { + $searchfilterisnotanswer++; $searchhead .= '! /References.*@.*/'; } } - if ($rule['type'] == 'bcc') { - $search .= ($search ? ' ' : '').'BCC'; - } - if ($rule['type'] == 'cc') { - $search .= ($search ? ' ' : '').'CC'; - } - if ($rule['type'] == 'from') { - $search .= ($search ? ' ' : '').'FROM "'.str_replace('"', '', $rule['rulevalue']).'"'; - } - if ($rule['type'] == 'subject') { - $search .= ($search ? ' ' : '').'SUBJECT "'.str_replace('"', '', $rule['rulevalue']).'"'; - } - if ($rule['type'] == 'body') { - $search .= ($search ? ' ' : '').'BODY "'.str_replace('"', '', $rule['rulevalue']).'"'; - } - if ($rule['type'] == 'header') { - $search .= ($search ? ' ' : '').'HEADER '.$rule['rulevalue']; + + if (empty($targetdir)) { // Use last date as filter if there is no targetdir defined. + $fromdate = 0; + if ($this->datelastok) { + $fromdate = $this->datelastok; + } + if ($fromdate > 0) { + // $search .= ($search ? ' ' : '').'SINCE '.date('j-M-Y', $fromdate - 1); // SENTSINCE not supported. Date must be X-Abc-9999 (X on 1 digit if < 10) + array_push($criteria, array("SINCE" => date('j-M-Y', $fromdate - 1))); + } + //$search.=($search?' ':'').'SINCE 8-Apr-2022'; } - if ($rule['type'] == 'notinsubject') { - $search .= ($search ? ' ' : '').'SUBJECT NOT "'.str_replace('"', '', $rule['rulevalue']).'"'; - } - if ($rule['type'] == 'notinbody') { - $search .= ($search ? ' ' : '').'BODY NOT "'.str_replace('"', '', $rule['rulevalue']).'"'; + dol_syslog("IMAP search string = ".var_export($criteria, true)); + $search = var_export($criteria, true); + } else { + $search = 'UNDELETED'; // Seems not supported by some servers + foreach ($this->filters as $rule) { + if (empty($rule['status'])) { + continue; + } + + if ($rule['type'] == 'to') { + $tmprulevaluearray = explode('*', $rule['rulevalue']); + if (count($tmprulevaluearray) >= 2) { + foreach ($tmprulevaluearray as $tmprulevalue) { + $search .= ($search ? ' ' : '').'TO "'.str_replace('"', '', $tmprulevalue).'"'; + } + } else { + $search .= ($search ? ' ' : '').'TO "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + } + if ($rule['type'] == 'bcc') { + $search .= ($search ? ' ' : '').'BCC'; + } + if ($rule['type'] == 'cc') { + $search .= ($search ? ' ' : '').'CC'; + } + if ($rule['type'] == 'from') { + $search .= ($search ? ' ' : '').'FROM "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'subject') { + $search .= ($search ? ' ' : '').'SUBJECT "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'body') { + $search .= ($search ? ' ' : '').'BODY "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'header') { + $search .= ($search ? ' ' : '').'HEADER '.$rule['rulevalue']; + } + + if ($rule['type'] == 'notinsubject') { + $search .= ($search ? ' ' : '').'SUBJECT NOT "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'notinbody') { + $search .= ($search ? ' ' : '').'BODY NOT "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + + if ($rule['type'] == 'seen') { + $search .= ($search ? ' ' : '').'SEEN'; + } + if ($rule['type'] == 'unseen') { + $search .= ($search ? ' ' : '').'UNSEEN'; + } + if ($rule['type'] == 'unanswered') { + $search .= ($search ? ' ' : '').'UNANSWERED'; + } + if ($rule['type'] == 'answered') { + $search .= ($search ? ' ' : '').'ANSWERED'; + } + if ($rule['type'] == 'smaller') { + $search .= ($search ? ' ' : '').'SMALLER "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + if ($rule['type'] == 'larger') { + $search .= ($search ? ' ' : '').'LARGER "'.str_replace('"', '', $rule['rulevalue']).'"'; + } + + // Rules to filter after the search imap + if ($rule['type'] == 'withtrackingidinmsgid') { + $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withouttrackingidinmsgid') { + $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withtrackingid') { + $searchfilterdoltrackid++; $searchhead .= '/References.*@'.preg_quote($host, '/').'/'; + } + if ($rule['type'] == 'withouttrackingid') { + $searchfilternodoltrackid++; $searchhead .= '! /References.*@'.preg_quote($host, '/').'/'; + } + + if ($rule['type'] == 'isanswer') { + $searchfilterisanswer++; $searchhead .= '/References.*@.*/'; + } + if ($rule['type'] == 'isnotanswer') { + $searchfilterisnotanswer++; $searchhead .= '! /References.*@.*/'; + } } - if ($rule['type'] == 'seen') { - $search .= ($search ? ' ' : '').'SEEN'; - } - if ($rule['type'] == 'unseen') { - $search .= ($search ? ' ' : '').'UNSEEN'; - } - if ($rule['type'] == 'unanswered') { - $search .= ($search ? ' ' : '').'UNANSWERED'; - } - if ($rule['type'] == 'answered') { - $search .= ($search ? ' ' : '').'ANSWERED'; - } - if ($rule['type'] == 'smaller') { - $search .= ($search ? ' ' : '').'SMALLER "'.str_replace('"', '', $rule['rulevalue']).'"'; - } - if ($rule['type'] == 'larger') { - $search .= ($search ? ' ' : '').'LARGER "'.str_replace('"', '', $rule['rulevalue']).'"'; + if (empty($targetdir)) { // Use last date as filter if there is no targetdir defined. + $fromdate = 0; + if ($this->datelastok) { + $fromdate = $this->datelastok; + } + if ($fromdate > 0) { + $search .= ($search ? ' ' : '').'SINCE '.date('j-M-Y', $fromdate - 1); // SENTSINCE not supported. Date must be X-Abc-9999 (X on 1 digit if < 10) + } + //$search.=($search?' ':'').'SINCE 8-Apr-2018'; } - if ($rule['type'] == 'withtrackingidinmsgid') { - $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; - } - if ($rule['type'] == 'withouttrackingidinmsgid') { - $searchfilterdoltrackid++; $searchhead .= '/Message-ID.*@'.preg_quote($host, '/').'/'; - } - if ($rule['type'] == 'withtrackingid') { - $searchfilterdoltrackid++; $searchhead .= '/References.*@'.preg_quote($host, '/').'/'; - } - if ($rule['type'] == 'withouttrackingid') { - $searchfilternodoltrackid++; $searchhead .= '! /References.*@'.preg_quote($host, '/').'/'; - } - - if ($rule['type'] == 'isanswer') { - $searchfilterisanswer++; $searchhead .= '/References.*@.*/'; - } - if ($rule['type'] == 'isnotanswer') { - $searchfilterisnotanswer++; $searchhead .= '! /References.*@.*/'; - } + dol_syslog("IMAP search string = ".$search); + //var_dump($search); } - if (empty($targetdir)) { // Use last date as filter if there is no targetdir defined. - $fromdate = 0; - if ($this->datelastok) { - $fromdate = $this->datelastok; - } - if ($fromdate > 0) { - $search .= ($search ? ' ' : '').'SINCE '.date('j-M-Y', $fromdate - 1); // SENTSINCE not supported. Date must be X-Abc-9999 (X on 1 digit if < 10) - } - //$search.=($search?' ':'').'SINCE 8-Apr-2018'; - } - dol_syslog("IMAP search string = ".$search); - //var_dump($search); - $nbemailprocessed = 0; $nbemailok = 0; $nbactiondone = 0; $charset = ($this->hostcharset ? $this->hostcharset : "UTF-8"); - // Scan IMAP inbox - $arrayofemail = imap_search($connection, $search, null, $charset); - if ($arrayofemail === false) { - // Nothing found or search string not understood - $mapoferrrors = imap_errors(); - if ($mapoferrrors !== false) { - $error++; - $this->error = "Search string not understood - ".join(',', $mapoferrrors); + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + try { + //$criteria = [['ALL']]; + //$Query = $client->getFolders()[0]->messages()->where($criteria); + $f = $client->getFolders(false, $this->source_directory); + $Query = $f[0]->messages()->where($criteria); + } catch (InvalidWhereQueryCriteriaException $e) { + $this->error = $e->getMessage(); $this->errors[] = $this->error; + dol_syslog("EmailCollector::doCollectOneCollector ".$this->error, LOG_ERR); + return -1; + } catch (Exception $e) { + $this->error = $e->getMessage(); + $this->errors[] = $this->error; + dol_syslog("EmailCollector::doCollectOneCollector ".$this->error, LOG_ERR); + return -1; + } + + try { + //var_dump($Query->count()); + $arrayofemail = $Query->limit($this->maxemailpercollect)->setFetchOrder("asc")->get(); + //var_dump($arrayofemail); + } catch (Exception $e) { + $this->error = $e->getMessage(); + $this->errors[] = $this->error; + dol_syslog("EmailCollector::doCollectOneCollector ".$this->error, LOG_ERR); + return -1; + } + } else { + // Scan IMAP inbox + $arrayofemail = imap_search($connection, $search, null, $charset); + if ($arrayofemail === false) { + // Nothing found or search string not understood + $mapoferrrors = imap_errors(); + if ($mapoferrrors !== false) { + $error++; + $this->error = "Search string not understood - ".join(',', $mapoferrrors); + $this->errors[] = $this->error; + } } } @@ -1128,77 +1435,20 @@ class EmailCollector extends CommonObject if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) { // Loop to get part html and plain /* - 0 multipart/mixed - 1 multipart/alternative - 1.1 text/plain - 1.2 text/html - 2 message/rfc822 - 2 multipart/mixed - 2.1 multipart/alternative - 2.1.1 text/plain - 2.1.2 text/html - 2.2 message/rfc822 - 2.2 multipart/alternative - 2.2.1 text/plain - 2.2.2 text/html + 0 multipart/mixed + 1 multipart/alternative + 1.1 text/plain + 1.2 text/html + 2 message/rfc822 + 2 multipart/mixed + 2.1 multipart/alternative + 2.1.1 text/plain + 2.1.2 text/html + 2.2 message/rfc822 + 2.2 multipart/alternative + 2.2.1 text/plain + 2.2.2 text/html */ - /** - * create_part_array - * - * @param Object $structure Structure - * @param string $prefix prefix - * @return array Array with number and object - */ - /*function createPartArray($structure, $prefix = "") - { - //print_r($structure); - $part_array=array(); - if (count($structure->parts) > 0) { // There some sub parts - foreach ($structure->parts as $count => $part) { - addPartToArray($part, $prefix.($count+1), $part_array); - } - }else{ // Email does not have a seperate mime attachment for text - $part_array[] = array('part_number' => $prefix.'1', 'part_object' => $structure); - } - return $part_array; - }*/ - - /** - * Sub function for createPartArray(). Only called by createPartArray() and itself. - * - * @param Object $obj Structure - * @param string $partno Part no - * @param array $part_array array - * @return void - */ - /*function addPartToArray($obj, $partno, &$part_array) - { - $part_array[] = array('part_number' => $partno, 'part_object' => $obj); - if ($obj->type == 2) { // Check to see if the part is an attached email message, as in the RFC-822 type - //print_r($obj); - if (array_key_exists('parts', $obj)) { // Check to see if the email has parts - foreach ($obj->parts as $count => $part) { - // Iterate here again to compensate for the broken way that imap_fetchbody() handles attachments - if (count($part->parts) > 0) { - foreach ($part->parts as $count2 => $part2) { - addPartToArray($part2, $partno.".".($count2+1), $part_array); - } - }else{ // Attached email does not have a seperate mime attachment for text - $part_array[] = array('part_number' => $partno.'.'.($count+1), 'part_object' => $obj); - } - } - }else{ // Not sure if this is possible - $part_array[] = array('part_number' => $partno.'.1', 'part_object' => $obj); - } - }else{ // If there are more sub-parts, expand them out. - if (array_key_exists('parts', $obj)) { - foreach ($obj->parts as $count => $p) { - addPartToArray($p, $partno.".".($count+1), $part_array); - } - } - } - }*/ - dol_syslog("Start of loop on email", LOG_INFO, 1); $iforemailloop = 0; @@ -1206,23 +1456,25 @@ class EmailCollector extends CommonObject if ($nbemailprocessed > 1000) { break; // Do not process more than 1000 email per launch (this is a different protection than maxnbcollectedpercollect) } - $iforemailloop++; + // GET header and overview datas + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + $header = $imapemail->getHeader()->raw; + $overview = $imapemail->getAttributes(); + } else { + //$header = imap_headerinfo($connection, $imapemail); + $header = imap_fetchheader($connection, $imapemail, 0); + $overview = imap_fetch_overview($connection, $imapemail, 0); + } - $header = imap_fetchheader($connection, $imapemail, 0); - $overview = imap_fetch_overview($connection, $imapemail, 0); - - // print $header; - // var_dump($overview); - - // Process $header of email $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches); $headers = array_combine($matches[1], $matches[2]); + //var_dump($headers);exit; if (!empty($headers['in-reply-to']) && empty($headers['In-Reply-To'])) { $headers['In-Reply-To'] = $headers['in-reply-to']; @@ -1233,14 +1485,17 @@ class EmailCollector extends CommonObject if (!empty($headers['message-id']) && empty($headers['Message-ID'])) { $headers['Message-ID'] = $headers['message-id']; } + if (!empty($headers['subject']) && empty($headers['Subject'])) { + $headers['Subject'] = $headers['subject']; + } $headers['Subject'] = $this->decodeSMTPSubject($headers['Subject']); $emailto = $this->decodeSMTPSubject($overview[0]->to); - + $operationslog .= '
    Process email '.dol_escape_htmltag($iforemailloop)." - References: ".dol_escape_htmltag($headers['References'])." - Subject: ".dol_escape_htmltag($headers['Subject']); dol_syslog("** Process email ".$iforemailloop." References: ".$headers['References']." Subject: ".$headers['Subject']); - //print "Process mail ".$iforemailloop." Subject: ".dol_escape_htmltag($headers['Subject'])." References: ".dol_escape_htmltag($headers['References'])." In-Reply-To: ".dol_escape_htmltag($headers['In-Reply-To'])."
    \n"; + $trackidfoundintorecipienttype = ''; $trackidfoundintorecipientid = 0; @@ -1329,21 +1584,40 @@ class EmailCollector extends CommonObject $this->db->begin(); - dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." from=".$overview[0]->from." to=".$overview[0]->to." subject=".$overview[0]->subject); + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + dol_syslog("msgid=".$overview['message_id']." date=".dol_print_date($overview['date'], 'dayrfc', 'gmt')." from=".$overview['from']." to=".$overview['to']." subject=".$overview['subject']); - $overview[0]->subject = $this->decodeSMTPSubject($overview[0]->subject); + // Removed emojis + $overview['subject'] = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview['subject']); + } else { + dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." from=".$overview[0]->from." to=".$overview[0]->to." subject=".$overview[0]->subject); - $overview[0]->from = $this->decodeSMTPSubject($overview[0]->from); + $overview[0]->subject = $this->decodeSMTPSubject($overview[0]->subject); - // Removed emojis - $overview[0]->subject = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview[0]->subject); + $overview[0]->from = $this->decodeSMTPSubject($overview[0]->from); + // Removed emojis + $overview[0]->subject = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview[0]->subject); + } // GET IMAP email structure/content global $htmlmsg, $plainmsg, $charset, $attachments; - $this->getmsg($connection, $imapemail); - + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + if ($imapemail->hasHTMLBody()) { + $htmlmsg = $imapemail->getHTMLBody(); + } + if ($imapemail->hasTextBody()) { + $plainmsg = $imapemail->getTextBody(); + } + if ($imapemail->hasAttachments()) { + $attachments = $imapemail->getAttachments()->all(); + } else { + $attachments = []; + } + } else { + $this->getmsg($connection, $imapemail); + } //print $plainmsg; //var_dump($plainmsg); exit; @@ -1407,16 +1681,29 @@ class EmailCollector extends CommonObject //print $messagetext; //exit; - $fromstring = $overview[0]->from; + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + $fromstring = $overview['from']; + + $sender = $overview['sender']; + $to = $overview['to']; + $sendtocc = empty($overview['cc']) ? '' : $overview['cc']; + $sendtobcc = empty($overview['bcc']) ? '' : $overview['bcc']; + $date = $overview['date']; + $msgid = str_replace(array('<', '>'), '', $overview['message_id']); + $subject = $overview['subject']; + } else { + $fromstring = $overview[0]->from; + + $sender = $overview[0]->sender; + $to = $overview[0]->to; + $sendtocc = $overview[0]->cc; + $sendtobcc = $overview[0]->bcc; + $date = $overview[0]->udate; + $msgid = str_replace(array('<', '>'), '', $overview[0]->message_id); + $subject = $overview[0]->subject; + //var_dump($msgid);exit; + } - $sender = $overview[0]->sender; - $to = $overview[0]->to; - $sendtocc = $overview[0]->cc; - $sendtobcc = $overview[0]->bcc; - $date = $overview[0]->udate; - $msgid = str_replace(array('<', '>'), '', $overview[0]->message_id); - $subject = $overview[0]->subject; - //var_dump($msgid);exit; $reg = array(); if (preg_match('/^(.*)<(.*)>$/', $fromstring, $reg)) { @@ -1464,61 +1751,61 @@ class EmailCollector extends CommonObject $objectid = $reg[2]; // See also list into interface_50_modAgenda_ActionsAuto - if ($reg[1] == 'thi') { + if ($reg[1] == 'thi') { // Third-party $objectemail = new Societe($this->db); } - if ($reg[1] == 'ctc') { + if ($reg[1] == 'ctc') { // Contact $objectemail = new Contact($this->db); } - if ($reg[1] == 'inv') { // customer invoices + if ($reg[1] == 'inv') { // Customer Invoice $objectemail = new Facture($this->db); } - if ($reg[1] == 'sinv') { // supplier invoices + if ($reg[1] == 'sinv') { // Supplier Invoice $objectemail = new FactureFournisseur($this->db); } - if ($reg[1] == 'pro') { // customer proposals + if ($reg[1] == 'pro') { // Customer Proposal $objectemail = new Propal($this->db); } - if ($reg[1] == 'ord') { // customer orders + if ($reg[1] == 'ord') { // Sale Order $objectemail = new Commande($this->db); } - if ($reg[1] == 'shi') { // shipments + if ($reg[1] == 'shi') { // Shipment $objectemail = new Expedition($this->db); } - if ($reg[1] == 'spro') { // supplier proposal + if ($reg[1] == 'spro') { // Supplier Proposal $objectemail = new SupplierProposal($this->db); } - if ($reg[1] == 'sord') { // supplier order + if ($reg[1] == 'sord') { // Supplier Order $objectemail = new CommandeFournisseur($this->db); } - if ($reg[1] == 'rec') { // Reception + if ($reg[1] == 'rec') { // Reception $objectemail = new Reception($this->db); } - if ($reg[1] == 'proj') { + if ($reg[1] == 'proj') { // Project $objectemail = new Project($this->db); } - if ($reg[1] == 'tas') { + if ($reg[1] == 'tas') { // Task $objectemail = new Task($this->db); } - if ($reg[1] == 'con') { + if ($reg[1] == 'con') { // Contact $objectemail = new Contact($this->db); } - if ($reg[1] == 'use') { + if ($reg[1] == 'use') { // User $objectemail = new User($this->db); } - if ($reg[1] == 'tic') { + if ($reg[1] == 'tic') { // Ticket $objectemail = new Ticket($this->db); } - if ($reg[1] == 'recruitmentcandidature') { + if ($reg[1] == 'recruitmentcandidature') { // Recruiting Candidate $objectemail = new RecruitmentCandidature($this->db); } - if ($reg[1] == 'mem') { + if ($reg[1] == 'mem') { // Member $objectemail = new Adherent($this->db); } - /*if ($reg[1] == 'leav') { + /*if ($reg[1] == 'leav') { // Leave / Holiday $objectemail = new Holiday($db); } - if ($reg[1] == 'exp') { + if ($reg[1] == 'exp') { // ExpenseReport $objectemail = new ExpenseReport($db); }*/ } elseif (preg_match('/<(.*@.*)>/', $reference, $reg)) { @@ -1676,267 +1963,287 @@ class EmailCollector extends CommonObject } // Do operations - foreach ($this->actions as $operation) { - $errorforthisaction = 0; + if ($mode < 2) { + foreach ($this->actions as $operation) { + $errorforthisaction = 0; - if ($errorforactions) { - break; - } - if (empty($operation['status'])) { - continue; - } - - // Make Operation - dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id); - dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object - - $actioncode = 'EMAIL_IN'; - // If we scan the Sent box, we use the code for out email - if ($this->source_directory == 'Sent') { - $actioncode = 'EMAIL_OUT'; - } - - $description = $descriptiontitle = $descriptionmeta = $descriptionfull = ''; - - $descriptiontitle = $langs->trans("RecordCreatedByEmailCollector", $this->ref, $msgid); - - $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailTopic").' : '.dol_escape_htmltag($subject)); - $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailFrom").($langs->trans("MailFrom") != 'From' ? ' (From)' : '').' : '.dol_escape_htmltag($fromstring)); - if ($sender) { - $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Sender").($langs->trans("Sender") != 'Sender' ? ' (Sender)' : '').' : '.dol_escape_htmltag($sender)); - } - $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailTo").($langs->trans("MailTo") != 'To' ? ' (To)' : '').' : '.dol_escape_htmltag($to)); - if ($sendtocc) { - $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailCC").($langs->trans("MailCC") != 'CC' ? ' (CC)' : '').' : '.dol_escape_htmltag($sendtocc)); - } - - // Search and create thirdparty - if ($operation['type'] == 'loadthirdparty' || $operation['type'] == 'loadandcreatethirdparty') { - if (empty($operation['actionparam'])) { - $errorforactions++; - $this->error = "Action loadthirdparty or loadandcreatethirdparty has empty parameter. Must be a rule like 'name=HEADER:^From:(.*);' or 'name=SET:xxx' or 'name=EXTRACT:(body|subject):regex where 'name' can be replaced with 'id' or 'email' to define how to set or extract data. More properties can also be set, for example client=SET:2;"; - $this->errors[] = $this->error; - } else { - $actionparam = $operation['actionparam']; - $idtouseforthirdparty = ''; - $nametouseforthirdparty = ''; - $emailtouseforthirdparty = ''; - - // $actionparam = 'param=SET:aaa' or 'param=EXTRACT:BODY:....' - $arrayvaluetouse = dolExplodeIntoArray($actionparam, ';', '='); - foreach ($arrayvaluetouse as $propertytooverwrite => $valueforproperty) { - $sourcestring = ''; - $sourcefield = ''; - $regexstring = ''; - $regforregex = array(); - - if (preg_match('/^EXTRACT:([a-zA-Z0-9_]+):(.*)$/', $valueforproperty, $regforregex)) { - $sourcefield = $regforregex[1]; - $regexstring = $regforregex[2]; - } - - if (!empty($sourcefield) && !empty($regexstring)) { - if (strtolower($sourcefield) == 'body') { - $sourcestring = $messagetext; - } elseif (strtolower($sourcefield) == 'subject') { - $sourcestring = $subject; - } elseif (strtolower($sourcefield) == 'header') { - $sourcestring = $header; - } - - if ($sourcestring) { - $regforval = array(); - //var_dump($regexstring);var_dump($sourcestring); - if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval)) { - //var_dump($regforval[count($regforval)-1]);exit; - // Overwrite param $tmpproperty - if ($propertytooverwrite == 'id') { - $idtouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; - } elseif ($propertytooverwrite == 'email') { - $emailtouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; - } else { - $nametouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; - } - } else { - // Regex not found - $idtouseforthirdparty = null; - $nametouseforthirdparty = null; - $emailtouseforthirdparty = null; - } - //var_dump($object->$tmpproperty);exit; - } else { - // Nothing can be done for this param - $errorforactions++; - $this->error = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)'; - $this->errors[] = $this->error; - } - } elseif (preg_match('/^(SET|SETIFEMPTY):(.*)$/', $valueforproperty, $reg)) { - //if (preg_match('/^options_/', $tmpproperty)) $object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $reg[1]; - //else $object->$tmpproperty = $reg[1]; - if ($propertytooverwrite == 'id') { - $idtouseforthirdparty = $reg[2]; - } elseif ($propertytooverwrite == 'email') { - $emailtouseforthirdparty = $reg[2]; - } else { - $nametouseforthirdparty = $reg[2]; - } - } else { - $errorforactions++; - $this->error = 'Bad syntax for description of action parameters: '.$actionparam; - $this->errors[] = $this->error; - break; - } - } - - if (!$errorforactions && ($idtouseforthirdparty || $emailtouseforthirdparty || $nametouseforthirdparty)) { - $result = $thirdpartystatic->fetch($idtouseforthirdparty, $nametouseforthirdparty, '', '', '', '', '', '', '', '', $emailtouseforthirdparty); - if ($result < 0) { - $errorforactions++; - $this->error = 'Error when getting thirdparty with name '.$nametouseforthirdparty.' (may be 2 record exists with same name ?)'; - $this->errors[] = $this->error; - break; - } elseif ($result == 0) { - if ($operation['type'] == 'loadthirdparty') { - dol_syslog("Third party with id=".$idtouseforthirdparty." email=".$emailtouseforthirdparty." name=".$nametouseforthirdparty." was not found"); - - $errorforactions++; - $this->error = 'ErrorFailedToLoadThirdParty'; - $this->errors[] = 'ErrorFailedToLoadThirdParty'; - } elseif ($operation['type'] == 'loadandcreatethirdparty') { - dol_syslog("Third party with id=".$idtouseforthirdparty." email=".$emailtouseforthirdparty." name=".$nametouseforthirdparty." was not found. We try to create it."); - - // Create thirdparty - $thirdpartystatic->name = $nametouseforthirdparty; - if ($fromtext != $nametouseforthirdparty) { - $thirdpartystatic->name_alias = $fromtext; - } - $thirdpartystatic->email = ($emailtouseforthirdparty ? $emailtouseforthirdparty : $from); - - // Overwrite values with values extracted from source email - $errorforthisaction = $this->overwritePropertiesOfObject($thirdpartystatic, $operation['actionparam'], $messagetext, $subject, $header); - - if ($thirdpartystatic->client && empty($thirdpartystatic->code_client)) { - $thirdpartystatic->code_client = 'auto'; - } - if ($thirdpartystatic->fournisseur && empty($thirdpartystatic->code_fournisseur)) { - $thirdpartystatic->code_fournisseur = 'auto'; - } - - if ($errorforthisaction) { - $errorforactions++; - } else { - $result = $thirdpartystatic->create($user); - if ($result <= 0) { - $errorforactions++; - $this->error = $thirdpartystatic->error; - $this->errors = $thirdpartystatic->errors; - } - } - } - } - } + if ($errorforactions) { + break; + } + if (empty($operation['status'])) { + continue; } - } elseif ($operation['type'] == 'recordevent') { - // Create event - $actioncomm = new ActionComm($this->db); - $alreadycreated = $actioncomm->fetch(0, '', '', $msgid); - if ($alreadycreated == 0) { - if ($projectstatic->id > 0) { - if ($projectfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Project found from '.$projectfoundby); - } - } - if ($thirdpartystatic->id > 0) { - if ($thirdpartyfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); - } - } - if ($contactstatic->id > 0) { - if ($contactfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); - } - } + // Make Operation + dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id); + dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object - $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $descriptionmeta); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $messagetext); + $actioncode = 'EMAIL_IN'; + // If we scan the Sent box, we use the code for out email + if ($this->source_directory == 'Sent') { + $actioncode = 'EMAIL_OUT'; + } - $descriptionfull = $description; - if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { - $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); - $descriptionfull = dol_concatdesc($descriptionfull, $header); - } + $description = $descriptiontitle = $descriptionmeta = $descriptionfull = ''; - // Insert record of emails sent - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) - $actioncomm->code = 'AC_'.$actioncode; - $actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from; - $actioncomm->note_private = $descriptionfull; - $actioncomm->fk_project = $projectstatic->id; - $actioncomm->datep = $date; - $actioncomm->datef = $date; - $actioncomm->percentage = -1; // Not applicable - $actioncomm->socid = $thirdpartystatic->id; - $actioncomm->contact_id = $contactstatic->id; - $actioncomm->socpeopleassigned = (!empty($contactstatic->id) ? array($contactstatic->id => '') : array()); - $actioncomm->authorid = $user->id; // User saving action - $actioncomm->userownerid = $user->id; // Owner of action - // Fields when action is an email (content should be added into note) - $actioncomm->email_msgid = $msgid; - $actioncomm->email_from = $fromstring; - $actioncomm->email_sender = $sender; - $actioncomm->email_to = $to; - $actioncomm->email_tocc = $sendtocc; - $actioncomm->email_tobcc = $sendtobcc; - $actioncomm->email_subject = $subject; - $actioncomm->errors_to = ''; + $descriptiontitle = $langs->trans("RecordCreatedByEmailCollector", $this->ref, $msgid); - if (!in_array($fk_element_type, array('societe', 'contact', 'project', 'user'))) { - $actioncomm->fk_element = $fk_element_id; - $actioncomm->elementid = $fk_element_id; - $actioncomm->elementtype = $fk_element_type; - if (is_object($objectemail) && $objectemail->module) { - $actioncomm->elementtype .= '@'.$objectemail->module; - } - } + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailTopic").' : '.dol_escape_htmltag($subject)); + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailFrom").($langs->trans("MailFrom") != 'From' ? ' (From)' : '').' : '.dol_escape_htmltag($fromstring)); + if ($sender) { + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Sender").($langs->trans("Sender") != 'Sender' ? ' (Sender)' : '').' : '.dol_escape_htmltag($sender)); + } + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailTo").($langs->trans("MailTo") != 'To' ? ' (To)' : '').' : '.dol_escape_htmltag($to)); + if ($sendtocc) { + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailCC").($langs->trans("MailCC") != 'CC' ? ' (CC)' : '').' : '.dol_escape_htmltag($sendtocc)); + } - //$actioncomm->extraparams = $extraparams; - - // Overwrite values with values extracted from source email - $errorforthisaction = $this->overwritePropertiesOfObject($actioncomm, $operation['actionparam'], $messagetext, $subject, $header); - - //var_dump($fk_element_id); - //var_dump($fk_element_type); - //var_dump($alreadycreated); - //var_dump($operation['type']); - //var_dump($actioncomm); - //exit; - - if ($errorforthisaction) { + // Search and create thirdparty + if ($operation['type'] == 'loadthirdparty' || $operation['type'] == 'loadandcreatethirdparty') { + if (empty($operation['actionparam'])) { $errorforactions++; + $this->error = "Action loadthirdparty or loadandcreatethirdparty has empty parameter. Must be a rule like 'name=HEADER:^From:(.*);' or 'name=SET:xxx' or 'name=EXTRACT:(body|subject):regex where 'name' can be replaced with 'id' or 'email' to define how to set or extract data. More properties can also be set, for example client=SET:2;"; + $this->errors[] = $this->error; } else { - $result = $actioncomm->create($user); - if ($result <= 0) { - $errorforactions++; - $this->errors = $actioncomm->errors; + $actionparam = $operation['actionparam']; + $idtouseforthirdparty = ''; + $nametouseforthirdparty = ''; + $emailtouseforthirdparty = ''; + + // $actionparam = 'param=SET:aaa' or 'param=EXTRACT:BODY:....' + $arrayvaluetouse = dolExplodeIntoArray($actionparam, ';', '='); + foreach ($arrayvaluetouse as $propertytooverwrite => $valueforproperty) { + $sourcestring = ''; + $sourcefield = ''; + $regexstring = ''; + $regforregex = array(); + + if (preg_match('/^EXTRACT:([a-zA-Z0-9_]+):(.*)$/', $valueforproperty, $regforregex)) { + $sourcefield = $regforregex[1]; + $regexstring = $regforregex[2]; + } + + if (!empty($sourcefield) && !empty($regexstring)) { + if (strtolower($sourcefield) == 'body') { + $sourcestring = $messagetext; + } elseif (strtolower($sourcefield) == 'subject') { + $sourcestring = $subject; + } elseif (strtolower($sourcefield) == 'header') { + $sourcestring = $header; + } + + if ($sourcestring) { + $regforval = array(); + //var_dump($regexstring);var_dump($sourcestring); + if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval)) { + //var_dump($regforval[count($regforval)-1]);exit; + // Overwrite param $tmpproperty + if ($propertytooverwrite == 'id') { + $idtouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; + + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtolower($sourcefield).' -> Found idtouseforthirdparty='.dol_escape_htmltag($idtouseforthirdparty); + } elseif ($propertytooverwrite == 'email') { + $emailtouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; + + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtolower($sourcefield).' -> Found propertytooverwrite='.dol_escape_htmltag($propertytooverwrite); + } else { + $nametouseforthirdparty = isset($regforval[count($regforval) - 1]) ? trim($regforval[count($regforval) - 1]) : null; + + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtolower($sourcefield).' -> Found nametouseforthirdparty='.dol_escape_htmltag($nametouseforthirdparty); + } + } else { + // Regex not found + $idtouseforthirdparty = null; + $nametouseforthirdparty = null; + $emailtouseforthirdparty = null; + + $operationslog .= '
    Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtolower($sourcefield).' -> Not found'; + } + //var_dump($object->$tmpproperty);exit; + } else { + // Nothing can be done for this param + $errorforactions++; + $this->error = 'The extract rule to use to load thirdparty has an unknown source (must be HEADER, SUBJECT or BODY)'; + $this->errors[] = $this->error; + } + } elseif (preg_match('/^(SET|SETIFEMPTY):(.*)$/', $valueforproperty, $reg)) { + //if (preg_match('/^options_/', $tmpproperty)) $object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $reg[1]; + //else $object->$tmpproperty = $reg[1]; + if ($propertytooverwrite == 'id') { + $idtouseforthirdparty = $reg[2]; + + $operationslog .= '
    We set property idtouseforthrdparty='.dol_escape_htmltag($idtouseforthirdparty); + } elseif ($propertytooverwrite == 'email') { + $emailtouseforthirdparty = $reg[2]; + + $operationslog .= '
    We set property emailtouseforthrdparty='.dol_escape_htmltag($emailtouseforthirdparty); + } else { + $nametouseforthirdparty = $reg[2]; + + $operationslog .= '
    We set property nametouseforthirdparty='.dol_escape_htmltag($nametouseforthirdparty); + } + } else { + $errorforactions++; + $this->error = 'Bad syntax for description of action parameters: '.$actionparam; + $this->errors[] = $this->error; + break; + } + } + + if (!$errorforactions && ($idtouseforthirdparty || $emailtouseforthirdparty || $nametouseforthirdparty)) { + $result = $thirdpartystatic->fetch($idtouseforthirdparty, $nametouseforthirdparty, '', '', '', '', '', '', '', '', $emailtouseforthirdparty); + if ($result < 0) { + $errorforactions++; + $this->error = 'Error when getting thirdparty with name '.$nametouseforthirdparty.' (may be 2 record exists with same name ?)'; + $this->errors[] = $this->error; + break; + } elseif ($result == 0) { + if ($operation['type'] == 'loadthirdparty') { + dol_syslog("Third party with id=".$idtouseforthirdparty." email=".$emailtouseforthirdparty." name=".$nametouseforthirdparty." was not found"); + + $errorforactions++; + $langs->load("errors"); + $this->error = $langs->trans('ErrorFailedToLoadThirdParty', $idtouseforthirdparty, $emailtouseforthirdparty, $nametouseforthirdparty); + $this->errors[] = $this->error; + } elseif ($operation['type'] == 'loadandcreatethirdparty') { + dol_syslog("Third party with id=".$idtouseforthirdparty." email=".$emailtouseforthirdparty." name=".$nametouseforthirdparty." was not found. We try to create it."); + + // Create thirdparty + $thirdpartystatic->name = $nametouseforthirdparty; + if ($fromtext != $nametouseforthirdparty) { + $thirdpartystatic->name_alias = $fromtext; + } + $thirdpartystatic->email = ($emailtouseforthirdparty ? $emailtouseforthirdparty : $from); + + // Overwrite values with values extracted from source email + $errorforthisaction = $this->overwritePropertiesOfObject($thirdpartystatic, $operation['actionparam'], $messagetext, $subject, $header, $operationslog); + + if ($thirdpartystatic->client && empty($thirdpartystatic->code_client)) { + $thirdpartystatic->code_client = 'auto'; + } + if ($thirdpartystatic->fournisseur && empty($thirdpartystatic->code_fournisseur)) { + $thirdpartystatic->code_fournisseur = 'auto'; + } + + if ($errorforthisaction) { + $errorforactions++; + } else { + $result = $thirdpartystatic->create($user); + if ($result <= 0) { + $errorforactions++; + $this->error = $thirdpartystatic->error; + $this->errors = $thirdpartystatic->errors; + } else { + $operationslog .= '
    Thirdparty created -> id = '.dol_escape_htmltag($thirdpartystatic->id); + } + } + } + } } } - } - } elseif ($operation['type'] == 'recordjoinpiece') { - $pj = getAttachments($imapemail, $connection); - foreach ($pj as $key => $val) { - $data[$val['filename']] = getFileData($imapemail, $val['pos'], $val['type'], $connection); - } - if (count($pj) > 0) { - $sql = "SELECT rowid as id FROM " . MAIN_DB_PREFIX . "user WHERE email LIKE '%" . $from . "%'"; - $resql = $this->db->query($sql); - if ($this->db->num_rows($resql) == 0) { - $this->errors[] = 'User Not allowed to add documents'; + } elseif ($operation['type'] == 'recordevent') { + // Create event + $actioncomm = new ActionComm($this->db); + + $alreadycreated = $actioncomm->fetch(0, '', '', $msgid); + if ($alreadycreated == 0) { + if ($projectstatic->id > 0) { + if ($projectfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Project found from '.$projectfoundby); + } + } + if ($thirdpartystatic->id > 0) { + if ($thirdpartyfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); + } + } + if ($contactstatic->id > 0) { + if ($contactfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); + } + } + + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + } + + // Insert record of emails sent + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) + $actioncomm->code = 'AC_'.$actioncode; + $actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from; + $actioncomm->note_private = $descriptionfull; + $actioncomm->fk_project = $projectstatic->id; + $actioncomm->datep = $date; // date of email + $actioncomm->datef = $date; // date of email + $actioncomm->percentage = -1; // Not applicable + $actioncomm->socid = $thirdpartystatic->id; + $actioncomm->contact_id = $contactstatic->id; + $actioncomm->socpeopleassigned = (!empty($contactstatic->id) ? array($contactstatic->id => '') : array()); + $actioncomm->authorid = $user->id; // User saving action + $actioncomm->userownerid = $user->id; // Owner of action + // Fields when action is an email (content should be added into note) + $actioncomm->email_msgid = $msgid; + $actioncomm->email_from = $fromstring; + $actioncomm->email_sender = $sender; + $actioncomm->email_to = $to; + $actioncomm->email_tocc = $sendtocc; + $actioncomm->email_tobcc = $sendtobcc; + $actioncomm->email_subject = $subject; + $actioncomm->errors_to = ''; + + if (!in_array($fk_element_type, array('societe', 'contact', 'project', 'user'))) { + $actioncomm->fk_element = $fk_element_id; + $actioncomm->elementid = $fk_element_id; + $actioncomm->elementtype = $fk_element_type; + if (is_object($objectemail) && $objectemail->module) { + $actioncomm->elementtype .= '@'.$objectemail->module; + } + } + + //$actioncomm->extraparams = $extraparams; + + // Overwrite values with values extracted from source email + $errorforthisaction = $this->overwritePropertiesOfObject($actioncomm, $operation['actionparam'], $messagetext, $subject, $header, $operationslog); + + //var_dump($fk_element_id); + //var_dump($fk_element_type); + //var_dump($alreadycreated); + //var_dump($operation['type']); + //var_dump($actioncomm); + //exit; + + if ($errorforthisaction) { + $errorforactions++; + } else { + $result = $actioncomm->create($user); + if ($result <= 0) { + $errorforactions++; + $this->errors = $actioncomm->errors; + } else { + $operationslog .= '
    Event created -> id='.dol_escape_htmltag($actioncomm->id); + } + } } - $arrayobject = array( + } elseif ($operation['type'] == 'recordjoinpiece') { + $pj = getAttachments($imapemail, $connection); + foreach ($pj as $key => $val) { + $data[$val['filename']] = getFileData($imapemail, $val['pos'], $val['type'], $connection); + } + if (count($pj) > 0) { + $sql = "SELECT rowid as id FROM ".MAIN_DB_PREFIX."user WHERE email LIKE '%".$this->db->escape($from)."%'"; + $resql = $this->db->query($sql); + if ($this->db->num_rows($resql) == 0) { + $this->errors[] = 'User Not allowed to add documents'; + } + $arrayobject = array( 'propale' => array('table' => 'propal', 'fields' => array('ref'), 'class' => 'comm/propal/class/propal.class.php', @@ -2029,325 +2336,359 @@ class EmailCollector extends CommonObject 'fields' => array('ref'), 'class' => 'mrp/class/mo.class.php', 'object' => 'Mo'), - ); + ); - if (!is_object($hookmanager)) { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager = new HookManager($this->db); - } - $hookmanager->initHooks(array('emailcolector')); - $parameters = array('arrayobject' => $arrayobject); - $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) { - $arrayobject = $hookmanager->resArray; - } - - $resultobj = array(); - - foreach ($arrayobject as $key => $objectdesc) { - $sql = 'SELECT DISTINCT t.rowid '; - $sql .= ' FROM ' . MAIN_DB_PREFIX . $objectdesc['table'] . ' AS t'; - $sql .= ' WHERE '; - foreach ($objectdesc['fields'] as $field) { - $sql .= "'" .$this->db->escape($subject) . "' LIKE CONCAT('%', t." . $field . ", '%') OR "; + if (!is_object($hookmanager)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($this->db); + } + $hookmanager->initHooks(array('emailcolector')); + $parameters = array('arrayobject' => $arrayobject); + $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) { + $arrayobject = $hookmanager->resArray; } - $sql = substr($sql, 0, -4); - $ressqlobj = $this->db->query($sql); - if ($ressqlobj) { - while ($obj = $this->db->fetch_object($ressqlobj)) { - $resultobj[$key][] = $obj->rowid; + $resultobj = array(); + + foreach ($arrayobject as $key => $objectdesc) { + $sql = 'SELECT DISTINCT t.rowid '; + $sql .= ' FROM ' . MAIN_DB_PREFIX . $objectdesc['table'] . ' AS t'; + $sql .= ' WHERE '; + foreach ($objectdesc['fields'] as $field) { + $sql .= "'" .$this->db->escape($subject) . "' LIKE CONCAT('%', t." . $field . ", '%') OR "; } - } - } - $dirs = array(); - foreach ($resultobj as $mod => $ids) { - $moddesc = $arrayobject[$mod]; - $elementpath = $mod; - dol_include_once($moddesc['class']); - $objectmanaged = new $moddesc['object']($this->db); - foreach ($ids as $val) { - $res = $objectmanaged->fetch($val); - if ($res) { - $path = ($objectmanaged->entity > 1 ? "/" . $objectmanaged->entity : ''); - $dirs[] = DOL_DATA_ROOT . $path . "/" . $elementpath . '/' . dol_sanitizeFileName($objectmanaged->ref) . '/'; - } else { - $this->errors[] = 'object not found'; - } - } - } - foreach ($dirs as $target) { - foreach ($data as $filename => $content) { - $prefix = $this->actions[$this->id]['actionparam']; + $sql = substr($sql, 0, -4); - $resr = saveAttachment($target, $prefix . '_' . $filename, $content); - if ($resr == -1) { - $this->errors[] = 'Doc not saved'; - } - } - } - } else { - $this->errors[] = 'no joined piece'; - } - } elseif ($operation['type'] == 'project') { - // Create project / lead - $projecttocreate = new Project($this->db); - - $alreadycreated = $projecttocreate->fetch(0, '', '', $msgid); - if ($alreadycreated == 0) { - if ($thirdpartystatic->id > 0) { - $projecttocreate->socid = $thirdpartystatic->id; - if ($thirdpartyfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); - } - } - if ($contactstatic->id > 0) { - $projecttocreate->contact_id = $contactstatic->id; - if ($contactfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); - } - } - - $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $descriptionmeta); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $messagetext); - - $descriptionfull = $description; - if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { - $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); - $descriptionfull = dol_concatdesc($descriptionfull, $header); - } - - $id_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'rowid'); - $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); - - $projecttocreate->title = $subject; - $projecttocreate->date_start = $date; - $projecttocreate->date_end = ''; - $projecttocreate->opp_status = $id_opp_status; - $projecttocreate->opp_percent = $percent_opp_status; - $projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 10), '...'.$langs->transnoentities("SeePrivateNote").'...'); - $projecttocreate->note_private = $descriptionfull; - $projecttocreate->entity = $conf->entity; - $projecttocreate->email_msgid = $msgid; - - $savesocid = $projecttocreate->socid; - - // Overwrite values with values extracted from source email. - // This may overwrite any $projecttocreate->xxx properties. - $errorforthisaction = $this->overwritePropertiesOfObject($projecttocreate, $operation['actionparam'], $messagetext, $subject, $header); - - // Set project ref if not yet defined - if (empty($projecttocreate->ref)) { - // Get next Ref - $defaultref = ''; - $modele = empty($conf->global->PROJECT_ADDON) ? 'mod_project_simple' : $conf->global->PROJECT_ADDON; - - // Search template files - $file = ''; $classname = ''; $filefound = 0; $reldir = ''; - $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) { - $file = dol_buildpath($reldir."core/modules/project/".$modele.'.php', 0); - if (file_exists($file)) { - $filefound = 1; - $classname = $modele; - break; - } - } - - if ($filefound) { - if ($savesocid > 0) { - if ($savesocid != $projecttocreate->socid) { - $errorforactions++; - setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$projecttocreate->socid.') by setting socid in operation with a different value', null, 'errors'); - } - } else { - if ($projecttocreate->socid > 0) { - $thirdpartystatic->fetch($projecttocreate->socid); + $ressqlobj = $this->db->query($sql); + if ($ressqlobj) { + while ($obj = $this->db->fetch_object($ressqlobj)) { + $resultobj[$key][] = $obj->rowid; } } - - $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); - $modModuleToUseForNextValue = new $classname; - $defaultref = $modModuleToUseForNextValue->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $projecttocreate); } - $projecttocreate->ref = $defaultref; - } + $dirs = array(); + foreach ($resultobj as $mod => $ids) { + $moddesc = $arrayobject[$mod]; + $elementpath = $mod; + dol_include_once($moddesc['class']); + $objectmanaged = new $moddesc['object']($this->db); + foreach ($ids as $val) { + $res = $objectmanaged->fetch($val); + if ($res) { + $path = ($objectmanaged->entity > 1 ? "/" . $objectmanaged->entity : ''); + $dirs[] = DOL_DATA_ROOT . $path . "/" . $elementpath . '/' . dol_sanitizeFileName($objectmanaged->ref) . '/'; + } else { + $this->errors[] = 'object not found'; + } + } + } + foreach ($dirs as $target) { + foreach ($data as $filename => $content) { + $prefix = $this->actions[$this->id]['actionparam']; - if ($errorforthisaction) { - $errorforactions++; + $resr = saveAttachment($target, $prefix . '_' . $filename, $content); + if ($resr == -1) { + $this->errors[] = 'Doc not saved'; + } + } + } + + $operationslog .= '
    Save attachment files on disk'; } else { - if (empty($projecttocreate->ref) || (is_numeric($projecttocreate->ref) && $projecttocreate->ref <= 0)) { + $this->errors[] = 'no joined piece'; + + $operationslog .= '
    No joinded files'; + } + } elseif ($operation['type'] == 'project') { + // Create project / lead + $projecttocreate = new Project($this->db); + $alreadycreated = $projecttocreate->fetch(0, '', '', $msgid); + if ($alreadycreated == 0) { + if ($thirdpartystatic->id > 0) { + $projecttocreate->socid = $thirdpartystatic->id; + if ($thirdpartyfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); + } + } + if ($contactstatic->id > 0) { + $projecttocreate->contact_id = $contactstatic->id; + if ($contactfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); + } + } + + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + } + + $id_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'rowid'); + $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); + + $projecttocreate->title = $subject; + $projecttocreate->date_start = $date; // date of email + $projecttocreate->date_end = ''; + $projecttocreate->opp_status = $id_opp_status; + $projecttocreate->opp_percent = $percent_opp_status; + $projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 10), '...'.$langs->transnoentities("SeePrivateNote").'...'); + $projecttocreate->note_private = $descriptionfull; + $projecttocreate->entity = $conf->entity; + $projecttocreate->email_msgid = $msgid; + + $savesocid = $projecttocreate->socid; + + // Overwrite values with values extracted from source email. + // This may overwrite any $projecttocreate->xxx properties. + $errorforthisaction = $this->overwritePropertiesOfObject($projecttocreate, $operation['actionparam'], $messagetext, $subject, $header, $operationslog); + + // Set project ref if not yet defined + if (empty($projecttocreate->ref)) { + // Get next Ref + $defaultref = ''; + $modele = empty($conf->global->PROJECT_ADDON) ? 'mod_project_simple' : $conf->global->PROJECT_ADDON; + + // Search template files + $file = ''; $classname = ''; $filefound = 0; $reldir = ''; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $file = dol_buildpath($reldir."core/modules/project/".$modele.'.php', 0); + if (file_exists($file)) { + $filefound = 1; + $classname = $modele; + break; + } + } + + if ($filefound) { + if ($savesocid > 0) { + if ($savesocid != $projecttocreate->socid) { + $errorforactions++; + setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$projecttocreate->socid.') by setting socid in operation with a different value', null, 'errors'); + } + } else { + if ($projecttocreate->socid > 0) { + $thirdpartystatic->fetch($projecttocreate->socid); + } + } + + $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); + $modModuleToUseForNextValue = new $classname; + $defaultref = $modModuleToUseForNextValue->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $projecttocreate); + } + $projecttocreate->ref = $defaultref; + } + + + if ($errorforthisaction) { $errorforactions++; - $this->error = 'Failed to create project: Can\'t get a valid value for the field ref with numbering template = '.$modele.', thirdparty id = '.$thirdpartystatic->id; } else { - // Create project - $result = $projecttocreate->create($user); - if ($result <= 0) { + if (empty($projecttocreate->ref) || (is_numeric($projecttocreate->ref) && $projecttocreate->ref <= 0)) { $errorforactions++; - $this->error = 'Failed to create project: '.$langs->trans($projecttocreate->error); - $this->errors = $projecttocreate->errors; - } - } - } - } - } elseif ($operation['type'] == 'ticket') { - // Create ticket - $tickettocreate = new Ticket($this->db); - - $alreadycreated = $tickettocreate->fetch(0, '', '', $msgid); - if ($alreadycreated == 0) { - if ($thirdpartystatic->id > 0) { - $tickettocreate->socid = $thirdpartystatic->id; - $tickettocreate->fk_soc = $thirdpartystatic->id; - if ($thirdpartyfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); - } - } - if ($contactstatic->id > 0) { - $tickettocreate->contact_id = $contactstatic->id; - if ($contactfoundby) { - $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); - } - } - - $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $descriptionmeta); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $messagetext); - - $descriptionfull = $description; - if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { - $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); - $descriptionfull = dol_concatdesc($descriptionfull, $header); - } - - $tickettocreate->subject = $subject; - $tickettocreate->message = $description; - $tickettocreate->type_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_type', 'use_default', 'code', 1)); - $tickettocreate->category_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_category', 'use_default', 'code', 1)); - $tickettocreate->severity_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1)); - $tickettocreate->origin_email = $from; - $tickettocreate->fk_user_create = $user->id; - $tickettocreate->datec = $date; - $tickettocreate->fk_project = $projectstatic->id; - $tickettocreate->notify_tiers_at_create = 0; - $tickettocreate->note_private = $descriptionfull; - $tickettocreate->entity = $conf->entity; - $tickettocreate->email_msgid = $msgid; - //$tickettocreate->fk_contact = $contactstatic->id; - - $savesocid = $tickettocreate->socid; - - // Overwrite values with values extracted from source email. - // This may overwrite any $projecttocreate->xxx properties. - $errorforthisaction = $this->overwritePropertiesOfObject($tickettocreate, $operation['actionparam'], $messagetext, $subject, $header); - - // Set ticket ref if not yet defined - if (empty($tickettocreate->ref)) { - // Get next Ref - $defaultref = ''; - $modele = empty($conf->global->TICKET_ADDON) ? 'mod_ticket_simple' : $conf->global->TICKET_ADDON; - - // Search template files - $file = ''; $classname = ''; $filefound = 0; $reldir = ''; - $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) { - $file = dol_buildpath($reldir."core/modules/ticket/".$modele.'.php', 0); - if (file_exists($file)) { - $filefound = 1; - $classname = $modele; - break; - } - } - - if ($filefound) { - if ($savesocid > 0) { - if ($savesocid != $tickettocreate->socid) { + $this->error = 'Failed to create project: Can\'t get a valid value for the field ref with numbering template = '.$modele.', thirdparty id = '.$thirdpartystatic->id; + } else { + // Create project + $result = $projecttocreate->create($user); + if ($result <= 0) { $errorforactions++; - setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$tickettocreate->socid.') by setting socid in operation with a different value', null, 'errors'); - } - } else { - if ($tickettocreate->socid > 0) { - $thirdpartystatic->fetch($tickettocreate->socid); - } - } + $this->error = 'Failed to create project: '.$langs->trans($projecttocreate->error); + $this->errors = $projecttocreate->errors; + } else { + if ($attachments) { + $destdir = $conf->project->dir_output.'/'.$projecttocreate->ref; + if (!dol_is_dir($destdir)) { + dol_mkdir($destdir); + } + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + foreach ($attachments as $attachment) { + $attachment->save($destdir.'/'); + } + } else { + $this->getmsg($connection, $imapemail, $destdir); + } - $result = dol_include_once($reldir."core/modules/ticket/".$modele.'.php'); - $modModuleToUseForNextValue = new $classname; - $defaultref = $modModuleToUseForNextValue->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $tickettocreate); - } - $tickettocreate->ref = $defaultref; - } - - if ($errorforthisaction) { - $errorforactions++; - } else { - if (is_numeric($tickettocreate->ref) && $tickettocreate->ref <= 0) { - $errorforactions++; - $this->error = 'Failed to create ticket: Can\'t get a valid value for the field ref with numbering template = '.$modele.', thirdparty id = '.$thirdpartystatic->id; - } else { - // Create project - $result = $tickettocreate->create($user); - if ($result <= 0) { - $errorforactions++; - $this->error = 'Failed to create ticket: '.$langs->trans($tickettocreate->error); - $this->errors = $tickettocreate->errors; - } else { - if ($attachments) { - $destdir = $conf->ticket->dir_output.'/'.$tickettocreate->ref; - if (!dol_is_dir($destdir)) { - dol_mkdir($destdir); - $this->getmsg($connection, $imapemail, $destdir); + $operationslog .= '
    Project created with attachments -> id='.dol_escape_htmltag($projecttocreate->id); + } else { + $operationslog .= '
    Project created without attachments -> id='.dol_escape_htmltag($projecttocreate->id); } } } } } - } - } elseif ($operation['type'] == 'candidature') { - // Create candidature - $candidaturetocreate = new RecruitmentCandidature($this->db); + } elseif ($operation['type'] == 'ticket') { + // Create ticket + $tickettocreate = new Ticket($this->db); - $alreadycreated = $candidaturetocreate->fetch(0, '', $msgid); - if ($alreadycreated == 0) { - $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $descriptionmeta); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $messagetext); + $alreadycreated = $tickettocreate->fetch(0, '', '', $msgid); + if ($alreadycreated == 0) { + if ($thirdpartystatic->id > 0) { + $tickettocreate->socid = $thirdpartystatic->id; + $tickettocreate->fk_soc = $thirdpartystatic->id; + if ($thirdpartyfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); + } + } + if ($contactstatic->id > 0) { + $tickettocreate->contact_id = $contactstatic->id; + if ($contactfoundby) { + $descriptionmeta = dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); + } + } - $descriptionfull = $description; - $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); - $descriptionfull = dol_concatdesc($descriptionfull, $header); + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); - $candidaturetocreate->subject = $subject; - $candidaturetocreate->message = $description; - $candidaturetocreate->type_code = 0; - $candidaturetocreate->category_code = null; - $candidaturetocreate->severity_code = null; - $candidaturetocreate->email = $from; - //$candidaturetocreate->lastname = $langs->trans("Anonymous").' - '.$from; - $candidaturetocreate->fk_user_creat = $user->id; - $candidaturetocreate->date_creation = $date; - $candidaturetocreate->fk_project = $projectstatic->id; - $candidaturetocreate->description = $description; - $candidaturetocreate->note_private = $descriptionfull; - $candidaturetocreate->entity = $conf->entity; - $candidaturetocreate->email_msgid = $msgid; - $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; - //$candidaturetocreate->fk_contact = $contactstatic->id; + $descriptionfull = $description; + if (empty($conf->global->MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER)) { + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + } - // Overwrite values with values extracted from source email. - // This may overwrite any $projecttocreate->xxx properties. - $errorforthisaction = $this->overwritePropertiesOfObject($candidaturetocreate, $operation['actionparam'], $messagetext, $subject, $header); + $tickettocreate->subject = $subject; + $tickettocreate->message = $description; + $tickettocreate->type_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_type', 'use_default', 'code', 1)); + $tickettocreate->category_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_category', 'use_default', 'code', 1)); + $tickettocreate->severity_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1)); + $tickettocreate->origin_email = $from; + $tickettocreate->fk_user_create = $user->id; + $tickettocreate->datec = dol_now(); + $tickettocreate->fk_project = $projectstatic->id; + $tickettocreate->notify_tiers_at_create = 0; + $tickettocreate->note_private = $descriptionfull; + $tickettocreate->entity = $conf->entity; + $tickettocreate->email_msgid = $msgid; + $tickettocreate->email_date = $date; + //$tickettocreate->fk_contact = $contactstatic->id; - // Set candidature ref if not yet defined - /*if (empty($candidaturetocreate->ref)) We do not need this because we create object in draft status - { + $savesocid = $tickettocreate->socid; + + // Overwrite values with values extracted from source email. + // This may overwrite any $projecttocreate->xxx properties. + $errorforthisaction = $this->overwritePropertiesOfObject($tickettocreate, $operation['actionparam'], $messagetext, $subject, $header, $operationslog); + + // Set ticket ref if not yet defined + if (empty($tickettocreate->ref)) { + // Get next Ref + $defaultref = ''; + $modele = empty($conf->global->TICKET_ADDON) ? 'mod_ticket_simple' : $conf->global->TICKET_ADDON; + + // Search template files + $file = ''; $classname = ''; $filefound = 0; $reldir = ''; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $file = dol_buildpath($reldir."core/modules/ticket/".$modele.'.php', 0); + if (file_exists($file)) { + $filefound = 1; + $classname = $modele; + break; + } + } + + if ($filefound) { + if ($savesocid > 0) { + if ($savesocid != $tickettocreate->socid) { + $errorforactions++; + setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$tickettocreate->socid.') by setting socid in operation with a different value', null, 'errors'); + } + } else { + if ($tickettocreate->socid > 0) { + $thirdpartystatic->fetch($tickettocreate->socid); + } + } + + $result = dol_include_once($reldir."core/modules/ticket/".$modele.'.php'); + $modModuleToUseForNextValue = new $classname; + $defaultref = $modModuleToUseForNextValue->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $tickettocreate); + } + $tickettocreate->ref = $defaultref; + } + + if ($errorforthisaction) { + $errorforactions++; + } else { + if (is_numeric($tickettocreate->ref) && $tickettocreate->ref <= 0) { + $errorforactions++; + $this->error = 'Failed to create ticket: Can\'t get a valid value for the field ref with numbering template = '.$modele.', thirdparty id = '.$thirdpartystatic->id; + } else { + // Create project + $result = $tickettocreate->create($user); + if ($result <= 0) { + $errorforactions++; + $this->error = 'Failed to create ticket: '.$langs->trans($tickettocreate->error); + $this->errors = $tickettocreate->errors; + } else { + if ($attachments) { + $destdir = $conf->ticket->dir_output.'/'.$tickettocreate->ref; + if (!dol_is_dir($destdir)) { + dol_mkdir($destdir); + } + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + foreach ($attachments as $attachment) { + $attachment->save($destdir.'/'); + } + } else { + $this->getmsg($connection, $imapemail, $destdir); + } + + $operationslog .= '
    Ticket created with attachments -> id='.dol_escape_htmltag($tickettocreate->id); + } else { + $operationslog .= '
    Ticket created without attachments -> id='.dol_escape_htmltag($tickettocreate->id); + } + } + } + } + } + } elseif ($operation['type'] == 'candidature') { + // Create candidature + $candidaturetocreate = new RecruitmentCandidature($this->db); + + $alreadycreated = $candidaturetocreate->fetch(0, '', $msgid); + if ($alreadycreated == 0) { + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + + $candidaturetocreate->subject = $subject; + $candidaturetocreate->message = $description; + $candidaturetocreate->type_code = 0; + $candidaturetocreate->category_code = null; + $candidaturetocreate->severity_code = null; + $candidaturetocreate->email = $from; + //$candidaturetocreate->lastname = $langs->trans("Anonymous").' - '.$from; + $candidaturetocreate->fk_user_creat = $user->id; + $candidaturetocreate->date_creation = dol_now(); + $candidaturetocreate->fk_project = $projectstatic->id; + $candidaturetocreate->description = $description; + $candidaturetocreate->note_private = $descriptionfull; + $candidaturetocreate->entity = $conf->entity; + $candidaturetocreate->email_msgid = $msgid; + $candidaturetocreate->email_date = $date; // date of email + $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; + //$candidaturetocreate->fk_contact = $contactstatic->id; + + // Overwrite values with values extracted from source email. + // This may overwrite any $projecttocreate->xxx properties. + $errorforthisaction = $this->overwritePropertiesOfObject($candidaturetocreate, $operation['actionparam'], $messagetext, $subject, $header, $operationslog); + + // Set candidature ref if not yet defined + /*if (empty($candidaturetocreate->ref)) We do not need this because we create object in draft status + { // Get next Ref $defaultref = ''; $modele = empty($conf->global->CANDIDATURE_ADDON) ? 'mod_candidature_simple' : $conf->global->CANDIDATURE_ADDON; @@ -2383,73 +2724,83 @@ class EmailCollector extends CommonObject $defaultref = $modModuleToUseForNextValue->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $tickettocreate); } $candidaturetocreate->ref = $defaultref; - }*/ + }*/ - if ($errorforthisaction) { - $errorforactions++; - } else { - // Create project - $result = $candidaturetocreate->create($user); - if ($result <= 0) { + if ($errorforthisaction) { $errorforactions++; - $this->error = 'Failed to create ticket: '.join(', ', $candidaturetocreate->errors); - $this->errors = $candidaturetocreate->errors; + } else { + // Create project + $result = $candidaturetocreate->create($user); + if ($result <= 0) { + $errorforactions++; + $this->error = 'Failed to create ticket: '.join(', ', $candidaturetocreate->errors); + $this->errors = $candidaturetocreate->errors; + } + + $operationslog .= '
    Candidature created without attachments -> id='.dol_escape_htmltag($candidaturetocreate->id); } } - } - } elseif (substr($operation['type'], 0, 4) == 'hook') { - // Create event specific on hook - // this code action is hook..... for support this call - if (!is_object($hookmanager)) { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager = new HookManager($this->db); + } elseif (substr($operation['type'], 0, 4) == 'hook') { + // Create event specific on hook + // this code action is hook..... for support this call + if (!is_object($hookmanager)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($this->db); + } + + $parameters = array( + 'connection'=> $connection, + 'imapemail'=>$imapemail, + 'overview'=>$overview, + + 'from' => $from, + 'fromtext' => $fromtext, + + 'actionparam'=> $operation['actionparam'], + + 'thirdpartyid' => $thirdpartyid, + 'objectid'=> $objectid, + 'objectemail'=> $objectemail, + + 'messagetext'=>$messagetext, + 'subject'=>$subject, + 'header'=>$header, + 'attachments'=>$attachments, + ); + $reshook = $hookmanager->executeHooks('doCollectImapOneCollector', $parameters, $this, $operation['type']); + + if ($reshook < 0) { + $errorforthisaction++; + $this->error = $hookmanager->resPrint; + } + if ($errorforthisaction) { + $errorforactions++; + $operationslog .= '
    Hook doCollectImapOneCollector executed with error'; + } else { + $operationslog .= '
    Hook doCollectImapOneCollector executed without error'; + } } - $parameters = array( - 'connection'=> $connection, - 'imapemail'=>$imapemail, - 'overview'=>$overview, - - 'from' => $from, - 'fromtext' => $fromtext, - - 'actionparam'=> $operation['actionparam'], - - 'thirdpartyid' => $thirdpartyid, - 'objectid'=> $objectid, - 'objectemail'=> $objectemail, - - 'messagetext'=>$messagetext, - 'subject'=>$subject, - 'header'=>$header, - 'attachments'=>$attachments, - ); - $reshook = $hookmanager->executeHooks('doCollectOneCollector', $parameters, $this, $operation['type']); - - if ($reshook < 0) { - $errorforthisaction++; - $this->error = $hookmanager->resPrint; + if (!$errorforactions) { + $nbactiondoneforemail++; } - if ($errorforthisaction) { - $errorforactions++; - } - } - - if (!$errorforactions) { - $nbactiondoneforemail++; } } // Error for email or not ? if (!$errorforactions) { - if ($targetdir) { - dol_syslog("EmailCollector::doCollectOneCollector move message ".$imapemail." to ".$connectstringtarget, LOG_DEBUG); - $res = imap_mail_move($connection, $imapemail, $targetdir, 0); - if ($res == false) { - $errorforemail++; - $this->error = imap_last_error(); - $this->errors[] = $this->error; - dol_syslog(imap_last_error()); + if ($targetdir && empty($mode)) { + if (empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + dol_syslog("EmailCollector::doCollectOneCollector move message ".$imapemail." to ".$connectstringtarget, LOG_DEBUG); + $res = imap_mail_move($connection, $imapemail, $targetdir, 0); + if ($res == false) { + $errorforemail++; + $this->error = imap_last_error(); + $this->errors[] = $this->error; + dol_syslog(imap_last_error()); + } + } else { + // TODO Move mail using PHP-IMAP } } else { dol_syslog("EmailCollector::doCollectOneCollector message ".$imapemail." to ".$connectstringtarget." was set to read", LOG_DEBUG); @@ -2458,6 +2809,7 @@ class EmailCollector extends CommonObject $errorforemail++; } + unset($objectemail); unset($projectstatic); unset($thirdpartystatic); @@ -2469,7 +2821,11 @@ class EmailCollector extends CommonObject $nbactiondone += $nbactiondoneforemail; $nbemailok++; - $this->db->commit(); + if (empty($mode)) { + $this->db->commit(); + } else { + $this->db->rollback(); + } // Stop the loop to process email if we reach maximum collected per collect if ($this->maxemailpercollect > 0 && $nbemailok >= $this->maxemailpercollect) { @@ -2490,30 +2846,41 @@ class EmailCollector extends CommonObject $output = $langs->trans('NoNewEmailToProcess'); } - imap_expunge($connection); // To validate any move - - imap_close($connection); + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { + $client->disconnect(); + } else { + if (empty($mode)) { + imap_expunge($connection); // To validate any move + } + imap_close($connection); + } $this->datelastresult = $now; $this->lastresult = $output; - $this->debuginfo = 'IMAP search string used : '.$search; + $this->debuginfo .= 'IMAP search string used : '.$search; if ($searchhead) { - $this->debuginfo .= '
    Then search string into email header : '.$searchhead; + $this->debuginfo .= '
    Then search string into email header : '.dol_escape_htmltag($searchhead); + } + if ($operationslog) { + $this->debuginfo .= $operationslog; } - if (!$error) { + if (empty($error) && empty($mode)) { $this->datelastok = $now; } if (!empty($this->errors)) { - $this->lastresult .= " - ".join(" - ", $this->errors); + $this->lastresult .= "
    ".join("
    ", $this->errors); } $this->codelastresult = ($error ? 'KO' : 'OK'); - $this->update($user); + + if (empty($mode)) { + $this->update($user); + } dol_syslog("EmailCollector::doCollectOneCollector end", LOG_DEBUG); - return $error ?-1 : 1; + return $error ? -1 : 1; } @@ -2569,6 +2936,7 @@ class EmailCollector extends CommonObject 2.2.1 text/plain 2.2.2 text/html */ + /** * Sub function for getpart(). Only called by createPartArray() and itself. * @@ -2687,10 +3055,10 @@ class EmailCollector extends CommonObject /** * Converts a string from one encoding to another. * - * @param string $string String to convert - * @param string $fromEncoding String encoding - * @param string $toEncoding String return encoding - * @return string Converted string if conversion was successful, or the original string if not + * @param string $string String to convert + * @param string $fromEncoding String encoding + * @param string $toEncoding String return encoding + * @return string Converted string if conversion was successful, or the original string if not * @throws Exception */ protected function convertStringEncoding($string, $fromEncoding, $toEncoding = 'UTF-8') diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 37bd93926cb..e43a86da515 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -85,7 +85,7 @@ class EmailCollectorAction extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), 'fk_emailcollector' => array('type'=>'integer', 'label'=>'Id of emailcollector', 'foreignkey'=>'emailcollector.rowid'), 'type' => array('type'=>'varchar(128)', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1), - 'actionparam' => array('type'=>'varchar(255)', 'label'=>'ParamForAction', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>-1), + 'actionparam' => array('type'=>'text', 'label'=>'ParamForAction', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>-1), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,), 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',), @@ -158,7 +158,7 @@ class EmailCollectorAction extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index 6386ee3c27f..cff80aa4153 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -127,7 +127,7 @@ class EmailCollectorFilter extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -158,6 +158,7 @@ class EmailCollectorFilter extends CommonObject public function create(User $user, $notrigger = false) { global $langs; + if (empty($this->type)) { $langs->load("errors"); $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); @@ -169,6 +170,12 @@ class EmailCollectorFilter extends CommonObject return -2; } + if (in_array($this->type, array('to')) && strpos($this->rulevalue, '+') != false) { + $langs->load("errors"); + $this->errors[] = $langs->trans("ErrorCharPlusNotSupportedByImapForSearch"); + return -3; + } + return $this->createCommon($user, $notrigger); } diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index a2eb140c789..cdb67a2c37b 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -107,7 +107,7 @@ class ConferenceOrBooth extends ActionComm 'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'help'=>"OrganizationEvenLabelName", 'showoncombobox'=>'1',), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'), - 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), 'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1), 'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width300'), 'datep' => array('type'=>'datetime', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'2',), @@ -152,7 +152,7 @@ class ConferenceOrBooth extends ActionComm if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['id']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -444,8 +444,8 @@ class ConferenceOrBooth extends ActionComm return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -468,8 +468,8 @@ class ConferenceOrBooth extends ActionComm return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -492,8 +492,8 @@ class ConferenceOrBooth extends ActionComm return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 3dae278d3a1..595eaf67eeb 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -103,12 +103,13 @@ class ConferenceOrBoothAttendee extends CommonObject public $fields = array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"), - 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'), - 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), + 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), 'email' => array('type'=>'mail', 'label'=>'EmailAttendee', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'autofocusoncreate'=>1, 'searchall'=>1), 'firstname' => array('type'=>'varchar(100)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1), 'lastname' => array('type'=>'varchar(100)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>32, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>40, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'), + 'email_company' => array('type'=>'mail', 'label'=>'EmailCompany', 'enabled'=>'1', 'position'=>41, 'notnull'=>0, 'visible'=>-2, 'searchall'=>1), 'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1, 'showoncombobox'=>'1',), 'fk_invoice' => array('type'=>'integer:Facture:compta/facture/class/facture.class.php', 'label'=>'Invoice', 'enabled'=>'$conf->facture->enabled', 'position'=>57, 'notnull'=>0, 'visible'=>-1, 'index'=>0, 'picto'=>'bill', 'css'=>'tdoverflowmax150 maxwidth500'), 'amount' => array('type'=>'price', 'label'=>'AmountPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",), @@ -122,14 +123,17 @@ class ConferenceOrBoothAttendee extends CommonObject 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>0, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'),), + 'ip' => array('type'=>'varchar(250)', 'label'=>'Ip', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), ); public $rowid; public $ref; - public $fk_soc; public $fk_actioncomm; + public $fk_project; public $email; public $firstname; public $lastname; + public $fk_soc; + public $email_company; public $date_subscription; public $fk_invoice; public $amount; @@ -196,7 +200,7 @@ class ConferenceOrBoothAttendee extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -541,8 +545,8 @@ class ConferenceOrBoothAttendee extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->conferenceorboothattendee->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->conferenceorboothattendee->conferenceorboothattendee_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->conferenceorboothattendee->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->conferenceorboothattendee->conferenceorboothattendee_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -684,8 +688,8 @@ class ConferenceOrBoothAttendee extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -708,8 +712,8 @@ class ConferenceOrBoothAttendee extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -732,8 +736,8 @@ class ConferenceOrBoothAttendee extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->eventorganization->eventorganization_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->eventorganization->eventorganization_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index ac64a16602f..b6932c2cf09 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -17,27 +17,29 @@ */ /** - * \file htdocs/eventorganization/conferenceorbooth_card.php - * \ingroup eventorganization - * \brief Page to create/edit/view conferenceorbooth + * \file htdocs/eventorganization/conferenceorbooth_card.php + * \ingroup eventorganization + * \brief Page to create/edit/view conferenceorbooth */ -require '../main.inc.php'; +// Load Dolibarr environment +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; global $dolibarr_main_url_root; // Load translation files required by the page -$langs->loadLangs(array("eventorganization", "projects")); +$langs->loadLangs(array('eventorganization', 'projects')); +// Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); @@ -45,7 +47,6 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'co $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -// Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $withproject = GETPOST('withproject', 'int'); @@ -79,6 +80,7 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +// Permissions $permissiontoread = $user->rights->eventorganization->read; $permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); @@ -201,7 +203,7 @@ if (!empty($withproject)) { $morehtmlref .= $projectstatic->title; // Thirdparty if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -220,7 +222,7 @@ if (!empty($withproject)) { print ''; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -243,7 +245,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -563,13 +565,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.$withProjectUrl.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.$withProjectUrl.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); } - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.$withProjectUrl.'&action=edit&token='.newToken().'', '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.$withProjectUrl.'&action=edit&token='.newToken().'', '', $permissiontoadd); // Clone - print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.$withProjectUrl.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.$withProjectUrl.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); // Delete (need delete permission, or if draft, just need create/modify permission) print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.$withProjectUrl.'&action=delete&token='.newToken().'', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php index 57f2a76c042..7810114aec1 100644 --- a/htdocs/eventorganization/conferenceorbooth_contact.php +++ b/htdocs/eventorganization/conferenceorbooth_contact.php @@ -22,21 +22,23 @@ * \brief Tab for contacts linked to ConferenceOrBooth */ + +// Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + // Load translation files required by the page -$langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails")); +$langs->loadLangs(array('companies', 'eventorganization', 'mails', 'others', 'projects')); +// Variables GET $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -51,12 +53,14 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $withproject = GETPOST('withproject', 'int'); + // Initialize technical objects $object = new ConferenceOrBooth($db); $extrafields = new ExtraFields($db); $projectstatic = new Project($db); $diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('conferenceorboothcontact', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -69,6 +73,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ if ($user->socid > 0) { accessforbidden(); } + $isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); @@ -182,7 +187,7 @@ if (!empty($withproject)) { $morehtmlref .= $projectstatic->title; // Thirdparty if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -201,7 +206,7 @@ if (!empty($withproject)) { print '
    '; print $langs->trans("Usage"); print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -224,7 +229,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -392,7 +397,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -413,7 +418,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 4a5b368df02..78f74ded42d 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -22,21 +22,25 @@ * \brief Tab for documents linked to ConferenceOrBooth */ +// Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.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'; -require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; + +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + // Load translation files required by the page $langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails")); +// Get Parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); $cancel = GETPOST('cancel', 'aZ09'); @@ -49,8 +53,6 @@ $ref = GETPOST('ref', 'alpha'); $withproject = GETPOST('withproject', 'int'); $project_ref = GETPOST('project_ref', 'alpha'); - -// Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -88,6 +90,7 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object); } +// Permissions $permissiontoread = $user->rights->eventorganization->read; $permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); @@ -157,7 +160,7 @@ if (!empty($withproject)) { $morehtmlref .= $projectstatic->title; // Thirdparty if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -176,7 +179,7 @@ if (!empty($withproject)) { print '
    '; print $langs->trans("Usage"); print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -199,7 +202,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 958d1ab897d..f69d86c62e7 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -17,21 +17,26 @@ */ /** - * \file conferenceorbooth_list.php - * \ingroup eventorganization - * \brief List page for conferenceorbooth + * \file htdocs/eventorganization/conferenceorbooth_list.php + * \ingroup eventorganization + * \brief List page for conferenceorbooth */ + +// 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.'/core/lib/project.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; + +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; global $dolibarr_main_url_root; @@ -41,6 +46,7 @@ global $dolibarr_main_url_root; // Load translation files required by the page $langs->loadLangs(array("eventorganization", "other", "projects", "companies")); +// Get Parameters $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -281,7 +287,7 @@ if ($projectid > 0) { $morehtmlref .= $project->title; // Thirdparty if (isset($project->thirdparty->id) && $project->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$project->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$project->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -300,7 +306,7 @@ if ($projectid > 0) { print '
    '; print $langs->trans("Usage"); print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -323,7 +329,7 @@ if ($projectid > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '').'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -342,8 +348,15 @@ if ($projectid > 0) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; + // Location event + print ''; + // Other attributes $cols = 2; $objectconf = $object; diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php index b02edfc4a34..9bab2a7f49d 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_card.php +++ b/htdocs/eventorganization/conferenceorboothattendee_card.php @@ -16,20 +16,23 @@ */ /** - * \file conferenceorboothattendee_card.php - * \ingroup eventorganization - * \brief Page to create/edit/view conferenceorboothattendee + * \file htdocs/eventorganization/conferenceorboothattendee_card.php + * \ingroup eventorganization + * \brief Page to create/edit/view conferenceorboothattendee */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page @@ -108,6 +111,7 @@ if ($object->fk_project > 0) { $fk_project = $object->fk_project; } +// Permissions $permissiontoread = $user->rights->eventorganization->read; $permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); @@ -230,7 +234,7 @@ if (!empty($withproject)) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -249,7 +253,7 @@ if (!empty($withproject)) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($project->budget_amount, '')) { + print ''.price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").' ('.$langs->trans("Project").')'; $start = dol_print_date($project->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($project->date_end, 'day'); @@ -354,13 +367,23 @@ if ($projectid > 0) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($project->budget_amount, '')) { - print price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + // Date start - end of event + print '
    '.$langs->trans("Dates").' ('.$langs->trans("Event").')'; + $start = dol_print_date($project->date_start_event, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($project->date_end_event, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($object->hasDelay()) { + print img_warning("Late"); } print '
    '.$langs->trans("Location").''; + print $project->location; + print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -272,7 +276,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -601,15 +605,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); } - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit&token='.newToken(), '', $permissiontoadd); // Clone - print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd); // Delete (need delete permission, or if draft, just need create/modify permission) - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); } print ''."\n"; } diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index c1626f7bbf3..1bc9c12d4f6 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -17,21 +17,24 @@ */ /** - * \file conferenceorboothattendee_list.php - * \ingroup eventorganization - * \brief List page for conferenceorboothattendee + * \file htdocs/eventorganization/conferenceorboothattendee_list.php + * \ingroup eventorganization + * \brief List page for conferenceorboothattendee */ + +// 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.'/core/lib/project.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; -require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } @@ -44,15 +47,16 @@ global $dolibarr_main_url_root; // Load translation files required by the page $langs->loadLangs(array("eventorganization", "other", "projects")); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'conferenceorboothattendeelist'; // 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') +// Get Paramters +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'conferenceorboothattendeelist'; // 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'); $conf_or_booth_id = GETPOST('conforboothid', 'int'); @@ -139,6 +143,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Permissions $permissiontoread = $user->rights->eventorganization->read; $permissiontoadd = $user->rights->eventorganization->write; $permissiontodelete = $user->rights->eventorganization->delete; @@ -408,7 +413,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -427,7 +432,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print '
    '; print $langs->trans("Usage"); print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -450,7 +455,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -469,8 +474,15 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; + // Location event + print ''; + // Other attributes $cols = 2; $objectconf = $object; diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 4c5b2f394a9..ea186041602 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -17,9 +17,9 @@ */ /** - * \file conferenceorboothattendee_note.php - * \ingroup eventorganization - * \brief Tab for notes on ConferenceOrBoothAttendee + * \file htdocs/eventorganization/conferenceorboothattendee_note.php + * \ingroup eventorganization + * \brief Tab for notes on ConferenceOrBoothAttendee */ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,10 +37,10 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) @@ -77,7 +76,7 @@ dol_include_once('/eventorganization/class/conferenceorboothattendee.class.php') dol_include_once('/eventorganization/lib/eventorganization_conferenceorboothattendee.lib.php'); // Load translation files required by the page -$langs->loadLangs(array("eventorganization@eventorganization", "companies")); +$langs->loadLangs(array('eventorganization', 'companies')); // Get parameters $id = GETPOST('id', 'int'); @@ -105,6 +104,7 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->eventorganization->multidir_output[$object->entity]."/".$object->id; } +// Permissions $permissionnote = $user->rights->eventorganization->conferenceorboothattendee->write; // Used by the include of actions_setnotes.inc.php $permissiontoadd = $user->rights->eventorganization->conferenceorboothattendee->write; // Used by the include of actions_addupdatedelete.inc.php @@ -151,7 +151,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -172,7 +172,7 @@ if ($id > 0 || !empty($ref)) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/eventorganization/core/actions_massactions_mail.inc.php b/htdocs/eventorganization/core/actions_massactions_mail.inc.php index a446c04ca9a..5398291e69f 100644 --- a/htdocs/eventorganization/core/actions_massactions_mail.inc.php +++ b/htdocs/eventorganization/core/actions_massactions_mail.inc.php @@ -42,18 +42,6 @@ if (empty($objectclass) || empty($uploaddir)) { exit; } -// For backward compatibility -if (!empty($permtoread) && empty($permissiontoread)) { - $permissiontoread = $permtoread; -} -if (!empty($permtocreate) && empty($permissiontoadd)) { - $permissiontoadd = $permtocreate; -} -if (!empty($permtodelete) && empty($permissiontodelete)) { - $permissiontodelete = $permtodelete; -} - - // Mass actions. Controls on number of lines checked. $maxformassaction = (empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS) ? 1000 : $conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); if (!empty($massaction) && is_array($toselect) && count($toselect) < 1) { diff --git a/htdocs/eventorganization/eventorganizationindex.php b/htdocs/eventorganization/eventorganizationindex.php index 77c2ec512f4..60f5beefd70 100644 --- a/htdocs/eventorganization/eventorganizationindex.php +++ b/htdocs/eventorganization/eventorganizationindex.php @@ -71,7 +71,7 @@ print '
    '; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +if (isModEnabled('eventorganization') && $user->rights->eventorganization->read) { $langs->load("orders"); @@ -152,7 +152,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject -if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +if (isModEnabled('eventorganization') && $user->rights->eventorganization->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."eventorganization_myobject as s"; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index ca908e32e11..ab8c4a28cbc 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -11,7 +11,7 @@ * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2016-2018 Ferran Marcet * Copyright (C) 2016 Yasser Carreón - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric France * Copyright (C) 2020 Lenin Rivas * Copyright (C) 2022 Josep Lluís Amador * @@ -35,6 +35,7 @@ * \brief Card of a shipment */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; @@ -47,16 +48,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { +if (isModEnabled("product") || isModEnabled("service")) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; } -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->productbatch->enabled)) { +if (isModEnabled('productbatch')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -64,10 +65,10 @@ if (!empty($conf->project->enabled)) { // Load translation files required by the page $langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal')); -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load('incoterm'); } -if (!empty($conf->productbatch->enabled)) { +if (isModEnabled('productbatch')) { $langs->load('productbatch'); } @@ -163,7 +164,7 @@ if (empty($reshook)) { } // Set incoterm - if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + if ($action == 'set_incoterms' && isModEnabled('incoterm')) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } @@ -213,16 +214,18 @@ if (empty($reshook)) { $db->begin(); $object->note = GETPOST('note', 'alpha'); - $object->origin = $origin; + $object->origin = $origin; $object->origin_id = $origin_id; $object->fk_project = GETPOST('projectid', 'int'); - $object->weight = GETPOST('weight', 'int') == '' ? "NULL" : GETPOST('weight', 'int'); - $object->sizeH = GETPOST('sizeH', 'int') == '' ? "NULL" : GETPOST('sizeH', 'int'); - $object->sizeW = GETPOST('sizeW', 'int') == '' ? "NULL" : GETPOST('sizeW', 'int'); - $object->sizeS = GETPOST('sizeS', 'int') == '' ? "NULL" : GETPOST('sizeS', 'int'); + $object->weight = GETPOST('weight', 'int') == '' ? "NULL" : GETPOST('weight', 'int'); + $object->sizeH = GETPOST('sizeH', 'int') == '' ? "NULL" : GETPOST('sizeH', 'int'); + $object->sizeW = GETPOST('sizeW', 'int') == '' ? "NULL" : GETPOST('sizeW', 'int'); + $object->sizeS = GETPOST('sizeS', 'int') == '' ? "NULL" : GETPOST('sizeS', 'int'); $object->size_units = GETPOST('size_units', 'int'); $object->weight_units = GETPOST('weight_units', 'int'); + $product = new Product($db); + // We will loop on each line of the original document to complete the shipping object with various info and quantity to deliver $classname = ucfirst($object->origin); $objectsrc = new $classname($db); @@ -232,8 +235,8 @@ if (empty($reshook)) { $object->ref_customer = GETPOST('ref_customer', 'alpha'); $object->model_pdf = GETPOST('model'); $object->date_delivery = $date_delivery; // Date delivery planed - $object->fk_delivery_address = $objectsrc->fk_delivery_address; - $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); + $object->fk_delivery_address = $objectsrc->fk_delivery_address; + $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); $object->tracking_number = GETPOST('tracking_number', 'alpha'); $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); @@ -258,13 +261,23 @@ if (empty($reshook)) { $stockLocation = "ent1".$i."_0"; $qty = "qtyl".$i; - if (!empty($conf->productbatch->enabled) && $objectsrc->lines[$i]->product_tobatch) { // If product need a batch number + $is_batch_or_serial=0; + if (!empty($objectsrc->lines[$i]->fk_product)) { + $resultFetch = $product->fetch($objectsrc->lines[$i]->fk_product, '', '', '', 1, 1, 1); + if ($resultFetch < 0) { + setEventMessages($product->error, $product->errors, 'errors'); + } + $is_batch_or_serial = $product->status_batch; + } + + // If product need a batch or serial number + if (isModEnabled('productbatch') && $objectsrc->lines[$i]->product_tobatch) { if (GETPOSTISSET($batch)) { //shipment line with batch-enable product $qty .= '_'.$j; while (GETPOSTISSET($batch)) { // save line of detail into sub_qty - $sub_qty[$j]['q'] = GETPOST($qty, 'int'); // the qty we want to move for this stock record + $sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record $sub_qty[$j]['id_batch'] = GETPOST($batch, 'int'); // the id into llx_product_batch of stock record to move $subtotalqty += $sub_qty[$j]['q']; @@ -273,6 +286,12 @@ if (empty($reshook)) { //var_dump($sub_qty[$j]['q']); //var_dump($sub_qty[$j]['id_batch']); + //var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']); + if ($is_batch_or_serial==2 && $sub_qty[$j]['q']>1) { + setEventMessages($langs->trans("TooManyQtyForSerialNumber", $product->ref, ''), null, 'errors'); + $totalqty=0; + break 2; + } $j++; $batch = "batchl".$i."_".$j; $qty = "qtyl".$i.'_'.$j; @@ -284,12 +303,13 @@ if (empty($reshook)) { $totalqty += $subtotalqty; } else { - // No detail were provided for lots, so if a qty was provided, we can show an error. + // No detail were provided for lots, so if a qty was provided, we can throw an error. if (GETPOST($qty)) { // We try to set an amount // Case we dont use the list of available qty for each warehouse/lot // GUI does not allow this yet - setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse"), null, 'errors'); + setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse").' ('.$langs->trans("Line").' '.GETPOST($idl, 'int').')', null, 'errors'); + $error++; } } } elseif (GETPOSTISSET($stockLocation)) { @@ -326,8 +346,7 @@ if (empty($reshook)) { } //var_dump($batch_line[2]); - - if ($totalqty > 0) { // There is at least one thing to ship + if ($totalqty > 0 && !$error) { // There is at least one thing to ship and no error for ($i = 0; $i < $num; $i++) { $qty = "qtyl".$i; if (!isset($batch_line[$i])) { @@ -387,9 +406,9 @@ if (empty($reshook)) { $error++; } } - } else { + } elseif (!$error) { $labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip"); - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { $labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse"); } setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors'); @@ -435,10 +454,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -472,7 +491,7 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } // TODO add alternative status - //} elseif ($action == 'reopen' && (! empty($user->rights->expedition->creer) || ! empty($user->rights->expedition->shipping_advance->validate))) + //} elseif ($action == 'reopen' && (!empty($user->rights->expedition->creer) || !empty($user->rights->expedition->shipping_advance->validate))) //{ // $result = $object->setStatut(0); // if ($result < 0) @@ -480,7 +499,7 @@ if (empty($reshook)) { // setEventMessages($object->error, $object->errors, 'errors'); // } //} - } elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) { + } elseif ($action == 'setdate_livraison' && !empty($user->rights->expedition->creer)) { $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $object->fetch($id); @@ -737,7 +756,7 @@ if (empty($reshook)) { unset($_POST[$qty]); } } - } elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. + } elseif (!isModEnabled('stock') && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. $qty = "qtyl".$line_id; $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); @@ -771,10 +790,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -812,9 +831,13 @@ if (empty($reshook)) { * View */ +$title = $langs->trans("Shipment"); +if ($action == 'create2') { + $title = $langs->trans("CreateShipment"); +} $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen'; -llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url); +llxHeader('', $title, 'Expedition', $help_url); if (empty($action)) { $action = 'view'; @@ -823,7 +846,7 @@ if (empty($action)) { $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -859,7 +882,7 @@ if ($action == 'create') { $author = new User($db); $author->fetch($object->user_author_id); - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { $entrepot = new Entrepot($db); } @@ -868,7 +891,6 @@ if ($action == 'create') { print ''; print ''; print ''; - print ''; if (GETPOST('entrepot_id', 'int')) { print ''; } @@ -879,10 +901,10 @@ if ($action == 'create') { // Ref print '
    '; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; if (empty($projectid) && !empty($object->fk_project)) { $projectid = $object->fk_project; @@ -1004,7 +1026,7 @@ if ($action == 'create') { // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { if (empty($conf->productbatch->enabled)) { print ''; } else { @@ -1115,12 +1137,15 @@ if ($action == 'create') { $type = 1; } - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; // Product label if ($line->fk_product > 0) { // If predefined product - $product->fetch($line->fk_product); + $res = $product->fetch($line->fk_product); + if ($res < 0) { + dol_print_error($db, $product->error, $product->errors); + } $product->load_stock('warehouseopen'); // Load all $product->stock_warehouse[idwarehouse]->detail_batch //var_dump($product->stock_warehouse[1]); @@ -1135,7 +1160,7 @@ if ($action == 'create') { $product_static->status_buy = $line->product_tobuy; $product_static->status_batch = $line->product_tobatch; - $showdescinproductdesc = (getDolGlobalString('PRODUIT_DESC_IN_FORM') == 2 ? 1 : 0); + $showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE'); $text = $product_static->getNomUrl(1); $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); @@ -1204,7 +1229,7 @@ if ($action == 'create') { } $warehouseObject = null; - if (count($warehousePicking) == 1 || !($line->fk_product > 0) || empty($conf->stock->enabled)) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection + if (count($warehousePicking) == 1 || !($line->fk_product > 0) || !isModEnabled('stock')) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection print ''; //ship from preselected location $stock = + (isset($product->stock_warehouse[$warehouse_id]->real) ? $product->stock_warehouse[$warehouse_id]->real : 0); // Convert to number @@ -1222,7 +1247,7 @@ if ($action == 'create') { print ''; print ''; } else { - if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { + if (!empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { print ''; print ''; } @@ -1232,7 +1257,7 @@ if ($action == 'create') { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print '"; } @@ -421,11 +443,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").' ('.$langs->trans("Project").')'; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -481,13 +493,23 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + // Date start - end of event + print '
    '.$langs->trans("Dates").' ('.$langs->trans("Event").')'; + $start = dol_print_date($projectstatic->date_start_event, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($projectstatic->date_end_event, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); } print '
    '.$langs->trans("Location").''; + print $projectstatic->location; + print '
    '; - if ($origin == 'commande' && !empty($conf->commande->enabled)) { + if ($origin == 'commande' && isModEnabled('commande')) { print $langs->trans("RefOrder"); } - if ($origin == 'propal' && !empty($conf->propal->enabled)) { + if ($origin == 'propal' && isModEnabled("propal")) { print $langs->trans("RefProposal"); } print ''; @@ -910,7 +932,7 @@ if ($action == 'create') { print '
    '; @@ -1037,7 +1059,7 @@ if ($action == 'create') { $i = 0; while ($i < $numAsked) { print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; } $i++; @@ -1072,7 +1094,7 @@ if ($action == 'create') { } print ''.img_picto($langs->trans("Reset"), 'eraser').''; print ''.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')
    '; if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Type of product need stock change ? // Show warehouse combo list @@ -1319,10 +1344,10 @@ if ($action == 'create') { $detail = ''; $detail .= $langs->trans("Batch").': '.$dbatch->batch; - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (empty($conf->global->PRODUCT_DISABLE_SELLBY) && !empty($dbatch->sellby)) { $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); } - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + if (empty($conf->global->PRODUCT_DISABLE_EATBY) && !empty($dbatch->eatby)) { $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); } $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; @@ -1403,10 +1428,10 @@ if ($action == 'create') { $deliverableQty = GETPOST($inputName, 'int'); } - print ''; + print ''; print ''; } else { - if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { + if (!empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { print ''; } @@ -1415,7 +1440,7 @@ if ($action == 'create') { print ''; if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print $tmpwarehouseObject->getNomUrl(0).' '; @@ -1530,6 +1555,12 @@ if ($action == 'create') { } else { print 'TableLotIncompleteRunRepairWithParamStandardEqualConfirmed'; } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY) && !empty($dbatch->sellby)) { + print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); + } + if (empty($conf->global->PRODUCT_DISABLE_EATBY) && !empty($dbatch->eatby)) { + print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); + } print ' ('.$dbatch->qty.')'; $quantityToBeDelivered -= $deliverableQty; if ($quantityToBeDelivered < 0) { @@ -1550,7 +1581,7 @@ if ($action == 'create') { if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $disabled = ''; - if (!empty($conf->productbatch->enabled) && $product->hasbatch()) { + if (isModEnabled('productbatch') && $product->hasbatch()) { $disabled = 'disabled="disabled"'; } if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty. @@ -1679,7 +1710,7 @@ if ($action == 'create') { $text = $langs->trans("ConfirmValidateSending", $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -1712,11 +1743,11 @@ if ($action == 'create') { $totalVolume = $tmparray['volume']; - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } @@ -1726,41 +1757,27 @@ if ($action == 'create') { $morehtmlref = '
    '; // Ref customer shipment $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->expedition->creer, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.$conf->global->THIRDPARTY_REF_INPUT_SIZE : ''), '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if (0) { // Do not change on shipment + $morehtmlref .= '
    '; + if (0) { // Do not change on shipment + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on shipment, so we will use the project or source object instead - // TODO Add project on shipment - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -1777,7 +1794,7 @@ if ($action == 'create') { print ''; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { print ''; print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { print ''; print ''; // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '\n"; + $i++; } +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''; +} + +$db->free($resql); + +print "
    '; print $langs->trans("RefOrder").''; @@ -1785,7 +1802,7 @@ if ($action == 'create') { print "
    '; print $langs->trans("RefProposal").''; @@ -1968,7 +1985,7 @@ if ($action == 'create') { print '
    '; print ''; @@ -2056,11 +2073,11 @@ if ($action == 'create') { } else { print ''; } - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; } } @@ -2076,7 +2093,7 @@ if ($action == 'create') { $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -2155,7 +2172,7 @@ if ($action == 'create') { // Predefined product or service if ($lines[$i]->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($lines[$i]->fk_product); $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $lines[$i]->product_label; @@ -2188,10 +2205,10 @@ if ($action == 'create') { $text = $product_static->getNomUrl(1); $text .= ' - '.$label; - $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($lines[$i]->description)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description)); print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : ''); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '
    '.dol_htmlentitiesbr($lines[$i]->description) : ''; } print "\n"; @@ -2241,7 +2258,7 @@ if ($action == 'create') { print $shipment_static->getNomUrl(1); print ' - '.$shipmentline_var['qty_shipped']; $htmltext = $langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); - if (!empty($conf->stock->enabled) && $shipmentline_var['warehouse'] > 0) { + if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) { $warehousestatic->fetch($shipmentline_var['warehouse']); $htmltext .= '
    '.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); } @@ -2278,7 +2295,7 @@ if ($action == 'create') { // Batch number managment print ''; print ''; - } elseif (!empty($conf->stock->enabled)) { + } elseif (isModEnabled('stock')) { if ($lines[$i]->fk_product > 0) { if ($lines[$i]->entrepot_id > 0) { print ''; @@ -2317,7 +2334,7 @@ if ($action == 'create') { print ''; print ''; } - } elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. + } elseif (!isModEnabled('stock') && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. print ''; print ''; // Qty to ship or shipped @@ -2335,7 +2352,7 @@ if ($action == 'create') { print ''; // Warehouse source - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print '",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0").parent().append("")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0e.max?e.max:null!==e.min&&t"},_buttonHtml:function(){return""}});var ct;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.2",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ct=/#.*$/,function(t){var e=t.href.replace(ct,""),i=location.href.replace(ct,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("
    ").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.2",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("
    ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("
    ").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("
    ").attr("role","tooltip"),i=V("
    ").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip}); \ No newline at end of file diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php index 16689992c4c..7f7ed84e0dd 100644 --- a/htdocs/includes/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/JavascriptRenderer.php @@ -762,7 +762,7 @@ class JavascriptRenderer return $uris; } - if (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri)) { + if ($uri && (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri))) { return $uri; } return rtrim($root, '/') . "/$uri"; @@ -778,7 +778,7 @@ class JavascriptRenderer protected function filterAssetArray($array, $type = null) { $types = array('css', 'js', 'inline_css', 'inline_js', 'inline_head'); - $typeIndex = array_search(strtolower($type), $types); + $typeIndex = is_null($type) ? false : array_search(strtolower($type), $types); return $typeIndex !== false ? $array[$typeIndex] : $array; } diff --git a/htdocs/includes/php-iban/README.md b/htdocs/includes/php-iban/README.md index 78b5c121c30..238b8ea7678 100644 --- a/htdocs/includes/php-iban/README.md +++ b/htdocs/includes/php-iban/README.md @@ -9,10 +9,6 @@ php-iban All parts of an IBAN can be retrieved, including country code, checksum, BBAN, financial institution or bank code, account number, and where a fixed-length national system is in use, also branch/sort code. Legacy national checksums may also be retrieved, validated and correctly set, where available, whether they apply to the account number portion, bank and branch identifiers, part or all of the above. IBAN country codes can be converted in to ISO3166-1 alpha-2 and IANA formats, the parent IBAN country acting as registrar for dependent territories may be queried, the official national currency (ISO4217 alpha code format), central bank name and central bank URL may also be queried to ease integration. IBANs may be converted between human and machine representation. IBANs may be obfuscated for presentation to humans in special circumstances such as relative identification. A database of example/test IBANs from different countries is included. Finally, highly accurate suggestions for originally intended input can be made when an incorrect IBAN is detected and is due to mistranscription error. -Tested on PHP versions: ![PHP 5.2](https://img.shields.io/badge/version-PHP%205.2%2B-lightgrey.svg) ![PHP 5.3](https://img.shields.io/badge/version-PHP%205.3%2B-lightgrey.svg) ![PHP 5.4](https://img.shields.io/badge/version-PHP%205.4%2B-lightgrey.svg) ![PHP 5.5](https://img.shields.io/badge/version-PHP%205.5%2B-lightgrey.svg) ![PHP 5.6](https://img.shields.io/badge/version-PHP%205.6%2B-lightgrey.svg) ![PHP 7.0](https://img.shields.io/badge/version-PHP%207.0%2B-lightgrey.svg) ![PHP 7.4](https://img.shields.io/badge/version-PHP%207.4%2B-lightgrey.svg) - -Test on HHVM versions: ![HHVM 3.3](https://img.shields.io/badge/version-HHVM%203.3%2B-lightgrey.svg) ![HHVM 3.6](https://img.shields.io/badge/version-HHVM%203.6%2B-lightgrey.svg) ![HHVM 3.9](https://img.shields.io/badge/version-HHVM%203.9%2B-lightgrey.svg) ![HHVM 3.12](https://img.shields.io/badge/version-HHVM%203.12%2B-lightgrey.svg) ![HHVM 3.15](https://img.shields.io/badge/version-HHVM%203.15%2B-lightgrey.svg) ![HHVM 3.18](https://img.shields.io/badge/version-HHVM%203.18%2B-lightgrey.svg) - The parser was built using regular expressions to adapt the contents of the _official_ IBAN registry available from SWIFT then manually modified for special cases such as [errors and omissions in SWIFT's official specifications](https://raw.githubusercontent.com/globalcitizen/php-iban/master/docs/COMEDY-OF-ERRORS). Various deficiencies in the initial adaptation have since been rectified, and the current version should be a fairly correct and reliable implementation. @@ -256,14 +252,14 @@ The following table compares __php-iban__ to other PHP projects offering IBAN-re | Project | Lic. | Proc | OO | Began | Latest | Star | Watch | Fork | Installs | Home culture | Deps | | ---------------------------------------------------------- | ---- | ---- | --- | ------ | ------ | ---- | ----- | ---- | -------- | ------------ | ------- | -| __php-iban__ | LGPL | ✔ | ✔ | 2009 | 4.1.0 | 344 | 26 | 76 | ~2M* | Global* | *none* | +| __php-iban__ | LGPL | ✔ | ✔ | 2009 | 4.1.1 | 414 | 28 | 98 | ~3.5M* | Global* | *none* | | [Iban](https://github.com/jschaedl/Iban) | MIT | ✘ | ✔ | 2013 | 1.3.0 | 50 | 9 | 19 | 178.39k | German | lots | | [IsoCodes](https://github.com/ronanguilloux/IsoCodes) | GPL3 | ✘ | ✔ | 2012 | 2.1.1 | 466 | 22 | 54 | 145k | French | lots | | [SepaUtil's](https://github.com/AbcAeffchen/SepaUtilities) | GPL3 | ✘ | ✔ | 2014 | 1.2.3 | 8 | 4 | 3 | 25k | German | phpunit | | [Symfony](https://github.com/symfony/symfony) | MIT | ✘ | ✔ | 2013 | 3.3.6 | 15k | 1214 | 5.6k | 23M+ | French | lots | Notes: - * Original download records for __php-iban__ releases were hosted on Google Code and are now lost. Prior to establishing a release process on Github, we just expected that people would download the code... so we're really not sure how many installs exist, but this is a fair guess (~11k + composer installs + a little bit now and then). + * Original download records for __php-iban__ releases were hosted on Google Code and are now lost. Prior to establishing a release process on Github, we just expected that people would download the code... so we're really not sure how many installs exist, but this is a fair guess (now over 3M composer installs + all prior google code and Github installs). * __php-iban__ also powers: * [adm-gravity-iban](https://github.com/InternativeNL/adm-gravity-iban) * [Azzana consulting's XML Solver for ISO20022](http://www.azzana-consulting.com/xmlsolver/) @@ -324,6 +320,12 @@ Your Help Wanted * If you are willing to spend some time searching, we could do with some more test IBANs for most countries, especially smaller ones... +News: August 2022 +----------------- + +__[Version 4.1.1](https://github.com/globalcitizen/php-iban/releases/tag/v4.1.1)__ has been released. + * Long-standing bug affecting Belgian pre-IBAN national checksum verification fixed - thanks to [Arne Peirs](https://github.com/Olympic1) for a [very well documented pull request](https://github.com/globalcitizen/php-iban/pull/119). + News: July 2021 --------------- diff --git a/htdocs/includes/php-iban/php-iban.php b/htdocs/includes/php-iban/php-iban.php index 902cc1e2669..effc0cbf6a8 100644 --- a/htdocs/includes/php-iban/php-iban.php +++ b/htdocs/includes/php-iban/php-iban.php @@ -29,7 +29,7 @@ function verify_iban($iban,$machine_format_only=false) { # Check regex if(preg_match($regex,$iban)) { # Regex passed, check checksum - if(!iban_verify_checksum($iban)) { + if(!iban_verify_checksum($iban)) { return false; } } @@ -56,9 +56,9 @@ function iban_to_machine_format($iban) { # Convert an IBAN to human format. To do this, we # simply insert spaces right now, as per the ECBS -# (European Committee for Banking Standards) +# (European Committee for Banking Standards) # recommendations available at: -# http://www.europeanpaymentscouncil.eu/knowledge_bank_download.cfm?file=ECBS%20standard%20implementation%20guidelines%20SIG203V3.2.pdf +# http://www.europeanpaymentscouncil.eu/knowledge_bank_download.cfm?file=ECBS%20standard%20implementation%20guidelines%20SIG203V3.2.pdf function iban_to_human_format($iban) { # Remove all spaces $iban = str_replace(' ','',$iban); @@ -71,15 +71,15 @@ function iban_to_human_format($iban) { # asterisk, except for the final four characters, and then # return in human format, ie. # HU69107000246667654851100005 -> HU** **** **** **** **** **** 0005 -# +# # We avoid the checksum as it may be used to infer the rest # of the IBAN in cases where the country has few valid banks # and branches, or other information about the account such # as bank, branch, or date issued is known (where a sequential # issuance scheme is in use). -# -# Note that output of this function should be presented with -# other information to a user, such as the date last used or +# +# Note that output of this function should be presented with +# other information to a user, such as the date last used or # the date added to their account, in order to better facilitate # unambiguous relative identification. function iban_to_obfuscated_format($iban) { @@ -439,10 +439,10 @@ function iban_country_get_is_eu_member($iban_country) { # - turkish TL/TK thing # - norway NO gets dropped due to mis-identification with "No." for number (ie. if no country code try prepending NO) function iban_mistranscription_suggestions($incorrect_iban) { - + # remove funky characters $incorrect_iban = iban_to_machine_format($incorrect_iban); - + # abort on ridiculous length input (but be liberal) $length = strlen($incorrect_iban); if($length<5 || $length>34) { return array('(supplied iban length insane)'); } @@ -663,7 +663,7 @@ function _iban_nationalchecksum_set($iban,$nationalchecksum) { return $fixed_iban; } -# Currently unused but may be useful for Norway. +# Currently unused but may be useful for Norway. # ISO7064 MOD11-2 # Adapted from https://gist.github.com/andreCatita/5714353 by Andrew Catita function _iso7064_mod112_catita($input) { @@ -678,7 +678,7 @@ function _iso7064_mod112_catita($input) { return $result; } -# Currently unused but may be useful for Norway. +# Currently unused but may be useful for Norway. # ISO 7064:1983.MOD 11-2 # by goseaside@sina.com function _iso7064_mod112_goseaside($vString) { @@ -688,10 +688,10 @@ function _iso7064_mod112_goseaside($vString) { $i_size = strlen($vString); $bModify = '?' == substr($vString, -1); $i_size1 = $bModify ? $i_size : $i_size + 1; - for ($i = 1; $i <= $i_size; $i++) { + for ($i = 1; $i <= $i_size; $i++) { $i1 = $vString[$i - 1] * 1; $w1 = $wi[($i_size1 - $i) % 10]; - $sigma += ($i1 * $w1) % 11; + $sigma += ($i1 * $w1) % 11; } if($bModify) return str_replace('?', $hash_map[($sigma % 11)], $vString); else return $hash_map[($sigma % 11)]; @@ -714,13 +714,13 @@ function _iso7064_mod97_10($str) { } # Implement the national checksum for a Belgium (BE) IBAN -# (Credit: @gaetan-be) +# (Credit: @gaetan-be, fixed by @Olympic1) function _iban_nationalchecksum_implementation_be($iban,$mode) { if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution $nationalchecksum = iban_get_nationalchecksum_part($iban); - $account = iban_get_account_part($iban); - $account_less_checksum = substr($account,strlen($account)-2); - $expected_nationalchecksum = $account_less_checksum % 97; + $bban = iban_get_bban_part($iban); + $bban_less_checksum = substr($bban, 0, -strlen($nationalchecksum)); + $expected_nationalchecksum = $bban_less_checksum % 97; if($mode=='find') { return $expected_nationalchecksum; } @@ -776,8 +776,8 @@ function _iban_nationalchecksum_implementation_es($iban,$mode) { function _iban_nationalchecksum_implementation_fr_letters2numbers_helper($bban) { $allNumbers = ""; $conversion = array( - "A" => 1, "B" => 2, "C" => 3, "D" => 4, "E" => 5, "F" => 6, "G" => 7, "H" => 8, "I" => 9, - "J" => 1, "K" => 2, "L" => 3, "M" => 4, "N" => 5, "O" => 6, "P" => 7, "Q" => 8, "R" => 9, + "A" => 1, "B" => 2, "C" => 3, "D" => 4, "E" => 5, "F" => 6, "G" => 7, "H" => 8, "I" => 9, + "J" => 1, "K" => 2, "L" => 3, "M" => 4, "N" => 5, "O" => 6, "P" => 7, "Q" => 8, "R" => 9, "S" => 2, "T" => 3, "U" => 4, "V" => 5, "W" => 6, "X" => 7, "Y" => 8, "Z" => 9 ); for ($i=0; $i < strlen($bban); $i++) { @@ -852,7 +852,7 @@ function _iban_nationalchecksum_implementation_mc($iban,$mode) { } # Implement the national checksum for a France (FR) IBAN -# (Credit: @gaetan-be, http://www.credit-card.be/BankAccount/ValidationRules.htm#FR_Validation and +# (Credit: @gaetan-be, http://www.credit-card.be/BankAccount/ValidationRules.htm#FR_Validation and # https://docs.oracle.com/cd/E18727_01/doc.121/e13483/T359831T498954.htm) function _iban_nationalchecksum_implementation_fr($iban,$mode) { if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution @@ -1100,7 +1100,7 @@ function _iban_nationalchecksum_implementation_pt($iban,$mode) { } # Implement the national checksum for an Serbia (RS) IBAN -# (NOTE: Reverse engineered, including bank 'Narodna banka Srbije' (908) exception. For two +# (NOTE: Reverse engineered, including bank 'Narodna banka Srbije' (908) exception. For two # separately published and legitimate looking IBANs from that bank, there appears to # be a +97 offset on the checksum, so we simply ignore all checksums for this bank.) function _iban_nationalchecksum_implementation_rs($iban,$mode) { @@ -1118,7 +1118,7 @@ function _iban_nationalchecksum_implementation_rs($iban,$mode) { function _iban_nationalchecksum_implementation_si($iban,$mode) { $bank = iban_get_bank_part($iban); # Bank of Slovenia does not use the legacy checksum scheme. - # Accounts in this namespace appear to be the central bank + # Accounts in this namespace appear to be the central bank # accounts for licensed local banks. if($bank == '01') { return ''; @@ -1277,7 +1277,7 @@ function _iban_nationalchecksum_implementation_sm($iban,$mode) { # Italian (and San Marino's) checksum # (Credit: Translated by Francesco Zanoni from http://community.visual-basic.it/lucianob/archive/2004/12/26/2464.aspx) -# (Source: European Commettee of Banking Standards' Register of European Account Numbers (TR201 V3.23 — FEBRUARY 2007), +# (Source: European Commettee of Banking Standards' Register of European Account Numbers (TR201 V3.23 — FEBRUARY 2007), # available at URL http://www.cnb.cz/cs/platebni_styk/iban/download/TR201.pdf) function _italian($input) { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index ce148874d02..a89a017b0fb 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -403,8 +403,8 @@ class CommentParser $code = 500; $exception = 'Exception'; if (count($value) > 1) { - $v1 = $value[0]; - $v2 = $value[1]; + $v1 = empty($value[0]) ? null : $value[0]; + $v2 = empty($value[1]) ? null : $value[1]; if (is_numeric($v1)) { $code = $v1; $exception = $v2; diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php index 78bfc5b5bf4..2fea49ef4ce 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php @@ -1337,14 +1337,14 @@ class TCPDFBarcode { // calculate check digit $sum_a = 0; for ($i = 1; $i < $data_len; $i+=2) { - $sum_a += $code[$i]; + $sum_a += (int) $code[$i]; } if ($len > 12) { $sum_a *= 3; } $sum_b = 0; for ($i = 0; $i < $data_len; $i+=2) { - $sum_b += ($code[$i]); + $sum_b += (int) ($code[$i]); } if ($len < 13) { $sum_b *= 3; @@ -2171,7 +2171,7 @@ class TCPDFBarcode { /** * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 - * + * * @param $code (string) pre-formatted IMB barcode (65 chars "FADT") * @return array barcode representation. * @protected diff --git a/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/bug_report.md b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000..735fbe018f9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Used config** +Please provide the used config, if you are not using the package default config. + +**Code to Reproduce** +The troubling code section which produces the reported bug. +```php +echo "Bug"; +``` + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop / Server (please complete the following information):** +- OS: [e.g. Debian 10] +- PHP: [e.g. 5.5.9] +- Version [e.g. v2.3.1] + +**Additional context** +Add any other context about the problem here. diff --git a/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/feature_request.md b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000000..066b2d920a2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/general-help-request.md b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/general-help-request.md new file mode 100644 index 00000000000..49809d14033 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/.github/ISSUE_TEMPLATE/general-help-request.md @@ -0,0 +1,12 @@ +--- +name: General help request +about: Feel free to ask about any project related stuff + +--- + +Please be aware that these issues will be closed if inactive for more then 14 days. + +Also make sure to use https://github.com/Webklex/php-imap/issues/new?template=bug_report.md if you want to report a bug +or https://github.com/Webklex/php-imap/issues/new?template=feature_request.md if you want to suggest a feature. + +Still here? Well clean this out and go ahead :) diff --git a/htdocs/includes/webklex/php-imap/.gitignore b/htdocs/includes/webklex/php-imap/.gitignore new file mode 100644 index 00000000000..82955a58640 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/.gitignore @@ -0,0 +1,3 @@ +composer.lock +.idea +/build/ diff --git a/htdocs/includes/webklex/php-imap/CHANGELOG.md b/htdocs/includes/webklex/php-imap/CHANGELOG.md new file mode 100755 index 00000000000..a2ce640de53 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/CHANGELOG.md @@ -0,0 +1,577 @@ +# Changelog + +All notable changes to `webklex/php-imap` will be documented in this file. + +Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [UNRELEASED] +### Fixed +- NaN + +### Added +- NaN + +### Affected Classes +- NaN + +### Breaking changes +- NaN + +## [2.7.2] - 2021-09-27 +### Fixed +- Fixed problem with skipping last line of the response. #166 (thanks @szymekjanaczek) + +## [2.7.1] - 2021-09-08 +### Added +- Added `UID` as available search criteria #161 (thanks @szymekjanaczek) + +## [2.7.0] - 2021-09-04 +### Fixed +- Fixes handling of long header lines which are seperated by `\r\n\t` (thanks @Oliver-Holz) +- Fixes to line parsing with multiple addresses (thanks @Oliver-Holz) + +### Added +- Expose message folder path #154 (thanks @Magiczne) +- Adds mailparse_rfc822_parse_addresses integration (thanks @Oliver-Holz) +- Added moveManyMessages method (thanks @Magiczne) +- Added copyManyMessages method (thanks @Magiczne) + +### Affected Classes +- [Header::class](src/Header.php) +- [Message::class](src/Message.php) + +## [2.6.0] - 2021-08-20 +### Fixed +- POP3 fixes #151 (thanks @Korko) + +### Added +- Added imap 4 handling. #146 (thanks @szymekjanaczek) +- Added laravel's conditionable methods. #147 (thanks @szymekjanaczek) + +### Affected Classes +- [Query::class](src/Query/Query.php) +- [Client::class](src/Client.php) + +## [2.5.1] - 2021-06-19 +### Fixed +- Fix setting default mask from config #133 (thanks @shacky) +- Chunked fetch fails in case of less available mails than page size #114 +- Protocol::createStream() exception information fixed #137 +- Legacy methods (headers, content, flags) fixed #125 +- Legacy connection cycle fixed #124 (thanks @zssarkany) + +### Added +- Disable rfc822 header parsing via config option #115 + +## [2.5.0] - 2021-02-01 +### Fixed +- Attachment saving filename fixed +- Unnecessary parameter removed from `Client::getTimeout()` +- Missing encryption variable added - could have caused problems with unencrypted communications +- Prefer attachment filename attribute over name attribute #82 +- Missing connection settings added to `Folder:idle()` auto mode #89 +- Message move / copy expect a folder path #79 +- `Client::getFolder()` updated to circumvent special edge cases #79 +- Missing connection status checks added to various methods +- Unused default attribute `message_no` removed from `Message::class` + +### Added +- Dynamic Attribute access support added (e.g `$message->from[0]`) +- Message not found exception added #93 +- Chunked fetching support added `Query::chunked()`. Just in case you can't fetch all messages at once +- "Soft fail" support added +- Count method added to `Attribute:class` +- Convert an Attribute instance into a Carbon date object #95 + +### Affected Classes +- [Attachment::class](src/Attachment.php) +- [Attribute::class](src/Attribute.php) +- [Query::class](src/Query/Query.php) +- [Message::class](src/Message.php) +- [Client::class](src/Client.php) +- [Folder::class](src/Folder.php) + +### Breaking changes +- A new exception can occur if a message can't be fetched (`\Webklex\PHPIMAP\Exceptions\MessageNotFoundException::class`) +- `Message::move()` and `Message::copy()` no longer accept folder names as folder path +- A `Message::class` instance might no longer have a `message_no` attribute + +## [2.4.4] - 2021-01-22 +### Fixed +- Boundary detection simplified #90 +- Prevent potential body overwriting #90 +- CSV files are no longer regarded as plain body +- Boundary detection overhauled to support "related" and "alternative" multipart messages #90 #91 + +### Affected Classes +- [Structure::class](src/Structure.php) +- [Message::class](src/Message.php) +- [Header::class](src/Header.php) +- [Part::class](src/Part.php) + +## [2.4.3] - 2021-01-21 +### Fixed +- Attachment detection updated #82 #90 +- Timeout handling improved +- Additional utf-8 checks added to prevent decoding of unencoded values #76 + +### Added +- Auto reconnect option added to `Folder::idle()` #89 + +### Affected Classes +- [Folder::class](src/Folder.php) +- [Part::class](src/Part.php) +- [Client::class](src/Client.php) +- [Header::class](src/Header.php) + +## [2.4.2] - 2021-01-09 +### Fixed +- Attachment::save() return error 'A facade root has not been set' #87 +- Unused dependencies removed +- Fix PHP 8 error that changes null back in to an empty string. #88 (thanks @mennovanhout) +- Fix regex to be case insensitive #88 (thanks @mennovanhout) + +### Affected Classes +- [Attachment::class](src/Attachment.php) +- [Address::class](src/Address.php) +- [Attribute::class](src/Attribute.php) +- [Structure::class](src/Structure.php) + +## [2.4.1] - 2021-01-06 +### Fixed +- Debug line position fixed +- Handle incomplete address to string conversion #83 +- Configured message key gets overwritten by the first fetched message #84 + +### Affected Classes +- [Address::class](src/Address.php) +- [Query::class](src/Query/Query.php) + +## [2.4.0] - 2021-01-03 +### Fixed +- Get partial overview when `IMAP::ST_UID` is set #74 +- Unnecessary "'" removed from address names +- Folder referral typo fixed +- Legacy protocol fixed +- Treat message collection keys always as strings + +### Added +- Configurable supported default flags added +- Message attribute class added to unify value handling +- Address class added and integrated +- Alias `Message::attachments()` for `Message::getAttachments()` added +- Alias `Message::addFlag()` for `Message::setFlag()` added +- Alias `Message::removeFlag()` for `Message::unsetFlag()` added +- Alias `Message::flags()` for `Message::getFlags()` added +- New Exception `MessageFlagException::class` added +- New method `Message::setSequenceId($id)` added +- Optional Header attributizion option added + +### Affected Classes +- [Folder::class](src/Folder.php) +- [Header::class](src/Header.php) +- [Message::class](src/Message.php) +- [Address::class](src/Address.php) +- [Query::class](src/Query/Query.php) +- [Attribute::class](src/Attribute.php) + +### Breaking changes +- Stringified message headers are now separated by ", " instead of " ". +- All message header values such as subject, message_id, from, to, etc now consists of an `Àttribute::class` instance (should behave the same way as before, but might cause some problem in certain edge cases) +- The formal address object "from", "to", etc now consists of an `Address::class` instance (should behave the same way as before, but might cause some problem in certain edge cases) +- When fetching or manipulating message flags a `MessageFlagException::class` exception can be thrown if a runtime error occurs +- Learn more about the new `Attribute` class here: [www.php-imap.com/api/attribute](https://www.php-imap.com/api/attribute) +- Learn more about the new `Address` class here: [www.php-imap.com/api/address](https://www.php-imap.com/api/address) +- Folder attribute "referal" is now called "referral" + +## [2.3.1] - 2020-12-30 +### Fixed +- Missing RFC attributes added +- Set the message sequence when idling +- Missing UID commands added #64 + +### Added +- Get a message by its message number +- Get a message by its uid #72 #66 #63 + +### Affected Classes +- [Message::class](src/Message.php) +- [Folder::class](src/Folder.php) +- [Query::class](src/Query/Query.php) + +## [2.3.0] - 2020-12-21 +### Fixed +- Cert validation issue fixed +- Allow boundaries ending with a space or semicolon (thanks [@smartilabs](https://github.com/smartilabs)) +- Ignore IMAP DONE command response #57 +- Default `options.fetch` set to `IMAP::FT_PEEK` +- Address parsing fixed #60 +- Alternative rfc822 header parsing fixed #60 +- Parse more than one Received: header #61 +- Fetch folder overview fixed +- `Message::getTextBody()` fallback value fixed + +### Added +- Proxy support added +- Flexible disposition support added #58 +- New `options.message_key` option `uid` added +- Protocol UID support added +- Flexible sequence type support added + +### Affected Classes +- [Structure::class](src/Structure.php) +- [Query::class](src/Query/Query.php) +- [Client::class](src/Client.php) +- [Header::class](src/Header.php) +- [Folder::class](src/Folder.php) +- [Part::class](src/Part.php) + +### Breaking changes +- Depending on your configuration, your certificates actually get checked. Which can cause an aborted connection if the certificate can not be validated. +- Messages don't get flagged as read unless you are using your own custom config. +- All `Header::class` attribute keys are now in a snake_format and no longer minus-separated. +- `Message::getTextBody()` no longer returns false if no text body is present. `null` is returned instead. + +## [2.2.5] - 2020-12-11 +### Fixed +- Missing array decoder method added #51 (thanks [@lutchin](https://github.com/lutchin)) +- Additional checks added to prevent message from getting marked as seen #33 +- Boundary parsing improved #39 #36 (thanks [@AntonioDiPassio-AppSys](https://github.com/AntonioDiPassio-AppSys)) +- Idle operation updated #44 + +### Added +- Force a folder to be opened + +### Affected Classes +- [Header::class](src/Header.php) +- [Folder::class](src/Folder.php) +- [Query::class](src/Query/Query.php) +- [Message::class](src/Message.php) +- [Structure::class](src/Structure.php) + +## [2.2.4] - 2020-12-08 +### Fixed +- Search performance increased by fetching all headers, bodies and flags at once #42 +- Legacy protocol support updated +- Fix Query pagination. (#52 [@mikemiller891](https://github.com/mikemiller891)) + +### Added +- Missing message setter methods added +- `Folder::overview()` method added to fetch all headers of all messages in the current folder + +### Affected Classes +- [Message::class](src/Message.php) +- [Folder::class](src/Folder.php) +- [Query::class](src/Query/Query.php) +- [PaginatedCollection::class](src/Support/PaginatedCollection.php) + +## [2.2.3] - 2020-11-02 +### Fixed +- Text/Html body fetched as attachment if subtype is null #34 +- Potential header overwriting through header extensions #35 +- Prevent empty attachments #37 + +### Added +- Set fetch order during query #41 [@Max13](https://github.com/Max13) + +### Affected Classes +- [Message::class](src/Message.php) +- [Part::class](src/Part.php) +- [Header::class](src/Header.php) +- [Query::class](src/Query/Query.php) + + +## [2.2.2] - 2020-10-20 +### Fixed +- IMAP::FT_PEEK removing "Seen" flag issue fixed #33 + +### Affected Classes +- [Message::class](src/Message.php) + +## [2.2.1] - 2020-10-19 +### Fixed +- Header decoding problem fixed #31 + +### Added +- Search for messages by message-Id +- Search for messages by In-Reply-To +- Message threading added `Message::thread()` +- Default folder locations added + +### Affected Classes +- [Query::class](src/Query/Query.php) +- [Message::class](src/Message.php) +- [Header::class](src/Header.php) + + +## [2.2.0] - 2020-10-16 +### Fixed +- Prevent text bodies from being fetched as attachment #27 +- Missing variable check added to prevent exception while parsing an address [webklex/laravel-imap #356](https://github.com/Webklex/laravel-imap/issues/356) +- Missing variable check added to prevent exception while parsing a part subtype #27 +- Missing variable check added to prevent exception while parsing a part content-type [webklex/laravel-imap #356](https://github.com/Webklex/laravel-imap/issues/356) +- Mixed message header attribute `in_reply_to` "unified" to be always an array #26 +- Potential message moving / copying problem fixed #29 +- Move messages by using `Protocol::moveMessage()` instead of `Protocol::copyMessage()` and `Message::delete()` #29 + +### Added +- `Protocol::moveMessage()` method added #29 + +### Affected Classes +- [Message::class](src/Message.php) +- [Header::class](src/Header.php) +- [Part::class](src/Part.php) + +### Breaking changes +- Text bodies might no longer get fetched as attachment +- `Message::$in_reply_to` type changed from mixed to array + +## [2.1.13] - 2020-10-13 +### Fixed +- Boundary detection problem fixed (#28 [@DasTobbel](https://github.com/DasTobbel)) +- Content-Type detection problem fixed (#28 [@DasTobbel](https://github.com/DasTobbel)) + +### Affected Classes +- [Structure::class](src/Structure.php) + +## [2.1.12] - 2020-10-13 +### Fixed +- If content disposition is multiline, implode the array to a simple string (#25 [@DasTobbel](https://github.com/DasTobbel)) + +### Affected Classes +- [Part::class](src/Part.php) + +## [2.1.11] - 2020-10-13 +### Fixed +- Potential problematic prefixed white-spaces removed from header attributes + +### Added +- Expended `Client::getFolder($name, $deleimiter = null)` to accept either a folder name or path ([@DasTobbel](https://github.com/DasTobbel)) +- Special MS-Exchange header decoding support added + +### Affected Classes +- [Client::class](src/Client.php) +- [Header::class](src/Header.php) + +## [2.1.10] - 2020-10-09 +### Added +- `ClientManager::make()` method added to support undefined accounts + +### Affected Classes +- [ClientManager::class](src/ClientManager.php) + +## [2.1.9] - 2020-10-08 +### Fixed +- Fix inline attachments and embedded images (#22 [@dwalczyk](https://github.com/dwalczyk)) + +### Added +- Alternative attachment names support added (#20 [@oneFoldSoftware](https://github.com/oneFoldSoftware)) +- Fetch message content without leaving a "Seen" flag behind + +### Affected Classes +- [Attachment::class](src/Attachment.php) +- [Message::class](src/Message.php) +- [Part::class](src/Part.php) +- [Query::class](src/Query/Query.php) + +## [2.1.8] - 2020-10-08 +### Fixed +- Possible error during address decoding fixed (#16 [@Slauta](https://github.com/Slauta)) +- Flag event dispatching fixed #15 + +### Added +- Support multiple boundaries (#17, #19 [@dwalczyk](https://github.com/dwalczyk)) + +### Affected Classes +- [Structure::class](src/Structure.php) + +## [2.1.7] - 2020-10-03 +### Fixed +- Fixed `Query::paginate()` (#13 #14 by [@Max13](https://github.com/Max13)) + +### Affected Classes +- [Query::class](src/Query/Query.php) + +## [2.1.6] - 2020-10-02 +### Fixed +- `Message::getAttributes()` hasn't returned all parameters + +### Affected Classes +- [Message::class](src/Message.php) + +### Added +- Part number added to attachment +- `Client::getFolderByPath()` added (#12 by [@Max13](https://github.com/Max13)) +- `Client::getFolderByName()` added (#12 by [@Max13](https://github.com/Max13)) +- Throws exceptions if the authentication fails (#11 by [@Max13](https://github.com/Max13)) + +### Affected Classes +- [Client::class](src/Client.php) + +## [2.1.5] - 2020-09-30 +### Fixed +- Wrong message content property reference fixed (#10) + +## [2.1.4] - 2020-09-30 +### Fixed +- Fix header extension values +- Part header detection method changed (#10) + +### Affected Classes +- [Header::class](src/Header.php) +- [Part::class](src/Part.php) + +## [2.1.3] - 2020-09-29 +### Fixed +- Possible decoding problem fixed +- `Str::class` dependency removed from `Header::class` + +### Affected Classes +- [Header::class](src/Header.php) + +## [2.1.2] - 2020-09-28 +### Fixed +- Dependency problem in `Attachement::getExtension()` fixed (#9) + +### Affected Classes +- [Attachment::class](src/Attachment.php) + +## [2.1.1] - 2020-09-23 +### Fixed +- Missing default config parameter added + +### Added +- Default account config fallback added + +### Affected Classes +- [Client::class](src/Client.php) + +## [2.1.0] - 2020-09-22 +### Fixed +- Quota handling fixed + +### Added +- Event system and callbacks added + +### Affected Classes +- [Client::class](src/Client.php) +- [Folder::class](src/Folder.php) +- [Message::class](src/Message.php) + +## [2.0.1] - 2020-09-20 +### Fixed +- Carbon dependency fixed + +## [2.0.0] - 2020-09-20 +### Fixed +- Missing pagination item records fixed + +### Added +- php-imap module replaced by direct socket communication +- Legacy support added +- IDLE support added +- oAuth support added +- Charset detection method updated +- Decoding fallback charsets added + +### Affected Classes +- All + +## [1.4.5] - 2019-01-23 +### Fixed +- .csv attachement is not processed +- mail part structure property comparison changed to lowercase +- Replace helper functions for Laravel 6.0 #4 (@koenhoeijmakers) +- Date handling in Folder::appendMessage() fixed +- Carbon Exception Parse Data +- Convert sender name from non-utf8 to uf8 (@hwilok) +- Convert encoding of personal data struct + +### Added +- Path prefix option added to Client::getFolder() method +- Attachment size handling added +- Find messages by custom search criteria + +### Affected Classes +- [Query::class](src/Query/WhereQuery.php) +- [Mask::class](src/Support/Masks/Mask.php) +- [Attachment::class](src/Attachment.php) +- [Client::class](src/Client.php) +- [Folder::class](src/Folder.php) +- [Message::class](src/Message.php) + +## [1.4.2.1] - 2019-07-03 +### Fixed +- Error in Attachment::__construct #3 +- Examples added + +## [1.4.2] - 2019-07-02 +### Fixed +- Pagination count total bug #213 +- Changed internal message move and copy methods #210 +- Query::since() query returning empty response #215 +- Carbon Exception Parse Data #45 +- Reading a blank body (text / html) but only from this sender #203 +- Problem with Message::moveToFolder() and multiple moves #31 +- Problem with encoding conversion #203 +- Message null value attribute problem fixed +- Client connection path handling changed to be handled inside the calling method #31 +- iconv(): error suppressor for //IGNORE added #184 +- Typo Folder attribute fullName changed to full_name +- Query scope error fixed #153 +- Replace embedded image with URL #151 +- Fix sender name in non-latin emails sent from Gmail (#155) +- Fix broken non-latin characters in body in ASCII (us-ascii) charset #156 +- Message::getMessageId() returns wrong value #197 +- Message date validation extended #45 #192 +- Removed "-i" from "iso-8859-8-i" in Message::parseBody #146 + +### Added +- Message::getFolder() method +- Create a fast count method for queries #216 +- STARTTLS encryption alias added +- Mailbox fetching exception added #201 +- Message::moveToFolder() fetches new Message::class afterwards #31 +- Message structure accessor added #182 +- Shadow Imap const class added #188 +- Connectable "NOT" queries added +- Additional where methods added +- Message attribute handling changed +- Attachment attribute handling changed +- Message flag handling updated +- Message::getHTMLBody($callback) extended +- Masks added (take look at the examples for more information on masks) +- More examples added +- Query::paginate() method added +- Imap client timeout can be modified and read #186 +- Decoder config options added #175 +- Message search criteria "NOT" added #181 +- Invalid message date exception added +- Blade examples + +### Breaking changes +- Message::moveToFolder() returns either a Message::class instance or null and not a boolean +- Folder::fullName is now Folder::full_name +- Attachment::image_src might no longer work as expected - use Attachment::getImageSrc() instead + +### Affected Classes +- [Folder::class](src/Folder.php) +- [Client::class](src/Client.php) +- [Message::class](src/Message.php) +- [Attachment::class](src/Attachment.php) +- [Query::class](src/Query/Query.php) +- [WhereQuery::class](src/Query/WhereQuery.php) + +## 0.0.3 - 2018-12-02 +### Fixed +- Folder delimiter check added #137 +- Config setting not getting loaded +- Date parsing updated + +### Affected Classes +- [Folder::class](src/IMAP/Client.php) +- [Folder::class](src/IMAP/Message.php) + +## 0.0.1 - 2018-08-13 +### Added +- new php-imap package (fork from [webklex/laravel-imap](https://github.com/Webklex/laravel-imap)) diff --git a/htdocs/includes/webklex/php-imap/CODE_OF_CONDUCT.md b/htdocs/includes/webklex/php-imap/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2ed07c83f5f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at github@webklex.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/htdocs/includes/webklex/php-imap/LICENSE b/htdocs/includes/webklex/php-imap/LICENSE new file mode 100644 index 00000000000..6c13191e712 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Webklex + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/LICENSE.md b/htdocs/includes/webklex/php-imap/LICENSE.md new file mode 100644 index 00000000000..feae5f320dc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2016 Malte Goldenbaum + +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/README.md b/htdocs/includes/webklex/php-imap/README.md new file mode 100755 index 00000000000..65012298af2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/README.md @@ -0,0 +1,158 @@ + +# IMAP Library for PHP + +[![Latest Version on Packagist][ico-version]][link-packagist] +[![Software License][ico-license]][link-license] +[![Build Status][ico-travis]][link-scrutinizer] +[![Total Downloads][ico-downloads]][link-downloads] +[![Hits][ico-hits]][link-hits] + + +## Description +PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. +The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication +process as well. +You can enable the `php-imap` module in order to handle edge cases, improve message decoding quality and is required if +you want to use legacy protocols such as pop3. + +Official documentation: [php-imap.com](https://www.php-imap.com/) + +Laravel wrapper: [webklex/laravel-imap](https://github.com/Webklex/laravel-imap) + + +## Table of Contents +- [Documentations](#documentations) +- [Basic usage example](#basic-usage-example) +- [Known issues](#known-issues) +- [Support](#support) +- [Features & pull requests](#features--pull-requests) +- [Security](#security) +- [Credits](#credits) +- [License](#license) + + +## Documentations +- Legacy (< v2.0.0): [legacy documentation](https://github.com/Webklex/php-imap/tree/1.4.5) +- Core documentation: [php-imap.com](https://www.php-imap.com/) + + +## Basic usage example +This is a basic example, which will echo out all Mails within all imap folders +and will move every message into INBOX.read. Please be aware that this should not be +tested in real life and is only meant to gives an impression on how things work. + +```php +use Webklex\PHPIMAP\ClientManager; + +$cm = new ClientManager('path/to/config/imap.php'); + +/** @var \Webklex\PHPIMAP\Client $client */ +$client = $cm->account('account_identifier'); + +//Connect to the IMAP Server +$client->connect(); + +//Get all Mailboxes +/** @var \Webklex\PHPIMAP\Support\FolderCollection $folders */ +$folders = $client->getFolders(); + +//Loop through every Mailbox +/** @var \Webklex\PHPIMAP\Folder $folder */ +foreach($folders as $folder){ + + //Get all Messages of the current Mailbox $folder + /** @var \Webklex\PHPIMAP\Support\MessageCollection $messages */ + $messages = $folder->messages()->all()->get(); + + /** @var \Webklex\PHPIMAP\Message $message */ + foreach($messages as $message){ + echo $message->getSubject().'
    '; + echo 'Attachments: '.$message->getAttachments()->count().'
    '; + echo $message->getHTMLBody(); + + //Move the current Message to 'INBOX.read' + if($message->move('INBOX.read') == true){ + echo 'Message has ben moved'; + }else{ + echo 'Message could not be moved'; + } + } +} +``` + + +### Known issues +| Error | Solution | +| ------------------------------------------------------------------------- | ---------------------------------------------------------- | +| Kerberos error: No credentials cache file found (try running kinit) (...) | Uncomment "DISABLE_AUTHENTICATOR" inside your config and use the `legacy-imap` protocol | + + +## Support +If you encounter any problems or if you find a bug, please don't hesitate to create a new [issue](https://github.com/Webklex/php-imap/issues). +However please be aware that it might take some time to get an answer. +Off topic, rude or abusive issues will be deleted without any notice. + +If you need **commercial** support, feel free to send me a mail at github@webklex.com. + + +##### A little notice +If you write source code in your issue, please consider to format it correctly. This makes it so much nicer to read +and people are more likely to comment and help :) + +```php + +echo 'your php code...'; + +``` + +will turn into: +```php +echo 'your php code...'; +``` + + +## Features & pull requests +Everyone can contribute to this project. Every pull request will be considered but it can also happen to be declined. +To prevent unnecessary work, please consider to create a [feature issue](https://github.com/Webklex/php-imap/issues/new?template=feature_request.md) +first, if you're planning to do bigger changes. Of course you can also create a new [feature issue](https://github.com/Webklex/php-imap/issues/new?template=feature_request.md) +if you're just wishing a feature ;) + + +## Change log +Please see [CHANGELOG][link-changelog] for more information what has changed recently. + + +## Security +If you discover any security related issues, please email github@webklex.com instead of using the issue tracker. + + +## Credits +- [Webklex][link-author] +- [All Contributors][link-contributors] + + +## License +The MIT License (MIT). Please see [License File][link-license] for more information. + + +[ico-version]: https://img.shields.io/packagist/v/Webklex/php-imap.svg?style=flat-square +[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square +[ico-travis]: https://img.shields.io/travis/Webklex/php-imap/master.svg?style=flat-square +[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/Webklex/php-imap.svg?style=flat-square +[ico-code-quality]: https://img.shields.io/scrutinizer/g/Webklex/php-imap.svg?style=flat-square +[ico-downloads]: https://img.shields.io/packagist/dt/Webklex/php-imap.svg?style=flat-square +[ico-build]: https://img.shields.io/scrutinizer/build/g/Webklex/php-imap/master?style=flat-square +[ico-quality]: https://img.shields.io/scrutinizer/quality/g/Webklex/php-imap/master?style=flat-square +[ico-hits]: https://hits.webklex.com/svg/webklex/php-imap + +[link-packagist]: https://packagist.org/packages/Webklex/php-imap +[link-travis]: https://travis-ci.org/Webklex/php-imap +[link-scrutinizer]: https://scrutinizer-ci.com/g/Webklex/php-imap/code-structure +[link-code-quality]: https://scrutinizer-ci.com/g/Webklex/php-imap +[link-downloads]: https://packagist.org/packages/Webklex/php-imap +[link-author]: https://github.com/webklex +[link-contributors]: https://github.com/Webklex/php-imap/graphs/contributors +[link-license]: https://github.com/Webklex/php-imap/blob/master/LICENSE +[link-changelog]: https://github.com/Webklex/php-imap/blob/master/CHANGELOG.md +[link-jetbrains]: https://www.jetbrains.com +[link-hits]: https://hits.webklex.com diff --git a/htdocs/includes/webklex/php-imap/composer.json b/htdocs/includes/webklex/php-imap/composer.json new file mode 100644 index 00000000000..9bc3849a98f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/composer.json @@ -0,0 +1,55 @@ +{ + "name": "webklex/php-imap", + "type": "library", + "description": "PHP IMAP client", + "keywords": [ + "webklex", + "imap", + "pop3", + "php-imap", + "mail" + ], + "homepage": "https://github.com/webklex/php-imap", + "license": "MIT", + "authors": [ + { + "name": "Malte Goldenbaum", + "email": "github@webklex.com", + "role": "Developer" + } + ], + "require": { + "php": ">=5.5.9", + "ext-openssl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-iconv": "*", + "ext-fileinfo": "*", + "nesbot/carbon": ">=1.0", + "symfony/http-foundation": ">=2.8.0", + "illuminate/pagination": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "autoload": { + "psr-4": { + "Webklex\\PHPIMAP\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests" + } + }, + "scripts": { + "test": "phpunit" + }, + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/htdocs/includes/webklex/php-imap/deleted.txt b/htdocs/includes/webklex/php-imap/deleted.txt new file mode 100644 index 00000000000..7eba7283d76 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/deleted.txt @@ -0,0 +1,17 @@ +./vendor/carbon +./vendor/nesbot/carbon/bin +./vendor/phpunit +./vendor/sebastian +./vendor/psr +./vendor/webmozart +./vendor/symfony/http-foundation +./vendor/symfony/translation +./vendor/symfony/translation-contracts +./vendor/symfony/yaml +./vendor/voku +./vendor/phpspec +./vendor/phpdocumentor +./vendor/nesbot/carbon/src/Carbon/Lang +./vendor/doctrine +./vendor/bin +./tests diff --git a/htdocs/includes/webklex/php-imap/src/Address.php b/htdocs/includes/webklex/php-imap/src/Address.php new file mode 100644 index 00000000000..644158dd18d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Address.php @@ -0,0 +1,90 @@ +personal = $object->personal; } + if (property_exists($object, "mailbox")){ $this->mailbox = $object->mailbox; } + if (property_exists($object, "host")){ $this->host = $object->host; } + if (property_exists($object, "mail")){ $this->mail = $object->mail; } + if (property_exists($object, "full")){ $this->full = $object->full; } + } + + + /** + * Return the stringified address + * + * @return string + */ + public function __toString() { + return $this->full ? $this->full : ""; + } + + /** + * Return the serialized address + * + * @return array + */ + public function __serialize(){ + return [ + "personal" => $this->personal, + "mailbox" => $this->mailbox, + "host" => $this->host, + "mail" => $this->mail, + "full" => $this->full, + ]; + } + + /** + * Convert instance to array + * + * @return array + */ + public function toArray(){ + return $this->__serialize(); + } + + /** + * Return the stringified attribute + * + * @return string + */ + public function toString(){ + return $this->__toString(); + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Attachment.php b/htdocs/includes/webklex/php-imap/src/Attachment.php new file mode 100755 index 00000000000..29c3d44268a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Attachment.php @@ -0,0 +1,344 @@ + null, + 'type' => null, + 'part_number' => 0, + 'content_type' => null, + 'id' => null, + 'name' => null, + 'disposition' => null, + 'img_src' => null, + 'size' => null, + ]; + + /** + * Default mask + * + * @var string $mask + */ + protected $mask = AttachmentMask::class; + + /** + * Attachment constructor. + * @param Message $oMessage + * @param Part $part + */ + public function __construct(Message $oMessage, Part $part) { + $this->config = ClientManager::get('options'); + + $this->oMessage = $oMessage; + $this->part = $part; + $this->part_number = $part->part_number; + + $default_mask = $this->oMessage->getClient()->getDefaultAttachmentMask(); + if($default_mask != null) { + $this->mask = $default_mask; + } + + $this->findType(); + $this->fetch(); + } + + /** + * Call dynamic attribute setter and getter methods + * @param string $method + * @param array $arguments + * + * @return mixed + * @throws MethodNotFoundException + */ + public function __call($method, $arguments) { + if(strtolower(substr($method, 0, 3)) === 'get') { + $name = Str::snake(substr($method, 3)); + + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + return null; + }elseif (strtolower(substr($method, 0, 3)) === 'set') { + $name = Str::snake(substr($method, 3)); + + $this->attributes[$name] = array_pop($arguments); + + return $this->attributes[$name]; + } + + throw new MethodNotFoundException("Method ".self::class.'::'.$method.'() is not supported'); + } + + /** + * Magic setter + * @param $name + * @param $value + * + * @return mixed + */ + public function __set($name, $value) { + $this->attributes[$name] = $value; + + return $this->attributes[$name]; + } + + /** + * magic getter + * @param $name + * + * @return mixed|null + */ + public function __get($name) { + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + return null; + } + + /** + * Determine the structure type + */ + protected function findType() { + switch ($this->part->type) { + case IMAP::ATTACHMENT_TYPE_MESSAGE: + $this->type = 'message'; + break; + case IMAP::ATTACHMENT_TYPE_APPLICATION: + $this->type = 'application'; + break; + case IMAP::ATTACHMENT_TYPE_AUDIO: + $this->type = 'audio'; + break; + case IMAP::ATTACHMENT_TYPE_IMAGE: + $this->type = 'image'; + break; + case IMAP::ATTACHMENT_TYPE_VIDEO: + $this->type = 'video'; + break; + case IMAP::ATTACHMENT_TYPE_MODEL: + $this->type = 'model'; + break; + case IMAP::ATTACHMENT_TYPE_TEXT: + $this->type = 'text'; + break; + case IMAP::ATTACHMENT_TYPE_MULTIPART: + $this->type = 'multipart'; + break; + default: + $this->type = 'other'; + break; + } + } + + /** + * Fetch the given attachment + */ + protected function fetch() { + + $content = $this->part->content; + + $this->content_type = $this->part->content_type; + $this->content = $this->oMessage->decodeString($content, $this->part->encoding); + + if (($id = $this->part->id) !== null) { + $this->id = str_replace(['<', '>'], '', $id); + } + + $this->size = $this->part->bytes; + $this->disposition = $this->part->disposition; + + if (($filename = $this->part->filename) !== null) { + $this->setName($filename); + } elseif (($name = $this->part->name) !== null) { + $this->setName($name); + }else { + $this->setName("undefined"); + } + + if (IMAP::ATTACHMENT_TYPE_MESSAGE == $this->part->type) { + if ($this->part->ifdescription) { + $this->setName($this->part->description); + } else { + $this->setName($this->part->subtype); + } + } + } + + /** + * Save the attachment content to your filesystem + * @param string $path + * @param string|null $filename + * + * @return boolean + */ + public function save($path, $filename = null) { + $filename = $filename ? $filename : $this->getName(); + + return file_put_contents($path.$filename, $this->getContent()) !== false; + } + + /** + * Set the attachment name and try to decode it + * @param $name + */ + public function setName($name) { + $decoder = $this->config['decoder']['attachment']; + if ($name !== null) { + if($decoder === 'utf-8' && extension_loaded('imap')) { + $this->name = \imap_utf8($name); + }else{ + $this->name = mb_decode_mimeheader($name); + } + } + } + + /** + * Get the attachment mime type + * + * @return string|null + */ + public function getMimeType(){ + return (new \finfo())->buffer($this->getContent(), FILEINFO_MIME_TYPE); + } + + /** + * Try to guess the attachment file extension + * + * @return string|null + */ + public function getExtension(){ + $deprecated_guesser = "\Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser"; + if (class_exists($deprecated_guesser) !== false){ + return $deprecated_guesser::getInstance()->guess($this->getMimeType()); + } + $guesser = "\Symfony\Component\Mime\MimeTypes"; + $extensions = $guesser::getDefault()->getExtensions($this->getMimeType()); + return isset($extensions[0]) ? $extensions[0] : null; + } + + /** + * Get all attributes + * + * @return array + */ + public function getAttributes(){ + return $this->attributes; + } + + /** + * @return Message + */ + public function getMessage(){ + return $this->oMessage; + } + + /** + * Set the default mask + * @param $mask + * + * @return $this + */ + public function setMask($mask){ + if(class_exists($mask)){ + $this->mask = $mask; + } + + return $this; + } + + /** + * Get the used default mask + * + * @return string + */ + public function getMask(){ + return $this->mask; + } + + /** + * Get a masked instance by providing a mask name + * @param string|null $mask + * + * @return mixed + * @throws MaskNotFoundException + */ + public function mask($mask = null){ + $mask = $mask !== null ? $mask : $this->mask; + if(class_exists($mask)){ + return new $mask($this); + } + + throw new MaskNotFoundException("Unknown mask provided: ".$mask); + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Attribute.php b/htdocs/includes/webklex/php-imap/src/Attribute.php new file mode 100644 index 00000000000..06dc6a7903d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Attribute.php @@ -0,0 +1,274 @@ +setName($name); + $this->add($value); + } + + + /** + * Return the stringified attribute + * + * @return string + */ + public function __toString() { + return implode(", ", $this->values); + } + + /** + * Return the stringified attribute + * + * @return string + */ + public function toString(){ + return $this->__toString(); + } + + /** + * Return the serialized attribute + * + * @return array + */ + public function __serialize(){ + return $this->values; + } + + /** + * Convert instance to array + * + * @return array + */ + public function toArray(){ + return $this->__serialize(); + } + + /** + * Convert first value to a date object + * + * @return Carbon|null + */ + public function toDate(){ + $date = $this->first(); + if ($date instanceof Carbon) return $date; + + return Carbon::parse($date); + } + + /** + * Determine if a value exists at an offset. + * + * @param mixed $key + * @return bool + */ + public function offsetExists($key) { + return array_key_exists($key, $this->values); + } + + /** + * Get a value at a given offset. + * + * @param mixed $key + * @return mixed + */ + public function offsetGet($key) { + return $this->values[$key]; + } + + /** + * Set the value at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) { + if (is_null($key)) { + $this->values[] = $value; + } else { + $this->values[$key] = $value; + } + } + + /** + * Unset the value at a given offset. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) { + unset($this->values[$key]); + } + + /** + * Add one or more values to the attribute + * @param array|mixed $value + * @param boolean $strict + * + * @return Attribute + */ + public function add($value, $strict = false) { + if (is_array($value)) { + return $this->merge($value, $strict); + }elseif ($value !== null) { + $this->attach($value, $strict); + } + + return $this; + } + + /** + * Merge a given array of values with the current values array + * @param array $values + * @param boolean $strict + * + * @return Attribute + */ + public function merge($values, $strict = false) { + if (is_array($values)) { + foreach ($values as $value) { + $this->attach($value, $strict); + } + } + + return $this; + } + + /** + * Check if the attribute contains the given value + * @param mixed $value + * + * @return bool + */ + public function contains($value) { + foreach ($this->values as $v) { + if ($v === $value) { + return true; + } + } + return false; + } + + /** + * Attach a given value to the current value array + * @param $value + * @param bool $strict + */ + public function attach($value, $strict = false) { + if ($strict === true) { + if ($this->contains($value) === false) { + $this->values[] = $value; + } + }else{ + $this->values[] = $value; + } + } + + /** + * Set the attribute name + * @param $name + * + * @return Attribute + */ + public function setName($name){ + $this->name = $name; + + return $this; + } + + /** + * Get the attribute name + * + * @return string + */ + public function getName(){ + return $this->name; + } + + /** + * Get all values + * + * @return array + */ + public function get(){ + return $this->values; + } + + /** + * Alias method for self::get() + * + * @return array + */ + public function all(){ + return $this->get(); + } + + /** + * Get the first value if possible + * + * @return mixed|null + */ + public function first(){ + if ($this->offsetExists(0)) { + return $this->values[0]; + } + return null; + } + + /** + * Get the last value if possible + * + * @return mixed|null + */ + public function last(){ + if (($cnt = $this->count()) > 0) { + return $this->values[$cnt - 1]; + } + return null; + } + + /** + * Get the number of values + * + * @return int + */ + public function count(){ + return count($this->values); + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Client.php b/htdocs/includes/webklex/php-imap/src/Client.php new file mode 100755 index 00000000000..15944e4c646 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Client.php @@ -0,0 +1,669 @@ + null, + 'request_fulluri' => false, + 'username' => null, + 'password' => null, + ]; + + /** + * Connection timeout + * @var int $timeout + */ + public $timeout; + + /** + * Account username/ + * + * @var mixed + */ + public $username; + + /** + * Account password. + * + * @var string + */ + public $password; + + /** + * Account authentication method. + * + * @var string + */ + public $authentication; + + /** + * Active folder path. + * + * @var string + */ + protected $active_folder = null; + + /** + * Default message mask + * + * @var string $default_message_mask + */ + protected $default_message_mask = MessageMask::class; + + /** + * Default attachment mask + * + * @var string $default_attachment_mask + */ + protected $default_attachment_mask = AttachmentMask::class; + + /** + * Used default account values + * + * @var array $default_account_config + */ + protected $default_account_config = [ + 'host' => 'localhost', + 'port' => 993, + 'protocol' => 'imap', + 'encryption' => 'ssl', + 'validate_cert' => true, + 'username' => '', + 'password' => '', + 'authentication' => null, + 'proxy' => [ + 'socket' => null, + 'request_fulluri' => false, + 'username' => null, + 'password' => null, + ], + "timeout" => 30 + ]; + + /** + * Client constructor. + * @param array $config + * + * @throws MaskNotFoundException + */ + public function __construct($config = []) { + $this->setConfig($config); + $this->setMaskFromConfig($config); + $this->setEventsFromConfig($config); + } + + /** + * Client destructor + */ + public function __destruct() { + $this->disconnect(); + } + + /** + * Set the Client configuration + * @param array $config + * + * @return self + */ + public function setConfig(array $config) { + $default_account = ClientManager::get('default'); + $default_config = ClientManager::get("accounts.$default_account"); + + foreach ($this->default_account_config as $key => $value) { + $this->setAccountConfig($key, $config, $default_config); + } + + return $this; + } + + /** + * Set a specific account config + * @param string $key + * @param array $config + * @param array $default_config + */ + private function setAccountConfig($key, $config, $default_config){ + $value = $this->default_account_config[$key]; + if(isset($config[$key])) { + $value = $config[$key]; + }elseif(isset($default_config[$key])) { + $value = $default_config[$key]; + } + $this->$key = $value; + } + + /** + * Look for a possible events in any available config + * @param $config + */ + protected function setEventsFromConfig($config) { + $this->events = ClientManager::get("events"); + if(isset($config['events'])){ + foreach($config['events'] as $section => $events) { + $this->events[$section] = array_merge($this->events[$section], $events); + } + } + } + + /** + * Look for a possible mask in any available config + * @param $config + * + * @throws MaskNotFoundException + */ + protected function setMaskFromConfig($config) { + $default_config = ClientManager::get("masks"); + + if(isset($config['masks'])){ + if(isset($config['masks']['message'])) { + if(class_exists($config['masks']['message'])) { + $this->default_message_mask = $config['masks']['message']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['message']); + } + }else{ + if(class_exists($default_config['message'])) { + $this->default_message_mask = $default_config['message']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); + } + } + if(isset($config['masks']['attachment'])) { + if(class_exists($config['masks']['attachment'])) { + $this->default_attachment_mask = $config['masks']['attachment']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['attachment']); + } + }else{ + if(class_exists($default_config['attachment'])) { + $this->default_attachment_mask = $default_config['attachment']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); + } + } + }else{ + if(class_exists($default_config['message'])) { + $this->default_message_mask = $default_config['message']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); + } + + if(class_exists($default_config['attachment'])) { + $this->default_attachment_mask = $default_config['attachment']; + }else{ + throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); + } + } + + } + + /** + * Get the current imap resource + * + * @return bool|Protocol|ProtocolInterface + * @throws ConnectionFailedException + */ + public function getConnection() { + $this->checkConnection(); + return $this->connection; + } + + /** + * Determine if connection was established. + * + * @return bool + */ + public function isConnected() { + return $this->connection ? $this->connection->connected() : false; + } + + /** + * Determine if connection was established and connect if not. + * + * @throws ConnectionFailedException + */ + public function checkConnection() { + if (!$this->isConnected()) { + $this->connect(); + } + } + + /** + * Force a reconnect + * + * @throws ConnectionFailedException + */ + public function reconnect() { + if ($this->isConnected()) { + $this->disconnect(); + } + $this->connect(); + } + + /** + * Connect to server. + * + * @return $this + * @throws ConnectionFailedException + */ + public function connect() { + $this->disconnect(); + $protocol = strtolower($this->protocol); + + if (in_array($protocol, ['imap', 'imap4', 'imap4rev1'])) { + $this->connection = new ImapProtocol($this->validate_cert, $this->encryption); + $this->connection->setConnectionTimeout($this->timeout); + $this->connection->setProxy($this->proxy); + }else{ + if (extension_loaded('imap') === false) { + throw new ConnectionFailedException("connection setup failed - no imap function", 0, new ProtocolNotSupportedException($protocol." is an unsupported protocol")); + } + $this->connection = new LegacyProtocol($this->validate_cert, $this->encryption); + if (strpos($protocol, "legacy-") === 0) { + $protocol = substr($protocol, 7); + } + $this->connection->setProtocol($protocol); + } + + try { + $this->connection->connect($this->host, $this->port); + } catch (ErrorException $e) { + throw new ConnectionFailedException("connection setup failed - connect exception", 0, $e); + } catch (Exceptions\RuntimeException $e) { + throw new ConnectionFailedException("connection setup failed - run exception", 0, $e); + } + $this->authenticate(); + + return $this; + } + + /** + * Authenticate the current session + * + * @throws ConnectionFailedException + */ + protected function authenticate() { + try { + if ($this->authentication == "oauth") { + if (!$this->connection->authenticate($this->username, $this->password)) { + throw new AuthFailedException(); + } + } elseif (!$this->connection->login($this->username, $this->password)) { + throw new AuthFailedException(); + } + } catch (AuthFailedException $e) { + throw new ConnectionFailedException("connection setup failed - authenticate", 0, $e); + } + } + + /** + * Disconnect from server. + * + * @return $this + */ + public function disconnect() { + if ($this->isConnected() && $this->connection !== false) { + $this->connection->logout(); + } + $this->active_folder = null; + + return $this; + } + + /** + * Get a folder instance by a folder name + * @param string $folder_name + * @param string|bool|null $delimiter + * + * @return mixed + * @throws ConnectionFailedException + * @throws FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function getFolder($folder_name, $delimiter = null) { + if ($delimiter !== false && $delimiter !== null) { + return $this->getFolderByPath($folder_name); + } + + // Set delimiter to false to force selection via getFolderByName (maybe useful for uncommon folder names) + $delimiter = is_null($delimiter) ? ClientManager::get('options.delimiter', "/") : $delimiter; + if (strpos($folder_name, (string)$delimiter) !== false) { + return $this->getFolderByPath($folder_name); + } + + return $this->getFolderByName($folder_name); + } + + /** + * Get a folder instance by a folder name + * @param $folder_name + * + * @return mixed + * @throws ConnectionFailedException + * @throws FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function getFolderByName($folder_name) { + return $this->getFolders(false)->where("name", $folder_name)->first(); + } + + /** + * Get a folder instance by a folder path + * @param $folder_path + * + * @return mixed + * @throws ConnectionFailedException + * @throws FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function getFolderByPath($folder_path) { + return $this->getFolders(false)->where("path", $folder_path)->first(); + } + + /** + * Get folders list. + * If hierarchical order is set to true, it will make a tree of folders, otherwise it will return flat array. + * + * @param boolean $hierarchical + * @param string|null $parent_folder + * + * @return FolderCollection + * @throws ConnectionFailedException + * @throws FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function getFolders($hierarchical = true, $parent_folder = null) { + $this->checkConnection(); + $folders = FolderCollection::make([]); + + $pattern = $parent_folder.($hierarchical ? '%' : '*'); + $items = $this->connection->folders('', $pattern); + + if(is_array($items)){ + foreach ($items as $folder_name => $item) { + $folder = new Folder($this, $folder_name, $item["delimiter"], $item["flags"]); + + if ($hierarchical && $folder->hasChildren()) { + $pattern = $folder->full_name.$folder->delimiter.'%'; + + $children = $this->getFolders(true, $pattern); + $folder->setChildren($children); + } + + $folders->push($folder); + } + + return $folders; + }else{ + throw new FolderFetchingException("failed to fetch any folders"); + } + } + + /** + * Open a given folder. + * @param string $folder_path + * @param boolean $force_select + * + * @return mixed + * @throws ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function openFolder($folder_path, $force_select = false) { + if ($this->active_folder == $folder_path && $this->isConnected() && $force_select === false) { + return true; + } + $this->checkConnection(); + $this->active_folder = $folder_path; + return $this->connection->selectFolder($folder_path); + } + + /** + * Create a new Folder + * @param string $folder + * @param boolean $expunge + * + * @return bool + * @throws ConnectionFailedException + * @throws FolderFetchingException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\RuntimeException + */ + public function createFolder($folder, $expunge = true) { + $this->checkConnection(); + $status = $this->connection->createFolder($folder); + + if($expunge) $this->expunge(); + + $folder = $this->getFolder($folder); + if($status && $folder) { + $event = $this->getEvent("folder", "new"); + $event::dispatch($folder); + } + + return $folder; + } + + /** + * Check a given folder + * @param $folder + * + * @return false|object + * @throws ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function checkFolder($folder) { + $this->checkConnection(); + return $this->connection->examineFolder($folder); + } + + /** + * Get the current active folder + * + * @return string + */ + public function getFolderPath(){ + return $this->active_folder; + } + + /** + * Retrieve the quota level settings, and usage statics per mailbox + * + * @return array + * @throws ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function getQuota() { + $this->checkConnection(); + return $this->connection->getQuota($this->username); + } + + /** + * Retrieve the quota settings per user + * @param string $quota_root + * + * @return array + * @throws ConnectionFailedException + */ + public function getQuotaRoot($quota_root = 'INBOX') { + $this->checkConnection(); + return $this->connection->getQuotaRoot($quota_root); + } + + /** + * Delete all messages marked for deletion + * + * @return bool + * @throws ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function expunge() { + $this->checkConnection(); + return $this->connection->expunge(); + } + + /** + * Set the connection timeout + * @param integer $timeout + * + * @return Protocol + * @throws ConnectionFailedException + */ + public function setTimeout($timeout) { + $this->checkConnection(); + return $this->connection->setConnectionTimeout($timeout); + } + + /** + * Get the connection timeout + * + * @return int + * @throws ConnectionFailedException + */ + public function getTimeout(){ + $this->checkConnection(); + return $this->connection->getConnectionTimeout(); + } + + /** + * Get the default message mask + * + * @return string + */ + public function getDefaultMessageMask(){ + return $this->default_message_mask; + } + + /** + * Get the default events for a given section + * @param $section + * + * @return array + */ + public function getDefaultEvents($section){ + return $this->events[$section]; + } + + /** + * Set the default message mask + * @param $mask + * + * @return $this + * @throws MaskNotFoundException + */ + public function setDefaultMessageMask($mask) { + if(class_exists($mask)) { + $this->default_message_mask = $mask; + + return $this; + } + + throw new MaskNotFoundException("Unknown mask provided: ".$mask); + } + + /** + * Get the default attachment mask + * + * @return string + */ + public function getDefaultAttachmentMask(){ + return $this->default_attachment_mask; + } + + /** + * Set the default attachment mask + * @param $mask + * + * @return $this + * @throws MaskNotFoundException + */ + public function setDefaultAttachmentMask($mask) { + if(class_exists($mask)) { + $this->default_attachment_mask = $mask; + + return $this; + } + + throw new MaskNotFoundException("Unknown mask provided: ".$mask); + } +} diff --git a/htdocs/includes/webklex/php-imap/src/ClientManager.php b/htdocs/includes/webklex/php-imap/src/ClientManager.php new file mode 100644 index 00000000000..3daf9f83f76 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/ClientManager.php @@ -0,0 +1,262 @@ +setConfig($config); + } + + /** + * Dynamically pass calls to the default account. + * @param string $method + * @param array $parameters + * + * @return mixed + * @throws Exceptions\MaskNotFoundException + */ + public function __call($method, $parameters) { + $callable = [$this->account(), $method]; + + return call_user_func_array($callable, $parameters); + } + + /** + * Safely create a new client instance which is not listed in accounts + * @param array $config + * + * @return Client + * @throws Exceptions\MaskNotFoundException + */ + public function make($config) { + return new Client($config); + } + + /** + * Get a dotted config parameter + * @param string $key + * @param null $default + * + * @return mixed|null + */ + public static function get($key, $default = null) { + $parts = explode('.', $key); + $value = null; + foreach($parts as $part) { + if($value === null) { + if(isset(self::$config[$part])) { + $value = self::$config[$part]; + }else{ + break; + } + }else{ + if(isset($value[$part])) { + $value = $value[$part]; + }else{ + break; + } + } + } + + return $value === null ? $default : $value; + } + + /** + * Resolve a account instance. + * @param string $name + * + * @return Client + * @throws Exceptions\MaskNotFoundException + */ + public function account($name = null) { + $name = $name ?: $this->getDefaultAccount(); + + // If the connection has not been resolved yet we will resolve it now as all + // of the connections are resolved when they are actually needed so we do + // not make any unnecessary connection to the various queue end-points. + if (!isset($this->accounts[$name])) { + $this->accounts[$name] = $this->resolve($name); + } + + return $this->accounts[$name]; + } + + /** + * Resolve a account. + * + * @param string $name + * + * @return Client + * @throws Exceptions\MaskNotFoundException + */ + protected function resolve($name) { + $config = $this->getClientConfig($name); + + return new Client($config); + } + + /** + * Get the account configuration. + * @param string $name + * + * @return array + */ + protected function getClientConfig($name) { + if ($name === null || $name === 'null') { + return ['driver' => 'null']; + } + + return self::$config["accounts"][$name]; + } + + /** + * Get the name of the default account. + * + * @return string + */ + public function getDefaultAccount() { + return self::$config['default']; + } + + /** + * Set the name of the default account. + * @param string $name + * + * @return void + */ + public function setDefaultAccount($name) { + self::$config['default'] = $name; + } + + + /** + * Merge the vendor settings with the local config + * + * The default account identifier will be used as default for any missing account parameters. + * If however the default account is missing a parameter the package default account parameter will be used. + * This can be disabled by setting imap.default in your config file to 'false' + * + * @param array|string $config + * + * @return $this + */ + public function setConfig($config) { + + if(is_array($config) === false) { + $config = require $config; + } + + $config_key = 'imap'; + $path = __DIR__.'/config/'.$config_key.'.php'; + + $vendor_config = require $path; + $config = $this->array_merge_recursive_distinct($vendor_config, $config); + + if(is_array($config)){ + if(isset($config['default'])){ + if(isset($config['accounts']) && $config['default'] != false){ + + $default_config = $vendor_config['accounts']['default']; + if(isset($config['accounts'][$config['default']])){ + $default_config = array_merge($default_config, $config['accounts'][$config['default']]); + } + + if(is_array($config['accounts'])){ + foreach($config['accounts'] as $account_key => $account){ + $config['accounts'][$account_key] = array_merge($default_config, $account); + } + } + } + } + } + + self::$config = $config; + + return $this; + } + + /** + * Marge arrays recursively and distinct + * + * Merges any number of arrays / parameters recursively, replacing + * entries with string keys with values from latter arrays. + * If the entry or the next value to be assigned is an array, then it + * automatically treats both arguments as an array. + * Numeric entries are appended, not replaced, but only if they are + * unique + * + * @param array $array1 Initial array to merge. + * @param array ... Variable list of arrays to recursively merge. + * + * @return array|mixed + * + * @link http://www.php.net/manual/en/function.array-merge-recursive.php#96201 + * @author Mark Roduner + */ + private function array_merge_recursive_distinct() { + + $arrays = func_get_args(); + $base = array_shift($arrays); + + if(!is_array($base)) $base = empty($base) ? array() : array($base); + + foreach($arrays as $append) { + + if(!is_array($append)) $append = array($append); + + foreach($append as $key => $value) { + + if(!array_key_exists($key, $base) and !is_numeric($key)) { + $base[$key] = $append[$key]; + continue; + } + + if(is_array($value) or is_array($base[$key])) { + $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]); + } else if(is_numeric($key)) { + if(!in_array($value, $base)) $base[] = $value; + } else { + $base[$key] = $value; + } + + } + + } + + return $base; + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php new file mode 100644 index 00000000000..99da29d3c3a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php @@ -0,0 +1,1074 @@ +setCertValidation($cert_validation); + $this->encryption = $encryption; + } + + /** + * Public destructor + */ + public function __destruct() { + $this->logout(); + } + + /** + * Open connection to IMAP server + * @param string $host hostname or IP address of IMAP server + * @param int|null $port of IMAP server, default is 143 and 993 for ssl + * + * @throws ConnectionFailedException + */ + public function connect($host, $port = null) { + $transport = 'tcp'; + $encryption = ""; + + if ($this->encryption) { + $encryption = strtolower($this->encryption); + if ($encryption == "ssl") { + $transport = 'ssl'; + $port = $port === null ? 993 : $port; + } + } + $port = $port === null ? 143 : $port; + try { + $this->stream = $this->createStream($transport, $host, $port, $this->connection_timeout); + if (!$this->assumedNextLine('* OK')) { + throw new ConnectionFailedException('connection refused'); + } + if ($encryption == "tls") { + $this->enableTls(); + } + } catch (Exception $e) { + throw new ConnectionFailedException('connection failed', 0, $e); + } + } + + /** + * Enable tls on the current connection + * + * @throws ConnectionFailedException + * @throws RuntimeException + */ + protected function enableTls(){ + $response = $this->requestAndResponse('STARTTLS'); + $result = $response && stream_socket_enable_crypto($this->stream, true, $this->getCryptoMethod()); + if (!$result) { + throw new ConnectionFailedException('failed to enable TLS'); + } + } + + /** + * Get the next line from stream + * + * @return string next line + * @throws RuntimeException + */ + public function nextLine() { + $line = fgets($this->stream); + + if ($line === false) { + throw new RuntimeException('failed to read - connection closed?'); + } + + return $line; + } + + /** + * Get the next line and check if it starts with a given string + * @param string $start + * + * @return bool + * @throws RuntimeException + */ + protected function assumedNextLine($start) { + $line = $this->nextLine(); + return strpos($line, $start) === 0; + } + + /** + * Get the next line and split the tag + * @param string $tag reference tag + * + * @return string next line + * @throws RuntimeException + */ + protected function nextTaggedLine(&$tag) { + $line = $this->nextLine(); + list($tag, $line) = explode(' ', $line, 2); + + return $line; + } + + /** + * Split a given line in values. A value is literal of any form or a list + * @param string $line + * + * @return array + * @throws RuntimeException + */ + protected function decodeLine($line) { + $tokens = []; + $stack = []; + + // replace any trailing including spaces with a single space + $line = rtrim($line) . ' '; + while (($pos = strpos($line, ' ')) !== false) { + $token = substr($line, 0, $pos); + if (!strlen($token)) { + continue; + } + while ($token[0] == '(') { + array_push($stack, $tokens); + $tokens = []; + $token = substr($token, 1); + } + if ($token[0] == '"') { + if (preg_match('%^\(*"((.|\\\\|\\")*?)" *%', $line, $matches)) { + $tokens[] = $matches[1]; + $line = substr($line, strlen($matches[0])); + continue; + } + } + if ($token[0] == '{') { + $endPos = strpos($token, '}'); + $chars = substr($token, 1, $endPos - 1); + if (is_numeric($chars)) { + $token = ''; + while (strlen($token) < $chars) { + $token .= $this->nextLine(); + } + $line = ''; + if (strlen($token) > $chars) { + $line = substr($token, $chars); + $token = substr($token, 0, $chars); + } else { + $line .= $this->nextLine(); + } + $tokens[] = $token; + $line = trim($line) . ' '; + continue; + } + } + if ($stack && $token[strlen($token) - 1] == ')') { + // closing braces are not separated by spaces, so we need to count them + $braces = strlen($token); + $token = rtrim($token, ')'); + // only count braces if more than one + $braces -= strlen($token) + 1; + // only add if token had more than just closing braces + if (rtrim($token) != '') { + $tokens[] = rtrim($token); + } + $token = $tokens; + $tokens = array_pop($stack); + // special handline if more than one closing brace + while ($braces-- > 0) { + $tokens[] = $token; + $token = $tokens; + $tokens = array_pop($stack); + } + } + $tokens[] = $token; + $line = substr($line, $pos + 1); + } + + // maybe the server forgot to send some closing braces + while ($stack) { + $child = $tokens; + $tokens = array_pop($stack); + $tokens[] = $child; + } + + return $tokens; + } + + /** + * Read abd decode a response "line" + * @param array|string $tokens to decode + * @param string $wantedTag targeted tag + * @param bool $dontParse if true only the unparsed line is returned in $tokens + * + * @return bool + * @throws RuntimeException + */ + public function readLine(&$tokens = [], $wantedTag = '*', $dontParse = false) { + $line = $this->nextTaggedLine($tag); // get next tag + if (!$dontParse) { + $tokens = $this->decodeLine($line); + } else { + $tokens = $line; + } + if ($this->debug) echo "<< ".$line."\n"; + + // if tag is wanted tag we might be at the end of a multiline response + return $tag == $wantedTag; + } + + /** + * Read all lines of response until given tag is found + * @param string $tag request tag + * @param bool $dontParse if true every line is returned unparsed instead of the decoded tokens + * + * @return void|null|bool|array tokens if success, false if error, null if bad request + * @throws RuntimeException + */ + public function readResponse($tag, $dontParse = false) { + $lines = []; + $tokens = null; // define $tokens variable before first use + do { + $readAll = $this->readLine($tokens, $tag, $dontParse); + $lines[] = $tokens; + } while (!$readAll); + + if ($dontParse) { + // First two chars are still needed for the response code + $tokens = [substr($tokens, 0, 2)]; + } + + // last line has response code + if ($tokens[0] == 'OK') { + return $lines ? $lines : true; + } elseif ($tokens[0] == 'NO') { + return false; + } + + return; + } + + /** + * Send a new request + * @param string $command + * @param array $tokens additional parameters to command, use escapeString() to prepare + * @param string $tag provide a tag otherwise an autogenerated is returned + * + * @throws RuntimeException + */ + public function sendRequest($command, $tokens = [], &$tag = null) { + if (!$tag) { + $this->noun++; + $tag = 'TAG' . $this->noun; + } + + $line = $tag . ' ' . $command; + + foreach ($tokens as $token) { + if (is_array($token)) { + if (fwrite($this->stream, $line . ' ' . $token[0] . "\r\n") === false) { + throw new RuntimeException('failed to write - connection closed?'); + } + if (!$this->assumedNextLine('+ ')) { + throw new RuntimeException('failed to send literal string'); + } + $line = $token[1]; + } else { + $line .= ' ' . $token; + } + } + if ($this->debug) echo ">> ".$line."\n"; + + if (fwrite($this->stream, $line . "\r\n") === false) { + throw new RuntimeException('failed to write - connection closed?'); + } + } + + /** + * Send a request and get response at once + * @param string $command + * @param array $tokens parameters as in sendRequest() + * @param bool $dontParse if true unparsed lines are returned instead of tokens + * + * @return void|null|bool|array response as in readResponse() + * @throws RuntimeException + */ + public function requestAndResponse($command, $tokens = [], $dontParse = false) { + $this->sendRequest($command, $tokens, $tag); + + return $this->readResponse($tag, $dontParse); + } + + /** + * Escape one or more literals i.e. for sendRequest + * @param string|array $string the literal/-s + * + * @return string|array escape literals, literals with newline ar returned + * as array('{size}', 'string'); + */ + public function escapeString($string) { + if (func_num_args() < 2) { + if (strpos($string, "\n") !== false) { + return ['{' . strlen($string) . '}', $string]; + } else { + return '"' . str_replace(['\\', '"'], ['\\\\', '\\"'], $string) . '"'; + } + } + $result = []; + foreach (func_get_args() as $string) { + $result[] = $this->escapeString($string); + } + return $result; + } + + /** + * Escape a list with literals or lists + * @param array $list list with literals or lists as PHP array + * + * @return string escaped list for imap + */ + public function escapeList($list) { + $result = []; + foreach ($list as $v) { + if (!is_array($v)) { + $result[] = $v; + continue; + } + $result[] = $this->escapeList($v); + } + return '(' . implode(' ', $result) . ')'; + } + + /** + * Login to a new session. + * @param string $user username + * @param string $password password + * + * @return bool|mixed + * @throws AuthFailedException + */ + public function login($user, $password) { + try { + return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true); + } catch (RuntimeException $e) { + throw new AuthFailedException("failed to authenticate", 0, $e); + } + } + + /** + * Authenticate your current IMAP session. + * @param string $user username + * @param string $token access token + * + * @return bool + * @throws AuthFailedException + */ + public function authenticate($user, $token) { + try { + $authenticateParams = ['XOAUTH2', base64_encode("user=$user\1auth=Bearer $token\1\1")]; + $this->sendRequest('AUTHENTICATE', $authenticateParams); + + while (true) { + $response = ""; + $is_plus = $this->readLine($response, '+', true); + if ($is_plus) { + // try to log the challenge somewhere where it can be found + error_log("got an extra server challenge: $response"); + // respond with an empty response. + $this->sendRequest(''); + } else { + if (preg_match('/^NO /i', $response) || + preg_match('/^BAD /i', $response)) { + error_log("got failure response: $response"); + return false; + } else if (preg_match("/^OK /i", $response)) { + return true; + } + } + } + } catch (RuntimeException $e) { + throw new AuthFailedException("failed to authenticate", 0, $e); + } + return false; + } + + /** + * Logout of imap server + * + * @return bool success + */ + public function logout() { + $result = false; + if ($this->stream) { + try { + $result = $this->requestAndResponse('LOGOUT', [], true); + } catch (Exception $e) {} + fclose($this->stream); + $this->stream = null; + } + return $result; + } + + /** + * Check if the current session is connected + * + * @return bool + */ + public function connected(){ + return (boolean) $this->stream; + } + + /** + * Get an array of available capabilities + * + * @return array list of capabilities + * @throws RuntimeException + */ + public function getCapabilities() { + $response = $this->requestAndResponse('CAPABILITY'); + + if (!$response) return []; + + $capabilities = []; + foreach ($response as $line) { + $capabilities = array_merge($capabilities, $line); + } + return $capabilities; + } + + /** + * Examine and select have the same response. + * @param string $command can be 'EXAMINE' or 'SELECT' + * @param string $folder target folder + * + * @return bool|array + * @throws RuntimeException + */ + public function examineOrSelect($command = 'EXAMINE', $folder = 'INBOX') { + $this->sendRequest($command, [$this->escapeString($folder)], $tag); + + $result = []; + $tokens = null; // define $tokens variable before first use + while (!$this->readLine($tokens, $tag)) { + if ($tokens[0] == 'FLAGS') { + array_shift($tokens); + $result['flags'] = $tokens; + continue; + } + switch ($tokens[1]) { + case 'EXISTS': + case 'RECENT': + $result[strtolower($tokens[1])] = $tokens[0]; + break; + case '[UIDVALIDITY': + $result['uidvalidity'] = (int)$tokens[2]; + break; + case '[UIDNEXT': + $result['uidnext'] = (int)$tokens[2]; + break; + default: + // ignore + break; + } + } + + if ($tokens[0] != 'OK') { + return false; + } + return $result; + } + + /** + * Change the current folder + * @param string $folder change to this folder + * + * @return bool|array see examineOrselect() + * @throws RuntimeException + */ + public function selectFolder($folder = 'INBOX') { + return $this->examineOrSelect('SELECT', $folder); + } + + /** + * Examine a given folder + * @param string $folder examine this folder + * + * @return bool|array see examineOrselect() + * @throws RuntimeException + */ + public function examineFolder($folder = 'INBOX') { + return $this->examineOrSelect('EXAMINE', $folder); + } + + /** + * Fetch one or more items of one or more messages + * @param string|array $items items to fetch [RFC822.HEADER, FLAGS, RFC822.TEXT, etc] + * @param int|array $from message for items or start message if $to !== null + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return string|array if only one item of one message is fetched it's returned as string + * if items of one message are fetched it's returned as (name => value) + * if one items of messages are fetched it's returned as (msgno => value) + * if items of messages are fetched it's returned as (msgno => (name => value)) + * @throws RuntimeException + */ + protected function fetch($items, $from, $to = null, $uid = false) { + if (is_array($from)) { + $set = implode(',', $from); + } elseif ($to === null) { + $set = (int)$from; + } elseif ($to === INF) { + $set = (int)$from . ':*'; + } else { + $set = (int)$from . ':' . (int)$to; + } + + $items = (array)$items; + $itemList = $this->escapeList($items); + + $this->sendRequest(($uid ? 'UID ' : '') . 'FETCH', [$set, $itemList], $tag); + + $result = []; + $tokens = null; // define $tokens variable before first use + while (!$this->readLine($tokens, $tag)) { + // ignore other responses + if ($tokens[1] != 'FETCH') { + continue; + } + + // find array key of UID value; try the last elements, or search for it + if ($uid) { + $count = count($tokens[2]); + if ($tokens[2][$count - 2] == 'UID') { + $uidKey = $count - 1; + } else if ($tokens[2][0] == 'UID') { + $uidKey = 1; + } else { + $uidKey = array_search('UID', $tokens[2]) + 1; + } + } + + // ignore other messages + if ($to === null && !is_array($from) && ($uid ? $tokens[2][$uidKey] != $from : $tokens[0] != $from)) { + continue; + } + + // if we only want one item we return that one directly + if (count($items) == 1) { + if ($tokens[2][0] == $items[0]) { + $data = $tokens[2][1]; + } elseif ($uid && $tokens[2][2] == $items[0]) { + $data = $tokens[2][3]; + } else { + // maybe the server send an other field we didn't wanted + $count = count($tokens[2]); + // we start with 2, because 0 was already checked + for ($i = 2; $i < $count; $i += 2) { + if ($tokens[2][$i] != $items[0]) { + continue; + } + $data = $tokens[2][$i + 1]; + break; + } + } + } else { + $data = []; + while (key($tokens[2]) !== null) { + $data[current($tokens[2])] = next($tokens[2]); + next($tokens[2]); + } + } + + // if we want only one message we can ignore everything else and just return + if ($to === null && !is_array($from) && ($uid ? $tokens[2][$uidKey] == $from : $tokens[0] == $from)) { + // we still need to read all lines + while (!$this->readLine($tokens, $tag)) + + return $data; + } + if ($uid) { + $result[$tokens[2][$uidKey]] = $data; + }else{ + $result[$tokens[0]] = $data; + } + } + + if ($to === null && !is_array($from)) { + throw new RuntimeException('the single id was not found in response'); + } + + return $result; + } + + /** + * Fetch message headers + * @param array|int $uids + * @param string $rfc + * @param bool $uid set to true if passing a unique id + * + * @return array + * @throws RuntimeException + */ + public function content($uids, $rfc = "RFC822", $uid = false) { + return $this->fetch(["$rfc.TEXT"], $uids, null, $uid); + } + + /** + * Fetch message headers + * @param array|int $uids + * @param string $rfc + * @param bool $uid set to true if passing a unique id + * + * @return array + * @throws RuntimeException + */ + public function headers($uids, $rfc = "RFC822", $uid = false){ + return $this->fetch(["$rfc.HEADER"], $uids, null, $uid); + } + + /** + * Fetch message flags + * @param array|int $uids + * @param bool $uid set to true if passing a unique id + * + * @return array + * @throws RuntimeException + */ + public function flags($uids, $uid = false){ + return $this->fetch(["FLAGS"], $uids, null, $uid); + } + + /** + * Get uid for a given id + * @param int|null $id message number + * + * @return array|string message number for given message or all messages as array + * @throws MessageNotFoundException + */ + public function getUid($id = null) { + try { + $uids = $this->fetch('UID', 1, INF); + if ($id == null) { + return $uids; + } + + foreach ($uids as $k => $v) { + if ($k == $id) { + return $v; + } + } + } catch (RuntimeException $e) {} + + throw new MessageNotFoundException('unique id not found'); + } + + /** + * Get a message number for a uid + * @param string $id uid + * + * @return int message number + * @throws MessageNotFoundException + */ + public function getMessageNumber($id) { + $ids = $this->getUid(); + foreach ($ids as $k => $v) { + if ($v == $id) { + return $k; + } + } + + throw new MessageNotFoundException('message number not found'); + } + + /** + * Get a list of available folders + * @param string $reference mailbox reference for list + * @param string $folder mailbox name match with wildcards + * + * @return array folders that matched $folder as array(name => array('delimiter' => .., 'flags' => ..)) + * @throws RuntimeException + */ + public function folders($reference = '', $folder = '*') { + $result = []; + $list = $this->requestAndResponse('LIST', $this->escapeString($reference, $folder)); + if (!$list || $list === true) { + return $result; + } + + foreach ($list as $item) { + if (count($item) != 4 || $item[0] != 'LIST') { + continue; + } + $result[$item[3]] = ['delimiter' => $item[2], 'flags' => $item[1]]; + } + + return $result; + } + + /** + * Manage flags + * @param array $flags flags to set, add or remove - see $mode + * @param int $from message for items or start message if $to !== null + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param string|null $mode '+' to add flags, '-' to remove flags, everything else sets the flags as given + * @param bool $silent if false the return values are the new flags for the wanted messages + * @param bool $uid set to true if passing a unique id + * + * @return bool|array new flags if $silent is false, else true or false depending on success + * @throws RuntimeException + */ + public function store(array $flags, $from, $to = null, $mode = null, $silent = true, $uid = false) { + $item = 'FLAGS'; + if ($mode == '+' || $mode == '-') { + $item = $mode . $item; + } + if ($silent) { + $item .= '.SILENT'; + } + + $flags = $this->escapeList($flags); + $set = (int)$from; + if ($to !== null) { + $set .= ':' . ($to == INF ? '*' : (int)$to); + } + + $command = ($uid ? "UID " : "")."STORE"; + $result = $this->requestAndResponse($command, [$set, $item, $flags], $silent); + + if ($silent) { + return (bool)$result; + } + + $tokens = $result; + $result = []; + foreach ($tokens as $token) { + if ($token[1] != 'FETCH' || $token[2][0] != 'FLAGS') { + continue; + } + $result[$token[0]] = $token[2][1]; + } + + return $result; + } + + /** + * Append a new message to given folder + * @param string $folder name of target folder + * @param string $message full message content + * @param array $flags flags for new message + * @param string $date date for new message + * + * @return bool success + * @throws RuntimeException + */ + public function appendMessage($folder, $message, $flags = null, $date = null) { + $tokens = []; + $tokens[] = $this->escapeString($folder); + if ($flags !== null) { + $tokens[] = $this->escapeList($flags); + } + if ($date !== null) { + $tokens[] = $this->escapeString($date); + } + $tokens[] = $this->escapeString($message); + + return $this->requestAndResponse('APPEND', $tokens, true); + } + + /** + * Copy a message set from current folder to an other folder + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + * @throws RuntimeException + */ + public function copyMessage($folder, $from, $to = null, $uid = false) { + $set = (int)$from; + if ($to !== null) { + $set .= ':' . ($to == INF ? '*' : (int)$to); + } + $command = ($uid ? "UID " : "")."COPY"; + + return $this->requestAndResponse($command, [$set, $this->escapeString($folder)], true); + } + + /** + * Copy multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + * + * @throws RuntimeException + */ + public function copyManyMessages($messages, $folder, $uid = false) { + $command = $uid ? 'UID COPY' : 'COPY'; + + $set = implode(',', $messages); + $tokens = [$set, $this->escapeString($folder)]; + + return $this->requestAndResponse($command, $tokens, true); + } + + /** + * Move a message set from current folder to an other folder + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + * @throws RuntimeException + */ + public function moveMessage($folder, $from, $to = null, $uid = false) { + $set = (int)$from; + if ($to !== null) { + $set .= ':' . ($to == INF ? '*' : (int)$to); + } + $command = ($uid ? "UID " : "")."MOVE"; + + return $this->requestAndResponse($command, [$set, $this->escapeString($folder)], true); + } + + /** + * Move multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + * + * @throws RuntimeException + */ + public function moveManyMessages($messages, $folder, $uid = false) { + $command = $uid ? 'UID MOVE' : 'MOVE'; + + $set = implode(',', $messages); + $tokens = [$set, $this->escapeString($folder)]; + + return $this->requestAndResponse($command, $tokens, true); + } + + /** + * Create a new folder (and parent folders if needed) + * @param string $folder folder name + * + * @return bool success + * @throws RuntimeException + */ + public function createFolder($folder) { + return $this->requestAndResponse('CREATE', [$this->escapeString($folder)], true); + } + + /** + * Rename an existing folder + * @param string $old old name + * @param string $new new name + * + * @return bool success + * @throws RuntimeException + */ + public function renameFolder($old, $new) { + return $this->requestAndResponse('RENAME', $this->escapeString($old, $new), true); + } + + /** + * Delete a folder + * @param string $folder folder name + * + * @return bool success + * @throws RuntimeException + */ + public function deleteFolder($folder) { + return $this->requestAndResponse('DELETE', [$this->escapeString($folder)], true); + } + + /** + * Subscribe to a folder + * @param string $folder folder name + * + * @return bool success + * @throws RuntimeException + */ + public function subscribeFolder($folder) { + return $this->requestAndResponse('SUBSCRIBE', [$this->escapeString($folder)], true); + } + + /** + * Unsubscribe from a folder + * @param string $folder folder name + * + * @return bool success + * @throws RuntimeException + */ + public function unsubscribeFolder($folder) { + return $this->requestAndResponse('UNSUBSCRIBE', [$this->escapeString($folder)], true); + } + + /** + * Apply session saved changes to the server + * + * @return bool success + * @throws RuntimeException + */ + public function expunge() { + return $this->requestAndResponse('EXPUNGE'); + } + + /** + * Send noop command + * + * @return bool success + * @throws RuntimeException + */ + public function noop() { + return $this->requestAndResponse('NOOP'); + } + + /** + * Retrieve the quota level settings, and usage statics per mailbox + * @param $username + * + * @return array + * @throws RuntimeException + */ + public function getQuota($username) { + return $this->requestAndResponse("GETQUOTA", ['"#user/'.$username.'"']); + } + + /** + * Retrieve the quota settings per user + * @param string $quota_root + * + * @return array + * @throws RuntimeException + */ + public function getQuotaRoot($quota_root = 'INBOX') { + return $this->requestAndResponse("QUOTA", [$quota_root]); + } + + /** + * Send idle command + * + * @throws RuntimeException + */ + public function idle() { + $this->sendRequest("IDLE"); + if (!$this->assumedNextLine('+ ')) { + throw new RuntimeException('idle failed'); + } + } + + /** + * Send done command + * @throws RuntimeException + */ + public function done() { + if (fwrite($this->stream, "DONE\r\n") === false) { + throw new RuntimeException('failed to write - connection closed?'); + } + return true; + } + + /** + * Search for matching messages + * @param array $params + * @param bool $uid set to true if passing a unique id + * + * @return array message ids + * @throws RuntimeException + */ + public function search(array $params, $uid = false) { + $token = $uid == true ? "UID SEARCH" : "SEARCH"; + $response = $this->requestAndResponse($token, $params); + if (!$response) { + return $response; + } + + foreach ($response as $ids) { + if ($ids[0] == 'SEARCH') { + array_shift($ids); + return $ids; + } + } + return []; + } + + /** + * Get a message overview + * @param string $sequence + * @param bool $uid set to true if passing a unique id + * + * @return array + * @throws RuntimeException + * @throws MessageNotFoundException + * @throws InvalidMessageDateException + */ + public function overview($sequence, $uid = false) { + $result = []; + list($from, $to) = explode(":", $sequence); + + $uids = $this->getUid(); + $ids = []; + foreach ($uids as $msgn => $v) { + $id = $uid ? $v : $msgn; + if ( ($to >= $id && $from <= $id) || ($to === "*" && $from <= $id) ){ + $ids[] = $id; + } + } + $headers = $this->headers($ids, "RFC822", $uid); + foreach ($headers as $id => $raw_header) { + $result[$id] = (new Header($raw_header, false))->getAttributes(); + } + return $result; + } + + /** + * Enable the debug mode + */ + public function enableDebug(){ + $this->debug = true; + } + + /** + * Disable the debug mode + */ + public function disableDebug(){ + $this->debug = false; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Connection/Protocols/LegacyProtocol.php b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/LegacyProtocol.php new file mode 100644 index 00000000000..96cc733f248 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/LegacyProtocol.php @@ -0,0 +1,607 @@ +setCertValidation($cert_validation); + $this->encryption = $encryption; + } + + /** + * Public destructor + */ + public function __destruct() { + $this->logout(); + } + + /** + * Save the information for a nw connection + * @param string $host + * @param null $port + */ + public function connect($host, $port = null) { + if ($this->encryption) { + $encryption = strtolower($this->encryption); + if ($encryption == "ssl") { + $port = $port === null ? 993 : $port; + } + } + $port = $port === null ? 143 : $port; + $this->host = $host; + $this->port = $port; + } + + /** + * Login to a new session. + * @param string $user username + * @param string $password password + * + * @return bool + * @throws AuthFailedException + * @throws RuntimeException + */ + public function login($user, $password) { + try { + $this->stream = \imap_open( + $this->getAddress(), + $user, + $password, + 0, + $attempts = 3, + ClientManager::get('options.open') + ); + } catch (\ErrorException $e) { + $errors = \imap_errors(); + $message = $e->getMessage().'. '.implode("; ", (is_array($errors) ? $errors : array())); + throw new AuthFailedException($message); + } + + if(!$this->stream) { + $errors = \imap_errors(); + $message = implode("; ", (is_array($errors) ? $errors : array())); + throw new AuthFailedException($message); + } + + $errors = \imap_errors(); + if(is_array($errors)) { + $status = $this->examineFolder(); + if($status['exists'] !== 0) { + $message = implode("; ", (is_array($errors) ? $errors : array())); + throw new RuntimeException($message); + } + } + + return $this->stream; + } + + /** + * Authenticate your current session. + * @param string $user username + * @param string $token access token + * + * @return bool|resource + * @throws AuthFailedException|RuntimeException + */ + public function authenticate($user, $token) { + return $this->login($user, $token); + } + + /** + * Get full address of mailbox. + * + * @return string + */ + protected function getAddress() { + $address = "{".$this->host.":".$this->port."/".$this->protocol; + if (!$this->cert_validation) { + $address .= '/novalidate-cert'; + } + if (in_array($this->encryption,['tls', 'notls', 'ssl'])) { + $address .= '/'.$this->encryption; + } elseif ($this->encryption === "starttls") { + $address .= '/tls'; + } + + $address .= '}'; + + return $address; + } + + /** + * Logout of the current session + * + * @return bool success + */ + public function logout() { + if ($this->stream) { + $result = \imap_close($this->stream, IMAP::CL_EXPUNGE); + $this->stream = false; + return $result; + } + return false; + } + + /** + * Check if the current session is connected + * + * @return bool + */ + public function connected(){ + return boolval($this->stream); + } + + /** + * Get an array of available capabilities + * + * @throws MethodNotSupportedException + */ + public function getCapabilities() { + throw new MethodNotSupportedException(); + } + + /** + * Change the current folder + * @param string $folder change to this folder + * + * @return bool|array see examineOrselect() + * @throws RuntimeException + */ + public function selectFolder($folder = 'INBOX') { + \imap_reopen($this->stream, $folder, IMAP::OP_READONLY, 3); + return $this->examineFolder($folder); + } + + /** + * Examine a given folder + * @param string $folder examine this folder + * + * @return bool|array + * @throws RuntimeException + */ + public function examineFolder($folder = 'INBOX') { + if (strpos($folder, ".") === 0) { + throw new RuntimeException("Segmentation fault prevented. Folders starts with an illegal char '.'."); + } + $folder = $this->getAddress().$folder; + $status = \imap_status($this->stream, $folder, IMAP::SA_ALL); + return [ + "flags" => [], + "exists" => $status->messages, + "recent" => $status->recent, + "unseen" => $status->unseen, + "uidnext" => $status->uidnext, + ]; + } + + /** + * Fetch message content + * @param array|int $uids + * @param string $rfc + * @param bool $uid set to true if passing a unique id + * + * @return array + */ + public function content($uids, $rfc = "RFC822", $uid = false) { + $result = []; + $uids = is_array($uids) ? $uids : [$uids]; + foreach ($uids as $id) { + $result[$id] = \imap_fetchbody($this->stream, $id, "", $uid ? IMAP::FT_UID : IMAP::NIL); + } + return $result; + } + + /** + * Fetch message headers + * @param array|int $uids + * @param string $rfc + * @param bool $uid set to true if passing a unique id + * + * @return array + */ + public function headers($uids, $rfc = "RFC822", $uid = false){ + $result = []; + $uids = is_array($uids) ? $uids : [$uids]; + foreach ($uids as $id) { + $result[$id] = \imap_fetchheader($this->stream, $id, $uid ? IMAP::FT_UID : IMAP::NIL); + } + return $result; + } + + /** + * Fetch message flags + * @param array|int $uids + * @param bool $uid set to true if passing a unique id + * + * @return array + */ + public function flags($uids, $uid = false){ + $result = []; + $uids = is_array($uids) ? $uids : [$uids]; + foreach ($uids as $id) { + $raw_flags = \imap_fetch_overview($this->stream, $id, $uid ? IMAP::FT_UID : IMAP::NIL); + $flags = []; + if (is_array($raw_flags) && isset($raw_flags[0])) { + $raw_flags = (array) $raw_flags[0]; + foreach($raw_flags as $flag => $value) { + if ($value === 1 && in_array($flag, ["size", "uid", "msgno", "update"]) === false){ + $flags[] = "\\".ucfirst($flag); + } + } + } + $result[$uid] = $flags; + } + + return $result; + } + + /** + * Get uid for a given id + * @param int|null $id message number + * + * @return array|string message number for given message or all messages as array + */ + public function getUid($id = null) { + if ($id === null) { + $overview = $this->overview("1:*"); + $uids = []; + foreach($overview as $set){ + $uids[$set->msgno] = $set->uid; + } + return $uids; + } + return \imap_uid($this->stream, $id); + } + + /** + * Get a message number for a uid + * @param string $id uid + * + * @return int message number + */ + public function getMessageNumber($id) { + return \imap_msgno($this->stream, $id); + } + + /** + * Get a message overview + * @param string $sequence uid sequence + * @param bool $uid set to true if passing a unique id + * + * @return array + */ + public function overview($sequence, $uid = false) { + return \imap_fetch_overview($this->stream, $sequence,$uid ? IMAP::FT_UID : IMAP::NIL); + } + + /** + * Get a list of available folders + * @param string $reference mailbox reference for list + * @param string $folder mailbox name match with wildcards + * + * @return array folders that matched $folder as array(name => array('delimiter' => .., 'flags' => ..)) + * @throws RuntimeException + */ + public function folders($reference = '', $folder = '*') { + $result = []; + + $items = \imap_getmailboxes($this->stream, $this->getAddress(), $reference.$folder); + if(is_array($items)){ + foreach ($items as $item) { + $name = $this->decodeFolderName($item->name); + $result[$name] = ['delimiter' => $item->delimiter, 'flags' => []]; + } + }else{ + throw new RuntimeException(\imap_last_error()); + } + + return $result; + } + + /** + * Manage flags + * @param array $flags flags to set, add or remove - see $mode + * @param int $from message for items or start message if $to !== null + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param string|null $mode '+' to add flags, '-' to remove flags, everything else sets the flags as given + * @param bool $silent if false the return values are the new flags for the wanted messages + * @param bool $uid set to true if passing a unique id + * + * @return bool|array new flags if $silent is false, else true or false depending on success + */ + public function store(array $flags, $from, $to = null, $mode = null, $silent = true, $uid = false) { + $flag = trim(is_array($flags) ? implode(" ", $flags) : $flags); + + if ($mode == "+"){ + $status = \imap_setflag_full($this->stream, $from, $flag, $uid ? IMAP::FT_UID : IMAP::NIL); + }else{ + $status = \imap_clearflag_full($this->stream, $from, $flag, $uid ? IMAP::FT_UID : IMAP::NIL); + } + + if ($silent === true) { + return $status; + } + + return $this->flags($from); + } + + /** + * Append a new message to given folder + * @param string $folder name of target folder + * @param string $message full message content + * @param array $flags flags for new message + * @param string $date date for new message + * + * @return bool success + */ + public function appendMessage($folder, $message, $flags = null, $date = null) { + if ($date != null) { + if ($date instanceof \Carbon\Carbon){ + $date = $date->format('d-M-Y H:i:s O'); + } + return \imap_append($this->stream, $folder, $message, $flags, $date); + } + + return \imap_append($this->stream, $folder, $message, $flags); + } + + /** + * Copy message set from current folder to other folder + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + */ + public function copyMessage($folder, $from, $to = null, $uid = false) { + return \imap_mail_copy($this->stream, $from, $folder, $uid ? IMAP::FT_UID : IMAP::NIL); + } + + /** + * Copy multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + */ + public function copyManyMessages($messages, $folder, $uid = false) { + foreach($messages as $msg) { + if ($this->copyMessage($folder, $msg, null, $uid) == false) { + return false; + } + } + + return $messages; + } + + /** + * Move a message set from current folder to an other folder + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + */ + public function moveMessage($folder, $from, $to = null, $uid = false) { + return \imap_mail_move($this->stream, $from, $folder, $uid ? IMAP::FT_UID : IMAP::NIL); + } + + /** + * Move multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + */ + public function moveManyMessages($messages, $folder, $uid = false) { + foreach($messages as $msg) { + if ($this->moveMessage($folder, $msg, null, $uid) == false) { + return false; + } + } + + return $messages; + } + + /** + * Create a new folder (and parent folders if needed) + * @param string $folder folder name + * + * @return bool success + */ + public function createFolder($folder) { + return \imap_createmailbox($this->stream, $folder); + } + + /** + * Rename an existing folder + * @param string $old old name + * @param string $new new name + * + * @return bool success + */ + public function renameFolder($old, $new) { + return \imap_renamemailbox($this->stream, $old, $new); + } + + /** + * Delete a folder + * @param string $folder folder name + * + * @return bool success + */ + public function deleteFolder($folder) { + return \imap_deletemailbox($this->stream, $folder); + } + + /** + * Subscribe to a folder + * @param string $folder folder name + * + * @throws MethodNotSupportedException + */ + public function subscribeFolder($folder) { + throw new MethodNotSupportedException(); + } + + /** + * Unsubscribe from a folder + * @param string $folder folder name + * + * @throws MethodNotSupportedException + */ + public function unsubscribeFolder($folder) { + throw new MethodNotSupportedException(); + } + + /** + * Apply session saved changes to the server + * + * @return bool success + */ + public function expunge() { + return \imap_expunge($this->stream); + } + + /** + * Send noop command + * + * @throws MethodNotSupportedException + */ + public function noop() { + throw new MethodNotSupportedException(); + } + + /** + * Send idle command + * + * @throws MethodNotSupportedException + */ + public function idle() { + throw new MethodNotSupportedException(); + } + + /** + * Send done command + * + * @throws MethodNotSupportedException + */ + public function done() { + throw new MethodNotSupportedException(); + } + + /** + * Search for matching messages + * + * @param array $params + * @return array message ids + */ + public function search(array $params, $uid = false) { + return \imap_search($this->stream, $params[0], $uid ? IMAP::FT_UID : IMAP::NIL); + } + + /** + * Enable the debug mode + */ + public function enableDebug(){ + $this->debug = true; + } + + /** + * Disable the debug mode + */ + public function disableDebug(){ + $this->debug = false; + } + + /** + * Decode name. + * It converts UTF7-IMAP encoding to UTF-8. + * + * @param $name + * + * @return mixed|string + */ + protected function decodeFolderName($name) { + preg_match('#\{(.*)\}(.*)#', $name, $preg); + return mb_convert_encoding($preg[2], "UTF-8", "UTF7-IMAP"); + } + + /** + * @return string + */ + public function getProtocol() { + return $this->protocol; + } + + /** + * Retrieve the quota level settings, and usage statics per mailbox + * @param $username + * + * @return array + */ + public function getQuota($username) { + return \imap_get_quota($this->stream, 'user.'.$username); + } + + /** + * Retrieve the quota settings per user + * @param string $quota_root + * + * @return array + */ + public function getQuotaRoot($quota_root = 'INBOX') { + return \imap_get_quotaroot($this->stream, $quota_root); + } + + /** + * @param string $protocol + * @return LegacyProtocol + */ + public function setProtocol($protocol) { + if (($pos = strpos($protocol, "legacy")) > 0) { + $protocol = substr($protocol, 0, ($pos + 2) * -1); + } + $this->protocol = $protocol; + return $this; + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Connection/Protocols/Protocol.php b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/Protocol.php new file mode 100644 index 00000000000..ef01d46ec9b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/Protocol.php @@ -0,0 +1,224 @@ + null, + 'request_fulluri' => false, + 'username' => null, + 'password' => null, + ]; + + /** + * Get an available cryptographic method + * + * @return int + */ + public function getCryptoMethod() { + // Allow the best TLS version(s) we can + $cryptoMethod = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + // PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + // so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + }elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT')) { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + return $cryptoMethod; + } + + /** + * Enable SSL certificate validation + * + * @return $this + */ + public function enableCertValidation() { + $this->cert_validation = true; + return $this; + } + + /** + * Disable SSL certificate validation + * @return $this + */ + public function disableCertValidation() { + $this->cert_validation = false; + return $this; + } + + /** + * Set SSL certificate validation + * @var int $cert_validation + * + * @return $this + */ + public function setCertValidation($cert_validation) { + $this->cert_validation = $cert_validation; + return $this; + } + + /** + * Should we validate SSL certificate? + * + * @return bool + */ + public function getCertValidation() { + return $this->cert_validation; + } + + /** + * Set connection proxy settings + * @var array $options + * + * @return $this + */ + public function setProxy($options) { + foreach ($this->proxy as $key => $val) { + if (isset($options[$key])) { + $this->proxy[$key] = $options[$key]; + } + } + + return $this; + } + + /** + * Get the current proxy settings + * + * @return array + */ + public function getProxy() { + return $this->proxy; + } + + /** + * Prepare socket options + * @var string $transport + * + * @return array + */ + private function defaultSocketOptions($transport) { + $options = []; + if ($this->encryption != false) { + $options["ssl"] = [ + 'verify_peer_name' => $this->getCertValidation(), + 'verify_peer' => $this->getCertValidation(), + ]; + } + + if ($this->proxy["socket"] != null) { + $options[$transport]["proxy"] = $this->proxy["socket"]; + $options[$transport]["request_fulluri"] = $this->proxy["request_fulluri"]; + + if ($this->proxy["username"] != null) { + $auth = base64_encode($this->proxy["username"].':'.$this->proxy["password"]); + + $options[$transport]["header"] = [ + "Proxy-Authorization: Basic $auth" + ]; + } + } + + return $options; + } + + /** + * Create a new resource stream + * @param $transport + * @param string $host hostname or IP address of IMAP server + * @param int $port of IMAP server, default is 143 (993 for ssl) + * @param int $timeout timeout in seconds for initiating session + * + * @return resource|boolean The socket created. + * @throws ConnectionFailedException + */ + protected function createStream($transport, $host, $port, $timeout) { + $socket = "$transport://$host:$port"; + $stream = stream_socket_client($socket, $errno, $errstr, $timeout, + STREAM_CLIENT_CONNECT, + stream_context_create($this->defaultSocketOptions($transport)) + ); + stream_set_timeout($stream, $timeout); + + if (!$stream) { + throw new ConnectionFailedException($errstr, $errno); + } + + if (false === stream_set_timeout($stream, $timeout)) { + throw new ConnectionFailedException('Failed to set stream timeout'); + } + + return $stream; + } + + /** + * @return int + */ + public function getConnectionTimeout() { + return $this->connection_timeout; + } + + /** + * @param int $connection_timeout + * @return Protocol + */ + public function setConnectionTimeout($connection_timeout) { + if ($connection_timeout !== null) { + $this->connection_timeout = $connection_timeout; + } + return $this; + } + +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ProtocolInterface.php b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ProtocolInterface.php new file mode 100644 index 00000000000..6770d8d4c7b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Connection/Protocols/ProtocolInterface.php @@ -0,0 +1,375 @@ + array('delim' => .., 'flags' => ..)) + * @throws RuntimeException + */ + public function folders($reference = '', $folder = '*'); + + /** + * Set message flags + * + * @param array $flags flags to set, add or remove + * @param int $from message for items or start message if $to !== null + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param string|null $mode '+' to add flags, '-' to remove flags, everything else sets the flags as given + * @param bool $silent if false the return values are the new flags for the wanted messages + * @param bool $uid set to true if passing a unique id + * + * @return bool|array new flags if $silent is false, else true or false depending on success + * @throws RuntimeException + */ + public function store(array $flags, $from, $to = null, $mode = null, $silent = true, $uid = false); + + /** + * Append a new message to given folder + * + * @param string $folder name of target folder + * @param string $message full message content + * @param array $flags flags for new message + * @param string $date date for new message + * @return bool success + * @throws RuntimeException + */ + public function appendMessage($folder, $message, $flags = null, $date = null); + + /** + * Copy message set from current folder to other folder + * + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + * @throws RuntimeException + */ + public function copyMessage($folder, $from, $to = null, $uid = false); + + /** + * Copy multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + * + * @throws RuntimeException + */ + public function copyManyMessages($messages, $folder, $uid = false); + + /** + * Move a message set from current folder to an other folder + * @param string $folder destination folder + * @param $from + * @param int|null $to if null only one message ($from) is fetched, else it's the + * last message, INF means last message available + * @param bool $uid set to true if passing a unique id + * + * @return bool success + */ + public function moveMessage($folder, $from, $to = null, $uid = false); + + /** + * Move multiple messages to the target folder + * + * @param array $messages List of message identifiers + * @param string $folder Destination folder + * @param bool $uid Set to true if you pass message unique identifiers instead of numbers + * @return array|bool Tokens if operation successful, false if an error occurred + * + * @throws RuntimeException + */ + public function moveManyMessages($messages, $folder, $uid = false); + + /** + * Create a new folder + * + * @param string $folder folder name + * @return bool success + * @throws RuntimeException + */ + public function createFolder($folder); + + /** + * Rename an existing folder + * + * @param string $old old name + * @param string $new new name + * @return bool success + * @throws RuntimeException + */ + public function renameFolder($old, $new); + + /** + * Delete a folder + * + * @param string $folder folder name + * @return bool success + * @throws RuntimeException + */ + public function deleteFolder($folder); + + /** + * Subscribe to a folder + * + * @param string $folder folder name + * @return bool success + * @throws RuntimeException + */ + public function subscribeFolder($folder); + + /** + * Unsubscribe from a folder + * @param string $folder folder name + * + * @return bool success + * @throws RuntimeException + */ + public function unsubscribeFolder($folder); + + /** + * Send idle command + * + * @throws RuntimeException + */ + public function idle(); + + /** + * Send done command + * @throws RuntimeException + */ + public function done(); + + /** + * Apply session saved changes to the server + * + * @return bool success + * @throws RuntimeException + */ + public function expunge(); + + /** + * Retrieve the quota level settings, and usage statics per mailbox + * @param $username + * + * @return array + * @throws RuntimeException + */ + public function getQuota($username); + + /** + * Retrieve the quota settings per user + * + * @param string $quota_root + * + * @return array + * @throws ConnectionFailedException + */ + public function getQuotaRoot($quota_root = 'INBOX'); + + /** + * Send noop command + * + * @return bool success + * @throws RuntimeException + */ + public function noop(); + + /** + * Do a search request + * + * @param array $params + * @param bool $uid set to true if passing a unique id + * + * @return array message ids + * @throws RuntimeException + */ + public function search(array $params, $uid = false); + + /** + * Get a message overview + * @param string $sequence uid sequence + * @param bool $uid set to true if passing a unique id + * + * @return array + * @throws RuntimeException + * @throws MessageNotFoundException + * @throws InvalidMessageDateException + */ + public function overview($sequence, $uid = false); + + /** + * Enable the debug mode + */ + public function enableDebug(); + + /** + * Disable the debug mode + */ + public function disableDebug(); +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/EncodingAliases.php b/htdocs/includes/webklex/php-imap/src/EncodingAliases.php new file mode 100644 index 00000000000..1eb16c131bb --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/EncodingAliases.php @@ -0,0 +1,482 @@ + "us-ascii", + "us-ascii" => "us-ascii", + "ansi_x3.4-1968" => "us-ascii", + "646" => "us-ascii", + "iso-8859-1" => "ISO-8859-1", + "iso-8859-2" => "ISO-8859-2", + "iso-8859-3" => "ISO-8859-3", + "iso-8859-4" => "ISO-8859-4", + "iso-8859-5" => "ISO-8859-5", + "iso-8859-6" => "ISO-8859-6", + "iso-8859-6-i" => "ISO-8859-6-I", + "iso-8859-6-e" => "ISO-8859-6-E", + "iso-8859-7" => "ISO-8859-7", + "iso-8859-8" => "ISO-8859-8", + "iso-8859-8-i" => "ISO-8859-8-I", + "iso-8859-8-e" => "ISO-8859-8-E", + "iso-8859-9" => "ISO-8859-9", + "iso-8859-10" => "ISO-8859-10", + "iso-8859-11" => "ISO-8859-11", + "iso-8859-13" => "ISO-8859-13", + "iso-8859-14" => "ISO-8859-14", + "iso-8859-15" => "ISO-8859-15", + "iso-8859-16" => "ISO-8859-16", + "iso-ir-111" => "ISO-IR-111", + "iso-2022-cn" => "ISO-2022-CN", + "iso-2022-cn-ext" => "ISO-2022-CN", + "iso-2022-kr" => "ISO-2022-KR", + "iso-2022-jp" => "ISO-2022-JP", + "utf-16be" => "UTF-16BE", + "utf-16le" => "UTF-16LE", + "utf-16" => "UTF-16", + "windows-1250" => "windows-1250", + "windows-1251" => "windows-1251", + "windows-1252" => "windows-1252", + "windows-1253" => "windows-1253", + "windows-1254" => "windows-1254", + "windows-1255" => "windows-1255", + "windows-1256" => "windows-1256", + "windows-1257" => "windows-1257", + "windows-1258" => "windows-1258", + "ibm866" => "IBM866", + "ibm850" => "IBM850", + "ibm852" => "IBM852", + "ibm855" => "IBM855", + "ibm857" => "IBM857", + "ibm862" => "IBM862", + "ibm864" => "IBM864", + "utf-8" => "UTF-8", + "utf-7" => "UTF-7", + "shift_jis" => "Shift_JIS", + "big5" => "Big5", + "euc-jp" => "EUC-JP", + "euc-kr" => "EUC-KR", + "gb2312" => "GB2312", + "gb18030" => "gb18030", + "viscii" => "VISCII", + "koi8-r" => "KOI8-R", + "koi8_r" => "KOI8-R", + "cskoi8r" => "KOI8-R", + "koi" => "KOI8-R", + "koi8" => "KOI8-R", + "koi8-u" => "KOI8-U", + "tis-620" => "TIS-620", + "t.61-8bit" => "T.61-8bit", + "hz-gb-2312" => "HZ-GB-2312", + "big5-hkscs" => "Big5-HKSCS", + "gbk" => "gbk", + "cns11643" => "x-euc-tw", + // + // Aliases for ISO-8859-1 + // + "latin1" => "ISO-8859-1", + "iso_8859-1" => "ISO-8859-1", + "iso8859-1" => "ISO-8859-1", + "iso8859-2" => "ISO-8859-2", + "iso8859-3" => "ISO-8859-3", + "iso8859-4" => "ISO-8859-4", + "iso8859-5" => "ISO-8859-5", + "iso8859-6" => "ISO-8859-6", + "iso8859-7" => "ISO-8859-7", + "iso8859-8" => "ISO-8859-8", + "iso8859-9" => "ISO-8859-9", + "iso8859-10" => "ISO-8859-10", + "iso8859-11" => "ISO-8859-11", + "iso8859-13" => "ISO-8859-13", + "iso8859-14" => "ISO-8859-14", + "iso8859-15" => "ISO-8859-15", + "iso_8859-1:1987" => "ISO-8859-1", + "iso-ir-100" => "ISO-8859-1", + "l1" => "ISO-8859-1", + "ibm819" => "ISO-8859-1", + "cp819" => "ISO-8859-1", + "csisolatin1" => "ISO-8859-1", + // + // Aliases for ISO-8859-2 + // + "latin2" => "ISO-8859-2", + "iso_8859-2" => "ISO-8859-2", + "iso_8859-2:1987" => "ISO-8859-2", + "iso-ir-101" => "ISO-8859-2", + "l2" => "ISO-8859-2", + "csisolatin2" => "ISO-8859-2", + // + // Aliases for ISO-8859-3 + // + "latin3" => "ISO-8859-3", + "iso_8859-3" => "ISO-8859-3", + "iso_8859-3:1988" => "ISO-8859-3", + "iso-ir-109" => "ISO-8859-3", + "l3" => "ISO-8859-3", + "csisolatin3" => "ISO-8859-3", + // + // Aliases for ISO-8859-4 + // + "latin4" => "ISO-8859-4", + "iso_8859-4" => "ISO-8859-4", + "iso_8859-4:1988" => "ISO-8859-4", + "iso-ir-110" => "ISO-8859-4", + "l4" => "ISO-8859-4", + "csisolatin4" => "ISO-8859-4", + // + // Aliases for ISO-8859-5 + // + "cyrillic" => "ISO-8859-5", + "iso_8859-5" => "ISO-8859-5", + "iso_8859-5:1988" => "ISO-8859-5", + "iso-ir-144" => "ISO-8859-5", + "csisolatincyrillic" => "ISO-8859-5", + // + // Aliases for ISO-8859-6 + // + "arabic" => "ISO-8859-6", + "iso_8859-6" => "ISO-8859-6", + "iso_8859-6:1987" => "ISO-8859-6", + "iso-ir-127" => "ISO-8859-6", + "ecma-114" => "ISO-8859-6", + "asmo-708" => "ISO-8859-6", + "csisolatinarabic" => "ISO-8859-6", + // + // Aliases for ISO-8859-6-I + // + "csiso88596i" => "ISO-8859-6-I", + // + // Aliases for ISO-8859-6-E", + // + "csiso88596e" => "ISO-8859-6-E", + // + // Aliases for ISO-8859-7", + // + "greek" => "ISO-8859-7", + "greek8" => "ISO-8859-7", + "sun_eu_greek" => "ISO-8859-7", + "iso_8859-7" => "ISO-8859-7", + "iso_8859-7:1987" => "ISO-8859-7", + "iso-ir-126" => "ISO-8859-7", + "elot_928" => "ISO-8859-7", + "ecma-118" => "ISO-8859-7", + "csisolatingreek" => "ISO-8859-7", + // + // Aliases for ISO-8859-8", + // + "hebrew" => "ISO-8859-8", + "iso_8859-8" => "ISO-8859-8", + "visual" => "ISO-8859-8", + "iso_8859-8:1988" => "ISO-8859-8", + "iso-ir-138" => "ISO-8859-8", + "csisolatinhebrew" => "ISO-8859-8", + // + // Aliases for ISO-8859-8-I", + // + "csiso88598i" => "ISO-8859-8-I", + "iso-8859-8i" => "ISO-8859-8-I", + "logical" => "ISO-8859-8-I", + // + // Aliases for ISO-8859-8-E", + // + "csiso88598e" => "ISO-8859-8-E", + // + // Aliases for ISO-8859-9", + // + "latin5" => "ISO-8859-9", + "iso_8859-9" => "ISO-8859-9", + "iso_8859-9:1989" => "ISO-8859-9", + "iso-ir-148" => "ISO-8859-9", + "l5" => "ISO-8859-9", + "csisolatin5" => "ISO-8859-9", + // + // Aliases for UTF-8", + // + "unicode-1-1-utf-8" => "UTF-8", + // nl_langinfo(CODESET) in HP/UX returns 'utf8' under UTF-8 locales", + "utf8" => "UTF-8", + // + // Aliases for Shift_JIS", + // + "x-sjis" => "Shift_JIS", + "shift-jis" => "Shift_JIS", + "ms_kanji" => "Shift_JIS", + "csshiftjis" => "Shift_JIS", + "windows-31j" => "Shift_JIS", + "cp932" => "Shift_JIS", + "sjis" => "Shift_JIS", + // + // Aliases for EUC_JP", + // + "cseucpkdfmtjapanese" => "EUC-JP", + "x-euc-jp" => "EUC-JP", + // + // Aliases for ISO-2022-JP", + // + "csiso2022jp" => "ISO-2022-JP", + // The following are really not aliases ISO-2022-JP, but sharing the same decoder", + "iso-2022-jp-2" => "ISO-2022-JP", + "csiso2022jp2" => "ISO-2022-JP", + // + // Aliases for Big5", + // + "csbig5" => "Big5", + "cn-big5" => "Big5", + // x-x-big5 is not really a alias for Big5, add it only for MS FrontPage", + "x-x-big5" => "Big5", + // Sun Solaris", + "zh_tw-big5" => "Big5", + // + // Aliases for EUC-KR", + // + "cseuckr" => "EUC-KR", + "ks_c_5601-1987" => "EUC-KR", + "iso-ir-149" => "EUC-KR", + "ks_c_5601-1989" => "EUC-KR", + "ksc_5601" => "EUC-KR", + "ksc5601" => "EUC-KR", + "korean" => "EUC-KR", + "csksc56011987" => "EUC-KR", + "5601" => "EUC-KR", + "windows-949" => "EUC-KR", + // + // Aliases for GB2312", + // + // The following are really not aliases GB2312, add them only for MS FrontPage", + "gb_2312-80" => "GB2312", + "iso-ir-58" => "GB2312", + "chinese" => "GB2312", + "csiso58gb231280" => "GB2312", + "csgb2312" => "GB2312", + "zh_cn.euc" => "GB2312", + // Sun Solaris", + "gb_2312" => "GB2312", + // + // Aliases for windows-125x ", + // + "x-cp1250" => "windows-1250", + "x-cp1251" => "windows-1251", + "x-cp1252" => "windows-1252", + "x-cp1253" => "windows-1253", + "x-cp1254" => "windows-1254", + "x-cp1255" => "windows-1255", + "x-cp1256" => "windows-1256", + "x-cp1257" => "windows-1257", + "x-cp1258" => "windows-1258", + // + // Aliases for windows-874 ", + // + "windows-874" => "windows-874", + "ibm874" => "windows-874", + "dos-874" => "windows-874", + // + // Aliases for macintosh", + // + "macintosh" => "macintosh", + "x-mac-roman" => "macintosh", + "mac" => "macintosh", + "csmacintosh" => "macintosh", + // + // Aliases for IBM866", + // + "cp866" => "IBM866", + "cp-866" => "IBM866", + "866" => "IBM866", + "csibm866" => "IBM866", + // + // Aliases for IBM850", + // + "cp850" => "IBM850", + "850" => "IBM850", + "csibm850" => "IBM850", + // + // Aliases for IBM852", + // + "cp852" => "IBM852", + "852" => "IBM852", + "csibm852" => "IBM852", + // + // Aliases for IBM855", + // + "cp855" => "IBM855", + "855" => "IBM855", + "csibm855" => "IBM855", + // + // Aliases for IBM857", + // + "cp857" => "IBM857", + "857" => "IBM857", + "csibm857" => "IBM857", + // + // Aliases for IBM862", + // + "cp862" => "IBM862", + "862" => "IBM862", + "csibm862" => "IBM862", + // + // Aliases for IBM864", + // + "cp864" => "IBM864", + "864" => "IBM864", + "csibm864" => "IBM864", + "ibm-864" => "IBM864", + // + // Aliases for T.61-8bit", + // + "t.61" => "T.61-8bit", + "iso-ir-103" => "T.61-8bit", + "csiso103t618bit" => "T.61-8bit", + // + // Aliases for UTF-7", + // + "x-unicode-2-0-utf-7" => "UTF-7", + "unicode-2-0-utf-7" => "UTF-7", + "unicode-1-1-utf-7" => "UTF-7", + "csunicode11utf7" => "UTF-7", + // + // Aliases for ISO-10646-UCS-2", + // + "csunicode" => "UTF-16BE", + "csunicode11" => "UTF-16BE", + "iso-10646-ucs-basic" => "UTF-16BE", + "csunicodeascii" => "UTF-16BE", + "iso-10646-unicode-latin1" => "UTF-16BE", + "csunicodelatin1" => "UTF-16BE", + "iso-10646" => "UTF-16BE", + "iso-10646-j-1" => "UTF-16BE", + // + // Aliases for ISO-8859-10", + // + "latin6" => "ISO-8859-10", + "iso-ir-157" => "ISO-8859-10", + "l6" => "ISO-8859-10", + // Currently .properties cannot handle : in key", + //iso_8859-10:1992" => "ISO-8859-10", + "csisolatin6" => "ISO-8859-10", + // + // Aliases for ISO-8859-15", + // + "iso_8859-15" => "ISO-8859-15", + "csisolatin9" => "ISO-8859-15", + "l9" => "ISO-8859-15", + // + // Aliases for ISO-IR-111", + // + "ecma-cyrillic" => "ISO-IR-111", + "csiso111ecmacyrillic" => "ISO-IR-111", + // + // Aliases for ISO-2022-KR", + // + "csiso2022kr" => "ISO-2022-KR", + // + // Aliases for VISCII", + // + "csviscii" => "VISCII", + // + // Aliases for x-euc-tw", + // + "zh_tw-euc" => "x-euc-tw", + // + // Following names appears in unix nl_langinfo(CODESET)", + // They can be compiled as platform specific if necessary", + // DONT put things here if it does not look generic enough (like hp15CN)", + // + "iso88591" => "ISO-8859-1", + "iso88592" => "ISO-8859-2", + "iso88593" => "ISO-8859-3", + "iso88594" => "ISO-8859-4", + "iso88595" => "ISO-8859-5", + "iso88596" => "ISO-8859-6", + "iso88597" => "ISO-8859-7", + "iso88598" => "ISO-8859-8", + "iso88599" => "ISO-8859-9", + "iso885910" => "ISO-8859-10", + "iso885911" => "ISO-8859-11", + "iso885912" => "ISO-8859-12", + "iso885913" => "ISO-8859-13", + "iso885914" => "ISO-8859-14", + "iso885915" => "ISO-8859-15", + "cp1250" => "windows-1250", + "cp1251" => "windows-1251", + "cp1252" => "windows-1252", + "cp1253" => "windows-1253", + "cp1254" => "windows-1254", + "cp1255" => "windows-1255", + "cp1256" => "windows-1256", + "cp1257" => "windows-1257", + "cp1258" => "windows-1258", + "x-gbk" => "gbk", + "windows-936" => "gbk", + "ansi-1251" => "windows-1251", + ]; + + /** + * Returns proper encoding mapping, if exsists. If it doesn't, return unchanged $encoding + * @param string $encoding + * @param string|null $fallback + * + * @return string + */ + public static function get($encoding, $fallback = null) { + if (isset(self::$aliases[strtolower($encoding)])) { + return self::$aliases[strtolower($encoding)]; + } + return $fallback !== null ? $fallback : $encoding; + } + +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/Event.php b/htdocs/includes/webklex/php-imap/src/Events/Event.php new file mode 100644 index 00000000000..921f28b25ed --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/Event.php @@ -0,0 +1,28 @@ +message = $arguments[0]; + $this->flag = $arguments[1]; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/FolderDeletedEvent.php b/htdocs/includes/webklex/php-imap/src/Events/FolderDeletedEvent.php new file mode 100644 index 00000000000..89b5083f975 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/FolderDeletedEvent.php @@ -0,0 +1,22 @@ +old_folder = $folders[0]; + $this->new_folder = $folders[1]; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/FolderNewEvent.php b/htdocs/includes/webklex/php-imap/src/Events/FolderNewEvent.php new file mode 100644 index 00000000000..d16bbbd67b6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/FolderNewEvent.php @@ -0,0 +1,35 @@ +folder = $folders[0]; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/MessageCopiedEvent.php b/htdocs/includes/webklex/php-imap/src/Events/MessageCopiedEvent.php new file mode 100644 index 00000000000..a6a3a447f50 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/MessageCopiedEvent.php @@ -0,0 +1,22 @@ +old_message = $messages[0]; + $this->new_message = $messages[1]; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/MessageNewEvent.php b/htdocs/includes/webklex/php-imap/src/Events/MessageNewEvent.php new file mode 100644 index 00000000000..1487e28d6bd --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/MessageNewEvent.php @@ -0,0 +1,35 @@ +message = $messages[0]; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Events/MessageRestoredEvent.php b/htdocs/includes/webklex/php-imap/src/Events/MessageRestoredEvent.php new file mode 100644 index 00000000000..25b6520a740 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Events/MessageRestoredEvent.php @@ -0,0 +1,22 @@ +client = $client; + + $this->events["message"] = $client->getDefaultEvents("message"); + $this->events["folder"] = $client->getDefaultEvents("folder"); + + $this->setDelimiter($delimiter); + $this->path = $folder_name; + $this->full_name = $this->decodeName($folder_name); + $this->name = $this->getSimpleName($this->delimiter, $this->full_name); + + $this->parseAttributes($attributes); + } + + /** + * Get a new search query instance + * @param string $charset + * + * @return WhereQuery + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function query($charset = 'UTF-8'){ + $this->getClient()->checkConnection(); + $this->getClient()->openFolder($this->path); + + return new WhereQuery($this->getClient(), $charset); + } + + /** + * @inheritdoc self::query($charset = 'UTF-8') + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function search($charset = 'UTF-8'){ + return $this->query($charset); + } + + /** + * @inheritdoc self::query($charset = 'UTF-8') + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function messages($charset = 'UTF-8'){ + return $this->query($charset); + } + + /** + * Determine if folder has children. + * + * @return bool + */ + public function hasChildren() { + return $this->has_children; + } + + /** + * Set children. + * @param FolderCollection|array $children + * + * @return self + */ + public function setChildren($children = []) { + $this->children = $children; + + return $this; + } + + /** + * Decode name. + * It converts UTF7-IMAP encoding to UTF-8. + * @param $name + * + * @return mixed|string + */ + protected function decodeName($name) { + return mb_convert_encoding($name, "UTF-8", "UTF7-IMAP"); + } + + /** + * Get simple name (without parent folders). + * @param $delimiter + * @param $full_name + * + * @return mixed + */ + protected function getSimpleName($delimiter, $full_name) { + $arr = explode($delimiter, $full_name); + + return end($arr); + } + + /** + * Parse attributes and set it to object properties. + * @param $attributes + */ + protected function parseAttributes($attributes) { + $this->no_inferiors = in_array('\NoInferiors', $attributes) ? true : false; + $this->no_select = in_array('\NoSelect', $attributes) ? true : false; + $this->marked = in_array('\Marked', $attributes) ? true : false; + $this->referral = in_array('\Referral', $attributes) ? true : false; + $this->has_children = in_array('\HasChildren', $attributes) ? true : false; + } + + /** + * Move or rename the current folder + * @param string $new_name + * @param boolean $expunge + * + * @return bool + * @throws ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function move($new_name, $expunge = true) { + $this->client->checkConnection(); + $status = $this->client->getConnection()->renameFolder($this->full_name, $new_name); + if($expunge) $this->client->expunge(); + + $folder = $this->client->getFolder($new_name); + $event = $this->getEvent("folder", "moved"); + $event::dispatch($this, $folder); + + return $status; + } + + /** + * Get a message overview + * @param string|null $sequence uid sequence + * + * @return array + * @throws ConnectionFailedException + * @throws Exceptions\InvalidMessageDateException + * @throws Exceptions\MessageNotFoundException + * @throws Exceptions\RuntimeException + */ + public function overview($sequence = null){ + $this->client->openFolder($this->path); + $sequence = $sequence === null ? "1:*" : $sequence; + $uid = ClientManager::get('options.sequence', IMAP::ST_MSGN) == IMAP::ST_UID; + return $this->client->getConnection()->overview($sequence, $uid); + } + + /** + * Append a string message to the current mailbox + * @param string $message + * @param string $options + * @param string $internal_date + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function appendMessage($message, $options = null, $internal_date = null) { + /** + * Check if $internal_date is parsed. If it is null it should not be set. Otherwise the message can't be stored. + * If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a + * date string that conforms to the rfc2060 specifications for a date_time value or be a Carbon object. + */ + + if ($internal_date != null) { + if ($internal_date instanceof Carbon){ + $internal_date = $internal_date->format('d-M-Y H:i:s O'); + } + } + + return $this->client->getConnection()->appendMessage($this->full_name, $message, $options, $internal_date); + } + + /** + * Rename the current folder + * @param string $new_name + * @param boolean $expunge + * + * @return bool + * @throws ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function rename($new_name, $expunge = true) { + return $this->move($new_name, $expunge); + } + + /** + * Delete the current folder + * @param boolean $expunge + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + * @throws Exceptions\EventNotFoundException + */ + public function delete($expunge = true) { + $status = $this->client->getConnection()->deleteFolder($this->path); + if($expunge) $this->client->expunge(); + + $event = $this->getEvent("folder", "deleted"); + $event::dispatch($this); + + return $status; + } + + /** + * Subscribe the current folder + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function subscribe() { + $this->client->openFolder($this->path); + return $this->client->getConnection()->subscribeFolder($this->path); + } + + /** + * Unsubscribe the current folder + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function unsubscribe() { + $this->client->openFolder($this->path); + return $this->client->getConnection()->unsubscribeFolder($this->path); + } + + /** + * Idle the current connection + * @param callable $callback + * @param integer $timeout max 1740 seconds - recommended by rfc2177 §3 + * @param boolean $auto_reconnect try to reconnect on connection close + * + * @throws ConnectionFailedException + * @throws Exceptions\InvalidMessageDateException + * @throws Exceptions\MessageContentFetchingException + * @throws Exceptions\MessageHeaderFetchingException + * @throws Exceptions\RuntimeException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\MessageFlagException + * @throws Exceptions\MessageNotFoundException + */ + public function idle(callable $callback, $timeout = 1200, $auto_reconnect = false) { + $this->client->getConnection()->setConnectionTimeout($timeout); + + $this->client->reconnect(); + $this->client->openFolder($this->path, true); + $connection = $this->client->getConnection(); + + $sequence = ClientManager::get('options.sequence', IMAP::ST_MSGN); + $connection->idle(); + + while (true) { + try { + $line = $connection->nextLine(); + if (($pos = strpos($line, "EXISTS")) !== false) { + $msgn = (int) substr($line, 2, $pos -2); + $connection->done(); + + $this->client->openFolder($this->path, true); + $message = $this->query()->getMessageByMsgn($msgn); + $message->setSequence($sequence); + $callback($message); + + $event = $this->getEvent("message", "new"); + $event::dispatch($message); + + $connection->idle(); + } + }catch (Exceptions\RuntimeException $e) { + if(strpos($e->getMessage(), "connection closed") === false) { + throw $e; + } + if ($auto_reconnect === true) { + $this->client->reconnect(); + $this->client->openFolder($this->path, true); + + $connection = $this->client->getConnection(); + $connection->idle(); + } + } + } + } + + /** + * Get folder status information + * + * @return array|bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function getStatus() { + return $this->examine(); + } + + /** + * Examine the current folder + * + * @return array + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function examine() { + return $this->client->getConnection()->examineFolder($this->path); + } + + /** + * Get the current Client instance + * + * @return Client + */ + public function getClient() { + return $this->client; + } + + /** + * Set the delimiter + * @param $delimiter + */ + public function setDelimiter($delimiter){ + if(in_array($delimiter, [null, '', ' ', false]) === true) { + $delimiter = ClientManager::get('options.delimiter', '/'); + } + + $this->delimiter = $delimiter; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Header.php b/htdocs/includes/webklex/php-imap/src/Header.php new file mode 100644 index 00000000000..9fecd69fa3c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Header.php @@ -0,0 +1,753 @@ +raw = $raw_header; + $this->config = ClientManager::get('options'); + $this->attributize = $attributize; + $this->parse(); + } + + /** + * Call dynamic attribute setter and getter methods + * @param string $method + * @param array $arguments + * + * @return Attribute|mixed + * @throws MethodNotFoundException + */ + public function __call($method, $arguments) { + if(strtolower(substr($method, 0, 3)) === 'get') { + $name = preg_replace('/(.)(?=[A-Z])/u', '$1_', substr(strtolower($method), 3)); + + if(in_array($name, array_keys($this->attributes))) { + return $this->attributes[$name]; + } + + } + + throw new MethodNotFoundException("Method ".self::class.'::'.$method.'() is not supported'); + } + + /** + * Magic getter + * @param $name + * + * @return Attribute|null + */ + public function __get($name) { + return $this->get($name); + } + + /** + * Get a specific header attribute + * @param $name + * + * @return Attribute|mixed + */ + public function get($name) { + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + return null; + } + + /** + * Set a specific attribute + * @param string $name + * @param array|mixed $value + * @param boolean $strict + * + * @return Attribute + */ + public function set($name, $value, $strict = false) { + if(isset($this->attributes[$name]) && $strict === false) { + if ($this->attributize) { + $this->attributes[$name]->add($value, true); + }else{ + if(isset($this->attributes[$name])) { + if (is_array($this->attributes[$name]) == false) { + $this->attributes[$name] = [$this->attributes[$name], $value]; + }else{ + $this->attributes[$name][] = $value; + } + }else{ + $this->attributes[$name] = $value; + } + } + }elseif($this->attributize == false){ + $this->attributes[$name] = $value; + }else{ + $this->attributes[$name] = new Attribute($name, $value); + } + + return $this->attributes[$name]; + } + + /** + * Perform a regex match all on the raw header and return the first result + * @param $pattern + * + * @return mixed|null + */ + public function find($pattern) { + if (preg_match_all($pattern, $this->raw, $matches)) { + if (isset($matches[1])) { + if(count($matches[1]) > 0) { + return $matches[1][0]; + } + } + } + return null; + } + + /** + * Try to find a boundary if possible + * + * @return string|null + */ + public function getBoundary(){ + $boundary = $this->find("/boundary\=(.*)/i"); + + if ($boundary === null) { + return null; + } + + return $this->clearBoundaryString($boundary); + } + + /** + * Remove all unwanted chars from a given boundary + * @param string $str + * + * @return string + */ + private function clearBoundaryString($str) { + return str_replace(['"', '\r', '\n', "\n", "\r", ";", "\s"], "", $str); + } + + /** + * Parse the raw headers + * + * @throws InvalidMessageDateException + */ + protected function parse(){ + $header = $this->rfc822_parse_headers($this->raw); + + $this->extractAddresses($header); + + if (property_exists($header, 'subject')) { + $this->set("subject", $this->decode($header->subject)); + } + if (property_exists($header, 'references')) { + $this->set("references", $this->decode($header->references)); + } + if (property_exists($header, 'message_id')) { + $this->set("message_id", str_replace(['<', '>'], '', $header->message_id)); + } + + $this->parseDate($header); + foreach ($header as $key => $value) { + $key = trim(rtrim(strtolower($key))); + if(!isset($this->attributes[$key])){ + $this->set($key, $value); + } + } + + $this->extractHeaderExtensions(); + $this->findPriority(); + } + + /** + * Parse mail headers from a string + * @link https://php.net/manual/en/function.imap-rfc822-parse-headers.php + * @param $raw_headers + * + * @return object + */ + public function rfc822_parse_headers($raw_headers){ + $headers = []; + $imap_headers = []; + if (extension_loaded('imap') && $this->config["rfc822"]) { + $raw_imap_headers = (array) \imap_rfc822_parse_headers($this->raw); + foreach($raw_imap_headers as $key => $values) { + $key = str_replace("-", "_", $key); + $imap_headers[$key] = $values; + } + } + $lines = explode("\r\n", str_replace("\r\n\t", ' ', $raw_headers)); + $prev_header = null; + foreach($lines as $line) { + if (substr($line, 0, 1) === "\n") { + $line = substr($line, 1); + } + + if (substr($line, 0, 1) === "\t") { + $line = substr($line, 1); + $line = trim(rtrim($line)); + if ($prev_header !== null) { + $headers[$prev_header][] = $line; + } + }elseif (substr($line, 0, 1) === " ") { + $line = substr($line, 1); + $line = trim(rtrim($line)); + if ($prev_header !== null) { + if (!isset($headers[$prev_header])) { + $headers[$prev_header] = ""; + } + if (is_array($headers[$prev_header])) { + $headers[$prev_header][] = $line; + }else{ + $headers[$prev_header] .= $line; + } + } + }else{ + if (($pos = strpos($line, ":")) > 0) { + $key = trim(rtrim(strtolower(substr($line, 0, $pos)))); + $key = str_replace("-", "_", $key); + + $value = trim(rtrim(substr($line, $pos + 1))); + if (isset($headers[$key])) { + $headers[$key][] = $value; + }else{ + $headers[$key] = [$value]; + } + $prev_header = $key; + } + } + } + + foreach($headers as $key => $values) { + if (isset($imap_headers[$key])) continue; + $value = null; + switch($key){ + case 'from': + case 'to': + case 'cc': + case 'bcc': + case 'reply_to': + case 'sender': + $value = $this->decodeAddresses($values); + $headers[$key."address"] = implode(", ", $values); + break; + case 'subject': + $value = implode(" ", $values); + break; + default: + if (is_array($values)) { + foreach($values as $k => $v) { + if ($v == "") { + unset($values[$k]); + } + } + $available_values = count($values); + if ($available_values === 1) { + $value = array_pop($values); + } elseif ($available_values === 2) { + $value = implode(" ", $values); + } elseif ($available_values > 2) { + $value = array_values($values); + } else { + $value = ""; + } + } + break; + } + $headers[$key] = $value; + } + + return (object) array_merge($headers, $imap_headers); + } + + /** + * Decode MIME header elements + * @link https://php.net/manual/en/function.imap-mime-header-decode.php + * @param string $text The MIME text + * + * @return array The decoded elements are returned in an array of objects, where each + * object has two properties, charset and text. + */ + public function mime_header_decode($text){ + if (extension_loaded('imap')) { + return \imap_mime_header_decode($text); + } + $charset = $this->getEncoding($text); + return [(object)[ + "charset" => $charset, + "text" => $this->convertEncoding($text, $charset) + ]]; + } + + /** + * Check if a given pair of strings has ben decoded + * @param $encoded + * @param $decoded + * + * @return bool + */ + private function notDecoded($encoded, $decoded) { + return 0 === strpos($decoded, '=?') + && strlen($decoded) - 2 === strpos($decoded, '?=') + && false !== strpos($encoded, $decoded); + } + + /** + * Convert the encoding + * @param $str + * @param string $from + * @param string $to + * + * @return mixed|string + */ + public function convertEncoding($str, $from = "ISO-8859-2", $to = "UTF-8") { + + $from = EncodingAliases::get($from, $this->fallback_encoding); + $to = EncodingAliases::get($to, $this->fallback_encoding); + + if ($from === $to) { + return $str; + } + + // We don't need to do convertEncoding() if charset is ASCII (us-ascii): + // ASCII is a subset of UTF-8, so all ASCII files are already UTF-8 encoded + // https://stackoverflow.com/a/11303410 + // + // us-ascii is the same as ASCII: + // ASCII is the traditional name for the encoding system; the Internet Assigned Numbers Authority (IANA) + // prefers the updated name US-ASCII, which clarifies that this system was developed in the US and + // based on the typographical symbols predominantly in use there. + // https://en.wikipedia.org/wiki/ASCII + // + // convertEncoding() function basically means convertToUtf8(), so when we convert ASCII string into UTF-8 it gets broken. + if (strtolower($from) == 'us-ascii' && $to == 'UTF-8') { + return $str; + } + + try { + if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') { + return iconv($from, $to, $str); + } else { + if (!$from) { + return mb_convert_encoding($str, $to); + } + return mb_convert_encoding($str, $to, $from); + } + } catch (\Exception $e) { + if (strstr($from, '-')) { + $from = str_replace('-', '', $from); + return $this->convertEncoding($str, $from, $to); + } else { + return $str; + } + } + } + + /** + * Get the encoding of a given abject + * @param object|string $structure + * + * @return string + */ + public function getEncoding($structure) { + if (property_exists($structure, 'parameters')) { + foreach ($structure->parameters as $parameter) { + if (strtolower($parameter->attribute) == "charset") { + return EncodingAliases::get($parameter->value, $this->fallback_encoding); + } + } + }elseif (property_exists($structure, 'charset')) { + return EncodingAliases::get($structure->charset, $this->fallback_encoding); + }elseif (is_string($structure) === true){ + return mb_detect_encoding($structure); + } + + return $this->fallback_encoding; + } + + /** + * Test if a given value is utf-8 encoded + * @param $value + * + * @return bool + */ + private function is_uft8($value) { + return strpos(strtolower($value), '=?utf-8?') === 0; + } + + /** + * Try to decode a specific header + * @param mixed $value + * + * @return mixed + */ + private function decode($value) { + if (is_array($value)) { + return $this->decodeArray($value); + } + $original_value = $value; + $decoder = $this->config['decoder']['message']; + + if ($value !== null) { + $is_utf8_base = $this->is_uft8($value); + + if($decoder === 'utf-8' && extension_loaded('imap')) { + $value = \imap_utf8($value); + $is_utf8_base = $this->is_uft8($value); + if ($is_utf8_base) { + $value = mb_decode_mimeheader($value); + } + if ($this->notDecoded($original_value, $value)) { + $decoded_value = $this->mime_header_decode($value); + if (count($decoded_value) > 0) { + if(property_exists($decoded_value[0], "text")) { + $value = $decoded_value[0]->text; + } + } + } + }elseif($decoder === 'iconv' && $is_utf8_base) { + $value = iconv_mime_decode($value); + }elseif($is_utf8_base){ + $value = mb_decode_mimeheader($value); + } + + if ($this->is_uft8($value)) { + $value = mb_decode_mimeheader($value); + } + + if ($this->notDecoded($original_value, $value)) { + $value = $this->convertEncoding($original_value, $this->getEncoding($original_value)); + } + } + + return $value; + } + + /** + * Decode a given array + * @param array $values + * + * @return array + */ + private function decodeArray($values) { + foreach($values as $key => $value) { + $values[$key] = $this->decode($value); + } + return $values; + } + + /** + * Try to extract the priority from a given raw header string + */ + private function findPriority() { + if(($priority = $this->get("x_priority")) === null) return; + switch((int)"$priority"){ + case IMAP::MESSAGE_PRIORITY_HIGHEST; + $priority = IMAP::MESSAGE_PRIORITY_HIGHEST; + break; + case IMAP::MESSAGE_PRIORITY_HIGH; + $priority = IMAP::MESSAGE_PRIORITY_HIGH; + break; + case IMAP::MESSAGE_PRIORITY_NORMAL; + $priority = IMAP::MESSAGE_PRIORITY_NORMAL; + break; + case IMAP::MESSAGE_PRIORITY_LOW; + $priority = IMAP::MESSAGE_PRIORITY_LOW; + break; + case IMAP::MESSAGE_PRIORITY_LOWEST; + $priority = IMAP::MESSAGE_PRIORITY_LOWEST; + break; + default: + $priority = IMAP::MESSAGE_PRIORITY_UNKNOWN; + break; + } + + $this->set("priority", $priority); + } + + /** + * Extract a given part as address array from a given header + * @param $values + * + * @return array + */ + private function decodeAddresses($values) { + $addresses = []; + + if (extension_loaded('mailparse') && $this->config["rfc822"]) { + foreach ($values as $address) { + foreach (\mailparse_rfc822_parse_addresses($address) as $parsed_address) { + if (isset($parsed_address['address'])) { + $mail_address = explode('@', $parsed_address['address']); + if (count($mail_address) == 2) { + $addresses[] = (object)[ + "personal" => isset($parsed_address['display']) ? $parsed_address['display'] : '', + "mailbox" => $mail_address[0], + "host" => $mail_address[1], + ]; + } + } + } + } + + return $addresses; + } + + foreach($values as $address) { + foreach (preg_split('/, (?=(?:[^"]*"[^"]*")*[^"]*$)/', $address) as $split_address) { + $split_address = trim(rtrim($split_address)); + + if (strpos($split_address, ",") == strlen($split_address) - 1) { + $split_address = substr($split_address, 0, -1); + } + if (preg_match( + '/^(?:(?P.+)\s)?(?(name)<|[^\s]+?)(?(name)>|>?)$/', + $split_address, + $matches + )) { + $name = trim(rtrim($matches["name"])); + $email = trim(rtrim($matches["email"])); + list($mailbox, $host) = array_pad(explode("@", $email), 2, null); + $addresses[] = (object)[ + "personal" => $name, + "mailbox" => $mailbox, + "host" => $host, + ]; + } + } + } + + return $addresses; + } + + /** + * Extract a given part as address array from a given header + * @param object $header + */ + private function extractAddresses($header) { + foreach(['from', 'to', 'cc', 'bcc', 'reply_to', 'sender'] as $key){ + if (property_exists($header, $key)) { + $this->set($key, $this->parseAddresses($header->$key)); + } + } + } + + /** + * Parse Addresses + * @param $list + * + * @return array + */ + private function parseAddresses($list) { + $addresses = []; + + if (is_array($list) === false) { + return $addresses; + } + + foreach ($list as $item) { + $address = (object) $item; + + if (!property_exists($address, 'mailbox')) { + $address->mailbox = false; + } + if (!property_exists($address, 'host')) { + $address->host = false; + } + if (!property_exists($address, 'personal')) { + $address->personal = false; + } else { + $personalParts = $this->mime_header_decode($address->personal); + + if(is_array($personalParts)) { + $address->personal = ''; + foreach ($personalParts as $p) { + $address->personal .= $this->convertEncoding($p->text, $this->getEncoding($p)); + } + } + + if (strpos($address->personal, "'") === 0) { + $address->personal = str_replace("'", "", $address->personal); + } + } + + $address->mail = ($address->mailbox && $address->host) ? $address->mailbox.'@'.$address->host : false; + $address->full = ($address->personal) ? $address->personal.' <'.$address->mail.'>' : $address->mail; + + $addresses[] = new Address($address); + } + + return $addresses; + } + + /** + * Search and extract potential header extensions + */ + private function extractHeaderExtensions(){ + foreach ($this->attributes as $key => $value) { + if (is_array($value)) { + $value = implode(", ", $value); + }else{ + $value = (string)$value; + } + // Only parse strings and don't parse any attributes like the user-agent + if (in_array($key, ["user_agent"]) === false) { + if (($pos = strpos($value, ";")) !== false){ + $original = substr($value, 0, $pos); + $this->set($key, trim(rtrim($original)), true); + + // Get all potential extensions + $extensions = explode(";", substr($value, $pos + 1)); + foreach($extensions as $extension) { + if (($pos = strpos($extension, "=")) !== false){ + $key = substr($extension, 0, $pos); + $key = trim(rtrim(strtolower($key))); + + if (isset($this->attributes[$key]) === false) { + $value = substr($extension, $pos + 1); + $value = str_replace('"', "", $value); + $value = trim(rtrim($value)); + + $this->set($key, $value); + } + } + } + } + } + } + } + + /** + * Exception handling for invalid dates + * + * Currently known invalid formats: + * ^ Datetime ^ Problem ^ Cause + * | Mon, 20 Nov 2017 20:31:31 +0800 (GMT+8:00) | Double timezone specification | A Windows feature + * | Thu, 8 Nov 2018 08:54:58 -0200 (-02) | + * | | and invalid timezone (max 6 char) | + * | 04 Jan 2018 10:12:47 UT | Missing letter "C" | Unknown + * | Thu, 31 May 2018 18:15:00 +0800 (added by) | Non-standard details added by the | Unknown + * | | mail server | + * | Sat, 31 Aug 2013 20:08:23 +0580 | Invalid timezone | PHPMailer bug https://sourceforge.net/p/phpmailer/mailman/message/6132703/ + * + * Please report any new invalid timestamps to [#45](https://github.com/Webklex/php-imap/issues) + * + * @param object $header + * + * @throws InvalidMessageDateException + */ + private function parseDate($header) { + + if (property_exists($header, 'date')) { + $parsed_date = null; + $date = $header->date; + + if(preg_match('/\+0580/', $date)) { + $date = str_replace('+0580', '+0530', $date); + } + + $date = trim(rtrim($date)); + try { + $parsed_date = Carbon::parse($date); + } catch (\Exception $e) { + switch (true) { + case preg_match('/([0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\ UT)+$/i', $date) > 0: + case preg_match('/([A-Z]{2,3}\,\ [0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\ UT)+$/i', $date) > 0: + $date .= 'C'; + break; + case preg_match('/([A-Z]{2,3}\,\ [0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\ \+[0-9]{2,4}\ \(\+[0-9]{1,2}\))+$/i', $date) > 0: + case preg_match('/([A-Z]{2,3}[\,|\ \,]\ [0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}.*)+$/i', $date) > 0: + case preg_match('/([A-Z]{2,3}\,\ [0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\ [\-|\+][0-9]{4}\ \(.*)\)+$/i', $date) > 0: + case preg_match('/([A-Z]{2,3}\, \ [0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{4}\ [0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\ [\-|\+][0-9]{4}\ \(.*)\)+$/i', $date) > 0: + case preg_match('/([0-9]{1,2}\ [A-Z]{2,3}\ [0-9]{2,4}\ [0-9]{2}\:[0-9]{2}\:[0-9]{2}\ [A-Z]{2}\ \-[0-9]{2}\:[0-9]{2}\ \([A-Z]{2,3}\ \-[0-9]{2}:[0-9]{2}\))+$/i', $date) > 0: + $array = explode('(', $date); + $array = array_reverse($array); + $date = trim(array_pop($array)); + break; + } + try{ + $parsed_date = Carbon::parse($date); + } catch (\Exception $_e) { + throw new InvalidMessageDateException("Invalid message date. ID:".$this->get("message_id"), 1100, $e); + } + } + + $this->set("date", $parsed_date); + } + } + + /** + * Get all available attributes + * + * @return array + */ + public function getAttributes() { + return $this->attributes; + } + +} diff --git a/htdocs/includes/webklex/php-imap/src/IMAP.php b/htdocs/includes/webklex/php-imap/src/IMAP.php new file mode 100644 index 00000000000..41ae8248b61 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/IMAP.php @@ -0,0 +1,375 @@ +imap_close + * @link http://php.net/manual/en/imap.constants.php + */ + const CL_EXPUNGE = 32768; + + /** + * The parameter is a UID + * @link http://php.net/manual/en/imap.constants.php + */ + const FT_UID = 1; + + /** + * Do not set the \Seen flag if not already set + * @link http://php.net/manual/en/imap.constants.php + */ + const FT_PEEK = 2; + const FT_NOT = 4; + + /** + * The return string is in internal format, will not canonicalize to CRLF. + * @link http://php.net/manual/en/imap.constants.php + */ + const FT_INTERNAL = 8; + const FT_PREFETCHTEXT = 32; + + /** + * The sequence argument contains UIDs instead of sequence numbers + * @link http://php.net/manual/en/imap.constants.php + */ + const ST_UID = 1; + const ST_SILENT = 2; + const ST_MSGN = 3; + const ST_SET = 4; + + /** + * the sequence numbers contain UIDS + * @link http://php.net/manual/en/imap.constants.php + */ + const CP_UID = 1; + + /** + * Delete the messages from the current mailbox after copying + * with imap_mail_copy + * @link http://php.net/manual/en/imap.constants.php + */ + const CP_MOVE = 2; + + /** + * Return UIDs instead of sequence numbers + * @link http://php.net/manual/en/imap.constants.php + */ + const SE_UID = 1; + const SE_FREE = 2; + + /** + * Don't prefetch searched messages + * @link http://php.net/manual/en/imap.constants.php + */ + const SE_NOPREFETCH = 4; + const SO_FREE = 8; + const SO_NOSERVER = 16; + const SA_MESSAGES = 1; + const SA_RECENT = 2; + const SA_UNSEEN = 4; + const SA_UIDNEXT = 8; + const SA_UIDVALIDITY = 16; + const SA_ALL = 31; + + /** + * This mailbox has no "children" (there are no + * mailboxes below this one). + * @link http://php.net/manual/en/imap.constants.php + */ + const LATT_NOINFERIORS = 1; + + /** + * This is only a container, not a mailbox - you + * cannot open it. + * @link http://php.net/manual/en/imap.constants.php + */ + const LATT_NOSELECT = 2; + + /** + * This mailbox is marked. Only used by UW-IMAPD. + * @link http://php.net/manual/en/imap.constants.php + */ + const LATT_MARKED = 4; + + /** + * This mailbox is not marked. Only used by + * UW-IMAPD. + * @link http://php.net/manual/en/imap.constants.php + */ + const LATT_UNMARKED = 8; + const LATT_REFERRAL = 16; + const LATT_HASCHILDREN = 32; + const LATT_HASNOCHILDREN = 64; + + /** + * Sort criteria for imap_sort: + * message Date + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTDATE = 0; + + /** + * Sort criteria for imap_sort: + * arrival date + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTARRIVAL = 1; + + /** + * Sort criteria for imap_sort: + * mailbox in first From address + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTFROM = 2; + + /** + * Sort criteria for imap_sort: + * message subject + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTSUBJECT = 3; + + /** + * Sort criteria for imap_sort: + * mailbox in first To address + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTTO = 4; + + /** + * Sort criteria for imap_sort: + * mailbox in first cc address + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTCC = 5; + + /** + * Sort criteria for imap_sort: + * size of message in octets + * @link http://php.net/manual/en/imap.constants.php + */ + const SORTSIZE = 6; + const TYPETEXT = 0; + const TYPEMULTIPART = 1; + const TYPEMESSAGE = 2; + const TYPEAPPLICATION = 3; + const TYPEAUDIO = 4; + const TYPEIMAGE = 5; + const TYPEVIDEO = 6; + const TYPEMODEL = 7; + const TYPEOTHER = 8; + const ENC7BIT = 0; + const ENC8BIT = 1; + const ENCBINARY = 2; + const ENCBASE64 = 3; + const ENCQUOTEDPRINTABLE = 4; + const ENCOTHER = 5; + + /** + * Garbage collector, clear message cache elements. + * @link http://php.net/manual/en/imap.constants.php + */ + const IMAP_GC_ELT = 1; + + /** + * Garbage collector, clear envelopes and bodies. + * @link http://php.net/manual/en/imap.constants.php + */ + const IMAP_GC_ENV = 2; + + /** + * Garbage collector, clear texts. + * @link http://php.net/manual/en/imap.constants.php + */ + const IMAP_GC_TEXTS = 4; + +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Message.php b/htdocs/includes/webklex/php-imap/src/Message.php new file mode 100755 index 00000000000..90ed1a89141 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Message.php @@ -0,0 +1,1419 @@ +boot(); + + $default_mask = $client->getDefaultMessageMask(); + if($default_mask != null) { + $this->mask = $default_mask; + } + $this->events["message"] = $client->getDefaultEvents("message"); + $this->events["flag"] = $client->getDefaultEvents("flag"); + + $this->folder_path = $client->getFolderPath(); + + $this->setSequence($sequence); + $this->setFetchOption($fetch_options); + $this->setFetchBodyOption($fetch_body); + $this->setFetchFlagsOption($fetch_flags); + + $this->client = $client; + $this->client->openFolder($this->folder_path); + + $this->setSequenceId($uid, $msglist); + + if ($this->fetch_options == IMAP::FT_PEEK) { + $this->parseFlags(); + } + + $this->parseHeader(); + + if ($this->getFetchBodyOption() === true) { + $this->parseBody(); + } + + if ($this->getFetchFlagsOption() === true && $this->fetch_options !== IMAP::FT_PEEK) { + $this->parseFlags(); + } + } + + /** + * Create a new instance without fetching the message header and providing them raw instead + * @param int $uid + * @param int|null $msglist + * @param Client $client + * @param string $raw_header + * @param string $raw_body + * @param array $raw_flags + * @param null $fetch_options + * @param null $sequence + * + * @return Message + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws ReflectionException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + * @throws Exceptions\MessageNotFoundException + */ + public static function make($uid, $msglist, Client $client, $raw_header, $raw_body, $raw_flags, $fetch_options = null, $sequence = null){ + $reflection = new ReflectionClass(self::class); + /** @var self $instance */ + $instance = $reflection->newInstanceWithoutConstructor(); + $instance->boot(); + + $default_mask = $client->getDefaultMessageMask(); + if($default_mask != null) { + $instance->setMask($default_mask); + } + $instance->setEvents([ + "message" => $client->getDefaultEvents("message"), + "flag" => $client->getDefaultEvents("flag"), + ]); + $instance->setFolderPath($client->getFolderPath()); + $instance->setSequence($sequence); + $instance->setFetchOption($fetch_options); + + $instance->setClient($client); + $instance->setSequenceId($uid, $msglist); + + $instance->parseRawHeader($raw_header); + $instance->parseRawFlags($raw_flags); + $instance->parseRawBody($raw_body); + $instance->peek(); + + return $instance; + } + + /** + * Boot a new instance + */ + public function boot(){ + $this->attributes = []; + + $this->config = ClientManager::get('options'); + $this->available_flags = ClientManager::get('flags'); + + $this->attachments = AttachmentCollection::make([]); + $this->flags = FlagCollection::make([]); + } + + /** + * Call dynamic attribute setter and getter methods + * @param string $method + * @param array $arguments + * + * @return mixed + * @throws MethodNotFoundException + */ + public function __call($method, $arguments) { + if(strtolower(substr($method, 0, 3)) === 'get') { + $name = Str::snake(substr($method, 3)); + return $this->get($name); + }elseif (strtolower(substr($method, 0, 3)) === 'set') { + $name = Str::snake(substr($method, 3)); + + if(in_array($name, array_keys($this->attributes))) { + return $this->__set($name, array_pop($arguments)); + } + + } + + throw new MethodNotFoundException("Method ".self::class.'::'.$method.'() is not supported'); + } + + /** + * Magic setter + * @param $name + * @param $value + * + * @return mixed + */ + public function __set($name, $value) { + $this->attributes[$name] = $value; + + return $this->attributes[$name]; + } + + /** + * Magic getter + * @param $name + * + * @return Attribute|mixed|null + */ + public function __get($name) { + return $this->get($name); + } + + /** + * Get an available message or message header attribute + * @param $name + * + * @return Attribute|mixed|null + */ + public function get($name) { + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + return $this->header->get($name); + } + + /** + * Check if the Message has a text body + * + * @return bool + */ + public function hasTextBody() { + return isset($this->bodies['text']); + } + + /** + * Get the Message text body + * + * @return mixed + */ + public function getTextBody() { + if (!isset($this->bodies['text'])) { + return null; + } + + return $this->bodies['text']; + } + + /** + * Check if the Message has a html body + * + * @return bool + */ + public function hasHTMLBody() { + return isset($this->bodies['html']); + } + + /** + * Get the Message html body + * + * @return string|null + */ + public function getHTMLBody() { + if (!isset($this->bodies['html'])) { + return null; + } + + return $this->bodies['html']; + } + + /** + * Parse all defined headers + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + * @throws InvalidMessageDateException + * @throws MessageHeaderFetchingException + */ + private function parseHeader() { + $sequence_id = $this->getSequenceId(); + $headers = $this->client->getConnection()->headers([$sequence_id], "RFC822", $this->sequence === IMAP::ST_UID); + if (!isset($headers[$sequence_id])) { + throw new MessageHeaderFetchingException("no headers found", 0); + } + + $this->parseRawHeader($headers[$sequence_id]); + } + + /** + * @param string $raw_header + * + * @throws InvalidMessageDateException + */ + public function parseRawHeader($raw_header){ + $this->header = new Header($raw_header); + } + + /** + * Parse additional raw flags + * @param array $raw_flags + */ + public function parseRawFlags($raw_flags) { + $this->flags = FlagCollection::make([]); + + foreach($raw_flags as $flag) { + if (strpos($flag, "\\") === 0){ + $flag = substr($flag, 1); + } + $flag_key = strtolower($flag); + if ($this->available_flags === null || in_array($flag_key, $this->available_flags)) { + $this->flags->put($flag_key, $flag); + } + } + } + + /** + * Parse additional flags + * + * @return void + * @throws Exceptions\ConnectionFailedException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + private function parseFlags() { + $this->client->openFolder($this->folder_path); + $this->flags = FlagCollection::make([]); + + $sequence_id = $this->getSequenceId(); + try { + $flags = $this->client->getConnection()->flags([$sequence_id], $this->sequence === IMAP::ST_UID); + } catch (Exceptions\RuntimeException $e) { + throw new MessageFlagException("flag could not be fetched", 0, $e); + } + + if (isset($flags[$sequence_id])) { + $this->parseRawFlags($flags[$sequence_id]); + } + } + + /** + * Parse the Message body + * + * @return $this + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\MessageContentFetchingException + * @throws InvalidMessageDateException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function parseBody() { + $this->client->openFolder($this->folder_path); + + $sequence_id = $this->getSequenceId(); + try { + $contents = $this->client->getConnection()->content([$sequence_id], "RFC822", $this->sequence === IMAP::ST_UID); + } catch (Exceptions\RuntimeException $e) { + throw new MessageContentFetchingException("failed to fetch content", 0); + } + if (!isset($contents[$sequence_id])) { + throw new MessageContentFetchingException("no content found", 0); + } + $content = $contents[$sequence_id]; + + $body = $this->parseRawBody($content); + $this->peek(); + + return $body; + } + + /** + * Handle auto "Seen" flag handling + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function peek(){ + if ($this->fetch_options == IMAP::FT_PEEK) { + if ($this->getFlags()->get("seen") == null) { + $this->unsetFlag("Seen"); + } + }elseif ($this->getFlags()->get("seen") != null) { + $this->setFlag("Seen"); + } + } + + /** + * Parse a given message body + * @param string $raw_body + * + * @return $this + * @throws Exceptions\ConnectionFailedException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws Exceptions\RuntimeException + */ + public function parseRawBody($raw_body) { + $this->structure = new Structure($raw_body, $this->header); + $this->fetchStructure($this->structure); + + return $this; + } + + /** + * Fetch the Message structure + * @param Structure $structure + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + private function fetchStructure($structure) { + $this->client->openFolder($this->folder_path); + + foreach ($structure->parts as $part) { + $this->fetchPart($part); + } + } + + /** + * Fetch a given part + * @param Part $part + */ + private function fetchPart(Part $part) { + if ($part->isAttachment()) { + $this->fetchAttachment($part); + }else{ + $encoding = $this->getEncoding($part); + + $content = $this->decodeString($part->content, $part->encoding); + + // We don't need to do convertEncoding() if charset is ASCII (us-ascii): + // ASCII is a subset of UTF-8, so all ASCII files are already UTF-8 encoded + // https://stackoverflow.com/a/11303410 + // + // us-ascii is the same as ASCII: + // ASCII is the traditional name for the encoding system; the Internet Assigned Numbers Authority (IANA) + // prefers the updated name US-ASCII, which clarifies that this system was developed in the US and + // based on the typographical symbols predominantly in use there. + // https://en.wikipedia.org/wiki/ASCII + // + // convertEncoding() function basically means convertToUtf8(), so when we convert ASCII string into UTF-8 it gets broken. + if ($encoding != 'us-ascii') { + $content = $this->convertEncoding($content, $encoding); + } + + $subtype = strtolower($part->subtype); + $subtype = $subtype == "plain" || $subtype == "" ? "text" : $subtype; + + if (isset($this->bodies[$subtype])) { + $this->bodies[$subtype] .= "\n".$content; + }else{ + $this->bodies[$subtype] = $content; + } + } + } + + /** + * Fetch the Message attachment + * @param Part $part + */ + protected function fetchAttachment($part) { + $oAttachment = new Attachment($this, $part); + + if ($oAttachment->getName() !== null && $oAttachment->getSize() > 0) { + if ($oAttachment->getId() !== null) { + $this->attachments->put($oAttachment->getId(), $oAttachment); + } else { + $this->attachments->push($oAttachment); + } + } + } + + /** + * Fail proof setter for $fetch_option + * @param $option + * + * @return $this + */ + public function setFetchOption($option) { + if (is_long($option) === true) { + $this->fetch_options = $option; + } elseif (is_null($option) === true) { + $config = ClientManager::get('options.fetch', IMAP::FT_UID); + $this->fetch_options = is_long($config) ? $config : 1; + } + + return $this; + } + + /** + * Set the sequence type + * @param int $sequence + * + * @return $this + */ + public function setSequence($sequence) { + if (is_long($sequence)) { + $this->sequence = $sequence; + } elseif (is_null($sequence)) { + $config = ClientManager::get('options.sequence', IMAP::ST_MSGN); + $this->sequence = is_long($config) ? $config : IMAP::ST_MSGN; + } + + return $this; + } + + /** + * Fail proof setter for $fetch_body + * @param $option + * + * @return $this + */ + public function setFetchBodyOption($option) { + if (is_bool($option)) { + $this->fetch_body = $option; + } elseif (is_null($option)) { + $config = ClientManager::get('options.fetch_body', true); + $this->fetch_body = is_bool($config) ? $config : true; + } + + return $this; + } + + /** + * Fail proof setter for $fetch_flags + * @param $option + * + * @return $this + */ + public function setFetchFlagsOption($option) { + if (is_bool($option)) { + $this->fetch_flags = $option; + } elseif (is_null($option)) { + $config = ClientManager::get('options.fetch_flags', true); + $this->fetch_flags = is_bool($config) ? $config : true; + } + + return $this; + } + + /** + * Decode a given string + * @param $string + * @param $encoding + * + * @return string + */ + public function decodeString($string, $encoding) { + switch ($encoding) { + case IMAP::MESSAGE_ENC_BINARY: + if (extension_loaded('imap')) { + return base64_decode(\imap_binary($string)); + } + return base64_decode($string); + case IMAP::MESSAGE_ENC_BASE64: + return base64_decode($string); + case IMAP::MESSAGE_ENC_QUOTED_PRINTABLE: + return quoted_printable_decode($string); + case IMAP::MESSAGE_ENC_8BIT: + case IMAP::MESSAGE_ENC_7BIT: + case IMAP::MESSAGE_ENC_OTHER: + default: + return $string; + } + } + + /** + * Convert the encoding + * @param $str + * @param string $from + * @param string $to + * + * @return mixed|string + */ + public function convertEncoding($str, $from = "ISO-8859-2", $to = "UTF-8") { + + $from = EncodingAliases::get($from); + $to = EncodingAliases::get($to); + + if ($from === $to) { + return $str; + } + + // We don't need to do convertEncoding() if charset is ASCII (us-ascii): + // ASCII is a subset of UTF-8, so all ASCII files are already UTF-8 encoded + // https://stackoverflow.com/a/11303410 + // + // us-ascii is the same as ASCII: + // ASCII is the traditional name for the encoding system; the Internet Assigned Numbers Authority (IANA) + // prefers the updated name US-ASCII, which clarifies that this system was developed in the US and + // based on the typographical symbols predominantly in use there. + // https://en.wikipedia.org/wiki/ASCII + // + // convertEncoding() function basically means convertToUtf8(), so when we convert ASCII string into UTF-8 it gets broken. + if (strtolower($from) == 'us-ascii' && $to == 'UTF-8') { + return $str; + } + + if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') { + return @iconv($from, $to.'//IGNORE', $str); + } else { + if (!$from) { + return mb_convert_encoding($str, $to); + } + return mb_convert_encoding($str, $to, $from); + } + } + + /** + * Get the encoding of a given abject + * @param object|string $structure + * + * @return string + */ + public function getEncoding($structure) { + if (property_exists($structure, 'parameters')) { + foreach ($structure->parameters as $parameter) { + if (strtolower($parameter->attribute) == "charset") { + return EncodingAliases::get($parameter->value); + } + } + }elseif (property_exists($structure, 'charset')){ + return EncodingAliases::get($structure->charset); + }elseif (is_string($structure) === true){ + return mb_detect_encoding($structure); + } + + return 'UTF-8'; + } + + /** + * Get the messages folder + * + * @return mixed + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\RuntimeException + */ + public function getFolder(){ + return $this->client->getFolderByPath($this->folder_path); + } + + /** + * Create a message thread based on the current message + * @param Folder|null $sent_folder + * @param MessageCollection|null $thread + * @param Folder|null $folder + * + * @return MessageCollection|null + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\GetMessagesFailedException + * @throws Exceptions\RuntimeException + */ + public function thread($sent_folder = null, &$thread = null, $folder = null){ + $thread = $thread ? $thread : MessageCollection::make([]); + $folder = $folder ? $folder : $this->getFolder(); + $sent_folder = $sent_folder ? $sent_folder : $this->client->getFolderByPath(ClientManager::get("options.common_folders.sent", "INBOX/Sent")); + + /** @var Message $message */ + foreach($thread as $message) { + if ($message->message_id->first() == $this->message_id->first()) { + return $thread; + } + } + $thread->push($this); + + $this->fetchThreadByInReplyTo($thread, $this->message_id, $folder, $folder, $sent_folder); + $this->fetchThreadByInReplyTo($thread, $this->message_id, $sent_folder, $folder, $sent_folder); + + if (is_array($this->in_reply_to)) { + foreach($this->in_reply_to as $in_reply_to) { + $this->fetchThreadByMessageId($thread, $in_reply_to, $folder, $folder, $sent_folder); + $this->fetchThreadByMessageId($thread, $in_reply_to, $sent_folder, $folder, $sent_folder); + } + } + + return $thread; + } + + /** + * Fetch a partial thread by message id + * @param MessageCollection $thread + * @param string $in_reply_to + * @param Folder $primary_folder + * @param Folder $secondary_folder + * @param Folder $sent_folder + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\GetMessagesFailedException + * @throws Exceptions\RuntimeException + */ + protected function fetchThreadByInReplyTo(&$thread, $in_reply_to, $primary_folder, $secondary_folder, $sent_folder){ + $primary_folder->query()->inReplyTo($in_reply_to) + ->setFetchBody($this->getFetchBodyOption()) + ->leaveUnread()->get()->each(function($message) use(&$thread, $secondary_folder, $sent_folder){ + /** @var Message $message */ + $message->thread($sent_folder, $thread, $secondary_folder); + }); + } + + /** + * Fetch a partial thread by message id + * @param MessageCollection $thread + * @param string $message_id + * @param Folder $primary_folder + * @param Folder $secondary_folder + * @param Folder $sent_folder + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\GetMessagesFailedException + * @throws Exceptions\RuntimeException + */ + protected function fetchThreadByMessageId(&$thread, $message_id, $primary_folder, $secondary_folder, $sent_folder){ + $primary_folder->query()->messageId($message_id) + ->setFetchBody($this->getFetchBodyOption()) + ->leaveUnread()->get()->each(function($message) use(&$thread, $secondary_folder, $sent_folder){ + /** @var Message $message */ + $message->thread($sent_folder, $thread, $secondary_folder); + }); + } + + /** + * Copy the current Messages to a mailbox + * @param string $folder_path + * @param boolean $expunge + * + * @return null|Message + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\RuntimeException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageHeaderFetchingException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\MessageNotFoundException + */ + public function copy($folder_path, $expunge = false) { + $this->client->openFolder($folder_path); + $status = $this->client->getConnection()->examineFolder($folder_path); + + if (isset($status["uidnext"])) { + $next_uid = $status["uidnext"]; + + /** @var Folder $folder */ + $folder = $this->client->getFolderByPath($folder_path); + + $this->client->openFolder($this->folder_path); + if ($this->client->getConnection()->copyMessage($folder->path, $this->getSequenceId(), null, $this->sequence === IMAP::ST_UID) == true) { + return $this->fetchNewMail($folder, $next_uid, "copied", $expunge); + } + } + + return null; + } + + /** + * Move the current Messages to a mailbox + * @param string $folder_path + * @param boolean $expunge + * + * @return Message|null + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\FolderFetchingException + * @throws Exceptions\RuntimeException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageHeaderFetchingException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\MessageNotFoundException + */ + public function move($folder_path, $expunge = false) { + $this->client->openFolder($folder_path); + $status = $this->client->getConnection()->examineFolder($folder_path); + + if (isset($status["uidnext"])) { + $next_uid = $status["uidnext"]; + + /** @var Folder $folder */ + $folder = $this->client->getFolderByPath($folder_path); + + $this->client->openFolder($this->folder_path); + if ($this->client->getConnection()->moveMessage($folder->path, $this->getSequenceId(), null, $this->sequence === IMAP::ST_UID) == true) { + return $this->fetchNewMail($folder, $next_uid, "moved", $expunge); + } + } + + return null; + } + + /** + * Fetch a new message and fire a given event + * @param Folder $folder + * @param int $next_uid + * @param string $event + * @param boolean $expunge + * + * @return mixed + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\MessageNotFoundException + * @throws Exceptions\RuntimeException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageFlagException + * @throws MessageHeaderFetchingException + */ + protected function fetchNewMail($folder, $next_uid, $event, $expunge){ + if($expunge) $this->client->expunge(); + + $this->client->openFolder($folder->path); + + if ($this->sequence === IMAP::ST_UID) { + $sequence_id = $next_uid; + }else{ + $sequence_id = $this->client->getConnection()->getMessageNumber($next_uid); + } + + $message = $folder->query()->getMessage($sequence_id, null, $this->sequence); + $event = $this->getEvent("message", $event); + $event::dispatch($this, $message); + + return $message; + } + + /** + * Delete the current Message + * @param bool $expunge + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function delete($expunge = true) { + $status = $this->setFlag("Deleted"); + if($expunge) $this->client->expunge(); + + $event = $this->getEvent("message", "deleted"); + $event::dispatch($this); + + return $status; + } + + /** + * Restore a deleted Message + * @param boolean $expunge + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function restore($expunge = true) { + $status = $this->unsetFlag("Deleted"); + if($expunge) $this->client->expunge(); + + $event = $this->getEvent("message", "restored"); + $event::dispatch($this); + + return $status; + } + + /** + * Set a given flag + * @param string|array $flag + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws MessageFlagException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\RuntimeException + */ + public function setFlag($flag) { + $this->client->openFolder($this->folder_path); + $flag = "\\".trim(is_array($flag) ? implode(" \\", $flag) : $flag); + $sequence_id = $this->getSequenceId(); + try { + $status = $this->client->getConnection()->store([$flag], $sequence_id, $sequence_id, "+", true, $this->sequence === IMAP::ST_UID); + } catch (Exceptions\RuntimeException $e) { + throw new MessageFlagException("flag could not be set", 0, $e); + } + $this->parseFlags(); + + $event = $this->getEvent("flag", "new"); + $event::dispatch($this, $flag); + + return $status; + } + + /** + * Unset a given flag + * @param string|array $flag + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function unsetFlag($flag) { + $this->client->openFolder($this->folder_path); + + $flag = "\\".trim(is_array($flag) ? implode(" \\", $flag) : $flag); + $sequence_id = $this->getSequenceId(); + try { + $status = $this->client->getConnection()->store([$flag], $sequence_id, $sequence_id, "-", true, $this->sequence === IMAP::ST_UID); + } catch (Exceptions\RuntimeException $e) { + throw new MessageFlagException("flag could not be removed", 0, $e); + } + $this->parseFlags(); + + $event = $this->getEvent("flag", "deleted"); + $event::dispatch($this, $flag); + + return $status; + } + + /** + * Set a given flag + * @param string|array $flag + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws MessageFlagException + * @throws Exceptions\EventNotFoundException + * @throws Exceptions\RuntimeException + */ + public function addFlag($flag) { + return $this->setFlag($flag); + } + + /** + * Unset a given flag + * @param string|array $flag + * + * @return bool + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\EventNotFoundException + * @throws MessageFlagException + * @throws Exceptions\RuntimeException + */ + public function removeFlag($flag) { + return $this->unsetFlag($flag); + } + + /** + * Get all message attachments. + * + * @return AttachmentCollection + */ + public function getAttachments() { + return $this->attachments; + } + + /** + * Get all message attachments. + * + * @return AttachmentCollection + */ + public function attachments(){ + return $this->getAttachments(); + } + + /** + * Checks if there are any attachments present + * + * @return boolean + */ + public function hasAttachments() { + return $this->attachments->isEmpty() === false; + } + + /** + * Get the raw body + * + * @return string + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\RuntimeException + */ + public function getRawBody() { + if ($this->raw_body === null) { + $this->client->openFolder($this->folder_path); + + $this->raw_body = $this->structure->raw; + } + + return $this->raw_body; + } + + /** + * Get the message header + * + * @return Header + */ + public function getHeader() { + return $this->header; + } + + /** + * Get the current client + * + * @return Client + */ + public function getClient() { + return $this->client; + } + + /** + * Get the used fetch option + * + * @return integer + */ + public function getFetchOptions() { + return $this->fetch_options; + } + + /** + * Get the used fetch body option + * + * @return boolean + */ + public function getFetchBodyOption() { + return $this->fetch_body; + } + + /** + * Get the used fetch flags option + * + * @return boolean + */ + public function getFetchFlagsOption() { + return $this->fetch_flags; + } + + /** + * Get all available bodies + * + * @return array + */ + public function getBodies() { + return $this->bodies; + } + + /** + * Get all set flags + * + * @return FlagCollection + */ + public function getFlags() { + return $this->flags; + } + + /** + * Get all set flags + * + * @return FlagCollection + */ + public function flags(){ + return $this->getFlags(); + } + + /** + * Get the fetched structure + * + * @return Structure|null + */ + public function getStructure(){ + return $this->structure; + } + + /** + * Check if a message matches an other by comparing basic attributes + * + * @param null|Message $message + * @return boolean + */ + public function is(Message $message = null) { + if (is_null($message)) { + return false; + } + + return $this->uid == $message->uid + && $this->message_id->first() == $message->message_id->first() + && $this->subject->first() == $message->subject->first() + && $this->date->toDate()->eq($message->date); + } + + /** + * Get all message attributes + * + * @return array + */ + public function getAttributes(){ + return array_merge($this->attributes, $this->header->getAttributes()); + } + + /** + * Set the message mask + * @param $mask + * + * @return $this + */ + public function setMask($mask){ + if(class_exists($mask)){ + $this->mask = $mask; + } + + return $this; + } + + /** + * Get the used message mask + * + * @return string + */ + public function getMask(){ + return $this->mask; + } + + /** + * Get a masked instance by providing a mask name + * @param string|null $mask + * + * @return mixed + * @throws MaskNotFoundException + */ + public function mask($mask = null){ + $mask = $mask !== null ? $mask : $this->mask; + if(class_exists($mask)){ + return new $mask($this); + } + + throw new MaskNotFoundException("Unknown mask provided: ".$mask); + } + + /** + * Get the message path aka folder path + * + * @return string + */ + public function getFolderPath(){ + return $this->folder_path; + } + + /** + * Set the message path aka folder path + * @param $folder_path + * + * @return $this + */ + public function setFolderPath($folder_path){ + $this->folder_path = $folder_path; + + return $this; + } + + /** + * Set the config + * @param $config + * + * @return $this + */ + public function setConfig($config){ + $this->config = $config; + + return $this; + } + + /** + * Set the available flags + * @param $available_flags + * + * @return $this + */ + public function setAvailableFlags($available_flags){ + $this->available_flags = $available_flags; + + return $this; + } + + /** + * Set the attachment collection + * @param $attachments + * + * @return $this + */ + public function setAttachments($attachments){ + $this->attachments = $attachments; + + return $this; + } + + /** + * Set the flag collection + * @param $flags + * + * @return $this + */ + public function setFlags($flags){ + $this->flags = $flags; + + return $this; + } + + /** + * Set the client + * @param $client + * + * @return $this + * @throws Exceptions\RuntimeException + * @throws Exceptions\ConnectionFailedException + */ + public function setClient($client){ + $this->client = $client; + $this->client->openFolder($this->folder_path); + + return $this; + } + + /** + * Set the message number + * @param int $uid + * + * @return $this + * @throws Exceptions\MessageNotFoundException + * @throws Exceptions\ConnectionFailedException + */ + public function setUid($uid){ + $this->uid = $uid; + $this->msgn = $this->client->getConnection()->getMessageNumber($this->uid); + $this->msglist = null; + + return $this; + } + + /** + * Set the message number + * @param $msgn + * @param int|null $msglist + * + * @return $this + * @throws Exceptions\MessageNotFoundException + * @throws Exceptions\ConnectionFailedException + */ + public function setMsgn($msgn, $msglist = null){ + $this->msgn = $msgn; + $this->msglist = $msglist; + $this->uid = $this->client->getConnection()->getUid($this->msgn); + + return $this; + } + + /** + * Get the current sequence type + * + * @return int + */ + public function getSequence(){ + return $this->sequence; + } + + /** + * Set the sequence type + * + * @return int + */ + public function getSequenceId(){ + return $this->sequence === IMAP::ST_UID ? $this->uid : $this->msgn; + } + + /** + * Set the sequence id + * @param $uid + * @param int|null $msglist + * + * @throws Exceptions\ConnectionFailedException + * @throws Exceptions\MessageNotFoundException + */ + public function setSequenceId($uid, $msglist = null){ + if ($this->getSequence() === IMAP::ST_UID) { + $this->setUid($uid); + $this->setMsglist($msglist); + }else{ + $this->setMsgn($uid, $msglist); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Part.php b/htdocs/includes/webklex/php-imap/src/Part.php new file mode 100644 index 00000000000..a6a6748886f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Part.php @@ -0,0 +1,312 @@ +raw = $raw_part; + $this->header = $header; + $this->part_number = $part_number; + $this->parse(); + } + + /** + * Parse the raw parts + * + * @throws InvalidMessageDateException + */ + protected function parse(){ + if ($this->header === null) { + $body = $this->findHeaders(); + }else{ + $body = $this->raw; + } + + $this->parseDisposition(); + $this->parseDescription(); + $this->parseEncoding(); + + $this->charset = $this->header->get("charset"); + $this->name = $this->header->get("name"); + $this->filename = $this->header->get("filename"); + + if(!empty($this->header->get("id"))) { + $this->id = $this->header->get("id"); + } else if(!empty($this->header->get("x_attachment_id"))){ + $this->id = $this->header->get("x_attachment_id"); + } else if(!empty($this->header->get("content_id"))){ + $this->id = strtr($this->header->get("content_id"), [ + '<' => '', + '>' => '' + ]); + } + + $content_types = $this->header->get("content_type"); + if(!empty($content_types)){ + $this->subtype = $this->parseSubtype($content_types); + $content_type = $content_types; + if (is_array($content_types)) { + $content_type = $content_types[0]; + } + $parts = explode(';', $content_type); + $this->content_type = trim($parts[0]); + } + + + $this->content = trim(rtrim($body)); + $this->bytes = strlen($this->content); + } + + /** + * Find all available headers and return the left over body segment + * + * @return string + * @throws InvalidMessageDateException + */ + private function findHeaders(){ + $body = $this->raw; + while (($pos = strpos($body, "\r\n")) > 0) { + $body = substr($body, $pos + 2); + } + $headers = substr($this->raw, 0, strlen($body) * -1); + $body = substr($body, 0, -2); + + $this->header = new Header($headers); + + return (string) $body; + } + + /** + * Try to parse the subtype if any is present + * @param $content_type + * + * @return string + */ + private function parseSubtype($content_type){ + if (is_array($content_type)) { + foreach ($content_type as $part){ + if ((strpos($part, "/")) !== false){ + return $this->parseSubtype($part); + } + } + return null; + } + if (($pos = strpos($content_type, "/")) !== false){ + return substr($content_type, $pos + 1); + } + return null; + } + + /** + * Try to parse the disposition if any is present + */ + private function parseDisposition(){ + $content_disposition = $this->header->get("content_disposition"); + if($content_disposition !== null) { + $this->ifdisposition = true; + $this->disposition = (is_array($content_disposition)) ? implode(' ', $content_disposition) : $content_disposition; + } + } + + /** + * Try to parse the description if any is present + */ + private function parseDescription(){ + $content_description = $this->header->get("content_description"); + if($content_description !== null) { + $this->ifdescription = true; + $this->description = $content_description; + } + } + + /** + * Try to parse the encoding if any is present + */ + private function parseEncoding(){ + $encoding = $this->header->get("content_transfer_encoding"); + if($encoding !== null) { + switch (strtolower($encoding)) { + case "quoted-printable": + $this->encoding = IMAP::MESSAGE_ENC_QUOTED_PRINTABLE; + break; + case "base64": + $this->encoding = IMAP::MESSAGE_ENC_BASE64; + break; + case "7bit": + $this->encoding = IMAP::MESSAGE_ENC_7BIT; + break; + case "8bit": + $this->encoding = IMAP::MESSAGE_ENC_8BIT; + break; + case "binary": + $this->encoding = IMAP::MESSAGE_ENC_BINARY; + break; + default: + $this->encoding = IMAP::MESSAGE_ENC_OTHER; + break; + + } + } + } + + /** + * Check if the current part represents an attachment + * + * @return bool + */ + public function isAttachment(){ + $valid_disposition = in_array(strtolower($this->disposition), ClientManager::get('options.dispositions')); + + if ($this->type == IMAP::MESSAGE_TYPE_TEXT && ($this->ifdisposition == 0 || (empty($this->disposition))) && !$valid_disposition) { + if (($this->subtype == null || in_array((strtolower($this->subtype)), ["plain", "html"])) && $this->filename == null && $this->name == null) { + return false; + } + } + return true; + } + +} diff --git a/htdocs/includes/webklex/php-imap/src/Query/Query.php b/htdocs/includes/webklex/php-imap/src/Query/Query.php new file mode 100644 index 00000000000..b1806755f4d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Query/Query.php @@ -0,0 +1,842 @@ +setClient($client); + + $this->sequence = ClientManager::get('options.sequence', IMAP::ST_MSGN); + if (ClientManager::get('options.fetch') === IMAP::FT_PEEK) $this->leaveUnread(); + + if (ClientManager::get('options.fetch_order') === 'desc') { + $this->fetch_order = 'desc'; + } else { + $this->fetch_order = 'asc'; + } + + $this->date_format = ClientManager::get('date_format', 'd M y'); + $this->soft_fail = ClientManager::get('options.soft_fail', false); + + $this->charset = $charset; + $this->query = new Collection(); + $this->boot(); + } + + /** + * Instance boot method for additional functionality + */ + protected function boot() { + } + + /** + * Parse a given value + * @param mixed $value + * + * @return string + */ + protected function parse_value($value) { + switch (true) { + case $value instanceof Carbon: + $value = $value->format($this->date_format); + break; + } + + return (string)$value; + } + + /** + * Check if a given date is a valid carbon object and if not try to convert it + * @param string|Carbon $date + * + * @return Carbon + * @throws MessageSearchValidationException + */ + protected function parse_date($date) { + if ($date instanceof Carbon) return $date; + + try { + $date = Carbon::parse($date); + } catch (Exception $e) { + throw new MessageSearchValidationException(); + } + + return $date; + } + + /** + * Get the raw IMAP search query + * + * @return string + */ + public function generate_query() { + $query = ''; + $this->query->each(function($statement) use (&$query) { + if (count($statement) == 1) { + $query .= $statement[0]; + } else { + if ($statement[1] === null) { + $query .= $statement[0]; + } else { + $query .= $statement[0] . ' "' . $statement[1] . '"'; + } + } + $query .= ' '; + + }); + + $this->raw_query = trim($query); + + return $this->raw_query; + } + + /** + * Perform an imap search request + * + * @return Collection + * @throws GetMessagesFailedException + */ + protected function search() { + $this->generate_query(); + + try { + $available_messages = $this->client->getConnection()->search([$this->getRawQuery()], $this->sequence == IMAP::ST_UID); + return $available_messages !== false ? new Collection($available_messages) : new Collection(); + } catch (RuntimeException $e) { + throw new GetMessagesFailedException("failed to fetch messages", 0, $e); + } catch (ConnectionFailedException $e) { + throw new GetMessagesFailedException("failed to fetch messages", 0, $e); + } + } + + /** + * Count all available messages matching the current search criteria + * + * @return int + * @throws GetMessagesFailedException + */ + public function count() { + return $this->search()->count(); + } + + /** + * Fetch a given id collection + * @param Collection $available_messages + * + * @return array + * @throws ConnectionFailedException + * @throws RuntimeException + */ + protected function fetch($available_messages) { + if ($this->fetch_order === 'desc') { + $available_messages = $available_messages->reverse(); + } + + $uids = $available_messages->forPage($this->page, $this->limit)->toArray(); + $flags = $this->client->getConnection()->flags($uids, $this->sequence == IMAP::ST_UID); + $headers = $this->client->getConnection()->headers($uids, "RFC822", $this->sequence == IMAP::ST_UID); + + $contents = []; + if ($this->getFetchBody()) { + $contents = $this->client->getConnection()->content($uids, "RFC822", $this->sequence == IMAP::ST_UID); + } + + return [ + "uids" => $uids, + "flags" => $flags, + "headers" => $headers, + "contents" => $contents, + ]; + } + + /** + * Make a new message from given raw components + * @param integer $uid + * @param integer $msglist + * @param string $header + * @param string $content + * @param array $flags + * + * @return Message|null + * @throws ConnectionFailedException + * @throws EventNotFoundException + * @throws GetMessagesFailedException + * @throws ReflectionException + */ + protected function make($uid, $msglist, $header, $content, $flags){ + try { + return Message::make($uid, $msglist, $this->getClient(), $header, $content, $flags, $this->getFetchOptions(), $this->sequence); + }catch (MessageNotFoundException $e) { + $this->setError($uid, $e); + }catch (RuntimeException $e) { + $this->setError($uid, $e); + }catch (MessageFlagException $e) { + $this->setError($uid, $e); + }catch (InvalidMessageDateException $e) { + $this->setError($uid, $e); + }catch (MessageContentFetchingException $e) { + $this->setError($uid, $e); + } + + $this->handleException($uid); + + return null; + } + + /** + * Get the message key for a given message + * @param string $message_key + * @param integer $msglist + * @param Message $message + * + * @return string + */ + protected function getMessageKey($message_key, $msglist, $message){ + switch ($message_key) { + case 'number': + $key = $message->getMessageNo(); + break; + case 'list': + $key = $msglist; + break; + case 'uid': + $key = $message->getUid(); + break; + default: + $key = $message->getMessageId(); + break; + } + return (string)$key; + } + + /** + * Populate a given id collection and receive a fully fetched message collection + * @param Collection $available_messages + * + * @return MessageCollection + * @throws ConnectionFailedException + * @throws EventNotFoundException + * @throws GetMessagesFailedException + * @throws ReflectionException + * @throws RuntimeException + */ + protected function populate($available_messages) { + $messages = MessageCollection::make([]); + + $messages->total($available_messages->count()); + + $message_key = ClientManager::get('options.message_key'); + + $raw_messages = $this->fetch($available_messages); + + $msglist = 0; + foreach ($raw_messages["headers"] as $uid => $header) { + $content = isset($raw_messages["contents"][$uid]) ? $raw_messages["contents"][$uid] : ""; + $flag = isset($raw_messages["flags"][$uid]) ? $raw_messages["flags"][$uid] : []; + + $message = $this->make($uid, $msglist, $header, $content, $flag); + if ($message !== null) { + $key = $this->getMessageKey($message_key, $msglist, $message); + $messages->put("$key", $message); + } + $msglist++; + } + + return $messages; + } + + /** + * Fetch the current query and return all found messages + * + * @return MessageCollection + * @throws GetMessagesFailedException + */ + public function get() { + $available_messages = $this->search(); + + try { + if ($available_messages->count() > 0) { + return $this->populate($available_messages); + } + return MessageCollection::make([]); + } catch (Exception $e) { + throw new GetMessagesFailedException($e->getMessage(), 0, $e); + } + } + + /** + * Fetch the current query as chunked requests + * @param callable $callback + * @param int $chunk_size + * @param int $start_chunk + * + * @throws ConnectionFailedException + * @throws EventNotFoundException + * @throws GetMessagesFailedException + * @throws ReflectionException + * @throws RuntimeException + */ + public function chunked($callback, $chunk_size = 10, $start_chunk = 1) { + $available_messages = $this->search(); + if (($available_messages_count = $available_messages->count()) > 0) { + $old_limit = $this->limit; + $old_page = $this->page; + + $this->limit = $chunk_size; + $this->page = $start_chunk; + do { + $messages = $this->populate($available_messages); + $callback($messages, $this->page); + $this->page++; + } while ($this->limit * $this->page <= $available_messages_count); + $this->limit = $old_limit; + $this->page = $old_page; + } + } + + /** + * Paginate the current query + * @param int $per_page Results you which to receive per page + * @param int|null $page The current page you are on (e.g. 0, 1, 2, ...) use `null` to enable auto mode + * @param string $page_name The page name / uri parameter used for the generated links and the auto mode + * + * @return LengthAwarePaginator + * @throws GetMessagesFailedException + */ + public function paginate($per_page = 5, $page = null, $page_name = 'imap_page') { + if ( + $page === null + && isset($_GET[$page_name]) + && $_GET[$page_name] > 0 + ) { + $this->page = intval($_GET[$page_name]); + } elseif ($page > 0) { + $this->page = $page; + } + + $this->limit = $per_page; + + return $this->get()->paginate($per_page, $this->page, $page_name, true); + } + + /** + * Get a new Message instance + * @param int $uid + * @param int|null $msglist + * @param int|null $sequence + * + * @return Message + * @throws ConnectionFailedException + * @throws RuntimeException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageHeaderFetchingException + * @throws EventNotFoundException + * @throws MessageFlagException + * @throws MessageNotFoundException + */ + public function getMessage($uid, $msglist = null, $sequence = null) { + return new Message($uid, $msglist, $this->getClient(), $this->getFetchOptions(), $this->getFetchBody(), $this->getFetchFlags(), $sequence ? $sequence : $this->sequence); + } + + /** + * Get a message by its message number + * @param $msgn + * @param int|null $msglist + * + * @return Message + * @throws ConnectionFailedException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageHeaderFetchingException + * @throws RuntimeException + * @throws EventNotFoundException + * @throws MessageFlagException + * @throws MessageNotFoundException + */ + public function getMessageByMsgn($msgn, $msglist = null) { + return $this->getMessage($msgn, $msglist, IMAP::ST_MSGN); + } + + /** + * Get a message by its uid + * @param $uid + * + * @return Message + * @throws ConnectionFailedException + * @throws InvalidMessageDateException + * @throws MessageContentFetchingException + * @throws MessageHeaderFetchingException + * @throws RuntimeException + * @throws EventNotFoundException + * @throws MessageFlagException + * @throws MessageNotFoundException + */ + public function getMessageByUid($uid) { + return $this->getMessage($uid, null, IMAP::ST_UID); + } + + /** + * Don't mark messages as read when fetching + * + * @return $this + */ + public function leaveUnread() { + $this->setFetchOptions(IMAP::FT_PEEK); + + return $this; + } + + /** + * Mark all messages as read when fetching + * + * @return $this + */ + public function markAsRead() { + $this->setFetchOptions(IMAP::FT_UID); + + return $this; + } + + /** + * Set the sequence type + * @param int $sequence + * + * @return $this + */ + public function setSequence($sequence) { + $this->sequence = $sequence != IMAP::ST_MSGN ? IMAP::ST_UID : $sequence; + + return $this; + } + + /** + * @return Client + * @throws ConnectionFailedException + */ + public function getClient() { + $this->client->checkConnection(); + return $this->client; + } + + /** + * Set the limit and page for the current query + * @param int $limit + * @param int $page + * + * @return $this + */ + public function limit($limit, $page = 1) { + if ($page >= 1) $this->page = $page; + $this->limit = $limit; + + return $this; + } + + /** + * @return Collection + */ + public function getQuery() { + return $this->query; + } + + /** + * @param array $query + * @return Query + */ + public function setQuery($query) { + $this->query = new Collection($query); + return $this; + } + + /** + * @return string + */ + public function getRawQuery() { + return $this->raw_query; + } + + /** + * @param string $raw_query + * @return Query + */ + public function setRawQuery($raw_query) { + $this->raw_query = $raw_query; + return $this; + } + + /** + * @return string + */ + public function getCharset() { + return $this->charset; + } + + /** + * @param string $charset + * @return Query + */ + public function setCharset($charset) { + $this->charset = $charset; + return $this; + } + + /** + * @param Client $client + * @return Query + */ + public function setClient(Client $client) { + $this->client = $client; + return $this; + } + + /** + * @return int + */ + public function getLimit() { + return $this->limit; + } + + /** + * @param int $limit + * @return Query + */ + public function setLimit($limit) { + $this->limit = $limit <= 0 ? null : $limit; + return $this; + } + + /** + * @return int + */ + public function getPage() { + return $this->page; + } + + /** + * @param int $page + * @return Query + */ + public function setPage($page) { + $this->page = $page; + return $this; + } + + /** + * @param boolean $fetch_options + * @return Query + */ + public function setFetchOptions($fetch_options) { + $this->fetch_options = $fetch_options; + return $this; + } + + /** + * @param boolean $fetch_options + * @return Query + */ + public function fetchOptions($fetch_options) { + return $this->setFetchOptions($fetch_options); + } + + /** + * @return int + */ + public function getFetchOptions() { + return $this->fetch_options; + } + + /** + * @return boolean + */ + public function getFetchBody() { + return $this->fetch_body; + } + + /** + * @param boolean $fetch_body + * @return Query + */ + public function setFetchBody($fetch_body) { + $this->fetch_body = $fetch_body; + return $this; + } + + /** + * @param boolean $fetch_body + * @return Query + */ + public function fetchBody($fetch_body) { + return $this->setFetchBody($fetch_body); + } + + /** + * @return int + */ + public function getFetchFlags() { + return $this->fetch_flags; + } + + /** + * @param int $fetch_flags + * @return Query + */ + public function setFetchFlags($fetch_flags) { + $this->fetch_flags = $fetch_flags; + return $this; + } + + /** + * @param string $fetch_order + * @return Query + */ + public function setFetchOrder($fetch_order) { + $fetch_order = strtolower($fetch_order); + + if (in_array($fetch_order, ['asc', 'desc'])) { + $this->fetch_order = $fetch_order; + } + + return $this; + } + + /** + * @param string $fetch_order + * @return Query + */ + public function fetchOrder($fetch_order) { + return $this->setFetchOrder($fetch_order); + } + + /** + * @return string + */ + public function getFetchOrder() { + return $this->fetch_order; + } + + /** + * @return Query + */ + public function setFetchOrderAsc() { + return $this->setFetchOrder('asc'); + } + + /** + * @return Query + */ + public function fetchOrderAsc() { + return $this->setFetchOrderAsc(); + } + + /** + * @return Query + */ + public function setFetchOrderDesc() { + return $this->setFetchOrder('desc'); + } + + /** + * @return Query + */ + public function fetchOrderDesc() { + return $this->setFetchOrderDesc(); + } + + /** + * @var boolean $state + * + * @return Query + */ + public function softFail($state = true) { + return $this->setSoftFail($state); + } + + /** + * @var boolean $state + * + * @return Query + */ + public function setSoftFail($state = true) { + $this->soft_fail = $state; + + return $this; + } + + /** + * @return boolean + */ + public function getSoftFail() { + return $this->soft_fail; + } + + /** + * Handle the exception for a given uid + * @param integer $uid + * + * @throws GetMessagesFailedException + */ + protected function handleException($uid) { + if ($this->soft_fail === false && $this->hasError($uid)) { + $error = $this->getError($uid); + throw new GetMessagesFailedException($error->getMessage(), 0, $error); + } + } + + /** + * Add a new error to the error holder + * @param integer $uid + * @param Exception $error + */ + protected function setError($uid, $error) { + $this->errors[$uid] = $error; + } + + /** + * Check if there are any errors / exceptions present + * @var integer|null $uid + * + * @return boolean + */ + public function hasErrors($uid = null){ + if ($uid !== null) { + return $this->hasError($uid); + } + return count($this->errors) > 0; + } + + /** + * Check if there is an error / exception present + * @var integer $uid + * + * @return boolean + */ + public function hasError($uid){ + return isset($this->errors[$uid]); + } + + /** + * Get all available errors / exceptions + * + * @return array + */ + public function errors(){ + return $this->getErrors(); + } + + /** + * Get all available errors / exceptions + * + * @return array + */ + public function getErrors(){ + return $this->errors; + } + + /** + * Get a specific error / exception + * @var integer $uid + * + * @return Exception|null + */ + public function error($uid){ + return $this->getError($uid); + } + + /** + * Get a specific error / exception + * @var integer $uid + * + * @return Exception|null + */ + public function getError($uid){ + if ($this->hasError($uid)) { + return $this->errors[$uid]; + } + return null; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Query/WhereQuery.php b/htdocs/includes/webklex/php-imap/src/Query/WhereQuery.php new file mode 100755 index 00000000000..4d23be866e7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Query/WhereQuery.php @@ -0,0 +1,551 @@ +whereNot(); + $name = substr($name, 3); + } + + if (strpos(strtolower($name), "where") === false) { + $method = 'where' . ucfirst($name); + } else { + $method = lcfirst($name); + } + + if (method_exists($this, $method) === true) { + return call_user_func_array([$that, $method], $arguments); + } + + throw new MethodNotFoundException("Method " . self::class . '::' . $method . '() is not supported'); + } + + /** + * Validate a given criteria + * @param $criteria + * + * @return string + * @throws InvalidWhereQueryCriteriaException + */ + protected function validate_criteria($criteria) { + $criteria = strtoupper($criteria); + if (substr($criteria, 0, 7) === "CUSTOM ") { + return substr($criteria, 7); + } + if (in_array($criteria, $this->available_criteria) === false) { + throw new InvalidWhereQueryCriteriaException(); + } + + return $criteria; + } + + + /** + * Register search parameters + * @param mixed $criteria + * @param null $value + * + * @return $this + * @throws InvalidWhereQueryCriteriaException + * + * Examples: + * $query->from("someone@email.tld")->seen(); + * $query->whereFrom("someone@email.tld")->whereSeen(); + * $query->where([["FROM" => "someone@email.tld"], ["SEEN"]]); + * $query->where(["FROM" => "someone@email.tld"])->where(["SEEN"]); + * $query->where(["FROM" => "someone@email.tld", "SEEN"]); + * $query->where("FROM", "someone@email.tld")->where("SEEN"); + */ + public function where($criteria, $value = null): WhereQuery { + if (is_array($criteria)) { + foreach ($criteria as $key => $value) { + if (is_numeric($key)) { + $this->where($value); + }else{ + $this->where($key, $value); + } + } + } else { + $this->push_search_criteria($criteria, $value); + } + + return $this; + } + + /** + * Push a given search criteria and value pair to the search query + * @param $criteria string + * @param $value mixed + * + * @throws InvalidWhereQueryCriteriaException + */ + protected function push_search_criteria(string $criteria, $value){ + $criteria = $this->validate_criteria($criteria); + $value = $this->parse_value($value); + + if ($value === null || $value === '') { + $this->query->push([$criteria]); + } else { + $this->query->push([$criteria, $value]); + } + } + + /** + * @param Closure $closure + * + * @return $this + */ + public function orWhere(Closure $closure = null) { + $this->query->push(['OR']); + if ($closure !== null) $closure($this); + + return $this; + } + + /** + * @param Closure $closure + * + * @return $this + */ + public function andWhere(Closure $closure = null) { + $this->query->push(['AND']); + if ($closure !== null) $closure($this); + + return $this; + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereAll() { + return $this->where('ALL'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereAnswered() { + return $this->where('ANSWERED'); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereBcc($value) { + return $this->where('BCC', $value); + } + + /** + * @param mixed $value + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + * @throws MessageSearchValidationException + */ + public function whereBefore($value) { + $date = $this->parse_date($value); + return $this->where('BEFORE', $date); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereBody($value) { + return $this->where('BODY', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereCc($value) { + return $this->where('CC', $value); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereDeleted() { + return $this->where('DELETED'); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereFlagged($value) { + return $this->where('FLAGGED', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereFrom($value) { + return $this->where('FROM', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereKeyword($value) { + return $this->where('KEYWORD', $value); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereNew() { + return $this->where('NEW'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereNot() { + return $this->where('NOT'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereOld() { + return $this->where('OLD'); + } + + /** + * @param mixed $value + * + * @return WhereQuery + * @throws MessageSearchValidationException + * @throws InvalidWhereQueryCriteriaException + */ + public function whereOn($value) { + $date = $this->parse_date($value); + return $this->where('ON', $date); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereRecent() { + return $this->where('RECENT'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereSeen() { + return $this->where('SEEN'); + } + + /** + * @param mixed $value + * + * @return WhereQuery + * @throws MessageSearchValidationException + * @throws InvalidWhereQueryCriteriaException + */ + public function whereSince($value) { + $date = $this->parse_date($value); + return $this->where('SINCE', $date); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereSubject($value) { + return $this->where('SUBJECT', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereText($value) { + return $this->where('TEXT', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereTo($value) { + return $this->where('TO', $value); + } + + /** + * @param string $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUnkeyword($value) { + return $this->where('UNKEYWORD', $value); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUnanswered() { + return $this->where('UNANSWERED'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUndeleted() { + return $this->where('UNDELETED'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUnflagged() { + return $this->where('UNFLAGGED'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUnseen() { + return $this->where('UNSEEN'); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereNoXSpam() { + return $this->where("CUSTOM X-Spam-Flag NO"); + } + + /** + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereIsXSpam() { + return $this->where("CUSTOM X-Spam-Flag YES"); + } + + /** + * Search for a specific header value + * @param $header + * @param $value + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereHeader($header, $value) { + return $this->where("CUSTOM HEADER $header $value"); + } + + /** + * Search for a specific message id + * @param $messageId + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereMessageId($messageId) { + return $this->whereHeader("Message-ID", $messageId); + } + + /** + * Search for a specific message id + * @param $messageId + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereInReplyTo($messageId) { + return $this->whereHeader("In-Reply-To", $messageId); + } + + /** + * @param $country_code + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereLanguage($country_code) { + return $this->where("Content-Language $country_code"); + } + + /** + * Get message be it UID. + * + * @param int|string $uid + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUid($uid) + { + return $this->where('UID', $uid); + } + + /** + * Get messages by their UIDs. + * + * @param array $uids + * + * @return WhereQuery + * @throws InvalidWhereQueryCriteriaException + */ + public function whereUidIn($uids) + { + $uids = implode(',', $uids); + return $this->where('UID', $uids); + } + + /** + * Apply the callback if the given "value" is truthy. + * copied from @url https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Traits/Conditionable.php + * + * @param mixed $value + * @param callable $callback + * @param callable|null $default + + * @return $this|mixed + */ + public function when($value, $callback, $default = null) { + if ($value) { + return $callback($this, $value) ?: $this; + } elseif ($default) { + return $default($this, $value) ?: $this; + } + + return $this; + } + + /** + * Apply the callback if the given "value" is falsy. + * copied from @url https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Traits/Conditionable.php + * + * @param mixed $value + * @param callable $callback + * @param callable|null $default + + * @return $this|mixed + */ + public function unless($value, $callback, $default = null) { + if (! $value) { + return $callback($this, $value) ?: $this; + } elseif ($default) { + return $default($this, $value) ?: $this; + } + + return $this; + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Structure.php b/htdocs/includes/webklex/php-imap/src/Structure.php new file mode 100644 index 00000000000..a6e65b934a0 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Structure.php @@ -0,0 +1,174 @@ +raw = $raw_structure; + $this->header = $header; + $this->config = ClientManager::get('options'); + $this->parse(); + } + + /** + * Parse the given raw structure + * + * @throws MessageContentFetchingException + * @throws InvalidMessageDateException + */ + protected function parse(){ + $this->findContentType(); + $this->parts = $this->find_parts(); + } + + /** + * Determine the message content type + */ + public function findContentType(){ + $content_type = $this->header->get("content_type"); + $content_type = (is_array($content_type)) ? implode(' ', $content_type) : $content_type; + if(stripos($content_type, 'multipart') === 0) { + $this->type = IMAP::MESSAGE_TYPE_MULTIPART; + }else{ + $this->type = IMAP::MESSAGE_TYPE_TEXT; + } + } + + /** + * Find all available headers and return the left over body segment + * @var string $context + * @var integer $part_number + * + * @return Part[] + * @throws InvalidMessageDateException + */ + private function parsePart($context, $part_number = 0){ + $body = $context; + while (($pos = strpos($body, "\r\n")) > 0) { + $body = substr($body, $pos + 2); + } + $headers = substr($context, 0, strlen($body) * -1); + $body = substr($body, 0, -2); + + $headers = new Header($headers); + if (($boundary = $headers->getBoundary()) !== null) { + return $this->detectParts($boundary, $body, $part_number); + } + return [new Part($body, $headers, $part_number)]; + } + + /** + * @param string $boundary + * @param string $context + * @param int $part_number + * + * @return array + * @throws InvalidMessageDateException + */ + private function detectParts($boundary, $context, $part_number = 0){ + $base_parts = explode( $boundary, $context); + $final_parts = []; + foreach($base_parts as $ctx) { + $ctx = substr($ctx, 2); + if ($ctx !== "--" && $ctx != "") { + $parts = $this->parsePart($ctx, $part_number); + foreach ($parts as $part) { + $final_parts[] = $part; + $part_number = $part->part_number; + } + $part_number++; + } + } + return $final_parts; + } + + /** + * Find all available parts + * + * @return array + * @throws MessageContentFetchingException + * @throws InvalidMessageDateException + */ + public function find_parts(){ + if($this->type === IMAP::MESSAGE_TYPE_MULTIPART) { + if (($boundary = $this->header->getBoundary()) === null) { + throw new MessageContentFetchingException("no content found", 0); + } + + return $this->detectParts($boundary, $this->raw); + } + + return [new Part($this->raw, $this->header)]; + } + + /** + * Try to find a boundary if possible + * + * @return string|null + * @Depricated since version 2.4.4 + */ + public function getBoundary(){ + return $this->header->getBoundary(); + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Support/AttachmentCollection.php b/htdocs/includes/webklex/php-imap/src/Support/AttachmentCollection.php new file mode 100644 index 00000000000..8b3f9c32213 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Support/AttachmentCollection.php @@ -0,0 +1,22 @@ +parent->content); + } + + /** + * Get an base64 image src string + * + * @return string|null + */ + public function getImageSrc() { + return 'data:'.$this->parent->content_type.';base64,'.$this->getContentBase64Encoded(); + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Support/Masks/Mask.php b/htdocs/includes/webklex/php-imap/src/Support/Masks/Mask.php new file mode 100755 index 00000000000..7483bd5e5b2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Support/Masks/Mask.php @@ -0,0 +1,137 @@ +parent = $parent; + + if(method_exists($this->parent, 'getAttributes')){ + $this->attributes = array_merge($this->attributes, $this->parent->getAttributes()); + } + + $this->boot(); + } + + /** + * Boot method made to be used by any custom mask + */ + protected function boot(){} + + /** + * Call dynamic attribute setter and getter methods and inherit the parent calls + * @param string $method + * @param array $arguments + * + * @return mixed + * @throws MethodNotFoundException + */ + public function __call($method, $arguments) { + if(strtolower(substr($method, 0, 3)) === 'get') { + $name = Str::snake(substr($method, 3)); + + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + }elseif (strtolower(substr($method, 0, 3)) === 'set') { + $name = Str::snake(substr($method, 3)); + + if(isset($this->attributes[$name])) { + $this->attributes[$name] = array_pop($arguments); + + return $this->attributes[$name]; + } + + } + + if(method_exists($this->parent, $method) === true){ + return call_user_func_array([$this->parent, $method], $arguments); + } + + throw new MethodNotFoundException("Method ".self::class.'::'.$method.'() is not supported'); + } + + /** + * Magic setter + * @param $name + * @param $value + * + * @return mixed + */ + public function __set($name, $value) { + $this->attributes[$name] = $value; + + return $this->attributes[$name]; + } + + /** + * Magic getter + * @param $name + * + * @return mixed|null + */ + public function __get($name) { + if(isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + return null; + } + + /** + * Get the parent instance + * + * @return mixed + */ + public function getParent(){ + return $this->parent; + } + + /** + * Get all available attributes + * + * @return array + */ + public function getAttributes(){ + return $this->attributes; + } + +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Support/Masks/MessageMask.php b/htdocs/includes/webklex/php-imap/src/Support/Masks/MessageMask.php new file mode 100644 index 00000000000..d072e8b6456 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Support/Masks/MessageMask.php @@ -0,0 +1,86 @@ +parent->getBodies(); + if (!isset($bodies['html'])) { + return null; + } + + if(is_object($bodies['html']) && property_exists($bodies['html'], 'content')) { + return $bodies['html']->content; + } + return $bodies['html']; + } + + /** + * Get the Message html body filtered by an optional callback + * @param callable|bool $callback + * + * @return string|null + */ + public function getCustomHTMLBody($callback = false) { + $body = $this->getHtmlBody(); + if($body === null) return null; + + if ($callback !== false) { + $aAttachment = $this->parent->getAttachments(); + $aAttachment->each(function($oAttachment) use(&$body, $callback) { + /** @var Attachment $oAttachment */ + if(is_callable($callback)) { + $body = $callback($body, $oAttachment); + }elseif(is_string($callback)) { + call_user_func($callback, [$body, $oAttachment]); + } + }); + } + + return $body; + } + + /** + * Get the Message html body with embedded base64 images + * the resulting $body. + * + * @return string|null + */ + public function getHTMLBodyWithEmbeddedBase64Images() { + return $this->getCustomHTMLBody(function($body, $oAttachment){ + /** @var Attachment $oAttachment */ + if ($oAttachment->id) { + $body = str_replace('cid:'.$oAttachment->id, 'data:'.$oAttachment->getContentType().';base64, '.base64_encode($oAttachment->getContent()), $body); + } + + return $body; + }); + } +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/Support/MessageCollection.php b/htdocs/includes/webklex/php-imap/src/Support/MessageCollection.php new file mode 100644 index 00000000000..6d1249fae52 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Support/MessageCollection.php @@ -0,0 +1,22 @@ +total ? $this->total : $this->count(); + + $results = !$prepaginated && $total ? $this->forPage($page, $per_page) : $this->all(); + + return $this->paginator($results, $total, $per_page, $page, [ + 'path' => Paginator::resolveCurrentPath(), + 'pageName' => $page_name, + ]); + } + + /** + * Create a new length-aware paginator instance. + * @param array $items + * @param int $total + * @param int $per_page + * @param int|null $current_page + * @param array $options + * + * @return LengthAwarePaginator + */ + protected function paginator($items, $total, $per_page, $current_page, array $options) { + return new LengthAwarePaginator($items, $total, $per_page, $current_page, $options); + } + + /** + * Get and set the total amount + * @param null $total + * + * @return int|null + */ + public function total($total = null) { + if($total === null) { + return $this->total; + } + + return $this->total = $total; + } +} diff --git a/htdocs/includes/webklex/php-imap/src/Traits/HasEvents.php b/htdocs/includes/webklex/php-imap/src/Traits/HasEvents.php new file mode 100644 index 00000000000..bc7ae68eb42 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/Traits/HasEvents.php @@ -0,0 +1,77 @@ +events[$section])) { + $this->events[$section][$event] = $class; + } + } + + /** + * Set all events + * @param $events + */ + public function setEvents($events) { + $this->events = $events; + } + + /** + * Get a specific event callback + * @param $section + * @param $event + * + * @return Event + * @throws EventNotFoundException + */ + public function getEvent($section, $event) { + if (isset($this->events[$section])) { + return $this->events[$section][$event]; + } + throw new EventNotFoundException(); + } + + /** + * Get all events + * + * @return array + */ + public function getEvents(){ + return $this->events; + } + +} \ No newline at end of file diff --git a/htdocs/includes/webklex/php-imap/src/config/imap.php b/htdocs/includes/webklex/php-imap/src/config/imap.php new file mode 100644 index 00000000000..1b605ee0465 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/src/config/imap.php @@ -0,0 +1,216 @@ + 'd-M-Y', + + /* + |-------------------------------------------------------------------------- + | Default account + |-------------------------------------------------------------------------- + | + | The default account identifier. It will be used as default for any missing account parameters. + | If however the default account is missing a parameter the package default will be used. + | Set to 'false' [boolean] to disable this functionality. + | + */ + 'default' => 'default', + + /* + |-------------------------------------------------------------------------- + | Available accounts + |-------------------------------------------------------------------------- + | + | Please list all IMAP accounts which you are planning to use within the + | array below. + | + */ + 'accounts' => [ + + 'default' => [// account identifier + 'host' => 'localhost', + 'port' => 993, + 'protocol' => 'imap', //might also use imap, [pop3 or nntp (untested)] + 'encryption' => 'ssl', // Supported: false, 'ssl', 'tls' + 'validate_cert' => true, + 'username' => 'root@example.com', + 'password' => '', + 'authentication' => null, + 'proxy' => [ + 'socket' => null, + 'request_fulluri' => false, + 'username' => null, + 'password' => null, + ], + "timeout" => 30 + ], + + /* + 'gmail' => [ // account identifier + 'host' => 'imap.gmail.com', + 'port' => 993, + 'encryption' => 'ssl', + 'validate_cert' => true, + 'username' => 'example@gmail.com', + 'password' => 'PASSWORD', + 'authentication' => 'oauth', + ], + + 'another' => [ // account identifier + 'host' => '', + 'port' => 993, + 'encryption' => false, + 'validate_cert' => true, + 'username' => '', + 'password' => '', + 'authentication' => null, + ] + */ + ], + + /* + |-------------------------------------------------------------------------- + | Available IMAP options + |-------------------------------------------------------------------------- + | + | Available php imap config parameters are listed below + | -Delimiter (optional): + | This option is only used when calling $oClient-> + | You can use any supported char such as ".", "/", (...) + | -Fetch option: + | IMAP::FT_UID - Message marked as read by fetching the body message + | IMAP::FT_PEEK - Fetch the message without setting the "seen" flag + | -Fetch sequence id: + | IMAP::ST_UID - Fetch message components using the message uid + | IMAP::ST_MSGN - Fetch message components using the message number + | -Body download option + | Default TRUE + | -Flag download option + | Default TRUE + | -Soft fail + | Default FALSE - Set to TRUE if you want to ignore certain exception while fetching bulk messages + | -RFC822 + | Default TRUE - Set to FALSE to prevent the usage of \imap_rfc822_parse_headers(). + | See https://github.com/Webklex/php-imap/issues/115 for more information. + | -Message key identifier option + | You can choose between the following: + | 'id' - Use the MessageID as array key (default, might cause hickups with yahoo mail) + | 'number' - Use the message number as array key (isn't always unique and can cause some interesting behavior) + | 'list' - Use the message list number as array key (incrementing integer (does not always start at 0 or 1) + | 'uid' - Use the message uid as array key (isn't always unique and can cause some interesting behavior) + | -Fetch order + | 'asc' - Order all messages ascending (probably results in oldest first) + | 'desc' - Order all messages descending (probably results in newest first) + | -Disposition types potentially considered an attachment + | Default ['attachment', 'inline'] + | -Common folders + | Default folder locations and paths assumed if none is provided + | -Open IMAP options: + | DISABLE_AUTHENTICATOR - Disable authentication properties. + | Use 'GSSAPI' if you encounter the following + | error: "Kerberos error: No credentials cache + | file found (try running kinit) (...)" + | or ['GSSAPI','PLAIN'] if you are using outlook mail + | -Decoder options (currently only the message subject and attachment name decoder can be set) + | 'utf-8' - Uses imap_utf8($string) to decode a string + | 'mimeheader' - Uses mb_decode_mimeheader($string) to decode a string + | + */ + 'options' => [ + 'delimiter' => '/', + 'fetch' => \Webklex\PHPIMAP\IMAP::FT_PEEK, + 'sequence' => \Webklex\PHPIMAP\IMAP::ST_MSGN, + 'fetch_body' => true, + 'fetch_flags' => true, + 'soft_fail' => false, + 'rfc822' => true, + 'message_key' => 'list', + 'fetch_order' => 'asc', + 'dispositions' => ['attachment', 'inline'], + 'common_folders' => [ + "root" => "INBOX", + "junk" => "INBOX/Junk", + "draft" => "INBOX/Drafts", + "sent" => "INBOX/Sent", + "trash" => "INBOX/Trash", + ], + 'decoder' => [ + 'message' => 'utf-8', // mimeheader + 'attachment' => 'utf-8' // mimeheader + ], + 'open' => [ + // 'DISABLE_AUTHENTICATOR' => 'GSSAPI' + ] + ], + + /* + |-------------------------------------------------------------------------- + | Available flags + |-------------------------------------------------------------------------- + | + | List all available / supported flags. Set to null to accept all given flags. + */ + 'flags' => ['recent', 'flagged', 'answered', 'deleted', 'seen', 'draft'], + + /* + |-------------------------------------------------------------------------- + | Available events + |-------------------------------------------------------------------------- + | + */ + 'events' => [ + "message" => [ + 'new' => \Webklex\PHPIMAP\Events\MessageNewEvent::class, + 'moved' => \Webklex\PHPIMAP\Events\MessageMovedEvent::class, + 'copied' => \Webklex\PHPIMAP\Events\MessageCopiedEvent::class, + 'deleted' => \Webklex\PHPIMAP\Events\MessageDeletedEvent::class, + 'restored' => \Webklex\PHPIMAP\Events\MessageRestoredEvent::class, + ], + "folder" => [ + 'new' => \Webklex\PHPIMAP\Events\FolderNewEvent::class, + 'moved' => \Webklex\PHPIMAP\Events\FolderMovedEvent::class, + 'deleted' => \Webklex\PHPIMAP\Events\FolderDeletedEvent::class, + ], + "flag" => [ + 'new' => \Webklex\PHPIMAP\Events\FlagNewEvent::class, + 'deleted' => \Webklex\PHPIMAP\Events\FlagDeletedEvent::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Available masking options + |-------------------------------------------------------------------------- + | + | By using your own custom masks you can implement your own methods for + | a better and faster access and less code to write. + | + | Checkout the two examples custom_attachment_mask and custom_message_mask + | for a quick start. + | + | The provided masks below are used as the default masks. + */ + 'masks' => [ + 'message' => \Webklex\PHPIMAP\Support\Masks\MessageMask::class, + 'attachment' => \Webklex\PHPIMAP\Support\Masks\AttachmentMask::class + ] +]; diff --git a/htdocs/includes/webklex/php-imap/vendor/autoload.php b/htdocs/includes/webklex/php-imap/vendor/autoload.php new file mode 100644 index 00000000000..f4e36963c6a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/autoload.php @@ -0,0 +1,74 @@ + __DIR__ . '/illuminate/macroable', + 1 => __DIR__ . '/illuminate/collections', + 2 => __DIR__ . '/illuminate/support', + 3 => __DIR__ . '/illuminate/contracts' + ); + foreach($listofdir as $dir) { + if (file_exists($dir . '/' . $class_name . '.php')) { + require_once $dir . '/' . $class_name . '.php'; + break; + } + } + } + + $preg_match = preg_match('/^Illuminate\\\Contracts\\\/', $class_name); + if (1 === $preg_match) { + $class_name = preg_replace('/\\\/', '/', $class_name); + $class_name = preg_replace('/^Illuminate\\/Contracts\\//', '', $class_name); + $listofdir = array( + 0 => __DIR__ . '/illuminate/contracts' + ); + foreach($listofdir as $dir) { + if (file_exists($dir . '/' . $class_name . '.php')) { + require_once $dir . '/' . $class_name . '.php'; + break; + } + } + } + + $preg_match = preg_match('/^Carbon\\\/', $class_name); + if (1 === $preg_match) { + $class_name = preg_replace('/\\\/', '/', $class_name); + $class_name = preg_replace('/^Carbon\\//', '', $class_name); + $listofdir = array( + 0 => __DIR__ . '/nesbot/carbon/src/Carbon' + ); + foreach($listofdir as $dir) { + if (file_exists($dir . '/' . $class_name . '.php')) { + require_once $dir . '/' . $class_name . '.php'; + break; + } + } + } + +}); diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/ClassLoader.php b/htdocs/includes/webklex/php-imap/vendor/composer/ClassLoader.php new file mode 100644 index 00000000000..afef3fa2ad8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/ClassLoader.php @@ -0,0 +1,572 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var ?string */ + private $vendorDir; + + // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ + private $missingClasses = array(); + + /** @var ?string */ + private $apcuPrefix; + + /** + * @var self[] + */ + private static $registeredLoaders = array(); + + /** + * @param ?string $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + /** + * @return string[] + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array[] + * @psalm-return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return string[] Array of classname => path + * @psalm-return array + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/InstalledVersions.php b/htdocs/includes/webklex/php-imap/vendor/composer/InstalledVersions.php new file mode 100644 index 00000000000..c6b54af7ba2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/InstalledVersions.php @@ -0,0 +1,352 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/LICENSE b/htdocs/includes/webklex/php-imap/vendor/composer/LICENSE new file mode 100644 index 00000000000..f27399a042d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/autoload_classmap.php b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000000..9a7ddd418e5 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_classmap.php @@ -0,0 +1,460 @@ + $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', + 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', + 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', + 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', + 'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', + 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', + 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', + 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', + 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', + 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', + 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', + 'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', + 'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', + 'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php', + 'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php', + 'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', + 'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php', + 'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', + 'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php', + 'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php', + 'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', + 'PHPUnit_Framework_Constraint_ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', + 'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', + 'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', + 'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', + 'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php', + 'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', + 'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', + 'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', + 'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', + 'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', + 'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', + 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', + 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', + 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', + 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', + 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', + 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', + 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', + 'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', + 'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', + 'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php', + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', + 'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php', + 'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', + 'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', + 'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', + 'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', + 'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', + 'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', + 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', + 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', + 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', + 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php', + 'PHPUnit_Framework_ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', + 'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit_Framework_IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', + 'PHPUnit_Framework_InvalidCoversTargetError' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', + 'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', + 'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', + 'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', + 'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', + 'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', + 'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', + 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', + 'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', + 'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', + 'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', + 'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php', + 'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php', + 'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php', + 'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit_Framework_SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php', + 'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', + 'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php', + 'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', + 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', + 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php', + 'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', + 'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', + 'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php', + 'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php', + 'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php', + 'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php', + 'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', + 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', + 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', + 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', + 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', + 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', + 'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit_Util_Regex' => $vendorDir . '/phpunit/phpunit/src/Util/Regex.php', + 'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php', + 'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', + 'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', + 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', + 'PHP_CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', + 'PHP_CodeCoverage_Driver' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', + 'PHP_CodeCoverage_Driver_HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', + 'PHP_CodeCoverage_Driver_PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', + 'PHP_CodeCoverage_Driver_Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', + 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', + 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', + 'PHP_CodeCoverage_Filter' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', + 'PHP_CodeCoverage_Report_Clover' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', + 'PHP_CodeCoverage_Report_Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', + 'PHP_CodeCoverage_Report_Factory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', + 'PHP_CodeCoverage_Report_HTML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', + 'PHP_CodeCoverage_Report_HTML_Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', + 'PHP_CodeCoverage_Report_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', + 'PHP_CodeCoverage_Report_Node_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', + 'PHP_CodeCoverage_Report_Node_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', + 'PHP_CodeCoverage_Report_Node_Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', + 'PHP_CodeCoverage_Report_PHP' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', + 'PHP_CodeCoverage_Report_Text' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', + 'PHP_CodeCoverage_Report_XML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', + 'PHP_CodeCoverage_Report_XML_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', + 'PHP_CodeCoverage_Report_XML_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', + 'PHP_CodeCoverage_Report_XML_File_Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', + 'PHP_CodeCoverage_Report_XML_File_Method' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', + 'PHP_CodeCoverage_Report_XML_File_Report' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', + 'PHP_CodeCoverage_Report_XML_File_Unit' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', + 'PHP_CodeCoverage_Report_XML_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', + 'PHP_CodeCoverage_Report_XML_Project' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', + 'PHP_CodeCoverage_Report_XML_Tests' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', + 'PHP_CodeCoverage_Report_XML_Totals' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', + 'PHP_CodeCoverage_Util' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', + 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', + 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', + 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SUPER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php', + 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', + 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php', + 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', + 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', + 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', + 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', +); diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/autoload_files.php b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_files.php new file mode 100644 index 00000000000..c4795d09367 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_files.php @@ -0,0 +1,15 @@ + $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', + '60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', + '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', +); diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/autoload_namespaces.php b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000000..15a2ff3ad6d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/voku/portable-ascii/src/voku'), + 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), + 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), + 'Webklex\\PHPIMAP\\' => array($baseDir . '/src'), + 'Tests\\' => array($baseDir . '/tests'), + 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), + 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), + 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), + 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), + 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), + 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'), + 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'), + 'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'), + 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), + 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), + 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), +); diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/autoload_real.php b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_real.php new file mode 100644 index 00000000000..794a31affba --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_real.php @@ -0,0 +1,57 @@ +register(true); + + $includeFiles = \Composer\Autoload\ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$files; + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire4da13270269c89a28e472e1f7324e6d1($fileIdentifier, $file); + } + + return $loader; + } +} + +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ +function composerRequire4da13270269c89a28e472e1f7324e6d1($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/autoload_static.php b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_static.php new file mode 100644 index 00000000000..0120578feb6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/autoload_static.php @@ -0,0 +1,623 @@ + __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', + '60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', + '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'v' => + array ( + 'voku\\' => 5, + ), + 'p' => + array ( + 'phpDocumentor\\Reflection\\' => 25, + ), + 'W' => + array ( + 'Webmozart\\Assert\\' => 17, + 'Webklex\\PHPIMAP\\' => 16, + ), + 'T' => + array ( + // 'Tests\\' => 6, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Php80\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Ctype\\' => 23, + 'Symfony\\Contracts\\Translation\\' => 30, + 'Symfony\\Component\\Yaml\\' => 23, + 'Symfony\\Component\\Translation\\' => 30, + 'Symfony\\Component\\HttpFoundation\\' => 33, + ), + 'P' => + array ( + 'Psr\\SimpleCache\\' => 16, + 'Psr\\Container\\' => 14, + 'Prophecy\\' => 9, + ), + 'I' => + array ( + 'Illuminate\\Support\\' => 19, + 'Illuminate\\Pagination\\' => 22, + 'Illuminate\\Contracts\\' => 21, + ), + 'D' => + array ( + 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Inflector\\' => 19, + ), + 'C' => + array ( + 'Carbon\\' => 7, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'voku\\' => + array ( + 0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku', + ), + 'phpDocumentor\\Reflection\\' => + array ( + 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', + 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', + 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', + ), + 'Webmozart\\Assert\\' => + array ( + 0 => __DIR__ . '/..' . '/webmozart/assert/src', + ), + 'Webklex\\PHPIMAP\\' => + array ( + 0 => __DIR__ . '/../..' . '/src', + ), + 'Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + 'Symfony\\Polyfill\\Php80\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Ctype\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', + ), + 'Symfony\\Contracts\\Translation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/translation-contracts', + ), + 'Symfony\\Component\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/yaml', + ), + 'Symfony\\Component\\Translation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/translation', + ), + 'Symfony\\Component\\HttpFoundation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-foundation', + ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), + 'Psr\\Container\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/container/src', + ), + 'Prophecy\\' => + array ( + 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', + ), + 'Illuminate\\Support\\' => + array ( + 0 => __DIR__ . '/..' . '/illuminate/macroable', + 1 => __DIR__ . '/..' . '/illuminate/collections', + 2 => __DIR__ . '/..' . '/illuminate/support', + ), + 'Illuminate\\Pagination\\' => + array ( + 0 => __DIR__ . '/..' . '/illuminate/pagination', + ), + 'Illuminate\\Contracts\\' => + array ( + 0 => __DIR__ . '/..' . '/illuminate/contracts', + ), + 'Doctrine\\Instantiator\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + ), + 'Doctrine\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', + ), + 'Carbon\\' => + array ( + 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', + ), + ); + + public static $classMap = array ( + 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', + 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', + 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', + 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', + 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', + 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', + 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', + 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', + 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', + 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', + 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', + 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', + 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', + 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', + 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', + 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', + 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', + 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', + 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', + 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', + 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', + 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', + 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', + 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', + 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', + 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', + 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', + 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', + 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', + 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', + 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', + 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', + 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', + 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', + 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', + 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', + 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', + 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', + 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', + 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', + 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', + 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', + 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', + 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', + 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', + 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', + 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', + 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', + 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', + 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', + 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', + 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', + 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', + 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', + 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', + 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', + 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', + 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', + 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', + 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', + 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', + 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', + 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', + 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', + 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', + 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', + 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', + 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', + 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', + 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', + 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', + 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', + 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', + 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', + 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', + 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', + 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', + 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', + 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', + 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', + 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', + 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', + 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', + 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', + 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', + 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', + 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', + 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', + 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', + 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', + 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', + 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', + 'PHP_CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', + 'PHP_CodeCoverage_Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', + 'PHP_CodeCoverage_Driver_HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', + 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', + 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', + 'PHP_CodeCoverage_Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', + 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', + 'PHP_CodeCoverage_Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', + 'PHP_CodeCoverage_Report_Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', + 'PHP_CodeCoverage_Report_Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', + 'PHP_CodeCoverage_Report_Factory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', + 'PHP_CodeCoverage_Report_HTML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', + 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', + 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', + 'PHP_CodeCoverage_Report_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', + 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', + 'PHP_CodeCoverage_Report_Node_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', + 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', + 'PHP_CodeCoverage_Report_PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', + 'PHP_CodeCoverage_Report_Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', + 'PHP_CodeCoverage_Report_XML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', + 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', + 'PHP_CodeCoverage_Report_XML_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', + 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', + 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', + 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', + 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', + 'PHP_CodeCoverage_Report_XML_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', + 'PHP_CodeCoverage_Report_XML_Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', + 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', + 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', + 'PHP_CodeCoverage_Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', + 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', + 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', + 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', + 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', + 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', + 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', + 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', + 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', + 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/installed.json b/htdocs/includes/webklex/php-imap/vendor/composer/installed.json new file mode 100644 index 00000000000..ef8e77adb03 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/installed.json @@ -0,0 +1,2565 @@ +{ + "packages": [ + { + "name": "doctrine/inflector", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "vimeo/psalm": "^4.10" + }, + "time": "2021-10-22T20:16:43+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "install-path": "../doctrine/inflector" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "version_normalized": "1.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" + }, + "time": "2022-03-03T08:28:38+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "install-path": "../doctrine/instantiator" + }, + { + "name": "illuminate/collections", + "version": "v8.83.23", + "version_normalized": "8.83.23.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/705a4e1ef93cd492c45b9b3e7911cccc990a07f4", + "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.4)." + }, + "time": "2022-06-23T15:29:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/collections" + }, + { + "name": "illuminate/contracts", + "version": "v8.83.23", + "version_normalized": "8.83.23.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", + "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" + }, + "time": "2022-01-13T14:47:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/contracts" + }, + { + "name": "illuminate/macroable", + "version": "v8.83.23", + "version_normalized": "8.83.23.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "aed81891a6e046fdee72edd497f822190f61c162" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/aed81891a6e046fdee72edd497f822190f61c162", + "reference": "aed81891a6e046fdee72edd497f822190f61c162", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "time": "2021-11-16T13:57:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/macroable" + }, + { + "name": "illuminate/pagination", + "version": "v8.83.23", + "version_normalized": "8.83.23.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pagination.git", + "reference": "16fe8dc35f9d18c58a3471469af656a02e9ab692" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/16fe8dc35f9d18c58a3471469af656a02e9ab692", + "reference": "16fe8dc35f9d18c58a3471469af656a02e9ab692", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" + }, + "time": "2022-06-27T13:26:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Pagination\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pagination package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/pagination" + }, + { + "name": "illuminate/support", + "version": "v8.83.23", + "version_normalized": "8.83.23.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "c3d643e77082786ae8a51502c757e9b1a3ee254e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/c3d643e77082786ae8a51502c757e9b1a3ee254e", + "reference": "c3d643e77082786ae8a51502c757e9b1a3ee254e", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.4|^2.0", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.53.1", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.6.1" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", + "symfony/process": "Required to use the composer class (^5.4).", + "symfony/var-dumper": "Required to use the dd function (^5.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." + }, + "time": "2022-06-27T13:26:30+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/support" + }, + { + "name": "nesbot/carbon", + "version": "2.61.0", + "version_normalized": "2.61.0.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", + "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "squizlabs/php_codesniffer": "^3.4" + }, + "time": "2022-08-06T12:41:24+00:00", + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "install-path": "../nesbot/carbon" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2020-06-27T09:03:43+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "install-path": "../phpdocumentor/reflection-common" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "version_normalized": "5.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "time": "2021-10-19T17:43:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "install-path": "../phpdocumentor/reflection-docblock" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "77a32518733312af16a44300404e945338981de3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "time": "2022-03-15T21:29:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + }, + "install-path": "../phpdocumentor/type-resolver" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "version_normalized": "1.10.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "time": "2020-03-05T15:02:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + }, + "install-path": "../phpspec/prophecy" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "version_normalized": "2.2.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "time": "2015-10-06T15:47:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2" + }, + "install-path": "../phpunit/php-code-coverage" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "version_normalized": "1.4.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2017-11-27T13:52:08+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + }, + "install-path": "../phpunit/php-file-iterator" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2015-06-21T13:50:34+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "install-path": "../phpunit/php-text-template" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "time": "2017-02-26T11:10:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, + "install-path": "../phpunit/php-timer" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "version_normalized": "1.4.12.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "time": "2017-12-04T08:55:13+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4" + }, + "abandoned": true, + "install-path": "../phpunit/php-token-stream" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "version_normalized": "4.8.36.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "time": "2017-06-21T08:07:12+00:00", + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36" + }, + "install-path": "../phpunit/phpunit" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "version_normalized": "2.3.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "time": "2015-10-02T06:51:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", + "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/2.3" + }, + "abandoned": true, + "install-path": "../phpunit/phpunit-mock-objects" + }, + { + "name": "psr/container", + "version": "1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "time": "2021-11-05T16:50:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "install-path": "../psr/container" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "install-path": "../psr/simple-cache" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "version_normalized": "1.2.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2017-01-29T09:50:25+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" + }, + "install-path": "../sebastian/comparator" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "version_normalized": "1.4.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "time": "2017-05-22T07:24:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + }, + "install-path": "../sebastian/diff" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "version_normalized": "1.3.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "time": "2016-08-18T05:49:44+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/1.3" + }, + "install-path": "../sebastian/environment" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "time": "2016-06-17T09:04:28+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, + "install-path": "../sebastian/exporter" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "time": "2015-10-12T03:26:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + }, + "install-path": "../sebastian/global-state" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "version_normalized": "1.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2016-10-03T07:41:43+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, + "install-path": "../sebastian/recursion-context" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "version_normalized": "1.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "time": "2015-06-21T13:59:46+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" + }, + "install-path": "../sebastian/version" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2022-01-02T09:53:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/deprecation-contracts" + }, + { + "name": "symfony/http-foundation", + "version": "v5.4.11", + "version_normalized": "5.4.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "0a5868e0999e9d47859ba3d918548ff6943e6389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0a5868e0999e9d47859ba3d918548ff6943e6389", + "reference": "0a5868e0999e9d47859ba3d918548ff6943e6389", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/mime": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "time": "2022-07-20T13:00:38+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v5.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/http-foundation" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2022-05-24T11:49:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-ctype" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2022-05-24T11:49:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2022-05-10T07:21:04+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php80" + }, + { + "name": "symfony/translation", + "version": "v4.4.44", + "version_normalized": "4.4.44.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "af947fefc306cec6ea5a1f6160c7e305a71f2493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/af947fefc306cec6ea5a1f6160c7e305a71f2493", + "reference": "af947fefc306cec6ea5a1f6160c7e305a71f2493", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^1.1.6|^2" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/http-kernel": "<4.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "symfony/translation-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/finder": "~2.8|~3.0|~4.0|^5.0", + "symfony/http-kernel": "^4.4", + "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^3.4|^4.0|^5.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2022-07-20T09:59:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v4.4.44" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/translation" + }, + { + "name": "symfony/translation-contracts", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "time": "2022-06-27T16:58:25+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/translation-contracts" + }, + { + "name": "symfony/yaml", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "88289caa3c166321883f67fe5130188ebbb47094" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", + "reference": "88289caa3c166321883f67fe5130188ebbb47094", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "time": "2020-10-24T10:57:07+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/yaml" + }, + { + "name": "voku/portable-ascii", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "time": "2022-01-24T18:55:24+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/1.6.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "install-path": "../voku/portable-ascii" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "time": "2022-06-03T18:03:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "install-path": "../webmozart/assert" + } + ], + "dev": true, + "dev-package-names": [ + "doctrine/instantiator", + "phpdocumentor/reflection-common", + "phpdocumentor/reflection-docblock", + "phpdocumentor/type-resolver", + "phpspec/prophecy", + "phpunit/php-code-coverage", + "phpunit/php-file-iterator", + "phpunit/php-text-template", + "phpunit/php-timer", + "phpunit/php-token-stream", + "phpunit/phpunit", + "phpunit/phpunit-mock-objects", + "sebastian/comparator", + "sebastian/diff", + "sebastian/environment", + "sebastian/exporter", + "sebastian/global-state", + "sebastian/recursion-context", + "sebastian/version", + "symfony/polyfill-ctype", + "symfony/yaml", + "webmozart/assert" + ] +} diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/installed.php b/htdocs/includes/webklex/php-imap/vendor/composer/installed.php new file mode 100644 index 00000000000..8af6845c505 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/installed.php @@ -0,0 +1,371 @@ + array( + 'name' => 'webklex/php-imap', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '0f467d1c4283cc035ef474db3c733653feeb570f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + 'doctrine/inflector' => array( + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/inflector', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/instantiator' => array( + 'pretty_version' => '1.4.1', + 'version' => '1.4.1.0', + 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/instantiator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'illuminate/collections' => array( + 'pretty_version' => 'v8.83.23', + 'version' => '8.83.23.0', + 'reference' => '705a4e1ef93cd492c45b9b3e7911cccc990a07f4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/collections', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/contracts' => array( + 'pretty_version' => 'v8.83.23', + 'version' => '8.83.23.0', + 'reference' => '5e0fd287a1b22a6b346a9f7cd484d8cf0234585d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/macroable' => array( + 'pretty_version' => 'v8.83.23', + 'version' => '8.83.23.0', + 'reference' => 'aed81891a6e046fdee72edd497f822190f61c162', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/macroable', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/pagination' => array( + 'pretty_version' => 'v8.83.23', + 'version' => '8.83.23.0', + 'reference' => '16fe8dc35f9d18c58a3471469af656a02e9ab692', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/pagination', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/support' => array( + 'pretty_version' => 'v8.83.23', + 'version' => '8.83.23.0', + 'reference' => 'c3d643e77082786ae8a51502c757e9b1a3ee254e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/support', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'nesbot/carbon' => array( + 'pretty_version' => '2.61.0', + 'version' => '2.61.0.0', + 'reference' => 'bdf4f4fe3a3eac4de84dbec0738082a862c68ba6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../nesbot/carbon', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpdocumentor/reflection-common' => array( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpdocumentor/reflection-docblock' => array( + 'pretty_version' => '5.3.0', + 'version' => '5.3.0.0', + 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpdocumentor/type-resolver' => array( + 'pretty_version' => '1.6.1', + 'version' => '1.6.1.0', + 'reference' => '77a32518733312af16a44300404e945338981de3', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpspec/prophecy' => array( + 'pretty_version' => 'v1.10.3', + 'version' => '1.10.3.0', + 'reference' => '451c3cd1418cf640de218914901e51b064abb093', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpspec/prophecy', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-code-coverage' => array( + 'pretty_version' => '2.2.4', + 'version' => '2.2.4.0', + 'reference' => 'eabf68b476ac7d0f73793aada060f1c1a9bf8979', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-file-iterator' => array( + 'pretty_version' => '1.4.5', + 'version' => '1.4.5.0', + 'reference' => '730b01bc3e867237eaac355e06a36b85dd93a8b4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-text-template' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'reference' => '31f8b717e51d9a2afca6c9f046f5d69fc27c8686', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-text-template', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-timer' => array( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'reference' => '3dcf38ca72b158baf0bc245e9184d3fdffa9c46f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-timer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-token-stream' => array( + 'pretty_version' => '1.4.12', + 'version' => '1.4.12.0', + 'reference' => '1ce90ba27c42e4e44e6d8458241466380b51fa16', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-token-stream', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/phpunit' => array( + 'pretty_version' => '4.8.36', + 'version' => '4.8.36.0', + 'reference' => '46023de9a91eec7dfb06cc56cb4e260017298517', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/phpunit', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/phpunit-mock-objects' => array( + 'pretty_version' => '2.3.8', + 'version' => '2.3.8.0', + 'reference' => 'ac8e7a3db35738d56ee9a76e78a4e03d97628983', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/phpunit-mock-objects', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'psr/container' => array( + 'pretty_version' => '1.1.2', + 'version' => '1.1.2.0', + 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/container', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/simple-cache' => array( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/simple-cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'sebastian/comparator' => array( + 'pretty_version' => '1.2.4', + 'version' => '1.2.4.0', + 'reference' => '2b7424b55f5047b47ac6e5ccb20b2aea4011d9be', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/comparator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/diff' => array( + 'pretty_version' => '1.4.3', + 'version' => '1.4.3.0', + 'reference' => '7f066a26a962dbe58ddea9f72a4e82874a3975a4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/diff', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/environment' => array( + 'pretty_version' => '1.3.8', + 'version' => '1.3.8.0', + 'reference' => 'be2c607e43ce4c89ecd60e75c6a85c126e754aea', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/environment', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/exporter' => array( + 'pretty_version' => '1.2.2', + 'version' => '1.2.2.0', + 'reference' => '42c4c2eec485ee3e159ec9884f95b431287edde4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/exporter', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/global-state' => array( + 'pretty_version' => '1.1.1', + 'version' => '1.1.1.0', + 'reference' => 'bc37d50fea7d017d3d340f230811c9f1d7280af4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/global-state', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/recursion-context' => array( + 'pretty_version' => '1.0.5', + 'version' => '1.0.5.0', + 'reference' => 'b19cc3298482a335a95f3016d2f8a6950f0fbcd7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/recursion-context', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/version' => array( + 'pretty_version' => '1.0.6', + 'version' => '1.0.6.0', + 'reference' => '58b3a85e7999757d6ad81c787a1fbf5ff6c628c6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/version', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'symfony/deprecation-contracts' => array( + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', + 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/http-foundation' => array( + 'pretty_version' => 'v5.4.11', + 'version' => '5.4.11.0', + 'reference' => '0a5868e0999e9d47859ba3d918548ff6943e6389', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/http-foundation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-ctype' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php80' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php80', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation' => array( + 'pretty_version' => 'v4.4.44', + 'version' => '4.4.44.0', + 'reference' => 'af947fefc306cec6ea5a1f6160c7e305a71f2493', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/translation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation-contracts' => array( + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', + 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/translation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0|2.0', + ), + ), + 'symfony/yaml' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => '88289caa3c166321883f67fe5130188ebbb47094', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/yaml', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'voku/portable-ascii' => array( + 'pretty_version' => '1.6.1', + 'version' => '1.6.1.0', + 'reference' => '87337c91b9dfacee02452244ee14ab3c43bc485a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../voku/portable-ascii', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'webklex/php-imap' => array( + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '0f467d1c4283cc035ef474db3c733653feeb570f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'webmozart/assert' => array( + 'pretty_version' => '1.11.0', + 'version' => '1.11.0.0', + 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', + 'type' => 'library', + 'install_path' => __DIR__ . '/../webmozart/assert', + 'aliases' => array(), + 'dev_requirement' => true, + ), + ), +); diff --git a/htdocs/includes/webklex/php-imap/vendor/composer/platform_check.php b/htdocs/includes/webklex/php-imap/vendor/composer/platform_check.php new file mode 100644 index 00000000000..580fa960955 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70400)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Arr.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Arr.php new file mode 100644 index 00000000000..fd7dca8a586 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Arr.php @@ -0,0 +1,747 @@ +all(); + } elseif (! is_array($values)) { + continue; + } + + $results[] = $values; + } + + return array_merge([], ...$results); + } + + /** + * Cross join the given arrays, returning all possible permutations. + * + * @param iterable ...$arrays + * @return array + */ + public static function crossJoin(...$arrays) + { + $results = [[]]; + + foreach ($arrays as $index => $array) { + $append = []; + + foreach ($results as $product) { + foreach ($array as $item) { + $product[$index] = $item; + + $append[] = $product; + } + } + + $results = $append; + } + + return $results; + } + + /** + * Divide an array into two arrays. One with keys and the other with values. + * + * @param array $array + * @return array + */ + public static function divide($array) + { + return [array_keys($array), array_values($array)]; + } + + /** + * Flatten a multi-dimensional associative array with dots. + * + * @param iterable $array + * @param string $prepend + * @return array + */ + public static function dot($array, $prepend = '') + { + $results = []; + + foreach ($array as $key => $value) { + if (is_array($value) && ! empty($value)) { + $results = array_merge($results, static::dot($value, $prepend.$key.'.')); + } else { + $results[$prepend.$key] = $value; + } + } + + return $results; + } + + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @param iterable $array + * @return array + */ + public static function undot($array) + { + $results = []; + + foreach ($array as $key => $value) { + static::set($results, $key, $value); + } + + return $results; + } + + /** + * Get all of the given array except for a specified array of keys. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function except($array, $keys) + { + static::forget($array, $keys); + + return $array; + } + + /** + * Determine if the given key exists in the provided array. + * + * @param \ArrayAccess|array $array + * @param string|int $key + * @return bool + */ + public static function exists($array, $key) + { + if ($array instanceof Enumerable) { + return $array->has($key); + } + + if ($array instanceof ArrayAccess) { + return $array->offsetExists($key); + } + + return array_key_exists($key, $array); + } + + /** + * Return the first element in an array passing a given truth test. + * + * @param iterable $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function first($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + if (empty($array)) { + return value($default); + } + + foreach ($array as $item) { + return $item; + } + } + + foreach ($array as $key => $value) { + if ($callback($value, $key)) { + return $value; + } + } + + return value($default); + } + + /** + * Return the last element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function last($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + return empty($array) ? value($default) : end($array); + } + + return static::first(array_reverse($array, true), $callback, $default); + } + + /** + * Flatten a multi-dimensional array into a single level. + * + * @param iterable $array + * @param int $depth + * @return array + */ + public static function flatten($array, $depth = INF) + { + $result = []; + + foreach ($array as $item) { + $item = $item instanceof Collection ? $item->all() : $item; + + if (! is_array($item)) { + $result[] = $item; + } else { + $values = $depth === 1 + ? array_values($item) + : static::flatten($item, $depth - 1); + + foreach ($values as $value) { + $result[] = $value; + } + } + } + + return $result; + } + + /** + * Remove one or many array items from a given array using "dot" notation. + * + * @param array $array + * @param array|string $keys + * @return void + */ + public static function forget(&$array, $keys) + { + $original = &$array; + + $keys = (array) $keys; + + if (count($keys) === 0) { + return; + } + + foreach ($keys as $key) { + // if the exact key exists in the top-level, remove it + if (static::exists($array, $key)) { + unset($array[$key]); + + continue; + } + + $parts = explode('.', $key); + + // clean up before each pass + $array = &$original; + + while (count($parts) > 1) { + $part = array_shift($parts); + + if (isset($array[$part]) && is_array($array[$part])) { + $array = &$array[$part]; + } else { + continue 2; + } + } + + unset($array[array_shift($parts)]); + } + } + + /** + * Get an item from an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|int|null $key + * @param mixed $default + * @return mixed + */ + public static function get($array, $key, $default = null) + { + if (! static::accessible($array)) { + return value($default); + } + + if (is_null($key)) { + return $array; + } + + if (static::exists($array, $key)) { + return $array[$key]; + } + + if (strpos($key, '.') === false) { + return $array[$key] ?? value($default); + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($array) && static::exists($array, $segment)) { + $array = $array[$segment]; + } else { + return value($default); + } + } + + return $array; + } + + /** + * Check if an item or items exist in an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|array $keys + * @return bool + */ + public static function has($array, $keys) + { + $keys = (array) $keys; + + if (! $array || $keys === []) { + return false; + } + + foreach ($keys as $key) { + $subKeyArray = $array; + + if (static::exists($array, $key)) { + continue; + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { + $subKeyArray = $subKeyArray[$segment]; + } else { + return false; + } + } + } + + return true; + } + + /** + * Determine if any of the keys exist in an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|array $keys + * @return bool + */ + public static function hasAny($array, $keys) + { + if (is_null($keys)) { + return false; + } + + $keys = (array) $keys; + + if (! $array) { + return false; + } + + if ($keys === []) { + return false; + } + + foreach ($keys as $key) { + if (static::has($array, $key)) { + return true; + } + } + + return false; + } + + /** + * Determines if an array is associative. + * + * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. + * + * @param array $array + * @return bool + */ + public static function isAssoc(array $array) + { + $keys = array_keys($array); + + return array_keys($keys) !== $keys; + } + + /** + * Determines if an array is a list. + * + * An array is a "list" if all array keys are sequential integers starting from 0 with no gaps in between. + * + * @param array $array + * @return bool + */ + public static function isList($array) + { + return ! self::isAssoc($array); + } + + /** + * Get a subset of the items from the given array. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function only($array, $keys) + { + return array_intersect_key($array, array_flip((array) $keys)); + } + + /** + * Pluck an array of values from an array. + * + * @param iterable $array + * @param string|array|int|null $value + * @param string|array|null $key + * @return array + */ + public static function pluck($array, $value, $key = null) + { + $results = []; + + [$value, $key] = static::explodePluckParameters($value, $key); + + foreach ($array as $item) { + $itemValue = data_get($item, $value); + + // If the key is "null", we will just append the value to the array and keep + // looping. Otherwise we will key the array using the value of the key we + // received from the developer. Then we'll return the final array form. + if (is_null($key)) { + $results[] = $itemValue; + } else { + $itemKey = data_get($item, $key); + + if (is_object($itemKey) && method_exists($itemKey, '__toString')) { + $itemKey = (string) $itemKey; + } + + $results[$itemKey] = $itemValue; + } + } + + return $results; + } + + /** + * Explode the "value" and "key" arguments passed to "pluck". + * + * @param string|array $value + * @param string|array|null $key + * @return array + */ + protected static function explodePluckParameters($value, $key) + { + $value = is_string($value) ? explode('.', $value) : $value; + + $key = is_null($key) || is_array($key) ? $key : explode('.', $key); + + return [$value, $key]; + } + + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + public static function prepend($array, $value, $key = null) + { + if (func_num_args() == 2) { + array_unshift($array, $value); + } else { + $array = [$key => $value] + $array; + } + + return $array; + } + + /** + * Get a value from the array, and remove it. + * + * @param array $array + * @param string|int $key + * @param mixed $default + * @return mixed + */ + public static function pull(&$array, $key, $default = null) + { + $value = static::get($array, $key, $default); + + static::forget($array, $key); + + return $value; + } + + /** + * Convert the array into a query string. + * + * @param array $array + * @return string + */ + public static function query($array) + { + return http_build_query($array, '', '&', PHP_QUERY_RFC3986); + } + + /** + * Get one or a specified number of random values from an array. + * + * @param array $array + * @param int|null $number + * @param bool|false $preserveKeys + * @return mixed + * + * @throws \InvalidArgumentException + */ + public static function random($array, $number = null, $preserveKeys = false) + { + $requested = is_null($number) ? 1 : $number; + + $count = count($array); + + if ($requested > $count) { + throw new InvalidArgumentException( + "You requested {$requested} items, but there are only {$count} items available." + ); + } + + if (is_null($number)) { + return $array[array_rand($array)]; + } + + if ((int) $number === 0) { + return []; + } + + $keys = array_rand($array, $number); + + $results = []; + + if ($preserveKeys) { + foreach ((array) $keys as $key) { + $results[$key] = $array[$key]; + } + } else { + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } + } + + return $results; + } + + /** + * Set an array item to a given value using "dot" notation. + * + * If no key is given to the method, the entire array will be replaced. + * + * @param array $array + * @param string|null $key + * @param mixed $value + * @return array + */ + public static function set(&$array, $key, $value) + { + if (is_null($key)) { + return $array = $value; + } + + $keys = explode('.', $key); + + foreach ($keys as $i => $key) { + if (count($keys) === 1) { + break; + } + + unset($keys[$i]); + + // If the key doesn't exist at this depth, we will just create an empty array + // to hold the next value, allowing us to create the arrays to hold final + // values at the correct depth. Then we'll keep digging into the array. + if (! isset($array[$key]) || ! is_array($array[$key])) { + $array[$key] = []; + } + + $array = &$array[$key]; + } + + $array[array_shift($keys)] = $value; + + return $array; + } + + /** + * Shuffle the given array and return the result. + * + * @param array $array + * @param int|null $seed + * @return array + */ + public static function shuffle($array, $seed = null) + { + if (is_null($seed)) { + shuffle($array); + } else { + mt_srand($seed); + shuffle($array); + mt_srand(); + } + + return $array; + } + + /** + * Sort the array using the given callback or "dot" notation. + * + * @param array $array + * @param callable|array|string|null $callback + * @return array + */ + public static function sort($array, $callback = null) + { + return Collection::make($array)->sortBy($callback)->all(); + } + + /** + * Recursively sort an array by keys and values. + * + * @param array $array + * @param int $options + * @param bool $descending + * @return array + */ + public static function sortRecursive($array, $options = SORT_REGULAR, $descending = false) + { + foreach ($array as &$value) { + if (is_array($value)) { + $value = static::sortRecursive($value, $options, $descending); + } + } + + if (static::isAssoc($array)) { + $descending + ? krsort($array, $options) + : ksort($array, $options); + } else { + $descending + ? rsort($array, $options) + : sort($array, $options); + } + + return $array; + } + + /** + * Conditionally compile classes from an array into a CSS class list. + * + * @param array $array + * @return string + */ + public static function toCssClasses($array) + { + $classList = static::wrap($array); + + $classes = []; + + foreach ($classList as $class => $constraint) { + if (is_numeric($class)) { + $classes[] = $constraint; + } elseif ($constraint) { + $classes[] = $class; + } + } + + return implode(' ', $classes); + } + + /** + * Filter the array using the given callback. + * + * @param array $array + * @param callable $callback + * @return array + */ + public static function where($array, callable $callback) + { + return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); + } + + /** + * Filter items where the value is not null. + * + * @param array $array + * @return array + */ + public static function whereNotNull($array) + { + return static::where($array, function ($value) { + return ! is_null($value); + }); + } + + /** + * If the given value is not an array and not null, wrap it in one. + * + * @param mixed $value + * @return array + */ + public static function wrap($value) + { + if (is_null($value)) { + return []; + } + + return is_array($value) ? $value : [$value]; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Collection.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Collection.php new file mode 100644 index 00000000000..61a48841c11 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Collection.php @@ -0,0 +1,1672 @@ +items = $this->getArrayableItems($items); + } + + /** + * Create a collection with the given range. + * + * @param int $from + * @param int $to + * @return static + */ + public static function range($from, $to) + { + return new static(range($from, $to)); + } + + /** + * Get all of the items in the collection. + * + * @return array + */ + public function all() + { + return $this->items; + } + + /** + * Get a lazy collection for the items in this collection. + * + * @return \Illuminate\Support\LazyCollection + */ + public function lazy() + { + return new LazyCollection($this->items); + } + + /** + * Get the average value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function avg($callback = null) + { + $callback = $this->valueRetriever($callback); + + $items = $this->map(function ($value) use ($callback) { + return $callback($value); + })->filter(function ($value) { + return ! is_null($value); + }); + + if ($count = $items->count()) { + return $items->sum() / $count; + } + } + + /** + * Get the median of a given key. + * + * @param string|array|null $key + * @return mixed + */ + public function median($key = null) + { + $values = (isset($key) ? $this->pluck($key) : $this) + ->filter(function ($item) { + return ! is_null($item); + })->sort()->values(); + + $count = $values->count(); + + if ($count === 0) { + return; + } + + $middle = (int) ($count / 2); + + if ($count % 2) { + return $values->get($middle); + } + + return (new static([ + $values->get($middle - 1), $values->get($middle), + ]))->average(); + } + + /** + * Get the mode of a given key. + * + * @param string|array|null $key + * @return array|null + */ + public function mode($key = null) + { + if ($this->count() === 0) { + return; + } + + $collection = isset($key) ? $this->pluck($key) : $this; + + $counts = new static; + + $collection->each(function ($value) use ($counts) { + $counts[$value] = isset($counts[$value]) ? $counts[$value] + 1 : 1; + }); + + $sorted = $counts->sort(); + + $highestValue = $sorted->last(); + + return $sorted->filter(function ($value) use ($highestValue) { + return $value == $highestValue; + })->sort()->keys()->all(); + } + + /** + * Collapse the collection of items into a single array. + * + * @return static + */ + public function collapse() + { + return new static(Arr::collapse($this->items)); + } + + /** + * Determine if an item exists in the collection. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function contains($key, $operator = null, $value = null) + { + if (func_num_args() === 1) { + if ($this->useAsCallable($key)) { + $placeholder = new stdClass; + + return $this->first($key, $placeholder) !== $placeholder; + } + + return in_array($key, $this->items); + } + + return $this->contains($this->operatorForWhere(...func_get_args())); + } + + /** + * Determine if an item is not contained in the collection. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function doesntContain($key, $operator = null, $value = null) + { + return ! $this->contains(...func_get_args()); + } + + /** + * Cross join with the given lists, returning all possible permutations. + * + * @param mixed ...$lists + * @return static + */ + public function crossJoin(...$lists) + { + return new static(Arr::crossJoin( + $this->items, ...array_map([$this, 'getArrayableItems'], $lists) + )); + } + + /** + * Get the items in the collection that are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diff($items) + { + return new static(array_diff($this->items, $this->getArrayableItems($items))); + } + + /** + * Get the items in the collection that are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffUsing($items, callable $callback) + { + return new static(array_udiff($this->items, $this->getArrayableItems($items), $callback)); + } + + /** + * Get the items in the collection whose keys and values are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffAssoc($items) + { + return new static(array_diff_assoc($this->items, $this->getArrayableItems($items))); + } + + /** + * Get the items in the collection whose keys and values are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffAssocUsing($items, callable $callback) + { + return new static(array_diff_uassoc($this->items, $this->getArrayableItems($items), $callback)); + } + + /** + * Get the items in the collection whose keys are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffKeys($items) + { + return new static(array_diff_key($this->items, $this->getArrayableItems($items))); + } + + /** + * Get the items in the collection whose keys are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffKeysUsing($items, callable $callback) + { + return new static(array_diff_ukey($this->items, $this->getArrayableItems($items), $callback)); + } + + /** + * Retrieve duplicate items from the collection. + * + * @param callable|string|null $callback + * @param bool $strict + * @return static + */ + public function duplicates($callback = null, $strict = false) + { + $items = $this->map($this->valueRetriever($callback)); + + $uniqueItems = $items->unique(null, $strict); + + $compare = $this->duplicateComparator($strict); + + $duplicates = new static; + + foreach ($items as $key => $value) { + if ($uniqueItems->isNotEmpty() && $compare($value, $uniqueItems->first())) { + $uniqueItems->shift(); + } else { + $duplicates[$key] = $value; + } + } + + return $duplicates; + } + + /** + * Retrieve duplicate items from the collection using strict comparison. + * + * @param callable|string|null $callback + * @return static + */ + public function duplicatesStrict($callback = null) + { + return $this->duplicates($callback, true); + } + + /** + * Get the comparison function to detect duplicates. + * + * @param bool $strict + * @return \Closure + */ + protected function duplicateComparator($strict) + { + if ($strict) { + return function ($a, $b) { + return $a === $b; + }; + } + + return function ($a, $b) { + return $a == $b; + }; + } + + /** + * Get all items except for those with the specified keys. + * + * @param \Illuminate\Support\Collection|mixed $keys + * @return static + */ + public function except($keys) + { + if ($keys instanceof Enumerable) { + $keys = $keys->all(); + } elseif (! is_array($keys)) { + $keys = func_get_args(); + } + + return new static(Arr::except($this->items, $keys)); + } + + /** + * Run a filter over each of the items. + * + * @param callable|null $callback + * @return static + */ + public function filter(callable $callback = null) + { + if ($callback) { + return new static(Arr::where($this->items, $callback)); + } + + return new static(array_filter($this->items)); + } + + /** + * Get the first item from the collection passing the given truth test. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function first(callable $callback = null, $default = null) + { + return Arr::first($this->items, $callback, $default); + } + + /** + * Get a flattened array of the items in the collection. + * + * @param int $depth + * @return static + */ + public function flatten($depth = INF) + { + return new static(Arr::flatten($this->items, $depth)); + } + + /** + * Flip the items in the collection. + * + * @return static + */ + public function flip() + { + return new static(array_flip($this->items)); + } + + /** + * Remove an item from the collection by key. + * + * @param string|int|array $keys + * @return $this + */ + public function forget($keys) + { + foreach ((array) $keys as $key) { + $this->offsetUnset($key); + } + + return $this; + } + + /** + * Get an item from the collection by key. + * + * @param mixed $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (array_key_exists($key, $this->items)) { + return $this->items[$key]; + } + + return value($default); + } + + /** + * Get an item from the collection by key or add it to collection if it does not exist. + * + * @param mixed $key + * @param mixed $value + * @return mixed + */ + public function getOrPut($key, $value) + { + if (array_key_exists($key, $this->items)) { + return $this->items[$key]; + } + + $this->offsetSet($key, $value = value($value)); + + return $value; + } + + /** + * Group an associative array by a field or using a callback. + * + * @param array|callable|string $groupBy + * @param bool $preserveKeys + * @return static + */ + public function groupBy($groupBy, $preserveKeys = false) + { + if (! $this->useAsCallable($groupBy) && is_array($groupBy)) { + $nextGroups = $groupBy; + + $groupBy = array_shift($nextGroups); + } + + $groupBy = $this->valueRetriever($groupBy); + + $results = []; + + foreach ($this->items as $key => $value) { + $groupKeys = $groupBy($value, $key); + + if (! is_array($groupKeys)) { + $groupKeys = [$groupKeys]; + } + + foreach ($groupKeys as $groupKey) { + $groupKey = is_bool($groupKey) ? (int) $groupKey : $groupKey; + + if (! array_key_exists($groupKey, $results)) { + $results[$groupKey] = new static; + } + + $results[$groupKey]->offsetSet($preserveKeys ? $key : null, $value); + } + } + + $result = new static($results); + + if (! empty($nextGroups)) { + return $result->map->groupBy($nextGroups, $preserveKeys); + } + + return $result; + } + + /** + * Key an associative array by a field or using a callback. + * + * @param callable|string $keyBy + * @return static + */ + public function keyBy($keyBy) + { + $keyBy = $this->valueRetriever($keyBy); + + $results = []; + + foreach ($this->items as $key => $item) { + $resolvedKey = $keyBy($item, $key); + + if (is_object($resolvedKey)) { + $resolvedKey = (string) $resolvedKey; + } + + $results[$resolvedKey] = $item; + } + + return new static($results); + } + + /** + * Determine if an item exists in the collection by key. + * + * @param mixed $key + * @return bool + */ + public function has($key) + { + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $value) { + if (! array_key_exists($value, $this->items)) { + return false; + } + } + + return true; + } + + /** + * Determine if any of the keys exist in the collection. + * + * @param mixed $key + * @return bool + */ + public function hasAny($key) + { + if ($this->isEmpty()) { + return false; + } + + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $value) { + if ($this->has($value)) { + return true; + } + } + + return false; + } + + /** + * Concatenate values of a given key as a string. + * + * @param string $value + * @param string|null $glue + * @return string + */ + public function implode($value, $glue = null) + { + $first = $this->first(); + + if (is_array($first) || (is_object($first) && ! $first instanceof Stringable)) { + return implode($glue ?? '', $this->pluck($value)->all()); + } + + return implode($value ?? '', $this->items); + } + + /** + * Intersect the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function intersect($items) + { + return new static(array_intersect($this->items, $this->getArrayableItems($items))); + } + + /** + * Intersect the collection with the given items by key. + * + * @param mixed $items + * @return static + */ + public function intersectByKeys($items) + { + return new static(array_intersect_key( + $this->items, $this->getArrayableItems($items) + )); + } + + /** + * Determine if the collection is empty or not. + * + * @return bool + */ + public function isEmpty() + { + return empty($this->items); + } + + /** + * Determine if the collection contains a single item. + * + * @return bool + */ + public function containsOneItem() + { + return $this->count() === 1; + } + + /** + * Join all items from the collection using a string. The final items can use a separate glue string. + * + * @param string $glue + * @param string $finalGlue + * @return string + */ + public function join($glue, $finalGlue = '') + { + if ($finalGlue === '') { + return $this->implode($glue); + } + + $count = $this->count(); + + if ($count === 0) { + return ''; + } + + if ($count === 1) { + return $this->last(); + } + + $collection = new static($this->items); + + $finalItem = $collection->pop(); + + return $collection->implode($glue).$finalGlue.$finalItem; + } + + /** + * Get the keys of the collection items. + * + * @return static + */ + public function keys() + { + return new static(array_keys($this->items)); + } + + /** + * Get the last item from the collection. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function last(callable $callback = null, $default = null) + { + return Arr::last($this->items, $callback, $default); + } + + /** + * Get the values of a given key. + * + * @param string|array|int|null $value + * @param string|null $key + * @return static + */ + public function pluck($value, $key = null) + { + return new static(Arr::pluck($this->items, $value, $key)); + } + + /** + * Run a map over each of the items. + * + * @param callable $callback + * @return static + */ + public function map(callable $callback) + { + $keys = array_keys($this->items); + + $items = array_map($callback, $this->items, $keys); + + return new static(array_combine($keys, $items)); + } + + /** + * Run a dictionary map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapToDictionary(callable $callback) + { + $dictionary = []; + + foreach ($this->items as $key => $item) { + $pair = $callback($item, $key); + + $key = key($pair); + + $value = reset($pair); + + if (! isset($dictionary[$key])) { + $dictionary[$key] = []; + } + + $dictionary[$key][] = $value; + } + + return new static($dictionary); + } + + /** + * Run an associative map over each of the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapWithKeys(callable $callback) + { + $result = []; + + foreach ($this->items as $key => $value) { + $assoc = $callback($value, $key); + + foreach ($assoc as $mapKey => $mapValue) { + $result[$mapKey] = $mapValue; + } + } + + return new static($result); + } + + /** + * Merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function merge($items) + { + return new static(array_merge($this->items, $this->getArrayableItems($items))); + } + + /** + * Recursively merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function mergeRecursive($items) + { + return new static(array_merge_recursive($this->items, $this->getArrayableItems($items))); + } + + /** + * Create a collection by using this collection for keys and another for its values. + * + * @param mixed $values + * @return static + */ + public function combine($values) + { + return new static(array_combine($this->all(), $this->getArrayableItems($values))); + } + + /** + * Union the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function union($items) + { + return new static($this->items + $this->getArrayableItems($items)); + } + + /** + * Create a new collection consisting of every n-th element. + * + * @param int $step + * @param int $offset + * @return static + */ + public function nth($step, $offset = 0) + { + $new = []; + + $position = 0; + + foreach ($this->slice($offset)->items as $item) { + if ($position % $step === 0) { + $new[] = $item; + } + + $position++; + } + + return new static($new); + } + + /** + * Get the items with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function only($keys) + { + if (is_null($keys)) { + return new static($this->items); + } + + if ($keys instanceof Enumerable) { + $keys = $keys->all(); + } + + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::only($this->items, $keys)); + } + + /** + * Get and remove the last N items from the collection. + * + * @param int $count + * @return mixed + */ + public function pop($count = 1) + { + if ($count === 1) { + return array_pop($this->items); + } + + if ($this->isEmpty()) { + return new static; + } + + $results = []; + + $collectionCount = $this->count(); + + foreach (range(1, min($count, $collectionCount)) as $item) { + array_push($results, array_pop($this->items)); + } + + return new static($results); + } + + /** + * Push an item onto the beginning of the collection. + * + * @param mixed $value + * @param mixed $key + * @return $this + */ + public function prepend($value, $key = null) + { + $this->items = Arr::prepend($this->items, ...func_get_args()); + + return $this; + } + + /** + * Push one or more items onto the end of the collection. + * + * @param mixed $values + * @return $this + */ + public function push(...$values) + { + foreach ($values as $value) { + $this->items[] = $value; + } + + return $this; + } + + /** + * Push all of the given items onto the collection. + * + * @param iterable $source + * @return static + */ + public function concat($source) + { + $result = new static($this); + + foreach ($source as $item) { + $result->push($item); + } + + return $result; + } + + /** + * Get and remove an item from the collection. + * + * @param mixed $key + * @param mixed $default + * @return mixed + */ + public function pull($key, $default = null) + { + return Arr::pull($this->items, $key, $default); + } + + /** + * Put an item in the collection by key. + * + * @param mixed $key + * @param mixed $value + * @return $this + */ + public function put($key, $value) + { + $this->offsetSet($key, $value); + + return $this; + } + + /** + * Get one or a specified number of items randomly from the collection. + * + * @param int|null $number + * @return static|mixed + * + * @throws \InvalidArgumentException + */ + public function random($number = null) + { + if (is_null($number)) { + return Arr::random($this->items); + } + + return new static(Arr::random($this->items, $number)); + } + + /** + * Replace the collection items with the given items. + * + * @param mixed $items + * @return static + */ + public function replace($items) + { + return new static(array_replace($this->items, $this->getArrayableItems($items))); + } + + /** + * Recursively replace the collection items with the given items. + * + * @param mixed $items + * @return static + */ + public function replaceRecursive($items) + { + return new static(array_replace_recursive($this->items, $this->getArrayableItems($items))); + } + + /** + * Reverse items order. + * + * @return static + */ + public function reverse() + { + return new static(array_reverse($this->items, true)); + } + + /** + * Search the collection for a given value and return the corresponding key if successful. + * + * @param mixed $value + * @param bool $strict + * @return mixed + */ + public function search($value, $strict = false) + { + if (! $this->useAsCallable($value)) { + return array_search($value, $this->items, $strict); + } + + foreach ($this->items as $key => $item) { + if ($value($item, $key)) { + return $key; + } + } + + return false; + } + + /** + * Get and remove the first N items from the collection. + * + * @param int $count + * @return mixed + */ + public function shift($count = 1) + { + if ($count === 1) { + return array_shift($this->items); + } + + if ($this->isEmpty()) { + return new static; + } + + $results = []; + + $collectionCount = $this->count(); + + foreach (range(1, min($count, $collectionCount)) as $item) { + array_push($results, array_shift($this->items)); + } + + return new static($results); + } + + /** + * Shuffle the items in the collection. + * + * @param int|null $seed + * @return static + */ + public function shuffle($seed = null) + { + return new static(Arr::shuffle($this->items, $seed)); + } + + /** + * Create chunks representing a "sliding window" view of the items in the collection. + * + * @param int $size + * @param int $step + * @return static + */ + public function sliding($size = 2, $step = 1) + { + $chunks = floor(($this->count() - $size) / $step) + 1; + + return static::times($chunks, function ($number) use ($size, $step) { + return $this->slice(($number - 1) * $step, $size); + }); + } + + /** + * Skip the first {$count} items. + * + * @param int $count + * @return static + */ + public function skip($count) + { + return $this->slice($count); + } + + /** + * Skip items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipUntil($value) + { + return new static($this->lazy()->skipUntil($value)->all()); + } + + /** + * Skip items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipWhile($value) + { + return new static($this->lazy()->skipWhile($value)->all()); + } + + /** + * Slice the underlying collection array. + * + * @param int $offset + * @param int|null $length + * @return static + */ + public function slice($offset, $length = null) + { + return new static(array_slice($this->items, $offset, $length, true)); + } + + /** + * Split a collection into a certain number of groups. + * + * @param int $numberOfGroups + * @return static + */ + public function split($numberOfGroups) + { + if ($this->isEmpty()) { + return new static; + } + + $groups = new static; + + $groupSize = floor($this->count() / $numberOfGroups); + + $remain = $this->count() % $numberOfGroups; + + $start = 0; + + for ($i = 0; $i < $numberOfGroups; $i++) { + $size = $groupSize; + + if ($i < $remain) { + $size++; + } + + if ($size) { + $groups->push(new static(array_slice($this->items, $start, $size))); + + $start += $size; + } + } + + return $groups; + } + + /** + * Split a collection into a certain number of groups, and fill the first groups completely. + * + * @param int $numberOfGroups + * @return static + */ + public function splitIn($numberOfGroups) + { + return $this->chunk(ceil($this->count() / $numberOfGroups)); + } + + /** + * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + * @throws \Illuminate\Support\MultipleItemsFoundException + */ + public function sole($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + $items = $this->when($filter)->filter($filter); + + if ($items->isEmpty()) { + throw new ItemNotFoundException; + } + + if ($items->count() > 1) { + throw new MultipleItemsFoundException; + } + + return $items->first(); + } + + /** + * Get the first item in the collection but throw an exception if no matching items exist. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + */ + public function firstOrFail($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + $placeholder = new stdClass(); + + $item = $this->first($filter, $placeholder); + + if ($item === $placeholder) { + throw new ItemNotFoundException; + } + + return $item; + } + + /** + * Chunk the collection into chunks of the given size. + * + * @param int $size + * @return static + */ + public function chunk($size) + { + if ($size <= 0) { + return new static; + } + + $chunks = []; + + foreach (array_chunk($this->items, $size, true) as $chunk) { + $chunks[] = new static($chunk); + } + + return new static($chunks); + } + + /** + * Chunk the collection into chunks with a callback. + * + * @param callable $callback + * @return static + */ + public function chunkWhile(callable $callback) + { + return new static( + $this->lazy()->chunkWhile($callback)->mapInto(static::class) + ); + } + + /** + * Sort through each item with a callback. + * + * @param callable|int|null $callback + * @return static + */ + public function sort($callback = null) + { + $items = $this->items; + + $callback && is_callable($callback) + ? uasort($items, $callback) + : asort($items, $callback ?? SORT_REGULAR); + + return new static($items); + } + + /** + * Sort items in descending order. + * + * @param int $options + * @return static + */ + public function sortDesc($options = SORT_REGULAR) + { + $items = $this->items; + + arsort($items, $options); + + return new static($items); + } + + /** + * Sort the collection using the given callback. + * + * @param callable|array|string $callback + * @param int $options + * @param bool $descending + * @return static + */ + public function sortBy($callback, $options = SORT_REGULAR, $descending = false) + { + if (is_array($callback) && ! is_callable($callback)) { + return $this->sortByMany($callback); + } + + $results = []; + + $callback = $this->valueRetriever($callback); + + // First we will loop through the items and get the comparator from a callback + // function which we were given. Then, we will sort the returned values and + // grab all the corresponding values for the sorted keys from this array. + foreach ($this->items as $key => $value) { + $results[$key] = $callback($value, $key); + } + + $descending ? arsort($results, $options) + : asort($results, $options); + + // Once we have sorted all of the keys in the array, we will loop through them + // and grab the corresponding model so we can set the underlying items list + // to the sorted version. Then we'll just return the collection instance. + foreach (array_keys($results) as $key) { + $results[$key] = $this->items[$key]; + } + + return new static($results); + } + + /** + * Sort the collection using multiple comparisons. + * + * @param array $comparisons + * @return static + */ + protected function sortByMany(array $comparisons = []) + { + $items = $this->items; + + usort($items, function ($a, $b) use ($comparisons) { + foreach ($comparisons as $comparison) { + $comparison = Arr::wrap($comparison); + + $prop = $comparison[0]; + + $ascending = Arr::get($comparison, 1, true) === true || + Arr::get($comparison, 1, true) === 'asc'; + + $result = 0; + + if (! is_string($prop) && is_callable($prop)) { + $result = $prop($a, $b); + } else { + $values = [data_get($a, $prop), data_get($b, $prop)]; + + if (! $ascending) { + $values = array_reverse($values); + } + + $result = $values[0] <=> $values[1]; + } + + if ($result === 0) { + continue; + } + + return $result; + } + }); + + return new static($items); + } + + /** + * Sort the collection in descending order using the given callback. + * + * @param callable|string $callback + * @param int $options + * @return static + */ + public function sortByDesc($callback, $options = SORT_REGULAR) + { + return $this->sortBy($callback, $options, true); + } + + /** + * Sort the collection keys. + * + * @param int $options + * @param bool $descending + * @return static + */ + public function sortKeys($options = SORT_REGULAR, $descending = false) + { + $items = $this->items; + + $descending ? krsort($items, $options) : ksort($items, $options); + + return new static($items); + } + + /** + * Sort the collection keys in descending order. + * + * @param int $options + * @return static + */ + public function sortKeysDesc($options = SORT_REGULAR) + { + return $this->sortKeys($options, true); + } + + /** + * Sort the collection keys using a callback. + * + * @param callable $callback + * @return static + */ + public function sortKeysUsing(callable $callback) + { + $items = $this->items; + + uksort($items, $callback); + + return new static($items); + } + + /** + * Splice a portion of the underlying collection array. + * + * @param int $offset + * @param int|null $length + * @param mixed $replacement + * @return static + */ + public function splice($offset, $length = null, $replacement = []) + { + if (func_num_args() === 1) { + return new static(array_splice($this->items, $offset)); + } + + return new static(array_splice($this->items, $offset, $length, $this->getArrayableItems($replacement))); + } + + /** + * Take the first or last {$limit} items. + * + * @param int $limit + * @return static + */ + public function take($limit) + { + if ($limit < 0) { + return $this->slice($limit, abs($limit)); + } + + return $this->slice(0, $limit); + } + + /** + * Take items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeUntil($value) + { + return new static($this->lazy()->takeUntil($value)->all()); + } + + /** + * Take items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeWhile($value) + { + return new static($this->lazy()->takeWhile($value)->all()); + } + + /** + * Transform each item in the collection using a callback. + * + * @param callable $callback + * @return $this + */ + public function transform(callable $callback) + { + $this->items = $this->map($callback)->all(); + + return $this; + } + + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @return static + */ + public function undot() + { + return new static(Arr::undot($this->all())); + } + + /** + * Return only unique items from the collection array. + * + * @param string|callable|null $key + * @param bool $strict + * @return static + */ + public function unique($key = null, $strict = false) + { + if (is_null($key) && $strict === false) { + return new static(array_unique($this->items, SORT_REGULAR)); + } + + $callback = $this->valueRetriever($key); + + $exists = []; + + return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) { + if (in_array($id = $callback($item, $key), $exists, $strict)) { + return true; + } + + $exists[] = $id; + }); + } + + /** + * Reset the keys on the underlying array. + * + * @return static + */ + public function values() + { + return new static(array_values($this->items)); + } + + /** + * Zip the collection together with one or more arrays. + * + * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); + * => [[1, 4], [2, 5], [3, 6]] + * + * @param mixed ...$items + * @return static + */ + public function zip($items) + { + $arrayableItems = array_map(function ($items) { + return $this->getArrayableItems($items); + }, func_get_args()); + + $params = array_merge([function () { + return new static(func_get_args()); + }, $this->items], $arrayableItems); + + return new static(array_map(...$params)); + } + + /** + * Pad collection to the specified length with a value. + * + * @param int $size + * @param mixed $value + * @return static + */ + public function pad($size, $value) + { + return new static(array_pad($this->items, $size, $value)); + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->items); + } + + /** + * Count the number of items in the collection. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return count($this->items); + } + + /** + * Count the number of items in the collection by a field or using a callback. + * + * @param callable|string $countBy + * @return static + */ + public function countBy($countBy = null) + { + return new static($this->lazy()->countBy($countBy)->all()); + } + + /** + * Add an item to the collection. + * + * @param mixed $item + * @return $this + */ + public function add($item) + { + $this->items[] = $item; + + return $this; + } + + /** + * Get a base Support collection instance from this collection. + * + * @return \Illuminate\Support\Collection + */ + public function toBase() + { + return new self($this); + } + + /** + * Determine if an item exists at an offset. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return isset($this->items[$key]); + } + + /** + * Get an item at a given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return $this->items[$key]; + } + + /** + * Set the item at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + if (is_null($key)) { + $this->items[] = $value; + } else { + $this->items[$key] = $value; + } + } + + /** + * Unset the item at a given offset. + * + * @param mixed $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + unset($this->items[$key]); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Enumerable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Enumerable.php new file mode 100644 index 00000000000..261a0c856b3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/Enumerable.php @@ -0,0 +1,1027 @@ +zip([4, 5, 6]); + * => [[1, 4], [2, 5], [3, 6]] + * + * @param mixed ...$items + * @return static + */ + public function zip($items); + + /** + * Collect the values into a collection. + * + * @return \Illuminate\Support\Collection + */ + public function collect(); + + /** + * Convert the collection to its string representation. + * + * @return string + */ + public function __toString(); + + /** + * Add a method to the list of proxied methods. + * + * @param string $method + * @return void + */ + public static function proxy($method); + + /** + * Dynamically access collection proxies. + * + * @param string $key + * @return mixed + * + * @throws \Exception + */ + public function __get($key); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderCollectionProxy.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderCollectionProxy.php new file mode 100644 index 00000000000..106356c3acc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderCollectionProxy.php @@ -0,0 +1,63 @@ +method = $method; + $this->collection = $collection; + } + + /** + * Proxy accessing an attribute onto the collection items. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->collection->{$this->method}(function ($value) use ($key) { + return is_array($value) ? $value[$key] : $value->{$key}; + }); + } + + /** + * Proxy a method call onto the collection items. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->collection->{$this->method}(function ($value) use ($method, $parameters) { + return $value->{$method}(...$parameters); + }); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderWhenProxy.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderWhenProxy.php new file mode 100644 index 00000000000..6653c03a656 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/HigherOrderWhenProxy.php @@ -0,0 +1,63 @@ +condition = $condition; + $this->collection = $collection; + } + + /** + * Proxy accessing an attribute onto the collection. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->condition + ? $this->collection->{$key} + : $this->collection; + } + + /** + * Proxy a method call onto the collection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->condition + ? $this->collection->{$method}(...$parameters) + : $this->collection; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/ItemNotFoundException.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/ItemNotFoundException.php new file mode 100644 index 00000000000..05a51d95475 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/ItemNotFoundException.php @@ -0,0 +1,9 @@ +source = $source; + } elseif (is_null($source)) { + $this->source = static::empty(); + } else { + $this->source = $this->getArrayableItems($source); + } + } + + /** + * Create a collection with the given range. + * + * @param int $from + * @param int $to + * @return static + */ + public static function range($from, $to) + { + return new static(function () use ($from, $to) { + if ($from <= $to) { + for (; $from <= $to; $from++) { + yield $from; + } + } else { + for (; $from >= $to; $from--) { + yield $from; + } + } + }); + } + + /** + * Get all items in the enumerable. + * + * @return array + */ + public function all() + { + if (is_array($this->source)) { + return $this->source; + } + + return iterator_to_array($this->getIterator()); + } + + /** + * Eager load all items into a new lazy collection backed by an array. + * + * @return static + */ + public function eager() + { + return new static($this->all()); + } + + /** + * Cache values as they're enumerated. + * + * @return static + */ + public function remember() + { + $iterator = $this->getIterator(); + + $iteratorIndex = 0; + + $cache = []; + + return new static(function () use ($iterator, &$iteratorIndex, &$cache) { + for ($index = 0; true; $index++) { + if (array_key_exists($index, $cache)) { + yield $cache[$index][0] => $cache[$index][1]; + + continue; + } + + if ($iteratorIndex < $index) { + $iterator->next(); + + $iteratorIndex++; + } + + if (! $iterator->valid()) { + break; + } + + $cache[$index] = [$iterator->key(), $iterator->current()]; + + yield $cache[$index][0] => $cache[$index][1]; + } + }); + } + + /** + * Get the average value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function avg($callback = null) + { + return $this->collect()->avg($callback); + } + + /** + * Get the median of a given key. + * + * @param string|array|null $key + * @return mixed + */ + public function median($key = null) + { + return $this->collect()->median($key); + } + + /** + * Get the mode of a given key. + * + * @param string|array|null $key + * @return array|null + */ + public function mode($key = null) + { + return $this->collect()->mode($key); + } + + /** + * Collapse the collection of items into a single array. + * + * @return static + */ + public function collapse() + { + return new static(function () { + foreach ($this as $values) { + if (is_array($values) || $values instanceof Enumerable) { + foreach ($values as $value) { + yield $value; + } + } + } + }); + } + + /** + * Determine if an item exists in the enumerable. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function contains($key, $operator = null, $value = null) + { + if (func_num_args() === 1 && $this->useAsCallable($key)) { + $placeholder = new stdClass; + + return $this->first($key, $placeholder) !== $placeholder; + } + + if (func_num_args() === 1) { + $needle = $key; + + foreach ($this as $value) { + if ($value == $needle) { + return true; + } + } + + return false; + } + + return $this->contains($this->operatorForWhere(...func_get_args())); + } + + /** + * Determine if an item is not contained in the enumerable. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function doesntContain($key, $operator = null, $value = null) + { + return ! $this->contains(...func_get_args()); + } + + /** + * Cross join the given iterables, returning all possible permutations. + * + * @param array ...$arrays + * @return static + */ + public function crossJoin(...$arrays) + { + return $this->passthru('crossJoin', func_get_args()); + } + + /** + * Count the number of items in the collection by a field or using a callback. + * + * @param callable|string $countBy + * @return static + */ + public function countBy($countBy = null) + { + $countBy = is_null($countBy) + ? $this->identity() + : $this->valueRetriever($countBy); + + return new static(function () use ($countBy) { + $counts = []; + + foreach ($this as $key => $value) { + $group = $countBy($value, $key); + + if (empty($counts[$group])) { + $counts[$group] = 0; + } + + $counts[$group]++; + } + + yield from $counts; + }); + } + + /** + * Get the items that are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diff($items) + { + return $this->passthru('diff', func_get_args()); + } + + /** + * Get the items that are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffUsing($items, callable $callback) + { + return $this->passthru('diffUsing', func_get_args()); + } + + /** + * Get the items whose keys and values are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffAssoc($items) + { + return $this->passthru('diffAssoc', func_get_args()); + } + + /** + * Get the items whose keys and values are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffAssocUsing($items, callable $callback) + { + return $this->passthru('diffAssocUsing', func_get_args()); + } + + /** + * Get the items whose keys are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffKeys($items) + { + return $this->passthru('diffKeys', func_get_args()); + } + + /** + * Get the items whose keys are not present in the given items, using the callback. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffKeysUsing($items, callable $callback) + { + return $this->passthru('diffKeysUsing', func_get_args()); + } + + /** + * Retrieve duplicate items. + * + * @param callable|string|null $callback + * @param bool $strict + * @return static + */ + public function duplicates($callback = null, $strict = false) + { + return $this->passthru('duplicates', func_get_args()); + } + + /** + * Retrieve duplicate items using strict comparison. + * + * @param callable|string|null $callback + * @return static + */ + public function duplicatesStrict($callback = null) + { + return $this->passthru('duplicatesStrict', func_get_args()); + } + + /** + * Get all items except for those with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function except($keys) + { + return $this->passthru('except', func_get_args()); + } + + /** + * Run a filter over each of the items. + * + * @param callable|null $callback + * @return static + */ + public function filter(callable $callback = null) + { + if (is_null($callback)) { + $callback = function ($value) { + return (bool) $value; + }; + } + + return new static(function () use ($callback) { + foreach ($this as $key => $value) { + if ($callback($value, $key)) { + yield $key => $value; + } + } + }); + } + + /** + * Get the first item from the enumerable passing the given truth test. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function first(callable $callback = null, $default = null) + { + $iterator = $this->getIterator(); + + if (is_null($callback)) { + if (! $iterator->valid()) { + return value($default); + } + + return $iterator->current(); + } + + foreach ($iterator as $key => $value) { + if ($callback($value, $key)) { + return $value; + } + } + + return value($default); + } + + /** + * Get a flattened list of the items in the collection. + * + * @param int $depth + * @return static + */ + public function flatten($depth = INF) + { + $instance = new static(function () use ($depth) { + foreach ($this as $item) { + if (! is_array($item) && ! $item instanceof Enumerable) { + yield $item; + } elseif ($depth === 1) { + yield from $item; + } else { + yield from (new static($item))->flatten($depth - 1); + } + } + }); + + return $instance->values(); + } + + /** + * Flip the items in the collection. + * + * @return static + */ + public function flip() + { + return new static(function () { + foreach ($this as $key => $value) { + yield $value => $key; + } + }); + } + + /** + * Get an item by key. + * + * @param mixed $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (is_null($key)) { + return; + } + + foreach ($this as $outerKey => $outerValue) { + if ($outerKey == $key) { + return $outerValue; + } + } + + return value($default); + } + + /** + * Group an associative array by a field or using a callback. + * + * @param array|callable|string $groupBy + * @param bool $preserveKeys + * @return static + */ + public function groupBy($groupBy, $preserveKeys = false) + { + return $this->passthru('groupBy', func_get_args()); + } + + /** + * Key an associative array by a field or using a callback. + * + * @param callable|string $keyBy + * @return static + */ + public function keyBy($keyBy) + { + return new static(function () use ($keyBy) { + $keyBy = $this->valueRetriever($keyBy); + + foreach ($this as $key => $item) { + $resolvedKey = $keyBy($item, $key); + + if (is_object($resolvedKey)) { + $resolvedKey = (string) $resolvedKey; + } + + yield $resolvedKey => $item; + } + }); + } + + /** + * Determine if an item exists in the collection by key. + * + * @param mixed $key + * @return bool + */ + public function has($key) + { + $keys = array_flip(is_array($key) ? $key : func_get_args()); + $count = count($keys); + + foreach ($this as $key => $value) { + if (array_key_exists($key, $keys) && --$count == 0) { + return true; + } + } + + return false; + } + + /** + * Determine if any of the keys exist in the collection. + * + * @param mixed $key + * @return bool + */ + public function hasAny($key) + { + $keys = array_flip(is_array($key) ? $key : func_get_args()); + + foreach ($this as $key => $value) { + if (array_key_exists($key, $keys)) { + return true; + } + } + + return false; + } + + /** + * Concatenate values of a given key as a string. + * + * @param string $value + * @param string|null $glue + * @return string + */ + public function implode($value, $glue = null) + { + return $this->collect()->implode(...func_get_args()); + } + + /** + * Intersect the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function intersect($items) + { + return $this->passthru('intersect', func_get_args()); + } + + /** + * Intersect the collection with the given items by key. + * + * @param mixed $items + * @return static + */ + public function intersectByKeys($items) + { + return $this->passthru('intersectByKeys', func_get_args()); + } + + /** + * Determine if the items are empty or not. + * + * @return bool + */ + public function isEmpty() + { + return ! $this->getIterator()->valid(); + } + + /** + * Determine if the collection contains a single item. + * + * @return bool + */ + public function containsOneItem() + { + return $this->take(2)->count() === 1; + } + + /** + * Join all items from the collection using a string. The final items can use a separate glue string. + * + * @param string $glue + * @param string $finalGlue + * @return string + */ + public function join($glue, $finalGlue = '') + { + return $this->collect()->join(...func_get_args()); + } + + /** + * Get the keys of the collection items. + * + * @return static + */ + public function keys() + { + return new static(function () { + foreach ($this as $key => $value) { + yield $key; + } + }); + } + + /** + * Get the last item from the collection. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function last(callable $callback = null, $default = null) + { + $needle = $placeholder = new stdClass; + + foreach ($this as $key => $value) { + if (is_null($callback) || $callback($value, $key)) { + $needle = $value; + } + } + + return $needle === $placeholder ? value($default) : $needle; + } + + /** + * Get the values of a given key. + * + * @param string|array $value + * @param string|null $key + * @return static + */ + public function pluck($value, $key = null) + { + return new static(function () use ($value, $key) { + [$value, $key] = $this->explodePluckParameters($value, $key); + + foreach ($this as $item) { + $itemValue = data_get($item, $value); + + if (is_null($key)) { + yield $itemValue; + } else { + $itemKey = data_get($item, $key); + + if (is_object($itemKey) && method_exists($itemKey, '__toString')) { + $itemKey = (string) $itemKey; + } + + yield $itemKey => $itemValue; + } + } + }); + } + + /** + * Run a map over each of the items. + * + * @param callable $callback + * @return static + */ + public function map(callable $callback) + { + return new static(function () use ($callback) { + foreach ($this as $key => $value) { + yield $key => $callback($value, $key); + } + }); + } + + /** + * Run a dictionary map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapToDictionary(callable $callback) + { + return $this->passthru('mapToDictionary', func_get_args()); + } + + /** + * Run an associative map over each of the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapWithKeys(callable $callback) + { + return new static(function () use ($callback) { + foreach ($this as $key => $value) { + yield from $callback($value, $key); + } + }); + } + + /** + * Merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function merge($items) + { + return $this->passthru('merge', func_get_args()); + } + + /** + * Recursively merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function mergeRecursive($items) + { + return $this->passthru('mergeRecursive', func_get_args()); + } + + /** + * Create a collection by using this collection for keys and another for its values. + * + * @param mixed $values + * @return static + */ + public function combine($values) + { + return new static(function () use ($values) { + $values = $this->makeIterator($values); + + $errorMessage = 'Both parameters should have an equal number of elements'; + + foreach ($this as $key) { + if (! $values->valid()) { + trigger_error($errorMessage, E_USER_WARNING); + + break; + } + + yield $key => $values->current(); + + $values->next(); + } + + if ($values->valid()) { + trigger_error($errorMessage, E_USER_WARNING); + } + }); + } + + /** + * Union the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function union($items) + { + return $this->passthru('union', func_get_args()); + } + + /** + * Create a new collection consisting of every n-th element. + * + * @param int $step + * @param int $offset + * @return static + */ + public function nth($step, $offset = 0) + { + return new static(function () use ($step, $offset) { + $position = 0; + + foreach ($this->slice($offset) as $item) { + if ($position % $step === 0) { + yield $item; + } + + $position++; + } + }); + } + + /** + * Get the items with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function only($keys) + { + if ($keys instanceof Enumerable) { + $keys = $keys->all(); + } elseif (! is_null($keys)) { + $keys = is_array($keys) ? $keys : func_get_args(); + } + + return new static(function () use ($keys) { + if (is_null($keys)) { + yield from $this; + } else { + $keys = array_flip($keys); + + foreach ($this as $key => $value) { + if (array_key_exists($key, $keys)) { + yield $key => $value; + + unset($keys[$key]); + + if (empty($keys)) { + break; + } + } + } + } + }); + } + + /** + * Push all of the given items onto the collection. + * + * @param iterable $source + * @return static + */ + public function concat($source) + { + return (new static(function () use ($source) { + yield from $this; + yield from $source; + }))->values(); + } + + /** + * Get one or a specified number of items randomly from the collection. + * + * @param int|null $number + * @return static|mixed + * + * @throws \InvalidArgumentException + */ + public function random($number = null) + { + $result = $this->collect()->random(...func_get_args()); + + return is_null($number) ? $result : new static($result); + } + + /** + * Replace the collection items with the given items. + * + * @param mixed $items + * @return static + */ + public function replace($items) + { + return new static(function () use ($items) { + $items = $this->getArrayableItems($items); + + foreach ($this as $key => $value) { + if (array_key_exists($key, $items)) { + yield $key => $items[$key]; + + unset($items[$key]); + } else { + yield $key => $value; + } + } + + foreach ($items as $key => $value) { + yield $key => $value; + } + }); + } + + /** + * Recursively replace the collection items with the given items. + * + * @param mixed $items + * @return static + */ + public function replaceRecursive($items) + { + return $this->passthru('replaceRecursive', func_get_args()); + } + + /** + * Reverse items order. + * + * @return static + */ + public function reverse() + { + return $this->passthru('reverse', func_get_args()); + } + + /** + * Search the collection for a given value and return the corresponding key if successful. + * + * @param mixed $value + * @param bool $strict + * @return mixed + */ + public function search($value, $strict = false) + { + $predicate = $this->useAsCallable($value) + ? $value + : function ($item) use ($value, $strict) { + return $strict ? $item === $value : $item == $value; + }; + + foreach ($this as $key => $item) { + if ($predicate($item, $key)) { + return $key; + } + } + + return false; + } + + /** + * Shuffle the items in the collection. + * + * @param int|null $seed + * @return static + */ + public function shuffle($seed = null) + { + return $this->passthru('shuffle', func_get_args()); + } + + /** + * Create chunks representing a "sliding window" view of the items in the collection. + * + * @param int $size + * @param int $step + * @return static + */ + public function sliding($size = 2, $step = 1) + { + return new static(function () use ($size, $step) { + $iterator = $this->getIterator(); + + $chunk = []; + + while ($iterator->valid()) { + $chunk[$iterator->key()] = $iterator->current(); + + if (count($chunk) == $size) { + yield tap(new static($chunk), function () use (&$chunk, $step) { + $chunk = array_slice($chunk, $step, null, true); + }); + + // If the $step between chunks is bigger than each chunk's $size + // we will skip the extra items (which should never be in any + // chunk) before we continue to the next chunk in the loop. + if ($step > $size) { + $skip = $step - $size; + + for ($i = 0; $i < $skip && $iterator->valid(); $i++) { + $iterator->next(); + } + } + } + + $iterator->next(); + } + }); + } + + /** + * Skip the first {$count} items. + * + * @param int $count + * @return static + */ + public function skip($count) + { + return new static(function () use ($count) { + $iterator = $this->getIterator(); + + while ($iterator->valid() && $count--) { + $iterator->next(); + } + + while ($iterator->valid()) { + yield $iterator->key() => $iterator->current(); + + $iterator->next(); + } + }); + } + + /** + * Skip items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipUntil($value) + { + $callback = $this->useAsCallable($value) ? $value : $this->equality($value); + + return $this->skipWhile($this->negate($callback)); + } + + /** + * Skip items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function skipWhile($value) + { + $callback = $this->useAsCallable($value) ? $value : $this->equality($value); + + return new static(function () use ($callback) { + $iterator = $this->getIterator(); + + while ($iterator->valid() && $callback($iterator->current(), $iterator->key())) { + $iterator->next(); + } + + while ($iterator->valid()) { + yield $iterator->key() => $iterator->current(); + + $iterator->next(); + } + }); + } + + /** + * Get a slice of items from the enumerable. + * + * @param int $offset + * @param int|null $length + * @return static + */ + public function slice($offset, $length = null) + { + if ($offset < 0 || $length < 0) { + return $this->passthru('slice', func_get_args()); + } + + $instance = $this->skip($offset); + + return is_null($length) ? $instance : $instance->take($length); + } + + /** + * Split a collection into a certain number of groups. + * + * @param int $numberOfGroups + * @return static + */ + public function split($numberOfGroups) + { + return $this->passthru('split', func_get_args()); + } + + /** + * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + * @throws \Illuminate\Support\MultipleItemsFoundException + */ + public function sole($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + return $this + ->when($filter) + ->filter($filter) + ->take(2) + ->collect() + ->sole(); + } + + /** + * Get the first item in the collection but throw an exception if no matching items exist. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return mixed + * + * @throws \Illuminate\Support\ItemNotFoundException + */ + public function firstOrFail($key = null, $operator = null, $value = null) + { + $filter = func_num_args() > 1 + ? $this->operatorForWhere(...func_get_args()) + : $key; + + return $this + ->when($filter) + ->filter($filter) + ->take(1) + ->collect() + ->firstOrFail(); + } + + /** + * Chunk the collection into chunks of the given size. + * + * @param int $size + * @return static + */ + public function chunk($size) + { + if ($size <= 0) { + return static::empty(); + } + + return new static(function () use ($size) { + $iterator = $this->getIterator(); + + while ($iterator->valid()) { + $chunk = []; + + while (true) { + $chunk[$iterator->key()] = $iterator->current(); + + if (count($chunk) < $size) { + $iterator->next(); + + if (! $iterator->valid()) { + break; + } + } else { + break; + } + } + + yield new static($chunk); + + $iterator->next(); + } + }); + } + + /** + * Split a collection into a certain number of groups, and fill the first groups completely. + * + * @param int $numberOfGroups + * @return static + */ + public function splitIn($numberOfGroups) + { + return $this->chunk(ceil($this->count() / $numberOfGroups)); + } + + /** + * Chunk the collection into chunks with a callback. + * + * @param callable $callback + * @return static + */ + public function chunkWhile(callable $callback) + { + return new static(function () use ($callback) { + $iterator = $this->getIterator(); + + $chunk = new Collection; + + if ($iterator->valid()) { + $chunk[$iterator->key()] = $iterator->current(); + + $iterator->next(); + } + + while ($iterator->valid()) { + if (! $callback($iterator->current(), $iterator->key(), $chunk)) { + yield new static($chunk); + + $chunk = new Collection; + } + + $chunk[$iterator->key()] = $iterator->current(); + + $iterator->next(); + } + + if ($chunk->isNotEmpty()) { + yield new static($chunk); + } + }); + } + + /** + * Sort through each item with a callback. + * + * @param callable|null|int $callback + * @return static + */ + public function sort($callback = null) + { + return $this->passthru('sort', func_get_args()); + } + + /** + * Sort items in descending order. + * + * @param int $options + * @return static + */ + public function sortDesc($options = SORT_REGULAR) + { + return $this->passthru('sortDesc', func_get_args()); + } + + /** + * Sort the collection using the given callback. + * + * @param callable|string $callback + * @param int $options + * @param bool $descending + * @return static + */ + public function sortBy($callback, $options = SORT_REGULAR, $descending = false) + { + return $this->passthru('sortBy', func_get_args()); + } + + /** + * Sort the collection in descending order using the given callback. + * + * @param callable|string $callback + * @param int $options + * @return static + */ + public function sortByDesc($callback, $options = SORT_REGULAR) + { + return $this->passthru('sortByDesc', func_get_args()); + } + + /** + * Sort the collection keys. + * + * @param int $options + * @param bool $descending + * @return static + */ + public function sortKeys($options = SORT_REGULAR, $descending = false) + { + return $this->passthru('sortKeys', func_get_args()); + } + + /** + * Sort the collection keys in descending order. + * + * @param int $options + * @return static + */ + public function sortKeysDesc($options = SORT_REGULAR) + { + return $this->passthru('sortKeysDesc', func_get_args()); + } + + /** + * Sort the collection keys using a callback. + * + * @param callable $callback + * @return static + */ + public function sortKeysUsing(callable $callback) + { + return $this->passthru('sortKeysUsing', func_get_args()); + } + + /** + * Take the first or last {$limit} items. + * + * @param int $limit + * @return static + */ + public function take($limit) + { + if ($limit < 0) { + return $this->passthru('take', func_get_args()); + } + + return new static(function () use ($limit) { + $iterator = $this->getIterator(); + + while ($limit--) { + if (! $iterator->valid()) { + break; + } + + yield $iterator->key() => $iterator->current(); + + if ($limit) { + $iterator->next(); + } + } + }); + } + + /** + * Take items in the collection until the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeUntil($value) + { + $callback = $this->useAsCallable($value) ? $value : $this->equality($value); + + return new static(function () use ($callback) { + foreach ($this as $key => $item) { + if ($callback($item, $key)) { + break; + } + + yield $key => $item; + } + }); + } + + /** + * Take items in the collection until a given point in time. + * + * @param \DateTimeInterface $timeout + * @return static + */ + public function takeUntilTimeout(DateTimeInterface $timeout) + { + $timeout = $timeout->getTimestamp(); + + return $this->takeWhile(function () use ($timeout) { + return $this->now() < $timeout; + }); + } + + /** + * Take items in the collection while the given condition is met. + * + * @param mixed $value + * @return static + */ + public function takeWhile($value) + { + $callback = $this->useAsCallable($value) ? $value : $this->equality($value); + + return $this->takeUntil(function ($item, $key) use ($callback) { + return ! $callback($item, $key); + }); + } + + /** + * Pass each item in the collection to the given callback, lazily. + * + * @param callable $callback + * @return static + */ + public function tapEach(callable $callback) + { + return new static(function () use ($callback) { + foreach ($this as $key => $value) { + $callback($value, $key); + + yield $key => $value; + } + }); + } + + /** + * Convert a flatten "dot" notation array into an expanded array. + * + * @return static + */ + public function undot() + { + return $this->passthru('undot', []); + } + + /** + * Return only unique items from the collection array. + * + * @param string|callable|null $key + * @param bool $strict + * @return static + */ + public function unique($key = null, $strict = false) + { + $callback = $this->valueRetriever($key); + + return new static(function () use ($callback, $strict) { + $exists = []; + + foreach ($this as $key => $item) { + if (! in_array($id = $callback($item, $key), $exists, $strict)) { + yield $key => $item; + + $exists[] = $id; + } + } + }); + } + + /** + * Reset the keys on the underlying array. + * + * @return static + */ + public function values() + { + return new static(function () { + foreach ($this as $item) { + yield $item; + } + }); + } + + /** + * Zip the collection together with one or more arrays. + * + * e.g. new LazyCollection([1, 2, 3])->zip([4, 5, 6]); + * => [[1, 4], [2, 5], [3, 6]] + * + * @param mixed ...$items + * @return static + */ + public function zip($items) + { + $iterables = func_get_args(); + + return new static(function () use ($iterables) { + $iterators = Collection::make($iterables)->map(function ($iterable) { + return $this->makeIterator($iterable); + })->prepend($this->getIterator()); + + while ($iterators->contains->valid()) { + yield new static($iterators->map->current()); + + $iterators->each->next(); + } + }); + } + + /** + * Pad collection to the specified length with a value. + * + * @param int $size + * @param mixed $value + * @return static + */ + public function pad($size, $value) + { + if ($size < 0) { + return $this->passthru('pad', func_get_args()); + } + + return new static(function () use ($size, $value) { + $yielded = 0; + + foreach ($this as $index => $item) { + yield $index => $item; + + $yielded++; + } + + while ($yielded++ < $size) { + yield $value; + } + }); + } + + /** + * Get the values iterator. + * + * @return \Traversable + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return $this->makeIterator($this->source); + } + + /** + * Count the number of items in the collection. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + if (is_array($this->source)) { + return count($this->source); + } + + return iterator_count($this->getIterator()); + } + + /** + * Make an iterator from the given source. + * + * @param mixed $source + * @return \Traversable + */ + protected function makeIterator($source) + { + if ($source instanceof IteratorAggregate) { + return $source->getIterator(); + } + + if (is_array($source)) { + return new ArrayIterator($source); + } + + return $source(); + } + + /** + * Explode the "value" and "key" arguments passed to "pluck". + * + * @param string|array $value + * @param string|array|null $key + * @return array + */ + protected function explodePluckParameters($value, $key) + { + $value = is_string($value) ? explode('.', $value) : $value; + + $key = is_null($key) || is_array($key) ? $key : explode('.', $key); + + return [$value, $key]; + } + + /** + * Pass this lazy collection through a method on the collection class. + * + * @param string $method + * @param array $params + * @return static + */ + protected function passthru($method, array $params) + { + return new static(function () use ($method, $params) { + yield from $this->collect()->$method(...$params); + }); + } + + /** + * Get the current time. + * + * @return int + */ + protected function now() + { + return time(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/MultipleItemsFoundException.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/MultipleItemsFoundException.php new file mode 100644 index 00000000000..944b2dc6413 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/MultipleItemsFoundException.php @@ -0,0 +1,9 @@ +all() : $value; + } + + /** + * Create a new instance with no items. + * + * @return static + */ + public static function empty() + { + return new static([]); + } + + /** + * Create a new collection by invoking the callback a given amount of times. + * + * @param int $number + * @param callable|null $callback + * @return static + */ + public static function times($number, callable $callback = null) + { + if ($number < 1) { + return new static; + } + + return static::range(1, $number) + ->when($callback) + ->map($callback); + } + + /** + * Alias for the "avg" method. + * + * @param callable|string|null $callback + * @return mixed + */ + public function average($callback = null) + { + return $this->avg($callback); + } + + /** + * Alias for the "contains" method. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function some($key, $operator = null, $value = null) + { + return $this->contains(...func_get_args()); + } + + /** + * Determine if an item exists, using strict comparison. + * + * @param mixed $key + * @param mixed $value + * @return bool + */ + public function containsStrict($key, $value = null) + { + if (func_num_args() === 2) { + return $this->contains(function ($item) use ($key, $value) { + return data_get($item, $key) === $value; + }); + } + + if ($this->useAsCallable($key)) { + return ! is_null($this->first($key)); + } + + foreach ($this as $item) { + if ($item === $key) { + return true; + } + } + + return false; + } + + /** + * Dump the items and end the script. + * + * @param mixed ...$args + * @return void + */ + public function dd(...$args) + { + $this->dump(...$args); + + exit(1); + } + + /** + * Dump the items. + * + * @return $this + */ + public function dump() + { + (new Collection(func_get_args())) + ->push($this->all()) + ->each(function ($item) { + VarDumper::dump($item); + }); + + return $this; + } + + /** + * Execute a callback over each item. + * + * @param callable $callback + * @return $this + */ + public function each(callable $callback) + { + foreach ($this as $key => $item) { + if ($callback($item, $key) === false) { + break; + } + } + + return $this; + } + + /** + * Execute a callback over each nested chunk of items. + * + * @param callable $callback + * @return static + */ + public function eachSpread(callable $callback) + { + return $this->each(function ($chunk, $key) use ($callback) { + $chunk[] = $key; + + return $callback(...$chunk); + }); + } + + /** + * Determine if all items pass the given truth test. + * + * @param string|callable $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function every($key, $operator = null, $value = null) + { + if (func_num_args() === 1) { + $callback = $this->valueRetriever($key); + + foreach ($this as $k => $v) { + if (! $callback($v, $k)) { + return false; + } + } + + return true; + } + + return $this->every($this->operatorForWhere(...func_get_args())); + } + + /** + * Get the first item by the given key value pair. + * + * @param string $key + * @param mixed $operator + * @param mixed $value + * @return mixed + */ + public function firstWhere($key, $operator = null, $value = null) + { + return $this->first($this->operatorForWhere(...func_get_args())); + } + + /** + * Determine if the collection is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return ! $this->isEmpty(); + } + + /** + * Run a map over each nested chunk of items. + * + * @param callable $callback + * @return static + */ + public function mapSpread(callable $callback) + { + return $this->map(function ($chunk, $key) use ($callback) { + $chunk[] = $key; + + return $callback(...$chunk); + }); + } + + /** + * Run a grouping map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapToGroups(callable $callback) + { + $groups = $this->mapToDictionary($callback); + + return $groups->map([$this, 'make']); + } + + /** + * Map a collection and flatten the result by a single level. + * + * @param callable $callback + * @return static + */ + public function flatMap(callable $callback) + { + return $this->map($callback)->collapse(); + } + + /** + * Map the values into a new class. + * + * @param string $class + * @return static + */ + public function mapInto($class) + { + return $this->map(function ($value, $key) use ($class) { + return new $class($value, $key); + }); + } + + /** + * Get the min value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function min($callback = null) + { + $callback = $this->valueRetriever($callback); + + return $this->map(function ($value) use ($callback) { + return $callback($value); + })->filter(function ($value) { + return ! is_null($value); + })->reduce(function ($result, $value) { + return is_null($result) || $value < $result ? $value : $result; + }); + } + + /** + * Get the max value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function max($callback = null) + { + $callback = $this->valueRetriever($callback); + + return $this->filter(function ($value) { + return ! is_null($value); + })->reduce(function ($result, $item) use ($callback) { + $value = $callback($item); + + return is_null($result) || $value > $result ? $value : $result; + }); + } + + /** + * "Paginate" the collection by slicing it into a smaller collection. + * + * @param int $page + * @param int $perPage + * @return static + */ + public function forPage($page, $perPage) + { + $offset = max(0, ($page - 1) * $perPage); + + return $this->slice($offset, $perPage); + } + + /** + * Partition the collection into two arrays using the given callback or key. + * + * @param callable|string $key + * @param mixed $operator + * @param mixed $value + * @return static + */ + public function partition($key, $operator = null, $value = null) + { + $passed = []; + $failed = []; + + $callback = func_num_args() === 1 + ? $this->valueRetriever($key) + : $this->operatorForWhere(...func_get_args()); + + foreach ($this as $key => $item) { + if ($callback($item, $key)) { + $passed[$key] = $item; + } else { + $failed[$key] = $item; + } + } + + return new static([new static($passed), new static($failed)]); + } + + /** + * Get the sum of the given values. + * + * @param callable|string|null $callback + * @return mixed + */ + public function sum($callback = null) + { + $callback = is_null($callback) + ? $this->identity() + : $this->valueRetriever($callback); + + return $this->reduce(function ($result, $item) use ($callback) { + return $result + $callback($item); + }, 0); + } + + /** + * Apply the callback if the value is truthy. + * + * @param bool|mixed $value + * @param callable|null $callback + * @param callable|null $default + * @return static|mixed + */ + public function when($value, callable $callback = null, callable $default = null) + { + if (! $callback) { + return new HigherOrderWhenProxy($this, $value); + } + + if ($value) { + return $callback($this, $value); + } elseif ($default) { + return $default($this, $value); + } + + return $this; + } + + /** + * Apply the callback if the collection is empty. + * + * @param callable $callback + * @param callable|null $default + * @return static|mixed + */ + public function whenEmpty(callable $callback, callable $default = null) + { + return $this->when($this->isEmpty(), $callback, $default); + } + + /** + * Apply the callback if the collection is not empty. + * + * @param callable $callback + * @param callable|null $default + * @return static|mixed + */ + public function whenNotEmpty(callable $callback, callable $default = null) + { + return $this->when($this->isNotEmpty(), $callback, $default); + } + + /** + * Apply the callback if the value is falsy. + * + * @param bool $value + * @param callable $callback + * @param callable|null $default + * @return static|mixed + */ + public function unless($value, callable $callback, callable $default = null) + { + return $this->when(! $value, $callback, $default); + } + + /** + * Apply the callback unless the collection is empty. + * + * @param callable $callback + * @param callable|null $default + * @return static|mixed + */ + public function unlessEmpty(callable $callback, callable $default = null) + { + return $this->whenNotEmpty($callback, $default); + } + + /** + * Apply the callback unless the collection is not empty. + * + * @param callable $callback + * @param callable|null $default + * @return static|mixed + */ + public function unlessNotEmpty(callable $callback, callable $default = null) + { + return $this->whenEmpty($callback, $default); + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $operator + * @param mixed $value + * @return static + */ + public function where($key, $operator = null, $value = null) + { + return $this->filter($this->operatorForWhere(...func_get_args())); + } + + /** + * Filter items where the value for the given key is null. + * + * @param string|null $key + * @return static + */ + public function whereNull($key = null) + { + return $this->whereStrict($key, null); + } + + /** + * Filter items where the value for the given key is not null. + * + * @param string|null $key + * @return static + */ + public function whereNotNull($key = null) + { + return $this->where($key, '!==', null); + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $value + * @return static + */ + public function whereStrict($key, $value) + { + return $this->where($key, '===', $value); + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $values + * @param bool $strict + * @return static + */ + public function whereIn($key, $values, $strict = false) + { + $values = $this->getArrayableItems($values); + + return $this->filter(function ($item) use ($key, $values, $strict) { + return in_array(data_get($item, $key), $values, $strict); + }); + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $values + * @return static + */ + public function whereInStrict($key, $values) + { + return $this->whereIn($key, $values, true); + } + + /** + * Filter items such that the value of the given key is between the given values. + * + * @param string $key + * @param array $values + * @return static + */ + public function whereBetween($key, $values) + { + return $this->where($key, '>=', reset($values))->where($key, '<=', end($values)); + } + + /** + * Filter items such that the value of the given key is not between the given values. + * + * @param string $key + * @param array $values + * @return static + */ + public function whereNotBetween($key, $values) + { + return $this->filter(function ($item) use ($key, $values) { + return data_get($item, $key) < reset($values) || data_get($item, $key) > end($values); + }); + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $values + * @param bool $strict + * @return static + */ + public function whereNotIn($key, $values, $strict = false) + { + $values = $this->getArrayableItems($values); + + return $this->reject(function ($item) use ($key, $values, $strict) { + return in_array(data_get($item, $key), $values, $strict); + }); + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $values + * @return static + */ + public function whereNotInStrict($key, $values) + { + return $this->whereNotIn($key, $values, true); + } + + /** + * Filter the items, removing any items that don't match the given type(s). + * + * @param string|string[] $type + * @return static + */ + public function whereInstanceOf($type) + { + return $this->filter(function ($value) use ($type) { + if (is_array($type)) { + foreach ($type as $classType) { + if ($value instanceof $classType) { + return true; + } + } + + return false; + } + + return $value instanceof $type; + }); + } + + /** + * Pass the collection to the given callback and return the result. + * + * @param callable $callback + * @return mixed + */ + public function pipe(callable $callback) + { + return $callback($this); + } + + /** + * Pass the collection into a new class. + * + * @param string $class + * @return mixed + */ + public function pipeInto($class) + { + return new $class($this); + } + + /** + * Pass the collection through a series of callable pipes and return the result. + * + * @param array $pipes + * @return mixed + */ + public function pipeThrough($pipes) + { + return static::make($pipes)->reduce( + function ($carry, $pipe) { + return $pipe($carry); + }, + $this, + ); + } + + /** + * Pass the collection to the given callback and then return it. + * + * @param callable $callback + * @return $this + */ + public function tap(callable $callback) + { + $callback(clone $this); + + return $this; + } + + /** + * Reduce the collection to a single value. + * + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduce(callable $callback, $initial = null) + { + $result = $initial; + + foreach ($this as $key => $value) { + $result = $callback($result, $value, $key); + } + + return $result; + } + + /** + * Reduce the collection to multiple aggregate values. + * + * @param callable $callback + * @param mixed ...$initial + * @return array + * + * @deprecated Use "reduceSpread" instead + * + * @throws \UnexpectedValueException + */ + public function reduceMany(callable $callback, ...$initial) + { + return $this->reduceSpread($callback, ...$initial); + } + + /** + * Reduce the collection to multiple aggregate values. + * + * @param callable $callback + * @param mixed ...$initial + * @return array + * + * @throws \UnexpectedValueException + */ + public function reduceSpread(callable $callback, ...$initial) + { + $result = $initial; + + foreach ($this as $key => $value) { + $result = call_user_func_array($callback, array_merge($result, [$value, $key])); + + if (! is_array($result)) { + throw new UnexpectedValueException(sprintf( + "%s::reduceMany expects reducer to return an array, but got a '%s' instead.", + class_basename(static::class), gettype($result) + )); + } + } + + return $result; + } + + /** + * Reduce an associative collection to a single value. + * + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduceWithKeys(callable $callback, $initial = null) + { + return $this->reduce($callback, $initial); + } + + /** + * Create a collection of all elements that do not pass a given truth test. + * + * @param callable|mixed $callback + * @return static + */ + public function reject($callback = true) + { + $useAsCallable = $this->useAsCallable($callback); + + return $this->filter(function ($value, $key) use ($callback, $useAsCallable) { + return $useAsCallable + ? ! $callback($value, $key) + : $value != $callback; + }); + } + + /** + * Return only unique items from the collection array using strict comparison. + * + * @param string|callable|null $key + * @return static + */ + public function uniqueStrict($key = null) + { + return $this->unique($key, true); + } + + /** + * Collect the values into a collection. + * + * @return \Illuminate\Support\Collection + */ + public function collect() + { + return new Collection($this->all()); + } + + /** + * Get the collection of items as a plain array. + * + * @return array + */ + public function toArray() + { + return $this->map(function ($value) { + return $value instanceof Arrayable ? $value->toArray() : $value; + })->all(); + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return array_map(function ($value) { + if ($value instanceof JsonSerializable) { + return $value->jsonSerialize(); + } elseif ($value instanceof Jsonable) { + return json_decode($value->toJson(), true); + } elseif ($value instanceof Arrayable) { + return $value->toArray(); + } + + return $value; + }, $this->all()); + } + + /** + * Get the collection of items as JSON. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Get a CachingIterator instance. + * + * @param int $flags + * @return \CachingIterator + */ + public function getCachingIterator($flags = CachingIterator::CALL_TOSTRING) + { + return new CachingIterator($this->getIterator(), $flags); + } + + /** + * Convert the collection to its string representation. + * + * @return string + */ + public function __toString() + { + return $this->escapeWhenCastingToString + ? e($this->toJson()) + : $this->toJson(); + } + + /** + * Indicate that the model's string representation should be escaped when __toString is invoked. + * + * @param bool $escape + * @return $this + */ + public function escapeWhenCastingToString($escape = true) + { + $this->escapeWhenCastingToString = $escape; + + return $this; + } + + /** + * Add a method to the list of proxied methods. + * + * @param string $method + * @return void + */ + public static function proxy($method) + { + static::$proxies[] = $method; + } + + /** + * Dynamically access collection proxies. + * + * @param string $key + * @return mixed + * + * @throws \Exception + */ + public function __get($key) + { + if (! in_array($key, static::$proxies)) { + throw new Exception("Property [{$key}] does not exist on this collection instance."); + } + + return new HigherOrderCollectionProxy($this, $key); + } + + /** + * Results array of items from Collection or Arrayable. + * + * @param mixed $items + * @return array + */ + protected function getArrayableItems($items) + { + if (is_array($items)) { + return $items; + } elseif ($items instanceof Enumerable) { + return $items->all(); + } elseif ($items instanceof Arrayable) { + return $items->toArray(); + } elseif ($items instanceof Jsonable) { + return json_decode($items->toJson(), true); + } elseif ($items instanceof JsonSerializable) { + return (array) $items->jsonSerialize(); + } elseif ($items instanceof Traversable) { + return iterator_to_array($items); + } elseif ($items instanceof UnitEnum) { + return [$items]; + } + + return (array) $items; + } + + /** + * Get an operator checker callback. + * + * @param string $key + * @param string|null $operator + * @param mixed $value + * @return \Closure + */ + protected function operatorForWhere($key, $operator = null, $value = null) + { + if (func_num_args() === 1) { + $value = true; + + $operator = '='; + } + + if (func_num_args() === 2) { + $value = $operator; + + $operator = '='; + } + + return function ($item) use ($key, $operator, $value) { + $retrieved = data_get($item, $key); + + $strings = array_filter([$retrieved, $value], function ($value) { + return is_string($value) || (is_object($value) && method_exists($value, '__toString')); + }); + + if (count($strings) < 2 && count(array_filter([$retrieved, $value], 'is_object')) == 1) { + return in_array($operator, ['!=', '<>', '!==']); + } + + switch ($operator) { + default: + case '=': + case '==': return $retrieved == $value; + case '!=': + case '<>': return $retrieved != $value; + case '<': return $retrieved < $value; + case '>': return $retrieved > $value; + case '<=': return $retrieved <= $value; + case '>=': return $retrieved >= $value; + case '===': return $retrieved === $value; + case '!==': return $retrieved !== $value; + } + }; + } + + /** + * Determine if the given value is callable, but not a string. + * + * @param mixed $value + * @return bool + */ + protected function useAsCallable($value) + { + return ! is_string($value) && is_callable($value); + } + + /** + * Get a value retrieving callback. + * + * @param callable|string|null $value + * @return callable + */ + protected function valueRetriever($value) + { + if ($this->useAsCallable($value)) { + return $value; + } + + return function ($item) use ($value) { + return data_get($item, $value); + }; + } + + /** + * Make a function to check an item's equality. + * + * @param mixed $value + * @return \Closure + */ + protected function equality($value) + { + return function ($item) use ($value) { + return $item === $value; + }; + } + + /** + * Make a function using another function, by negating its result. + * + * @param \Closure $callback + * @return \Closure + */ + protected function negate(Closure $callback) + { + return function (...$params) use ($callback) { + return ! $callback(...$params); + }; + } + + /** + * Make a function that returns what's passed to it. + * + * @return \Closure + */ + protected function identity() + { + return function ($value) { + return $value; + }; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/composer.json b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/composer.json new file mode 100644 index 00000000000..ecc45372663 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/composer.json @@ -0,0 +1,41 @@ +{ + "name": "illuminate/collections", + "description": "The Illuminate Collections package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.4)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/helpers.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/helpers.php new file mode 100644 index 00000000000..67669e5ce1c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/collections/helpers.php @@ -0,0 +1,186 @@ + $segment) { + unset($key[$i]); + + if (is_null($segment)) { + return $target; + } + + if ($segment === '*') { + if ($target instanceof Collection) { + $target = $target->all(); + } elseif (! is_array($target)) { + return value($default); + } + + $result = []; + + foreach ($target as $item) { + $result[] = data_get($item, $key); + } + + return in_array('*', $key) ? Arr::collapse($result) : $result; + } + + if (Arr::accessible($target) && Arr::exists($target, $segment)) { + $target = $target[$segment]; + } elseif (is_object($target) && isset($target->{$segment})) { + $target = $target->{$segment}; + } else { + return value($default); + } + } + + return $target; + } +} + +if (! function_exists('data_set')) { + /** + * Set an item on an array or object using dot notation. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @param bool $overwrite + * @return mixed + */ + function data_set(&$target, $key, $value, $overwrite = true) + { + $segments = is_array($key) ? $key : explode('.', $key); + + if (($segment = array_shift($segments)) === '*') { + if (! Arr::accessible($target)) { + $target = []; + } + + if ($segments) { + foreach ($target as &$inner) { + data_set($inner, $segments, $value, $overwrite); + } + } elseif ($overwrite) { + foreach ($target as &$inner) { + $inner = $value; + } + } + } elseif (Arr::accessible($target)) { + if ($segments) { + if (! Arr::exists($target, $segment)) { + $target[$segment] = []; + } + + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite || ! Arr::exists($target, $segment)) { + $target[$segment] = $value; + } + } elseif (is_object($target)) { + if ($segments) { + if (! isset($target->{$segment})) { + $target->{$segment} = []; + } + + data_set($target->{$segment}, $segments, $value, $overwrite); + } elseif ($overwrite || ! isset($target->{$segment})) { + $target->{$segment} = $value; + } + } else { + $target = []; + + if ($segments) { + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite) { + $target[$segment] = $value; + } + } + + return $target; + } +} + +if (! function_exists('head')) { + /** + * Get the first element of an array. Useful for method chaining. + * + * @param array $array + * @return mixed + */ + function head($array) + { + return reset($array); + } +} + +if (! function_exists('last')) { + /** + * Get the last element from an array. + * + * @param array $array + * @return mixed + */ + function last($array) + { + return end($array); + } +} + +if (! function_exists('value')) { + /** + * Return the default value of the given value. + * + * @param mixed $value + * @return mixed + */ + function value($value, ...$args) + { + return $value instanceof Closure ? $value(...$args) : $value; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Auth/Access/Authorizable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Auth/Access/Authorizable.php new file mode 100644 index 00000000000..cedeb6ea344 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Auth/Access/Authorizable.php @@ -0,0 +1,15 @@ +id = $id; + $this->class = $class; + $this->relations = $relations; + $this->connection = $connection; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Debug/ExceptionHandler.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Debug/ExceptionHandler.php new file mode 100644 index 00000000000..54381a179af --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/contracts/Debug/ExceptionHandler.php @@ -0,0 +1,46 @@ +getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + if ($replace || ! static::hasMacro($method->name)) { + $method->setAccessible(true); + static::macro($method->name, $method->invoke($mixin)); + } + } + } + + /** + * Checks if macro is registered. + * + * @param string $name + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Flush the existing macros. + * + * @return void + */ + public static function flushMacros() + { + static::$macros = []; + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public static function __callStatic($method, $parameters) + { + if (! static::hasMacro($method)) { + throw new BadMethodCallException(sprintf( + 'Method %s::%s does not exist.', static::class, $method + )); + } + + $macro = static::$macros[$method]; + + if ($macro instanceof Closure) { + $macro = $macro->bindTo(null, static::class); + } + + return $macro(...$parameters); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (! static::hasMacro($method)) { + throw new BadMethodCallException(sprintf( + 'Method %s::%s does not exist.', static::class, $method + )); + } + + $macro = static::$macros[$method]; + + if ($macro instanceof Closure) { + $macro = $macro->bindTo($this, static::class); + } + + return $macro(...$parameters); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/macroable/composer.json b/htdocs/includes/webklex/php-imap/vendor/illuminate/macroable/composer.json new file mode 100644 index 00000000000..dfa5c62be19 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/macroable/composer.json @@ -0,0 +1,33 @@ +{ + "name": "illuminate/macroable", + "description": "The Illuminate Macroable package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractCursorPaginator.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractCursorPaginator.php new file mode 100644 index 00000000000..12344850b95 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractCursorPaginator.php @@ -0,0 +1,676 @@ +cursorName => $cursor->encode()]; + + if (count($this->query) > 0) { + $parameters = array_merge($this->query, $parameters); + } + + return $this->path() + .(Str::contains($this->path(), '?') ? '&' : '?') + .Arr::query($parameters) + .$this->buildFragment(); + } + + /** + * Get the URL for the previous page. + * + * @return string|null + */ + public function previousPageUrl() + { + if (is_null($previousCursor = $this->previousCursor())) { + return null; + } + + return $this->url($previousCursor); + } + + /** + * The URL for the next page, or null. + * + * @return string|null + */ + public function nextPageUrl() + { + if (is_null($nextCursor = $this->nextCursor())) { + return null; + } + + return $this->url($nextCursor); + } + + /** + * Get the "cursor" that points to the previous set of items. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function previousCursor() + { + if (is_null($this->cursor) || + ($this->cursor->pointsToPreviousItems() && ! $this->hasMore)) { + return null; + } + + if ($this->items->isEmpty()) { + return null; + } + + return $this->getCursorForItem($this->items->first(), false); + } + + /** + * Get the "cursor" that points to the next set of items. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function nextCursor() + { + if ((is_null($this->cursor) && ! $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToNextItems() && ! $this->hasMore)) { + return null; + } + + if ($this->items->isEmpty()) { + return null; + } + + return $this->getCursorForItem($this->items->last(), true); + } + + /** + * Get a cursor instance for the given item. + * + * @param \ArrayAccess|\stdClass $item + * @param bool $isNext + * @return \Illuminate\Pagination\Cursor + */ + public function getCursorForItem($item, $isNext = true) + { + return new Cursor($this->getParametersForItem($item), $isNext); + } + + /** + * Get the cursor parameters for a given object. + * + * @param \ArrayAccess|\stdClass $item + * @return array + * + * @throws \Exception + */ + public function getParametersForItem($item) + { + return collect($this->parameters) + ->flip() + ->map(function ($_, $parameterName) use ($item) { + if ($item instanceof JsonResource) { + $item = $item->resource; + } + + if ($item instanceof Model && + ! is_null($parameter = $this->getPivotParameterForItem($item, $parameterName))) { + return $parameter; + } elseif ($item instanceof ArrayAccess || is_array($item)) { + return $this->ensureParameterIsPrimitive( + $item[$parameterName] ?? $item[Str::afterLast($parameterName, '.')] + ); + } elseif (is_object($item)) { + return $this->ensureParameterIsPrimitive( + $item->{$parameterName} ?? $item->{Str::afterLast($parameterName, '.')} + ); + } + + throw new Exception('Only arrays and objects are supported when cursor paginating items.'); + })->toArray(); + } + + /** + * Get the cursor parameter value from a pivot model if applicable. + * + * @param \ArrayAccess|\stdClass $item + * @param string $parameterName + * @return string|null + */ + protected function getPivotParameterForItem($item, $parameterName) + { + $table = Str::beforeLast($parameterName, '.'); + + foreach ($item->getRelations() as $relation) { + if ($relation instanceof Pivot && $relation->getTable() === $table) { + return $this->ensureParameterIsPrimitive( + $relation->getAttribute(Str::afterLast($parameterName, '.')) + ); + } + } + } + + /** + * Ensure the parameter is a primitive type. + * + * This can resolve issues that arise the developer uses a value object for an attribute. + * + * @param mixed $parameter + * @return mixed + */ + protected function ensureParameterIsPrimitive($parameter) + { + return is_object($parameter) && method_exists($parameter, '__toString') + ? (string) $parameter + : $parameter; + } + + /** + * Get / set the URL fragment to be appended to URLs. + * + * @param string|null $fragment + * @return $this|string|null + */ + public function fragment($fragment = null) + { + if (is_null($fragment)) { + return $this->fragment; + } + + $this->fragment = $fragment; + + return $this; + } + + /** + * Add a set of query string values to the paginator. + * + * @param array|string|null $key + * @param string|null $value + * @return $this + */ + public function appends($key, $value = null) + { + if (is_null($key)) { + return $this; + } + + if (is_array($key)) { + return $this->appendArray($key); + } + + return $this->addQuery($key, $value); + } + + /** + * Add an array of query string values. + * + * @param array $keys + * @return $this + */ + protected function appendArray(array $keys) + { + foreach ($keys as $key => $value) { + $this->addQuery($key, $value); + } + + return $this; + } + + /** + * Add all current query string values to the paginator. + * + * @return $this + */ + public function withQueryString() + { + if (! is_null($query = Paginator::resolveQueryString())) { + return $this->appends($query); + } + + return $this; + } + + /** + * Add a query string value to the paginator. + * + * @param string $key + * @param string $value + * @return $this + */ + protected function addQuery($key, $value) + { + if ($key !== $this->cursorName) { + $this->query[$key] = $value; + } + + return $this; + } + + /** + * Build the full fragment portion of a URL. + * + * @return string + */ + protected function buildFragment() + { + return $this->fragment ? '#'.$this->fragment : ''; + } + + /** + * Load a set of relationships onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorph($relation, $relations) + { + $this->getCollection()->loadMorph($relation, $relations); + + return $this; + } + + /** + * Load a set of relationship counts onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorphCount($relation, $relations) + { + $this->getCollection()->loadMorphCount($relation, $relations); + + return $this; + } + + /** + * Get the slice of items being paginated. + * + * @return array + */ + public function items() + { + return $this->items->all(); + } + + /** + * Transform each item in the slice of items using a callback. + * + * @param callable $callback + * @return $this + */ + public function through(callable $callback) + { + $this->items->transform($callback); + + return $this; + } + + /** + * Get the number of items shown per page. + * + * @return int + */ + public function perPage() + { + return $this->perPage; + } + + /** + * Get the current cursor being paginated. + * + * @return \Illuminate\Pagination\Cursor|null + */ + public function cursor() + { + return $this->cursor; + } + + /** + * Get the query string variable used to store the cursor. + * + * @return string + */ + public function getCursorName() + { + return $this->cursorName; + } + + /** + * Set the query string variable used to store the cursor. + * + * @param string $name + * @return $this + */ + public function setCursorName($name) + { + $this->cursorName = $name; + + return $this; + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function withPath($path) + { + return $this->setPath($path); + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function setPath($path) + { + $this->path = $path; + + return $this; + } + + /** + * Get the base path for paginator generated URLs. + * + * @return string|null + */ + public function path() + { + return $this->path; + } + + /** + * Resolve the current cursor or return the default value. + * + * @param string $cursorName + * @return \Illuminate\Pagination\Cursor|null + */ + public static function resolveCurrentCursor($cursorName = 'cursor', $default = null) + { + if (isset(static::$currentCursorResolver)) { + return call_user_func(static::$currentCursorResolver, $cursorName); + } + + return $default; + } + + /** + * Set the current cursor resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentCursorResolver(Closure $resolver) + { + static::$currentCursorResolver = $resolver; + } + + /** + * Get an instance of the view factory from the resolver. + * + * @return \Illuminate\Contracts\View\Factory + */ + public static function viewFactory() + { + return Paginator::viewFactory(); + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return $this->items->getIterator(); + } + + /** + * Determine if the list of items is empty. + * + * @return bool + */ + public function isEmpty() + { + return $this->items->isEmpty(); + } + + /** + * Determine if the list of items is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return $this->items->isNotEmpty(); + } + + /** + * Get the number of items for the current page. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return $this->items->count(); + } + + /** + * Get the paginator's underlying collection. + * + * @return \Illuminate\Support\Collection + */ + public function getCollection() + { + return $this->items; + } + + /** + * Set the paginator's underlying collection. + * + * @param \Illuminate\Support\Collection $collection + * @return $this + */ + public function setCollection(Collection $collection) + { + $this->items = $collection; + + return $this; + } + + /** + * Get the paginator options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Determine if the given item exists. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return $this->items->has($key); + } + + /** + * Get the item at the given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return $this->items->get($key); + } + + /** + * Set the item at the given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + $this->items->put($key, $value); + } + + /** + * Unset the item at the given key. + * + * @param mixed $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + $this->items->forget($key); + } + + /** + * Render the contents of the paginator to HTML. + * + * @return string + */ + public function toHtml() + { + return (string) $this->render(); + } + + /** + * Make dynamic calls into the collection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->forwardCallTo($this->getCollection(), $method, $parameters); + } + + /** + * Render the contents of the paginator when casting to a string. + * + * @return string + */ + public function __toString() + { + return (string) $this->render(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractPaginator.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractPaginator.php new file mode 100644 index 00000000000..ac9ef403503 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/AbstractPaginator.php @@ -0,0 +1,782 @@ += 1 && filter_var($page, FILTER_VALIDATE_INT) !== false; + } + + /** + * Get the URL for the previous page. + * + * @return string|null + */ + public function previousPageUrl() + { + if ($this->currentPage() > 1) { + return $this->url($this->currentPage() - 1); + } + } + + /** + * Create a range of pagination URLs. + * + * @param int $start + * @param int $end + * @return array + */ + public function getUrlRange($start, $end) + { + return collect(range($start, $end))->mapWithKeys(function ($page) { + return [$page => $this->url($page)]; + })->all(); + } + + /** + * Get the URL for a given page number. + * + * @param int $page + * @return string + */ + public function url($page) + { + if ($page <= 0) { + $page = 1; + } + + // If we have any extra query string key / value pairs that need to be added + // onto the URL, we will put them in query string form and then attach it + // to the URL. This allows for extra information like sortings storage. + $parameters = [$this->pageName => $page]; + + if (count($this->query) > 0) { + $parameters = array_merge($this->query, $parameters); + } + + return $this->path() + .(Str::contains($this->path(), '?') ? '&' : '?') + .Arr::query($parameters) + .$this->buildFragment(); + } + + /** + * Get / set the URL fragment to be appended to URLs. + * + * @param string|null $fragment + * @return $this|string|null + */ + public function fragment($fragment = null) + { + if (is_null($fragment)) { + return $this->fragment; + } + + $this->fragment = $fragment; + + return $this; + } + + /** + * Add a set of query string values to the paginator. + * + * @param array|string|null $key + * @param string|null $value + * @return $this + */ + public function appends($key, $value = null) + { + if (is_null($key)) { + return $this; + } + + if (is_array($key)) { + return $this->appendArray($key); + } + + return $this->addQuery($key, $value); + } + + /** + * Add an array of query string values. + * + * @param array $keys + * @return $this + */ + protected function appendArray(array $keys) + { + foreach ($keys as $key => $value) { + $this->addQuery($key, $value); + } + + return $this; + } + + /** + * Add all current query string values to the paginator. + * + * @return $this + */ + public function withQueryString() + { + if (isset(static::$queryStringResolver)) { + return $this->appends(call_user_func(static::$queryStringResolver)); + } + + return $this; + } + + /** + * Add a query string value to the paginator. + * + * @param string $key + * @param string $value + * @return $this + */ + protected function addQuery($key, $value) + { + if ($key !== $this->pageName) { + $this->query[$key] = $value; + } + + return $this; + } + + /** + * Build the full fragment portion of a URL. + * + * @return string + */ + protected function buildFragment() + { + return $this->fragment ? '#'.$this->fragment : ''; + } + + /** + * Load a set of relationships onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorph($relation, $relations) + { + $this->getCollection()->loadMorph($relation, $relations); + + return $this; + } + + /** + * Load a set of relationship counts onto the mixed relationship collection. + * + * @param string $relation + * @param array $relations + * @return $this + */ + public function loadMorphCount($relation, $relations) + { + $this->getCollection()->loadMorphCount($relation, $relations); + + return $this; + } + + /** + * Get the slice of items being paginated. + * + * @return array + */ + public function items() + { + return $this->items->all(); + } + + /** + * Get the number of the first item in the slice. + * + * @return int + */ + public function firstItem() + { + return count($this->items) > 0 ? ($this->currentPage - 1) * $this->perPage + 1 : null; + } + + /** + * Get the number of the last item in the slice. + * + * @return int + */ + public function lastItem() + { + return count($this->items) > 0 ? $this->firstItem() + $this->count() - 1 : null; + } + + /** + * Transform each item in the slice of items using a callback. + * + * @param callable $callback + * @return $this + */ + public function through(callable $callback) + { + $this->items->transform($callback); + + return $this; + } + + /** + * Get the number of items shown per page. + * + * @return int + */ + public function perPage() + { + return $this->perPage; + } + + /** + * Determine if there are enough items to split into multiple pages. + * + * @return bool + */ + public function hasPages() + { + return $this->currentPage() != 1 || $this->hasMorePages(); + } + + /** + * Determine if the paginator is on the first page. + * + * @return bool + */ + public function onFirstPage() + { + return $this->currentPage() <= 1; + } + + /** + * Determine if the paginator is on the last page. + * + * @return bool + */ + public function onLastPage() + { + return ! $this->hasMorePages(); + } + + /** + * Get the current page. + * + * @return int + */ + public function currentPage() + { + return $this->currentPage; + } + + /** + * Get the query string variable used to store the page. + * + * @return string + */ + public function getPageName() + { + return $this->pageName; + } + + /** + * Set the query string variable used to store the page. + * + * @param string $name + * @return $this + */ + public function setPageName($name) + { + $this->pageName = $name; + + return $this; + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function withPath($path) + { + return $this->setPath($path); + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function setPath($path) + { + $this->path = $path; + + return $this; + } + + /** + * Set the number of links to display on each side of current page link. + * + * @param int $count + * @return $this + */ + public function onEachSide($count) + { + $this->onEachSide = $count; + + return $this; + } + + /** + * Get the base path for paginator generated URLs. + * + * @return string|null + */ + public function path() + { + return $this->path; + } + + /** + * Resolve the current request path or return the default value. + * + * @param string $default + * @return string + */ + public static function resolveCurrentPath($default = '/') + { + if (isset(static::$currentPathResolver)) { + return call_user_func(static::$currentPathResolver); + } + + return $default; + } + + /** + * Set the current request path resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentPathResolver(Closure $resolver) + { + static::$currentPathResolver = $resolver; + } + + /** + * Resolve the current page or return the default value. + * + * @param string $pageName + * @param int $default + * @return int + */ + public static function resolveCurrentPage($pageName = 'page', $default = 1) + { + if (isset(static::$currentPageResolver)) { + return (int) call_user_func(static::$currentPageResolver, $pageName); + } + + return $default; + } + + /** + * Set the current page resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentPageResolver(Closure $resolver) + { + static::$currentPageResolver = $resolver; + } + + /** + * Resolve the query string or return the default value. + * + * @param string|array|null $default + * @return string + */ + public static function resolveQueryString($default = null) + { + if (isset(static::$queryStringResolver)) { + return (static::$queryStringResolver)(); + } + + return $default; + } + + /** + * Set with query string resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function queryStringResolver(Closure $resolver) + { + static::$queryStringResolver = $resolver; + } + + /** + * Get an instance of the view factory from the resolver. + * + * @return \Illuminate\Contracts\View\Factory + */ + public static function viewFactory() + { + return call_user_func(static::$viewFactoryResolver); + } + + /** + * Set the view factory resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function viewFactoryResolver(Closure $resolver) + { + static::$viewFactoryResolver = $resolver; + } + + /** + * Set the default pagination view. + * + * @param string $view + * @return void + */ + public static function defaultView($view) + { + static::$defaultView = $view; + } + + /** + * Set the default "simple" pagination view. + * + * @param string $view + * @return void + */ + public static function defaultSimpleView($view) + { + static::$defaultSimpleView = $view; + } + + /** + * Indicate that Tailwind styling should be used for generated links. + * + * @return void + */ + public static function useTailwind() + { + static::defaultView('pagination::tailwind'); + static::defaultSimpleView('pagination::simple-tailwind'); + } + + /** + * Indicate that Bootstrap 4 styling should be used for generated links. + * + * @return void + */ + public static function useBootstrap() + { + static::defaultView('pagination::bootstrap-4'); + static::defaultSimpleView('pagination::simple-bootstrap-4'); + } + + /** + * Indicate that Bootstrap 3 styling should be used for generated links. + * + * @return void + */ + public static function useBootstrapThree() + { + static::defaultView('pagination::default'); + static::defaultSimpleView('pagination::simple-default'); + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return $this->items->getIterator(); + } + + /** + * Determine if the list of items is empty. + * + * @return bool + */ + public function isEmpty() + { + return $this->items->isEmpty(); + } + + /** + * Determine if the list of items is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return $this->items->isNotEmpty(); + } + + /** + * Get the number of items for the current page. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return $this->items->count(); + } + + /** + * Get the paginator's underlying collection. + * + * @return \Illuminate\Support\Collection + */ + public function getCollection() + { + return $this->items; + } + + /** + * Set the paginator's underlying collection. + * + * @param \Illuminate\Support\Collection $collection + * @return $this + */ + public function setCollection(Collection $collection) + { + $this->items = $collection; + + return $this; + } + + /** + * Get the paginator options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Determine if the given item exists. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return $this->items->has($key); + } + + /** + * Get the item at the given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return $this->items->get($key); + } + + /** + * Set the item at the given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + $this->items->put($key, $value); + } + + /** + * Unset the item at the given key. + * + * @param mixed $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + $this->items->forget($key); + } + + /** + * Render the contents of the paginator to HTML. + * + * @return string + */ + public function toHtml() + { + return (string) $this->render(); + } + + /** + * Make dynamic calls into the collection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->forwardCallTo($this->getCollection(), $method, $parameters); + } + + /** + * Render the contents of the paginator when casting to a string. + * + * @return string + */ + public function __toString() + { + return (string) $this->render(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Cursor.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Cursor.php new file mode 100644 index 00000000000..e8edf6526bc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Cursor.php @@ -0,0 +1,132 @@ +parameters = $parameters; + $this->pointsToNextItems = $pointsToNextItems; + } + + /** + * Get the given parameter from the cursor. + * + * @param string $parameterName + * @return string|null + * + * @throws \UnexpectedValueException + */ + public function parameter(string $parameterName) + { + if (! array_key_exists($parameterName, $this->parameters)) { + throw new UnexpectedValueException("Unable to find parameter [{$parameterName}] in pagination item."); + } + + return $this->parameters[$parameterName]; + } + + /** + * Get the given parameters from the cursor. + * + * @param array $parameterNames + * @return array + */ + public function parameters(array $parameterNames) + { + return collect($parameterNames)->map(function ($parameterName) { + return $this->parameter($parameterName); + })->toArray(); + } + + /** + * Determine whether the cursor points to the next set of items. + * + * @return bool + */ + public function pointsToNextItems() + { + return $this->pointsToNextItems; + } + + /** + * Determine whether the cursor points to the previous set of items. + * + * @return bool + */ + public function pointsToPreviousItems() + { + return ! $this->pointsToNextItems; + } + + /** + * Get the array representation of the cursor. + * + * @return array + */ + public function toArray() + { + return array_merge($this->parameters, [ + '_pointsToNextItems' => $this->pointsToNextItems, + ]); + } + + /** + * Get the encoded string representation of the cursor to construct a URL. + * + * @return string + */ + public function encode() + { + return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(json_encode($this->toArray()))); + } + + /** + * Get a cursor instance from the encoded string representation. + * + * @param string|null $encodedString + * @return static|null + */ + public static function fromEncoded($encodedString) + { + if (is_null($encodedString) || ! is_string($encodedString)) { + return null; + } + + $parameters = json_decode(base64_decode(str_replace(['-', '_'], ['+', '/'], $encodedString)), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + return null; + } + + $pointsToNextItems = $parameters['_pointsToNextItems']; + + unset($parameters['_pointsToNextItems']); + + return new static($parameters, $pointsToNextItems); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/CursorPaginationException.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/CursorPaginationException.php new file mode 100644 index 00000000000..b12ca607f18 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/CursorPaginationException.php @@ -0,0 +1,13 @@ +options = $options; + + foreach ($options as $key => $value) { + $this->{$key} = $value; + } + + $this->perPage = $perPage; + $this->cursor = $cursor; + $this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path; + + $this->setItems($items); + } + + /** + * Set the items for the paginator. + * + * @param mixed $items + * @return void + */ + protected function setItems($items) + { + $this->items = $items instanceof Collection ? $items : Collection::make($items); + + $this->hasMore = $this->items->count() > $this->perPage; + + $this->items = $this->items->slice(0, $this->perPage); + + if (! is_null($this->cursor) && $this->cursor->pointsToPreviousItems()) { + $this->items = $this->items->reverse()->values(); + } + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function render($view = null, $data = []) + { + return static::viewFactory()->make($view ?: Paginator::$defaultSimpleView, array_merge($data, [ + 'paginator' => $this, + ])); + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return (is_null($this->cursor) && $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToNextItems() && $this->hasMore) || + (! is_null($this->cursor) && $this->cursor->pointsToPreviousItems()); + } + + /** + * Determine if there are enough items to split into multiple pages. + * + * @return bool + */ + public function hasPages() + { + return ! $this->onFirstPage() || $this->hasMorePages(); + } + + /** + * Determine if the paginator is on the first page. + * + * @return bool + */ + public function onFirstPage() + { + return is_null($this->cursor) || ($this->cursor->pointsToPreviousItems() && ! $this->hasMore); + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return [ + 'data' => $this->items->toArray(), + 'path' => $this->path(), + 'per_page' => $this->perPage(), + 'next_page_url' => $this->nextPageUrl(), + 'prev_page_url' => $this->previousPageUrl(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LICENSE.md b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LICENSE.md new file mode 100644 index 00000000000..79810c848f8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LengthAwarePaginator.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LengthAwarePaginator.php new file mode 100644 index 00000000000..24f68b121b8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/LengthAwarePaginator.php @@ -0,0 +1,232 @@ +options = $options; + + foreach ($options as $key => $value) { + $this->{$key} = $value; + } + + $this->total = $total; + $this->perPage = $perPage; + $this->lastPage = max((int) ceil($total / $perPage), 1); + $this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path; + $this->currentPage = $this->setCurrentPage($currentPage, $this->pageName); + $this->items = $items instanceof Collection ? $items : Collection::make($items); + } + + /** + * Get the current page for the request. + * + * @param int $currentPage + * @param string $pageName + * @return int + */ + protected function setCurrentPage($currentPage, $pageName) + { + $currentPage = $currentPage ?: static::resolveCurrentPage($pageName); + + return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1; + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function render($view = null, $data = []) + { + return static::viewFactory()->make($view ?: static::$defaultView, array_merge($data, [ + 'paginator' => $this, + 'elements' => $this->elements(), + ])); + } + + /** + * Get the paginator links as a collection (for JSON responses). + * + * @return \Illuminate\Support\Collection + */ + public function linkCollection() + { + return collect($this->elements())->flatMap(function ($item) { + if (! is_array($item)) { + return [['url' => null, 'label' => '...', 'active' => false]]; + } + + return collect($item)->map(function ($url, $page) { + return [ + 'url' => $url, + 'label' => (string) $page, + 'active' => $this->currentPage() === $page, + ]; + }); + })->prepend([ + 'url' => $this->previousPageUrl(), + 'label' => function_exists('__') ? __('pagination.previous') : 'Previous', + 'active' => false, + ])->push([ + 'url' => $this->nextPageUrl(), + 'label' => function_exists('__') ? __('pagination.next') : 'Next', + 'active' => false, + ]); + } + + /** + * Get the array of elements to pass to the view. + * + * @return array + */ + protected function elements() + { + $window = UrlWindow::make($this); + + return array_filter([ + $window['first'], + is_array($window['slider']) ? '...' : null, + $window['slider'], + is_array($window['last']) ? '...' : null, + $window['last'], + ]); + } + + /** + * Get the total number of items being paginated. + * + * @return int + */ + public function total() + { + return $this->total; + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return $this->currentPage() < $this->lastPage(); + } + + /** + * Get the URL for the next page. + * + * @return string|null + */ + public function nextPageUrl() + { + if ($this->hasMorePages()) { + return $this->url($this->currentPage() + 1); + } + } + + /** + * Get the last page. + * + * @return int + */ + public function lastPage() + { + return $this->lastPage; + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return [ + 'current_page' => $this->currentPage(), + 'data' => $this->items->toArray(), + 'first_page_url' => $this->url(1), + 'from' => $this->firstItem(), + 'last_page' => $this->lastPage(), + 'last_page_url' => $this->url($this->lastPage()), + 'links' => $this->linkCollection()->toArray(), + 'next_page_url' => $this->nextPageUrl(), + 'path' => $this->path(), + 'per_page' => $this->perPage(), + 'prev_page_url' => $this->previousPageUrl(), + 'to' => $this->lastItem(), + 'total' => $this->total(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationServiceProvider.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationServiceProvider.php new file mode 100755 index 00000000000..e94cebd6caf --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationServiceProvider.php @@ -0,0 +1,34 @@ +loadViewsFrom(__DIR__.'/resources/views', 'pagination'); + + if ($this->app->runningInConsole()) { + $this->publishes([ + __DIR__.'/resources/views' => $this->app->resourcePath('views/vendor/pagination'), + ], 'laravel-pagination'); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + PaginationState::resolveUsing($this->app); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationState.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationState.php new file mode 100644 index 00000000000..ff8150ff2a9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/PaginationState.php @@ -0,0 +1,41 @@ +url(); + }); + + Paginator::currentPageResolver(function ($pageName = 'page') use ($app) { + $page = $app['request']->input($pageName); + + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { + return (int) $page; + } + + return 1; + }); + + Paginator::queryStringResolver(function () use ($app) { + return $app['request']->query(); + }); + + CursorPaginator::currentCursorResolver(function ($cursorName = 'cursor') use ($app) { + return Cursor::fromEncoded($app['request']->input($cursorName)); + }); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Paginator.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Paginator.php new file mode 100644 index 00000000000..733edb8e00f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/Paginator.php @@ -0,0 +1,177 @@ +options = $options; + + foreach ($options as $key => $value) { + $this->{$key} = $value; + } + + $this->perPage = $perPage; + $this->currentPage = $this->setCurrentPage($currentPage); + $this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path; + + $this->setItems($items); + } + + /** + * Get the current page for the request. + * + * @param int $currentPage + * @return int + */ + protected function setCurrentPage($currentPage) + { + $currentPage = $currentPage ?: static::resolveCurrentPage(); + + return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1; + } + + /** + * Set the items for the paginator. + * + * @param mixed $items + * @return void + */ + protected function setItems($items) + { + $this->items = $items instanceof Collection ? $items : Collection::make($items); + + $this->hasMore = $this->items->count() > $this->perPage; + + $this->items = $this->items->slice(0, $this->perPage); + } + + /** + * Get the URL for the next page. + * + * @return string|null + */ + public function nextPageUrl() + { + if ($this->hasMorePages()) { + return $this->url($this->currentPage() + 1); + } + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return string + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return \Illuminate\Contracts\Support\Htmlable + */ + public function render($view = null, $data = []) + { + return static::viewFactory()->make($view ?: static::$defaultSimpleView, array_merge($data, [ + 'paginator' => $this, + ])); + } + + /** + * Manually indicate that the paginator does have more pages. + * + * @param bool $hasMore + * @return $this + */ + public function hasMorePagesWhen($hasMore = true) + { + $this->hasMore = $hasMore; + + return $this; + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return $this->hasMore; + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return [ + 'current_page' => $this->currentPage(), + 'data' => $this->items->toArray(), + 'first_page_url' => $this->url(1), + 'from' => $this->firstItem(), + 'next_page_url' => $this->nextPageUrl(), + 'path' => $this->path(), + 'per_page' => $this->perPage(), + 'prev_page_url' => $this->previousPageUrl(), + 'to' => $this->lastItem(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/UrlWindow.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/UrlWindow.php new file mode 100644 index 00000000000..31c7cc2a430 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/UrlWindow.php @@ -0,0 +1,220 @@ +paginator = $paginator; + } + + /** + * Create a new URL window instance. + * + * @param \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator + * @return array + */ + public static function make(PaginatorContract $paginator) + { + return (new static($paginator))->get(); + } + + /** + * Get the window of URLs to be shown. + * + * @return array + */ + public function get() + { + $onEachSide = $this->paginator->onEachSide; + + if ($this->paginator->lastPage() < ($onEachSide * 2) + 8) { + return $this->getSmallSlider(); + } + + return $this->getUrlSlider($onEachSide); + } + + /** + * Get the slider of URLs there are not enough pages to slide. + * + * @return array + */ + protected function getSmallSlider() + { + return [ + 'first' => $this->paginator->getUrlRange(1, $this->lastPage()), + 'slider' => null, + 'last' => null, + ]; + } + + /** + * Create a URL slider links. + * + * @param int $onEachSide + * @return array + */ + protected function getUrlSlider($onEachSide) + { + $window = $onEachSide + 4; + + if (! $this->hasPages()) { + return ['first' => null, 'slider' => null, 'last' => null]; + } + + // If the current page is very close to the beginning of the page range, we will + // just render the beginning of the page range, followed by the last 2 of the + // links in this list, since we will not have room to create a full slider. + if ($this->currentPage() <= $window) { + return $this->getSliderTooCloseToBeginning($window, $onEachSide); + } + + // If the current page is close to the ending of the page range we will just get + // this first couple pages, followed by a larger window of these ending pages + // since we're too close to the end of the list to create a full on slider. + elseif ($this->currentPage() > ($this->lastPage() - $window)) { + return $this->getSliderTooCloseToEnding($window, $onEachSide); + } + + // If we have enough room on both sides of the current page to build a slider we + // will surround it with both the beginning and ending caps, with this window + // of pages in the middle providing a Google style sliding paginator setup. + return $this->getFullSlider($onEachSide); + } + + /** + * Get the slider of URLs when too close to beginning of window. + * + * @param int $window + * @param int $onEachSide + * @return array + */ + protected function getSliderTooCloseToBeginning($window, $onEachSide) + { + return [ + 'first' => $this->paginator->getUrlRange(1, $window + $onEachSide), + 'slider' => null, + 'last' => $this->getFinish(), + ]; + } + + /** + * Get the slider of URLs when too close to ending of window. + * + * @param int $window + * @param int $onEachSide + * @return array + */ + protected function getSliderTooCloseToEnding($window, $onEachSide) + { + $last = $this->paginator->getUrlRange( + $this->lastPage() - ($window + ($onEachSide - 1)), + $this->lastPage() + ); + + return [ + 'first' => $this->getStart(), + 'slider' => null, + 'last' => $last, + ]; + } + + /** + * Get the slider of URLs when a full slider can be made. + * + * @param int $onEachSide + * @return array + */ + protected function getFullSlider($onEachSide) + { + return [ + 'first' => $this->getStart(), + 'slider' => $this->getAdjacentUrlRange($onEachSide), + 'last' => $this->getFinish(), + ]; + } + + /** + * Get the page range for the current page window. + * + * @param int $onEachSide + * @return array + */ + public function getAdjacentUrlRange($onEachSide) + { + return $this->paginator->getUrlRange( + $this->currentPage() - $onEachSide, + $this->currentPage() + $onEachSide + ); + } + + /** + * Get the starting URLs of a pagination slider. + * + * @return array + */ + public function getStart() + { + return $this->paginator->getUrlRange(1, 2); + } + + /** + * Get the ending URLs of a pagination slider. + * + * @return array + */ + public function getFinish() + { + return $this->paginator->getUrlRange( + $this->lastPage() - 1, + $this->lastPage() + ); + } + + /** + * Determine if the underlying paginator being presented has pages to show. + * + * @return bool + */ + public function hasPages() + { + return $this->paginator->lastPage() > 1; + } + + /** + * Get the current page from the paginator. + * + * @return int + */ + protected function currentPage() + { + return $this->paginator->currentPage(); + } + + /** + * Get the last page from the paginator. + * + * @return int + */ + protected function lastPage() + { + return $this->paginator->lastPage(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/composer.json b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/composer.json new file mode 100755 index 00000000000..5c8a380b2a3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/composer.json @@ -0,0 +1,37 @@ +{ + "name": "illuminate/pagination", + "description": "The Illuminate Pagination package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0", + "ext-json": "*", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Pagination\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php new file mode 100644 index 00000000000..63c6f56b59e --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php @@ -0,0 +1,46 @@ +@if ($paginator->hasPages()) +
    +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/default.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/default.blade.php new file mode 100644 index 00000000000..0db70b56275 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/default.blade.php @@ -0,0 +1,46 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php new file mode 100644 index 00000000000..ef0dbb184c6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php new file mode 100644 index 00000000000..4bb491742a3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php @@ -0,0 +1,27 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-default.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-default.blade.php new file mode 100644 index 00000000000..36bdbc18c65 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-default.blade.php @@ -0,0 +1,19 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-tailwind.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-tailwind.blade.php new file mode 100644 index 00000000000..6872cca360d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/simple-tailwind.blade.php @@ -0,0 +1,25 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/tailwind.blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/tailwind.blade.php new file mode 100644 index 00000000000..5bf323b406f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/pagination/resources/views/tailwind.blade.php @@ -0,0 +1,106 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/AggregateServiceProvider.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/AggregateServiceProvider.php new file mode 100644 index 00000000000..d7425c5c258 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/AggregateServiceProvider.php @@ -0,0 +1,52 @@ +instances = []; + + foreach ($this->providers as $provider) { + $this->instances[] = $this->app->register($provider); + } + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + $provides = []; + + foreach ($this->providers as $provider) { + $instance = $this->app->resolveProvider($provider); + + $provides = array_merge($provides, $instance->provides()); + } + + return $provides; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Carbon.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Carbon.php new file mode 100644 index 00000000000..004b27b0751 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Carbon.php @@ -0,0 +1,18 @@ +files = $files; + $this->workingPath = $workingPath; + } + + /** + * Regenerate the Composer autoloader files. + * + * @param string|array $extra + * @return int + */ + public function dumpAutoloads($extra = '') + { + $extra = $extra ? (array) $extra : []; + + $command = array_merge($this->findComposer(), ['dump-autoload'], $extra); + + return $this->getProcess($command)->run(); + } + + /** + * Regenerate the optimized Composer autoloader files. + * + * @return int + */ + public function dumpOptimized() + { + return $this->dumpAutoloads('--optimize'); + } + + /** + * Get the composer command for the environment. + * + * @return array + */ + protected function findComposer() + { + if ($this->files->exists($this->workingPath.'/composer.phar')) { + return [$this->phpBinary(), 'composer.phar']; + } + + return ['composer']; + } + + /** + * Get the PHP binary. + * + * @return string + */ + protected function phpBinary() + { + return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)); + } + + /** + * Get a new Symfony process instance. + * + * @param array $command + * @return \Symfony\Component\Process\Process + */ + protected function getProcess(array $command) + { + return (new Process($command, $this->workingPath))->setTimeout(null); + } + + /** + * Set the working path used by the class. + * + * @param string $path + * @return $this + */ + public function setWorkingPath($path) + { + $this->workingPath = realpath($path); + + return $this; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ConfigurationUrlParser.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ConfigurationUrlParser.php new file mode 100644 index 00000000000..be54b9a83d5 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ConfigurationUrlParser.php @@ -0,0 +1,193 @@ + 'sqlsrv', + 'mysql2' => 'mysql', // RDS + 'postgres' => 'pgsql', + 'postgresql' => 'pgsql', + 'sqlite3' => 'sqlite', + 'redis' => 'tcp', + 'rediss' => 'tls', + ]; + + /** + * Parse the database configuration, hydrating options using a database configuration URL if possible. + * + * @param array|string $config + * @return array + */ + public function parseConfiguration($config) + { + if (is_string($config)) { + $config = ['url' => $config]; + } + + $url = Arr::pull($config, 'url'); + + if (! $url) { + return $config; + } + + $rawComponents = $this->parseUrl($url); + + $decodedComponents = $this->parseStringsToNativeTypes( + array_map('rawurldecode', $rawComponents) + ); + + return array_merge( + $config, + $this->getPrimaryOptions($decodedComponents), + $this->getQueryOptions($rawComponents) + ); + } + + /** + * Get the primary database connection options. + * + * @param array $url + * @return array + */ + protected function getPrimaryOptions($url) + { + return array_filter([ + 'driver' => $this->getDriver($url), + 'database' => $this->getDatabase($url), + 'host' => $url['host'] ?? null, + 'port' => $url['port'] ?? null, + 'username' => $url['user'] ?? null, + 'password' => $url['pass'] ?? null, + ], function ($value) { + return ! is_null($value); + }); + } + + /** + * Get the database driver from the URL. + * + * @param array $url + * @return string|null + */ + protected function getDriver($url) + { + $alias = $url['scheme'] ?? null; + + if (! $alias) { + return; + } + + return static::$driverAliases[$alias] ?? $alias; + } + + /** + * Get the database name from the URL. + * + * @param array $url + * @return string|null + */ + protected function getDatabase($url) + { + $path = $url['path'] ?? null; + + return $path && $path !== '/' ? substr($path, 1) : null; + } + + /** + * Get all of the additional database options from the query string. + * + * @param array $url + * @return array + */ + protected function getQueryOptions($url) + { + $queryString = $url['query'] ?? null; + + if (! $queryString) { + return []; + } + + $query = []; + + parse_str($queryString, $query); + + return $this->parseStringsToNativeTypes($query); + } + + /** + * Parse the string URL to an array of components. + * + * @param string $url + * @return array + * + * @throws \InvalidArgumentException + */ + protected function parseUrl($url) + { + $url = preg_replace('#^(sqlite3?):///#', '$1://null/', $url); + + $parsedUrl = parse_url($url); + + if ($parsedUrl === false) { + throw new InvalidArgumentException('The database configuration URL is malformed.'); + } + + return $parsedUrl; + } + + /** + * Convert string casted values to their native types. + * + * @param mixed $value + * @return mixed + */ + protected function parseStringsToNativeTypes($value) + { + if (is_array($value)) { + return array_map([$this, 'parseStringsToNativeTypes'], $value); + } + + if (! is_string($value)) { + return $value; + } + + $parsedValue = json_decode($value, true); + + if (json_last_error() === JSON_ERROR_NONE) { + return $parsedValue; + } + + return $value; + } + + /** + * Get all of the current drivers' aliases. + * + * @return array + */ + public static function getDriverAliases() + { + return static::$driverAliases; + } + + /** + * Add the given driver alias to the driver aliases array. + * + * @param string $alias + * @param string $driver + * @return void + */ + public static function addDriverAlias($alias, $driver) + { + static::$driverAliases[$alias] = $driver; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/DateFactory.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/DateFactory.php new file mode 100644 index 00000000000..f36cb46f312 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/DateFactory.php @@ -0,0 +1,231 @@ +$method(...$parameters); + } + + $dateClass = static::$dateClass ?: $defaultClassName; + + // Check if date can be created using public class method... + if (method_exists($dateClass, $method) || + method_exists($dateClass, 'hasMacro') && $dateClass::hasMacro($method)) { + return $dateClass::$method(...$parameters); + } + + // If that fails, create the date with the default class... + $date = $defaultClassName::$method(...$parameters); + + // If the configured class has an "instance" method, we'll try to pass our date into there... + if (method_exists($dateClass, 'instance')) { + return $dateClass::instance($date); + } + + // Otherwise, assume the configured class has a DateTime compatible constructor... + return new $dateClass($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Env.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Env.php new file mode 100644 index 00000000000..b3100730406 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Env.php @@ -0,0 +1,103 @@ +addAdapter(PutenvAdapter::class); + } + + static::$repository = $builder->immutable()->make(); + } + + return static::$repository; + } + + /** + * Gets the value of an environment variable. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function get($key, $default = null) + { + return Option::fromValue(static::getRepository()->get($key)) + ->map(function ($value) { + switch (strtolower($value)) { + case 'true': + case '(true)': + return true; + case 'false': + case '(false)': + return false; + case 'empty': + case '(empty)': + return ''; + case 'null': + case '(null)': + return; + } + + if (preg_match('/\A([\'"])(.*)\1\z/', $value, $matches)) { + return $matches[2]; + } + + return $value; + }) + ->getOrCall(function () use ($default) { + return value($default); + }); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/App.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/App.php new file mode 100755 index 00000000000..8fbec3d4c08 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/App.php @@ -0,0 +1,64 @@ +providerIsLoaded(UiServiceProvider::class)) { + throw new RuntimeException('In order to use the Auth::routes() method, please install the laravel/ui package.'); + } + + static::$app->make('router')->auth($options); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Blade.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Blade.php new file mode 100755 index 00000000000..81019e288de --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Blade.php @@ -0,0 +1,46 @@ +dispatch(); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return BusDispatcherContract::class; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Cache.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Cache.php new file mode 100755 index 00000000000..70aa1dc4839 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Cache.php @@ -0,0 +1,40 @@ +cookie($key, null)); + } + + /** + * Retrieve a cookie from the request. + * + * @param string|null $key + * @param mixed $default + * @return string|array|null + */ + public static function get($key = null, $default = null) + { + return static::$app['request']->cookie($key, $default); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'cookie'; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Crypt.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Crypt.php new file mode 100755 index 00000000000..61eaaa83e3f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Crypt.php @@ -0,0 +1,27 @@ +resolved($accessor) === true) { + $callback(static::getFacadeRoot()); + } + + static::$app->afterResolving($accessor, function ($service) use ($callback) { + $callback($service); + }); + } + + /** + * Convert the facade into a Mockery spy. + * + * @return \Mockery\MockInterface + */ + public static function spy() + { + if (! static::isMock()) { + $class = static::getMockableClass(); + + return tap($class ? Mockery::spy($class) : Mockery::spy(), function ($spy) { + static::swap($spy); + }); + } + } + + /** + * Initiate a partial mock on the facade. + * + * @return \Mockery\MockInterface + */ + public static function partialMock() + { + $name = static::getFacadeAccessor(); + + $mock = static::isMock() + ? static::$resolvedInstance[$name] + : static::createFreshMockInstance(); + + return $mock->makePartial(); + } + + /** + * Initiate a mock expectation on the facade. + * + * @return \Mockery\Expectation + */ + public static function shouldReceive() + { + $name = static::getFacadeAccessor(); + + $mock = static::isMock() + ? static::$resolvedInstance[$name] + : static::createFreshMockInstance(); + + return $mock->shouldReceive(...func_get_args()); + } + + /** + * Create a fresh mock instance for the given class. + * + * @return \Mockery\MockInterface + */ + protected static function createFreshMockInstance() + { + return tap(static::createMock(), function ($mock) { + static::swap($mock); + + $mock->shouldAllowMockingProtectedMethods(); + }); + } + + /** + * Create a fresh mock instance for the given class. + * + * @return \Mockery\MockInterface + */ + protected static function createMock() + { + $class = static::getMockableClass(); + + return $class ? Mockery::mock($class) : Mockery::mock(); + } + + /** + * Determines whether a mock is set as the instance of the facade. + * + * @return bool + */ + protected static function isMock() + { + $name = static::getFacadeAccessor(); + + return isset(static::$resolvedInstance[$name]) && + static::$resolvedInstance[$name] instanceof LegacyMockInterface; + } + + /** + * Get the mockable class for the bound instance. + * + * @return string|null + */ + protected static function getMockableClass() + { + if ($root = static::getFacadeRoot()) { + return get_class($root); + } + } + + /** + * Hotswap the underlying instance behind the facade. + * + * @param mixed $instance + * @return void + */ + public static function swap($instance) + { + static::$resolvedInstance[static::getFacadeAccessor()] = $instance; + + if (isset(static::$app)) { + static::$app->instance(static::getFacadeAccessor(), $instance); + } + } + + /** + * Get the root object behind the facade. + * + * @return mixed + */ + public static function getFacadeRoot() + { + return static::resolveFacadeInstance(static::getFacadeAccessor()); + } + + /** + * Get the registered name of the component. + * + * @return string + * + * @throws \RuntimeException + */ + protected static function getFacadeAccessor() + { + throw new RuntimeException('Facade does not implement getFacadeAccessor method.'); + } + + /** + * Resolve the facade root instance from the container. + * + * @param object|string $name + * @return mixed + */ + protected static function resolveFacadeInstance($name) + { + if (is_object($name)) { + return $name; + } + + if (isset(static::$resolvedInstance[$name])) { + return static::$resolvedInstance[$name]; + } + + if (static::$app) { + return static::$resolvedInstance[$name] = static::$app[$name]; + } + } + + /** + * Clear a resolved facade instance. + * + * @param string $name + * @return void + */ + public static function clearResolvedInstance($name) + { + unset(static::$resolvedInstance[$name]); + } + + /** + * Clear all of the resolved instances. + * + * @return void + */ + public static function clearResolvedInstances() + { + static::$resolvedInstance = []; + } + + /** + * Get the application instance behind the facade. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public static function getFacadeApplication() + { + return static::$app; + } + + /** + * Set the application instance. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return void + */ + public static function setFacadeApplication($app) + { + static::$app = $app; + } + + /** + * Handle dynamic, static calls to the object. + * + * @param string $method + * @param array $args + * @return mixed + * + * @throws \RuntimeException + */ + public static function __callStatic($method, $args) + { + $instance = static::getFacadeRoot(); + + if (! $instance) { + throw new RuntimeException('A facade root has not been set.'); + } + + return $instance->$method(...$args); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/File.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/File.php new file mode 100755 index 00000000000..c22d363a855 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/File.php @@ -0,0 +1,62 @@ +route($channel, $route); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return ChannelManager::class; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/ParallelTesting.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/ParallelTesting.php new file mode 100644 index 00000000000..c3976113501 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/ParallelTesting.php @@ -0,0 +1,26 @@ +connection($name)->getSchemaBuilder(); + } + + /** + * Get a schema builder instance for the default connection. + * + * @return \Illuminate\Database\Schema\Builder + */ + protected static function getFacadeAccessor() + { + return static::$app['db']->connection()->getSchemaBuilder(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Session.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Session.php new file mode 100755 index 00000000000..a0723216912 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/Session.php @@ -0,0 +1,45 @@ +get('filesystems.default'); + + $root = storage_path('framework/testing/disks/'.$disk); + + if ($token = ParallelTesting::token()) { + $root = "{$root}_test_{$token}"; + } + + (new Filesystem)->cleanDirectory($root); + + static::set($disk, $fake = static::createLocalDriver(array_merge($config, [ + 'root' => $root, + ]))); + + return $fake; + } + + /** + * Replace the given disk with a persistent local testing disk. + * + * @param string|null $disk + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public static function persistentFake($disk = null, array $config = []) + { + $disk = $disk ?: static::$app['config']->get('filesystems.default'); + + static::set($disk, $fake = static::createLocalDriver(array_merge($config, [ + 'root' => storage_path('framework/testing/disks/'.$disk), + ]))); + + return $fake; + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'filesystem'; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/URL.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/URL.php new file mode 100755 index 00000000000..7d9941d7c02 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Facades/URL.php @@ -0,0 +1,38 @@ + $value) { + $this->attributes[$key] = $value; + } + } + + /** + * Get an attribute from the fluent instance. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (array_key_exists($key, $this->attributes)) { + return $this->attributes[$key]; + } + + return value($default); + } + + /** + * Get the attributes from the fluent instance. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Convert the fluent instance to an array. + * + * @return array + */ + public function toArray() + { + return $this->attributes; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the fluent instance to JSON. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Determine if the given offset exists. + * + * @param string $offset + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->attributes[$offset]); + } + + /** + * Get the value for a given offset. + * + * @param string $offset + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Set the value at the given offset. + * + * @param string $offset + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + $this->attributes[$offset] = $value; + } + + /** + * Unset the value at the given offset. + * + * @param string $offset + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->attributes[$offset]); + } + + /** + * Handle dynamic calls to the fluent instance to set attributes. + * + * @param string $method + * @param array $parameters + * @return $this + */ + public function __call($method, $parameters) + { + $this->attributes[$method] = count($parameters) > 0 ? $parameters[0] : true; + + return $this; + } + + /** + * Dynamically retrieve the value of an attribute. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->get($key); + } + + /** + * Dynamically set the value of an attribute. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this->offsetSet($key, $value); + } + + /** + * Dynamically check if an attribute is set. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return $this->offsetExists($key); + } + + /** + * Dynamically unset an attribute. + * + * @param string $key + * @return void + */ + public function __unset($key) + { + $this->offsetUnset($key); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HigherOrderTapProxy.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HigherOrderTapProxy.php new file mode 100644 index 00000000000..bbf9b2e54db --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HigherOrderTapProxy.php @@ -0,0 +1,38 @@ +target = $target; + } + + /** + * Dynamically pass method calls to the target. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + $this->target->{$method}(...$parameters); + + return $this->target; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HtmlString.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HtmlString.php new file mode 100644 index 00000000000..d6b71d46cde --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/HtmlString.php @@ -0,0 +1,66 @@ +html = $html; + } + + /** + * Get the HTML string. + * + * @return string + */ + public function toHtml() + { + return $this->html; + } + + /** + * Determine if the given HTML string is empty. + * + * @return bool + */ + public function isEmpty() + { + return $this->html === ''; + } + + /** + * Determine if the given HTML string is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return ! $this->isEmpty(); + } + + /** + * Get the HTML string. + * + * @return string + */ + public function __toString() + { + return $this->toHtml(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/InteractsWithTime.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/InteractsWithTime.php new file mode 100644 index 00000000000..2b617c392a5 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/InteractsWithTime.php @@ -0,0 +1,64 @@ +parseDateInterval($delay); + + return $delay instanceof DateTimeInterface + ? max(0, $delay->getTimestamp() - $this->currentTime()) + : (int) $delay; + } + + /** + * Get the "available at" UNIX timestamp. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @return int + */ + protected function availableAt($delay = 0) + { + $delay = $this->parseDateInterval($delay); + + return $delay instanceof DateTimeInterface + ? $delay->getTimestamp() + : Carbon::now()->addRealSeconds($delay)->getTimestamp(); + } + + /** + * If the given value is an interval, convert it to a DateTime instance. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @return \DateTimeInterface|int + */ + protected function parseDateInterval($delay) + { + if ($delay instanceof DateInterval) { + $delay = Carbon::now()->add($delay); + } + + return $delay; + } + + /** + * Get the current system time as a UNIX timestamp. + * + * @return int + */ + protected function currentTime() + { + return Carbon::now()->getTimestamp(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Js.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Js.php new file mode 100644 index 00000000000..6d6de3440d7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Js.php @@ -0,0 +1,145 @@ +js = $this->convertDataToJavaScriptExpression($data, $flags, $depth); + } + + /** + * Create a new JavaScript string from the given data. + * + * @param mixed $data + * @param int $flags + * @param int $depth + * @return static + * + * @throws \JsonException + */ + public static function from($data, $flags = 0, $depth = 512) + { + return new static($data, $flags, $depth); + } + + /** + * Convert the given data to a JavaScript expression. + * + * @param mixed $data + * @param int $flags + * @param int $depth + * @return string + * + * @throws \JsonException + */ + protected function convertDataToJavaScriptExpression($data, $flags = 0, $depth = 512) + { + if ($data instanceof self) { + return $data->toHtml(); + } + + $json = $this->jsonEncode($data, $flags, $depth); + + if (is_string($data)) { + return "'".substr($json, 1, -1)."'"; + } + + return $this->convertJsonToJavaScriptExpression($json, $flags); + } + + /** + * Encode the given data as JSON. + * + * @param mixed $data + * @param int $flags + * @param int $depth + * @return string + * + * @throws \JsonException + */ + protected function jsonEncode($data, $flags = 0, $depth = 512) + { + if ($data instanceof Jsonable) { + return $data->toJson($flags | static::REQUIRED_FLAGS); + } + + if ($data instanceof Arrayable && ! ($data instanceof JsonSerializable)) { + $data = $data->toArray(); + } + + return json_encode($data, $flags | static::REQUIRED_FLAGS, $depth); + } + + /** + * Convert the given JSON to a JavaScript expression. + * + * @param string $json + * @param int $flags + * @return string + * + * @throws \JsonException + */ + protected function convertJsonToJavaScriptExpression($json, $flags = 0) + { + if ('[]' === $json || '{}' === $json) { + return $json; + } + + if (Str::startsWith($json, ['"', '{', '['])) { + return "JSON.parse('".substr(json_encode($json, $flags | static::REQUIRED_FLAGS), 1, -1)."')"; + } + + return $json; + } + + /** + * Get the string representation of the data for use in HTML. + * + * @return string + */ + public function toHtml() + { + return $this->js; + } + + /** + * Get the string representation of the data for use in HTML. + * + * @return string + */ + public function __toString() + { + return $this->toHtml(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/LICENSE.md b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/LICENSE.md new file mode 100644 index 00000000000..79810c848f8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Manager.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Manager.php new file mode 100755 index 00000000000..f8ae0729b16 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Manager.php @@ -0,0 +1,193 @@ +container = $container; + $this->config = $container->make('config'); + } + + /** + * Get the default driver name. + * + * @return string + */ + abstract public function getDefaultDriver(); + + /** + * Get a driver instance. + * + * @param string|null $driver + * @return mixed + * + * @throws \InvalidArgumentException + */ + public function driver($driver = null) + { + $driver = $driver ?: $this->getDefaultDriver(); + + if (is_null($driver)) { + throw new InvalidArgumentException(sprintf( + 'Unable to resolve NULL driver for [%s].', static::class + )); + } + + // If the given driver has not been created before, we will create the instances + // here and cache it so we can return it next time very quickly. If there is + // already a driver created by this name, we'll just return that instance. + if (! isset($this->drivers[$driver])) { + $this->drivers[$driver] = $this->createDriver($driver); + } + + return $this->drivers[$driver]; + } + + /** + * Create a new driver instance. + * + * @param string $driver + * @return mixed + * + * @throws \InvalidArgumentException + */ + protected function createDriver($driver) + { + // First, we will determine if a custom driver creator exists for the given driver and + // if it does not we will check for a creator method for the driver. Custom creator + // callbacks allow developers to build their own "drivers" easily using Closures. + if (isset($this->customCreators[$driver])) { + return $this->callCustomCreator($driver); + } else { + $method = 'create'.Str::studly($driver).'Driver'; + + if (method_exists($this, $method)) { + return $this->$method(); + } + } + + throw new InvalidArgumentException("Driver [$driver] not supported."); + } + + /** + * Call a custom driver creator. + * + * @param string $driver + * @return mixed + */ + protected function callCustomCreator($driver) + { + return $this->customCreators[$driver]($this->container); + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Get all of the created "drivers". + * + * @return array + */ + public function getDrivers() + { + return $this->drivers; + } + + /** + * Get the container instance used by the manager. + * + * @return \Illuminate\Contracts\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the container instance used by the manager. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } + + /** + * Forget all of the resolved driver instances. + * + * @return $this + */ + public function forgetDrivers() + { + $this->drivers = []; + + return $this; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->driver()->$method(...$parameters); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MessageBag.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MessageBag.php new file mode 100755 index 00000000000..e53d509d37c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MessageBag.php @@ -0,0 +1,418 @@ + $value) { + $value = $value instanceof Arrayable ? $value->toArray() : (array) $value; + + $this->messages[$key] = array_unique($value); + } + } + + /** + * Get the keys present in the message bag. + * + * @return array + */ + public function keys() + { + return array_keys($this->messages); + } + + /** + * Add a message to the message bag. + * + * @param string $key + * @param string $message + * @return $this + */ + public function add($key, $message) + { + if ($this->isUnique($key, $message)) { + $this->messages[$key][] = $message; + } + + return $this; + } + + /** + * Add a message to the message bag if the given conditional is "true". + * + * @param bool $boolean + * @param string $key + * @param string $message + * @return $this + */ + public function addIf($boolean, $key, $message) + { + return $boolean ? $this->add($key, $message) : $this; + } + + /** + * Determine if a key and message combination already exists. + * + * @param string $key + * @param string $message + * @return bool + */ + protected function isUnique($key, $message) + { + $messages = (array) $this->messages; + + return ! isset($messages[$key]) || ! in_array($message, $messages[$key]); + } + + /** + * Merge a new array of messages into the message bag. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array $messages + * @return $this + */ + public function merge($messages) + { + if ($messages instanceof MessageProvider) { + $messages = $messages->getMessageBag()->getMessages(); + } + + $this->messages = array_merge_recursive($this->messages, $messages); + + return $this; + } + + /** + * Determine if messages exist for all of the given keys. + * + * @param array|string|null $key + * @return bool + */ + public function has($key) + { + if ($this->isEmpty()) { + return false; + } + + if (is_null($key)) { + return $this->any(); + } + + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $key) { + if ($this->first($key) === '') { + return false; + } + } + + return true; + } + + /** + * Determine if messages exist for any of the given keys. + * + * @param array|string $keys + * @return bool + */ + public function hasAny($keys = []) + { + if ($this->isEmpty()) { + return false; + } + + $keys = is_array($keys) ? $keys : func_get_args(); + + foreach ($keys as $key) { + if ($this->has($key)) { + return true; + } + } + + return false; + } + + /** + * Get the first message from the message bag for a given key. + * + * @param string|null $key + * @param string|null $format + * @return string + */ + public function first($key = null, $format = null) + { + $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); + + $firstMessage = Arr::first($messages, null, ''); + + return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage; + } + + /** + * Get all of the messages from the message bag for a given key. + * + * @param string $key + * @param string|null $format + * @return array + */ + public function get($key, $format = null) + { + // If the message exists in the message bag, we will transform it and return + // the message. Otherwise, we will check if the key is implicit & collect + // all the messages that match the given key and output it as an array. + if (array_key_exists($key, $this->messages)) { + return $this->transform( + $this->messages[$key], $this->checkFormat($format), $key + ); + } + + if (Str::contains($key, '*')) { + return $this->getMessagesForWildcardKey($key, $format); + } + + return []; + } + + /** + * Get the messages for a wildcard key. + * + * @param string $key + * @param string|null $format + * @return array + */ + protected function getMessagesForWildcardKey($key, $format) + { + return collect($this->messages) + ->filter(function ($messages, $messageKey) use ($key) { + return Str::is($key, $messageKey); + }) + ->map(function ($messages, $messageKey) use ($format) { + return $this->transform( + $messages, $this->checkFormat($format), $messageKey + ); + })->all(); + } + + /** + * Get all of the messages for every key in the message bag. + * + * @param string|null $format + * @return array + */ + public function all($format = null) + { + $format = $this->checkFormat($format); + + $all = []; + + foreach ($this->messages as $key => $messages) { + $all = array_merge($all, $this->transform($messages, $format, $key)); + } + + return $all; + } + + /** + * Get all of the unique messages for every key in the message bag. + * + * @param string|null $format + * @return array + */ + public function unique($format = null) + { + return array_unique($this->all($format)); + } + + /** + * Format an array of messages. + * + * @param array $messages + * @param string $format + * @param string $messageKey + * @return array + */ + protected function transform($messages, $format, $messageKey) + { + return collect((array) $messages) + ->map(function ($message) use ($format, $messageKey) { + // We will simply spin through the given messages and transform each one + // replacing the :message place holder with the real message allowing + // the messages to be easily formatted to each developer's desires. + return str_replace([':message', ':key'], [$message, $messageKey], $format); + })->all(); + } + + /** + * Get the appropriate format based on the given format. + * + * @param string $format + * @return string + */ + protected function checkFormat($format) + { + return $format ?: $this->format; + } + + /** + * Get the raw messages in the message bag. + * + * @return array + */ + public function messages() + { + return $this->messages; + } + + /** + * Get the raw messages in the message bag. + * + * @return array + */ + public function getMessages() + { + return $this->messages(); + } + + /** + * Get the messages for the instance. + * + * @return \Illuminate\Support\MessageBag + */ + public function getMessageBag() + { + return $this; + } + + /** + * Get the default message format. + * + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Set the default message format. + * + * @param string $format + * @return \Illuminate\Support\MessageBag + */ + public function setFormat($format = ':message') + { + $this->format = $format; + + return $this; + } + + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function isEmpty() + { + return ! $this->any(); + } + + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function isNotEmpty() + { + return $this->any(); + } + + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function any() + { + return $this->count() > 0; + } + + /** + * Get the number of messages in the message bag. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return count($this->messages, COUNT_RECURSIVE) - count($this->messages); + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return $this->getMessages(); + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Convert the message bag to its string representation. + * + * @return string + */ + public function __toString() + { + return $this->toJson(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MultipleInstanceManager.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MultipleInstanceManager.php new file mode 100644 index 00000000000..97cee33af20 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/MultipleInstanceManager.php @@ -0,0 +1,191 @@ +app = $app; + } + + /** + * Get the default instance name. + * + * @return string + */ + abstract public function getDefaultInstance(); + + /** + * Set the default instance name. + * + * @param string $name + * @return void + */ + abstract public function setDefaultInstance($name); + + /** + * Get the instance specific configuration. + * + * @param string $name + * @return array + */ + abstract public function getInstanceConfig($name); + + /** + * Get an instance instance by name. + * + * @param string|null $name + * @return mixed + */ + public function instance($name = null) + { + $name = $name ?: $this->getDefaultInstance(); + + return $this->instances[$name] = $this->get($name); + } + + /** + * Attempt to get an instance from the local cache. + * + * @param string $name + * @return mixed + */ + protected function get($name) + { + return $this->instances[$name] ?? $this->resolve($name); + } + + /** + * Resolve the given instance. + * + * @param string $name + * @return mixed + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getInstanceConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Instance [{$name}] is not defined."); + } + + if (! array_key_exists('driver', $config)) { + throw new RuntimeException("Instance [{$name}] does not specify a driver."); + } + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($config); + } else { + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Instance driver [{$config['driver']}] is not supported."); + } + } + } + + /** + * Call a custom instance creator. + * + * @param array $config + * @return mixed + */ + protected function callCustomCreator(array $config) + { + return $this->customCreators[$config['driver']]($this->app, $config); + } + + /** + * Unset the given instances. + * + * @param array|string|null $name + * @return $this + */ + public function forgetInstance($name = null) + { + $name = $name ?? $this->getDefaultInstance(); + + foreach ((array) $name as $instanceName) { + if (isset($this->instances[$instanceName])) { + unset($this->instances[$instanceName]); + } + } + + return $this; + } + + /** + * Disconnect the given instance and remove from local cache. + * + * @param string|null $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?? $this->getDefaultInstance(); + + unset($this->instances[$name]); + } + + /** + * Register a custom instance creator Closure. + * + * @param string $name + * @param \Closure $callback + * @return $this + */ + public function extend($name, Closure $callback) + { + $this->customCreators[$name] = $callback->bindTo($this, $this); + + return $this; + } + + /** + * Dynamically call the default instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->instance()->$method(...$parameters); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/NamespacedItemResolver.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/NamespacedItemResolver.php new file mode 100755 index 00000000000..a0d8508b281 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/NamespacedItemResolver.php @@ -0,0 +1,112 @@ +parsed[$key])) { + return $this->parsed[$key]; + } + + // If the key does not contain a double colon, it means the key is not in a + // namespace, and is just a regular configuration item. Namespaces are a + // tool for organizing configuration items for things such as modules. + if (strpos($key, '::') === false) { + $segments = explode('.', $key); + + $parsed = $this->parseBasicSegments($segments); + } else { + $parsed = $this->parseNamespacedSegments($key); + } + + // Once we have the parsed array of this key's elements, such as its groups + // and namespace, we will cache each array inside a simple list that has + // the key and the parsed array for quick look-ups for later requests. + return $this->parsed[$key] = $parsed; + } + + /** + * Parse an array of basic segments. + * + * @param array $segments + * @return array + */ + protected function parseBasicSegments(array $segments) + { + // The first segment in a basic array will always be the group, so we can go + // ahead and grab that segment. If there is only one total segment we are + // just pulling an entire group out of the array and not a single item. + $group = $segments[0]; + + // If there is more than one segment in this group, it means we are pulling + // a specific item out of a group and will need to return this item name + // as well as the group so we know which item to pull from the arrays. + $item = count($segments) === 1 + ? null + : implode('.', array_slice($segments, 1)); + + return [null, $group, $item]; + } + + /** + * Parse an array of namespaced segments. + * + * @param string $key + * @return array + */ + protected function parseNamespacedSegments($key) + { + [$namespace, $item] = explode('::', $key); + + // First we'll just explode the first segment to get the namespace and group + // since the item should be in the remaining segments. Once we have these + // two pieces of data we can proceed with parsing out the item's value. + $itemSegments = explode('.', $item); + + $groupAndItem = array_slice( + $this->parseBasicSegments($itemSegments), 1 + ); + + return array_merge([$namespace], $groupAndItem); + } + + /** + * Set the parsed value of a key. + * + * @param string $key + * @param array $parsed + * @return void + */ + public function setParsedKey($key, $parsed) + { + $this->parsed[$key] = $parsed; + } + + /** + * Flush the cache of parsed keys. + * + * @return void + */ + public function flushParsedKeys() + { + $this->parsed = []; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Optional.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Optional.php new file mode 100644 index 00000000000..816190dd7a2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Optional.php @@ -0,0 +1,135 @@ +value = $value; + } + + /** + * Dynamically access a property on the underlying object. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + if (is_object($this->value)) { + return $this->value->{$key} ?? null; + } + } + + /** + * Dynamically check a property exists on the underlying object. + * + * @param mixed $name + * @return bool + */ + public function __isset($name) + { + if (is_object($this->value)) { + return isset($this->value->{$name}); + } + + if (is_array($this->value) || $this->value instanceof ArrayObject) { + return isset($this->value[$name]); + } + + return false; + } + + /** + * Determine if an item exists at an offset. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return Arr::accessible($this->value) && Arr::exists($this->value, $key); + } + + /** + * Get an item at a given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return Arr::get($this->value, $key); + } + + /** + * Set the item at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + if (Arr::accessible($this->value)) { + $this->value[$key] = $value; + } + } + + /** + * Unset the item at a given offset. + * + * @param string $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + if (Arr::accessible($this->value)) { + unset($this->value[$key]); + } + } + + /** + * Dynamically pass a method to the underlying object. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + if (is_object($this->value)) { + return $this->value->{$method}(...$parameters); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Pluralizer.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Pluralizer.php new file mode 100755 index 00000000000..109a10816d7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Pluralizer.php @@ -0,0 +1,142 @@ +pluralize($value); + + return static::matchCase($plural, $value); + } + + /** + * Get the singular form of an English word. + * + * @param string $value + * @return string + */ + public static function singular($value) + { + $singular = static::inflector()->singularize($value); + + return static::matchCase($singular, $value); + } + + /** + * Determine if the given value is uncountable. + * + * @param string $value + * @return bool + */ + protected static function uncountable($value) + { + return in_array(strtolower($value), static::$uncountable); + } + + /** + * Attempt to match the case on two strings. + * + * @param string $value + * @param string $comparison + * @return string + */ + protected static function matchCase($value, $comparison) + { + $functions = ['mb_strtolower', 'mb_strtoupper', 'ucfirst', 'ucwords']; + + foreach ($functions as $function) { + if ($function($comparison) === $comparison) { + return $function($value); + } + } + + return $value; + } + + /** + * Get the inflector instance. + * + * @return \Doctrine\Inflector\Inflector + */ + public static function inflector() + { + static $inflector; + + if (is_null($inflector)) { + $inflector = InflectorFactory::createForLanguage('english')->build(); + } + + return $inflector; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ProcessUtils.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ProcessUtils.php new file mode 100644 index 00000000000..1caa9e168a6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ProcessUtils.php @@ -0,0 +1,69 @@ +isPublic(); + } + + if (is_object($var[0]) && method_exists($class, '__call')) { + return (new ReflectionMethod($class, '__call'))->isPublic(); + } + + if (! is_object($var[0]) && method_exists($class, '__callStatic')) { + return (new ReflectionMethod($class, '__callStatic'))->isPublic(); + } + + return false; + } + + /** + * Get the class name of the given parameter's type, if possible. + * + * @param \ReflectionParameter $parameter + * @return string|null + */ + public static function getParameterClassName($parameter) + { + $type = $parameter->getType(); + + if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { + return; + } + + return static::getTypeName($parameter, $type); + } + + /** + * Get the class names of the given parameter's type, including union types. + * + * @param \ReflectionParameter $parameter + * @return array + */ + public static function getParameterClassNames($parameter) + { + $type = $parameter->getType(); + + if (! $type instanceof ReflectionUnionType) { + return array_filter([static::getParameterClassName($parameter)]); + } + + $unionTypes = []; + + foreach ($type->getTypes() as $listedType) { + if (! $listedType instanceof ReflectionNamedType || $listedType->isBuiltin()) { + continue; + } + + $unionTypes[] = static::getTypeName($parameter, $listedType); + } + + return array_filter($unionTypes); + } + + /** + * Get the given type's class name. + * + * @param \ReflectionParameter $parameter + * @param \ReflectionNamedType $type + * @return string + */ + protected static function getTypeName($parameter, $type) + { + $name = $type->getName(); + + if (! is_null($class = $parameter->getDeclaringClass())) { + if ($name === 'self') { + return $class->getName(); + } + + if ($name === 'parent' && $parent = $class->getParentClass()) { + return $parent->getName(); + } + } + + return $name; + } + + /** + * Determine if the parameter's type is a subclass of the given type. + * + * @param \ReflectionParameter $parameter + * @param string $className + * @return bool + */ + public static function isParameterSubclassOf($parameter, $className) + { + $paramClassName = static::getParameterClassName($parameter); + + return $paramClassName + && (class_exists($paramClassName) || interface_exists($paramClassName)) + && (new ReflectionClass($paramClassName))->isSubclassOf($className); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ServiceProvider.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ServiceProvider.php new file mode 100755 index 00000000000..6c530c121d3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ServiceProvider.php @@ -0,0 +1,437 @@ +app = $app; + } + + /** + * Register any application services. + * + * @return void + */ + public function register() + { + // + } + + /** + * Register a booting callback to be run before the "boot" method is called. + * + * @param \Closure $callback + * @return void + */ + public function booting(Closure $callback) + { + $this->bootingCallbacks[] = $callback; + } + + /** + * Register a booted callback to be run after the "boot" method is called. + * + * @param \Closure $callback + * @return void + */ + public function booted(Closure $callback) + { + $this->bootedCallbacks[] = $callback; + } + + /** + * Call the registered booting callbacks. + * + * @return void + */ + public function callBootingCallbacks() + { + $index = 0; + + while ($index < count($this->bootingCallbacks)) { + $this->app->call($this->bootingCallbacks[$index]); + + $index++; + } + } + + /** + * Call the registered booted callbacks. + * + * @return void + */ + public function callBootedCallbacks() + { + $index = 0; + + while ($index < count($this->bootedCallbacks)) { + $this->app->call($this->bootedCallbacks[$index]); + + $index++; + } + } + + /** + * Merge the given configuration with the existing configuration. + * + * @param string $path + * @param string $key + * @return void + */ + protected function mergeConfigFrom($path, $key) + { + if (! ($this->app instanceof CachesConfiguration && $this->app->configurationIsCached())) { + $config = $this->app->make('config'); + + $config->set($key, array_merge( + require $path, $config->get($key, []) + )); + } + } + + /** + * Load the given routes file if routes are not already cached. + * + * @param string $path + * @return void + */ + protected function loadRoutesFrom($path) + { + if (! ($this->app instanceof CachesRoutes && $this->app->routesAreCached())) { + require $path; + } + } + + /** + * Register a view file namespace. + * + * @param string|array $path + * @param string $namespace + * @return void + */ + protected function loadViewsFrom($path, $namespace) + { + $this->callAfterResolving('view', function ($view) use ($path, $namespace) { + if (isset($this->app->config['view']['paths']) && + is_array($this->app->config['view']['paths'])) { + foreach ($this->app->config['view']['paths'] as $viewPath) { + if (is_dir($appPath = $viewPath.'/vendor/'.$namespace)) { + $view->addNamespace($namespace, $appPath); + } + } + } + + $view->addNamespace($namespace, $path); + }); + } + + /** + * Register the given view components with a custom prefix. + * + * @param string $prefix + * @param array $components + * @return void + */ + protected function loadViewComponentsAs($prefix, array $components) + { + $this->callAfterResolving(BladeCompiler::class, function ($blade) use ($prefix, $components) { + foreach ($components as $alias => $component) { + $blade->component($component, is_string($alias) ? $alias : null, $prefix); + } + }); + } + + /** + * Register a translation file namespace. + * + * @param string $path + * @param string $namespace + * @return void + */ + protected function loadTranslationsFrom($path, $namespace) + { + $this->callAfterResolving('translator', function ($translator) use ($path, $namespace) { + $translator->addNamespace($namespace, $path); + }); + } + + /** + * Register a JSON translation file path. + * + * @param string $path + * @return void + */ + protected function loadJsonTranslationsFrom($path) + { + $this->callAfterResolving('translator', function ($translator) use ($path) { + $translator->addJsonPath($path); + }); + } + + /** + * Register database migration paths. + * + * @param array|string $paths + * @return void + */ + protected function loadMigrationsFrom($paths) + { + $this->callAfterResolving('migrator', function ($migrator) use ($paths) { + foreach ((array) $paths as $path) { + $migrator->path($path); + } + }); + } + + /** + * Register Eloquent model factory paths. + * + * @deprecated Will be removed in a future Laravel version. + * + * @param array|string $paths + * @return void + */ + protected function loadFactoriesFrom($paths) + { + $this->callAfterResolving(ModelFactory::class, function ($factory) use ($paths) { + foreach ((array) $paths as $path) { + $factory->load($path); + } + }); + } + + /** + * Setup an after resolving listener, or fire immediately if already resolved. + * + * @param string $name + * @param callable $callback + * @return void + */ + protected function callAfterResolving($name, $callback) + { + $this->app->afterResolving($name, $callback); + + if ($this->app->resolved($name)) { + $callback($this->app->make($name), $this->app); + } + } + + /** + * Register paths to be published by the publish command. + * + * @param array $paths + * @param mixed $groups + * @return void + */ + protected function publishes(array $paths, $groups = null) + { + $this->ensurePublishArrayInitialized($class = static::class); + + static::$publishes[$class] = array_merge(static::$publishes[$class], $paths); + + foreach ((array) $groups as $group) { + $this->addPublishGroup($group, $paths); + } + } + + /** + * Ensure the publish array for the service provider is initialized. + * + * @param string $class + * @return void + */ + protected function ensurePublishArrayInitialized($class) + { + if (! array_key_exists($class, static::$publishes)) { + static::$publishes[$class] = []; + } + } + + /** + * Add a publish group / tag to the service provider. + * + * @param string $group + * @param array $paths + * @return void + */ + protected function addPublishGroup($group, $paths) + { + if (! array_key_exists($group, static::$publishGroups)) { + static::$publishGroups[$group] = []; + } + + static::$publishGroups[$group] = array_merge( + static::$publishGroups[$group], $paths + ); + } + + /** + * Get the paths to publish. + * + * @param string|null $provider + * @param string|null $group + * @return array + */ + public static function pathsToPublish($provider = null, $group = null) + { + if (! is_null($paths = static::pathsForProviderOrGroup($provider, $group))) { + return $paths; + } + + return collect(static::$publishes)->reduce(function ($paths, $p) { + return array_merge($paths, $p); + }, []); + } + + /** + * Get the paths for the provider or group (or both). + * + * @param string|null $provider + * @param string|null $group + * @return array + */ + protected static function pathsForProviderOrGroup($provider, $group) + { + if ($provider && $group) { + return static::pathsForProviderAndGroup($provider, $group); + } elseif ($group && array_key_exists($group, static::$publishGroups)) { + return static::$publishGroups[$group]; + } elseif ($provider && array_key_exists($provider, static::$publishes)) { + return static::$publishes[$provider]; + } elseif ($group || $provider) { + return []; + } + } + + /** + * Get the paths for the provider and group. + * + * @param string $provider + * @param string $group + * @return array + */ + protected static function pathsForProviderAndGroup($provider, $group) + { + if (! empty(static::$publishes[$provider]) && ! empty(static::$publishGroups[$group])) { + return array_intersect_key(static::$publishes[$provider], static::$publishGroups[$group]); + } + + return []; + } + + /** + * Get the service providers available for publishing. + * + * @return array + */ + public static function publishableProviders() + { + return array_keys(static::$publishes); + } + + /** + * Get the groups available for publishing. + * + * @return array + */ + public static function publishableGroups() + { + return array_keys(static::$publishGroups); + } + + /** + * Register the package's custom Artisan commands. + * + * @param array|mixed $commands + * @return void + */ + public function commands($commands) + { + $commands = is_array($commands) ? $commands : func_get_args(); + + Artisan::starting(function ($artisan) use ($commands) { + $artisan->resolveCommands($commands); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return []; + } + + /** + * Get the events that trigger this service provider to register. + * + * @return array + */ + public function when() + { + return []; + } + + /** + * Determine if the provider is deferred. + * + * @return bool + */ + public function isDeferred() + { + return $this instanceof DeferrableProvider; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Str.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Str.php new file mode 100644 index 00000000000..21e19040389 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Str.php @@ -0,0 +1,1033 @@ + 0; + } + + /** + * Convert a string to kebab case. + * + * @param string $value + * @return string + */ + public static function kebab($value) + { + return static::snake($value, '-'); + } + + /** + * Return the length of the given string. + * + * @param string $value + * @param string|null $encoding + * @return int + */ + public static function length($value, $encoding = null) + { + if ($encoding) { + return mb_strlen($value, $encoding); + } + + return mb_strlen($value); + } + + /** + * Limit the number of characters in a string. + * + * @param string $value + * @param int $limit + * @param string $end + * @return string + */ + public static function limit($value, $limit = 100, $end = '...') + { + if (mb_strwidth($value, 'UTF-8') <= $limit) { + return $value; + } + + return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end; + } + + /** + * Convert the given string to lower-case. + * + * @param string $value + * @return string + */ + public static function lower($value) + { + return mb_strtolower($value, 'UTF-8'); + } + + /** + * Limit the number of words in a string. + * + * @param string $value + * @param int $words + * @param string $end + * @return string + */ + public static function words($value, $words = 100, $end = '...') + { + preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); + + if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) { + return $value; + } + + return rtrim($matches[0]).$end; + } + + /** + * Converts GitHub flavored Markdown into HTML. + * + * @param string $string + * @param array $options + * @return string + */ + public static function markdown($string, array $options = []) + { + $converter = new GithubFlavoredMarkdownConverter($options); + + return (string) $converter->convertToHtml($string); + } + + /** + * Masks a portion of a string with a repeated character. + * + * @param string $string + * @param string $character + * @param int $index + * @param int|null $length + * @param string $encoding + * @return string + */ + public static function mask($string, $character, $index, $length = null, $encoding = 'UTF-8') + { + if ($character === '') { + return $string; + } + + if (is_null($length) && PHP_MAJOR_VERSION < 8) { + $length = mb_strlen($string, $encoding); + } + + $segment = mb_substr($string, $index, $length, $encoding); + + if ($segment === '') { + return $string; + } + + $strlen = mb_strlen($string, $encoding); + $startIndex = $index; + + if ($index < 0) { + $startIndex = $index < -$strlen ? 0 : $strlen + $index; + } + + $start = mb_substr($string, 0, $startIndex, $encoding); + $segmentLen = mb_strlen($segment, $encoding); + $end = mb_substr($string, $startIndex + $segmentLen); + + return $start.str_repeat(mb_substr($character, 0, 1, $encoding), $segmentLen).$end; + } + + /** + * Get the string matching the given pattern. + * + * @param string $pattern + * @param string $subject + * @return string + */ + public static function match($pattern, $subject) + { + preg_match($pattern, $subject, $matches); + + if (! $matches) { + return ''; + } + + return $matches[1] ?? $matches[0]; + } + + /** + * Get the string matching the given pattern. + * + * @param string $pattern + * @param string $subject + * @return \Illuminate\Support\Collection + */ + public static function matchAll($pattern, $subject) + { + preg_match_all($pattern, $subject, $matches); + + if (empty($matches[0])) { + return collect(); + } + + return collect($matches[1] ?? $matches[0]); + } + + /** + * Pad both sides of a string with another. + * + * @param string $value + * @param int $length + * @param string $pad + * @return string + */ + public static function padBoth($value, $length, $pad = ' ') + { + return str_pad($value, strlen($value) - mb_strlen($value) + $length, $pad, STR_PAD_BOTH); + } + + /** + * Pad the left side of a string with another. + * + * @param string $value + * @param int $length + * @param string $pad + * @return string + */ + public static function padLeft($value, $length, $pad = ' ') + { + return str_pad($value, strlen($value) - mb_strlen($value) + $length, $pad, STR_PAD_LEFT); + } + + /** + * Pad the right side of a string with another. + * + * @param string $value + * @param int $length + * @param string $pad + * @return string + */ + public static function padRight($value, $length, $pad = ' ') + { + return str_pad($value, strlen($value) - mb_strlen($value) + $length, $pad, STR_PAD_RIGHT); + } + + /** + * Parse a Class[@]method style callback into class and method. + * + * @param string $callback + * @param string|null $default + * @return array + */ + public static function parseCallback($callback, $default = null) + { + return static::contains($callback, '@') ? explode('@', $callback, 2) : [$callback, $default]; + } + + /** + * Get the plural form of an English word. + * + * @param string $value + * @param int|array|\Countable $count + * @return string + */ + public static function plural($value, $count = 2) + { + return Pluralizer::plural($value, $count); + } + + /** + * Pluralize the last word of an English, studly caps case string. + * + * @param string $value + * @param int|array|\Countable $count + * @return string + */ + public static function pluralStudly($value, $count = 2) + { + $parts = preg_split('/(.)(?=[A-Z])/u', $value, -1, PREG_SPLIT_DELIM_CAPTURE); + + $lastWord = array_pop($parts); + + return implode('', $parts).self::plural($lastWord, $count); + } + + /** + * Generate a more truly "random" alpha-numeric string. + * + * @param int $length + * @return string + */ + public static function random($length = 16) + { + $string = ''; + + while (($len = strlen($string)) < $length) { + $size = $length - $len; + + $bytes = random_bytes($size); + + $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); + } + + return $string; + } + + /** + * Repeat the given string. + * + * @param string $string + * @param int $times + * @return string + */ + public static function repeat(string $string, int $times) + { + return str_repeat($string, $times); + } + + /** + * Replace a given value in the string sequentially with an array. + * + * @param string $search + * @param array $replace + * @param string $subject + * @return string + */ + public static function replaceArray($search, array $replace, $subject) + { + $segments = explode($search, $subject); + + $result = array_shift($segments); + + foreach ($segments as $segment) { + $result .= (array_shift($replace) ?? $search).$segment; + } + + return $result; + } + + /** + * Replace the given value in the given string. + * + * @param string|string[] $search + * @param string|string[] $replace + * @param string|string[] $subject + * @return string + */ + public static function replace($search, $replace, $subject) + { + return str_replace($search, $replace, $subject); + } + + /** + * Replace the first occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + public static function replaceFirst($search, $replace, $subject) + { + if ($search === '') { + return $subject; + } + + $position = strpos($subject, $search); + + if ($position !== false) { + return substr_replace($subject, $replace, $position, strlen($search)); + } + + return $subject; + } + + /** + * Replace the last occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + public static function replaceLast($search, $replace, $subject) + { + if ($search === '') { + return $subject; + } + + $position = strrpos($subject, $search); + + if ($position !== false) { + return substr_replace($subject, $replace, $position, strlen($search)); + } + + return $subject; + } + + /** + * Remove any occurrence of the given string in the subject. + * + * @param string|array $search + * @param string $subject + * @param bool $caseSensitive + * @return string + */ + public static function remove($search, $subject, $caseSensitive = true) + { + $subject = $caseSensitive + ? str_replace($search, '', $subject) + : str_ireplace($search, '', $subject); + + return $subject; + } + + /** + * Reverse the given string. + * + * @param string $value + * @return string + */ + public static function reverse(string $value) + { + return implode(array_reverse(mb_str_split($value))); + } + + /** + * Begin a string with a single instance of a given value. + * + * @param string $value + * @param string $prefix + * @return string + */ + public static function start($value, $prefix) + { + $quoted = preg_quote($prefix, '/'); + + return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value); + } + + /** + * Convert the given string to upper-case. + * + * @param string $value + * @return string + */ + public static function upper($value) + { + return mb_strtoupper($value, 'UTF-8'); + } + + /** + * Convert the given string to title case. + * + * @param string $value + * @return string + */ + public static function title($value) + { + return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); + } + + /** + * Convert the given string to title case for each word. + * + * @param string $value + * @return string + */ + public static function headline($value) + { + $parts = explode(' ', $value); + + $parts = count($parts) > 1 + ? $parts = array_map([static::class, 'title'], $parts) + : $parts = array_map([static::class, 'title'], static::ucsplit(implode('_', $parts))); + + $collapsed = static::replace(['-', '_', ' '], '_', implode('_', $parts)); + + return implode(' ', array_filter(explode('_', $collapsed))); + } + + /** + * Get the singular form of an English word. + * + * @param string $value + * @return string + */ + public static function singular($value) + { + return Pluralizer::singular($value); + } + + /** + * Generate a URL friendly "slug" from a given string. + * + * @param string $title + * @param string $separator + * @param string|null $language + * @return string + */ + public static function slug($title, $separator = '-', $language = 'en') + { + $title = $language ? static::ascii($title, $language) : $title; + + // Convert all dashes/underscores into separator + $flip = $separator === '-' ? '_' : '-'; + + $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); + + // Replace @ with the word 'at' + $title = str_replace('@', $separator.'at'.$separator, $title); + + // Remove all characters that are not the separator, letters, numbers, or whitespace. + $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', static::lower($title)); + + // Replace all separator characters and whitespace by a single separator + $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); + + return trim($title, $separator); + } + + /** + * Convert a string to snake case. + * + * @param string $value + * @param string $delimiter + * @return string + */ + public static function snake($value, $delimiter = '_') + { + $key = $value; + + if (isset(static::$snakeCache[$key][$delimiter])) { + return static::$snakeCache[$key][$delimiter]; + } + + if (! ctype_lower($value)) { + $value = preg_replace('/\s+/u', '', ucwords($value)); + + $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); + } + + return static::$snakeCache[$key][$delimiter] = $value; + } + + /** + * Determine if a given string starts with a given substring. + * + * @param string $haystack + * @param string|string[] $needles + * @return bool + */ + public static function startsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ((string) $needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0) { + return true; + } + } + + return false; + } + + /** + * Convert a value to studly caps case. + * + * @param string $value + * @return string + */ + public static function studly($value) + { + $key = $value; + + if (isset(static::$studlyCache[$key])) { + return static::$studlyCache[$key]; + } + + $words = explode(' ', static::replace(['-', '_'], ' ', $value)); + + $studlyWords = array_map(function ($word) { + return static::ucfirst($word); + }, $words); + + return static::$studlyCache[$key] = implode($studlyWords); + } + + /** + * Returns the portion of the string specified by the start and length parameters. + * + * @param string $string + * @param int $start + * @param int|null $length + * @return string + */ + public static function substr($string, $start, $length = null) + { + return mb_substr($string, $start, $length, 'UTF-8'); + } + + /** + * Returns the number of substring occurrences. + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @param int|null $length + * @return int + */ + public static function substrCount($haystack, $needle, $offset = 0, $length = null) + { + if (! is_null($length)) { + return substr_count($haystack, $needle, $offset, $length); + } else { + return substr_count($haystack, $needle, $offset); + } + } + + /** + * Replace text within a portion of a string. + * + * @param string|array $string + * @param string|array $replace + * @param array|int $offset + * @param array|int|null $length + * @return string|array + */ + public static function substrReplace($string, $replace, $offset = 0, $length = null) + { + if ($length === null) { + $length = strlen($string); + } + + return substr_replace($string, $replace, $offset, $length); + } + + /** + * Swap multiple keywords in a string with other keywords. + * + * @param array $map + * @param string $subject + * @return string + */ + public static function swap(array $map, $subject) + { + return strtr($subject, $map); + } + + /** + * Make a string's first character uppercase. + * + * @param string $string + * @return string + */ + public static function ucfirst($string) + { + return static::upper(static::substr($string, 0, 1)).static::substr($string, 1); + } + + /** + * Split a string into pieces by uppercase characters. + * + * @param string $string + * @return array + */ + public static function ucsplit($string) + { + return preg_split('/(?=\p{Lu})/u', $string, -1, PREG_SPLIT_NO_EMPTY); + } + + /** + * Get the number of words a string contains. + * + * @param string $string + * @return int + */ + public static function wordCount($string) + { + return str_word_count($string); + } + + /** + * Generate a UUID (version 4). + * + * @return \Ramsey\Uuid\UuidInterface + */ + public static function uuid() + { + return static::$uuidFactory + ? call_user_func(static::$uuidFactory) + : Uuid::uuid4(); + } + + /** + * Generate a time-ordered UUID (version 4). + * + * @return \Ramsey\Uuid\UuidInterface + */ + public static function orderedUuid() + { + if (static::$uuidFactory) { + return call_user_func(static::$uuidFactory); + } + + $factory = new UuidFactory; + + $factory->setRandomGenerator(new CombGenerator( + $factory->getRandomGenerator(), + $factory->getNumberConverter() + )); + + $factory->setCodec(new TimestampFirstCombCodec( + $factory->getUuidBuilder() + )); + + return $factory->uuid4(); + } + + /** + * Set the callable that will be used to generate UUIDs. + * + * @param callable|null $factory + * @return void + */ + public static function createUuidsUsing(callable $factory = null) + { + static::$uuidFactory = $factory; + } + + /** + * Indicate that UUIDs should be created normally and not using a custom factory. + * + * @return void + */ + public static function createUuidsNormally() + { + static::$uuidFactory = null; + } + + /** + * Remove all strings from the casing caches. + * + * @return void + */ + public static function flushCache() + { + static::$snakeCache = []; + static::$camelCache = []; + static::$studlyCache = []; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Stringable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Stringable.php new file mode 100644 index 00000000000..414be0c2735 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Stringable.php @@ -0,0 +1,1026 @@ +value = (string) $value; + } + + /** + * Return the remainder of a string after the first occurrence of a given value. + * + * @param string $search + * @return static + */ + public function after($search) + { + return new static(Str::after($this->value, $search)); + } + + /** + * Return the remainder of a string after the last occurrence of a given value. + * + * @param string $search + * @return static + */ + public function afterLast($search) + { + return new static(Str::afterLast($this->value, $search)); + } + + /** + * Append the given values to the string. + * + * @param array $values + * @return static + */ + public function append(...$values) + { + return new static($this->value.implode('', $values)); + } + + /** + * Transliterate a UTF-8 value to ASCII. + * + * @param string $language + * @return static + */ + public function ascii($language = 'en') + { + return new static(Str::ascii($this->value, $language)); + } + + /** + * Get the trailing name component of the path. + * + * @param string $suffix + * @return static + */ + public function basename($suffix = '') + { + return new static(basename($this->value, $suffix)); + } + + /** + * Get the basename of the class path. + * + * @return static + */ + public function classBasename() + { + return new static(class_basename($this->value)); + } + + /** + * Get the portion of a string before the first occurrence of a given value. + * + * @param string $search + * @return static + */ + public function before($search) + { + return new static(Str::before($this->value, $search)); + } + + /** + * Get the portion of a string before the last occurrence of a given value. + * + * @param string $search + * @return static + */ + public function beforeLast($search) + { + return new static(Str::beforeLast($this->value, $search)); + } + + /** + * Get the portion of a string between two given values. + * + * @param string $from + * @param string $to + * @return static + */ + public function between($from, $to) + { + return new static(Str::between($this->value, $from, $to)); + } + + /** + * Convert a value to camel case. + * + * @return static + */ + public function camel() + { + return new static(Str::camel($this->value)); + } + + /** + * Determine if a given string contains a given substring. + * + * @param string|array $needles + * @return bool + */ + public function contains($needles) + { + return Str::contains($this->value, $needles); + } + + /** + * Determine if a given string contains all array values. + * + * @param array $needles + * @return bool + */ + public function containsAll(array $needles) + { + return Str::containsAll($this->value, $needles); + } + + /** + * Get the parent directory's path. + * + * @param int $levels + * @return static + */ + public function dirname($levels = 1) + { + return new static(dirname($this->value, $levels)); + } + + /** + * Determine if a given string ends with a given substring. + * + * @param string|array $needles + * @return bool + */ + public function endsWith($needles) + { + return Str::endsWith($this->value, $needles); + } + + /** + * Determine if the string is an exact match with the given value. + * + * @param string $value + * @return bool + */ + public function exactly($value) + { + return $this->value === $value; + } + + /** + * Explode the string into an array. + * + * @param string $delimiter + * @param int $limit + * @return \Illuminate\Support\Collection + */ + public function explode($delimiter, $limit = PHP_INT_MAX) + { + return collect(explode($delimiter, $this->value, $limit)); + } + + /** + * Split a string using a regular expression or by length. + * + * @param string|int $pattern + * @param int $limit + * @param int $flags + * @return \Illuminate\Support\Collection + */ + public function split($pattern, $limit = -1, $flags = 0) + { + if (filter_var($pattern, FILTER_VALIDATE_INT) !== false) { + return collect(mb_str_split($this->value, $pattern)); + } + + $segments = preg_split($pattern, $this->value, $limit, $flags); + + return ! empty($segments) ? collect($segments) : collect(); + } + + /** + * Cap a string with a single instance of a given value. + * + * @param string $cap + * @return static + */ + public function finish($cap) + { + return new static(Str::finish($this->value, $cap)); + } + + /** + * Determine if a given string matches a given pattern. + * + * @param string|array $pattern + * @return bool + */ + public function is($pattern) + { + return Str::is($pattern, $this->value); + } + + /** + * Determine if a given string is 7 bit ASCII. + * + * @return bool + */ + public function isAscii() + { + return Str::isAscii($this->value); + } + + /** + * Determine if a given string is a valid UUID. + * + * @return bool + */ + public function isUuid() + { + return Str::isUuid($this->value); + } + + /** + * Determine if the given string is empty. + * + * @return bool + */ + public function isEmpty() + { + return $this->value === ''; + } + + /** + * Determine if the given string is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return ! $this->isEmpty(); + } + + /** + * Convert a string to kebab case. + * + * @return static + */ + public function kebab() + { + return new static(Str::kebab($this->value)); + } + + /** + * Return the length of the given string. + * + * @param string $encoding + * @return int + */ + public function length($encoding = null) + { + return Str::length($this->value, $encoding); + } + + /** + * Limit the number of characters in a string. + * + * @param int $limit + * @param string $end + * @return static + */ + public function limit($limit = 100, $end = '...') + { + return new static(Str::limit($this->value, $limit, $end)); + } + + /** + * Convert the given string to lower-case. + * + * @return static + */ + public function lower() + { + return new static(Str::lower($this->value)); + } + + /** + * Convert GitHub flavored Markdown into HTML. + * + * @param array $options + * @return static + */ + public function markdown(array $options = []) + { + return new static(Str::markdown($this->value, $options)); + } + + /** + * Masks a portion of a string with a repeated character. + * + * @param string $character + * @param int $index + * @param int|null $length + * @param string $encoding + * @return static + */ + public function mask($character, $index, $length = null, $encoding = 'UTF-8') + { + return new static(Str::mask($this->value, $character, $index, $length, $encoding)); + } + + /** + * Get the string matching the given pattern. + * + * @param string $pattern + * @return static + */ + public function match($pattern) + { + return new static(Str::match($pattern, $this->value)); + } + + /** + * Get the string matching the given pattern. + * + * @param string $pattern + * @return \Illuminate\Support\Collection + */ + public function matchAll($pattern) + { + return Str::matchAll($pattern, $this->value); + } + + /** + * Determine if the string matches the given pattern. + * + * @param string $pattern + * @return bool + */ + public function test($pattern) + { + return $this->match($pattern)->isNotEmpty(); + } + + /** + * Pad both sides of the string with another. + * + * @param int $length + * @param string $pad + * @return static + */ + public function padBoth($length, $pad = ' ') + { + return new static(Str::padBoth($this->value, $length, $pad)); + } + + /** + * Pad the left side of the string with another. + * + * @param int $length + * @param string $pad + * @return static + */ + public function padLeft($length, $pad = ' ') + { + return new static(Str::padLeft($this->value, $length, $pad)); + } + + /** + * Pad the right side of the string with another. + * + * @param int $length + * @param string $pad + * @return static + */ + public function padRight($length, $pad = ' ') + { + return new static(Str::padRight($this->value, $length, $pad)); + } + + /** + * Parse a Class@method style callback into class and method. + * + * @param string|null $default + * @return array + */ + public function parseCallback($default = null) + { + return Str::parseCallback($this->value, $default); + } + + /** + * Call the given callback and return a new string. + * + * @param callable $callback + * @return static + */ + public function pipe(callable $callback) + { + return new static(call_user_func($callback, $this)); + } + + /** + * Get the plural form of an English word. + * + * @param int $count + * @return static + */ + public function plural($count = 2) + { + return new static(Str::plural($this->value, $count)); + } + + /** + * Pluralize the last word of an English, studly caps case string. + * + * @param int $count + * @return static + */ + public function pluralStudly($count = 2) + { + return new static(Str::pluralStudly($this->value, $count)); + } + + /** + * Prepend the given values to the string. + * + * @param array $values + * @return static + */ + public function prepend(...$values) + { + return new static(implode('', $values).$this->value); + } + + /** + * Remove any occurrence of the given string in the subject. + * + * @param string|array $search + * @param bool $caseSensitive + * @return static + */ + public function remove($search, $caseSensitive = true) + { + return new static(Str::remove($search, $this->value, $caseSensitive)); + } + + /** + * Reverse the string. + * + * @return static + */ + public function reverse() + { + return new static(Str::reverse($this->value)); + } + + /** + * Repeat the string. + * + * @param int $times + * @return static + */ + public function repeat(int $times) + { + return new static(Str::repeat($this->value, $times)); + } + + /** + * Replace the given value in the given string. + * + * @param string|string[] $search + * @param string|string[] $replace + * @return static + */ + public function replace($search, $replace) + { + return new static(Str::replace($search, $replace, $this->value)); + } + + /** + * Replace a given value in the string sequentially with an array. + * + * @param string $search + * @param array $replace + * @return static + */ + public function replaceArray($search, array $replace) + { + return new static(Str::replaceArray($search, $replace, $this->value)); + } + + /** + * Replace the first occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @return static + */ + public function replaceFirst($search, $replace) + { + return new static(Str::replaceFirst($search, $replace, $this->value)); + } + + /** + * Replace the last occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @return static + */ + public function replaceLast($search, $replace) + { + return new static(Str::replaceLast($search, $replace, $this->value)); + } + + /** + * Replace the patterns matching the given regular expression. + * + * @param string $pattern + * @param \Closure|string $replace + * @param int $limit + * @return static + */ + public function replaceMatches($pattern, $replace, $limit = -1) + { + if ($replace instanceof Closure) { + return new static(preg_replace_callback($pattern, $replace, $this->value, $limit)); + } + + return new static(preg_replace($pattern, $replace, $this->value, $limit)); + } + + /** + * Parse input from a string to a collection, according to a format. + * + * @param string $format + * @return \Illuminate\Support\Collection + */ + public function scan($format) + { + return collect(sscanf($this->value, $format)); + } + + /** + * Begin a string with a single instance of a given value. + * + * @param string $prefix + * @return static + */ + public function start($prefix) + { + return new static(Str::start($this->value, $prefix)); + } + + /** + * Strip HTML and PHP tags from the given string. + * + * @param string $allowedTags + * @return static + */ + public function stripTags($allowedTags = null) + { + return new static(strip_tags($this->value, $allowedTags)); + } + + /** + * Convert the given string to upper-case. + * + * @return static + */ + public function upper() + { + return new static(Str::upper($this->value)); + } + + /** + * Convert the given string to title case. + * + * @return static + */ + public function title() + { + return new static(Str::title($this->value)); + } + + /** + * Convert the given string to title case for each word. + * + * @return static + */ + public function headline() + { + return new static(Str::headline($this->value)); + } + + /** + * Get the singular form of an English word. + * + * @return static + */ + public function singular() + { + return new static(Str::singular($this->value)); + } + + /** + * Generate a URL friendly "slug" from a given string. + * + * @param string $separator + * @param string|null $language + * @return static + */ + public function slug($separator = '-', $language = 'en') + { + return new static(Str::slug($this->value, $separator, $language)); + } + + /** + * Convert a string to snake case. + * + * @param string $delimiter + * @return static + */ + public function snake($delimiter = '_') + { + return new static(Str::snake($this->value, $delimiter)); + } + + /** + * Determine if a given string starts with a given substring. + * + * @param string|array $needles + * @return bool + */ + public function startsWith($needles) + { + return Str::startsWith($this->value, $needles); + } + + /** + * Convert a value to studly caps case. + * + * @return static + */ + public function studly() + { + return new static(Str::studly($this->value)); + } + + /** + * Returns the portion of the string specified by the start and length parameters. + * + * @param int $start + * @param int|null $length + * @return static + */ + public function substr($start, $length = null) + { + return new static(Str::substr($this->value, $start, $length)); + } + + /** + * Returns the number of substring occurrences. + * + * @param string $needle + * @param int|null $offset + * @param int|null $length + * @return int + */ + public function substrCount($needle, $offset = null, $length = null) + { + return Str::substrCount($this->value, $needle, $offset ?? 0, $length); + } + + /** + * Replace text within a portion of a string. + * + * @param string|array $replace + * @param array|int $offset + * @param array|int|null $length + * @return static + */ + public function substrReplace($replace, $offset = 0, $length = null) + { + return new static(Str::substrReplace($this->value, $replace, $offset, $length)); + } + + /** + * Swap multiple keywords in a string with other keywords. + * + * @param array $map + * @return static + */ + public function swap(array $map) + { + return new static(strtr($this->value, $map)); + } + + /** + * Trim the string of the given characters. + * + * @param string $characters + * @return static + */ + public function trim($characters = null) + { + return new static(trim(...array_merge([$this->value], func_get_args()))); + } + + /** + * Left trim the string of the given characters. + * + * @param string $characters + * @return static + */ + public function ltrim($characters = null) + { + return new static(ltrim(...array_merge([$this->value], func_get_args()))); + } + + /** + * Right trim the string of the given characters. + * + * @param string $characters + * @return static + */ + public function rtrim($characters = null) + { + return new static(rtrim(...array_merge([$this->value], func_get_args()))); + } + + /** + * Make a string's first character uppercase. + * + * @return static + */ + public function ucfirst() + { + return new static(Str::ucfirst($this->value)); + } + + /** + * Split a string by uppercase characters. + * + * @return \Illuminate\Support\Collection + */ + public function ucsplit() + { + return collect(Str::ucsplit($this->value)); + } + + /** + * Execute the given callback if the string contains a given substring. + * + * @param string|array $needles + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenContains($needles, $callback, $default = null) + { + return $this->when($this->contains($needles), $callback, $default); + } + + /** + * Execute the given callback if the string contains all array values. + * + * @param array $needles + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenContainsAll(array $needles, $callback, $default = null) + { + return $this->when($this->containsAll($needles), $callback, $default); + } + + /** + * Execute the given callback if the string is empty. + * + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenEmpty($callback, $default = null) + { + return $this->when($this->isEmpty(), $callback, $default); + } + + /** + * Execute the given callback if the string is not empty. + * + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenNotEmpty($callback, $default = null) + { + return $this->when($this->isNotEmpty(), $callback, $default); + } + + /** + * Execute the given callback if the string ends with a given substring. + * + * @param string|array $needles + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenEndsWith($needles, $callback, $default = null) + { + return $this->when($this->endsWith($needles), $callback, $default); + } + + /** + * Execute the given callback if the string is an exact match with the given value. + * + * @param string $value + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenExactly($value, $callback, $default = null) + { + return $this->when($this->exactly($value), $callback, $default); + } + + /** + * Execute the given callback if the string matches a given pattern. + * + * @param string|array $pattern + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenIs($pattern, $callback, $default = null) + { + return $this->when($this->is($pattern), $callback, $default); + } + + /** + * Execute the given callback if the string is 7 bit ASCII. + * + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenIsAscii($callback, $default = null) + { + return $this->when($this->isAscii(), $callback, $default); + } + + /** + * Execute the given callback if the string is a valid UUID. + * + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenIsUuid($callback, $default = null) + { + return $this->when($this->isUuid(), $callback, $default); + } + + /** + * Execute the given callback if the string starts with a given substring. + * + * @param string|array $needles + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenStartsWith($needles, $callback, $default = null) + { + return $this->when($this->startsWith($needles), $callback, $default); + } + + /** + * Execute the given callback if the string matches the given pattern. + * + * @param string $pattern + * @param callable $callback + * @param callable|null $default + * @return static + */ + public function whenTest($pattern, $callback, $default = null) + { + return $this->when($this->test($pattern), $callback, $default); + } + + /** + * Limit the number of words in a string. + * + * @param int $words + * @param string $end + * @return static + */ + public function words($words = 100, $end = '...') + { + return new static(Str::words($this->value, $words, $end)); + } + + /** + * Get the number of words a string contains. + * + * @return int + */ + public function wordCount() + { + return str_word_count($this->value); + } + + /** + * Convert the string into a `HtmlString` instance. + * + * @return \Illuminate\Support\HtmlString + */ + public function toHtmlString() + { + return new HtmlString($this->value); + } + + /** + * Dump the string. + * + * @return $this + */ + public function dump() + { + VarDumper::dump($this->value); + + return $this; + } + + /** + * Dump the string and end the script. + * + * @return never + */ + public function dd() + { + $this->dump(); + + exit(1); + } + + /** + * Convert the object to a string when JSON encoded. + * + * @return string + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->__toString(); + } + + /** + * Proxy dynamic properties onto methods. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->{$key}(); + } + + /** + * Get the raw string value. + * + * @return string + */ + public function __toString() + { + return (string) $this->value; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BatchRepositoryFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BatchRepositoryFake.php new file mode 100644 index 00000000000..d9661334ce0 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BatchRepositoryFake.php @@ -0,0 +1,142 @@ +name, + count($batch->jobs), + count($batch->jobs), + 0, + [], + $batch->options, + CarbonImmutable::now(), + null, + null + ); + } + + /** + * Increment the total number of jobs within the batch. + * + * @param string $batchId + * @param int $amount + * @return void + */ + public function incrementTotalJobs(string $batchId, int $amount) + { + // + } + + /** + * Decrement the total number of pending jobs for the batch. + * + * @param string $batchId + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function decrementPendingJobs(string $batchId, string $jobId) + { + return new UpdatedBatchJobCounts; + } + + /** + * Increment the total number of failed jobs for the batch. + * + * @param string $batchId + * @param string $jobId + * @return \Illuminate\Bus\UpdatedBatchJobCounts + */ + public function incrementFailedJobs(string $batchId, string $jobId) + { + return new UpdatedBatchJobCounts; + } + + /** + * Mark the batch that has the given ID as finished. + * + * @param string $batchId + * @return void + */ + public function markAsFinished(string $batchId) + { + // + } + + /** + * Cancel the batch that has the given ID. + * + * @param string $batchId + * @return void + */ + public function cancel(string $batchId) + { + // + } + + /** + * Delete the batch that has the given ID. + * + * @param string $batchId + * @return void + */ + public function delete(string $batchId) + { + // + } + + /** + * Execute the given Closure within a storage specific transaction. + * + * @param \Closure $callback + * @return mixed + */ + public function transaction(Closure $callback) + { + return $callback(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BusFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BusFake.php new file mode 100644 index 00000000000..122252d8f00 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/BusFake.php @@ -0,0 +1,739 @@ +dispatcher = $dispatcher; + + $this->jobsToFake = Arr::wrap($jobsToFake); + } + + /** + * Assert if a job was dispatched based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|int|null $callback + * @return void + */ + public function assertDispatched($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + if (is_numeric($callback)) { + return $this->assertDispatchedTimes($command, $callback); + } + + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->count() > 0 || + $this->dispatchedAfterResponse($command, $callback)->count() > 0 || + $this->dispatchedSync($command, $callback)->count() > 0, + "The expected [{$command}] job was not dispatched." + ); + } + + /** + * Assert if a job was pushed a number of times. + * + * @param string $command + * @param int $times + * @return void + */ + public function assertDispatchedTimes($command, $times = 1) + { + $count = $this->dispatched($command)->count() + + $this->dispatchedAfterResponse($command)->count() + + $this->dispatchedSync($command)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$command}] job was pushed {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a job was dispatched based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|null $callback + * @return void + */ + public function assertNotDispatched($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->count() === 0 && + $this->dispatchedAfterResponse($command, $callback)->count() === 0 && + $this->dispatchedSync($command, $callback)->count() === 0, + "The unexpected [{$command}] job was dispatched." + ); + } + + /** + * Assert that no jobs were dispatched. + * + * @return void + */ + public function assertNothingDispatched() + { + PHPUnit::assertEmpty($this->commands, 'Jobs were dispatched unexpectedly.'); + } + + /** + * Assert if a job was explicitly dispatched synchronously based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|int|null $callback + * @return void + */ + public function assertDispatchedSync($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + if (is_numeric($callback)) { + return $this->assertDispatchedSyncTimes($command, $callback); + } + + PHPUnit::assertTrue( + $this->dispatchedSync($command, $callback)->count() > 0, + "The expected [{$command}] job was not dispatched synchronously." + ); + } + + /** + * Assert if a job was pushed synchronously a number of times. + * + * @param string $command + * @param int $times + * @return void + */ + public function assertDispatchedSyncTimes($command, $times = 1) + { + $count = $this->dispatchedSync($command)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$command}] job was synchronously pushed {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a job was dispatched based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|null $callback + * @return void + */ + public function assertNotDispatchedSync($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + PHPUnit::assertCount( + 0, $this->dispatchedSync($command, $callback), + "The unexpected [{$command}] job was dispatched synchronously." + ); + } + + /** + * Assert if a job was dispatched after the response was sent based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|int|null $callback + * @return void + */ + public function assertDispatchedAfterResponse($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + if (is_numeric($callback)) { + return $this->assertDispatchedAfterResponseTimes($command, $callback); + } + + PHPUnit::assertTrue( + $this->dispatchedAfterResponse($command, $callback)->count() > 0, + "The expected [{$command}] job was not dispatched after sending the response." + ); + } + + /** + * Assert if a job was pushed after the response was sent a number of times. + * + * @param string $command + * @param int $times + * @return void + */ + public function assertDispatchedAfterResponseTimes($command, $times = 1) + { + $count = $this->dispatchedAfterResponse($command)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$command}] job was pushed {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a job was dispatched based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|null $callback + * @return void + */ + public function assertNotDispatchedAfterResponse($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + PHPUnit::assertCount( + 0, $this->dispatchedAfterResponse($command, $callback), + "The unexpected [{$command}] job was dispatched after sending the response." + ); + } + + /** + * Assert if a chain of jobs was dispatched. + * + * @param array $expectedChain + * @return void + */ + public function assertChained(array $expectedChain) + { + $command = $expectedChain[0]; + + $expectedChain = array_slice($expectedChain, 1); + + $callback = null; + + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } elseif (! is_string($command)) { + $instance = $command; + + $command = get_class($instance); + + $callback = function ($job) use ($instance) { + return serialize($this->resetChainPropertiesToDefaults($job)) === serialize($instance); + }; + } + + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->isNotEmpty(), + "The expected [{$command}] job was not dispatched." + ); + + PHPUnit::assertTrue( + collect($expectedChain)->isNotEmpty(), + 'The expected chain can not be empty.' + ); + + $this->isChainOfObjects($expectedChain) + ? $this->assertDispatchedWithChainOfObjects($command, $expectedChain, $callback) + : $this->assertDispatchedWithChainOfClasses($command, $expectedChain, $callback); + } + + /** + * Reset the chain properties to their default values on the job. + * + * @param mixed $job + * @return mixed + */ + protected function resetChainPropertiesToDefaults($job) + { + return tap(clone $job, function ($job) { + $job->chainConnection = null; + $job->chainQueue = null; + $job->chainCatchCallbacks = null; + $job->chained = []; + }); + } + + /** + * Assert if a job was dispatched with an empty chain based on a truth-test callback. + * + * @param string|\Closure $command + * @param callable|null $callback + * @return void + */ + public function assertDispatchedWithoutChain($command, $callback = null) + { + if ($command instanceof Closure) { + [$command, $callback] = [$this->firstClosureParameterType($command), $command]; + } + + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->isNotEmpty(), + "The expected [{$command}] job was not dispatched." + ); + + $this->assertDispatchedWithChainOfClasses($command, [], $callback); + } + + /** + * Assert if a job was dispatched with chained jobs based on a truth-test callback. + * + * @param string $command + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertDispatchedWithChainOfObjects($command, $expectedChain, $callback) + { + $chain = collect($expectedChain)->map(function ($job) { + return serialize($job); + })->all(); + + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->filter(function ($job) use ($chain) { + return $job->chained == $chain; + })->isNotEmpty(), + 'The expected chain was not dispatched.' + ); + } + + /** + * Assert if a job was dispatched with chained jobs based on a truth-test callback. + * + * @param string $command + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertDispatchedWithChainOfClasses($command, $expectedChain, $callback) + { + $matching = $this->dispatched($command, $callback)->map->chained->map(function ($chain) { + return collect($chain)->map(function ($job) { + return get_class(unserialize($job)); + }); + })->filter(function ($chain) use ($expectedChain) { + return $chain->all() === $expectedChain; + }); + + PHPUnit::assertTrue( + $matching->isNotEmpty(), 'The expected chain was not dispatched.' + ); + } + + /** + * Determine if the given chain is entirely composed of objects. + * + * @param array $chain + * @return bool + */ + protected function isChainOfObjects($chain) + { + return ! collect($chain)->contains(function ($job) { + return ! is_object($job); + }); + } + + /** + * Assert if a batch was dispatched based on a truth-test callback. + * + * @param callable $callback + * @return void + */ + public function assertBatched(callable $callback) + { + PHPUnit::assertTrue( + $this->batched($callback)->count() > 0, + 'The expected batch was not dispatched.' + ); + } + + /** + * Assert the number of batches that have been dispatched. + * + * @param int $count + * @return void + */ + public function assertBatchCount($count) + { + PHPUnit::assertCount( + $count, $this->batches, + ); + } + + /** + * Get all of the jobs matching a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatched($command, $callback = null) + { + if (! $this->hasDispatched($command)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->commands[$command])->filter(function ($command) use ($callback) { + return $callback($command); + }); + } + + /** + * Get all of the jobs dispatched synchronously matching a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatchedSync(string $command, $callback = null) + { + if (! $this->hasDispatchedSync($command)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->commandsSync[$command])->filter(function ($command) use ($callback) { + return $callback($command); + }); + } + + /** + * Get all of the jobs dispatched after the response was sent matching a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatchedAfterResponse(string $command, $callback = null) + { + if (! $this->hasDispatchedAfterResponse($command)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->commandsAfterResponse[$command])->filter(function ($command) use ($callback) { + return $callback($command); + }); + } + + /** + * Get all of the pending batches matching a truth-test callback. + * + * @param callable $callback + * @return \Illuminate\Support\Collection + */ + public function batched(callable $callback) + { + if (empty($this->batches)) { + return collect(); + } + + return collect($this->batches)->filter(function ($batch) use ($callback) { + return $callback($batch); + }); + } + + /** + * Determine if there are any stored commands for a given class. + * + * @param string $command + * @return bool + */ + public function hasDispatched($command) + { + return isset($this->commands[$command]) && ! empty($this->commands[$command]); + } + + /** + * Determine if there are any stored commands for a given class. + * + * @param string $command + * @return bool + */ + public function hasDispatchedSync($command) + { + return isset($this->commandsSync[$command]) && ! empty($this->commandsSync[$command]); + } + + /** + * Determine if there are any stored commands for a given class. + * + * @param string $command + * @return bool + */ + public function hasDispatchedAfterResponse($command) + { + return isset($this->commandsAfterResponse[$command]) && ! empty($this->commandsAfterResponse[$command]); + } + + /** + * Dispatch a command to its appropriate handler. + * + * @param mixed $command + * @return mixed + */ + public function dispatch($command) + { + if ($this->shouldFakeJob($command)) { + $this->commands[get_class($command)][] = $command; + } else { + return $this->dispatcher->dispatch($command); + } + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * Queueable jobs will be dispatched to the "sync" queue. + * + * @param mixed $command + * @param mixed $handler + * @return mixed + */ + public function dispatchSync($command, $handler = null) + { + if ($this->shouldFakeJob($command)) { + $this->commandsSync[get_class($command)][] = $command; + } else { + return $this->dispatcher->dispatchSync($command, $handler); + } + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * @param mixed $command + * @param mixed $handler + * @return mixed + */ + public function dispatchNow($command, $handler = null) + { + if ($this->shouldFakeJob($command)) { + $this->commands[get_class($command)][] = $command; + } else { + return $this->dispatcher->dispatchNow($command, $handler); + } + } + + /** + * Dispatch a command to its appropriate handler behind a queue. + * + * @param mixed $command + * @return mixed + */ + public function dispatchToQueue($command) + { + if ($this->shouldFakeJob($command)) { + $this->commands[get_class($command)][] = $command; + } else { + return $this->dispatcher->dispatchToQueue($command); + } + } + + /** + * Dispatch a command to its appropriate handler. + * + * @param mixed $command + * @return mixed + */ + public function dispatchAfterResponse($command) + { + if ($this->shouldFakeJob($command)) { + $this->commandsAfterResponse[get_class($command)][] = $command; + } else { + return $this->dispatcher->dispatch($command); + } + } + + /** + * Create a new chain of queueable jobs. + * + * @param \Illuminate\Support\Collection|array $jobs + * @return \Illuminate\Foundation\Bus\PendingChain + */ + public function chain($jobs) + { + $jobs = Collection::wrap($jobs); + + return new PendingChainFake($this, $jobs->shift(), $jobs->toArray()); + } + + /** + * Attempt to find the batch with the given ID. + * + * @param string $batchId + * @return \Illuminate\Bus\Batch|null + */ + public function findBatch(string $batchId) + { + // + } + + /** + * Create a new batch of queueable jobs. + * + * @param \Illuminate\Support\Collection|array $jobs + * @return \Illuminate\Bus\PendingBatch + */ + public function batch($jobs) + { + return new PendingBatchFake($this, Collection::wrap($jobs)); + } + + /** + * Record the fake pending batch dispatch. + * + * @param \Illuminate\Bus\PendingBatch $pendingBatch + * @return \Illuminate\Bus\Batch + */ + public function recordPendingBatch(PendingBatch $pendingBatch) + { + $this->batches[] = $pendingBatch; + + return (new BatchRepositoryFake)->store($pendingBatch); + } + + /** + * Determine if a command should be faked or actually dispatched. + * + * @param mixed $command + * @return bool + */ + protected function shouldFakeJob($command) + { + if (empty($this->jobsToFake)) { + return true; + } + + return collect($this->jobsToFake) + ->filter(function ($job) use ($command) { + return $job instanceof Closure + ? $job($command) + : $job === get_class($command); + })->isNotEmpty(); + } + + /** + * Set the pipes commands should be piped through before dispatching. + * + * @param array $pipes + * @return $this + */ + public function pipeThrough(array $pipes) + { + $this->dispatcher->pipeThrough($pipes); + + return $this; + } + + /** + * Determine if the given command has a handler. + * + * @param mixed $command + * @return bool + */ + public function hasCommandHandler($command) + { + return $this->dispatcher->hasCommandHandler($command); + } + + /** + * Retrieve the handler for a command. + * + * @param mixed $command + * @return mixed + */ + public function getCommandHandler($command) + { + return $this->dispatcher->getCommandHandler($command); + } + + /** + * Map a command to a handler. + * + * @param array $map + * @return $this + */ + public function map(array $map) + { + $this->dispatcher->map($map); + + return $this; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/EventFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/EventFake.php new file mode 100644 index 00000000000..436173e9d3a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/EventFake.php @@ -0,0 +1,325 @@ +dispatcher = $dispatcher; + + $this->eventsToFake = Arr::wrap($eventsToFake); + } + + /** + * Assert if an event has a listener attached to it. + * + * @param string $expectedEvent + * @param string $expectedListener + * @return void + */ + public function assertListening($expectedEvent, $expectedListener) + { + foreach ($this->dispatcher->getListeners($expectedEvent) as $listenerClosure) { + $actualListener = (new ReflectionFunction($listenerClosure)) + ->getStaticVariables()['listener']; + + if (is_string($actualListener) && Str::endsWith($actualListener, '@handle')) { + $actualListener = Str::parseCallback($actualListener)[0]; + } + + if ($actualListener === $expectedListener || + ($actualListener instanceof Closure && + $expectedListener === Closure::class)) { + PHPUnit::assertTrue(true); + + return; + } + } + + PHPUnit::assertTrue( + false, + sprintf( + 'Event [%s] does not have the [%s] listener attached to it', + $expectedEvent, + print_r($expectedListener, true) + ) + ); + } + + /** + * Assert if an event was dispatched based on a truth-test callback. + * + * @param string|\Closure $event + * @param callable|int|null $callback + * @return void + */ + public function assertDispatched($event, $callback = null) + { + if ($event instanceof Closure) { + [$event, $callback] = [$this->firstClosureParameterType($event), $event]; + } + + if (is_int($callback)) { + return $this->assertDispatchedTimes($event, $callback); + } + + PHPUnit::assertTrue( + $this->dispatched($event, $callback)->count() > 0, + "The expected [{$event}] event was not dispatched." + ); + } + + /** + * Assert if an event was dispatched a number of times. + * + * @param string $event + * @param int $times + * @return void + */ + public function assertDispatchedTimes($event, $times = 1) + { + $count = $this->dispatched($event)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$event}] event was dispatched {$count} times instead of {$times} times." + ); + } + + /** + * Determine if an event was dispatched based on a truth-test callback. + * + * @param string|\Closure $event + * @param callable|null $callback + * @return void + */ + public function assertNotDispatched($event, $callback = null) + { + if ($event instanceof Closure) { + [$event, $callback] = [$this->firstClosureParameterType($event), $event]; + } + + PHPUnit::assertCount( + 0, $this->dispatched($event, $callback), + "The unexpected [{$event}] event was dispatched." + ); + } + + /** + * Assert that no events were dispatched. + * + * @return void + */ + public function assertNothingDispatched() + { + $count = count(Arr::flatten($this->events)); + + PHPUnit::assertSame( + 0, $count, + "{$count} unexpected events were dispatched." + ); + } + + /** + * Get all of the events matching a truth-test callback. + * + * @param string $event + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatched($event, $callback = null) + { + if (! $this->hasDispatched($event)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->events[$event])->filter(function ($arguments) use ($callback) { + return $callback(...$arguments); + }); + } + + /** + * Determine if the given event has been dispatched. + * + * @param string $event + * @return bool + */ + public function hasDispatched($event) + { + return isset($this->events[$event]) && ! empty($this->events[$event]); + } + + /** + * Register an event listener with the dispatcher. + * + * @param \Closure|string|array $events + * @param mixed $listener + * @return void + */ + public function listen($events, $listener = null) + { + $this->dispatcher->listen($events, $listener); + } + + /** + * Determine if a given event has listeners. + * + * @param string $eventName + * @return bool + */ + public function hasListeners($eventName) + { + return $this->dispatcher->hasListeners($eventName); + } + + /** + * Register an event and payload to be dispatched later. + * + * @param string $event + * @param array $payload + * @return void + */ + public function push($event, $payload = []) + { + // + } + + /** + * Register an event subscriber with the dispatcher. + * + * @param object|string $subscriber + * @return void + */ + public function subscribe($subscriber) + { + $this->dispatcher->subscribe($subscriber); + } + + /** + * Flush a set of pushed events. + * + * @param string $event + * @return void + */ + public function flush($event) + { + // + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function dispatch($event, $payload = [], $halt = false) + { + $name = is_object($event) ? get_class($event) : (string) $event; + + if ($this->shouldFakeEvent($name, $payload)) { + $this->events[$name][] = func_get_args(); + } else { + return $this->dispatcher->dispatch($event, $payload, $halt); + } + } + + /** + * Determine if an event should be faked or actually dispatched. + * + * @param string $eventName + * @param mixed $payload + * @return bool + */ + protected function shouldFakeEvent($eventName, $payload) + { + if (empty($this->eventsToFake)) { + return true; + } + + return collect($this->eventsToFake) + ->filter(function ($event) use ($eventName, $payload) { + return $event instanceof Closure + ? $event($eventName, $payload) + : $event === $eventName; + }) + ->isNotEmpty(); + } + + /** + * Remove a set of listeners from the dispatcher. + * + * @param string $event + * @return void + */ + public function forget($event) + { + // + } + + /** + * Forget all of the queued listeners. + * + * @return void + */ + public function forgetPushed() + { + // + } + + /** + * Dispatch an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @return array|null + */ + public function until($event, $payload = []) + { + return $this->dispatch($event, $payload, true); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/MailFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/MailFake.php new file mode 100644 index 00000000000..fff5f8fcb78 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/MailFake.php @@ -0,0 +1,445 @@ +prepareMailableAndCallback($mailable, $callback); + + if (is_numeric($callback)) { + return $this->assertSentTimes($mailable, $callback); + } + + $message = "The expected [{$mailable}] mailable was not sent."; + + if (count($this->queuedMailables) > 0) { + $message .= ' Did you mean to use assertQueued() instead?'; + } + + PHPUnit::assertTrue( + $this->sent($mailable, $callback)->count() > 0, + $message + ); + } + + /** + * Assert if a mailable was sent a number of times. + * + * @param string $mailable + * @param int $times + * @return void + */ + protected function assertSentTimes($mailable, $times = 1) + { + $count = $this->sent($mailable)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$mailable}] mailable was sent {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a mailable was not sent or queued to be sent based on a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return void + */ + public function assertNotOutgoing($mailable, $callback = null) + { + $this->assertNotSent($mailable, $callback); + $this->assertNotQueued($mailable, $callback); + } + + /** + * Determine if a mailable was not sent based on a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return void + */ + public function assertNotSent($mailable, $callback = null) + { + [$mailable, $callback] = $this->prepareMailableAndCallback($mailable, $callback); + + PHPUnit::assertCount( + 0, $this->sent($mailable, $callback), + "The unexpected [{$mailable}] mailable was sent." + ); + } + + /** + * Assert that no mailables were sent or queued to be sent. + * + * @return void + */ + public function assertNothingOutgoing() + { + $this->assertNothingSent(); + $this->assertNothingQueued(); + } + + /** + * Assert that no mailables were sent. + * + * @return void + */ + public function assertNothingSent() + { + $mailableNames = collect($this->mailables)->map(function ($mailable) { + return get_class($mailable); + })->join(', '); + + PHPUnit::assertEmpty($this->mailables, 'The following mailables were sent unexpectedly: '.$mailableNames); + } + + /** + * Assert if a mailable was queued based on a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|int|null $callback + * @return void + */ + public function assertQueued($mailable, $callback = null) + { + [$mailable, $callback] = $this->prepareMailableAndCallback($mailable, $callback); + + if (is_numeric($callback)) { + return $this->assertQueuedTimes($mailable, $callback); + } + + PHPUnit::assertTrue( + $this->queued($mailable, $callback)->count() > 0, + "The expected [{$mailable}] mailable was not queued." + ); + } + + /** + * Assert if a mailable was queued a number of times. + * + * @param string $mailable + * @param int $times + * @return void + */ + protected function assertQueuedTimes($mailable, $times = 1) + { + $count = $this->queued($mailable)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$mailable}] mailable was queued {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a mailable was not queued based on a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return void + */ + public function assertNotQueued($mailable, $callback = null) + { + [$mailable, $callback] = $this->prepareMailableAndCallback($mailable, $callback); + + PHPUnit::assertCount( + 0, $this->queued($mailable, $callback), + "The unexpected [{$mailable}] mailable was queued." + ); + } + + /** + * Assert that no mailables were queued. + * + * @return void + */ + public function assertNothingQueued() + { + $mailableNames = collect($this->queuedMailables)->map(function ($mailable) { + return get_class($mailable); + })->join(', '); + + PHPUnit::assertEmpty($this->queuedMailables, 'The following mailables were queued unexpectedly: '.$mailableNames); + } + + /** + * Get all of the mailables matching a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function sent($mailable, $callback = null) + { + [$mailable, $callback] = $this->prepareMailableAndCallback($mailable, $callback); + + if (! $this->hasSent($mailable)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return $this->mailablesOf($mailable)->filter(function ($mailable) use ($callback) { + return $callback($mailable); + }); + } + + /** + * Determine if the given mailable has been sent. + * + * @param string $mailable + * @return bool + */ + public function hasSent($mailable) + { + return $this->mailablesOf($mailable)->count() > 0; + } + + /** + * Get all of the queued mailables matching a truth-test callback. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function queued($mailable, $callback = null) + { + [$mailable, $callback] = $this->prepareMailableAndCallback($mailable, $callback); + + if (! $this->hasQueued($mailable)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return $this->queuedMailablesOf($mailable)->filter(function ($mailable) use ($callback) { + return $callback($mailable); + }); + } + + /** + * Determine if the given mailable has been queued. + * + * @param string $mailable + * @return bool + */ + public function hasQueued($mailable) + { + return $this->queuedMailablesOf($mailable)->count() > 0; + } + + /** + * Get all of the mailed mailables for a given type. + * + * @param string $type + * @return \Illuminate\Support\Collection + */ + protected function mailablesOf($type) + { + return collect($this->mailables)->filter(function ($mailable) use ($type) { + return $mailable instanceof $type; + }); + } + + /** + * Get all of the mailed mailables for a given type. + * + * @param string $type + * @return \Illuminate\Support\Collection + */ + protected function queuedMailablesOf($type) + { + return collect($this->queuedMailables)->filter(function ($mailable) use ($type) { + return $mailable instanceof $type; + }); + } + + /** + * Get a mailer instance by name. + * + * @param string|null $name + * @return \Illuminate\Contracts\Mail\Mailer + */ + public function mailer($name = null) + { + $this->currentMailer = $name; + + return $this; + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function to($users) + { + return (new PendingMailFake($this))->to($users); + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function bcc($users) + { + return (new PendingMailFake($this))->bcc($users); + } + + /** + * Send a new message with only a raw text part. + * + * @param string $text + * @param \Closure|string $callback + * @return void + */ + public function raw($text, $callback) + { + // + } + + /** + * Send a new message using a view. + * + * @param \Illuminate\Contracts\Mail\Mailable|string|array $view + * @param array $data + * @param \Closure|string|null $callback + * @return void + */ + public function send($view, array $data = [], $callback = null) + { + if (! $view instanceof Mailable) { + return; + } + + $view->mailer($this->currentMailer); + + if ($view instanceof ShouldQueue) { + return $this->queue($view, $data); + } + + $this->currentMailer = null; + + $this->mailables[] = $view; + } + + /** + * Queue a new e-mail message for sending. + * + * @param \Illuminate\Contracts\Mail\Mailable|string|array $view + * @param string|null $queue + * @return mixed + */ + public function queue($view, $queue = null) + { + if (! $view instanceof Mailable) { + return; + } + + $view->mailer($this->currentMailer); + + $this->currentMailer = null; + + $this->queuedMailables[] = $view; + } + + /** + * Queue a new e-mail message for sending after (n) seconds. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @param \Illuminate\Contracts\Mail\Mailable|string|array $view + * @param string|null $queue + * @return mixed + */ + public function later($delay, $view, $queue = null) + { + $this->queue($view, $queue); + } + + /** + * Get the array of failed recipients. + * + * @return array + */ + public function failures() + { + return []; + } + + /** + * Infer mailable class using reflection if a typehinted closure is passed to assertion. + * + * @param string|\Closure $mailable + * @param callable|null $callback + * @return array + */ + protected function prepareMailableAndCallback($mailable, $callback) + { + if ($mailable instanceof Closure) { + return [$this->firstClosureParameterType($mailable), $mailable]; + } + + return [$mailable, $callback]; + } + + /** + * Forget all of the resolved mailer instances. + * + * @return $this + */ + public function forgetMailers() + { + $this->currentMailer = null; + + return $this; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/NotificationFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/NotificationFake.php new file mode 100644 index 00000000000..c7b12f42d47 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/NotificationFake.php @@ -0,0 +1,327 @@ +assertSentTo(new AnonymousNotifiable, $notification, $callback); + } + + /** + * Assert if a notification was sent based on a truth-test callback. + * + * @param mixed $notifiable + * @param string|\Closure $notification + * @param callable|null $callback + * @return void + * + * @throws \Exception + */ + public function assertSentTo($notifiable, $notification, $callback = null) + { + if (is_array($notifiable) || $notifiable instanceof Collection) { + if (count($notifiable) === 0) { + throw new Exception('No notifiable given.'); + } + + foreach ($notifiable as $singleNotifiable) { + $this->assertSentTo($singleNotifiable, $notification, $callback); + } + + return; + } + + if ($notification instanceof Closure) { + [$notification, $callback] = [$this->firstClosureParameterType($notification), $notification]; + } + + if (is_numeric($callback)) { + return $this->assertSentToTimes($notifiable, $notification, $callback); + } + + PHPUnit::assertTrue( + $this->sent($notifiable, $notification, $callback)->count() > 0, + "The expected [{$notification}] notification was not sent." + ); + } + + /** + * Assert if a notification was sent on-demand a number of times. + * + * @param string $notification + * @param int $times + * @return void + */ + public function assertSentOnDemandTimes($notification, $times = 1) + { + return $this->assertSentToTimes(new AnonymousNotifiable, $notification, $times); + } + + /** + * Assert if a notification was sent a number of times. + * + * @param mixed $notifiable + * @param string $notification + * @param int $times + * @return void + */ + public function assertSentToTimes($notifiable, $notification, $times = 1) + { + $count = $this->sent($notifiable, $notification)->count(); + + PHPUnit::assertSame( + $times, $count, + "Expected [{$notification}] to be sent {$times} times, but was sent {$count} times." + ); + } + + /** + * Determine if a notification was sent based on a truth-test callback. + * + * @param mixed $notifiable + * @param string|\Closure $notification + * @param callable|null $callback + * @return void + * + * @throws \Exception + */ + public function assertNotSentTo($notifiable, $notification, $callback = null) + { + if (is_array($notifiable) || $notifiable instanceof Collection) { + if (count($notifiable) === 0) { + throw new Exception('No notifiable given.'); + } + + foreach ($notifiable as $singleNotifiable) { + $this->assertNotSentTo($singleNotifiable, $notification, $callback); + } + + return; + } + + if ($notification instanceof Closure) { + [$notification, $callback] = [$this->firstClosureParameterType($notification), $notification]; + } + + PHPUnit::assertCount( + 0, $this->sent($notifiable, $notification, $callback), + "The unexpected [{$notification}] notification was sent." + ); + } + + /** + * Assert that no notifications were sent. + * + * @return void + */ + public function assertNothingSent() + { + PHPUnit::assertEmpty($this->notifications, 'Notifications were sent unexpectedly.'); + } + + /** + * Assert the total amount of times a notification was sent. + * + * @param string $notification + * @param int $expectedCount + * @return void + */ + public function assertSentTimes($notification, $expectedCount) + { + $actualCount = collect($this->notifications) + ->flatten(1) + ->reduce(function ($count, $sent) use ($notification) { + return $count + count($sent[$notification] ?? []); + }, 0); + + PHPUnit::assertSame( + $expectedCount, $actualCount, + "Expected [{$notification}] to be sent {$expectedCount} times, but was sent {$actualCount} times." + ); + } + + /** + * Assert the total amount of times a notification was sent. + * + * @param int $expectedCount + * @param string $notification + * @return void + * + * @deprecated Use the assertSentTimes method instead + */ + public function assertTimesSent($expectedCount, $notification) + { + $this->assertSentTimes($notification, $expectedCount); + } + + /** + * Get all of the notifications matching a truth-test callback. + * + * @param mixed $notifiable + * @param string $notification + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function sent($notifiable, $notification, $callback = null) + { + if (! $this->hasSent($notifiable, $notification)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + $notifications = collect($this->notificationsFor($notifiable, $notification)); + + return $notifications->filter(function ($arguments) use ($callback) { + return $callback(...array_values($arguments)); + })->pluck('notification'); + } + + /** + * Determine if there are more notifications left to inspect. + * + * @param mixed $notifiable + * @param string $notification + * @return bool + */ + public function hasSent($notifiable, $notification) + { + return ! empty($this->notificationsFor($notifiable, $notification)); + } + + /** + * Get all of the notifications for a notifiable entity by type. + * + * @param mixed $notifiable + * @param string $notification + * @return array + */ + protected function notificationsFor($notifiable, $notification) + { + return $this->notifications[get_class($notifiable)][$notifiable->getKey()][$notification] ?? []; + } + + /** + * Send the given notification to the given notifiable entities. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @return void + */ + public function send($notifiables, $notification) + { + $this->sendNow($notifiables, $notification); + } + + /** + * Send the given notification immediately. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @param array|null $channels + * @return void + */ + public function sendNow($notifiables, $notification, array $channels = null) + { + if (! $notifiables instanceof Collection && ! is_array($notifiables)) { + $notifiables = [$notifiables]; + } + + foreach ($notifiables as $notifiable) { + if (! $notification->id) { + $notification->id = Str::uuid()->toString(); + } + + $notifiableChannels = $channels ?: $notification->via($notifiable); + + if (method_exists($notification, 'shouldSend')) { + $notifiableChannels = array_filter( + $notifiableChannels, + function ($channel) use ($notification, $notifiable) { + return $notification->shouldSend($notifiable, $channel) !== false; + } + ); + + if (empty($notifiableChannels)) { + continue; + } + } + + $this->notifications[get_class($notifiable)][$notifiable->getKey()][get_class($notification)][] = [ + 'notification' => $notification, + 'channels' => $notifiableChannels, + 'notifiable' => $notifiable, + 'locale' => $notification->locale ?? $this->locale ?? value(function () use ($notifiable) { + if ($notifiable instanceof HasLocalePreference) { + return $notifiable->preferredLocale(); + } + }), + ]; + } + } + + /** + * Get a channel instance by name. + * + * @param string|null $name + * @return mixed + */ + public function channel($name = null) + { + // + } + + /** + * Set the locale of notifications. + * + * @param string $locale + * @return $this + */ + public function locale($locale) + { + $this->locale = $locale; + + return $this; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingBatchFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingBatchFake.php new file mode 100644 index 00000000000..c60b4b50ba7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingBatchFake.php @@ -0,0 +1,39 @@ +bus = $bus; + $this->jobs = $jobs; + } + + /** + * Dispatch the batch. + * + * @return \Illuminate\Bus\Batch + */ + public function dispatch() + { + return $this->bus->recordPendingBatch($this); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingChainFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingChainFake.php new file mode 100644 index 00000000000..533c6498b33 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingChainFake.php @@ -0,0 +1,56 @@ +bus = $bus; + $this->job = $job; + $this->chain = $chain; + } + + /** + * Dispatch the job with the given arguments. + * + * @return \Illuminate\Foundation\Bus\PendingDispatch + */ + public function dispatch() + { + if (is_string($this->job)) { + $firstJob = new $this->job(...func_get_args()); + } elseif ($this->job instanceof Closure) { + $firstJob = CallQueuedClosure::create($this->job); + } else { + $firstJob = $this->job; + } + + $firstJob->allOnConnection($this->connection); + $firstJob->allOnQueue($this->queue); + $firstJob->chain($this->chain); + $firstJob->delay($this->delay); + $firstJob->chainCatchCallbacks = $this->catchCallbacks(); + + return $this->bus->dispatch($firstJob); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php new file mode 100644 index 00000000000..52251301ceb --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php @@ -0,0 +1,42 @@ +mailer = $mailer; + } + + /** + * Send a new mailable message instance. + * + * @param \Illuminate\Contracts\Mail\Mailable $mailable + * @return void + */ + public function send(Mailable $mailable) + { + $this->mailer->send($this->fill($mailable)); + } + + /** + * Push the given mailable onto the queue. + * + * @param \Illuminate\Contracts\Mail\Mailable $mailable + * @return mixed + */ + public function queue(Mailable $mailable) + { + return $this->mailer->queue($this->fill($mailable)); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/QueueFake.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/QueueFake.php new file mode 100644 index 00000000000..d37cd67237a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Testing/Fakes/QueueFake.php @@ -0,0 +1,414 @@ +firstClosureParameterType($job), $job]; + } + + if (is_numeric($callback)) { + return $this->assertPushedTimes($job, $callback); + } + + PHPUnit::assertTrue( + $this->pushed($job, $callback)->count() > 0, + "The expected [{$job}] job was not pushed." + ); + } + + /** + * Assert if a job was pushed a number of times. + * + * @param string $job + * @param int $times + * @return void + */ + protected function assertPushedTimes($job, $times = 1) + { + $count = $this->pushed($job)->count(); + + PHPUnit::assertSame( + $times, $count, + "The expected [{$job}] job was pushed {$count} times instead of {$times} times." + ); + } + + /** + * Assert if a job was pushed based on a truth-test callback. + * + * @param string $queue + * @param string|\Closure $job + * @param callable|null $callback + * @return void + */ + public function assertPushedOn($queue, $job, $callback = null) + { + if ($job instanceof Closure) { + [$job, $callback] = [$this->firstClosureParameterType($job), $job]; + } + + $this->assertPushed($job, function ($job, $pushedQueue) use ($callback, $queue) { + if ($pushedQueue !== $queue) { + return false; + } + + return $callback ? $callback(...func_get_args()) : true; + }); + } + + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + public function assertPushedWithChain($job, $expectedChain = [], $callback = null) + { + PHPUnit::assertTrue( + $this->pushed($job, $callback)->isNotEmpty(), + "The expected [{$job}] job was not pushed." + ); + + PHPUnit::assertTrue( + collect($expectedChain)->isNotEmpty(), + 'The expected chain can not be empty.' + ); + + $this->isChainOfObjects($expectedChain) + ? $this->assertPushedWithChainOfObjects($job, $expectedChain, $callback) + : $this->assertPushedWithChainOfClasses($job, $expectedChain, $callback); + } + + /** + * Assert if a job was pushed with an empty chain based on a truth-test callback. + * + * @param string $job + * @param callable|null $callback + * @return void + */ + public function assertPushedWithoutChain($job, $callback = null) + { + PHPUnit::assertTrue( + $this->pushed($job, $callback)->isNotEmpty(), + "The expected [{$job}] job was not pushed." + ); + + $this->assertPushedWithChainOfClasses($job, [], $callback); + } + + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertPushedWithChainOfObjects($job, $expectedChain, $callback) + { + $chain = collect($expectedChain)->map(function ($job) { + return serialize($job); + })->all(); + + PHPUnit::assertTrue( + $this->pushed($job, $callback)->filter(function ($job) use ($chain) { + return $job->chained == $chain; + })->isNotEmpty(), + 'The expected chain was not pushed.' + ); + } + + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertPushedWithChainOfClasses($job, $expectedChain, $callback) + { + $matching = $this->pushed($job, $callback)->map->chained->map(function ($chain) { + return collect($chain)->map(function ($job) { + return get_class(unserialize($job)); + }); + })->filter(function ($chain) use ($expectedChain) { + return $chain->all() === $expectedChain; + }); + + PHPUnit::assertTrue( + $matching->isNotEmpty(), 'The expected chain was not pushed.' + ); + } + + /** + * Determine if the given chain is entirely composed of objects. + * + * @param array $chain + * @return bool + */ + protected function isChainOfObjects($chain) + { + return ! collect($chain)->contains(function ($job) { + return ! is_object($job); + }); + } + + /** + * Determine if a job was pushed based on a truth-test callback. + * + * @param string|\Closure $job + * @param callable|null $callback + * @return void + */ + public function assertNotPushed($job, $callback = null) + { + if ($job instanceof Closure) { + [$job, $callback] = [$this->firstClosureParameterType($job), $job]; + } + + PHPUnit::assertCount( + 0, $this->pushed($job, $callback), + "The unexpected [{$job}] job was pushed." + ); + } + + /** + * Assert that no jobs were pushed. + * + * @return void + */ + public function assertNothingPushed() + { + PHPUnit::assertEmpty($this->jobs, 'Jobs were pushed unexpectedly.'); + } + + /** + * Get all of the jobs matching a truth-test callback. + * + * @param string $job + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function pushed($job, $callback = null) + { + if (! $this->hasPushed($job)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->jobs[$job])->filter(function ($data) use ($callback) { + return $callback($data['job'], $data['queue']); + })->pluck('job'); + } + + /** + * Determine if there are any stored jobs for a given class. + * + * @param string $job + * @return bool + */ + public function hasPushed($job) + { + return isset($this->jobs[$job]) && ! empty($this->jobs[$job]); + } + + /** + * Resolve a queue connection instance. + * + * @param mixed $value + * @return \Illuminate\Contracts\Queue\Queue + */ + public function connection($value = null) + { + return $this; + } + + /** + * Get the size of the queue. + * + * @param string|null $queue + * @return int + */ + public function size($queue = null) + { + return collect($this->jobs)->flatten(1)->filter(function ($job) use ($queue) { + return $job['queue'] === $queue; + })->count(); + } + + /** + * Push a new job onto the queue. + * + * @param string|object $job + * @param mixed $data + * @param string|null $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + $this->jobs[is_object($job) ? get_class($job) : $job][] = [ + 'job' => $job, + 'queue' => $queue, + ]; + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string|null $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + // + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @param string|object $job + * @param mixed $data + * @param string|null $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->push($job, $data, $queue); + } + + /** + * Push a new job onto the queue. + * + * @param string $queue + * @param string|object $job + * @param mixed $data + * @return mixed + */ + public function pushOn($queue, $job, $data = '') + { + return $this->push($job, $data, $queue); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param string $queue + * @param \DateTimeInterface|\DateInterval|int $delay + * @param string|object $job + * @param mixed $data + * @return mixed + */ + public function laterOn($queue, $delay, $job, $data = '') + { + return $this->push($job, $data, $queue); + } + + /** + * Pop the next job off of the queue. + * + * @param string|null $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + // + } + + /** + * Push an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string|null $queue + * @return mixed + */ + public function bulk($jobs, $data = '', $queue = null) + { + foreach ($jobs as $job) { + $this->push($job, $data, $queue); + } + } + + /** + * Get the jobs that have been pushed. + * + * @return array + */ + public function pushedJobs() + { + return $this->jobs; + } + + /** + * Get the connection name for the queue. + * + * @return string + */ + public function getConnectionName() + { + // + } + + /** + * Set the connection name for the queue. + * + * @param string $name + * @return $this + */ + public function setConnectionName($name) + { + return $this; + } + + /** + * Override the QueueManager to prevent circular dependency. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + throw new BadMethodCallException(sprintf( + 'Call to undefined method %s::%s()', static::class, $method + )); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/CapsuleManagerTrait.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/CapsuleManagerTrait.php new file mode 100644 index 00000000000..0532755228b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/CapsuleManagerTrait.php @@ -0,0 +1,69 @@ +container = $container; + + if (! $this->container->bound('config')) { + $this->container->instance('config', new Fluent); + } + } + + /** + * Make this capsule instance available globally. + * + * @return void + */ + public function setAsGlobal() + { + static::$instance = $this; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Contracts\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Conditionable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Conditionable.php new file mode 100644 index 00000000000..798082794f1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Conditionable.php @@ -0,0 +1,44 @@ +{$method}(...$parameters); + } catch (Error|BadMethodCallException $e) { + $pattern = '~^Call to undefined method (?P[^:]+)::(?P[^\(]+)\(\)$~'; + + if (! preg_match($pattern, $e->getMessage(), $matches)) { + throw $e; + } + + if ($matches['class'] != get_class($object) || + $matches['method'] != $method) { + throw $e; + } + + static::throwBadMethodCallException($method); + } + } + + /** + * Forward a method call to the given object, returning $this if the forwarded call returned itself. + * + * @param mixed $object + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + protected function forwardDecoratedCallTo($object, $method, $parameters) + { + $result = $this->forwardCallTo($object, $method, $parameters); + + if ($result === $object) { + return $this; + } + + return $result; + } + + /** + * Throw a bad method call exception for the given method. + * + * @param string $method + * @return void + * + * @throws \BadMethodCallException + */ + protected static function throwBadMethodCallException($method) + { + throw new BadMethodCallException(sprintf( + 'Call to undefined method %s::%s()', static::class, $method + )); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Localizable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Localizable.php new file mode 100644 index 00000000000..1e9fa58c90b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Localizable.php @@ -0,0 +1,34 @@ +getLocale(); + + try { + $app->setLocale($locale); + + return $callback(); + } finally { + $app->setLocale($original); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/ReflectsClosures.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/ReflectsClosures.php new file mode 100644 index 00000000000..bf47d7ec20c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/ReflectsClosures.php @@ -0,0 +1,88 @@ +closureParameterTypes($closure)); + + if (! $types) { + throw new RuntimeException('The given Closure has no parameters.'); + } + + if ($types[0] === null) { + throw new RuntimeException('The first parameter of the given Closure is missing a type hint.'); + } + + return $types[0]; + } + + /** + * Get the class names of the first parameter of the given Closure, including union types. + * + * @param \Closure $closure + * @return array + * + * @throws \ReflectionException + * @throws \RuntimeException + */ + protected function firstClosureParameterTypes(Closure $closure) + { + $reflection = new ReflectionFunction($closure); + + $types = collect($reflection->getParameters())->mapWithKeys(function ($parameter) { + if ($parameter->isVariadic()) { + return [$parameter->getName() => null]; + } + + return [$parameter->getName() => Reflector::getParameterClassNames($parameter)]; + })->filter()->values()->all(); + + if (empty($types)) { + throw new RuntimeException('The given Closure has no parameters.'); + } + + if (isset($types[0]) && empty($types[0])) { + throw new RuntimeException('The first parameter of the given Closure is missing a type hint.'); + } + + return $types[0]; + } + + /** + * Get the class names / types of the parameters of the given Closure. + * + * @param \Closure $closure + * @return array + * + * @throws \ReflectionException + */ + protected function closureParameterTypes(Closure $closure) + { + $reflection = new ReflectionFunction($closure); + + return collect($reflection->getParameters())->mapWithKeys(function ($parameter) { + if ($parameter->isVariadic()) { + return [$parameter->getName() => null]; + } + + return [$parameter->getName() => Reflector::getParameterClassName($parameter)]; + })->all(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Tappable.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Tappable.php new file mode 100644 index 00000000000..9353451ad0c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/Traits/Tappable.php @@ -0,0 +1,17 @@ +input = $input; + } + + /** + * Get a subset containing the provided keys with values from the input data. + * + * @param array|mixed $keys + * @return array + */ + public function only($keys) + { + $results = []; + + $input = $this->input; + + $placeholder = new stdClass; + + foreach (is_array($keys) ? $keys : func_get_args() as $key) { + $value = data_get($input, $key, $placeholder); + + if ($value !== $placeholder) { + Arr::set($results, $key, $value); + } + } + + return $results; + } + + /** + * Get all of the input except for a specified array of items. + * + * @param array|mixed $keys + * @return array + */ + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + $results = $this->input; + + Arr::forget($results, $keys); + + return $results; + } + + /** + * Merge the validated input with the given array of additional data. + * + * @param array $items + * @return static + */ + public function merge(array $items) + { + return new static(array_merge($this->input, $items)); + } + + /** + * Get the input as a collection. + * + * @return \Illuminate\Support\Collection + */ + public function collect() + { + return new Collection($this->input); + } + + /** + * Get the raw, underlying input array. + * + * @return array + */ + public function all() + { + return $this->input; + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return $this->all(); + } + + /** + * Dynamically access input data. + * + * @param string $name + * @return mixed + */ + public function __get($name) + { + return $this->input[$name]; + } + + /** + * Dynamically set input data. + * + * @param string $name + * @param mixed $value + * @return mixed + */ + public function __set($name, $value) + { + $this->input[$name] = $value; + } + + /** + * Determine if an input key is set. + * + * @return bool + */ + public function __isset($name) + { + return isset($this->input[$name]); + } + + /** + * Remove an input key. + * + * @param string $name + * @return void + */ + public function __unset($name) + { + unset($this->input[$name]); + } + + /** + * Determine if an item exists at an offset. + * + * @param mixed $key + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($key) + { + return isset($this->input[$key]); + } + + /** + * Get an item at a given offset. + * + * @param mixed $key + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($key) + { + return $this->input[$key]; + } + + /** + * Set the item at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($key, $value) + { + if (is_null($key)) { + $this->input[] = $value; + } else { + $this->input[$key] = $value; + } + } + + /** + * Unset the item at a given offset. + * + * @param string $key + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($key) + { + unset($this->input[$key]); + } + + /** + * Get an iterator for the input. + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->input); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ViewErrorBag.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ViewErrorBag.php new file mode 100644 index 00000000000..d51bb534d84 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/ViewErrorBag.php @@ -0,0 +1,131 @@ +bags[$key]); + } + + /** + * Get a MessageBag instance from the bags. + * + * @param string $key + * @return \Illuminate\Contracts\Support\MessageBag + */ + public function getBag($key) + { + return Arr::get($this->bags, $key) ?: new MessageBag; + } + + /** + * Get all the bags. + * + * @return array + */ + public function getBags() + { + return $this->bags; + } + + /** + * Add a new MessageBag instance to the bags. + * + * @param string $key + * @param \Illuminate\Contracts\Support\MessageBag $bag + * @return $this + */ + public function put($key, MessageBagContract $bag) + { + $this->bags[$key] = $bag; + + return $this; + } + + /** + * Determine if the default message bag has any messages. + * + * @return bool + */ + public function any() + { + return $this->count() > 0; + } + + /** + * Get the number of messages in the default bag. + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count() + { + return $this->getBag('default')->count(); + } + + /** + * Dynamically call methods on the default bag. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->getBag('default')->$method(...$parameters); + } + + /** + * Dynamically access a view error bag. + * + * @param string $key + * @return \Illuminate\Contracts\Support\MessageBag + */ + public function __get($key) + { + return $this->getBag($key); + } + + /** + * Dynamically set a view error bag. + * + * @param string $key + * @param \Illuminate\Contracts\Support\MessageBag $value + * @return void + */ + public function __set($key, $value) + { + $this->put($key, $value); + } + + /** + * Convert the default bag to its string representation. + * + * @return string + */ + public function __toString() + { + return (string) $this->getBag('default'); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/composer.json b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/composer.json new file mode 100644 index 00000000000..527bdcbb869 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/composer.json @@ -0,0 +1,55 @@ +{ + "name": "illuminate/support", + "description": "The Illuminate Support package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": "^7.3|^8.0", + "ext-json": "*", + "ext-mbstring": "*", + "doctrine/inflector": "^1.4|^2.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.53.1", + "voku/portable-ascii": "^1.6.1" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", + "symfony/process": "Required to use the composer class (^5.4).", + "symfony/var-dumper": "Required to use the dd function (^5.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/htdocs/includes/webklex/php-imap/vendor/illuminate/support/helpers.php b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/helpers.php new file mode 100755 index 00000000000..0b82fe76939 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/illuminate/support/helpers.php @@ -0,0 +1,379 @@ + $value) { + if (is_numeric($key)) { + $start++; + + $array[$start] = Arr::pull($array, $key); + } + } + + return $array; + } +} + +if (! function_exists('blank')) { + /** + * Determine if the given value is "blank". + * + * @param mixed $value + * @return bool + */ + function blank($value) + { + if (is_null($value)) { + return true; + } + + if (is_string($value)) { + return trim($value) === ''; + } + + if (is_numeric($value) || is_bool($value)) { + return false; + } + + if ($value instanceof Countable) { + return count($value) === 0; + } + + return empty($value); + } +} + +if (! function_exists('class_basename')) { + /** + * Get the class "basename" of the given object / class. + * + * @param string|object $class + * @return string + */ + function class_basename($class) + { + $class = is_object($class) ? get_class($class) : $class; + + return basename(str_replace('\\', '/', $class)); + } +} + +if (! function_exists('class_uses_recursive')) { + /** + * Returns all traits used by a class, its parent classes and trait of their traits. + * + * @param object|string $class + * @return array + */ + function class_uses_recursive($class) + { + if (is_object($class)) { + $class = get_class($class); + } + + $results = []; + + foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) { + $results += trait_uses_recursive($class); + } + + return array_unique($results); + } +} + +if (! function_exists('e')) { + /** + * Encode HTML special characters in a string. + * + * @param \Illuminate\Contracts\Support\DeferringDisplayableValue|\Illuminate\Contracts\Support\Htmlable|string|null $value + * @param bool $doubleEncode + * @return string + */ + function e($value, $doubleEncode = true) + { + if ($value instanceof DeferringDisplayableValue) { + $value = $value->resolveDisplayableValue(); + } + + if ($value instanceof Htmlable) { + return $value->toHtml(); + } + + return htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8', $doubleEncode); + } +} + +if (! function_exists('env')) { + /** + * Gets the value of an environment variable. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function env($key, $default = null) + { + return Env::get($key, $default); + } +} + +if (! function_exists('filled')) { + /** + * Determine if a value is "filled". + * + * @param mixed $value + * @return bool + */ + function filled($value) + { + return ! blank($value); + } +} + +if (! function_exists('object_get')) { + /** + * Get an item from an object using "dot" notation. + * + * @param object $object + * @param string|null $key + * @param mixed $default + * @return mixed + */ + function object_get($object, $key, $default = null) + { + if (is_null($key) || trim($key) === '') { + return $object; + } + + foreach (explode('.', $key) as $segment) { + if (! is_object($object) || ! isset($object->{$segment})) { + return value($default); + } + + $object = $object->{$segment}; + } + + return $object; + } +} + +if (! function_exists('optional')) { + /** + * Provide access to optional objects. + * + * @param mixed $value + * @param callable|null $callback + * @return mixed + */ + function optional($value = null, callable $callback = null) + { + if (is_null($callback)) { + return new Optional($value); + } elseif (! is_null($value)) { + return $callback($value); + } + } +} + +if (! function_exists('preg_replace_array')) { + /** + * Replace a given pattern with each value in the array in sequentially. + * + * @param string $pattern + * @param array $replacements + * @param string $subject + * @return string + */ + function preg_replace_array($pattern, array $replacements, $subject) + { + return preg_replace_callback($pattern, function () use (&$replacements) { + foreach ($replacements as $key => $value) { + return array_shift($replacements); + } + }, $subject); + } +} + +if (! function_exists('retry')) { + /** + * Retry an operation a given number of times. + * + * @param int $times + * @param callable $callback + * @param int|\Closure $sleepMilliseconds + * @param callable|null $when + * @return mixed + * + * @throws \Exception + */ + function retry($times, callable $callback, $sleepMilliseconds = 0, $when = null) + { + $attempts = 0; + + beginning: + $attempts++; + $times--; + + try { + return $callback($attempts); + } catch (Exception $e) { + if ($times < 1 || ($when && ! $when($e))) { + throw $e; + } + + if ($sleepMilliseconds) { + usleep(value($sleepMilliseconds, $attempts) * 1000); + } + + goto beginning; + } + } +} + +if (! function_exists('tap')) { + /** + * Call the given Closure with the given value then return the value. + * + * @param mixed $value + * @param callable|null $callback + * @return mixed + */ + function tap($value, $callback = null) + { + if (is_null($callback)) { + return new HigherOrderTapProxy($value); + } + + $callback($value); + + return $value; + } +} + +if (! function_exists('throw_if')) { + /** + * Throw the given exception if the given condition is true. + * + * @param mixed $condition + * @param \Throwable|string $exception + * @param mixed ...$parameters + * @return mixed + * + * @throws \Throwable + */ + function throw_if($condition, $exception = 'RuntimeException', ...$parameters) + { + if ($condition) { + if (is_string($exception) && class_exists($exception)) { + $exception = new $exception(...$parameters); + } + + throw is_string($exception) ? new RuntimeException($exception) : $exception; + } + + return $condition; + } +} + +if (! function_exists('throw_unless')) { + /** + * Throw the given exception unless the given condition is true. + * + * @param mixed $condition + * @param \Throwable|string $exception + * @param mixed ...$parameters + * @return mixed + * + * @throws \Throwable + */ + function throw_unless($condition, $exception = 'RuntimeException', ...$parameters) + { + throw_if(! $condition, $exception, ...$parameters); + + return $condition; + } +} + +if (! function_exists('trait_uses_recursive')) { + /** + * Returns all traits used by a trait and its traits. + * + * @param string $trait + * @return array + */ + function trait_uses_recursive($trait) + { + $traits = class_uses($trait) ?: []; + + foreach ($traits as $trait) { + $traits += trait_uses_recursive($trait); + } + + return $traits; + } +} + +if (! function_exists('transform')) { + /** + * Transform the given value if it is present. + * + * @param mixed $value + * @param callable $callback + * @param mixed $default + * @return mixed|null + */ + function transform($value, callable $callback, $default = null) + { + if (filled($value)) { + return $callback($value); + } + + if (is_callable($default)) { + return $default($value); + } + + return $default; + } +} + +if (! function_exists('windows_os')) { + /** + * Determine whether the current environment is Windows based. + * + * @return bool + */ + function windows_os() + { + return PHP_OS_FAMILY === 'Windows'; + } +} + +if (! function_exists('with')) { + /** + * Return the given value, optionally passed through the given callback. + * + * @param mixed $value + * @param callable|null $callback + * @return mixed + */ + function with($value, callable $callback = null) + { + return is_null($callback) ? $value : $callback($value); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/LICENSE b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/LICENSE new file mode 100644 index 00000000000..6de45ebf882 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) Brian Nesbitt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/composer.json b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/composer.json new file mode 100644 index 00000000000..cdbbc1219d8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/composer.json @@ -0,0 +1,120 @@ +{ + "name": "nesbot/carbon", + "description": "An API extension for DateTime that supports 281 different languages.", + "license": "MIT", + "type": "library", + "keywords": [ + "date", + "time", + "DateTime" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "homepage": "https://carbon.nesbot.com", + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon", + "docs": "https://carbon.nesbot.com/docs" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + } + ], + "require": { + "php": "^7.1.8 || ^8.0", + "ext-json": "*", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "squizlabs/php_codesniffer": "^3.4" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + }, + "files": [ + "tests/Laravel/ServiceProvider.php" + ] + }, + "bin": [ + "bin/carbon" + ], + "config": { + "allow-plugins": { + "phpstan/extension-installer": true, + "composer/package-versions-deprecated": true + }, + "process-timeout": 0, + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "scripts": { + "phpcs": "php-cs-fixer fix -v --diff --dry-run", + "phpdoc": "php phpdoc.php", + "phpmd": "phpmd src text /phpmd.xml", + "phpstan": "phpstan analyse --configuration phpstan.neon", + "phpunit": "phpunit --verbose", + "style-check": [ + "@phpcs", + "@phpstan", + "@phpmd" + ], + "test": [ + "@phpunit", + "@style-check" + ] + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/extension.neon b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/extension.neon new file mode 100644 index 00000000000..33bf794fc6c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/extension.neon @@ -0,0 +1,5 @@ +services: + - + class: Carbon\PHPStan\MacroExtension + tags: + - phpstan.broker.methodsClassReflectionExtension diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php new file mode 100644 index 00000000000..1504b0abc06 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?ReflectionMethod + { + return $this->reflectionFunction instanceof ReflectionMethod + ? $this->reflectionFunction + : null; + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php new file mode 100644 index 00000000000..450dceb8030 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection; +use ReflectionMethod; + +if (!class_exists(AbstractReflectionMacro::class, false)) { + abstract class AbstractReflectionMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getReflection(): ?Reflection\Adapter\ReflectionMethod + { + if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) { + return $this->reflectionFunction; + } + + return $this->reflectionFunction instanceof ReflectionMethod + ? new Reflection\Adapter\ReflectionMethod( + Reflection\ReflectionMethod::createFromName( + $this->reflectionFunction->getDeclaringClass()->getName(), + $this->reflectionFunction->getName() + ) + ) + : null; + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php new file mode 100644 index 00000000000..47002c47f32 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + */ + public function getFileName(): ?string + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + */ + public function getStartLine(): ?int + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + */ + public function getEndLine(): ?int + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php new file mode 100644 index 00000000000..c47d70ed5e9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractReflectionMacro + { + /** + * {@inheritdoc} + * + * @return string|false + */ + public function getFileName() + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getStartLine() + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getEndLine() + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php new file mode 100644 index 00000000000..d35308a66c2 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface + { + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + return $this->translate($id, $parameters, $domain, $locale); + } + + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages') + { + $messages = $this->getPrivateProperty($catalogue, 'messages'); + + if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { + return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; + } + + if (isset($messages[$domain][$id])) { + return $messages[$domain][$id]; + } + + $fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue'); + + if ($fallbackCatalogue !== null) { + return $this->getFromCatalogue($fallbackCatalogue, $id, $domain); + } + + return $id; + } + + private function getPrivateProperty($instance, string $field) + { + return (function (string $field) { + return $this->$field; + })->call($instance, $field); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php new file mode 100644 index 00000000000..94dbdc30ae4 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator + { + /** + * Returns the translation. + * + * @param string|null $id + * @param array $parameters + * @param string|null $domain + * @param string|null $locale + * + * @return string + */ + public function trans($id, array $parameters = [], $domain = null, $locale = null) + { + return $this->translate($id, $parameters, $domain, $locale); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/readme.md b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/readme.md new file mode 100644 index 00000000000..100e60f200c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/readme.md @@ -0,0 +1,148 @@ +# Carbon + +[![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) +[![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) +[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://actions-badge.atrox.dev/briannesbitt/Carbon/goto) +[![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) +[![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) + +An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com) + +```php +toDateTimeString()); +printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() +$tomorrow = Carbon::now()->addDay(); +$lastWeek = Carbon::now()->subWeek(); +$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4); + +$officialDate = Carbon::now()->toRfc2822String(); + +$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; + +$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); + +$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT'); + +// Don't really want this to happen so mock now +Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); + +// comparisons are always done in UTC +if (Carbon::now()->gte($internetWillBlowUpOn)) { + die(); +} + +// Phew! Return to normal behaviour +Carbon::setTestNow(); + +if (Carbon::now()->isWeekend()) { + echo 'Party!'; +} +// Over 200 languages (and over 500 regional variants) supported: +echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' +echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前' +echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM' +echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51' + +// ... but also does 'from now', 'after' and 'before' +// rolling up to seconds, minutes, hours, days, months, years + +$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); +``` + +[Get supported nesbot/carbon with the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) + +## Installation + +### With Composer + +``` +$ composer require nesbot/carbon +``` + +```json +{ + "require": { + "nesbot/carbon": "^2.16" + } +} +``` + +```php + + +### Translators + +[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/) + +### Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. + + + + + + + + + + + + + +[[Become a sponsor](https://opencollective.com/Carbon#sponsor)] + +### Backers + +Thank you to all our backers! 🙏 + + + +[[Become a backer](https://opencollective.com/Carbon#backer)] + +## Carbon for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php new file mode 100644 index 00000000000..949e159beef --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php @@ -0,0 +1,397 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Closure; +use ReflectionException; +use ReflectionFunction; +use Symfony\Component\Translation; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; +use Symfony\Component\Translation\Loader\ArrayLoader; + +abstract class AbstractTranslator extends Translation\Translator +{ + /** + * Translator singletons for each language. + * + * @var array + */ + protected static $singletons = []; + + /** + * List of custom localized messages. + * + * @var array + */ + protected $messages = []; + + /** + * List of custom directories that contain translation files. + * + * @var string[] + */ + protected $directories = []; + + /** + * Set to true while constructing. + * + * @var bool + */ + protected $initializing = false; + + /** + * List of locales aliases. + * + * @var string[] + */ + protected $aliases = [ + 'me' => 'sr_Latn_ME', + 'scr' => 'sh', + ]; + + /** + * Return a singleton instance of Translator. + * + * @param string|null $locale optional initial locale ("en" - english by default) + * + * @return static + */ + public static function get($locale = null) + { + $locale = $locale ?: 'en'; + $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; + + if (!isset(static::$singletons[$key])) { + static::$singletons[$key] = new static($locale); + } + + return static::$singletons[$key]; + } + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::setLocale($locale); + $this->initializing = true; + $this->directories = [__DIR__.'/Lang']; + $this->addLoader('array', new ArrayLoader()); + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->initializing = false; + } + + /** + * Returns the list of directories translation files are searched in. + * + * @return array + */ + public function getDirectories(): array + { + return $this->directories; + } + + /** + * Set list of directories translation files are searched in. + * + * @param array $directories new directories list + * + * @return $this + */ + public function setDirectories(array $directories) + { + $this->directories = $directories; + + return $this; + } + + /** + * Add a directory to the list translation files are searched in. + * + * @param string $directory new directory + * + * @return $this + */ + public function addDirectory(string $directory) + { + $this->directories[] = $directory; + + return $this; + } + + /** + * Remove a directory from the list translation files are searched in. + * + * @param string $directory directory path + * + * @return $this + */ + public function removeDirectory(string $directory) + { + $search = rtrim(strtr($directory, '\\', '/'), '/'); + + return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { + return rtrim(strtr($item, '\\', '/'), '/') !== $search; + })); + } + + /** + * Reset messages of a locale (all locale if no locale passed). + * Remove custom messages and reload initial messages from matching + * file in Lang directory. + * + * @param string|null $locale + * + * @return bool + */ + public function resetMessages($locale = null) + { + if ($locale === null) { + $this->messages = []; + + return true; + } + + foreach ($this->getDirectories() as $directory) { + $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); + + if ($data !== false) { + $this->messages[$locale] = $data; + $this->addResource('array', $this->messages[$locale], $locale); + + return true; + } + } + + return false; + } + + /** + * Returns the list of files matching a given locale prefix (or all if empty). + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getLocalesFiles($prefix = '') + { + $files = []; + + foreach ($this->getDirectories() as $directory) { + $directory = rtrim($directory, '\\/'); + + foreach (glob("$directory/$prefix*.php") as $file) { + $files[] = $file; + } + } + + return array_unique($files); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getAvailableLocales($prefix = '') + { + $locales = []; + foreach ($this->getLocalesFiles($prefix) as $file) { + $locales[] = substr($file, strrpos($file, '/') + 1, -4); + } + + return array_unique(array_merge($locales, array_keys($this->messages))); + } + + protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + if ($domain === null) { + $domain = 'messages'; + } + + $catalogue = $this->getCatalogue($locale); + $format = $this instanceof TranslatorStrongTypeInterface + ? $this->getFromCatalogue($catalogue, (string) $id, $domain) + : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore + + if ($format instanceof Closure) { + // @codeCoverageIgnoreStart + try { + $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); + } catch (ReflectionException $exception) { + $count = 0; + } + // @codeCoverageIgnoreEnd + + return $format( + ...array_values($parameters), + ...array_fill(0, max(0, $count - \count($parameters)), null) + ); + } + + return parent::trans($id, $parameters, $domain, $locale); + } + + /** + * Init messages language from matching file in Lang directory. + * + * @param string $locale + * + * @return bool + */ + protected function loadMessagesFromFile($locale) + { + return isset($this->messages[$locale]) || $this->resetMessages($locale); + } + + /** + * Set messages of a locale and take file first if present. + * + * @param string $locale + * @param array $messages + * + * @return $this + */ + public function setMessages($locale, $messages) + { + $this->loadMessagesFromFile($locale); + $this->addResource('array', $messages, $locale); + $this->messages[$locale] = array_merge( + $this->messages[$locale] ?? [], + $messages + ); + + return $this; + } + + /** + * Set messages of the current locale and take file first if present. + * + * @param array $messages + * + * @return $this + */ + public function setTranslations($messages) + { + return $this->setMessages($this->getLocale(), $messages); + } + + /** + * Get messages of a locale, if none given, return all the + * languages. + * + * @param string|null $locale + * + * @return array + */ + public function getMessages($locale = null) + { + return $locale === null ? $this->messages : $this->messages[$locale]; + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale locale ex. en + * + * @return bool + */ + public function setLocale($locale) + { + $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { + // _2-letters or YUE is a region, _3+-letters is a variant + $upper = strtoupper($matches[1]); + + if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { + return "_$upper"; + } + + return '_'.ucfirst($matches[1]); + }, strtolower($locale)); + + $previousLocale = $this->getLocale(); + + if ($previousLocale === $locale && isset($this->messages[$locale])) { + return true; + } + + unset(static::$singletons[$previousLocale]); + + if ($locale === 'auto') { + $completeLocale = setlocale(LC_TIME, '0'); + $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); + $locales = $this->getAvailableLocales($locale); + + $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); + + $getScore = function ($language) use ($completeLocaleChunks) { + return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); + }; + + usort($locales, function ($first, $second) use ($getScore) { + return $getScore($second) <=> $getScore($first); + }); + + $locale = $locales[0]; + } + + if (isset($this->aliases[$locale])) { + $locale = $this->aliases[$locale]; + } + + // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback + if (str_contains($locale, '_') && + $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) + ) { + parent::setLocale($macroLocale); + } + + if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { + return false; + } + + parent::setLocale($locale); + + return true; + } + + /** + * Show locale on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + return [ + 'locale' => $this->getLocale(), + ]; + } + + private static function compareChunkLists($referenceChunks, $chunks) + { + $score = 0; + + foreach ($referenceChunks as $index => $chunk) { + if (!isset($chunks[$index])) { + $score++; + + continue; + } + + if (strtolower($chunks[$index]) === strtolower($chunk)) { + $score += 10; + } + } + + return $score; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Carbon.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Carbon.php new file mode 100644 index 00000000000..e327590e2cd --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -0,0 +1,523 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Traits\Date; +use Carbon\Traits\DeprecatedProperties; +use DateTime; +use DateTimeInterface; +use DateTimeZone; + +/** + * A simple API extension for DateTime. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method $this years(int $value) Set current instance year to the given value. + * @method $this year(int $value) Set current instance year to the given value. + * @method $this setYears(int $value) Set current instance year to the given value. + * @method $this setYear(int $value) Set current instance year to the given value. + * @method $this months(int $value) Set current instance month to the given value. + * @method $this month(int $value) Set current instance month to the given value. + * @method $this setMonths(int $value) Set current instance month to the given value. + * @method $this setMonth(int $value) Set current instance month to the given value. + * @method $this days(int $value) Set current instance day to the given value. + * @method $this day(int $value) Set current instance day to the given value. + * @method $this setDays(int $value) Set current instance day to the given value. + * @method $this setDay(int $value) Set current instance day to the given value. + * @method $this hours(int $value) Set current instance hour to the given value. + * @method $this hour(int $value) Set current instance hour to the given value. + * @method $this setHours(int $value) Set current instance hour to the given value. + * @method $this setHour(int $value) Set current instance hour to the given value. + * @method $this minutes(int $value) Set current instance minute to the given value. + * @method $this minute(int $value) Set current instance minute to the given value. + * @method $this setMinutes(int $value) Set current instance minute to the given value. + * @method $this setMinute(int $value) Set current instance minute to the given value. + * @method $this seconds(int $value) Set current instance second to the given value. + * @method $this second(int $value) Set current instance second to the given value. + * @method $this setSeconds(int $value) Set current instance second to the given value. + * @method $this setSecond(int $value) Set current instance second to the given value. + * @method $this millis(int $value) Set current instance millisecond to the given value. + * @method $this milli(int $value) Set current instance millisecond to the given value. + * @method $this setMillis(int $value) Set current instance millisecond to the given value. + * @method $this setMilli(int $value) Set current instance millisecond to the given value. + * @method $this milliseconds(int $value) Set current instance millisecond to the given value. + * @method $this millisecond(int $value) Set current instance millisecond to the given value. + * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. + * @method $this micros(int $value) Set current instance microsecond to the given value. + * @method $this micro(int $value) Set current instance microsecond to the given value. + * @method $this setMicros(int $value) Set current instance microsecond to the given value. + * @method $this setMicro(int $value) Set current instance microsecond to the given value. + * @method $this microseconds(int $value) Set current instance microsecond to the given value. + * @method $this microsecond(int $value) Set current instance microsecond to the given value. + * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method $this addYear() Add one year to the instance (using date interval). + * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method $this subYear() Sub one year to the instance (using date interval). + * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method $this addMonth() Add one month to the instance (using date interval). + * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method $this subMonth() Sub one month to the instance (using date interval). + * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method $this addDay() Add one day to the instance (using date interval). + * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method $this subDay() Sub one day to the instance (using date interval). + * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method $this addHour() Add one hour to the instance (using date interval). + * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method $this subHour() Sub one hour to the instance (using date interval). + * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method $this addMinute() Add one minute to the instance (using date interval). + * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method $this subMinute() Sub one minute to the instance (using date interval). + * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method $this addSecond() Add one second to the instance (using date interval). + * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method $this subSecond() Sub one second to the instance (using date interval). + * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMilli() Add one millisecond to the instance (using date interval). + * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMilli() Sub one millisecond to the instance (using date interval). + * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMillisecond() Add one millisecond to the instance (using date interval). + * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). + * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicro() Add one microsecond to the instance (using date interval). + * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicro() Sub one microsecond to the instance (using date interval). + * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). + * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method $this addMillennium() Add one millennium to the instance (using date interval). + * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method $this subMillennium() Sub one millennium to the instance (using date interval). + * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method $this addCentury() Add one century to the instance (using date interval). + * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method $this subCentury() Sub one century to the instance (using date interval). + * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method $this addDecade() Add one decade to the instance (using date interval). + * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method $this subDecade() Sub one decade to the instance (using date interval). + * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method $this addQuarter() Add one quarter to the instance (using date interval). + * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method $this subQuarter() Sub one quarter to the instance (using date interval). + * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method $this addWeek() Add one week to the instance (using date interval). + * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method $this subWeek() Sub one week to the instance (using date interval). + * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method $this addWeekday() Add one weekday to the instance (using date interval). + * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method $this subWeekday() Sub one weekday to the instance (using date interval). + * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). + * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealSecond() Add one second to the instance (using timestamp). + * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMinute() Add one minute to the instance (using timestamp). + * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method $this addRealHour() Add one hour to the instance (using timestamp). + * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method $this subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDay() Add one day to the instance (using timestamp). + * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method $this addRealWeek() Add one week to the instance (using timestamp). + * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method $this subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMonth() Add one month to the instance (using timestamp). + * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). + * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method $this addRealYear() Add one year to the instance (using timestamp). + * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method $this subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDecade() Add one decade to the instance (using timestamp). + * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method $this addRealCentury() Add one century to the instance (using timestamp). + * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method $this subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). + * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static Carbon|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new Carbon object according to the specified format. + * @method static Carbon __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * + * + */ +class Carbon extends DateTime implements CarbonInterface +{ + use Date; + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable() + { + return true; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php new file mode 100644 index 00000000000..1ce967b255b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use DateTimeInterface; + +interface CarbonConverterInterface +{ + public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php new file mode 100644 index 00000000000..6d1194ee780 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php @@ -0,0 +1,582 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Traits\Date; +use Carbon\Traits\DeprecatedProperties; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; + +/** + * A simple API extension for DateTimeImmutable. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonImmutable years(int $value) Set current instance year to the given value. + * @method CarbonImmutable year(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. + * @method CarbonImmutable months(int $value) Set current instance month to the given value. + * @method CarbonImmutable month(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. + * @method CarbonImmutable days(int $value) Set current instance day to the given value. + * @method CarbonImmutable day(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. + * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable second(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. + * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addYear() Add one year to the instance (using date interval). + * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). + * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). + * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). + * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDay() Add one day to the instance (using date interval). + * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). + * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). + * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). + * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). + * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). + * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). + * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). + * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). + * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). + * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). + * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). + * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). + * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). + * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). + * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). + * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static CarbonImmutable|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. + * @method static CarbonImmutable __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * + * + */ +class CarbonImmutable extends DateTimeImmutable implements CarbonInterface +{ + use Date { + __clone as dateTraitClone; + } + + public function __clone() + { + $this->dateTraitClone(); + $this->endOfTime = false; + $this->startOfTime = false; + } + + /** + * Create a very old date representing start of time. + * + * @return static + */ + public static function startOfTime(): self + { + $date = static::parse('0001-01-01')->years(self::getStartOfTimeYear()); + $date->startOfTime = true; + + return $date; + } + + /** + * Create a very far date representing end of time. + * + * @return static + */ + public static function endOfTime(): self + { + $date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear()); + $date->endOfTime = true; + + return $date; + } + + /** + * @codeCoverageIgnore + */ + private static function getEndOfTimeYear(): int + { + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + return 145261681241552; + } + + // Remove if https://bugs.php.net/bug.php?id=81107 is fixed + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { + return 1118290769066902787; + } + + return PHP_INT_MAX; + } + + /** + * @codeCoverageIgnore + */ + private static function getStartOfTimeYear(): int + { + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + return -135908816449551; + } + + // Remove if https://bugs.php.net/bug.php?id=81107 is fixed + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { + return -1118290769066898816; + } + + return max(PHP_INT_MIN, -9223372036854773760); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php new file mode 100644 index 00000000000..c3db85043aa --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php @@ -0,0 +1,5078 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use BadMethodCallException; +use Carbon\Exceptions\BadComparisonUnitException; +use Carbon\Exceptions\ImmutableException; +use Carbon\Exceptions\InvalidDateException; +use Carbon\Exceptions\InvalidFormatException; +use Carbon\Exceptions\UnknownGetterException; +use Carbon\Exceptions\UnknownMethodException; +use Carbon\Exceptions\UnknownSetterException; +use Closure; +use DateInterval; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use JsonSerializable; +use ReflectionException; +use ReturnTypeWillChange; +use Symfony\Component\Translation\TranslatorInterface; +use Throwable; + +/** + * Common interface for Carbon and CarbonImmutable. + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonInterface years(int $value) Set current instance year to the given value. + * @method CarbonInterface year(int $value) Set current instance year to the given value. + * @method CarbonInterface setYears(int $value) Set current instance year to the given value. + * @method CarbonInterface setYear(int $value) Set current instance year to the given value. + * @method CarbonInterface months(int $value) Set current instance month to the given value. + * @method CarbonInterface month(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. + * @method CarbonInterface days(int $value) Set current instance day to the given value. + * @method CarbonInterface day(int $value) Set current instance day to the given value. + * @method CarbonInterface setDays(int $value) Set current instance day to the given value. + * @method CarbonInterface setDay(int $value) Set current instance day to the given value. + * @method CarbonInterface hours(int $value) Set current instance hour to the given value. + * @method CarbonInterface hour(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. + * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface minute(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. + * @method CarbonInterface seconds(int $value) Set current instance second to the given value. + * @method CarbonInterface second(int $value) Set current instance second to the given value. + * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. + * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. + * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addYear() Add one year to the instance (using date interval). + * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subYear() Sub one year to the instance (using date interval). + * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMonth() Add one month to the instance (using date interval). + * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). + * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDay() Add one day to the instance (using date interval). + * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDay() Sub one day to the instance (using date interval). + * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addHour() Add one hour to the instance (using date interval). + * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). + * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). + * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). + * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addSecond() Add one second to the instance (using date interval). + * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). + * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addCentury() Add one century to the instance (using date interval). + * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). + * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). + * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). + * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeek() Add one week to the instance (using date interval). + * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). + * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). + * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). + * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * + * + */ +interface CarbonInterface extends DateTimeInterface, JsonSerializable +{ + /** + * Diff wording options(expressed in octal). + */ + public const NO_ZERO_DIFF = 01; + public const JUST_NOW = 02; + public const ONE_DAY_WORDS = 04; + public const TWO_DAY_WORDS = 010; + public const SEQUENTIAL_PARTS_ONLY = 020; + public const ROUND = 040; + public const FLOOR = 0100; + public const CEIL = 0200; + + /** + * Diff syntax options. + */ + public const DIFF_ABSOLUTE = 1; // backward compatibility with true + public const DIFF_RELATIVE_AUTO = 0; // backward compatibility with false + public const DIFF_RELATIVE_TO_NOW = 2; + public const DIFF_RELATIVE_TO_OTHER = 3; + + /** + * Translate string options. + */ + public const TRANSLATE_MONTHS = 1; + public const TRANSLATE_DAYS = 2; + public const TRANSLATE_UNITS = 4; + public const TRANSLATE_MERIDIEM = 8; + public const TRANSLATE_DIFF = 0x10; + public const TRANSLATE_ALL = self::TRANSLATE_MONTHS | self::TRANSLATE_DAYS | self::TRANSLATE_UNITS | self::TRANSLATE_MERIDIEM | self::TRANSLATE_DIFF; + + /** + * The day constants. + */ + public const SUNDAY = 0; + public const MONDAY = 1; + public const TUESDAY = 2; + public const WEDNESDAY = 3; + public const THURSDAY = 4; + public const FRIDAY = 5; + public const SATURDAY = 6; + + /** + * The month constants. + * These aren't used by Carbon itself but exist for + * convenience sake alone. + */ + public const JANUARY = 1; + public const FEBRUARY = 2; + public const MARCH = 3; + public const APRIL = 4; + public const MAY = 5; + public const JUNE = 6; + public const JULY = 7; + public const AUGUST = 8; + public const SEPTEMBER = 9; + public const OCTOBER = 10; + public const NOVEMBER = 11; + public const DECEMBER = 12; + + /** + * Number of X in Y. + */ + public const YEARS_PER_MILLENNIUM = 1000; + public const YEARS_PER_CENTURY = 100; + public const YEARS_PER_DECADE = 10; + public const MONTHS_PER_YEAR = 12; + public const MONTHS_PER_QUARTER = 3; + public const QUARTERS_PER_YEAR = 4; + public const WEEKS_PER_YEAR = 52; + public const WEEKS_PER_MONTH = 4; + public const DAYS_PER_YEAR = 365; + public const DAYS_PER_WEEK = 7; + public const HOURS_PER_DAY = 24; + public const MINUTES_PER_HOUR = 60; + public const SECONDS_PER_MINUTE = 60; + public const MILLISECONDS_PER_SECOND = 1000; + public const MICROSECONDS_PER_MILLISECOND = 1000; + public const MICROSECONDS_PER_SECOND = 1000000; + + /** + * Special settings to get the start of week from current locale culture. + */ + public const WEEK_DAY_AUTO = 'auto'; + + /** + * RFC7231 DateTime format. + * + * @var string + */ + public const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; + + /** + * Default format to use for __toString method when type juggling occurs. + * + * @var string + */ + public const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; + + /** + * Format for converting mocked time, includes microseconds. + * + * @var string + */ + public const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; + + /** + * Pattern detection for ->isoFormat and ::createFromIsoFormat. + * + * @var string + */ + public const ISO_FORMAT_REGEXP = '(O[YMDHhms]|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY?|g{1,5}|G{1,5}|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?)'; + + // + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable + * + * @return mixed + */ + public function __call($method, $parameters); + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters); + + /** + * Update constructedObjectId on cloned. + */ + public function __clone(); + + /** + * Create a new Carbon instance. + * + * Please see the testing aids section (specifically static::setTestNow()) + * for more on the possibility of this constructor returning a test instance. + * + * @param DateTimeInterface|string|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + */ + public function __construct($time = null, $tz = null); + + /** + * Show truthy properties on var_dump(). + * + * @return array + */ + public function __debugInfo(); + + /** + * Get a part of the Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function __get($name); + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset($name); + + /** + * Set a part of the Carbon object + * + * @param string $name + * @param string|int|DateTimeZone $value + * + * @throws UnknownSetterException|ReflectionException + * + * @return void + */ + public function __set($name, $value); + + /** + * The __set_state handler. + * + * @param string|array $dump + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump); + + /** + * Returns the list of properties to dump on serialize() called on. + * + * @return array + */ + public function __sleep(); + + /** + * Format the instance as a string using the set format + * + * @example + * ``` + * echo Carbon::now(); // Carbon instances can be casted to string + * ``` + * + * @return string + */ + public function __toString(); + + /** + * Add given units or interval to the current instance. + * + * @example $date->add('hour', 3) + * @example $date->add(15, 'days') + * @example $date->add(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function add($unit, $value = 1, $overflow = null); + + /** + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param string $unit + * @param int $value + * + * @return static + */ + public function addRealUnit($unit, $value = 1); + + /** + * Add given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function addUnit($unit, $value = 1, $overflow = null); + + /** + * Add any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to add to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function addUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function ago($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Modify the current instance to the average of a given instance (default now) and the current instance + * (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date + * + * @return static + */ + public function average($date = null); + + /** + * Clone the current instance if it's mutable. + * + * This method is convenient to ensure you don't mutate the initial object + * but avoid to make a useless copy of it if it's already immutable. + * + * @return static + */ + public function avoidMutation(); + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($date1, $date2, $equal = true): bool; + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenExcluded($date1, $date2): bool; + + /** + * Determines if the instance is between two others, bounds included. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenIncluded($date1, $date2): bool; + + /** + * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, + * or a calendar date (e.g. "10/29/2017") otherwise. + * + * Language, date and time formats will change according to the current locale. + * + * @param Carbon|\DateTimeInterface|string|null $referenceTime + * @param array $formats + * + * @return string + */ + public function calendar($referenceTime = null, array $formats = []); + + /** + * Checks if the (date)time string is in a given format and valid to create a + * new instance. + * + * @example + * ``` + * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true + * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function canBeCreatedFromFormat($date, $format); + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date + * + * @return static + */ + public function carbonize($date = null); + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeInterface + */ + public function cast(string $className); + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function ceil($precision = 1); + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function ceilUnit($unit, $precision = 1); + + /** + * Ceil the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function ceilWeek($weekStartsAt = null); + + /** + * Similar to native modify() method of DateTime but can handle more grammars. + * + * @example + * ``` + * echo Carbon::now()->change('next 2pm'); + * ``` + * + * @link https://php.net/manual/en/datetime.modify.php + * + * @param string $modifier + * + * @return static + */ + public function change($modifier); + + /** + * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. + * foreach ($date as $_) {} + * serializer($date) + * var_export($date) + * get_object_vars($date) + */ + public function cleanupDumpProperties(); + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone(); + + /** + * Get the closest date from the instance (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function closest($date1, $date2); + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy(); + + /** + * Create a new Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null); + + /** + * Create a Carbon instance from just a date. The time portion is set to now. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromDate($year = null, $month = null, $day = null, $tz = null); + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + #[ReturnTypeWillChange] + public static function createFromFormat($format, $time, $tz = null); + + /** + * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz optional timezone + * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) + * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null); + + /** + * Create a Carbon instance from a specific format and a string in a given language. + * + * @param string $format Datetime format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleFormat($format, $locale, $time, $tz = null); + + /** + * Create a Carbon instance from a specific ISO format and a string in a given language. + * + * @param string $format Datetime ISO format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null); + + /** + * Create a Carbon instance from just a time. The date portion is set to today. + * + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null); + + /** + * Create a Carbon instance from a time string. The date portion is set to today. + * + * @param string $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTimeString($time, $tz = null); + + /** + * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestamp($timestamp, $tz = null); + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null); + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampMsUTC($timestamp); + + /** + * Create a Carbon instance from an timestamp keeping the timezone to UTC. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampUTC($timestamp); + + /** + * Create a Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null); + + /** + * Create a new safe Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidDateException + * + * @return static|false + */ + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null); + + /** + * Create a new Carbon instance from a specific date and time using strict validation. + * + * @see create() + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null); + + /** + * Get/set the day of year. + * + * @param int|null $value new value for day of year if using as setter. + * + * @return static|int + */ + public function dayOfYear($value = null); + + /** + * Get the difference as a CarbonInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true); + + /** + * Get the difference by the given interval using a filter closure. + * + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @example + * ``` + * echo Carbon::tomorrow()->diffForHumans() . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; + * ``` + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get the difference in days rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDays($date = null, $absolute = true); + + /** + * Get the difference in days using a filter closure rounded down. + * + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in hours rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHours($date = null, $absolute = true); + + /** + * Get the difference in hours using a filter closure rounded down. + * + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true); + + /** + * Get the difference in microseconds. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMicroseconds($date = null, $absolute = true); + + /** + * Get the difference in milliseconds rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMilliseconds($date = null, $absolute = true); + + /** + * Get the difference in minutes rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes($date = null, $absolute = true); + + /** + * Get the difference in months rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMonths($date = null, $absolute = true); + + /** + * Get the difference in quarters rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInQuarters($date = null, $absolute = true); + + /** + * Get the difference in hours rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealHours($date = null, $absolute = true); + + /** + * Get the difference in microseconds using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMicroseconds($date = null, $absolute = true); + + /** + * Get the difference in milliseconds rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMilliseconds($date = null, $absolute = true); + + /** + * Get the difference in minutes rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMinutes($date = null, $absolute = true); + + /** + * Get the difference in seconds using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealSeconds($date = null, $absolute = true); + + /** + * Get the difference in seconds rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds($date = null, $absolute = true); + + /** + * Get the difference in weekdays rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekdays($date = null, $absolute = true); + + /** + * Get the difference in weekend days using a filter rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekendDays($date = null, $absolute = true); + + /** + * Get the difference in weeks rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeeks($date = null, $absolute = true); + + /** + * Get the difference in years + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInYears($date = null, $absolute = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption); + + /** + * Modify to end of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function endOf($unit, ...$params); + + /** + * Resets the date to end of the century and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); + * ``` + * + * @return static + */ + public function endOfCentury(); + + /** + * Resets the time to 23:59:59.999999 end of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); + * ``` + * + * @return static + */ + public function endOfDay(); + + /** + * Resets the date to end of the decade and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); + * ``` + * + * @return static + */ + public function endOfDecade(); + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); + * ``` + * + * @return static + */ + public function endOfHour(); + + /** + * Resets the date to end of the millennium and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); + * ``` + * + * @return static + */ + public function endOfMillennium(); + + /** + * Modify to end of current minute, seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); + * ``` + * + * @return static + */ + public function endOfMinute(); + + /** + * Resets the date to end of the month and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); + * ``` + * + * @return static + */ + public function endOfMonth(); + + /** + * Resets the date to end of the quarter and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); + * ``` + * + * @return static + */ + public function endOfQuarter(); + + /** + * Modify to end of current second, microseconds become 999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->endOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function endOfSecond(); + + /** + * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; + * ``` + * + * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week + * + * @return static + */ + public function endOfWeek($weekEndsAt = null); + + /** + * Resets the date to end of the year and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); + * ``` + * + * @return static + */ + public function endOfYear(); + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see equalTo() + * + * @return bool + */ + public function eq($date): bool; + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function equalTo($date): bool; + + /** + * Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * + * @param string $locale locale ex. en + * @param callable $func + * + * @return mixed + */ + public static function executeWithLocale($locale, $func); + + /** + * Get the farthest date from the instance (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function farthest($date1, $date2); + + /** + * Modify to the first occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * first day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfMonth($dayOfWeek = null); + + /** + * Modify to the first occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * first day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfQuarter($dayOfWeek = null); + + /** + * Modify to the first occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * first day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfYear($dayOfWeek = null); + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInDays($date = null, $absolute = true); + + /** + * Get the difference in hours as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInHours($date = null, $absolute = true); + + /** + * Get the difference in minutes as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMinutes($date = null, $absolute = true); + + /** + * Get the difference in months as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMonths($date = null, $absolute = true); + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealDays($date = null, $absolute = true); + + /** + * Get the difference in hours as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealHours($date = null, $absolute = true); + + /** + * Get the difference in minutes as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMinutes($date = null, $absolute = true); + + /** + * Get the difference in months as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMonths($date = null, $absolute = true); + + /** + * Get the difference in seconds as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealSeconds($date = null, $absolute = true); + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealWeeks($date = null, $absolute = true); + + /** + * Get the difference in year as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealYears($date = null, $absolute = true); + + /** + * Get the difference in seconds as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInSeconds($date = null, $absolute = true); + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInWeeks($date = null, $absolute = true); + + /** + * Get the difference in year as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInYears($date = null, $absolute = true); + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function floor($precision = 1); + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function floorUnit($unit, $precision = 1); + + /** + * Truncate the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function floorWeek($weekStartsAt = null); + + /** + * Format the instance with the current locale. You can set the current + * locale using setlocale() https://php.net/setlocale. + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * + * @param string $format + * + * @return string + */ + public function formatLocalized($format); + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get the difference in a human readable format in the current locale from current + * instance to now. + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function fromNow($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Create an instance from a serialized string. + * + * @param string $value + * + * @throws InvalidFormatException + * + * @return static + */ + public static function fromSerialized($value); + + /** + * Register a custom macro. + * + * @param object|callable $macro + * @param int $priority marco with higher priority is tried first + * + * @return void + */ + public static function genericMacro($macro, $priority = 0); + + /** + * Get a part of the Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function get($name); + + /** + * Returns the alternative number for a given date property if available in the current locale. + * + * @param string $key date property + * + * @return string + */ + public function getAltNumber(string $key): string; + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @return array + */ + public static function getAvailableLocales(); + + /** + * Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * + * @return Language[] + */ + public static function getAvailableLocalesInfo(); + + /** + * Returns list of calendar formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getCalendarFormats($locale = null); + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays(); + + /** + * Get the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @return string|null + */ + public static function getFallbackLocale(); + + /** + * List of replacements from date() format to isoFormat(). + * + * @return array + */ + public static function getFormatsToIsoReplacements(); + + /** + * Return default humanDiff() options (merged flags as integer). + * + * @return int + */ + public static function getHumanDiffOptions(); + + /** + * Returns list of locale formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getIsoFormats($locale = null); + + /** + * Returns list of locale units for ISO formatting. + * + * @return array + */ + public static function getIsoUnits(); + + /** + * {@inheritdoc} + * + * @return array + */ + #[ReturnTypeWillChange] + public static function getLastErrors(); + + /** + * Get the raw callable macro registered globally or locally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public function getLocalMacro($name); + + /** + * Get the translator of the current instance or the default if none set. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public function getLocalTranslator(); + + /** + * Get the current translator locale. + * + * @return string + */ + public static function getLocale(); + + /** + * Get the raw callable macro registered globally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public static function getMacro($name); + + /** + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt(); + + /** + * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). + * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first + * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something + * like "-12:00". + * + * @param string $separator string to place between hours and minutes (":" by default) + * + * @return string + */ + public function getOffsetString($separator = ':'); + + /** + * Returns a unit of the instance padded with 0 by default or any other string if specified. + * + * @param string $unit Carbon unit name + * @param int $length Length of the output (2 by default) + * @param string $padString String to use for padding ("0" by default) + * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) + * + * @return string + */ + public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = 0); + + /** + * Returns a timestamp rounded with the given precision (6 by default). + * + * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) + * @example getPreciseTimestamp(6) 1532087464437474 + * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) + * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) + * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) + * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) + * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) + * @example getPreciseTimestamp(0) 1532087464 (second precision) + * @example getPreciseTimestamp(-1) 153208746 (10 second precision) + * @example getPreciseTimestamp(-2) 15320875 (100 second precision) + * + * @param int $precision + * + * @return float + */ + public function getPreciseTimestamp($precision = 6); + + /** + * Returns current local settings. + * + * @return array + */ + public function getSettings(); + + /** + * Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * + * @return Closure|static the current instance used for testing + */ + public static function getTestNow(); + + /** + * Return a format from H:i to H:i:s.u according to given unit precision. + * + * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" + * + * @return string + */ + public static function getTimeFormatByPrecision($unitPrecision); + + /** + * Returns the timestamp with millisecond precision. + * + * @return int + */ + public function getTimestampMs(); + + /** + * Get the translation of the current week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "", "_short" or "_min" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null); + + /** + * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedMinDayName($context = null); + + /** + * Get the translation of the current month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "" or "_short" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null); + + /** + * Get the translation of the current short week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortDayName($context = null); + + /** + * Get the translation of the current short month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortMonthName($context = null); + + /** + * Returns raw translation message for a given key. + * + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use + * + * @return string + */ + public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null); + + /** + * Returns raw translation message for a given key. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * + * @return string + */ + public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null); + + /** + * Get the default translator instance in use. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator(); + + /** + * Get the last day of week + * + * @return int + */ + public static function getWeekEndsAt(); + + /** + * Get the first day of week + * + * @return int + */ + public static function getWeekStartsAt(); + + /** + * Get weekend days + * + * @return array + */ + public static function getWeekendDays(); + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThan($date): bool; + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThanOrEqualTo($date): bool; + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function gt($date): bool; + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($date): bool; + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormat($date, $format); + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true + * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormatWithModifiers($date, $format): bool; + + /** + * Checks if macro is registered globally or locally. + * + * @param string $name + * + * @return bool + */ + public function hasLocalMacro($name); + + /** + * Return true if the current instance has its own translator. + * + * @return bool + */ + public function hasLocalTranslator(); + + /** + * Checks if macro is registered globally. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name); + + /** + * Determine if a time string will produce a relative date. + * + * @param string $time + * + * @return bool true if time match a relative date, false if absolute or invalid time string + */ + public static function hasRelativeKeywords($time); + + /** + * Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * + * @return bool true if there is a test instance, otherwise false + */ + public static function hasTestNow(); + + /** + * Create a Carbon instance from a DateTime one. + * + * @param DateTimeInterface $date + * + * @return static + */ + public static function instance($date); + + /** + * Returns true if the current date matches the given string. + * + * @example + * ``` + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false + * ``` + * + * @param string $tester day name, month name, hour, date, etc. as string + * + * @return bool + */ + public function is(string $tester); + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function isAfter($date): bool; + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function isBefore($date): bool; + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($date1, $date2, $equal = true): bool; + + /** + * Check if its the birthday. Compares the date/month values of the two dates. + * + * @example + * ``` + * Carbon::now()->subYears(5)->isBirthday(); // true + * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isBirthday($date = null); + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::now()->isCurrentUnit('hour'); // true + * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false + * ``` + * + * @param string $unit The unit to test. + * + * @throws BadMethodCallException + * + * @return bool + */ + public function isCurrentUnit($unit); + + /** + * Checks if this day is a specific day of the week. + * + * @example + * ``` + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false + * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true + * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false + * ``` + * + * @param int $dayOfWeek + * + * @return bool + */ + public function isDayOfWeek($dayOfWeek); + + /** + * Check if the instance is end of day. + * + * @example + * ``` + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isEndOfDay($checkMicroseconds = false); + + /** + * Returns true if the date was created using CarbonImmutable::endOfTime() + * + * @return bool + */ + public function isEndOfTime(): bool; + + /** + * Determines if the instance is in the future, ie. greater (after) than now. + * + * @example + * ``` + * Carbon::now()->addHours(5)->isFuture(); // true + * Carbon::now()->subHours(5)->isFuture(); // false + * ``` + * + * @return bool + */ + public function isFuture(); + + /** + * Returns true if the current class/instance is immutable. + * + * @return bool + */ + public static function isImmutable(); + + /** + * Check if today is the last day of the Month + * + * @example + * ``` + * Carbon::parse('2019-02-28')->isLastOfMonth(); // true + * Carbon::parse('2019-03-28')->isLastOfMonth(); // false + * Carbon::parse('2019-03-30')->isLastOfMonth(); // false + * Carbon::parse('2019-03-31')->isLastOfMonth(); // true + * Carbon::parse('2019-04-30')->isLastOfMonth(); // true + * ``` + * + * @return bool + */ + public function isLastOfMonth(); + + /** + * Determines if the instance is a leap year. + * + * @example + * ``` + * Carbon::parse('2020-01-01')->isLeapYear(); // true + * Carbon::parse('2019-01-01')->isLeapYear(); // false + * ``` + * + * @return bool + */ + public function isLeapYear(); + + /** + * Determines if the instance is a long year + * + * @example + * ``` + * Carbon::parse('2015-01-01')->isLongYear(); // true + * Carbon::parse('2016-01-01')->isLongYear(); // false + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongYear(); + + /** + * Check if the instance is midday. + * + * @example + * ``` + * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false + * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false + * ``` + * + * @return bool + */ + public function isMidday(); + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false + * ``` + * + * @return bool + */ + public function isMidnight(); + + /** + * Returns true if a property can be changed via setter. + * + * @param string $unit + * + * @return bool + */ + public static function isModifiableUnit($unit); + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable(); + + /** + * Determines if the instance is in the past, ie. less (before) than now. + * + * @example + * ``` + * Carbon::now()->subHours(5)->isPast(); // true + * Carbon::now()->addHours(5)->isPast(); // false + * ``` + * + * @return bool + */ + public function isPast(); + + /** + * Compares the formatted values of the two dates. + * + * @example + * ``` + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false + * ``` + * + * @param string $format date formats to compare. + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. + * + * @return bool + */ + public function isSameAs($format, $date = null); + + /** + * Checks if the passed in date is in the same month as the instance´s month. + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = true); + + /** + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameQuarter($date = null, $ofSameYear = true); + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true + * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false + * ``` + * + * @param string $unit singular unit string + * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. + * + * @throws BadComparisonUnitException + * + * @return bool + */ + public function isSameUnit($unit, $date = null); + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false + * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true + * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isStartOfDay($checkMicroseconds = false); + + /** + * Returns true if the date was created using CarbonImmutable::startOfTime() + * + * @return bool + */ + public function isStartOfTime(): bool; + + /** + * Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * + * @return bool + */ + public static function isStrictModeEnabled(); + + /** + * Determines if the instance is today. + * + * @example + * ``` + * Carbon::today()->isToday(); // true + * Carbon::tomorrow()->isToday(); // false + * ``` + * + * @return bool + */ + public function isToday(); + + /** + * Determines if the instance is tomorrow. + * + * @example + * ``` + * Carbon::tomorrow()->isTomorrow(); // true + * Carbon::yesterday()->isTomorrow(); // false + * ``` + * + * @return bool + */ + public function isTomorrow(); + + /** + * Determines if the instance is a weekday. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekday(); // false + * Carbon::parse('2019-07-15')->isWeekday(); // true + * ``` + * + * @return bool + */ + public function isWeekday(); + + /** + * Determines if the instance is a weekend day. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekend(); // true + * Carbon::parse('2019-07-15')->isWeekend(); // false + * ``` + * + * @return bool + */ + public function isWeekend(); + + /** + * Determines if the instance is yesterday. + * + * @example + * ``` + * Carbon::yesterday()->isYesterday(); // true + * Carbon::tomorrow()->isYesterday(); // false + * ``` + * + * @return bool + */ + public function isYesterday(); + + /** + * Format in the current language using ISO replacement patterns. + * + * @param string $format + * @param string|null $originalFormat provide context if a chunk has been passed alone + * + * @return string + */ + public function isoFormat(string $format, ?string $originalFormat = null): string; + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function isoWeekday($value = null); + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null); + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + #[ReturnTypeWillChange] + public function jsonSerialize(); + + /** + * Modify to the last occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * last day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfMonth($dayOfWeek = null); + + /** + * Modify to the last occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * last day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfQuarter($dayOfWeek = null); + + /** + * Modify to the last occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * last day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfYear($dayOfWeek = null); + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThan($date): bool; + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThanOrEqualTo($date): bool; + + /** + * Get/set the locale for the current instance. + * + * @param string|null $locale + * @param string ...$fallbackLocales + * + * @return $this|string + */ + public function locale(?string $locale = null, ...$fallbackLocales); + + /** + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffOneDayWords($locale); + + /** + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffSyntax($locale); + + /** + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffTwoDayWords($locale); + + /** + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasPeriodSyntax($locale); + + /** + * Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasShortUnits($locale); + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function lt($date): bool; + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($date): bool; + + /** + * Register a custom macro. + * + * @example + * ``` + * $userSettings = [ + * 'locale' => 'pt', + * 'timezone' => 'America/Sao_Paulo', + * ]; + * Carbon::macro('userFormat', function () use ($userSettings) { + * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); + * }); + * echo Carbon::yesterday()->hours(11)->userFormat(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro); + + /** + * Make a Carbon instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @throws InvalidFormatException + * + * @return static|null + */ + public static function make($var); + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function max($date = null); + + /** + * Create a Carbon instance for the greatest supported date. + * + * @return static + */ + public static function maxValue(); + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see max() + * + * @return static + */ + public function maximum($date = null); + + /** + * Return the meridiem of the current time in the current locale. + * + * @param bool $isLower if true, returns lowercase variant if available in the current locale. + * + * @return string + */ + public function meridiem(bool $isLower = false): string; + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay(); + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function min($date = null); + + /** + * Create a Carbon instance for the lowest supported date. + * + * @return static + */ + public static function minValue(); + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see min() + * + * @return static + */ + public function minimum($date = null); + + /** + * Mix another object into the class. + * + * @example + * ``` + * Carbon::mixin(new class { + * public function addMoon() { + * return function () { + * return $this->addDays(30); + * }; + * } + * public function subMoon() { + * return function () { + * return $this->subDays(30); + * }; + * } + * }); + * $fullMoon = Carbon::create('2018-12-22'); + * $nextFullMoon = $fullMoon->addMoon(); + * $blackMoon = Carbon::create('2019-01-06'); + * $previousBlackMoon = $blackMoon->subMoon(); + * echo "$nextFullMoon\n"; + * echo "$previousBlackMoon\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin); + + /** + * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. + * + * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false + */ + #[ReturnTypeWillChange] + public function modify($modify); + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($date): bool; + + /** + * Modify to the next occurrence of a given modifier such as a day of + * the week. If no modifier is provided, modify to the next occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static + */ + public function next($modifier = null); + + /** + * Go forward to the next weekday. + * + * @return static + */ + public function nextWeekday(); + + /** + * Go forward to the next weekend day. + * + * @return static + */ + public function nextWeekendDay(); + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function notEqualTo($date): bool; + + /** + * Get a Carbon instance for the current date and time. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function now($tz = null); + + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz(); + + /** + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope + * of the current month, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfMonth($nth, $dayOfWeek); + + /** + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope + * of the current quarter, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfQuarter($nth, $dayOfWeek); + + /** + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope + * of the current year, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfYear($nth, $dayOfWeek); + + /** + * Return a property with its ordinal. + * + * @param string $key + * @param string|null $period + * + * @return string + */ + public function ordinal(string $key, ?string $period = null): string; + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parse($time = null, $tz = null); + + /** + * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * + * @param string $time date/time string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be + * used instead. + * @param DateTimeZone|string|null $tz optional timezone for the new instance. + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parseFromLocale($time, $locale = null, $tz = null); + + /** + * Returns standardized plural of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function pluralUnit(string $unit): string; + + /** + * Modify to the previous occurrence of a given modifier such as a day of + * the week. If no dayOfWeek is provided, modify to the previous occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static + */ + public function previous($modifier = null); + + /** + * Go backward to the previous weekday. + * + * @return static + */ + public function previousWeekday(); + + /** + * Go backward to the previous weekend day. + * + * @return static + */ + public function previousWeekendDay(); + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function range($end = null, $interval = null, $unit = null); + + /** + * Call native PHP DateTime/DateTimeImmutable add() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawAdd(DateInterval $interval); + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function rawCreateFromFormat($format, $time, $tz = null); + + /** + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + public function rawFormat($format); + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function rawParse($time = null, $tz = null); + + /** + * Call native PHP DateTime/DateTimeImmutable sub() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawSub(DateInterval $interval); + + /** + * Remove all macros and generic macros. + */ + public static function resetMacros(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetMonthsOverflow(); + + /** + * Reset the format used to the default when type juggling a Carbon instance to a string + * + * @return void + */ + public static function resetToStringFormat(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow(); + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return CarbonInterface + */ + public function round($precision = 1, $function = 'round'); + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int $precision + * @param string $function + * + * @return CarbonInterface + */ + public function roundUnit($unit, $precision = 1, $function = 'round'); + + /** + * Round the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function roundWeek($weekStartsAt = null); + + /** + * The number of seconds since midnight. + * + * @return int + */ + public function secondsSinceMidnight(); + + /** + * The number of seconds until 23:59:59. + * + * @return int + */ + public function secondsUntilEndOfDay(); + + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize(); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * + * JSON serialize all Carbon instances using the given callback. + * + * @param callable $callback + * + * @return void + */ + public static function serializeUsing($callback); + + /** + * Set a part of the Carbon object + * + * @param string|array $name + * @param string|int|DateTimeZone $value + * + * @throws ImmutableException|UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null); + + /** + * Set the date with gregorian year, month and day numbers. + * + * @see https://php.net/manual/en/datetime.setdate.php + * + * @param int $year + * @param int $month + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setDate($year, $month, $day); + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setDateFrom($date = null); + + /** + * Set the date and time all together. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0); + + /** + * Set the date and time for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date + * + * @return static + */ + public function setDateTimeFrom($date = null); + + /** + * Set the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @param string $locale + */ + public static function setFallbackLocale($locale); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions); + + /** + * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. + * + * @see https://php.net/manual/en/datetime.setisodate.php + * + * @param int $year + * @param int $week + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setISODate($year, $week, $day = 1); + + /** + * Set the translator for the current instance. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return $this + */ + public function setLocalTranslator(TranslatorInterface $translator); + + /** + * Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function setLocale($locale); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour); + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNow($testNow = null); + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null); + + /** + * Resets the current time of the DateTime object to a different time. + * + * @see https://php.net/manual/en/datetime.settime.php + * + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTime($hour, $minute, $second = 0, $microseconds = 0); + + /** + * Set the hour, minute, second and microseconds for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setTimeFrom($date = null); + + /** + * Set the time by time string. + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time); + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimestamp($unixTimestamp); + + /** + * Set the instance's timezone from a string or object. + * + * @param DateTimeZone|string $value + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimezone($value); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * + * Set the default format used when type juggling a Carbon instance to a string + * + * @param string|Closure|null $format + * + * @return void + */ + public static function setToStringFormat($format); + + /** + * Set the default translator instance to use. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void + */ + public static function setTranslator(TranslatorInterface $translator); + + /** + * Set specified unit to new given value. + * + * @param string $unit year, month, day, hour, minute, second or microsecond + * @param int $value new value for given unit + * + * @return static + */ + public function setUnit($unit, $value = null); + + /** + * Set any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value new value for the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function setUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * + * Set if UTF8 will be used for localized date/time. + * + * @param bool $utf8 + */ + public static function setUtf8($utf8); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * + * Set the last day of week + * + * @param int|string $day week end day (or 'auto' to get the day before the first day of week + * from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekEndsAt($day); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * + * Set the first day of week + * + * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekStartsAt($day); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * + * Set weekend days + * + * @param array $days + * + * @return void + */ + public static function setWeekendDays($days); + + /** + * Set specific options. + * - strictMode: true|false|null + * - monthOverflow: true|false|null + * - yearOverflow: true|false|null + * - humanDiffOptions: int|null + * - toStringFormat: string|Closure|null + * - toJsonFormat: string|Closure|null + * - locale: string|null + * - timezone: \DateTimeZone|string|int|null + * - macros: array|null + * - genericMacros: array|null + * + * @param array $settings + * + * @return $this|static + */ + public function settings(array $settings); + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function shiftTimezone($value); + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowMonths(); + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowYears(); + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + */ + public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Returns standardized singular of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function singularUnit(string $unit): string; + + /** + * Modify to start of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function startOf($unit, ...$params); + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); + * ``` + * + * @return static + */ + public function startOfCentury(); + + /** + * Resets the time to 00:00:00 start of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); + * ``` + * + * @return static + */ + public function startOfDay(); + + /** + * Resets the date to the first day of the decade and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); + * ``` + * + * @return static + */ + public function startOfDecade(); + + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); + * ``` + * + * @return static + */ + public function startOfHour(); + + /** + * Resets the date to the first day of the millennium and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); + * ``` + * + * @return static + */ + public function startOfMillennium(); + + /** + * Modify to start of current minute, seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); + * ``` + * + * @return static + */ + public function startOfMinute(); + + /** + * Resets the date to the first day of the month and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); + * ``` + * + * @return static + */ + public function startOfMonth(); + + /** + * Resets the date to the first day of the quarter and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); + * ``` + * + * @return static + */ + public function startOfQuarter(); + + /** + * Modify to start of current second, microseconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function startOfSecond(); + + /** + * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; + * ``` + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return static + */ + public function startOfWeek($weekStartsAt = null); + + /** + * Resets the date to the first day of the year and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); + * ``` + * + * @return static + */ + public function startOfYear(); + + /** + * Subtract given units or interval to the current instance. + * + * @example $date->sub('hour', 3) + * @example $date->sub(15, 'days') + * @example $date->sub(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function sub($unit, $value = 1, $overflow = null); + + public function subRealUnit($unit, $value = 1); + + /** + * Subtract given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subUnit($unit, $value = 1, $overflow = null); + + /** + * Subtract any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to subtract to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function subUnitNoOverflow($valueUnit, $value, $overflowUnit); + + /** + * Subtract given units or interval to the current instance. + * + * @see sub() + * + * @param string|DateInterval $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subtract($unit, $value = 1, $overflow = null); + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @return string + */ + public function timespan($other = null, $timezone = null); + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + public function timestamp($unixTimestamp); + + /** + * @alias setTimezone + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function timezone($value); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * When comparing a value in the past to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the future to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the past to another value: + * 1 hour after + * 5 months after + * + * When comparing a value in the future to another value: + * 1 hour before + * 5 months before + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get default array representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toArray()); + * ``` + * + * @return array + */ + public function toArray(); + + /** + * Format the instance as ATOM + * + * @example + * ``` + * echo Carbon::now()->toAtomString(); + * ``` + * + * @return string + */ + public function toAtomString(); + + /** + * Format the instance as COOKIE + * + * @example + * ``` + * echo Carbon::now()->toCookieString(); + * ``` + * + * @return string + */ + public function toCookieString(); + + /** + * @alias toDateTime + * + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDate()); + * ``` + * + * @return DateTime + */ + public function toDate(); + + /** + * Format the instance as date + * + * @example + * ``` + * echo Carbon::now()->toDateString(); + * ``` + * + * @return string + */ + public function toDateString(); + + /** + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTime()); + * ``` + * + * @return DateTime + */ + public function toDateTime(); + + /** + * Return native toDateTimeImmutable PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTimeImmutable()); + * ``` + * + * @return DateTimeImmutable + */ + public function toDateTimeImmutable(); + + /** + * Format the instance as date and time T-separated with no timezone + * + * @example + * ``` + * echo Carbon::now()->toDateTimeLocalString(); + * echo "\n"; + * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeLocalString($unitPrecision = 'second'); + + /** + * Format the instance as date and time + * + * @example + * ``` + * echo Carbon::now()->toDateTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeString($unitPrecision = 'second'); + + /** + * Format the instance with day, date and time + * + * @example + * ``` + * echo Carbon::now()->toDayDateTimeString(); + * ``` + * + * @return string + */ + public function toDayDateTimeString(); + + /** + * Format the instance as a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDateString(); + * ``` + * + * @return string + */ + public function toFormattedDateString(); + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: + * 1977-04-22T01:00:00-05:00). + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toISOString() . "\n"; + * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; + * ``` + * + * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. + * + * @return null|string + */ + public function toISOString($keepOffset = false); + + /** + * Return a immutable copy of the instance. + * + * @return CarbonImmutable + */ + public function toImmutable(); + + /** + * Format the instance as ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601String(); + * ``` + * + * @return string + */ + public function toIso8601String(); + + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601ZuluString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toIso8601ZuluString($unitPrecision = 'second'); + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toJSON(); + * ``` + * + * @return null|string + */ + public function toJSON(); + + /** + * Return a mutable copy of the instance. + * + * @return Carbon + */ + public function toMutable(); + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function toNow($syntax = null, $short = false, $parts = 1, $options = null); + + /** + * Get default object representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toObject()); + * ``` + * + * @return object + */ + public function toObject(); + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function toPeriod($end = null, $interval = null, $unit = null); + + /** + * Format the instance as RFC1036 + * + * @example + * ``` + * echo Carbon::now()->toRfc1036String(); + * ``` + * + * @return string + */ + public function toRfc1036String(); + + /** + * Format the instance as RFC1123 + * + * @example + * ``` + * echo Carbon::now()->toRfc1123String(); + * ``` + * + * @return string + */ + public function toRfc1123String(); + + /** + * Format the instance as RFC2822 + * + * @example + * ``` + * echo Carbon::now()->toRfc2822String(); + * ``` + * + * @return string + */ + public function toRfc2822String(); + + /** + * Format the instance as RFC3339 + * + * @param bool $extended + * + * @example + * ``` + * echo Carbon::now()->toRfc3339String() . "\n"; + * echo Carbon::now()->toRfc3339String(true) . "\n"; + * ``` + * + * @return string + */ + public function toRfc3339String($extended = false); + + /** + * Format the instance as RFC7231 + * + * @example + * ``` + * echo Carbon::now()->toRfc7231String(); + * ``` + * + * @return string + */ + public function toRfc7231String(); + + /** + * Format the instance as RFC822 + * + * @example + * ``` + * echo Carbon::now()->toRfc822String(); + * ``` + * + * @return string + */ + public function toRfc822String(); + + /** + * Format the instance as RFC850 + * + * @example + * ``` + * echo Carbon::now()->toRfc850String(); + * ``` + * + * @return string + */ + public function toRfc850String(); + + /** + * Format the instance as RSS + * + * @example + * ``` + * echo Carbon::now()->toRssString(); + * ``` + * + * @return string + */ + public function toRssString(); + + /** + * Returns english human readable complete date string. + * + * @example + * ``` + * echo Carbon::now()->toString(); + * ``` + * + * @return string + */ + public function toString(); + + /** + * Format the instance as time + * + * @example + * ``` + * echo Carbon::now()->toTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toTimeString($unitPrecision = 'second'); + + /** + * Format the instance as W3C + * + * @example + * ``` + * echo Carbon::now()->toW3cString(); + * ``` + * + * @return string + */ + public function toW3cString(); + + /** + * Create a Carbon instance for today. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function today($tz = null); + + /** + * Create a Carbon instance for tomorrow. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function tomorrow($tz = null); + + /** + * Translate using translation string or callback available. + * + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers + * + * @return string + */ + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string; + + /** + * Returns the alternative number for a given integer if available in the current locale. + * + * @param int $number + * + * @return string + */ + public function translateNumber(int $number): string; + + /** + * Translate a time string from a locale to an other. + * + * @param string $timeString date/time/duration string to translate (may also contain English) + * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) + * @param string|null $to output locale of the result returned (`"en"` by default) + * @param int $mode specify what to translate with options: + * - self::TRANSLATE_ALL (default) + * - CarbonInterface::TRANSLATE_MONTHS + * - CarbonInterface::TRANSLATE_DAYS + * - CarbonInterface::TRANSLATE_UNITS + * - CarbonInterface::TRANSLATE_MERIDIEM + * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS + * + * @return string + */ + public static function translateTimeString($timeString, $from = null, $to = null, $mode = self::TRANSLATE_ALL); + + /** + * Translate a time string from the current locale (`$date->locale()`) to an other. + * + * @param string $timeString time string to translate + * @param string|null $to output locale of the result returned ("en" by default) + * + * @return string + */ + public function translateTimeStringTo($timeString, $to = null); + + /** + * Translate using translation string or callback available. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param null $number + * + * @return string + */ + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; + + /** + * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) + * but translate words whenever possible (months, day names, etc.) using the current locale. + * + * @param string $format + * + * @return string + */ + public function translatedFormat(string $format): string; + + /** + * Set the timezone or returns the timezone name if no arguments passed. + * + * @param DateTimeZone|string $value + * + * @return static|string + */ + public function tz($value = null); + + /** + * @alias getTimestamp + * + * Returns the UNIX timestamp for the current date. + * + * @return int + */ + public function unix(); + + /** + * @alias to + * + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if months should be calculated with overflow. + * + * @param bool $monthsOverflow + * + * @return void + */ + public static function useMonthsOverflow($monthsOverflow = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * Enable the strict mode (or disable with passing false). + * + * @param bool $strictModeEnabled + */ + public static function useStrictMode($strictModeEnabled = true); + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true); + + /** + * Set the instance's timezone to UTC. + * + * @return static + */ + public function utc(); + + /** + * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. + * + * @param int|null $minuteOffset + * + * @return int|static + */ + public function utcOffset(?int $minuteOffset = null); + + /** + * Returns the milliseconds timestamps used amongst other by Date javascript objects. + * + * @return float + */ + public function valueOf(); + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function week($week = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null); + + /** + * Get/set the weekday from 0 (Sunday) to 6 (Saturday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function weekday($value = null); + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function weeksInYear($dayOfWeek = null, $dayOfYear = null); + + /** + * Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * + * /!\ Use this method for unit tests only. + * + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure|null $callback + * + * @return mixed + */ + public static function withTestNow($testNow = null, $callback = null); + + /** + * Create a Carbon instance for yesterday. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function yesterday($tz = null); + + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php new file mode 100644 index 00000000000..592eaa7a419 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -0,0 +1,2779 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\BadFluentConstructorException; +use Carbon\Exceptions\BadFluentSetterException; +use Carbon\Exceptions\InvalidCastException; +use Carbon\Exceptions\InvalidIntervalException; +use Carbon\Exceptions\ParseErrorException; +use Carbon\Exceptions\UnitNotConfiguredException; +use Carbon\Exceptions\UnknownGetterException; +use Carbon\Exceptions\UnknownSetterException; +use Carbon\Exceptions\UnknownUnitException; +use Carbon\Traits\IntervalRounding; +use Carbon\Traits\IntervalStep; +use Carbon\Traits\Mixin; +use Carbon\Traits\Options; +use Closure; +use DateInterval; +use DateTimeInterface; +use DateTimeZone; +use Exception; +use ReflectionException; +use ReturnTypeWillChange; +use Throwable; + +/** + * A simple API extension for DateInterval. + * The implementation provides helpers to handle weeks but only days are saved. + * Weeks are calculated based on the total days of the current instance. + * + * @property int $years Total years of the current interval. + * @property int $months Total months of the current interval. + * @property int $weeks Total weeks of the current interval calculated from the days. + * @property int $dayz Total days of the current interval (weeks * 7 + days). + * @property int $hours Total hours of the current interval. + * @property int $minutes Total minutes of the current interval. + * @property int $seconds Total seconds of the current interval. + * @property int $microseconds Total microseconds of the current interval. + * @property int $milliseconds Total microseconds of the current interval. + * @property int $microExcludeMilli Remaining microseconds without the milliseconds. + * @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). + * @property int $daysExcludeWeeks alias of dayzExcludeWeeks + * @property-read float $totalYears Number of years equivalent to the interval. + * @property-read float $totalMonths Number of months equivalent to the interval. + * @property-read float $totalWeeks Number of weeks equivalent to the interval. + * @property-read float $totalDays Number of days equivalent to the interval. + * @property-read float $totalDayz Alias for totalDays. + * @property-read float $totalHours Number of hours equivalent to the interval. + * @property-read float $totalMinutes Number of minutes equivalent to the interval. + * @property-read float $totalSeconds Number of seconds equivalent to the interval. + * @property-read float $totalMilliseconds Number of milliseconds equivalent to the interval. + * @property-read float $totalMicroseconds Number of microseconds equivalent to the interval. + * @property-read string $locale locale of the current instance + * + * @method static CarbonInterval years($years = 1) Create instance specifying a number of years or modify the number of years if called on an instance. + * @method static CarbonInterval year($years = 1) Alias for years() + * @method static CarbonInterval months($months = 1) Create instance specifying a number of months or modify the number of months if called on an instance. + * @method static CarbonInterval month($months = 1) Alias for months() + * @method static CarbonInterval weeks($weeks = 1) Create instance specifying a number of weeks or modify the number of weeks if called on an instance. + * @method static CarbonInterval week($weeks = 1) Alias for weeks() + * @method static CarbonInterval days($days = 1) Create instance specifying a number of days or modify the number of days if called on an instance. + * @method static CarbonInterval dayz($days = 1) Alias for days() + * @method static CarbonInterval daysExcludeWeeks($days = 1) Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if called on an instance. + * @method static CarbonInterval dayzExcludeWeeks($days = 1) Alias for daysExcludeWeeks() + * @method static CarbonInterval day($days = 1) Alias for days() + * @method static CarbonInterval hours($hours = 1) Create instance specifying a number of hours or modify the number of hours if called on an instance. + * @method static CarbonInterval hour($hours = 1) Alias for hours() + * @method static CarbonInterval minutes($minutes = 1) Create instance specifying a number of minutes or modify the number of minutes if called on an instance. + * @method static CarbonInterval minute($minutes = 1) Alias for minutes() + * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds or modify the number of seconds if called on an instance. + * @method static CarbonInterval second($seconds = 1) Alias for seconds() + * @method static CarbonInterval milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance. + * @method static CarbonInterval millisecond($milliseconds = 1) Alias for milliseconds() + * @method static CarbonInterval microseconds($microseconds = 1) Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance. + * @method static CarbonInterval microsecond($microseconds = 1) Alias for microseconds() + * @method $this addYears(int $years) Add given number of years to the current interval + * @method $this subYears(int $years) Subtract given number of years to the current interval + * @method $this addMonths(int $months) Add given number of months to the current interval + * @method $this subMonths(int $months) Subtract given number of months to the current interval + * @method $this addWeeks(int|float $weeks) Add given number of weeks to the current interval + * @method $this subWeeks(int|float $weeks) Subtract given number of weeks to the current interval + * @method $this addDays(int|float $days) Add given number of days to the current interval + * @method $this subDays(int|float $days) Subtract given number of days to the current interval + * @method $this addHours(int|float $hours) Add given number of hours to the current interval + * @method $this subHours(int|float $hours) Subtract given number of hours to the current interval + * @method $this addMinutes(int|float $minutes) Add given number of minutes to the current interval + * @method $this subMinutes(int|float $minutes) Subtract given number of minutes to the current interval + * @method $this addSeconds(int|float $seconds) Add given number of seconds to the current interval + * @method $this subSeconds(int|float $seconds) Subtract given number of seconds to the current interval + * @method $this addMilliseconds(int|float $milliseconds) Add given number of milliseconds to the current interval + * @method $this subMilliseconds(int|float $milliseconds) Subtract given number of milliseconds to the current interval + * @method $this addMicroseconds(int|float $microseconds) Add given number of microseconds to the current interval + * @method $this subMicroseconds(int|float $microseconds) Subtract given number of microseconds to the current interval + * @method $this roundYear(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(int|float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(int|float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(int|float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(int|float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(int|float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(int|float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(int|float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(int|float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundWeek(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundWeeks(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorWeek(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorWeeks(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilWeek(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilWeeks(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundDay(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(int|float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(int|float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(int|float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(int|float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(int|float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(int|float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(int|float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(int|float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(int|float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(int|float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(int|float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(int|float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(int|float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(int|float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(int|float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(int|float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(int|float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(int|float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(int|float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(int|float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(int|float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(int|float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(int|float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(int|float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(int|float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(int|float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(int|float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(int|float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(int|float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(int|float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(int|float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(int|float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(int|float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(int|float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(int|float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(int|float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(int|float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(int|float $precision = 1) Ceil the current instance microsecond with given precision. + */ +class CarbonInterval extends DateInterval implements CarbonConverterInterface +{ + use IntervalRounding; + use IntervalStep; + use Mixin { + Mixin::mixin as baseMixin; + } + use Options; + + /** + * Interval spec period designators + */ + public const PERIOD_PREFIX = 'P'; + public const PERIOD_YEARS = 'Y'; + public const PERIOD_MONTHS = 'M'; + public const PERIOD_DAYS = 'D'; + public const PERIOD_TIME_PREFIX = 'T'; + public const PERIOD_HOURS = 'H'; + public const PERIOD_MINUTES = 'M'; + public const PERIOD_SECONDS = 'S'; + + /** + * A translator to ... er ... translate stuff + * + * @var \Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * @var array|null + */ + protected static $cascadeFactors; + + /** + * @var array + */ + protected static $formats = [ + 'y' => 'y', + 'Y' => 'y', + 'o' => 'y', + 'm' => 'm', + 'n' => 'm', + 'W' => 'weeks', + 'd' => 'd', + 'j' => 'd', + 'z' => 'd', + 'h' => 'h', + 'g' => 'h', + 'H' => 'h', + 'G' => 'h', + 'i' => 'i', + 's' => 's', + 'u' => 'micro', + 'v' => 'milli', + ]; + + /** + * @var array|null + */ + private static $flipCascadeFactors; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = []; + + /** + * Timezone handler for settings() method. + * + * @var mixed + */ + protected $tzName; + + /** + * Set the instance's timezone from a string or object. + * + * @param \DateTimeZone|string $tzName + * + * @return static + */ + public function setTimezone($tzName) + { + $this->tzName = $tzName; + + return $this; + } + + /** + * @internal + * + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param \DateTimeZone|string $tzName + * + * @return static + */ + public function shiftTimezone($tzName) + { + $this->tzName = $tzName; + + return $this; + } + + /** + * Mapping of units and factors for cascading. + * + * Should only be modified by changing the factors or referenced constants. + * + * @return array + */ + public static function getCascadeFactors() + { + return static::$cascadeFactors ?: [ + 'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'], + 'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'], + 'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'], + 'hours' => [Carbon::MINUTES_PER_HOUR, 'minutes'], + 'dayz' => [Carbon::HOURS_PER_DAY, 'hours'], + 'weeks' => [Carbon::DAYS_PER_WEEK, 'dayz'], + 'months' => [Carbon::WEEKS_PER_MONTH, 'weeks'], + 'years' => [Carbon::MONTHS_PER_YEAR, 'months'], + ]; + } + + private static function standardizeUnit($unit) + { + $unit = rtrim($unit, 'sz').'s'; + + return $unit === 'days' ? 'dayz' : $unit; + } + + private static function getFlipCascadeFactors() + { + if (!self::$flipCascadeFactors) { + self::$flipCascadeFactors = []; + + foreach (static::getCascadeFactors() as $to => [$factor, $from]) { + self::$flipCascadeFactors[self::standardizeUnit($from)] = [self::standardizeUnit($to), $factor]; + } + } + + return self::$flipCascadeFactors; + } + + /** + * Set default cascading factors for ->cascade() method. + * + * @param array $cascadeFactors + */ + public static function setCascadeFactors(array $cascadeFactors) + { + self::$flipCascadeFactors = null; + static::$cascadeFactors = $cascadeFactors; + } + + /////////////////////////////////////////////////////////////////// + //////////////////////////// CONSTRUCTORS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Create a new CarbonInterval instance. + * + * @param Closure|DateInterval|string|int|null $years + * @param int|null $months + * @param int|null $weeks + * @param int|null $days + * @param int|null $hours + * @param int|null $minutes + * @param int|null $seconds + * @param int|null $microseconds + * + * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. + */ + public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) + { + if ($years instanceof Closure) { + $this->step = $years; + $years = null; + } + + if ($years instanceof DateInterval) { + parent::__construct(static::getDateIntervalSpec($years)); + $this->f = $years->f; + self::copyNegativeUnits($years, $this); + + return; + } + + $spec = $years; + + if (!\is_string($spec) || (float) $years || preg_match('/^[\d.]/', $years)) { + $spec = static::PERIOD_PREFIX; + + $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; + $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; + + $specDays = 0; + $specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0; + $specDays += $days > 0 ? $days : 0; + + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + + if ($hours > 0 || $minutes > 0 || $seconds > 0) { + $spec .= static::PERIOD_TIME_PREFIX; + $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; + $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; + $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; + } + + if ($spec === static::PERIOD_PREFIX) { + // Allow the zero interval. + $spec .= '0'.static::PERIOD_YEARS; + } + } + + parent::__construct($spec); + + if ($microseconds !== null) { + $this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND; + } + } + + /** + * Returns the factor for a given source-to-target couple. + * + * @param string $source + * @param string $target + * + * @return int|null + */ + public static function getFactor($source, $target) + { + $source = self::standardizeUnit($source); + $target = self::standardizeUnit($target); + $factors = self::getFlipCascadeFactors(); + + if (isset($factors[$source])) { + [$to, $factor] = $factors[$source]; + + if ($to === $target) { + return $factor; + } + + return $factor * static::getFactor($to, $target); + } + + return null; + } + + /** + * Returns the factor for a given source-to-target couple if set, + * else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK. + * + * @param string $source + * @param string $target + * + * @return int|null + */ + public static function getFactorWithDefault($source, $target) + { + $factor = self::getFactor($source, $target); + + if ($factor) { + return $factor; + } + + static $defaults = [ + 'month' => ['year' => Carbon::MONTHS_PER_YEAR], + 'week' => ['month' => Carbon::WEEKS_PER_MONTH], + 'day' => ['week' => Carbon::DAYS_PER_WEEK], + 'hour' => ['day' => Carbon::HOURS_PER_DAY], + 'minute' => ['hour' => Carbon::MINUTES_PER_HOUR], + 'second' => ['minute' => Carbon::SECONDS_PER_MINUTE], + 'millisecond' => ['second' => Carbon::MILLISECONDS_PER_SECOND], + 'microsecond' => ['millisecond' => Carbon::MICROSECONDS_PER_MILLISECOND], + ]; + + return $defaults[$source][$target] ?? null; + } + + /** + * Returns current config for days per week. + * + * @return int + */ + public static function getDaysPerWeek() + { + return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK; + } + + /** + * Returns current config for hours per day. + * + * @return int + */ + public static function getHoursPerDay() + { + return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY; + } + + /** + * Returns current config for minutes per hour. + * + * @return int + */ + public static function getMinutesPerHour() + { + return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR; + } + + /** + * Returns current config for seconds per minute. + * + * @return int + */ + public static function getSecondsPerMinute() + { + return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE; + } + + /** + * Returns current config for microseconds per second. + * + * @return int + */ + public static function getMillisecondsPerSecond() + { + return static::getFactor('milliseconds', 'seconds') ?: Carbon::MILLISECONDS_PER_SECOND; + } + + /** + * Returns current config for microseconds per second. + * + * @return int + */ + public static function getMicrosecondsPerMillisecond() + { + return static::getFactor('microseconds', 'milliseconds') ?: Carbon::MICROSECONDS_PER_MILLISECOND; + } + + /** + * Create a new CarbonInterval instance from specific values. + * This is an alias for the constructor that allows better fluent + * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than + * (new CarbonInterval(1))->fn(). + * + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds + * @param int $microseconds + * + * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. + * + * @return static + */ + public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) + { + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $microseconds); + } + + /** + * Parse a string into a new CarbonInterval object according to the specified format. + * + * @example + * ``` + * echo Carboninterval::createFromFormat('H:i', '1:30'); + * ``` + * + * @param string $format Format of the $interval input string + * @param string|null $interval Input string to convert into an interval + * + * @throws \Carbon\Exceptions\ParseErrorException when the $interval cannot be parsed as an interval. + * + * @return static + */ + public static function createFromFormat(string $format, ?string $interval) + { + $instance = new static(0); + $length = mb_strlen($format); + + if (preg_match('/s([,.])([uv])$/', $format, $match)) { + $interval = explode($match[1], $interval); + $index = \count($interval) - 1; + $interval[$index] = str_pad($interval[$index], $match[2] === 'v' ? 3 : 6, '0'); + $interval = implode($match[1], $interval); + } + + $interval = $interval ?? ''; + + for ($index = 0; $index < $length; $index++) { + $expected = mb_substr($format, $index, 1); + $nextCharacter = mb_substr($interval, 0, 1); + $unit = static::$formats[$expected] ?? null; + + if ($unit) { + if (!preg_match('/^-?\d+/', $interval, $match)) { + throw new ParseErrorException('number', $nextCharacter); + } + + $interval = mb_substr($interval, mb_strlen($match[0])); + $instance->$unit += (int) ($match[0]); + + continue; + } + + if ($nextCharacter !== $expected) { + throw new ParseErrorException( + "'$expected'", + $nextCharacter, + 'Allowed substitutes for interval formats are '.implode(', ', array_keys(static::$formats))."\n". + 'See https://php.net/manual/en/function.date.php for their meaning' + ); + } + + $interval = mb_substr($interval, 1); + } + + if ($interval !== '') { + throw new ParseErrorException( + 'end of string', + $interval + ); + } + + return $instance; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + $date = new static(0); + $date->copyProperties($this); + $date->step = $this->step; + + return $date; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return $this->copy(); + } + + /** + * Provide static helpers to create instances. Allows CarbonInterval::years(3). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @return static|null + */ + public static function __callStatic($method, $parameters) + { + try { + $interval = new static(0); + $localStrictModeEnabled = $interval->localStrictModeEnabled; + $interval->localStrictModeEnabled = true; + + $result = static::hasMacro($method) + ? static::bindMacroContext(null, function () use (&$method, &$parameters, &$interval) { + return $interval->callMacro($method, $parameters); + }) + : $interval->$method(...$parameters); + + $interval->localStrictModeEnabled = $localStrictModeEnabled; + + return $result; + } catch (BadFluentSetterException $exception) { + if (Carbon::isStrictModeEnabled()) { + throw new BadFluentConstructorException($method, 0, $exception); + } + + return null; + } + } + + /** + * Return the current context from inside a macro callee or a new one if static. + * + * @return static + */ + protected static function this() + { + return end(static::$macroContextStack) ?: new static(0); + } + + /** + * Creates a CarbonInterval from string. + * + * Format: + * + * Suffix | Unit | Example | DateInterval expression + * -------|---------|---------|------------------------ + * y | years | 1y | P1Y + * mo | months | 3mo | P3M + * w | weeks | 2w | P2W + * d | days | 28d | P28D + * h | hours | 4h | PT4H + * m | minutes | 12m | PT12M + * s | seconds | 59s | PT59S + * + * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. + * + * Special cases: + * - An empty string will return a zero interval + * - Fractions are allowed for weeks, days, hours and minutes and will be converted + * and rounded to the next smaller value (caution: 0.5w = 4d) + * + * @param string $intervalDefinition + * + * @return static + */ + public static function fromString($intervalDefinition) + { + if (empty($intervalDefinition)) { + return new static(0); + } + + $years = 0; + $months = 0; + $weeks = 0; + $days = 0; + $hours = 0; + $minutes = 0; + $seconds = 0; + $milliseconds = 0; + $microseconds = 0; + + $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; + preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); + + while ([$part, $value, $unit] = array_shift($parts)) { + $intValue = (int) $value; + $fraction = (float) $value - $intValue; + + // Fix calculation precision + switch (round($fraction, 6)) { + case 1: + $fraction = 0; + $intValue++; + + break; + case 0: + $fraction = 0; + + break; + } + + switch ($unit === 'µs' ? 'µs' : strtolower($unit)) { + case 'millennia': + case 'millennium': + $years += $intValue * CarbonInterface::YEARS_PER_MILLENNIUM; + + break; + + case 'century': + case 'centuries': + $years += $intValue * CarbonInterface::YEARS_PER_CENTURY; + + break; + + case 'decade': + case 'decades': + $years += $intValue * CarbonInterface::YEARS_PER_DECADE; + + break; + + case 'year': + case 'years': + case 'y': + $years += $intValue; + + break; + + case 'quarter': + case 'quarters': + $months += $intValue * CarbonInterface::MONTHS_PER_QUARTER; + + break; + + case 'month': + case 'months': + case 'mo': + $months += $intValue; + + break; + + case 'week': + case 'weeks': + case 'w': + $weeks += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getDaysPerWeek(), 'd']; + } + + break; + + case 'day': + case 'days': + case 'd': + $days += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getHoursPerDay(), 'h']; + } + + break; + + case 'hour': + case 'hours': + case 'h': + $hours += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getMinutesPerHour(), 'm']; + } + + break; + + case 'minute': + case 'minutes': + case 'm': + $minutes += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getSecondsPerMinute(), 's']; + } + + break; + + case 'second': + case 'seconds': + case 's': + $seconds += $intValue; + + if ($fraction) { + $parts[] = [null, $fraction * static::getMillisecondsPerSecond(), 'ms']; + } + + break; + + case 'millisecond': + case 'milliseconds': + case 'milli': + case 'ms': + $milliseconds += $intValue; + + if ($fraction) { + $microseconds += round($fraction * static::getMicrosecondsPerMillisecond()); + } + + break; + + case 'microsecond': + case 'microseconds': + case 'micro': + case 'µs': + $microseconds += $intValue; + + break; + + default: + throw new InvalidIntervalException( + sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) + ); + } + } + + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $milliseconds * Carbon::MICROSECONDS_PER_MILLISECOND + $microseconds); + } + + /** + * Creates a CarbonInterval from string using a different locale. + * + * @param string $interval interval string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be used instead. + * + * @return static + */ + public static function parseFromLocale($interval, $locale = null) + { + return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en')); + } + + private static function castIntervalToClass(DateInterval $interval, string $className) + { + $mainClass = DateInterval::class; + + if (!is_a($className, $mainClass, true)) { + throw new InvalidCastException("$className is not a sub-class of $mainClass."); + } + + $microseconds = $interval->f; + $instance = new $className(static::getDateIntervalSpec($interval)); + + if ($microseconds) { + $instance->f = $microseconds; + } + + if ($interval instanceof self && is_a($className, self::class, true)) { + self::copyStep($interval, $instance); + } + + self::copyNegativeUnits($interval, $instance); + + return $instance; + } + + private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void + { + $to->invert = $from->invert; + + foreach (['y', 'm', 'd', 'h', 'i', 's'] as $unit) { + if ($from->$unit < 0) { + $to->$unit *= -1; + } + } + } + + private static function copyStep(self $from, self $to): void + { + $to->setStep($from->getStep()); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateInterval + */ + public function cast(string $className) + { + return self::castIntervalToClass($this, $className); + } + + /** + * Create a CarbonInterval instance from a DateInterval one. Can not instance + * DateInterval objects created from DateTime::diff() as you can't externally + * set the $days field. + * + * @param DateInterval $interval + * + * @return static + */ + public static function instance(DateInterval $interval) + { + return self::castIntervalToClass($interval, static::class); + } + + /** + * Make a CarbonInterval instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be intervals (skip dates + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return static|null + */ + public static function make($interval, $unit = null) + { + if ($unit) { + $interval = "$interval ".Carbon::pluralUnit($unit); + } + + if ($interval instanceof DateInterval) { + return static::instance($interval); + } + + if ($interval instanceof Closure) { + return new static($interval); + } + + if (!\is_string($interval)) { + return null; + } + + return static::makeFromString($interval); + } + + protected static function makeFromString(string $interval) + { + $interval = preg_replace('/\s+/', ' ', trim($interval)); + + if (preg_match('/^P[T\d]/', $interval)) { + return new static($interval); + } + + if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $interval)) { + return static::fromString($interval); + } + + /** @var static $interval */ + $interval = static::createFromDateString($interval); + + return !$interval || $interval->isEmpty() ? null : $interval; + } + + protected function resolveInterval($interval) + { + if (!($interval instanceof self)) { + return self::make($interval); + } + + return $interval; + } + + /** + * Sets up a DateInterval from the relative parts of the string. + * + * @param string $time + * + * @return static + * + * @link https://php.net/manual/en/dateinterval.createfromdatestring.php + */ + #[ReturnTypeWillChange] + public static function createFromDateString($time) + { + $interval = @parent::createFromDateString(strtr($time, [ + ',' => ' ', + ' and ' => ' ', + ])); + + if ($interval instanceof DateInterval) { + $interval = static::instance($interval); + } + + return $interval; + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the CarbonInterval object. + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return int|float|string + */ + public function get($name) + { + if (str_starts_with($name, 'total')) { + return $this->total(substr($name, 5)); + } + + switch ($name) { + case 'years': + return $this->y; + + case 'months': + return $this->m; + + case 'dayz': + return $this->d; + + case 'hours': + return $this->h; + + case 'minutes': + return $this->i; + + case 'seconds': + return $this->s; + + case 'milli': + case 'milliseconds': + return (int) (round($this->f * Carbon::MICROSECONDS_PER_SECOND) / Carbon::MICROSECONDS_PER_MILLISECOND); + + case 'micro': + case 'microseconds': + return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND); + + case 'microExcludeMilli': + return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; + + case 'weeks': + return (int) ($this->d / static::getDaysPerWeek()); + + case 'daysExcludeWeeks': + case 'dayzExcludeWeeks': + return $this->d % static::getDaysPerWeek(); + + case 'locale': + return $this->getTranslatorLocale(); + + default: + throw new UnknownGetterException($name); + } + } + + /** + * Get a part of the CarbonInterval object. + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return int|float|string + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Set a part of the CarbonInterval object. + * + * @param string|array $name + * @param int $value + * + * @throws UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null) + { + $properties = \is_array($name) ? $name : [$name => $value]; + + foreach ($properties as $key => $value) { + switch (Carbon::singularUnit(rtrim($key, 'z'))) { + case 'year': + $this->y = $value; + + break; + + case 'month': + $this->m = $value; + + break; + + case 'week': + $this->d = $value * static::getDaysPerWeek(); + + break; + + case 'day': + $this->d = $value; + + break; + + case 'daysexcludeweek': + case 'dayzexcludeweek': + $this->d = $this->weeks * static::getDaysPerWeek() + $value; + + break; + + case 'hour': + $this->h = $value; + + break; + + case 'minute': + $this->i = $value; + + break; + + case 'second': + $this->s = $value; + + break; + + case 'milli': + case 'millisecond': + $this->microseconds = $value * Carbon::MICROSECONDS_PER_MILLISECOND + $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND; + + break; + + case 'micro': + case 'microsecond': + $this->f = $value / Carbon::MICROSECONDS_PER_SECOND; + + break; + + default: + if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + throw new UnknownSetterException($key); + } + + $this->$key = $value; + } + } + + return $this; + } + + /** + * Set a part of the CarbonInterval object. + * + * @param string $name + * @param int $value + * + * @throws UnknownSetterException + */ + public function __set($name, $value) + { + $this->set($name, $value); + } + + /** + * Allow setting of weeks and days to be cumulative. + * + * @param int $weeks Number of weeks to set + * @param int $days Number of days to set + * + * @return static + */ + public function weeksAndDays($weeks, $days) + { + $this->dayz = ($weeks * static::getDaysPerWeek()) + $days; + + return $this; + } + + /** + * Returns true if the interval is empty for each unit. + * + * @return bool + */ + public function isEmpty() + { + return $this->years === 0 && + $this->months === 0 && + $this->dayz === 0 && + !$this->days && + $this->hours === 0 && + $this->minutes === 0 && + $this->seconds === 0 && + $this->microseconds === 0; + } + + /** + * Register a custom macro. + * + * @example + * ``` + * CarbonInterval::macro('twice', function () { + * return $this->times(2); + * }); + * echo CarbonInterval::hours(2)->twice(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Register macros from a mixin object. + * + * @example + * ``` + * CarbonInterval::mixin(new class { + * public function daysToHours() { + * return function () { + * $this->hours += $this->days; + * $this->days = 0; + * + * return $this; + * }; + * } + * public function hoursToDays() { + * return function () { + * $this->days += $this->hours; + * $this->hours = 0; + * + * return $this; + * }; + * } + * }); + * echo CarbonInterval::hours(5)->hoursToDays() . "\n"; + * echo CarbonInterval::days(5)->daysToHours() . "\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + static::baseMixin($mixin); + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + /** + * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadFluentSetterException|Throwable + * + * @return static + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + return $this->callMacro($method, $parameters); + }); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + if (preg_match('/^(?add|sub)(?[A-Z].*)$/', $method, $match)) { + return $this->{$match['method']}($parameters[0], $match['unit']); + } + + try { + $this->set($method, \count($parameters) === 0 ? 1 : $parameters[0]); + } catch (UnknownSetterException $exception) { + if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + throw new BadFluentSetterException($method, 0, $exception); + } + } + + return $this; + } + + protected function getForHumansInitialVariables($syntax, $short) + { + if (\is_array($syntax)) { + return $syntax; + } + + if (\is_int($short)) { + return [ + 'parts' => $short, + 'short' => false, + ]; + } + + if (\is_bool($syntax)) { + return [ + 'short' => $syntax, + 'syntax' => CarbonInterface::DIFF_ABSOLUTE, + ]; + } + + return []; + } + + /** + * @param mixed $syntax + * @param mixed $short + * @param mixed $parts + * @param mixed $options + * + * @return array + */ + protected function getForHumansParameters($syntax = null, $short = false, $parts = -1, $options = null) + { + $optionalSpace = ' '; + $default = $this->getTranslationMessage('list.0') ?? $this->getTranslationMessage('list') ?? ' '; + $join = $default === '' ? '' : ' '; + $altNumbers = false; + $aUnit = false; + $minimumUnit = 's'; + $skip = []; + extract($this->getForHumansInitialVariables($syntax, $short)); + $skip = array_filter((array) $skip, static function ($value) { + return \is_string($value) && $value !== ''; + }); + + if ($syntax === null) { + $syntax = CarbonInterface::DIFF_ABSOLUTE; + } + + if ($parts === -1) { + $parts = INF; + } + + if ($options === null) { + $options = static::getHumanDiffOptions(); + } + + if ($join === false) { + $join = ' '; + } elseif ($join === true) { + $join = [ + $default, + $this->getTranslationMessage('list.1') ?? $default, + ]; + } + + if ($altNumbers && $altNumbers !== true) { + $language = new Language($this->locale); + $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); + } + + if (\is_array($join)) { + [$default, $last] = $join; + + if ($default !== ' ') { + $optionalSpace = ''; + } + + $join = function ($list) use ($default, $last) { + if (\count($list) < 2) { + return implode('', $list); + } + + $end = array_pop($list); + + return implode($default, $list).$last.$end; + }; + } + + if (\is_string($join)) { + if ($join !== ' ') { + $optionalSpace = ''; + } + + $glue = $join; + $join = function ($list) use ($glue) { + return implode($glue, $list); + }; + } + + $interpolations = [ + ':optional-space' => $optionalSpace, + ]; + + return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip]; + } + + protected static function getRoundingMethodFromOptions(int $options): ?string + { + if ($options & CarbonInterface::ROUND) { + return 'round'; + } + + if ($options & CarbonInterface::CEIL) { + return 'ceil'; + } + + if ($options & CarbonInterface::FLOOR) { + return 'floor'; + } + + return null; + } + + /** + * Returns interval values as an array where key are the unit names and values the counts. + * + * @return int[] + */ + public function toArray() + { + return [ + 'years' => $this->years, + 'months' => $this->months, + 'weeks' => $this->weeks, + 'days' => $this->daysExcludeWeeks, + 'hours' => $this->hours, + 'minutes' => $this->minutes, + 'seconds' => $this->seconds, + 'microseconds' => $this->microseconds, + ]; + } + + /** + * Returns interval non-zero values as an array where key are the unit names and values the counts. + * + * @return int[] + */ + public function getNonZeroValues() + { + return array_filter($this->toArray(), 'intval'); + } + + /** + * Returns interval values as an array where key are the unit names and values the counts + * from the biggest non-zero one the the smallest non-zero one. + * + * @return int[] + */ + public function getValuesSequence() + { + $nonZeroValues = $this->getNonZeroValues(); + + if ($nonZeroValues === []) { + return []; + } + + $keys = array_keys($nonZeroValues); + $firstKey = $keys[0]; + $lastKey = $keys[\count($keys) - 1]; + $values = []; + $record = false; + + foreach ($this->toArray() as $unit => $count) { + if ($unit === $firstKey) { + $record = true; + } + + if ($record) { + $values[$unit] = $count; + } + + if ($unit === $lastKey) { + $record = false; + } + } + + return $values; + } + + /** + * Get the current interval in a human readable format in the current locale. + * + * @example + * ``` + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans() . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 2]) . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['short' => true]) . "\n"; + * echo CarbonInterval::fromString('1d 24h')->forHumans(['join' => ' or ']) . "\n"; + * echo CarbonInterval::fromString('1d 24h')->forHumans(['minimumUnit' => 'hour']) . "\n"; + * ``` + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: -1: no limits) + * @param int $options human diff options + * + * @throws Exception + * + * @return string + */ + public function forHumans($syntax = null, $short = false, $parts = -1, $options = null) + { + [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip] = $this + ->getForHumansParameters($syntax, $short, $parts, $options); + + $interval = []; + + $syntax = (int) ($syntax ?? CarbonInterface::DIFF_ABSOLUTE); + $absolute = $syntax === CarbonInterface::DIFF_ABSOLUTE; + $relativeToNow = $syntax === CarbonInterface::DIFF_RELATIVE_TO_NOW; + $count = 1; + $unit = $short ? 's' : 'second'; + $isFuture = $this->invert === 1; + $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + $declensionMode = null; + + /** @var \Symfony\Component\Translation\Translator $translator */ + $translator = $this->getLocalTranslator(); + + $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { + if (!$absolute) { + $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); + + if ($this->needsDeclension($declensionMode, $index, $parts)) { + // Some languages have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $key) { + return $result; + } + } + } + + $result = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $unit) { + return $result; + } + + return null; + }; + + $intervalValues = $this; + $method = static::getRoundingMethodFromOptions($options); + + if ($method) { + $previousCount = INF; + + while ( + \count($intervalValues->getNonZeroValues()) > $parts && + ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 + ) { + $index = min($count, $previousCount - 1) - 2; + + if ($index < 0) { + break; + } + + $intervalValues = $this->copy()->roundUnit( + $keys[$index], + 1, + $method + ); + $previousCount = $count; + } + } + + $diffIntervalArray = [ + ['value' => $intervalValues->years, 'unit' => 'year', 'unitShort' => 'y'], + ['value' => $intervalValues->months, 'unit' => 'month', 'unitShort' => 'm'], + ['value' => $intervalValues->weeks, 'unit' => 'week', 'unitShort' => 'w'], + ['value' => $intervalValues->daysExcludeWeeks, 'unit' => 'day', 'unitShort' => 'd'], + ['value' => $intervalValues->hours, 'unit' => 'hour', 'unitShort' => 'h'], + ['value' => $intervalValues->minutes, 'unit' => 'minute', 'unitShort' => 'min'], + ['value' => $intervalValues->seconds, 'unit' => 'second', 'unitShort' => 's'], + ['value' => $intervalValues->milliseconds, 'unit' => 'millisecond', 'unitShort' => 'ms'], + ['value' => $intervalValues->microExcludeMilli, 'unit' => 'microsecond', 'unitShort' => 'µs'], + ]; + + if (!empty($skip)) { + foreach ($diffIntervalArray as $index => &$unitData) { + $nextIndex = $index + 1; + + if ($unitData['value'] && + isset($diffIntervalArray[$nextIndex]) && + \count(array_intersect([$unitData['unit'], $unitData['unit'].'s', $unitData['unitShort']], $skip)) + ) { + $diffIntervalArray[$nextIndex]['value'] += $unitData['value'] * + self::getFactorWithDefault($diffIntervalArray[$nextIndex]['unit'], $unitData['unit']); + $unitData['value'] = 0; + } + } + } + + $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { + $count = $unitData['value']; + + if ($short) { + $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); + + if ($result !== null) { + return $result; + } + } elseif ($aUnit) { + $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); + + if ($result !== null) { + return $result; + } + } + + if (!$absolute) { + return $handleDeclensions($unitData['unit'], $count, $index, $parts); + } + + return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); + }; + + $fallbackUnit = ['second', 's']; + + foreach ($diffIntervalArray as $diffIntervalData) { + if ($diffIntervalData['value'] > 0) { + $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; + $count = $diffIntervalData['value']; + $interval[] = [$short, $diffIntervalData]; + } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { + break; + } + + // break the loop after we get the required number of parts in array + if (\count($interval) >= $parts) { + break; + } + + // break the loop after we have reached the minimum unit + if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { + $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; + + break; + } + } + + $actualParts = \count($interval); + + foreach ($interval as $index => &$item) { + $item = $transChoice($item[0], $item[1], $index, $actualParts); + } + + if (\count($interval) === 0) { + if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { + $key = 'diff_now'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + + $count = $options & CarbonInterface::NO_ZERO_DIFF ? 1 : 0; + $unit = $fallbackUnit[$short ? 1 : 0]; + $interval[] = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); + } + + // join the interval parts by a space + $time = $join($interval); + + unset($diffIntervalArray, $interval); + + if ($absolute) { + return $time; + } + + $isFuture = $this->invert === 1; + + $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + + if ($parts === 1) { + if ($relativeToNow && $unit === 'day') { + if ($count === 1 && $options & CarbonInterface::ONE_DAY_WORDS) { + $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + + if ($count === 2 && $options & CarbonInterface::TWO_DAY_WORDS) { + $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; + $translation = $this->translate($key, $interpolations, null, $translator); + + if ($translation !== $key) { + return $translation; + } + } + } + + $aTime = $aUnit ? $handleDeclensions('a_'.$unit, $count) : null; + + $time = $aTime ?: $handleDeclensions($unit, $count) ?: $time; + } + + $time = [':time' => $time]; + + return $this->translate($transId, array_merge($time, $interpolations, $time), null, $translator); + } + + /** + * Format the instance as a string using the forHumans() function. + * + * @throws Exception + * + * @return string + */ + public function __toString() + { + $format = $this->localToStringFormat; + + if (!$format) { + return $this->forHumans(); + } + + if ($format instanceof Closure) { + return $format($this); + } + + return $this->format($format); + } + + /** + * Return native DateInterval PHP object matching the current instance. + * + * @example + * ``` + * var_dump(CarbonInterval::hours(2)->toDateInterval()); + * ``` + * + * @return DateInterval + */ + public function toDateInterval() + { + return self::castIntervalToClass($this, DateInterval::class); + } + + /** + * Convert the interval to a CarbonPeriod. + * + * @param DateTimeInterface|string|int ...$params Start date, [end date or recurrences] and optional settings. + * + * @return CarbonPeriod + */ + public function toPeriod(...$params) + { + if ($this->tzName) { + $tz = \is_string($this->tzName) ? new DateTimeZone($this->tzName) : $this->tzName; + + if ($tz instanceof DateTimeZone) { + array_unshift($params, $tz); + } + } + + return CarbonPeriod::create($this, ...$params); + } + + /** + * Invert the interval. + * + * @param bool|int $inverted if a parameter is passed, the passed value casted as 1 or 0 is used + * as the new value of the ->invert property. + * + * @return $this + */ + public function invert($inverted = null) + { + $this->invert = (\func_num_args() === 0 ? !$this->invert : $inverted) ? 1 : 0; + + return $this; + } + + protected function solveNegativeInterval() + { + if (!$this->isEmpty() && $this->years <= 0 && $this->months <= 0 && $this->dayz <= 0 && $this->hours <= 0 && $this->minutes <= 0 && $this->seconds <= 0 && $this->microseconds <= 0) { + $this->years *= -1; + $this->months *= -1; + $this->dayz *= -1; + $this->hours *= -1; + $this->minutes *= -1; + $this->seconds *= -1; + $this->microseconds *= -1; + $this->invert(); + } + + return $this; + } + + /** + * Add the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function add($unit, $value = 1) + { + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + if (\is_string($unit) && !preg_match('/^\s*\d/', $unit)) { + $unit = "$value $unit"; + $value = 1; + } + + $interval = static::make($unit); + + if (!$interval) { + throw new InvalidIntervalException('This type of data cannot be added/subtracted.'); + } + + if ($value !== 1) { + $interval->times($value); + } + + $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1; + $this->years += $interval->y * $sign; + $this->months += $interval->m * $sign; + $this->dayz += ($interval->days === false ? $interval->d : $interval->days) * $sign; + $this->hours += $interval->h * $sign; + $this->minutes += $interval->i * $sign; + $this->seconds += $interval->s * $sign; + $this->microseconds += $interval->microseconds * $sign; + + $this->solveNegativeInterval(); + + return $this; + } + + /** + * Subtract the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function sub($unit, $value = 1) + { + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->add($unit, -(float) $value); + } + + /** + * Subtract the passed interval to the current instance. + * + * @param string|DateInterval $unit + * @param int|float $value + * + * @return $this + */ + public function subtract($unit, $value = 1) + { + return $this->sub($unit, $value); + } + + /** + * Add given parameters to the current interval. + * + * @param int $years + * @param int $months + * @param int|float $weeks + * @param int|float $days + * @param int|float $hours + * @param int|float $minutes + * @param int|float $seconds + * @param int|float $microseconds + * + * @return $this + */ + public function plus( + $years = 0, + $months = 0, + $weeks = 0, + $days = 0, + $hours = 0, + $minutes = 0, + $seconds = 0, + $microseconds = 0 + ): self { + return $this->add(" + $years years $months months $weeks weeks $days days + $hours hours $minutes minutes $seconds seconds $microseconds microseconds + "); + } + + /** + * Add given parameters to the current interval. + * + * @param int $years + * @param int $months + * @param int|float $weeks + * @param int|float $days + * @param int|float $hours + * @param int|float $minutes + * @param int|float $seconds + * @param int|float $microseconds + * + * @return $this + */ + public function minus( + $years = 0, + $months = 0, + $weeks = 0, + $days = 0, + $hours = 0, + $minutes = 0, + $seconds = 0, + $microseconds = 0 + ): self { + return $this->sub(" + $years years $months months $weeks weeks $days days + $hours hours $minutes minutes $seconds seconds $microseconds microseconds + "); + } + + /** + * Multiply current instance given number of times. times() is naive, it multiplies each unit + * (so day can be greater than 31, hour can be greater than 23, etc.) and the result is rounded + * separately for each unit. + * + * Use times() when you want a fast and approximated calculation that does not cascade units. + * + * For a precise and cascaded calculation, + * + * @see multiply() + * + * @param float|int $factor + * + * @return $this + */ + public function times($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $this->years = (int) round($this->years * $factor); + $this->months = (int) round($this->months * $factor); + $this->dayz = (int) round($this->dayz * $factor); + $this->hours = (int) round($this->hours * $factor); + $this->minutes = (int) round($this->minutes * $factor); + $this->seconds = (int) round($this->seconds * $factor); + $this->microseconds = (int) round($this->microseconds * $factor); + + return $this; + } + + /** + * Divide current instance by a given divider. shares() is naive, it divides each unit separately + * and the result is rounded for each unit. So 5 hours and 20 minutes shared by 3 becomes 2 hours + * and 7 minutes. + * + * Use shares() when you want a fast and approximated calculation that does not cascade units. + * + * For a precise and cascaded calculation, + * + * @see divide() + * + * @param float|int $divider + * + * @return $this + */ + public function shares($divider) + { + return $this->times(1 / $divider); + } + + protected function copyProperties(self $interval, $ignoreSign = false) + { + $this->years = $interval->years; + $this->months = $interval->months; + $this->dayz = $interval->dayz; + $this->hours = $interval->hours; + $this->minutes = $interval->minutes; + $this->seconds = $interval->seconds; + $this->microseconds = $interval->microseconds; + + if (!$ignoreSign) { + $this->invert = $interval->invert; + } + + return $this; + } + + /** + * Multiply and cascade current instance by a given factor. + * + * @param float|int $factor + * + * @return $this + */ + public function multiply($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $yearPart = (int) floor($this->years * $factor); // Split calculation to prevent imprecision + + if ($yearPart) { + $this->years -= $yearPart / $factor; + } + + return $this->copyProperties( + static::create($yearPart) + ->microseconds(abs($this->totalMicroseconds) * $factor) + ->cascade(), + true + ); + } + + /** + * Divide and cascade current instance by a given divider. + * + * @param float|int $divider + * + * @return $this + */ + public function divide($divider) + { + return $this->multiply(1 / $divider); + } + + /** + * Get the interval_spec string of a date interval. + * + * @param DateInterval $interval + * + * @return string + */ + public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false) + { + $date = array_filter([ + static::PERIOD_YEARS => abs($interval->y), + static::PERIOD_MONTHS => abs($interval->m), + static::PERIOD_DAYS => abs($interval->d), + ]); + + $seconds = abs($interval->s); + if ($microseconds && $interval->f > 0) { + $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); + } + + $time = array_filter([ + static::PERIOD_HOURS => abs($interval->h), + static::PERIOD_MINUTES => abs($interval->i), + static::PERIOD_SECONDS => $seconds, + ]); + + $specString = static::PERIOD_PREFIX; + + foreach ($date as $key => $value) { + $specString .= $value.$key; + } + + if (\count($time) > 0) { + $specString .= static::PERIOD_TIME_PREFIX; + foreach ($time as $key => $value) { + $specString .= $value.$key; + } + } + + return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; + } + + /** + * Get the interval_spec string. + * + * @return string + */ + public function spec(bool $microseconds = false) + { + return static::getDateIntervalSpec($this, $microseconds); + } + + /** + * Comparing 2 date intervals. + * + * @param DateInterval $first + * @param DateInterval $second + * + * @return int + */ + public static function compareDateIntervals(DateInterval $first, DateInterval $second) + { + $current = Carbon::now(); + $passed = $current->avoidMutation()->add($second); + $current->add($first); + + if ($current < $passed) { + return -1; + } + if ($current > $passed) { + return 1; + } + + return 0; + } + + /** + * Comparing with passed interval. + * + * @param DateInterval $interval + * + * @return int + */ + public function compare(DateInterval $interval) + { + return static::compareDateIntervals($this, $interval); + } + + private function invertCascade(array $values) + { + return $this->set(array_map(function ($value) { + return -$value; + }, $values))->doCascade(true)->invert(); + } + + private function doCascade(bool $deep) + { + $originalData = $this->toArray(); + $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); + $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); + $originalData['daysExcludeWeeks'] = $originalData['days']; + unset($originalData['days']); + $newData = $originalData; + + foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { + foreach (['source', 'target'] as $key) { + if ($$key === 'dayz') { + $$key = 'daysExcludeWeeks'; + } + } + + $value = $newData[$source]; + $modulo = ($factor + ($value % $factor)) % $factor; + $newData[$source] = $modulo; + $newData[$target] += ($value - $modulo) / $factor; + } + + $positive = null; + + if (!$deep) { + foreach ($newData as $value) { + if ($value) { + if ($positive === null) { + $positive = ($value > 0); + + continue; + } + + if (($value > 0) !== $positive) { + return $this->invertCascade($originalData) + ->solveNegativeInterval(); + } + } + } + } + + return $this->set($newData) + ->solveNegativeInterval(); + } + + /** + * Convert overflowed values into bigger units. + * + * @return $this + */ + public function cascade() + { + return $this->doCascade(false); + } + + public function hasNegativeValues(): bool + { + foreach ($this->toArray() as $value) { + if ($value < 0) { + return true; + } + } + + return false; + } + + public function hasPositiveValues(): bool + { + foreach ($this->toArray() as $value) { + if ($value > 0) { + return true; + } + } + + return false; + } + + /** + * Get amount of given unit equivalent to the interval. + * + * @param string $unit + * + * @throws UnknownUnitException|UnitNotConfiguredException + * + * @return float + */ + public function total($unit) + { + $realUnit = $unit = strtolower($unit); + + if (\in_array($unit, ['days', 'weeks'])) { + $realUnit = 'dayz'; + } elseif (!\in_array($unit, ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'dayz', 'months', 'years'])) { + throw new UnknownUnitException($unit); + } + + $result = 0; + $cumulativeFactor = 0; + $unitFound = false; + $factors = self::getFlipCascadeFactors(); + $daysPerWeek = static::getDaysPerWeek(); + + $values = [ + 'years' => $this->years, + 'months' => $this->months, + 'weeks' => (int) ($this->d / $daysPerWeek), + 'dayz' => $this->d % $daysPerWeek, + 'hours' => $this->hours, + 'minutes' => $this->minutes, + 'seconds' => $this->seconds, + 'milliseconds' => (int) ($this->microseconds / Carbon::MICROSECONDS_PER_MILLISECOND), + 'microseconds' => $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND, + ]; + + if (isset($factors['dayz']) && $factors['dayz'][0] !== 'weeks') { + $values['dayz'] += $values['weeks'] * $daysPerWeek; + $values['weeks'] = 0; + } + + foreach ($factors as $source => [$target, $factor]) { + if ($source === $realUnit) { + $unitFound = true; + $value = $values[$source]; + $result += $value; + $cumulativeFactor = 1; + } + + if ($factor === false) { + if ($unitFound) { + break; + } + + $result = 0; + $cumulativeFactor = 0; + + continue; + } + + if ($target === $realUnit) { + $unitFound = true; + } + + if ($cumulativeFactor) { + $cumulativeFactor *= $factor; + $result += $values[$target] * $cumulativeFactor; + + continue; + } + + $value = $values[$source]; + + $result = ($result + $value) / $factor; + } + + if (isset($target) && !$cumulativeFactor) { + $result += $values[$target]; + } + + if (!$unitFound) { + throw new UnitNotConfiguredException($unit); + } + + if ($this->invert) { + $result *= -1; + } + + if ($unit === 'weeks') { + return $result / $daysPerWeek; + } + + return $result; + } + + /** + * Determines if the instance is equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see equalTo() + * + * @return bool + */ + public function eq($interval): bool + { + return $this->equalTo($interval); + } + + /** + * Determines if the instance is equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function equalTo($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval !== null && $this->totalMicroseconds === $interval->totalMicroseconds; + } + + /** + * Determines if the instance is not equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($interval): bool + { + return $this->notEqualTo($interval); + } + + /** + * Determines if the instance is not equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function notEqualTo($interval): bool + { + return !$this->eq($interval); + } + + /** + * Determines if the instance is greater (longer) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see greaterThan() + * + * @return bool + */ + public function gt($interval): bool + { + return $this->greaterThan($interval); + } + + /** + * Determines if the instance is greater (longer) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function greaterThan($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval === null || $this->totalMicroseconds > $interval->totalMicroseconds; + } + + /** + * Determines if the instance is greater (longer) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($interval): bool + { + return $this->greaterThanOrEqualTo($interval); + } + + /** + * Determines if the instance is greater (longer) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function greaterThanOrEqualTo($interval): bool + { + return $this->greaterThan($interval) || $this->equalTo($interval); + } + + /** + * Determines if the instance is less (shorter) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see lessThan() + * + * @return bool + */ + public function lt($interval): bool + { + return $this->lessThan($interval); + } + + /** + * Determines if the instance is less (shorter) than another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function lessThan($interval): bool + { + $interval = $this->resolveInterval($interval); + + return $interval !== null && $this->totalMicroseconds < $interval->totalMicroseconds; + } + + /** + * Determines if the instance is less (shorter) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($interval): bool + { + return $this->lessThanOrEqualTo($interval); + } + + /** + * Determines if the instance is less (shorter) than or equal to another + * + * @param CarbonInterval|DateInterval|mixed $interval + * + * @return bool + */ + public function lessThanOrEqualTo($interval): bool + { + return $this->lessThan($interval) || $this->equalTo($interval); + } + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2)); // true + * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2), false); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($interval1, $interval2, $equal = true): bool + { + return $equal + ? $this->greaterThanOrEqualTo($interval1) && $this->lessThanOrEqualTo($interval2) + : $this->greaterThan($interval1) && $this->lessThan($interval2); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // true + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * + * @return bool + */ + public function betweenIncluded($interval1, $interval2): bool + { + return $this->between($interval1, $interval2, true); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * + * @return bool + */ + public function betweenExcluded($interval1, $interval2): bool + { + return $this->between($interval1, $interval2, false); + } + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(3)); // true + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::hours(36)); // false + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2)); // true + * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2), false); // false + * ``` + * + * @param CarbonInterval|DateInterval|mixed $interval1 + * @param CarbonInterval|DateInterval|mixed $interval2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($interval1, $interval2, $equal = true): bool + { + return $this->between($interval1, $interval2, $equal); + } + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * @param string $function + * + * @throws Exception + * + * @return $this + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + $base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC') + ->roundUnit($unit, $precision, $function); + $next = $base->add($this); + $inverted = $next < $base; + + if ($inverted) { + $next = $base->sub($this); + } + + $this->copyProperties( + $next + ->roundUnit($unit, $precision, $function) + ->diffAsCarbonInterval($base) + ); + + return $this->invert($inverted); + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * @param string $function + * + * @throws Exception + * + * @return $this + */ + public function round($precision = 1, $function = 'round') + { + return $this->roundWith($precision, $function); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function floor($precision = 1) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|DateInterval|null $precision + * + * @throws Exception + * + * @return $this + */ + public function ceil($precision = 1) + { + return $this->round($precision, 'ceil'); + } + + private function needsDeclension(string $mode, int $index, int $parts): bool + { + switch ($mode) { + case 'last': + return $index === $parts - 1; + default: + return true; + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php new file mode 100644 index 00000000000..e2be2cdae4f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -0,0 +1,2643 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\EndLessPeriodException; +use Carbon\Exceptions\InvalidCastException; +use Carbon\Exceptions\InvalidIntervalException; +use Carbon\Exceptions\InvalidPeriodDateException; +use Carbon\Exceptions\InvalidPeriodParameterException; +use Carbon\Exceptions\NotACarbonClassException; +use Carbon\Exceptions\NotAPeriodException; +use Carbon\Exceptions\UnknownGetterException; +use Carbon\Exceptions\UnknownMethodException; +use Carbon\Exceptions\UnreachableException; +use Carbon\Traits\IntervalRounding; +use Carbon\Traits\Mixin; +use Carbon\Traits\Options; +use Closure; +use Countable; +use DateInterval; +use DatePeriod; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use InvalidArgumentException; +use Iterator; +use JsonSerializable; +use ReflectionException; +use ReturnTypeWillChange; +use RuntimeException; + +/** + * Substitution of DatePeriod with some modifications and many more features. + * + * @property-read int|float $recurrences number of recurrences (if end not set). + * @property-read bool $include_start_date rather the start date is included in the iteration. + * @property-read bool $include_end_date rather the end date is included in the iteration (if recurrences not set). + * @property-read CarbonInterface $start Period start date. + * @property-read CarbonInterface $current Current date from the iteration. + * @property-read CarbonInterface $end Period end date. + * @property-read CarbonInterval $interval Underlying date interval instance. Always present, one day by default. + * + * @method static CarbonPeriod start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. + * @method static CarbonPeriod since($date, $inclusive = null) Alias for start(). + * @method static CarbonPeriod sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. + * @method static CarbonPeriod end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. + * @method static CarbonPeriod until($date = null, $inclusive = null) Alias for end(). + * @method static CarbonPeriod untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. + * @method static CarbonPeriod dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static CarbonPeriod between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static CarbonPeriod recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. + * @method static CarbonPeriod times($recurrences = null) Alias for recurrences(). + * @method static CarbonPeriod options($options = null) Create instance with options or modify the options if called on an instance. + * @method static CarbonPeriod toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. + * @method static CarbonPeriod filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. + * @method static CarbonPeriod push($callback, $name = null) Alias for filter(). + * @method static CarbonPeriod prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. + * @method static CarbonPeriod filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. + * @method static CarbonPeriod interval($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static CarbonPeriod each($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static CarbonPeriod every($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static CarbonPeriod step($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static CarbonPeriod stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static CarbonPeriod invert() Create instance with inverted date interval or invert the interval if called on an instance. + * @method static CarbonPeriod years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. + * @method static CarbonPeriod year($years = 1) Alias for years(). + * @method static CarbonPeriod months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. + * @method static CarbonPeriod month($months = 1) Alias for months(). + * @method static CarbonPeriod weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. + * @method static CarbonPeriod week($weeks = 1) Alias for weeks(). + * @method static CarbonPeriod days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. + * @method static CarbonPeriod dayz($days = 1) Alias for days(). + * @method static CarbonPeriod day($days = 1) Alias for days(). + * @method static CarbonPeriod hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. + * @method static CarbonPeriod hour($hours = 1) Alias for hours(). + * @method static CarbonPeriod minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. + * @method static CarbonPeriod minute($minutes = 1) Alias for minutes(). + * @method static CarbonPeriod seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. + * @method static CarbonPeriod second($seconds = 1) Alias for seconds(). + * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundWeek(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundWeeks(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorWeek(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorWeeks(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilWeek(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilWeeks(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class CarbonPeriod implements Iterator, Countable, JsonSerializable +{ + use IntervalRounding; + use Mixin { + Mixin::mixin as baseMixin; + } + use Options; + + /** + * Built-in filter for limit by recurrences. + * + * @var callable + */ + public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; + + /** + * Built-in filter for limit to an end. + * + * @var callable + */ + public const END_DATE_FILTER = [self::class, 'filterEndDate']; + + /** + * Special value which can be returned by filters to end iteration. Also a filter. + * + * @var callable + */ + public const END_ITERATION = [self::class, 'endIteration']; + + /** + * Exclude start date from iteration. + * + * @var int + */ + public const EXCLUDE_START_DATE = 1; + + /** + * Exclude end date from iteration. + * + * @var int + */ + public const EXCLUDE_END_DATE = 2; + + /** + * Yield CarbonImmutable instances. + * + * @var int + */ + public const IMMUTABLE = 4; + + /** + * Number of maximum attempts before giving up on finding next valid date. + * + * @var int + */ + public const NEXT_MAX_ATTEMPTS = 1000; + + /** + * Number of maximum attempts before giving up on finding end date. + * + * @var int + */ + public const END_MAX_ATTEMPTS = 10000; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = []; + + /** + * Date class of iteration items. + * + * @var string + */ + protected $dateClass = Carbon::class; + + /** + * Underlying date interval instance. Always present, one day by default. + * + * @var CarbonInterval + */ + protected $dateInterval; + + /** + * Whether current date interval was set by default. + * + * @var bool + */ + protected $isDefaultInterval; + + /** + * The filters stack. + * + * @var array + */ + protected $filters = []; + + /** + * Period start date. Applied on rewind. Always present, now by default. + * + * @var CarbonInterface + */ + protected $startDate; + + /** + * Period end date. For inverted interval should be before the start date. Applied via a filter. + * + * @var CarbonInterface|null + */ + protected $endDate; + + /** + * Limit for number of recurrences. Applied via a filter. + * + * @var int|null + */ + protected $recurrences; + + /** + * Iteration options. + * + * @var int + */ + protected $options; + + /** + * Index of current date. Always sequential, even if some dates are skipped by filters. + * Equal to null only before the first iteration. + * + * @var int + */ + protected $key; + + /** + * Current date. May temporarily hold unaccepted value when looking for a next valid date. + * Equal to null only before the first iteration. + * + * @var CarbonInterface + */ + protected $current; + + /** + * Timezone of current date. Taken from the start date. + * + * @var \DateTimeZone|null + */ + protected $timezone; + + /** + * The cached validation result for current date. + * + * @var bool|string|null + */ + protected $validationResult; + + /** + * Timezone handler for settings() method. + * + * @var mixed + */ + protected $tzName; + + /** + * Make a CarbonPeriod instance from given variable if possible. + * + * @param mixed $var + * + * @return static|null + */ + public static function make($var) + { + try { + return static::instance($var); + } catch (NotAPeriodException $e) { + return static::create($var); + } + } + + /** + * Create a new instance from a DatePeriod or CarbonPeriod object. + * + * @param CarbonPeriod|DatePeriod $period + * + * @return static + */ + public static function instance($period) + { + if ($period instanceof static) { + return $period->copy(); + } + + if ($period instanceof self) { + return new static( + $period->getStartDate(), + $period->getEndDate() ?: $period->getRecurrences(), + $period->getDateInterval(), + $period->getOptions() + ); + } + + if ($period instanceof DatePeriod) { + return new static( + $period->start, + $period->end ?: ($period->recurrences - 1), + $period->interval, + $period->include_start_date ? 0 : static::EXCLUDE_START_DATE + ); + } + + $class = static::class; + $type = \gettype($period); + + throw new NotAPeriodException( + 'Argument 1 passed to '.$class.'::'.__METHOD__.'() '. + 'must be an instance of DatePeriod or '.$class.', '. + ($type === 'object' ? 'instance of '.\get_class($period) : $type).' given.' + ); + } + + /** + * Create a new instance. + * + * @return static + */ + public static function create(...$params) + { + return static::createFromArray($params); + } + + /** + * Create a new instance from an array of parameters. + * + * @param array $params + * + * @return static + */ + public static function createFromArray(array $params) + { + return new static(...$params); + } + + /** + * Create CarbonPeriod from ISO 8601 string. + * + * @param string $iso + * @param int|null $options + * + * @return static + */ + public static function createFromIso($iso, $options = null) + { + $params = static::parseIso8601($iso); + + $instance = static::createFromArray($params); + + if ($options !== null) { + $instance->setOptions($options); + } + + return $instance; + } + + /** + * Return whether given interval contains non zero value of any time unit. + * + * @param \DateInterval $interval + * + * @return bool + */ + protected static function intervalHasTime(DateInterval $interval) + { + return $interval->h || $interval->i || $interval->s || $interval->f; + } + + /** + * Return whether given variable is an ISO 8601 specification. + * + * Note: Check is very basic, as actual validation will be done later when parsing. + * We just want to ensure that variable is not any other type of a valid parameter. + * + * @param mixed $var + * + * @return bool + */ + protected static function isIso8601($var) + { + if (!\is_string($var)) { + return false; + } + + // Match slash but not within a timezone name. + $part = '[a-z]+(?:[_-][a-z]+)*'; + + preg_match("#\b$part/$part\b|(/)#i", $var, $match); + + return isset($match[1]); + } + + /** + * Parse given ISO 8601 string into an array of arguments. + * + * @SuppressWarnings(PHPMD.ElseExpression) + * + * @param string $iso + * + * @return array + */ + protected static function parseIso8601($iso) + { + $result = []; + + $interval = null; + $start = null; + $end = null; + + foreach (explode('/', $iso) as $key => $part) { + if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { + $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; + } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { + $interval = $part; + } elseif ($start === null && $parsed = Carbon::make($part)) { + $start = $part; + } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) { + $end = $part; + } else { + throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); + } + + $result[] = $parsed; + } + + return $result; + } + + /** + * Add missing parts of the target date from the soure date. + * + * @param string $source + * @param string $target + * + * @return string + */ + protected static function addMissingParts($source, $target) + { + $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; + + $result = preg_replace($pattern, $target, $source, 1, $count); + + return $count ? $result : $target; + } + + /** + * Register a custom macro. + * + * @example + * ``` + * CarbonPeriod::macro('middle', function () { + * return $this->getStartDate()->average($this->getEndDate()); + * }); + * echo CarbonPeriod::since('2011-05-12')->until('2011-06-03')->middle(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Register macros from a mixin object. + * + * @example + * ``` + * CarbonPeriod::mixin(new class { + * public function addDays() { + * return function ($count = 1) { + * return $this->setStartDate( + * $this->getStartDate()->addDays($count) + * )->setEndDate( + * $this->getEndDate()->addDays($count) + * ); + * }; + * } + * public function subDays() { + * return function ($count = 1) { + * return $this->setStartDate( + * $this->getStartDate()->subDays($count) + * )->setEndDate( + * $this->getEndDate()->subDays($count) + * ); + * }; + * } + * }); + * echo CarbonPeriod::create('2000-01-01', '2000-02-01')->addDays(5)->subDays(3); + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + static::baseMixin($mixin); + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Provide static proxy for instance aliases. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + $date = new static(); + + if (static::hasMacro($method)) { + return static::bindMacroContext(null, function () use (&$method, &$parameters, &$date) { + return $date->callMacro($method, $parameters); + }); + } + + return $date->$method(...$parameters); + } + + /** + * CarbonPeriod constructor. + * + * @SuppressWarnings(PHPMD.ElseExpression) + * + * @throws InvalidArgumentException + */ + public function __construct(...$arguments) + { + // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, + // which will be first parsed into parts and then processed the same way. + + $argumentsCount = \count($arguments); + + if ($argumentsCount && static::isIso8601($iso = $arguments[0])) { + array_splice($arguments, 0, 1, static::parseIso8601($iso)); + } + + if ($argumentsCount === 1) { + if ($arguments[0] instanceof DatePeriod) { + $arguments = [ + $arguments[0]->start, + $arguments[0]->end ?: ($arguments[0]->recurrences - 1), + $arguments[0]->interval, + $arguments[0]->include_start_date ? 0 : static::EXCLUDE_START_DATE, + ]; + } elseif ($arguments[0] instanceof self) { + $arguments = [ + $arguments[0]->getStartDate(), + $arguments[0]->getEndDate() ?: $arguments[0]->getRecurrences(), + $arguments[0]->getDateInterval(), + $arguments[0]->getOptions(), + ]; + } + } + + foreach ($arguments as $argument) { + $parsedDate = null; + + if ($argument instanceof DateTimeZone) { + $this->setTimezone($argument); + } elseif ($this->dateInterval === null && + ( + (\is_string($argument) && preg_match( + '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', + $argument + )) || + $argument instanceof DateInterval || + $argument instanceof Closure + ) && + $parsedInterval = @CarbonInterval::make($argument) + ) { + $this->setDateInterval($parsedInterval); + } elseif ($this->startDate === null && $parsedDate = $this->makeDateTime($argument)) { + $this->setStartDate($parsedDate); + } elseif ($this->endDate === null && ($parsedDate = $parsedDate ?? $this->makeDateTime($argument))) { + $this->setEndDate($parsedDate); + } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { + $this->setRecurrences($argument); + } elseif ($this->options === null && (\is_int($argument) || $argument === null)) { + $this->setOptions($argument); + } else { + throw new InvalidPeriodParameterException('Invalid constructor parameters.'); + } + } + + if ($this->startDate === null) { + $this->setStartDate(Carbon::now()); + } + + if ($this->dateInterval === null) { + $this->setDateInterval(CarbonInterval::day()); + + $this->isDefaultInterval = true; + } + + if ($this->options === null) { + $this->setOptions(0); + } + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /** + * Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return callable|null + */ + protected function getGetter(string $name) + { + switch (strtolower(preg_replace('/[A-Z]/', '_$0', $name))) { + case 'start': + case 'start_date': + return [$this, 'getStartDate']; + case 'end': + case 'end_date': + return [$this, 'getEndDate']; + case 'interval': + case 'date_interval': + return [$this, 'getDateInterval']; + case 'recurrences': + return [$this, 'getRecurrences']; + case 'include_start_date': + return [$this, 'isStartIncluded']; + case 'include_end_date': + return [$this, 'isEndIncluded']; + case 'current': + return [$this, 'current']; + default: + return null; + } + } + + /** + * Get a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return bool|CarbonInterface|CarbonInterval|int|null + */ + public function get(string $name) + { + $getter = $this->getGetter($name); + + if ($getter) { + return $getter(); + } + + throw new UnknownGetterException($name); + } + + /** + * Get a property allowing both `DatePeriod` snakeCase and camelCase names. + * + * @param string $name + * + * @return bool|CarbonInterface|CarbonInterval|int|null + */ + public function __get(string $name) + { + return $this->get($name); + } + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset(string $name): bool + { + return $this->getGetter($name) !== null; + } + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return clone $this; + } + + /** + * Set the iteration item class. + * + * @param string $dateClass + * + * @return $this + */ + public function setDateClass(string $dateClass) + { + if (!is_a($dateClass, CarbonInterface::class, true)) { + throw new NotACarbonClassException($dateClass); + } + + $this->dateClass = $dateClass; + + if (is_a($dateClass, Carbon::class, true)) { + $this->toggleOptions(static::IMMUTABLE, false); + } elseif (is_a($dateClass, CarbonImmutable::class, true)) { + $this->toggleOptions(static::IMMUTABLE, true); + } + + return $this; + } + + /** + * Returns iteration item date class. + * + * @return string + */ + public function getDateClass(): string + { + return $this->dateClass; + } + + /** + * Change the period date interval. + * + * @param DateInterval|string $interval + * + * @throws InvalidIntervalException + * + * @return $this + */ + public function setDateInterval($interval) + { + if (!$interval = CarbonInterval::make($interval)) { + throw new InvalidIntervalException('Invalid interval.'); + } + + if ($interval->spec() === 'PT0S' && !$interval->f && !$interval->getStep()) { + throw new InvalidIntervalException('Empty interval is not accepted.'); + } + + $this->dateInterval = $interval; + + $this->isDefaultInterval = false; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Invert the period date interval. + * + * @return $this + */ + public function invertDateInterval() + { + $interval = $this->dateInterval->invert(); + + return $this->setDateInterval($interval); + } + + /** + * Set start and end date. + * + * @param DateTime|DateTimeInterface|string $start + * @param DateTime|DateTimeInterface|string|null $end + * + * @return $this + */ + public function setDates($start, $end) + { + $this->setStartDate($start); + $this->setEndDate($end); + + return $this; + } + + /** + * Change the period options. + * + * @param int|null $options + * + * @throws InvalidArgumentException + * + * @return $this + */ + public function setOptions($options) + { + if (!\is_int($options) && $options !== null) { + throw new InvalidPeriodParameterException('Invalid options.'); + } + + $this->options = $options ?: 0; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Get the period options. + * + * @return int + */ + public function getOptions() + { + return $this->options; + } + + /** + * Toggle given options on or off. + * + * @param int $options + * @param bool|null $state + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function toggleOptions($options, $state = null) + { + if ($state === null) { + $state = ($this->options & $options) !== $options; + } + + return $this->setOptions( + $state ? + $this->options | $options : + $this->options & ~$options + ); + } + + /** + * Toggle EXCLUDE_START_DATE option. + * + * @param bool $state + * + * @return $this + */ + public function excludeStartDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_START_DATE, $state); + } + + /** + * Toggle EXCLUDE_END_DATE option. + * + * @param bool $state + * + * @return $this + */ + public function excludeEndDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_END_DATE, $state); + } + + /** + * Get the underlying date interval. + * + * @return CarbonInterval + */ + public function getDateInterval() + { + return $this->dateInterval->copy(); + } + + /** + * Get start date of the period. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface + */ + public function getStartDate(string $rounding = null) + { + $date = $this->startDate->avoidMutation(); + + return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; + } + + /** + * Get end date of the period. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface|null + */ + public function getEndDate(string $rounding = null) + { + if (!$this->endDate) { + return null; + } + + $date = $this->endDate->avoidMutation(); + + return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; + } + + /** + * Get number of recurrences. + * + * @return int|float|null + */ + public function getRecurrences() + { + return $this->recurrences; + } + + /** + * Returns true if the start date should be excluded. + * + * @return bool + */ + public function isStartExcluded() + { + return ($this->options & static::EXCLUDE_START_DATE) !== 0; + } + + /** + * Returns true if the end date should be excluded. + * + * @return bool + */ + public function isEndExcluded() + { + return ($this->options & static::EXCLUDE_END_DATE) !== 0; + } + + /** + * Returns true if the start date should be included. + * + * @return bool + */ + public function isStartIncluded() + { + return !$this->isStartExcluded(); + } + + /** + * Returns true if the end date should be included. + * + * @return bool + */ + public function isEndIncluded() + { + return !$this->isEndExcluded(); + } + + /** + * Return the start if it's included by option, else return the start + 1 period interval. + * + * @return CarbonInterface + */ + public function getIncludedStartDate() + { + $start = $this->getStartDate(); + + if ($this->isStartExcluded()) { + return $start->add($this->getDateInterval()); + } + + return $start; + } + + /** + * Return the end if it's included by option, else return the end - 1 period interval. + * Warning: if the period has no fixed end, this method will iterate the period to calculate it. + * + * @return CarbonInterface + */ + public function getIncludedEndDate() + { + $end = $this->getEndDate(); + + if (!$end) { + return $this->calculateEnd(); + } + + if ($this->isEndExcluded()) { + return $end->sub($this->getDateInterval()); + } + + return $end; + } + + /** + * Add a filter to the stack. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param callable $callback + * @param string $name + * + * @return $this + */ + public function addFilter($callback, $name = null) + { + $tuple = $this->createFilterTuple(\func_get_args()); + + $this->filters[] = $tuple; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Prepend a filter to the stack. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param callable $callback + * @param string $name + * + * @return $this + */ + public function prependFilter($callback, $name = null) + { + $tuple = $this->createFilterTuple(\func_get_args()); + + array_unshift($this->filters, $tuple); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Remove a filter by instance or name. + * + * @param callable|string $filter + * + * @return $this + */ + public function removeFilter($filter) + { + $key = \is_callable($filter) ? 0 : 1; + + $this->filters = array_values(array_filter( + $this->filters, + function ($tuple) use ($key, $filter) { + return $tuple[$key] !== $filter; + } + )); + + $this->updateInternalState(); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Return whether given instance or name is in the filter stack. + * + * @param callable|string $filter + * + * @return bool + */ + public function hasFilter($filter) + { + $key = \is_callable($filter) ? 0 : 1; + + foreach ($this->filters as $tuple) { + if ($tuple[$key] === $filter) { + return true; + } + } + + return false; + } + + /** + * Get filters stack. + * + * @return array + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Set filters stack. + * + * @param array $filters + * + * @return $this + */ + public function setFilters(array $filters) + { + $this->filters = $filters; + + $this->updateInternalState(); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Reset filters stack. + * + * @return $this + */ + public function resetFilters() + { + $this->filters = []; + + if ($this->endDate !== null) { + $this->filters[] = [static::END_DATE_FILTER, null]; + } + + if ($this->recurrences !== null) { + $this->filters[] = [static::RECURRENCES_FILTER, null]; + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Add a recurrences filter (set maximum number of recurrences). + * + * @param int|float|null $recurrences + * + * @throws InvalidArgumentException + * + * @return $this + */ + public function setRecurrences($recurrences) + { + if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { + throw new InvalidPeriodParameterException('Invalid number of recurrences.'); + } + + if ($recurrences === null) { + return $this->removeFilter(static::RECURRENCES_FILTER); + } + + $this->recurrences = $recurrences === INF ? INF : (int) $recurrences; + + if (!$this->hasFilter(static::RECURRENCES_FILTER)) { + return $this->addFilter(static::RECURRENCES_FILTER); + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Change the period start date. + * + * @param DateTime|DateTimeInterface|string $date + * @param bool|null $inclusive + * + * @throws InvalidPeriodDateException + * + * @return $this + */ + public function setStartDate($date, $inclusive = null) + { + if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { + throw new InvalidPeriodDateException('Invalid start date.'); + } + + $this->startDate = $date; + + if ($inclusive !== null) { + $this->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); + } + + return $this; + } + + /** + * Change the period end date. + * + * @param DateTime|DateTimeInterface|string|null $date + * @param bool|null $inclusive + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setEndDate($date, $inclusive = null) + { + if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { + throw new InvalidPeriodDateException('Invalid end date.'); + } + + if (!$date) { + return $this->removeFilter(static::END_DATE_FILTER); + } + + $this->endDate = $date; + + if ($inclusive !== null) { + $this->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); + } + + if (!$this->hasFilter(static::END_DATE_FILTER)) { + return $this->addFilter(static::END_DATE_FILTER); + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Check if the current position is valid. + * + * @return bool + */ + #[ReturnTypeWillChange] + public function valid() + { + return $this->validateCurrentDate() === true; + } + + /** + * Return the current key. + * + * @return int|null + */ + #[ReturnTypeWillChange] + public function key() + { + return $this->valid() + ? $this->key + : null; + } + + /** + * Return the current date. + * + * @return CarbonInterface|null + */ + #[ReturnTypeWillChange] + public function current() + { + return $this->valid() + ? $this->prepareForReturn($this->current) + : null; + } + + /** + * Move forward to the next date. + * + * @throws RuntimeException + * + * @return void + */ + #[ReturnTypeWillChange] + public function next() + { + if ($this->current === null) { + $this->rewind(); + } + + if ($this->validationResult !== static::END_ITERATION) { + $this->key++; + + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Rewind to the start date. + * + * Iterating over a date in the UTC timezone avoids bug during backward DST change. + * + * @see https://bugs.php.net/bug.php?id=72255 + * @see https://bugs.php.net/bug.php?id=74274 + * @see https://wiki.php.net/rfc/datetime_and_daylight_saving_time + * + * @throws RuntimeException + * + * @return void + */ + #[ReturnTypeWillChange] + public function rewind() + { + $this->key = 0; + $this->current = ([$this->dateClass, 'make'])($this->startDate); + $settings = $this->getSettings(); + + if ($this->hasLocalTranslator()) { + $settings['locale'] = $this->getTranslatorLocale(); + } + + $this->current->settings($settings); + $this->timezone = static::intervalHasTime($this->dateInterval) ? $this->current->getTimezone() : null; + + if ($this->timezone) { + $this->current = $this->current->utc(); + } + + $this->validationResult = null; + + if ($this->isStartExcluded() || $this->validateCurrentDate() === false) { + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Skip iterations and returns iteration state (false if ended, true if still valid). + * + * @param int $count steps number to skip (1 by default) + * + * @return bool + */ + public function skip($count = 1) + { + for ($i = $count; $this->valid() && $i > 0; $i--) { + $this->next(); + } + + return $this->valid(); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function toIso8601String() + { + $parts = []; + + if ($this->recurrences !== null) { + $parts[] = 'R'.$this->recurrences; + } + + $parts[] = $this->startDate->toIso8601String(); + + $parts[] = $this->dateInterval->spec(); + + if ($this->endDate !== null) { + $parts[] = $this->endDate->toIso8601String(); + } + + return implode('/', $parts); + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function toString() + { + $translator = ([$this->dateClass, 'getTranslator'])(); + + $parts = []; + + $format = !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) + ? 'Y-m-d H:i:s' + : 'Y-m-d'; + + if ($this->recurrences !== null) { + $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator); + } + + $parts[] = $this->translate('period_interval', [':interval' => $this->dateInterval->forHumans([ + 'join' => true, + ])], null, $translator); + + $parts[] = $this->translate('period_start_date', [':date' => $this->startDate->rawFormat($format)], null, $translator); + + if ($this->endDate !== null) { + $parts[] = $this->translate('period_end_date', [':date' => $this->endDate->rawFormat($format)], null, $translator); + } + + $result = implode(' ', $parts); + + return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function spec() + { + return $this->toIso8601String(); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DatePeriod + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DatePeriod::class, true)) { + return new $className( + $this->rawDate($this->getStartDate()), + $this->getDateInterval(), + $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), + $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 + ); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } + + /** + * Return native DatePeriod PHP object matching the current instance. + * + * @example + * ``` + * var_dump(CarbonPeriod::create('2021-01-05', '2021-02-15')->toDatePeriod()); + * ``` + * + * @return DatePeriod + */ + public function toDatePeriod() + { + return $this->cast(DatePeriod::class); + } + + /** + * Return `true` if the period has no custom filter and is guaranteed to be endless. + * + * Note that we can't check if a period is endless as soon as it has custom filters + * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in + * a way we can't predict without actually iterating the period. + */ + public function isUnfilteredAndEndLess(): bool + { + foreach ($this->filters as $filter) { + switch ($filter) { + case [static::RECURRENCES_FILTER, null]: + if ($this->recurrences !== null && is_finite($this->recurrences)) { + return false; + } + + break; + + case [static::END_DATE_FILTER, null]: + if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { + return false; + } + + break; + + default: + return false; + } + } + + return true; + } + + /** + * Convert the date period into an array without changing current iteration state. + * + * @return CarbonInterface[] + */ + public function toArray() + { + if ($this->isUnfilteredAndEndLess()) { + throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); + } + + $state = [ + $this->key, + $this->current ? $this->current->avoidMutation() : null, + $this->validationResult, + ]; + + $result = iterator_to_array($this); + + [$this->key, $this->current, $this->validationResult] = $state; + + return $result; + } + + /** + * Count dates in the date period. + * + * @return int + */ + #[ReturnTypeWillChange] + public function count() + { + return \count($this->toArray()); + } + + /** + * Return the first date in the date period. + * + * @return CarbonInterface|null + */ + public function first() + { + if ($this->isUnfilteredAndEndLess()) { + foreach ($this as $date) { + $this->rewind(); + + return $date; + } + + return null; + } + + return ($this->toArray() ?: [])[0] ?? null; + } + + /** + * Return the last date in the date period. + * + * @return CarbonInterface|null + */ + public function last() + { + $array = $this->toArray(); + + return $array ? $array[\count($array) - 1] : null; + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Add aliases for setters. + * + * CarbonPeriod::days(3)->hours(5)->invert() + * ->sinceNow()->until('2010-01-10') + * ->filter(...) + * ->count() + * + * Note: We use magic method to let static and instance aliases with the same names. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + return $this->callMacro($method, $parameters); + }); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + $first = \count($parameters) >= 1 ? $parameters[0] : null; + $second = \count($parameters) >= 2 ? $parameters[1] : null; + + switch ($method) { + case 'start': + case 'since': + return $this->setStartDate($first, $second); + + case 'sinceNow': + return $this->setStartDate(new Carbon(), $first); + + case 'end': + case 'until': + return $this->setEndDate($first, $second); + + case 'untilNow': + return $this->setEndDate(new Carbon(), $first); + + case 'dates': + case 'between': + return $this->setDates($first, $second); + + case 'recurrences': + case 'times': + return $this->setRecurrences($first); + + case 'options': + return $this->setOptions($first); + + case 'toggle': + return $this->toggleOptions($first, $second); + + case 'filter': + case 'push': + return $this->addFilter($first, $second); + + case 'prepend': + return $this->prependFilter($first, $second); + + case 'filters': + return $this->setFilters($first ?: []); + + case 'interval': + case 'each': + case 'every': + case 'step': + case 'stepBy': + return $this->setDateInterval($first); + + case 'invert': + return $this->invertDateInterval(); + + case 'years': + case 'year': + case 'months': + case 'month': + case 'weeks': + case 'week': + case 'days': + case 'dayz': + case 'day': + case 'hours': + case 'hour': + case 'minutes': + case 'minute': + case 'seconds': + case 'second': + return $this->setDateInterval(( + // Override default P1D when instantiating via fluent setters. + [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method] + )( + \count($parameters) === 0 ? 1 : $first + )); + } + + if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + throw new UnknownMethodException($method); + } + + return $this; + } + + /** + * Set the instance's timezone from a string or object and apply it to start/end. + * + * @param \DateTimeZone|string $timezone + * + * @return static + */ + public function setTimezone($timezone) + { + $this->tzName = $timezone; + $this->timezone = $timezone; + + if ($this->startDate) { + $this->setStartDate($this->startDate->setTimezone($timezone)); + } + + if ($this->endDate) { + $this->setEndDate($this->endDate->setTimezone($timezone)); + } + + return $this; + } + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference to start/end. + * + * @param \DateTimeZone|string $timezone + * + * @return static + */ + public function shiftTimezone($timezone) + { + $this->tzName = $timezone; + $this->timezone = $timezone; + + if ($this->startDate) { + $this->setStartDate($this->startDate->shiftTimezone($timezone)); + } + + if ($this->endDate) { + $this->setEndDate($this->endDate->shiftTimezone($timezone)); + } + + return $this; + } + + /** + * Returns the end is set, else calculated from start an recurrences. + * + * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. + * + * @return CarbonInterface + */ + public function calculateEnd(string $rounding = null) + { + if ($end = $this->getEndDate($rounding)) { + return $end; + } + + if ($this->dateInterval->isEmpty()) { + return $this->getStartDate($rounding); + } + + $date = $this->getEndFromRecurrences() ?? $this->iterateUntilEnd(); + + if ($date && $rounding) { + $date = $date->avoidMutation()->round($this->getDateInterval(), $rounding); + } + + return $date; + } + + /** + * @return CarbonInterface|null + */ + private function getEndFromRecurrences() + { + if ($this->recurrences === null) { + throw new UnreachableException( + "Could not calculate period end without either explicit end or recurrences.\n". + "If you're looking for a forever-period, use ->setRecurrences(INF)." + ); + } + + if ($this->recurrences === INF) { + $start = $this->getStartDate(); + + return $start < $start->avoidMutation()->add($this->getDateInterval()) + ? CarbonImmutable::endOfTime() + : CarbonImmutable::startOfTime(); + } + + if ($this->filters === [[static::RECURRENCES_FILTER, null]]) { + return $this->getStartDate()->avoidMutation()->add( + $this->getDateInterval()->times( + $this->recurrences - ($this->isStartExcluded() ? 0 : 1) + ) + ); + } + + return null; + } + + /** + * @return CarbonInterface|null + */ + private function iterateUntilEnd() + { + $attempts = 0; + $date = null; + + foreach ($this as $date) { + if (++$attempts > static::END_MAX_ATTEMPTS) { + throw new UnreachableException( + 'Could not calculate period end after iterating '.static::END_MAX_ATTEMPTS.' times.' + ); + } + } + + return $date; + } + + /** + * Returns true if the current period overlaps the given one (if 1 parameter passed) + * or the period between 2 dates (if 2 parameters passed). + * + * @param CarbonPeriod|\DateTimeInterface|Carbon|CarbonImmutable|string $rangeOrRangeStart + * @param \DateTimeInterface|Carbon|CarbonImmutable|string|null $rangeEnd + * + * @return bool + */ + public function overlaps($rangeOrRangeStart, $rangeEnd = null) + { + $range = $rangeEnd ? static::create($rangeOrRangeStart, $rangeEnd) : $rangeOrRangeStart; + + if (!($range instanceof self)) { + $range = static::create($range); + } + + [$start, $end] = $this->orderCouple($this->getStartDate(), $this->calculateEnd()); + [$rangeStart, $rangeEnd] = $this->orderCouple($range->getStartDate(), $range->calculateEnd()); + + return $end > $rangeStart && $rangeEnd > $start; + } + + /** + * Execute a given function on each date of the period. + * + * @example + * ``` + * Carbon::create('2020-11-29')->daysUntil('2020-12-24')->forEach(function (Carbon $date) { + * echo $date->diffInDays('2020-12-25')." days before Christmas!\n"; + * }); + * ``` + * + * @param callable $callback + */ + public function forEach(callable $callback) + { + foreach ($this as $date) { + $callback($date); + } + } + + /** + * Execute a given function on each date of the period and yield the result of this function. + * + * @example + * ``` + * $period = Carbon::create('2020-11-29')->daysUntil('2020-12-24'); + * echo implode("\n", iterator_to_array($period->map(function (Carbon $date) { + * return $date->diffInDays('2020-12-25').' days before Christmas!'; + * }))); + * ``` + * + * @param callable $callback + * + * @return \Generator + */ + public function map(callable $callback) + { + foreach ($this as $date) { + yield $callback($date); + } + } + + /** + * Determines if the instance is equal to another. + * Warning: if options differ, instances wil never be equal. + * + * @param mixed $period + * + * @see equalTo() + * + * @return bool + */ + public function eq($period): bool + { + return $this->equalTo($period); + } + + /** + * Determines if the instance is equal to another. + * Warning: if options differ, instances wil never be equal. + * + * @param mixed $period + * + * @return bool + */ + public function equalTo($period): bool + { + if (!($period instanceof self)) { + $period = self::make($period); + } + + $end = $this->getEndDate(); + + return $period !== null + && $this->getDateInterval()->eq($period->getDateInterval()) + && $this->getStartDate()->eq($period->getStartDate()) + && ($end ? $end->eq($period->getEndDate()) : $this->getRecurrences() === $period->getRecurrences()) + && ($this->getOptions() & (~static::IMMUTABLE)) === ($period->getOptions() & (~static::IMMUTABLE)); + } + + /** + * Determines if the instance is not equal to another. + * Warning: if options differ, instances wil never be equal. + * + * @param mixed $period + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($period): bool + { + return $this->notEqualTo($period); + } + + /** + * Determines if the instance is not equal to another. + * Warning: if options differ, instances wil never be equal. + * + * @param mixed $period + * + * @return bool + */ + public function notEqualTo($period): bool + { + return !$this->eq($period); + } + + /** + * Determines if the start date is before an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsBefore($date = null): bool + { + return $this->getStartDate()->lessThan($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is before or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsBeforeOrAt($date = null): bool + { + return $this->getStartDate()->lessThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is after an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAfter($date = null): bool + { + return $this->getStartDate()->greaterThan($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is after or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAfterOrAt($date = null): bool + { + return $this->getStartDate()->greaterThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the start date is the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function startsAt($date = null): bool + { + return $this->getStartDate()->equalTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is before an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsBefore($date = null): bool + { + return $this->calculateEnd()->lessThan($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is before or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsBeforeOrAt($date = null): bool + { + return $this->calculateEnd()->lessThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is after an other given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAfter($date = null): bool + { + return $this->calculateEnd()->greaterThan($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is after or the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAfterOrAt($date = null): bool + { + return $this->calculateEnd()->greaterThanOrEqualTo($this->resolveCarbon($date)); + } + + /** + * Determines if the end date is the same as a given date. + * (Rather start/end are included by options is ignored.) + * + * @param mixed $date + * + * @return bool + */ + public function endsAt($date = null): bool + { + return $this->calculateEnd()->equalTo($this->resolveCarbon($date)); + } + + /** + * Return true if start date is now or later. + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isStarted(): bool + { + return $this->startsBeforeOrAt(); + } + + /** + * Return true if end date is now or later. + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isEnded(): bool + { + return $this->endsBeforeOrAt(); + } + + /** + * Return true if now is between start date (included) and end date (excluded). + * (Rather start/end are included by options is ignored.) + * + * @return bool + */ + public function isInProgress(): bool + { + return $this->isStarted() && !$this->isEnded(); + } + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return $this + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + $this->setStartDate($this->getStartDate()->roundUnit($unit, $precision, $function)); + + if ($this->endDate) { + $this->setEndDate($this->getEndDate()->roundUnit($unit, $precision, $function)); + } + + $this->setDateInterval($this->getDateInterval()->roundUnit($unit, $precision, $function)); + + return $this; + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * + * @return $this + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int|string|\DateInterval|null $precision + * + * @return $this + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return $this + */ + public function round($precision = null, $function = 'round') + { + return $this->roundWith( + $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), + $function + ); + } + + /** + * Round the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * + * @return $this + */ + public function floor($precision = null) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified (else period interval is used). + * + * @param float|int|string|\DateInterval|null $precision + * + * @return $this + */ + public function ceil($precision = null) + { + return $this->round($precision, 'ceil'); + } + + /** + * Specify data which should be serialized to JSON. + * + * @link https://php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return CarbonInterface[] + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Return true if the given date is between start and end. + * + * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date + * + * @return bool + */ + public function contains($date = null): bool + { + $startMethod = 'startsBefore'.($this->isStartIncluded() ? 'OrAt' : ''); + $endMethod = 'endsAfter'.($this->isEndIncluded() ? 'OrAt' : ''); + + return $this->$startMethod($date) && $this->$endMethod($date); + } + + /** + * Return true if the current period follows a given other period (with no overlap). + * For instance, [2019-08-01 -> 2019-08-12] follows [2019-07-29 -> 2019-07-31] + * Note than in this example, follows() would be false if 2019-08-01 or 2019-07-31 was excluded by options. + * + * @param \Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function follows($period, ...$arguments): bool + { + $period = $this->resolveCarbonPeriod($period, ...$arguments); + + return $this->getIncludedStartDate()->equalTo($period->getIncludedEndDate()->add($period->getDateInterval())); + } + + /** + * Return true if the given other period follows the current one (with no overlap). + * For instance, [2019-07-29 -> 2019-07-31] is followed by [2019-08-01 -> 2019-08-12] + * Note than in this example, isFollowedBy() would be false if 2019-08-01 or 2019-07-31 was excluded by options. + * + * @param \Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function isFollowedBy($period, ...$arguments): bool + { + $period = $this->resolveCarbonPeriod($period, ...$arguments); + + return $period->follows($this); + } + + /** + * Return true if the given period either follows or is followed by the current one. + * + * @see follows() + * @see isFollowedBy() + * + * @param \Carbon\CarbonPeriod|\DatePeriod|string $period + * + * @return bool + */ + public function isConsecutiveWith($period, ...$arguments): bool + { + return $this->follows($period, ...$arguments) || $this->isFollowedBy($period, ...$arguments); + } + + /** + * Update properties after removing built-in filters. + * + * @return void + */ + protected function updateInternalState() + { + if (!$this->hasFilter(static::END_DATE_FILTER)) { + $this->endDate = null; + } + + if (!$this->hasFilter(static::RECURRENCES_FILTER)) { + $this->recurrences = null; + } + } + + /** + * Create a filter tuple from raw parameters. + * + * Will create an automatic filter callback for one of Carbon's is* methods. + * + * @param array $parameters + * + * @return array + */ + protected function createFilterTuple(array $parameters) + { + $method = array_shift($parameters); + + if (!$this->isCarbonPredicateMethod($method)) { + return [$method, array_shift($parameters)]; + } + + return [function ($date) use ($method, $parameters) { + return ([$date, $method])(...$parameters); + }, $method]; + } + + /** + * Return whether given callable is a string pointing to one of Carbon's is* methods + * and should be automatically converted to a filter callback. + * + * @param callable $callable + * + * @return bool + */ + protected function isCarbonPredicateMethod($callable) + { + return \is_string($callable) && str_starts_with($callable, 'is') && + (method_exists($this->dateClass, $callable) || ([$this->dateClass, 'hasMacro'])($callable)); + } + + /** + * Recurrences filter callback (limits number of recurrences). + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param \Carbon\Carbon $current + * @param int $key + * + * @return bool|string + */ + protected function filterRecurrences($current, $key) + { + if ($key < $this->recurrences) { + return true; + } + + return static::END_ITERATION; + } + + /** + * End date filter callback. + * + * @param \Carbon\Carbon $current + * + * @return bool|string + */ + protected function filterEndDate($current) + { + if (!$this->isEndExcluded() && $current == $this->endDate) { + return true; + } + + if ($this->dateInterval->invert ? $current > $this->endDate : $current < $this->endDate) { + return true; + } + + return static::END_ITERATION; + } + + /** + * End iteration filter callback. + * + * @return string + */ + protected function endIteration() + { + return static::END_ITERATION; + } + + /** + * Handle change of the parameters. + */ + protected function handleChangedParameters() + { + if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) { + $this->setDateClass(CarbonImmutable::class); + } elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) { + $this->setDateClass(Carbon::class); + } + + $this->validationResult = null; + } + + /** + * Validate current date and stop iteration when necessary. + * + * Returns true when current date is valid, false if it is not, or static::END_ITERATION + * when iteration should be stopped. + * + * @return bool|string + */ + protected function validateCurrentDate() + { + if ($this->current === null) { + $this->rewind(); + } + + // Check after the first rewind to avoid repeating the initial validation. + return $this->validationResult ?? ($this->validationResult = $this->checkFilters()); + } + + /** + * Check whether current value and key pass all the filters. + * + * @return bool|string + */ + protected function checkFilters() + { + $current = $this->prepareForReturn($this->current); + + foreach ($this->filters as $tuple) { + $result = \call_user_func( + $tuple[0], + $current->avoidMutation(), + $this->key, + $this + ); + + if ($result === static::END_ITERATION) { + return static::END_ITERATION; + } + + if (!$result) { + return false; + } + } + + return true; + } + + /** + * Prepare given date to be returned to the external logic. + * + * @param CarbonInterface $date + * + * @return CarbonInterface + */ + protected function prepareForReturn(CarbonInterface $date) + { + $date = ([$this->dateClass, 'make'])($date); + + if ($this->timezone) { + $date = $date->setTimezone($this->timezone); + } + + return $date; + } + + /** + * Keep incrementing the current date until a valid date is found or the iteration is ended. + * + * @throws RuntimeException + * + * @return void + */ + protected function incrementCurrentDateUntilValid() + { + $attempts = 0; + + do { + $this->current = $this->current->add($this->dateInterval); + + $this->validationResult = null; + + if (++$attempts > static::NEXT_MAX_ATTEMPTS) { + throw new UnreachableException('Could not find next valid date.'); + } + } while ($this->validateCurrentDate() === false); + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date + * + * @return \Carbon\CarbonInterface + */ + protected function resolveCarbon($date = null) + { + return $this->getStartDate()->nowWithSameTz()->carbonize($date); + } + + /** + * Resolve passed arguments or DatePeriod to a CarbonPeriod object. + * + * @param mixed $period + * @param mixed ...$arguments + * + * @return static + */ + protected function resolveCarbonPeriod($period, ...$arguments) + { + if ($period instanceof self) { + return $period; + } + + return $period instanceof DatePeriod + ? static::instance($period) + : static::create($period, ...$arguments); + } + + private function orderCouple($first, $second): array + { + return $first > $second ? [$second, $first] : [$first, $second]; + } + + private function makeDateTime($value): ?DateTimeInterface + { + if ($value instanceof DateTimeInterface) { + return $value; + } + + if (\is_string($value)) { + $value = trim($value); + + if (!preg_match('/^P[\dT]/', $value) && + !preg_match('/^R\d/', $value) && + preg_match('/[a-z\d]/i', $value) + ) { + return Carbon::parse($value, $this->tzName); + } + } + + return null; + } + + private function isInfiniteDate($date): bool + { + return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); + } + + private function rawDate($date): ?DateTimeInterface + { + if ($date === false || $date === null) { + return null; + } + + if ($date instanceof CarbonInterface) { + return $date->isMutable() + ? $date->toDateTime() + : $date->toDateTimeImmutable(); + } + + if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { + return $date; + } + + $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; + + return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php new file mode 100644 index 00000000000..c81899f1ea4 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php @@ -0,0 +1,320 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\InvalidCastException; +use Carbon\Exceptions\InvalidTimeZoneException; +use DateTimeInterface; +use DateTimeZone; +use Throwable; + +class CarbonTimeZone extends DateTimeZone +{ + public function __construct($timezone = null) + { + parent::__construct(static::getDateTimeZoneNameFromMixed($timezone)); + } + + protected static function parseNumericTimezone($timezone) + { + if ($timezone <= -100 || $timezone >= 100) { + throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); + } + + return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; + } + + protected static function getDateTimeZoneNameFromMixed($timezone) + { + if ($timezone === null) { + return date_default_timezone_get(); + } + + if (\is_string($timezone)) { + $timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone); + } + + if (is_numeric($timezone)) { + return static::parseNumericTimezone($timezone); + } + + return $timezone; + } + + protected static function getDateTimeZoneFromName(&$name) + { + return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name)); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeZone + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DateTimeZone::class, true)) { + return new $className($this->getName()); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } + + /** + * Create a CarbonTimeZone from mixed input. + * + * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. + * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. + * + * @throws InvalidTimeZoneException + * + * @return false|static + */ + public static function instance($object = null, $objectDump = null) + { + $tz = $object; + + if ($tz instanceof static) { + return $tz; + } + + if ($tz === null) { + return new static(); + } + + if (!$tz instanceof DateTimeZone) { + $tz = static::getDateTimeZoneFromName($object); + } + + if ($tz !== false) { + return new static($tz->getName()); + } + + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); + } + + return false; + } + + /** + * Returns abbreviated name of the current timezone according to DST setting. + * + * @param bool $dst + * + * @return string + */ + public function getAbbreviatedName($dst = false) + { + $name = $this->getName(); + + foreach ($this->listAbbreviations() as $abbreviation => $zones) { + foreach ($zones as $zone) { + if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) { + return $abbreviation; + } + } + } + + return 'unknown'; + } + + /** + * @alias getAbbreviatedName + * + * Returns abbreviated name of the current timezone according to DST setting. + * + * @param bool $dst + * + * @return string + */ + public function getAbbr($dst = false) + { + return $this->getAbbreviatedName($dst); + } + + /** + * Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30"). + * + * @param DateTimeInterface|null $date + * + * @return string + */ + public function toOffsetName(DateTimeInterface $date = null) + { + return static::getOffsetNameFromMinuteOffset( + $this->getOffset($date ?: Carbon::now($this)) / 60 + ); + } + + /** + * Returns a new CarbonTimeZone object using the offset string instead of region string. + * + * @param DateTimeInterface|null $date + * + * @return CarbonTimeZone + */ + public function toOffsetTimeZone(DateTimeInterface $date = null) + { + return new static($this->toOffsetName($date)); + } + + /** + * Returns the first region string (such as "America/Toronto") that matches the current timezone or + * false if no match is found. + * + * @see timezone_name_from_abbr native PHP function. + * + * @param DateTimeInterface|null $date + * @param int $isDst + * + * @return string|false + */ + public function toRegionName(DateTimeInterface $date = null, $isDst = 1) + { + $name = $this->getName(); + $firstChar = substr($name, 0, 1); + + if ($firstChar !== '+' && $firstChar !== '-') { + return $name; + } + + $date = $date ?: Carbon::now($this); + + // Integer construction no longer supported since PHP 8 + // @codeCoverageIgnoreStart + try { + $offset = @$this->getOffset($date) ?: 0; + } catch (Throwable $e) { + $offset = 0; + } + // @codeCoverageIgnoreEnd + + $name = @timezone_name_from_abbr('', $offset, $isDst); + + if ($name) { + return $name; + } + + foreach (timezone_identifiers_list() as $timezone) { + if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) { + return $timezone; + } + } + + return false; + } + + /** + * Returns a new CarbonTimeZone object using the region string instead of offset string. + * + * @param DateTimeInterface|null $date + * + * @return CarbonTimeZone|false + */ + public function toRegionTimeZone(DateTimeInterface $date = null) + { + $tz = $this->toRegionName($date); + + if ($tz !== false) { + return new static($tz); + } + + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); + } + + return false; + } + + /** + * Cast to string (get timezone name). + * + * @return string + */ + public function __toString() + { + return $this->getName(); + } + + /** + * Return the type number: + * + * Type 1; A UTC offset, such as -0300 + * Type 2; A timezone abbreviation, such as GMT + * Type 3: A timezone identifier, such as Europe/London + */ + public function getType(): int + { + return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; + } + + /** + * Create a CarbonTimeZone from mixed input. + * + * @param DateTimeZone|string|int|null $object + * + * @return false|static + */ + public static function create($object = null) + { + return static::instance($object); + } + + /** + * Create a CarbonTimeZone from int/float hour offset. + * + * @param float $hourOffset number of hour of the timezone shift (can be decimal). + * + * @return false|static + */ + public static function createFromHourOffset(float $hourOffset) + { + return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR); + } + + /** + * Create a CarbonTimeZone from int/float minute offset. + * + * @param float $minuteOffset number of total minutes of the timezone shift. + * + * @return false|static + */ + public static function createFromMinuteOffset(float $minuteOffset) + { + return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset)); + } + + /** + * Convert a total minutes offset into a standardized timezone offset string. + * + * @param float $minutes number of total minutes of the timezone shift. + * + * @return string + */ + public static function getOffsetNameFromMinuteOffset(float $minutes): string + { + $minutes = round($minutes); + $unsignedMinutes = abs($minutes); + + return ($minutes < 0 ? '-' : '+'). + str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT). + ':'. + str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php new file mode 100644 index 00000000000..4f35d6c618f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Cli; + +class Invoker +{ + public const CLI_CLASS_NAME = 'Carbon\\Cli'; + + protected function runWithCli(string $className, array $parameters): bool + { + $cli = new $className(); + + return $cli(...$parameters); + } + + public function __invoke(...$parameters): bool + { + if (class_exists(self::CLI_CLASS_NAME)) { + return $this->runWithCli(self::CLI_CLASS_NAME, $parameters); + } + + $function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec'; + $function('composer require carbon-cli/carbon-cli --no-interaction'); + + echo 'Installation succeeded.'; + + return true; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php new file mode 100644 index 00000000000..ccc457fcd20 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Doctrine; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +interface CarbonDoctrineType +{ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform); + + public function convertToPHPValue($value, AbstractPlatform $platform); + + public function convertToDatabaseValue($value, AbstractPlatform $platform); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php new file mode 100644 index 00000000000..bf476a77e5b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Doctrine; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType +{ + /** + * {@inheritdoc} + * + * @return string + */ + public function getName() + { + return 'carbon_immutable'; + } + + /** + * {@inheritdoc} + * + * @return bool + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php new file mode 100644 index 00000000000..9289d84d348 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Doctrine; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +class CarbonType extends DateTimeType implements CarbonDoctrineType +{ + /** + * {@inheritdoc} + * + * @return string + */ + public function getName() + { + return 'carbon'; + } + + /** + * {@inheritdoc} + * + * @return bool + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php new file mode 100644 index 00000000000..ecfe17e7938 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Doctrine; + +use Carbon\Carbon; +use Carbon\CarbonInterface; +use DateTimeInterface; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Types\ConversionException; +use Exception; + +/** + * @template T of CarbonInterface + */ +trait CarbonTypeConverter +{ + /** + * @return class-string + */ + protected function getCarbonClassName(): string + { + return Carbon::class; + } + + /** + * @return string + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + $precision = $fieldDeclaration['precision'] ?: 10; + + if ($fieldDeclaration['secondPrecision'] ?? false) { + $precision = 0; + } + + if ($precision === 10) { + $precision = DateTimeDefaultPrecision::get(); + } + + $type = parent::getSQLDeclaration($fieldDeclaration, $platform); + + if (!$precision) { + return $type; + } + + if (str_contains($type, '(')) { + return preg_replace('/\(\d+\)/', "($precision)", $type); + } + + [$before, $after] = explode(' ', "$type "); + + return trim("$before($precision) $after"); + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @return T|null + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + $class = $this->getCarbonClassName(); + + if ($value === null || is_a($value, $class)) { + return $value; + } + + if ($value instanceof DateTimeInterface) { + return $class::instance($value); + } + + $date = null; + $error = null; + + try { + $date = $class::parse($value); + } catch (Exception $exception) { + $error = $exception; + } + + if (!$date) { + throw ConversionException::conversionFailedFormat( + $value, + $this->getName(), + 'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()', + $error + ); + } + + return $date; + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @return string|null + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if ($value === null) { + return $value; + } + + if ($value instanceof DateTimeInterface) { + return $value->format('Y-m-d H:i:s.u'); + } + + throw ConversionException::conversionFailedInvalidType( + $value, + $this->getName(), + ['null', 'DateTime', 'Carbon'] + ); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php new file mode 100644 index 00000000000..642fd41354b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Doctrine; + +class DateTimeDefaultPrecision +{ + private static $precision = 6; + + /** + * Change the default Doctrine datetime and datetime_immutable precision. + * + * @param int $precision + */ + public static function set(int $precision): void + { + self::$precision = $precision; + } + + /** + * Get the default Doctrine datetime and datetime_immutable precision. + * + * @return int + */ + public static function get(): int + { + return self::$precision; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php new file mode 100644 index 00000000000..499271031e3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php @@ -0,0 +1,24 @@ + */ + use CarbonTypeConverter; + + /** + * @return class-string + */ + protected function getCarbonClassName(): string + { + return CarbonImmutable::class; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php new file mode 100644 index 00000000000..29b0bb955e3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php @@ -0,0 +1,16 @@ + */ + use CarbonTypeConverter; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php new file mode 100644 index 00000000000..3ca8837d182 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use Throwable; + +class BadComparisonUnitException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Bad comparison unit: '$unit'", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php new file mode 100644 index 00000000000..2e222e54e96 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The method. + * + * @var string + */ + protected $method; + + /** + * Constructor. + * + * @param string $method + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($method, $code = 0, Throwable $previous = null) + { + $this->method = $method; + + parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); + } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php new file mode 100644 index 00000000000..4ceaa2ef066 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The setter. + * + * @var string + */ + protected $setter; + + /** + * Constructor. + * + * @param string $setter + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php new file mode 100644 index 00000000000..108206d3eb7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +interface BadMethodCallException extends Exception +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php new file mode 100644 index 00000000000..e10492693c3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; + +final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php new file mode 100644 index 00000000000..8ad747e75f8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +interface Exception +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php new file mode 100644 index 00000000000..db334c6c9cc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; +use Throwable; + +class ImmutableException extends BaseRuntimeException implements RuntimeException +{ + /** + * The value. + * + * @var string + */ + protected $value; + + /** + * Constructor. + * + * @param string $value the immutable type/value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($value, $code = 0, Throwable $previous = null) + { + $this->value = $value; + parent::__construct("$value is immutable.", $code, $previous); + } + + /** + * Get the value. + * + * @return string + */ + public function getValue(): string + { + return $this->value; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php new file mode 100644 index 00000000000..5b013cd5078 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +interface InvalidArgumentException extends Exception +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php new file mode 100644 index 00000000000..a421401f6d9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php new file mode 100644 index 00000000000..c9ecb6b0606 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The invalid field. + * + * @var string + */ + private $field; + + /** + * The invalid value. + * + * @var mixed + */ + private $value; + + /** + * Constructor. + * + * @param string $field + * @param mixed $value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($field, $value, $code = 0, Throwable $previous = null) + { + $this->field = $field; + $this->value = $value; + parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous); + } + + /** + * Get the invalid field. + * + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Get the invalid value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php new file mode 100644 index 00000000000..92d55fe3539 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php new file mode 100644 index 00000000000..69cf4128a9c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php new file mode 100644 index 00000000000..9bd84a96d42 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php new file mode 100644 index 00000000000..cf2c9024097 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php new file mode 100644 index 00000000000..f72595583c0 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php new file mode 100644 index 00000000000..2c8ec9ba044 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php new file mode 100644 index 00000000000..7a87632c41a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use Carbon\CarbonInterface; +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The className. + * + * @var string + */ + protected $className; + + /** + * Constructor. + * + * @param string $className + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($className, $code = 0, Throwable $previous = null) + { + $this->className = $className; + + parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); + } + + /** + * Get the className. + * + * @return string + */ + public function getClassName(): string + { + return $this->className; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php new file mode 100644 index 00000000000..4edd7a4841c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php new file mode 100644 index 00000000000..f2c546843b1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * Constructor. + * + * @param mixed $object + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($object, $code = 0, Throwable $previous = null) + { + $dump = \is_object($object) ? \get_class($object) : \gettype($object); + + parent::__construct("$dump does neither implements Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php new file mode 100644 index 00000000000..2c586d0b760 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 +// use OutOfRangeException as BaseOutOfRangeException; + +class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The unit or name of the value. + * + * @var string + */ + private $unit; + + /** + * The range minimum. + * + * @var mixed + */ + private $min; + + /** + * The range maximum. + * + * @var mixed + */ + private $max; + + /** + * The invalid value. + * + * @var mixed + */ + private $value; + + /** + * Constructor. + * + * @param string $unit + * @param mixed $min + * @param mixed $max + * @param mixed $value + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + $this->min = $min; + $this->max = $max; + $this->value = $value; + + parent::__construct("$unit must be between $min and $max, $value given", $code, $previous); + } + + /** + * @return mixed + */ + public function getMax() + { + return $this->max; + } + + /** + * @return mixed + */ + public function getMin() + { + return $this->min; + } + + /** + * @return mixed + */ + public function getUnit() + { + return $this->unit; + } + + /** + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php new file mode 100644 index 00000000000..5416fd1491b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The expected. + * + * @var string + */ + protected $expected; + + /** + * The actual. + * + * @var string + */ + protected $actual; + + /** + * The help message. + * + * @var string + */ + protected $help; + + /** + * Constructor. + * + * @param string $expected + * @param string $actual + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) + { + $this->expected = $expected; + $this->actual = $actual; + $this->help = $help; + + $actual = $actual === '' ? 'data is missing' : "get '$actual'"; + + parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); + } + + /** + * Get the expected. + * + * @return string + */ + public function getExpected(): string + { + return $this->expected; + } + + /** + * Get the actual. + * + * @return string + */ + public function getActual(): string + { + return $this->actual; + } + + /** + * Get the help message. + * + * @return string + */ + public function getHelp(): string + { + return $this->help; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php new file mode 100644 index 00000000000..ad196f79d58 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +interface RuntimeException extends Exception +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php new file mode 100644 index 00000000000..ee99953b4d3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; + +class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php new file mode 100644 index 00000000000..0e7230563b4 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use Throwable; + +class UnitNotConfiguredException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php new file mode 100644 index 00000000000..5c504975aa0 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException +{ + /** + * The getter. + * + * @var string + */ + protected $getter; + + /** + * Constructor. + * + * @param string $getter getter name + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($getter, $code = 0, Throwable $previous = null) + { + $this->getter = $getter; + + parent::__construct("Unknown getter '$getter'", $code, $previous); + } + + /** + * Get the getter. + * + * @return string + */ + public function getGetter(): string + { + return $this->getter; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php new file mode 100644 index 00000000000..75273a706e3 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use BadMethodCallException as BaseBadMethodCallException; +use Throwable; + +class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException +{ + /** + * The method. + * + * @var string + */ + protected $method; + + /** + * Constructor. + * + * @param string $method + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($method, $code = 0, Throwable $previous = null) + { + $this->method = $method; + + parent::__construct("Method $method does not exist.", $code, $previous); + } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php new file mode 100644 index 00000000000..a795f5d725a --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; + +class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException +{ + /** + * The setter. + * + * @var string + */ + protected $setter; + + /** + * Constructor. + * + * @param string $setter setter name + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($setter, $code = 0, Throwable $previous = null) + { + $this->setter = $setter; + + parent::__construct("Unknown setter '$setter'", $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php new file mode 100644 index 00000000000..ecd7f7a5925 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use Throwable; + +class UnknownUnitException extends UnitException +{ + /** + * The unit. + * + * @var string + */ + protected $unit; + + /** + * Constructor. + * + * @param string $unit + * @param int $code + * @param Throwable|null $previous + */ + public function __construct($unit, $code = 0, Throwable $previous = null) + { + $this->unit = $unit; + + parent::__construct("Unknown unit '$unit'.", $code, $previous); + } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php new file mode 100644 index 00000000000..1654ab11b54 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use RuntimeException as BaseRuntimeException; + +class UnreachableException extends BaseRuntimeException implements RuntimeException +{ + // +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Factory.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Factory.php new file mode 100644 index 00000000000..f8c72890cbc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Factory.php @@ -0,0 +1,326 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Closure; +use DateTimeInterface; +use ReflectionMethod; + +/** + * A factory to generate Carbon instances with common settings. + * + * + * + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. + * @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. + * @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. + * @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. + * @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. + * @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. + * @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. + * @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method Carbon fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method Carbon instance($date) Create a Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method Carbon|null make($var) Make a Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method Carbon maxValue() Create a Carbon instance for the greatest supported date. + * @method Carbon minValue() Create a Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method Carbon now($tz = null) Get a Carbon instance for the current date and time. + * @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method Carbon resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * JSON serialize all Carbon instances using the given callback. + * @method Carbon setFallbackLocale($locale) Set the fallback locale. + * @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * Set the default format used when type juggling a Carbon instance to a string + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method Carbon today($tz = null) Create a Carbon instance for today. + * @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday. + * + * + */ +class Factory +{ + protected $className = Carbon::class; + + protected $settings = []; + + public function __construct(array $settings = [], ?string $className = null) + { + if ($className) { + $this->className = $className; + } + + $this->settings = $settings; + } + + public function getClassName() + { + return $this->className; + } + + public function setClassName(string $className) + { + $this->className = $className; + + return $this; + } + + public function className(string $className = null) + { + return $className === null ? $this->getClassName() : $this->setClassName($className); + } + + public function getSettings() + { + return $this->settings; + } + + public function setSettings(array $settings) + { + $this->settings = $settings; + + return $this; + } + + public function settings(array $settings = null) + { + return $settings === null ? $this->getSettings() : $this->setSettings($settings); + } + + public function mergeSettings(array $settings) + { + $this->settings = array_merge($this->settings, $settings); + + return $this; + } + + public function __call($name, $arguments) + { + $method = new ReflectionMethod($this->className, $name); + $settings = $this->settings; + + if ($settings && isset($settings['timezone'])) { + $tzParameters = array_filter($method->getParameters(), function ($parameter) { + return \in_array($parameter->getName(), ['tz', 'timezone'], true); + }); + + if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) { + if ($arguments[0] instanceof DateTimeInterface) { + $settings['innerTimezone'] = $settings['timezone']; + } elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) { + unset($settings['timezone'], $settings['innerTimezone']); + } + } elseif (\count($tzParameters)) { + array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]); + unset($settings['timezone']); + } + } + + $result = $this->className::$name(...$arguments); + + return $result instanceof CarbonInterface && !empty($settings) + ? $result->settings($settings) + : $result; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php new file mode 100644 index 00000000000..596ee8064a9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php @@ -0,0 +1,243 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Closure; + +/** + * A factory to generate CarbonImmutable instances with common settings. + * + * + * + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. + * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. + * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. + * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. + * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. + * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. + * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. + * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. + * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method CarbonImmutable now($tz = null) Get a Carbon instance for the current date and time. + * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * JSON serialize all Carbon instances using the given callback. + * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. + * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * Set the default format used when type juggling a Carbon instance to a string + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method CarbonImmutable today($tz = null) Create a Carbon instance for today. + * @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday. + * + * + */ +class FactoryImmutable extends Factory +{ + protected $className = CarbonImmutable::class; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Language.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Language.php new file mode 100644 index 00000000000..1fb5bafdc84 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Language.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use JsonSerializable; +use ReturnTypeWillChange; + +class Language implements JsonSerializable +{ + /** + * @var array + */ + protected static $languagesNames; + + /** + * @var array + */ + protected static $regionsNames; + + /** + * @var string + */ + protected $id; + + /** + * @var string + */ + protected $code; + + /** + * @var string|null + */ + protected $variant; + + /** + * @var string|null + */ + protected $region; + + /** + * @var array + */ + protected $names; + + /** + * @var string + */ + protected $isoName; + + /** + * @var string + */ + protected $nativeName; + + public function __construct(string $id) + { + $this->id = str_replace('-', '_', $id); + $parts = explode('_', $this->id); + $this->code = $parts[0]; + + if (isset($parts[1])) { + if (!preg_match('/^[A-Z]+$/', $parts[1])) { + $this->variant = $parts[1]; + $parts[1] = $parts[2] ?? null; + } + if ($parts[1]) { + $this->region = $parts[1]; + } + } + } + + /** + * Get the list of the known languages. + * + * @return array + */ + public static function all() + { + if (!static::$languagesNames) { + static::$languagesNames = require __DIR__.'/List/languages.php'; + } + + return static::$languagesNames; + } + + /** + * Get the list of the known regions. + * + * @return array + */ + public static function regions() + { + if (!static::$regionsNames) { + static::$regionsNames = require __DIR__.'/List/regions.php'; + } + + return static::$regionsNames; + } + + /** + * Get both isoName and nativeName as an array. + * + * @return array + */ + public function getNames(): array + { + if (!$this->names) { + $this->names = static::all()[$this->code] ?? [ + 'isoName' => $this->code, + 'nativeName' => $this->code, + ]; + } + + return $this->names; + } + + /** + * Returns the original locale ID. + * + * @return string + */ + public function getId(): string + { + return $this->id; + } + + /** + * Returns the code of the locale "en"/"fr". + * + * @return string + */ + public function getCode(): string + { + return $this->code; + } + + /** + * Returns the variant code such as cyrl/latn. + * + * @return string|null + */ + public function getVariant(): ?string + { + return $this->variant; + } + + /** + * Returns the variant such as Cyrillic/Latin. + * + * @return string|null + */ + public function getVariantName(): ?string + { + if ($this->variant === 'Latn') { + return 'Latin'; + } + + if ($this->variant === 'Cyrl') { + return 'Cyrillic'; + } + + return $this->variant; + } + + /** + * Returns the region part of the locale. + * + * @return string|null + */ + public function getRegion(): ?string + { + return $this->region; + } + + /** + * Returns the region name for the current language. + * + * @return string|null + */ + public function getRegionName(): ?string + { + return $this->region ? (static::regions()[$this->region] ?? $this->region) : null; + } + + /** + * Returns the long ISO language name. + * + * @return string + */ + public function getFullIsoName(): string + { + if (!$this->isoName) { + $this->isoName = $this->getNames()['isoName']; + } + + return $this->isoName; + } + + /** + * Set the ISO language name. + * + * @param string $isoName + */ + public function setIsoName(string $isoName): self + { + $this->isoName = $isoName; + + return $this; + } + + /** + * Return the full name of the language in this language. + * + * @return string + */ + public function getFullNativeName(): string + { + if (!$this->nativeName) { + $this->nativeName = $this->getNames()['nativeName']; + } + + return $this->nativeName; + } + + /** + * Set the name of the language in this language. + * + * @param string $nativeName + */ + public function setNativeName(string $nativeName): self + { + $this->nativeName = $nativeName; + + return $this; + } + + /** + * Returns the short ISO language name. + * + * @return string + */ + public function getIsoName(): string + { + $name = $this->getFullIsoName(); + + return trim(strstr($name, ',', true) ?: $name); + } + + /** + * Get the short name of the language in this language. + * + * @return string + */ + public function getNativeName(): string + { + $name = $this->getFullNativeName(); + + return trim(strstr($name, ',', true) ?: $name); + } + + /** + * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getIsoDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getNativeDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getFullIsoDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + public function getFullNativeDescription() + { + $region = $this->getRegionName(); + $variant = $this->getVariantName(); + + return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); + } + + /** + * Returns the original locale ID. + * + * @return string + */ + public function __toString() + { + return $this->getId(); + } + + /** + * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. + * + * @return string + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->getIsoDescription(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php new file mode 100644 index 00000000000..84e241e3eff --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Laravel; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; +use Carbon\CarbonInterval; +use Carbon\CarbonPeriod; +use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; +use Illuminate\Events\Dispatcher; +use Illuminate\Events\EventDispatcher; +use Illuminate\Support\Carbon as IlluminateCarbon; +use Illuminate\Support\Facades\Date; +use Throwable; + +class ServiceProvider extends \Illuminate\Support\ServiceProvider +{ + /** @var callable|null */ + protected $appGetter = null; + + /** @var callable|null */ + protected $localeGetter = null; + + public function setAppGetter(?callable $appGetter): void + { + $this->appGetter = $appGetter; + } + + public function setLocaleGetter(?callable $localeGetter): void + { + $this->localeGetter = $localeGetter; + } + + public function boot() + { + $this->updateLocale(); + + if (!$this->app->bound('events')) { + return; + } + + $service = $this; + $events = $this->app['events']; + + if ($this->isEventDispatcher($events)) { + $events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) { + $service->updateLocale(); + }); + } + } + + public function updateLocale() + { + $locale = $this->getLocale(); + + if ($locale === null) { + return; + } + + Carbon::setLocale($locale); + CarbonImmutable::setLocale($locale); + CarbonPeriod::setLocale($locale); + CarbonInterval::setLocale($locale); + + if (class_exists(IlluminateCarbon::class)) { + IlluminateCarbon::setLocale($locale); + } + + if (class_exists(Date::class)) { + try { + $root = Date::getFacadeRoot(); + $root->setLocale($locale); + } catch (Throwable $e) { + // Non Carbon class in use in Date facade + } + } + } + + public function register() + { + // Needed for Laravel < 5.3 compatibility + } + + protected function getLocale() + { + if ($this->localeGetter) { + return ($this->localeGetter)(); + } + + $app = $this->getApp(); + $app = $app && method_exists($app, 'getLocale') + ? $app + : $this->getGlobalApp('translator'); + + return $app ? $app->getLocale() : null; + } + + protected function getApp() + { + if ($this->appGetter) { + return ($this->appGetter)(); + } + + return $this->app ?? $this->getGlobalApp(); + } + + protected function getGlobalApp(...$args) + { + return \function_exists('app') ? \app(...$args) : null; + } + + protected function isEventDispatcher($instance) + { + return $instance instanceof EventDispatcher + || $instance instanceof Dispatcher + || $instance instanceof DispatcherContract; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/languages.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/languages.php new file mode 100644 index 00000000000..5b5d9a1e7b7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/languages.php @@ -0,0 +1,1239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + /* + * ISO 639-2 + */ + 'ab' => [ + 'isoName' => 'Abkhazian', + 'nativeName' => 'аҧсуа бызшәа, аҧсшәа', + ], + 'aa' => [ + 'isoName' => 'Afar', + 'nativeName' => 'Afaraf', + ], + 'af' => [ + 'isoName' => 'Afrikaans', + 'nativeName' => 'Afrikaans', + ], + 'ak' => [ + 'isoName' => 'Akan', + 'nativeName' => 'Akan', + ], + 'sq' => [ + 'isoName' => 'Albanian', + 'nativeName' => 'Shqip', + ], + 'am' => [ + 'isoName' => 'Amharic', + 'nativeName' => 'አማርኛ', + ], + 'ar' => [ + 'isoName' => 'Arabic', + 'nativeName' => 'العربية', + ], + 'an' => [ + 'isoName' => 'Aragonese', + 'nativeName' => 'aragonés', + ], + 'hy' => [ + 'isoName' => 'Armenian', + 'nativeName' => 'Հայերեն', + ], + 'as' => [ + 'isoName' => 'Assamese', + 'nativeName' => 'অসমীয়া', + ], + 'av' => [ + 'isoName' => 'Avaric', + 'nativeName' => 'авар мацӀ, магӀарул мацӀ', + ], + 'ae' => [ + 'isoName' => 'Avestan', + 'nativeName' => 'avesta', + ], + 'ay' => [ + 'isoName' => 'Aymara', + 'nativeName' => 'aymar aru', + ], + 'az' => [ + 'isoName' => 'Azerbaijani', + 'nativeName' => 'azərbaycan dili', + ], + 'bm' => [ + 'isoName' => 'Bambara', + 'nativeName' => 'bamanankan', + ], + 'ba' => [ + 'isoName' => 'Bashkir', + 'nativeName' => 'башҡорт теле', + ], + 'eu' => [ + 'isoName' => 'Basque', + 'nativeName' => 'euskara, euskera', + ], + 'be' => [ + 'isoName' => 'Belarusian', + 'nativeName' => 'беларуская мова', + ], + 'bn' => [ + 'isoName' => 'Bengali', + 'nativeName' => 'বাংলা', + ], + 'bh' => [ + 'isoName' => 'Bihari languages', + 'nativeName' => 'भोजपुरी', + ], + 'bi' => [ + 'isoName' => 'Bislama', + 'nativeName' => 'Bislama', + ], + 'bs' => [ + 'isoName' => 'Bosnian', + 'nativeName' => 'bosanski jezik', + ], + 'br' => [ + 'isoName' => 'Breton', + 'nativeName' => 'brezhoneg', + ], + 'bg' => [ + 'isoName' => 'Bulgarian', + 'nativeName' => 'български език', + ], + 'my' => [ + 'isoName' => 'Burmese', + 'nativeName' => 'ဗမာစာ', + ], + 'ca' => [ + 'isoName' => 'Catalan, Valencian', + 'nativeName' => 'català, valencià', + ], + 'ch' => [ + 'isoName' => 'Chamorro', + 'nativeName' => 'Chamoru', + ], + 'ce' => [ + 'isoName' => 'Chechen', + 'nativeName' => 'нохчийн мотт', + ], + 'ny' => [ + 'isoName' => 'Chichewa, Chewa, Nyanja', + 'nativeName' => 'chiCheŵa, chinyanja', + ], + 'zh' => [ + 'isoName' => 'Chinese', + 'nativeName' => '中文 (Zhōngwén), 汉语, 漢語', + ], + 'cv' => [ + 'isoName' => 'Chuvash', + 'nativeName' => 'чӑваш чӗлхи', + ], + 'kw' => [ + 'isoName' => 'Cornish', + 'nativeName' => 'Kernewek', + ], + 'co' => [ + 'isoName' => 'Corsican', + 'nativeName' => 'corsu, lingua corsa', + ], + 'cr' => [ + 'isoName' => 'Cree', + 'nativeName' => 'ᓀᐦᐃᔭᐍᐏᐣ', + ], + 'hr' => [ + 'isoName' => 'Croatian', + 'nativeName' => 'hrvatski jezik', + ], + 'cs' => [ + 'isoName' => 'Czech', + 'nativeName' => 'čeština, český jazyk', + ], + 'da' => [ + 'isoName' => 'Danish', + 'nativeName' => 'dansk', + ], + 'dv' => [ + 'isoName' => 'Divehi, Dhivehi, Maldivian', + 'nativeName' => 'ދިވެހި', + ], + 'nl' => [ + 'isoName' => 'Dutch, Flemish', + 'nativeName' => 'Nederlands, Vlaams', + ], + 'dz' => [ + 'isoName' => 'Dzongkha', + 'nativeName' => 'རྫོང་ཁ', + ], + 'en' => [ + 'isoName' => 'English', + 'nativeName' => 'English', + ], + 'eo' => [ + 'isoName' => 'Esperanto', + 'nativeName' => 'Esperanto', + ], + 'et' => [ + 'isoName' => 'Estonian', + 'nativeName' => 'eesti, eesti keel', + ], + 'ee' => [ + 'isoName' => 'Ewe', + 'nativeName' => 'Eʋegbe', + ], + 'fo' => [ + 'isoName' => 'Faroese', + 'nativeName' => 'føroyskt', + ], + 'fj' => [ + 'isoName' => 'Fijian', + 'nativeName' => 'vosa Vakaviti', + ], + 'fi' => [ + 'isoName' => 'Finnish', + 'nativeName' => 'suomi, suomen kieli', + ], + 'fr' => [ + 'isoName' => 'French', + 'nativeName' => 'français', + ], + 'ff' => [ + 'isoName' => 'Fulah', + 'nativeName' => 'Fulfulde, Pulaar, Pular', + ], + 'gl' => [ + 'isoName' => 'Galician', + 'nativeName' => 'Galego', + ], + 'ka' => [ + 'isoName' => 'Georgian', + 'nativeName' => 'ქართული', + ], + 'de' => [ + 'isoName' => 'German', + 'nativeName' => 'Deutsch', + ], + 'el' => [ + 'isoName' => 'Greek (modern)', + 'nativeName' => 'ελληνικά', + ], + 'gn' => [ + 'isoName' => 'Guaraní', + 'nativeName' => 'Avañe\'ẽ', + ], + 'gu' => [ + 'isoName' => 'Gujarati', + 'nativeName' => 'ગુજરાતી', + ], + 'ht' => [ + 'isoName' => 'Haitian, Haitian Creole', + 'nativeName' => 'Kreyòl ayisyen', + ], + 'ha' => [ + 'isoName' => 'Hausa', + 'nativeName' => '(Hausa) هَوُسَ', + ], + 'he' => [ + 'isoName' => 'Hebrew (modern)', + 'nativeName' => 'עברית', + ], + 'hz' => [ + 'isoName' => 'Herero', + 'nativeName' => 'Otjiherero', + ], + 'hi' => [ + 'isoName' => 'Hindi', + 'nativeName' => 'हिन्दी, हिंदी', + ], + 'ho' => [ + 'isoName' => 'Hiri Motu', + 'nativeName' => 'Hiri Motu', + ], + 'hu' => [ + 'isoName' => 'Hungarian', + 'nativeName' => 'magyar', + ], + 'ia' => [ + 'isoName' => 'Interlingua', + 'nativeName' => 'Interlingua', + ], + 'id' => [ + 'isoName' => 'Indonesian', + 'nativeName' => 'Bahasa Indonesia', + ], + 'ie' => [ + 'isoName' => 'Interlingue', + 'nativeName' => 'Originally called Occidental; then Interlingue after WWII', + ], + 'ga' => [ + 'isoName' => 'Irish', + 'nativeName' => 'Gaeilge', + ], + 'ig' => [ + 'isoName' => 'Igbo', + 'nativeName' => 'Asụsụ Igbo', + ], + 'ik' => [ + 'isoName' => 'Inupiaq', + 'nativeName' => 'Iñupiaq, Iñupiatun', + ], + 'io' => [ + 'isoName' => 'Ido', + 'nativeName' => 'Ido', + ], + 'is' => [ + 'isoName' => 'Icelandic', + 'nativeName' => 'Íslenska', + ], + 'it' => [ + 'isoName' => 'Italian', + 'nativeName' => 'Italiano', + ], + 'iu' => [ + 'isoName' => 'Inuktitut', + 'nativeName' => 'ᐃᓄᒃᑎᑐᑦ', + ], + 'ja' => [ + 'isoName' => 'Japanese', + 'nativeName' => '日本語 (にほんご)', + ], + 'jv' => [ + 'isoName' => 'Javanese', + 'nativeName' => 'ꦧꦱꦗꦮ, Basa Jawa', + ], + 'kl' => [ + 'isoName' => 'Kalaallisut, Greenlandic', + 'nativeName' => 'kalaallisut, kalaallit oqaasii', + ], + 'kn' => [ + 'isoName' => 'Kannada', + 'nativeName' => 'ಕನ್ನಡ', + ], + 'kr' => [ + 'isoName' => 'Kanuri', + 'nativeName' => 'Kanuri', + ], + 'ks' => [ + 'isoName' => 'Kashmiri', + 'nativeName' => 'कश्मीरी, كشميري‎', + ], + 'kk' => [ + 'isoName' => 'Kazakh', + 'nativeName' => 'қазақ тілі', + ], + 'km' => [ + 'isoName' => 'Central Khmer', + 'nativeName' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ', + ], + 'ki' => [ + 'isoName' => 'Kikuyu, Gikuyu', + 'nativeName' => 'Gĩkũyũ', + ], + 'rw' => [ + 'isoName' => 'Kinyarwanda', + 'nativeName' => 'Ikinyarwanda', + ], + 'ky' => [ + 'isoName' => 'Kirghiz, Kyrgyz', + 'nativeName' => 'Кыргызча, Кыргыз тили', + ], + 'kv' => [ + 'isoName' => 'Komi', + 'nativeName' => 'коми кыв', + ], + 'kg' => [ + 'isoName' => 'Kongo', + 'nativeName' => 'Kikongo', + ], + 'ko' => [ + 'isoName' => 'Korean', + 'nativeName' => '한국어', + ], + 'ku' => [ + 'isoName' => 'Kurdish', + 'nativeName' => 'Kurdî, کوردی‎', + ], + 'kj' => [ + 'isoName' => 'Kuanyama, Kwanyama', + 'nativeName' => 'Kuanyama', + ], + 'la' => [ + 'isoName' => 'Latin', + 'nativeName' => 'latine, lingua latina', + ], + 'lb' => [ + 'isoName' => 'Luxembourgish, Letzeburgesch', + 'nativeName' => 'Lëtzebuergesch', + ], + 'lg' => [ + 'isoName' => 'Ganda', + 'nativeName' => 'Luganda', + ], + 'li' => [ + 'isoName' => 'Limburgan, Limburger, Limburgish', + 'nativeName' => 'Limburgs', + ], + 'ln' => [ + 'isoName' => 'Lingala', + 'nativeName' => 'Lingála', + ], + 'lo' => [ + 'isoName' => 'Lao', + 'nativeName' => 'ພາສາລາວ', + ], + 'lt' => [ + 'isoName' => 'Lithuanian', + 'nativeName' => 'lietuvių kalba', + ], + 'lu' => [ + 'isoName' => 'Luba-Katanga', + 'nativeName' => 'Kiluba', + ], + 'lv' => [ + 'isoName' => 'Latvian', + 'nativeName' => 'latviešu valoda', + ], + 'gv' => [ + 'isoName' => 'Manx', + 'nativeName' => 'Gaelg, Gailck', + ], + 'mk' => [ + 'isoName' => 'Macedonian', + 'nativeName' => 'македонски јазик', + ], + 'mg' => [ + 'isoName' => 'Malagasy', + 'nativeName' => 'fiteny malagasy', + ], + 'ms' => [ + 'isoName' => 'Malay', + 'nativeName' => 'Bahasa Melayu, بهاس ملايو‎', + ], + 'ml' => [ + 'isoName' => 'Malayalam', + 'nativeName' => 'മലയാളം', + ], + 'mt' => [ + 'isoName' => 'Maltese', + 'nativeName' => 'Malti', + ], + 'mi' => [ + 'isoName' => 'Maori', + 'nativeName' => 'te reo Māori', + ], + 'mr' => [ + 'isoName' => 'Marathi', + 'nativeName' => 'मराठी', + ], + 'mh' => [ + 'isoName' => 'Marshallese', + 'nativeName' => 'Kajin M̧ajeļ', + ], + 'mn' => [ + 'isoName' => 'Mongolian', + 'nativeName' => 'Монгол хэл', + ], + 'na' => [ + 'isoName' => 'Nauru', + 'nativeName' => 'Dorerin Naoero', + ], + 'nv' => [ + 'isoName' => 'Navajo, Navaho', + 'nativeName' => 'Diné bizaad', + ], + 'nd' => [ + 'isoName' => 'North Ndebele', + 'nativeName' => 'isiNdebele', + ], + 'ne' => [ + 'isoName' => 'Nepali', + 'nativeName' => 'नेपाली', + ], + 'ng' => [ + 'isoName' => 'Ndonga', + 'nativeName' => 'Owambo', + ], + 'nb' => [ + 'isoName' => 'Norwegian Bokmål', + 'nativeName' => 'Norsk Bokmål', + ], + 'nn' => [ + 'isoName' => 'Norwegian Nynorsk', + 'nativeName' => 'Norsk Nynorsk', + ], + 'no' => [ + 'isoName' => 'Norwegian', + 'nativeName' => 'Norsk', + ], + 'ii' => [ + 'isoName' => 'Sichuan Yi, Nuosu', + 'nativeName' => 'ꆈꌠ꒿ Nuosuhxop', + ], + 'nr' => [ + 'isoName' => 'South Ndebele', + 'nativeName' => 'isiNdebele', + ], + 'oc' => [ + 'isoName' => 'Occitan', + 'nativeName' => 'occitan, lenga d\'òc', + ], + 'oj' => [ + 'isoName' => 'Ojibwa', + 'nativeName' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', + ], + 'cu' => [ + 'isoName' => 'Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian', + 'nativeName' => 'ѩзыкъ словѣньскъ', + ], + 'om' => [ + 'isoName' => 'Oromo', + 'nativeName' => 'Afaan Oromoo', + ], + 'or' => [ + 'isoName' => 'Oriya', + 'nativeName' => 'ଓଡ଼ିଆ', + ], + 'os' => [ + 'isoName' => 'Ossetian, Ossetic', + 'nativeName' => 'ирон æвзаг', + ], + 'pa' => [ + 'isoName' => 'Panjabi, Punjabi', + 'nativeName' => 'ਪੰਜਾਬੀ', + ], + 'pi' => [ + 'isoName' => 'Pali', + 'nativeName' => 'पाऴि', + ], + 'fa' => [ + 'isoName' => 'Persian', + 'nativeName' => 'فارسی', + ], + 'pl' => [ + 'isoName' => 'Polish', + 'nativeName' => 'język polski, polszczyzna', + ], + 'ps' => [ + 'isoName' => 'Pashto, Pushto', + 'nativeName' => 'پښتو', + ], + 'pt' => [ + 'isoName' => 'Portuguese', + 'nativeName' => 'Português', + ], + 'qu' => [ + 'isoName' => 'Quechua', + 'nativeName' => 'Runa Simi, Kichwa', + ], + 'rm' => [ + 'isoName' => 'Romansh', + 'nativeName' => 'Rumantsch Grischun', + ], + 'rn' => [ + 'isoName' => 'Rundi', + 'nativeName' => 'Ikirundi', + ], + 'ro' => [ + 'isoName' => 'Romanian, Moldavian, Moldovan', + 'nativeName' => 'Română', + ], + 'ru' => [ + 'isoName' => 'Russian', + 'nativeName' => 'русский', + ], + 'sa' => [ + 'isoName' => 'Sanskrit', + 'nativeName' => 'संस्कृतम्', + ], + 'sc' => [ + 'isoName' => 'Sardinian', + 'nativeName' => 'sardu', + ], + 'sd' => [ + 'isoName' => 'Sindhi', + 'nativeName' => 'सिन्धी, سنڌي، سندھی‎', + ], + 'se' => [ + 'isoName' => 'Northern Sami', + 'nativeName' => 'Davvisámegiella', + ], + 'sm' => [ + 'isoName' => 'Samoan', + 'nativeName' => 'gagana fa\'a Samoa', + ], + 'sg' => [ + 'isoName' => 'Sango', + 'nativeName' => 'yângâ tî sängö', + ], + 'sr' => [ + 'isoName' => 'Serbian', + 'nativeName' => 'српски језик', + ], + 'gd' => [ + 'isoName' => 'Gaelic, Scottish Gaelic', + 'nativeName' => 'Gàidhlig', + ], + 'sn' => [ + 'isoName' => 'Shona', + 'nativeName' => 'chiShona', + ], + 'si' => [ + 'isoName' => 'Sinhala, Sinhalese', + 'nativeName' => 'සිංහල', + ], + 'sk' => [ + 'isoName' => 'Slovak', + 'nativeName' => 'Slovenčina, Slovenský Jazyk', + ], + 'sl' => [ + 'isoName' => 'Slovene', + 'nativeName' => 'Slovenski Jezik, Slovenščina', + ], + 'so' => [ + 'isoName' => 'Somali', + 'nativeName' => 'Soomaaliga, af Soomaali', + ], + 'st' => [ + 'isoName' => 'Southern Sotho', + 'nativeName' => 'Sesotho', + ], + 'es' => [ + 'isoName' => 'Spanish, Castilian', + 'nativeName' => 'Español', + ], + 'su' => [ + 'isoName' => 'Sundanese', + 'nativeName' => 'Basa Sunda', + ], + 'sw' => [ + 'isoName' => 'Swahili', + 'nativeName' => 'Kiswahili', + ], + 'ss' => [ + 'isoName' => 'Swati', + 'nativeName' => 'SiSwati', + ], + 'sv' => [ + 'isoName' => 'Swedish', + 'nativeName' => 'Svenska', + ], + 'ta' => [ + 'isoName' => 'Tamil', + 'nativeName' => 'தமிழ்', + ], + 'te' => [ + 'isoName' => 'Telugu', + 'nativeName' => 'తెలుగు', + ], + 'tg' => [ + 'isoName' => 'Tajik', + 'nativeName' => 'тоҷикӣ, toçikī, تاجیکی‎', + ], + 'th' => [ + 'isoName' => 'Thai', + 'nativeName' => 'ไทย', + ], + 'ti' => [ + 'isoName' => 'Tigrinya', + 'nativeName' => 'ትግርኛ', + ], + 'bo' => [ + 'isoName' => 'Tibetan', + 'nativeName' => 'བོད་ཡིག', + ], + 'tk' => [ + 'isoName' => 'Turkmen', + 'nativeName' => 'Türkmen, Түркмен', + ], + 'tl' => [ + 'isoName' => 'Tagalog', + 'nativeName' => 'Wikang Tagalog', + ], + 'tn' => [ + 'isoName' => 'Tswana', + 'nativeName' => 'Setswana', + ], + 'to' => [ + 'isoName' => 'Tongan (Tonga Islands)', + 'nativeName' => 'Faka Tonga', + ], + 'tr' => [ + 'isoName' => 'Turkish', + 'nativeName' => 'Türkçe', + ], + 'ts' => [ + 'isoName' => 'Tsonga', + 'nativeName' => 'Xitsonga', + ], + 'tt' => [ + 'isoName' => 'Tatar', + 'nativeName' => 'татар теле, tatar tele', + ], + 'tw' => [ + 'isoName' => 'Twi', + 'nativeName' => 'Twi', + ], + 'ty' => [ + 'isoName' => 'Tahitian', + 'nativeName' => 'Reo Tahiti', + ], + 'ug' => [ + 'isoName' => 'Uighur, Uyghur', + 'nativeName' => 'Uyƣurqə, ‫ئۇيغۇرچ', + ], + 'uk' => [ + 'isoName' => 'Ukrainian', + 'nativeName' => 'Українська', + ], + 'ur' => [ + 'isoName' => 'Urdu', + 'nativeName' => 'اردو', + ], + 'uz' => [ + 'isoName' => 'Uzbek', + 'nativeName' => 'Oʻzbek, Ўзбек, أۇزبېك‎', + ], + 've' => [ + 'isoName' => 'Venda', + 'nativeName' => 'Tshivenḓa', + ], + 'vi' => [ + 'isoName' => 'Vietnamese', + 'nativeName' => 'Tiếng Việt', + ], + 'vo' => [ + 'isoName' => 'Volapük', + 'nativeName' => 'Volapük', + ], + 'wa' => [ + 'isoName' => 'Walloon', + 'nativeName' => 'Walon', + ], + 'cy' => [ + 'isoName' => 'Welsh', + 'nativeName' => 'Cymraeg', + ], + 'wo' => [ + 'isoName' => 'Wolof', + 'nativeName' => 'Wollof', + ], + 'fy' => [ + 'isoName' => 'Western Frisian', + 'nativeName' => 'Frysk', + ], + 'xh' => [ + 'isoName' => 'Xhosa', + 'nativeName' => 'isiXhosa', + ], + 'yi' => [ + 'isoName' => 'Yiddish', + 'nativeName' => 'ייִדיש', + ], + 'yo' => [ + 'isoName' => 'Yoruba', + 'nativeName' => 'Yorùbá', + ], + 'za' => [ + 'isoName' => 'Zhuang, Chuang', + 'nativeName' => 'Saɯ cueŋƅ, Saw cuengh', + ], + 'zu' => [ + 'isoName' => 'Zulu', + 'nativeName' => 'isiZulu', + ], + /* + * Add ISO 639-3 languages available in Carbon + */ + 'agq' => [ + 'isoName' => 'Aghem', + 'nativeName' => 'Aghem', + ], + 'agr' => [ + 'isoName' => 'Aguaruna', + 'nativeName' => 'Aguaruna', + ], + 'anp' => [ + 'isoName' => 'Angika', + 'nativeName' => 'Angika', + ], + 'asa' => [ + 'isoName' => 'Asu', + 'nativeName' => 'Asu', + ], + 'ast' => [ + 'isoName' => 'Asturian', + 'nativeName' => 'Asturian', + ], + 'ayc' => [ + 'isoName' => 'Southern Aymara', + 'nativeName' => 'Southern Aymara', + ], + 'bas' => [ + 'isoName' => 'Basaa', + 'nativeName' => 'Basaa', + ], + 'bem' => [ + 'isoName' => 'Bemba', + 'nativeName' => 'Bemba', + ], + 'bez' => [ + 'isoName' => 'Bena', + 'nativeName' => 'Bena', + ], + 'bhb' => [ + 'isoName' => 'Bhili', + 'nativeName' => 'Bhili', + ], + 'bho' => [ + 'isoName' => 'Bhojpuri', + 'nativeName' => 'Bhojpuri', + ], + 'brx' => [ + 'isoName' => 'Bodo', + 'nativeName' => 'Bodo', + ], + 'byn' => [ + 'isoName' => 'Bilin', + 'nativeName' => 'Bilin', + ], + 'ccp' => [ + 'isoName' => 'Chakma', + 'nativeName' => 'Chakma', + ], + 'cgg' => [ + 'isoName' => 'Chiga', + 'nativeName' => 'Chiga', + ], + 'chr' => [ + 'isoName' => 'Cherokee', + 'nativeName' => 'Cherokee', + ], + 'cmn' => [ + 'isoName' => 'Chinese', + 'nativeName' => 'Chinese', + ], + 'crh' => [ + 'isoName' => 'Crimean Turkish', + 'nativeName' => 'Crimean Turkish', + ], + 'csb' => [ + 'isoName' => 'Kashubian', + 'nativeName' => 'Kashubian', + ], + 'dav' => [ + 'isoName' => 'Taita', + 'nativeName' => 'Taita', + ], + 'dje' => [ + 'isoName' => 'Zarma', + 'nativeName' => 'Zarma', + ], + 'doi' => [ + 'isoName' => 'Dogri (macrolanguage)', + 'nativeName' => 'Dogri (macrolanguage)', + ], + 'dsb' => [ + 'isoName' => 'Lower Sorbian', + 'nativeName' => 'Lower Sorbian', + ], + 'dua' => [ + 'isoName' => 'Duala', + 'nativeName' => 'Duala', + ], + 'dyo' => [ + 'isoName' => 'Jola-Fonyi', + 'nativeName' => 'Jola-Fonyi', + ], + 'ebu' => [ + 'isoName' => 'Embu', + 'nativeName' => 'Embu', + ], + 'ewo' => [ + 'isoName' => 'Ewondo', + 'nativeName' => 'Ewondo', + ], + 'fil' => [ + 'isoName' => 'Filipino', + 'nativeName' => 'Filipino', + ], + 'fur' => [ + 'isoName' => 'Friulian', + 'nativeName' => 'Friulian', + ], + 'gez' => [ + 'isoName' => 'Geez', + 'nativeName' => 'Geez', + ], + 'gom' => [ + 'isoName' => 'Konkani, Goan', + 'nativeName' => 'ಕೊಂಕಣಿ', + ], + 'gsw' => [ + 'isoName' => 'Swiss German', + 'nativeName' => 'Swiss German', + ], + 'guz' => [ + 'isoName' => 'Gusii', + 'nativeName' => 'Gusii', + ], + 'hak' => [ + 'isoName' => 'Hakka Chinese', + 'nativeName' => 'Hakka Chinese', + ], + 'haw' => [ + 'isoName' => 'Hawaiian', + 'nativeName' => 'Hawaiian', + ], + 'hif' => [ + 'isoName' => 'Fiji Hindi', + 'nativeName' => 'Fiji Hindi', + ], + 'hne' => [ + 'isoName' => 'Chhattisgarhi', + 'nativeName' => 'Chhattisgarhi', + ], + 'hsb' => [ + 'isoName' => 'Upper Sorbian', + 'nativeName' => 'Upper Sorbian', + ], + 'jgo' => [ + 'isoName' => 'Ngomba', + 'nativeName' => 'Ngomba', + ], + 'jmc' => [ + 'isoName' => 'Machame', + 'nativeName' => 'Machame', + ], + 'kab' => [ + 'isoName' => 'Kabyle', + 'nativeName' => 'Kabyle', + ], + 'kam' => [ + 'isoName' => 'Kamba', + 'nativeName' => 'Kamba', + ], + 'kde' => [ + 'isoName' => 'Makonde', + 'nativeName' => 'Makonde', + ], + 'kea' => [ + 'isoName' => 'Kabuverdianu', + 'nativeName' => 'Kabuverdianu', + ], + 'khq' => [ + 'isoName' => 'Koyra Chiini', + 'nativeName' => 'Koyra Chiini', + ], + 'kkj' => [ + 'isoName' => 'Kako', + 'nativeName' => 'Kako', + ], + 'kln' => [ + 'isoName' => 'Kalenjin', + 'nativeName' => 'Kalenjin', + ], + 'kok' => [ + 'isoName' => 'Konkani', + 'nativeName' => 'Konkani', + ], + 'ksb' => [ + 'isoName' => 'Shambala', + 'nativeName' => 'Shambala', + ], + 'ksf' => [ + 'isoName' => 'Bafia', + 'nativeName' => 'Bafia', + ], + 'ksh' => [ + 'isoName' => 'Colognian', + 'nativeName' => 'Colognian', + ], + 'lag' => [ + 'isoName' => 'Langi', + 'nativeName' => 'Langi', + ], + 'lij' => [ + 'isoName' => 'Ligurian', + 'nativeName' => 'Ligurian', + ], + 'lkt' => [ + 'isoName' => 'Lakota', + 'nativeName' => 'Lakota', + ], + 'lrc' => [ + 'isoName' => 'Northern Luri', + 'nativeName' => 'Northern Luri', + ], + 'luo' => [ + 'isoName' => 'Luo', + 'nativeName' => 'Luo', + ], + 'luy' => [ + 'isoName' => 'Luyia', + 'nativeName' => 'Luyia', + ], + 'lzh' => [ + 'isoName' => 'Literary Chinese', + 'nativeName' => 'Literary Chinese', + ], + 'mag' => [ + 'isoName' => 'Magahi', + 'nativeName' => 'Magahi', + ], + 'mai' => [ + 'isoName' => 'Maithili', + 'nativeName' => 'Maithili', + ], + 'mas' => [ + 'isoName' => 'Masai', + 'nativeName' => 'Masai', + ], + 'mer' => [ + 'isoName' => 'Meru', + 'nativeName' => 'Meru', + ], + 'mfe' => [ + 'isoName' => 'Morisyen', + 'nativeName' => 'Morisyen', + ], + 'mgh' => [ + 'isoName' => 'Makhuwa-Meetto', + 'nativeName' => 'Makhuwa-Meetto', + ], + 'mgo' => [ + 'isoName' => 'Metaʼ', + 'nativeName' => 'Metaʼ', + ], + 'mhr' => [ + 'isoName' => 'Eastern Mari', + 'nativeName' => 'Eastern Mari', + ], + 'miq' => [ + 'isoName' => 'Mískito', + 'nativeName' => 'Mískito', + ], + 'mjw' => [ + 'isoName' => 'Karbi', + 'nativeName' => 'Karbi', + ], + 'mni' => [ + 'isoName' => 'Manipuri', + 'nativeName' => 'Manipuri', + ], + 'mua' => [ + 'isoName' => 'Mundang', + 'nativeName' => 'Mundang', + ], + 'mzn' => [ + 'isoName' => 'Mazanderani', + 'nativeName' => 'Mazanderani', + ], + 'nan' => [ + 'isoName' => 'Min Nan Chinese', + 'nativeName' => 'Min Nan Chinese', + ], + 'naq' => [ + 'isoName' => 'Nama', + 'nativeName' => 'Nama', + ], + 'nds' => [ + 'isoName' => 'Low German', + 'nativeName' => 'Low German', + ], + 'nhn' => [ + 'isoName' => 'Central Nahuatl', + 'nativeName' => 'Central Nahuatl', + ], + 'niu' => [ + 'isoName' => 'Niuean', + 'nativeName' => 'Niuean', + ], + 'nmg' => [ + 'isoName' => 'Kwasio', + 'nativeName' => 'Kwasio', + ], + 'nnh' => [ + 'isoName' => 'Ngiemboon', + 'nativeName' => 'Ngiemboon', + ], + 'nso' => [ + 'isoName' => 'Northern Sotho', + 'nativeName' => 'Northern Sotho', + ], + 'nus' => [ + 'isoName' => 'Nuer', + 'nativeName' => 'Nuer', + ], + 'nyn' => [ + 'isoName' => 'Nyankole', + 'nativeName' => 'Nyankole', + ], + 'pap' => [ + 'isoName' => 'Papiamento', + 'nativeName' => 'Papiamento', + ], + 'prg' => [ + 'isoName' => 'Prussian', + 'nativeName' => 'Prussian', + ], + 'quz' => [ + 'isoName' => 'Cusco Quechua', + 'nativeName' => 'Cusco Quechua', + ], + 'raj' => [ + 'isoName' => 'Rajasthani', + 'nativeName' => 'Rajasthani', + ], + 'rof' => [ + 'isoName' => 'Rombo', + 'nativeName' => 'Rombo', + ], + 'rwk' => [ + 'isoName' => 'Rwa', + 'nativeName' => 'Rwa', + ], + 'sah' => [ + 'isoName' => 'Sakha', + 'nativeName' => 'Sakha', + ], + 'saq' => [ + 'isoName' => 'Samburu', + 'nativeName' => 'Samburu', + ], + 'sat' => [ + 'isoName' => 'Santali', + 'nativeName' => 'Santali', + ], + 'sbp' => [ + 'isoName' => 'Sangu', + 'nativeName' => 'Sangu', + ], + 'scr' => [ + 'isoName' => 'Serbo Croatian', + 'nativeName' => 'Serbo Croatian', + ], + 'seh' => [ + 'isoName' => 'Sena', + 'nativeName' => 'Sena', + ], + 'ses' => [ + 'isoName' => 'Koyraboro Senni', + 'nativeName' => 'Koyraboro Senni', + ], + 'sgs' => [ + 'isoName' => 'Samogitian', + 'nativeName' => 'Samogitian', + ], + 'shi' => [ + 'isoName' => 'Tachelhit', + 'nativeName' => 'Tachelhit', + ], + 'shn' => [ + 'isoName' => 'Shan', + 'nativeName' => 'Shan', + ], + 'shs' => [ + 'isoName' => 'Shuswap', + 'nativeName' => 'Shuswap', + ], + 'sid' => [ + 'isoName' => 'Sidamo', + 'nativeName' => 'Sidamo', + ], + 'smn' => [ + 'isoName' => 'Inari Sami', + 'nativeName' => 'Inari Sami', + ], + 'szl' => [ + 'isoName' => 'Silesian', + 'nativeName' => 'Silesian', + ], + 'tcy' => [ + 'isoName' => 'Tulu', + 'nativeName' => 'Tulu', + ], + 'teo' => [ + 'isoName' => 'Teso', + 'nativeName' => 'Teso', + ], + 'tet' => [ + 'isoName' => 'Tetum', + 'nativeName' => 'Tetum', + ], + 'the' => [ + 'isoName' => 'Chitwania Tharu', + 'nativeName' => 'Chitwania Tharu', + ], + 'tig' => [ + 'isoName' => 'Tigre', + 'nativeName' => 'Tigre', + ], + 'tlh' => [ + 'isoName' => 'Klingon', + 'nativeName' => 'tlhIngan Hol', + ], + 'tpi' => [ + 'isoName' => 'Tok Pisin', + 'nativeName' => 'Tok Pisin', + ], + 'twq' => [ + 'isoName' => 'Tasawaq', + 'nativeName' => 'Tasawaq', + ], + 'tzl' => [ + 'isoName' => 'Talossan', + 'nativeName' => 'Talossan', + ], + 'tzm' => [ + 'isoName' => 'Tamazight, Central Atlas', + 'nativeName' => 'ⵜⵎⴰⵣⵉⵖⵜ', + ], + 'unm' => [ + 'isoName' => 'Unami', + 'nativeName' => 'Unami', + ], + 'vai' => [ + 'isoName' => 'Vai', + 'nativeName' => 'Vai', + ], + 'vun' => [ + 'isoName' => 'Vunjo', + 'nativeName' => 'Vunjo', + ], + 'wae' => [ + 'isoName' => 'Walser', + 'nativeName' => 'Walser', + ], + 'wal' => [ + 'isoName' => 'Wolaytta', + 'nativeName' => 'Wolaytta', + ], + 'xog' => [ + 'isoName' => 'Soga', + 'nativeName' => 'Soga', + ], + 'yav' => [ + 'isoName' => 'Yangben', + 'nativeName' => 'Yangben', + ], + 'yue' => [ + 'isoName' => 'Cantonese', + 'nativeName' => 'Cantonese', + ], + 'yuw' => [ + 'isoName' => 'Yau (Morobe Province)', + 'nativeName' => 'Yau (Morobe Province)', + ], + 'zgh' => [ + 'isoName' => 'Standard Moroccan Tamazight', + 'nativeName' => 'Standard Moroccan Tamazight', + ], +]; diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/regions.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/regions.php new file mode 100644 index 00000000000..8ab8a9e3aef --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/List/regions.php @@ -0,0 +1,265 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * ISO 3166-2 + */ +return [ + 'AD' => 'Andorra', + 'AE' => 'United Arab Emirates', + 'AF' => 'Afghanistan', + 'AG' => 'Antigua and Barbuda', + 'AI' => 'Anguilla', + 'AL' => 'Albania', + 'AM' => 'Armenia', + 'AO' => 'Angola', + 'AQ' => 'Antarctica', + 'AR' => 'Argentina', + 'AS' => 'American Samoa', + 'AT' => 'Austria', + 'AU' => 'Australia', + 'AW' => 'Aruba', + 'AX' => 'Åland Islands', + 'AZ' => 'Azerbaijan', + 'BA' => 'Bosnia and Herzegovina', + 'BB' => 'Barbados', + 'BD' => 'Bangladesh', + 'BE' => 'Belgium', + 'BF' => 'Burkina Faso', + 'BG' => 'Bulgaria', + 'BH' => 'Bahrain', + 'BI' => 'Burundi', + 'BJ' => 'Benin', + 'BL' => 'Saint Barthélemy', + 'BM' => 'Bermuda', + 'BN' => 'Brunei Darussalam', + 'BO' => 'Bolivia (Plurinational State of)', + 'BQ' => 'Bonaire, Sint Eustatius and Saba', + 'BR' => 'Brazil', + 'BS' => 'Bahamas', + 'BT' => 'Bhutan', + 'BV' => 'Bouvet Island', + 'BW' => 'Botswana', + 'BY' => 'Belarus', + 'BZ' => 'Belize', + 'CA' => 'Canada', + 'CC' => 'Cocos (Keeling) Islands', + 'CD' => 'Congo, Democratic Republic of the', + 'CF' => 'Central African Republic', + 'CG' => 'Congo', + 'CH' => 'Switzerland', + 'CI' => 'Côte d\'Ivoire', + 'CK' => 'Cook Islands', + 'CL' => 'Chile', + 'CM' => 'Cameroon', + 'CN' => 'China', + 'CO' => 'Colombia', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CV' => 'Cabo Verde', + 'CW' => 'Curaçao', + 'CX' => 'Christmas Island', + 'CY' => 'Cyprus', + 'CZ' => 'Czechia', + 'DE' => 'Germany', + 'DJ' => 'Djibouti', + 'DK' => 'Denmark', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'DZ' => 'Algeria', + 'EC' => 'Ecuador', + 'EE' => 'Estonia', + 'EG' => 'Egypt', + 'EH' => 'Western Sahara', + 'ER' => 'Eritrea', + 'ES' => 'Spain', + 'ET' => 'Ethiopia', + 'FI' => 'Finland', + 'FJ' => 'Fiji', + 'FK' => 'Falkland Islands (Malvinas)', + 'FM' => 'Micronesia (Federated States of)', + 'FO' => 'Faroe Islands', + 'FR' => 'France', + 'GA' => 'Gabon', + 'GB' => 'United Kingdom of Great Britain and Northern Ireland', + 'GD' => 'Grenada', + 'GE' => 'Georgia', + 'GF' => 'French Guiana', + 'GG' => 'Guernsey', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GL' => 'Greenland', + 'GM' => 'Gambia', + 'GN' => 'Guinea', + 'GP' => 'Guadeloupe', + 'GQ' => 'Equatorial Guinea', + 'GR' => 'Greece', + 'GS' => 'South Georgia and the South Sandwich Islands', + 'GT' => 'Guatemala', + 'GU' => 'Guam', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HK' => 'Hong Kong', + 'HM' => 'Heard Island and McDonald Islands', + 'HN' => 'Honduras', + 'HR' => 'Croatia', + 'HT' => 'Haiti', + 'HU' => 'Hungary', + 'ID' => 'Indonesia', + 'IE' => 'Ireland', + 'IL' => 'Israel', + 'IM' => 'Isle of Man', + 'IN' => 'India', + 'IO' => 'British Indian Ocean Territory', + 'IQ' => 'Iraq', + 'IR' => 'Iran (Islamic Republic of)', + 'IS' => 'Iceland', + 'IT' => 'Italy', + 'JE' => 'Jersey', + 'JM' => 'Jamaica', + 'JO' => 'Jordan', + 'JP' => 'Japan', + 'KE' => 'Kenya', + 'KG' => 'Kyrgyzstan', + 'KH' => 'Cambodia', + 'KI' => 'Kiribati', + 'KM' => 'Comoros', + 'KN' => 'Saint Kitts and Nevis', + 'KP' => 'Korea (Democratic People\'s Republic of)', + 'KR' => 'Korea, Republic of', + 'KW' => 'Kuwait', + 'KY' => 'Cayman Islands', + 'KZ' => 'Kazakhstan', + 'LA' => 'Lao People\'s Democratic Republic', + 'LB' => 'Lebanon', + 'LC' => 'Saint Lucia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LR' => 'Liberia', + 'LS' => 'Lesotho', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'LV' => 'Latvia', + 'LY' => 'Libya', + 'MA' => 'Morocco', + 'MC' => 'Monaco', + 'MD' => 'Moldova, Republic of', + 'ME' => 'Montenegro', + 'MF' => 'Saint Martin (French part)', + 'MG' => 'Madagascar', + 'MH' => 'Marshall Islands', + 'MK' => 'Macedonia, the former Yugoslav Republic of', + 'ML' => 'Mali', + 'MM' => 'Myanmar', + 'MN' => 'Mongolia', + 'MO' => 'Macao', + 'MP' => 'Northern Mariana Islands', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MS' => 'Montserrat', + 'MT' => 'Malta', + 'MU' => 'Mauritius', + 'MV' => 'Maldives', + 'MW' => 'Malawi', + 'MX' => 'Mexico', + 'MY' => 'Malaysia', + 'MZ' => 'Mozambique', + 'NA' => 'Namibia', + 'NC' => 'New Caledonia', + 'NE' => 'Niger', + 'NF' => 'Norfolk Island', + 'NG' => 'Nigeria', + 'NI' => 'Nicaragua', + 'NL' => 'Netherlands', + 'NO' => 'Norway', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NU' => 'Niue', + 'NZ' => 'New Zealand', + 'OM' => 'Oman', + 'PA' => 'Panama', + 'PE' => 'Peru', + 'PF' => 'French Polynesia', + 'PG' => 'Papua New Guinea', + 'PH' => 'Philippines', + 'PK' => 'Pakistan', + 'PL' => 'Poland', + 'PM' => 'Saint Pierre and Miquelon', + 'PN' => 'Pitcairn', + 'PR' => 'Puerto Rico', + 'PS' => 'Palestine, State of', + 'PT' => 'Portugal', + 'PW' => 'Palau', + 'PY' => 'Paraguay', + 'QA' => 'Qatar', + 'RE' => 'Réunion', + 'RO' => 'Romania', + 'RS' => 'Serbia', + 'RU' => 'Russian Federation', + 'RW' => 'Rwanda', + 'SA' => 'Saudi Arabia', + 'SB' => 'Solomon Islands', + 'SC' => 'Seychelles', + 'SD' => 'Sudan', + 'SE' => 'Sweden', + 'SG' => 'Singapore', + 'SH' => 'Saint Helena, Ascension and Tristan da Cunha', + 'SI' => 'Slovenia', + 'SJ' => 'Svalbard and Jan Mayen', + 'SK' => 'Slovakia', + 'SL' => 'Sierra Leone', + 'SM' => 'San Marino', + 'SN' => 'Senegal', + 'SO' => 'Somalia', + 'SR' => 'Suriname', + 'SS' => 'South Sudan', + 'ST' => 'Sao Tome and Principe', + 'SV' => 'El Salvador', + 'SX' => 'Sint Maarten (Dutch part)', + 'SY' => 'Syrian Arab Republic', + 'SZ' => 'Eswatini', + 'TC' => 'Turks and Caicos Islands', + 'TD' => 'Chad', + 'TF' => 'French Southern Territories', + 'TG' => 'Togo', + 'TH' => 'Thailand', + 'TJ' => 'Tajikistan', + 'TK' => 'Tokelau', + 'TL' => 'Timor-Leste', + 'TM' => 'Turkmenistan', + 'TN' => 'Tunisia', + 'TO' => 'Tonga', + 'TR' => 'Turkey', + 'TT' => 'Trinidad and Tobago', + 'TV' => 'Tuvalu', + 'TW' => 'Taiwan, Province of China', + 'TZ' => 'Tanzania, United Republic of', + 'UA' => 'Ukraine', + 'UG' => 'Uganda', + 'UM' => 'United States Minor Outlying Islands', + 'US' => 'United States of America', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VA' => 'Holy See', + 'VC' => 'Saint Vincent and the Grenadines', + 'VE' => 'Venezuela (Bolivarian Republic of)', + 'VG' => 'Virgin Islands (British)', + 'VI' => 'Virgin Islands (U.S.)', + 'VN' => 'Viet Nam', + 'VU' => 'Vanuatu', + 'WF' => 'Wallis and Futuna', + 'WS' => 'Samoa', + 'YE' => 'Yemen', + 'YT' => 'Mayotte', + 'ZA' => 'South Africa', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', +]; diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php new file mode 100644 index 00000000000..0369e809f9f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use Closure; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use PHPStan\TrinaryLogic; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; +use ReflectionParameter; +use ReflectionType; +use stdClass; +use Throwable; + +abstract class AbstractMacro implements BuiltinMethodReflection +{ + /** + * The reflection function/method. + * + * @var ReflectionFunction|ReflectionMethod + */ + protected $reflectionFunction; + + /** + * The class name. + * + * @var class-string + */ + private $className; + + /** + * The method name. + * + * @var string + */ + private $methodName; + + /** + * The parameters. + * + * @var ReflectionParameter[] + */ + private $parameters; + + /** + * The is static. + * + * @var bool + */ + private $static = false; + + /** + * Macro constructor. + * + * @param string $className + * @phpstan-param class-string $className + * + * @param string $methodName + * @param callable $macro + */ + public function __construct(string $className, string $methodName, $macro) + { + $this->className = $className; + $this->methodName = $methodName; + $this->reflectionFunction = \is_array($macro) + ? new ReflectionMethod($macro[0], $macro[1]) + : new ReflectionFunction($macro); + $this->parameters = $this->reflectionFunction->getParameters(); + + if ($this->reflectionFunction->isClosure()) { + try { + $closure = $this->reflectionFunction->getClosure(); + $boundClosure = Closure::bind($closure, new stdClass()); + $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); + } catch (Throwable $e) { + $this->static = true; + } + } + } + + /** + * {@inheritdoc} + */ + public function getDeclaringClass(): ReflectionClass + { + return new ReflectionClass($this->className); + } + + /** + * {@inheritdoc} + */ + public function isPrivate(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isPublic(): bool + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isFinal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isInternal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isAbstract(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isStatic(): bool + { + return $this->static; + } + + /** + * {@inheritdoc} + */ + public function getDocComment(): ?string + { + return $this->reflectionFunction->getDocComment() ?: null; + } + + /** + * {@inheritdoc} + */ + public function getName(): string + { + return $this->methodName; + } + + /** + * {@inheritdoc} + */ + public function getParameters(): array + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getReturnType(): ?ReflectionType + { + return $this->reflectionFunction->getReturnType(); + } + + /** + * {@inheritdoc} + */ + public function isDeprecated(): TrinaryLogic + { + return TrinaryLogic::createFromBoolean( + $this->reflectionFunction->isDeprecated() || + preg_match('/@deprecated/i', $this->getDocComment() ?: '') + ); + } + + /** + * {@inheritdoc} + */ + public function isVariadic(): bool + { + return $this->reflectionFunction->isVariadic(); + } + + /** + * {@inheritdoc} + */ + public function getPrototype(): BuiltinMethodReflection + { + return $this; + } + + public function getTentativeReturnType(): ?ReflectionType + { + return null; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php new file mode 100644 index 00000000000..de3e51f6a06 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use PHPStan\BetterReflection\Reflection\Adapter; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use ReflectionMethod; + +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); + +require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class + ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; + +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); + +require $method->hasReturnType() + ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; + +final class Macro extends LazyMacro +{ +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php new file mode 100644 index 00000000000..8e2524c0991 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use PHPStan\Reflection\ClassReflection; +use PHPStan\Reflection\MethodReflection; +use PHPStan\Reflection\MethodsClassReflectionExtension; +use PHPStan\Reflection\Php\PhpMethodReflectionFactory; +use PHPStan\Type\TypehintHelper; + +/** + * Class MacroExtension. + * + * @codeCoverageIgnore Pure PHPStan wrapper. + */ +final class MacroExtension implements MethodsClassReflectionExtension +{ + /** + * @var PhpMethodReflectionFactory + */ + protected $methodReflectionFactory; + + /** + * @var MacroScanner + */ + protected $scanner; + + /** + * Extension constructor. + * + * @param PhpMethodReflectionFactory $methodReflectionFactory + */ + public function __construct(PhpMethodReflectionFactory $methodReflectionFactory) + { + $this->scanner = new MacroScanner(); + $this->methodReflectionFactory = $methodReflectionFactory; + } + + /** + * {@inheritdoc} + */ + public function hasMethod(ClassReflection $classReflection, string $methodName): bool + { + return $this->scanner->hasMethod($classReflection->getName(), $methodName); + } + + /** + * {@inheritdoc} + */ + public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection + { + $builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName); + + return $this->methodReflectionFactory->create( + $classReflection, + null, + $builtinMacro, + $classReflection->getActiveTemplateTypeMap(), + [], + TypehintHelper::decideTypeFromReflection($builtinMacro->getReturnType()), + null, + null, + $builtinMacro->isDeprecated()->yes(), + $builtinMacro->isInternal(), + $builtinMacro->isFinal(), + $builtinMacro->getDocComment() + ); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php new file mode 100644 index 00000000000..d169939d821 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use Carbon\CarbonInterface; +use ReflectionClass; +use ReflectionException; + +final class MacroScanner +{ + /** + * Return true if the given pair class-method is a Carbon macro. + * + * @param string $className + * @phpstan-param class-string $className + * + * @param string $methodName + * + * @return bool + */ + public function hasMethod(string $className, string $methodName): bool + { + return is_a($className, CarbonInterface::class, true) && + \is_callable([$className, 'hasMacro']) && + $className::hasMacro($methodName); + } + + /** + * Return the Macro for a given pair class-method. + * + * @param string $className + * @phpstan-param class-string $className + * + * @param string $methodName + * + * @throws ReflectionException + * + * @return Macro + */ + public function getMethod(string $className, string $methodName): Macro + { + $reflectionClass = new ReflectionClass($className); + $property = $reflectionClass->getProperty('globalMacros'); + + $property->setAccessible(true); + $macro = $property->getValue()[$methodName]; + + return new Macro( + $className, + $methodName, + $macro + ); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php new file mode 100644 index 00000000000..71bbb723015 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php @@ -0,0 +1,443 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Exceptions\UnknownUnitException; + +/** + * Trait Boundaries. + * + * startOf, endOf and derived method for each unit. + * + * Depends on the following properties: + * + * @property int $year + * @property int $month + * @property int $daysInMonth + * @property int $quarter + * + * Depends on the following methods: + * + * @method $this setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) + * @method $this setDate(int $year, int $month, int $day) + * @method $this addMonths(int $value = 1) + */ +trait Boundaries +{ + /** + * Resets the time to 00:00:00 start of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); + * ``` + * + * @return static + */ + public function startOfDay() + { + return $this->setTime(0, 0, 0, 0); + } + + /** + * Resets the time to 23:59:59.999999 end of day + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); + * ``` + * + * @return static + */ + public function endOfDay() + { + return $this->setTime(static::HOURS_PER_DAY - 1, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Resets the date to the first day of the month and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); + * ``` + * + * @return static + */ + public function startOfMonth() + { + return $this->setDate($this->year, $this->month, 1)->startOfDay(); + } + + /** + * Resets the date to end of the month and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); + * ``` + * + * @return static + */ + public function endOfMonth() + { + return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); + } + + /** + * Resets the date to the first day of the quarter and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); + * ``` + * + * @return static + */ + public function startOfQuarter() + { + $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; + + return $this->setDate($this->year, $month, 1)->startOfDay(); + } + + /** + * Resets the date to end of the quarter and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); + * ``` + * + * @return static + */ + public function endOfQuarter() + { + return $this->startOfQuarter()->addMonths(static::MONTHS_PER_QUARTER - 1)->endOfMonth(); + } + + /** + * Resets the date to the first day of the year and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); + * ``` + * + * @return static + */ + public function startOfYear() + { + return $this->setDate($this->year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the year and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); + * ``` + * + * @return static + */ + public function endOfYear() + { + return $this->setDate($this->year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the decade and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); + * ``` + * + * @return static + */ + public function startOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the decade and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); + * ``` + * + * @return static + */ + public function endOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); + * ``` + * + * @return static + */ + public function startOfCentury() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the century and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); + * ``` + * + * @return static + */ + public function endOfCentury() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the millennium and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); + * ``` + * + * @return static + */ + public function startOfMillennium() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the millennium and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); + * ``` + * + * @return static + */ + public function endOfMillennium() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_MILLENNIUM + static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; + * ``` + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return static + */ + public function startOfWeek($weekStartsAt = null) + { + return $this->subDays((7 + $this->dayOfWeek - ($weekStartsAt ?? $this->firstWeekDay)) % 7)->startOfDay(); + } + + /** + * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; + * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; + * ``` + * + * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week + * + * @return static + */ + public function endOfWeek($weekEndsAt = null) + { + return $this->addDays((7 - $this->dayOfWeek + ($weekEndsAt ?? $this->lastWeekDay)) % 7)->endOfDay(); + } + + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); + * ``` + * + * @return static + */ + public function startOfHour() + { + return $this->setTime($this->hour, 0, 0, 0); + } + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); + * ``` + * + * @return static + */ + public function endOfHour() + { + return $this->setTime($this->hour, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current minute, seconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); + * ``` + * + * @return static + */ + public function startOfMinute() + { + return $this->setTime($this->hour, $this->minute, 0, 0); + } + + /** + * Modify to end of current minute, seconds become 59 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); + * ``` + * + * @return static + */ + public function endOfMinute() + { + return $this->setTime($this->hour, $this->minute, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current second, microseconds become 0 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function startOfSecond() + { + return $this->setTime($this->hour, $this->minute, $this->second, 0); + } + + /** + * Modify to end of current second, microseconds become 999999 + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->endOfSecond() + * ->format('H:i:s.u'); + * ``` + * + * @return static + */ + public function endOfSecond() + { + return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1); + } + + /** + * Modify to start of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function startOf($unit, ...$params) + { + $ucfUnit = ucfirst(static::singularUnit($unit)); + $method = "startOf$ucfUnit"; + if (!method_exists($this, $method)) { + throw new UnknownUnitException($unit); + } + + return $this->$method(...$params); + } + + /** + * Modify to end of current given unit. + * + * @example + * ``` + * echo Carbon::parse('2018-07-25 12:45:16.334455') + * ->startOf('month') + * ->endOf('week', Carbon::FRIDAY); + * ``` + * + * @param string $unit + * @param array $params + * + * @return static + */ + public function endOf($unit, ...$params) + { + $ucfUnit = ucfirst(static::singularUnit($unit)); + $method = "endOf$ucfUnit"; + if (!method_exists($this, $method)) { + throw new UnknownUnitException($unit); + } + + return $this->$method(...$params); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php new file mode 100644 index 00000000000..5f7c7c011ab --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Exceptions\InvalidCastException; +use DateTimeInterface; + +/** + * Trait Cast. + * + * Utils to cast into an other class. + */ +trait Cast +{ + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return DateTimeInterface + */ + public function cast(string $className) + { + if (!method_exists($className, 'instance')) { + if (is_a($className, DateTimeInterface::class, true)) { + return new $className($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + throw new InvalidCastException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php new file mode 100644 index 00000000000..d4c2d8c8e2f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php @@ -0,0 +1,1099 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use BadMethodCallException; +use Carbon\CarbonInterface; +use Carbon\Exceptions\BadComparisonUnitException; +use InvalidArgumentException; + +/** + * Trait Comparison. + * + * Comparison utils and testers. All the following methods return booleans. + * nowWithSameTz + * + * Depends on the following methods: + * + * @method static resolveCarbon($date) + * @method static copy() + * @method static nowWithSameTz() + * @method static static yesterday($timezone = null) + * @method static static tomorrow($timezone = null) + */ +trait Comparison +{ + /** @var bool */ + protected $endOfTime = false; + + /** @var bool */ + protected $startOfTime = false; + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see equalTo() + * + * @return bool + */ + public function eq($date): bool + { + return $this->equalTo($date); + } + + /** + * Determines if the instance is equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function equalTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this == $this->resolveCarbon($date); + } + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see notEqualTo() + * + * @return bool + */ + public function ne($date): bool + { + return $this->notEqualTo($date); + } + + /** + * Determines if the instance is not equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function notEqualTo($date): bool + { + return !$this->equalTo($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function gt($date): bool + { + return $this->greaterThan($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThan($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this > $this->resolveCarbon($date); + } + + /** + * Determines if the instance is greater (after) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThan() + * + * @return bool + */ + public function isAfter($date): bool + { + return $this->greaterThan($date); + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see greaterThanOrEqualTo() + * + * @return bool + */ + public function gte($date): bool + { + return $this->greaterThanOrEqualTo($date); + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function greaterThanOrEqualTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this >= $this->resolveCarbon($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function lt($date): bool + { + return $this->lessThan($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThan($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this < $this->resolveCarbon($date); + } + + /** + * Determines if the instance is less (before) than another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThan() + * + * @return bool + */ + public function isBefore($date): bool + { + return $this->lessThan($date); + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lessThanOrEqualTo() + * + * @return bool + */ + public function lte($date): bool + { + return $this->lessThanOrEqualTo($date); + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @example + * ``` + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lessThanOrEqualTo($date): bool + { + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this <= $this->resolveCarbon($date); + } + + /** + * Determines if the instance is between two others. + * + * The third argument allow you to specify if bounds are included or not (true by default) + * but for when you including/excluding bounds may produce different results in your application, + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function between($date1, $date2, $equal = true): bool + { + $date1 = $this->resolveCarbon($date1); + $date2 = $this->resolveCarbon($date2); + + if ($date1->greaterThan($date2)) { + [$date1, $date2] = [$date2, $date1]; + } + + if ($equal) { + return $this >= $date1 && $this <= $date2; + } + + return $this > $date1 && $this < $date2; + } + + /** + * Determines if the instance is between two others, bounds included. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenIncluded($date1, $date2): bool + { + return $this->between($date1, $date2, true); + } + + /** + * Determines if the instance is between two others, bounds excluded. + * + * @example + * ``` + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return bool + */ + public function betweenExcluded($date1, $date2): bool + { + return $this->between($date1, $date2, false); + } + + /** + * Determines if the instance is between two others + * + * @example + * ``` + * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done + * + * @return bool + */ + public function isBetween($date1, $date2, $equal = true): bool + { + return $this->between($date1, $date2, $equal); + } + + /** + * Determines if the instance is a weekday. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekday(); // false + * Carbon::parse('2019-07-15')->isWeekday(); // true + * ``` + * + * @return bool + */ + public function isWeekday() + { + return !$this->isWeekend(); + } + + /** + * Determines if the instance is a weekend day. + * + * @example + * ``` + * Carbon::parse('2019-07-14')->isWeekend(); // true + * Carbon::parse('2019-07-15')->isWeekend(); // false + * ``` + * + * @return bool + */ + public function isWeekend() + { + return \in_array($this->dayOfWeek, static::$weekendDays, true); + } + + /** + * Determines if the instance is yesterday. + * + * @example + * ``` + * Carbon::yesterday()->isYesterday(); // true + * Carbon::tomorrow()->isYesterday(); // false + * ``` + * + * @return bool + */ + public function isYesterday() + { + return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is today. + * + * @example + * ``` + * Carbon::today()->isToday(); // true + * Carbon::tomorrow()->isToday(); // false + * ``` + * + * @return bool + */ + public function isToday() + { + return $this->toDateString() === $this->nowWithSameTz()->toDateString(); + } + + /** + * Determines if the instance is tomorrow. + * + * @example + * ``` + * Carbon::tomorrow()->isTomorrow(); // true + * Carbon::yesterday()->isTomorrow(); // false + * ``` + * + * @return bool + */ + public function isTomorrow() + { + return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is in the future, ie. greater (after) than now. + * + * @example + * ``` + * Carbon::now()->addHours(5)->isFuture(); // true + * Carbon::now()->subHours(5)->isFuture(); // false + * ``` + * + * @return bool + */ + public function isFuture() + { + return $this->greaterThan($this->nowWithSameTz()); + } + + /** + * Determines if the instance is in the past, ie. less (before) than now. + * + * @example + * ``` + * Carbon::now()->subHours(5)->isPast(); // true + * Carbon::now()->addHours(5)->isPast(); // false + * ``` + * + * @return bool + */ + public function isPast() + { + return $this->lessThan($this->nowWithSameTz()); + } + + /** + * Determines if the instance is a leap year. + * + * @example + * ``` + * Carbon::parse('2020-01-01')->isLeapYear(); // true + * Carbon::parse('2019-01-01')->isLeapYear(); // false + * ``` + * + * @return bool + */ + public function isLeapYear() + { + return $this->rawFormat('L') === '1'; + } + + /** + * Determines if the instance is a long year + * + * @example + * ``` + * Carbon::parse('2015-01-01')->isLongYear(); // true + * Carbon::parse('2016-01-01')->isLongYear(); // false + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongYear() + { + return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; + } + + /** + * Compares the formatted values of the two dates. + * + * @example + * ``` + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false + * ``` + * + * @param string $format date formats to compare. + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. + * + * @return bool + */ + public function isSameAs($format, $date = null) + { + return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); + } + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true + * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false + * ``` + * + * @param string $unit singular unit string + * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. + * + * @throws BadComparisonUnitException + * + * @return bool + */ + public function isSameUnit($unit, $date = null) + { + $units = [ + // @call isSameUnit + 'year' => 'Y', + // @call isSameUnit + 'week' => 'o-W', + // @call isSameUnit + 'day' => 'Y-m-d', + // @call isSameUnit + 'hour' => 'Y-m-d H', + // @call isSameUnit + 'minute' => 'Y-m-d H:i', + // @call isSameUnit + 'second' => 'Y-m-d H:i:s', + // @call isSameUnit + 'micro' => 'Y-m-d H:i:s.u', + // @call isSameUnit + 'microsecond' => 'Y-m-d H:i:s.u', + ]; + + if (isset($units[$unit])) { + return $this->isSameAs($units[$unit], $date); + } + + if (isset($this->$unit)) { + return $this->resolveCarbon($date)->$unit === $this->$unit; + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new BadComparisonUnitException($unit); + } + + return false; + } + + /** + * Determines if the instance is in the current unit given. + * + * @example + * ``` + * Carbon::now()->isCurrentUnit('hour'); // true + * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false + * ``` + * + * @param string $unit The unit to test. + * + * @throws BadMethodCallException + * + * @return bool + */ + public function isCurrentUnit($unit) + { + return $this->{'isSame'.ucfirst($unit)}(); + } + + /** + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameQuarter($date = null, $ofSameYear = true) + { + $date = $this->resolveCarbon($date); + + return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); + } + + /** + * Checks if the passed in date is in the same month as the instance´s month. + * + * @example + * ``` + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = true) + { + return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); + } + + /** + * Checks if this day is a specific day of the week. + * + * @example + * ``` + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false + * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true + * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false + * ``` + * + * @param int $dayOfWeek + * + * @return bool + */ + public function isDayOfWeek($dayOfWeek) + { + if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { + $dayOfWeek = \constant($constant); + } + + return $this->dayOfWeek === $dayOfWeek; + } + + /** + * Check if its the birthday. Compares the date/month values of the two dates. + * + * @example + * ``` + * Carbon::now()->subYears(5)->isBirthday(); // true + * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false + * ``` + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isBirthday($date = null) + { + return $this->isSameAs('md', $date); + } + + /** + * Check if today is the last day of the Month + * + * @example + * ``` + * Carbon::parse('2019-02-28')->isLastOfMonth(); // true + * Carbon::parse('2019-03-28')->isLastOfMonth(); // false + * Carbon::parse('2019-03-30')->isLastOfMonth(); // false + * Carbon::parse('2019-03-31')->isLastOfMonth(); // true + * Carbon::parse('2019-04-30')->isLastOfMonth(); // true + * ``` + * + * @return bool + */ + public function isLastOfMonth() + { + return $this->day === $this->daysInMonth; + } + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true + * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false + * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true + * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isStartOfDay($checkMicroseconds = false) + { + /* @var CarbonInterface $this */ + return $checkMicroseconds + ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' + : $this->rawFormat('H:i:s') === '00:00:00'; + } + + /** + * Check if the instance is end of day. + * + * @example + * ``` + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true + * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false + * ``` + * + * @param bool $checkMicroseconds check time at microseconds precision + * + * @return bool + */ + public function isEndOfDay($checkMicroseconds = false) + { + /* @var CarbonInterface $this */ + return $checkMicroseconds + ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' + : $this->rawFormat('H:i:s') === '23:59:59'; + } + + /** + * Check if the instance is start of day / midnight. + * + * @example + * ``` + * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true + * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false + * ``` + * + * @return bool + */ + public function isMidnight() + { + return $this->isStartOfDay(); + } + + /** + * Check if the instance is midday. + * + * @example + * ``` + * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false + * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true + * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false + * ``` + * + * @return bool + */ + public function isMidday() + { + /* @var CarbonInterface $this */ + return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; + } + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormat($date, $format) + { + // createFromFormat() is known to handle edge cases silently. + // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. + // To ensure we're really testing against our desired format, perform an additional regex validation. + + return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); + } + + /** + * Checks if the (date)time string is in a given format. + * + * @example + * ``` + * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true + * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormatWithModifiers($date, $format): bool + { + return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); + } + + /** + * Checks if the (date)time string is in a given format and valid to create a + * new instance. + * + * @example + * ``` + * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true + * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function canBeCreatedFromFormat($date, $format) + { + try { + // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string + // doesn't match the format in any way. + if (!static::rawCreateFromFormat($format, $date)) { + return false; + } + } catch (InvalidArgumentException $e) { + return false; + } + + return static::hasFormatWithModifiers($date, $format); + } + + /** + * Returns true if the current date matches the given string. + * + * @example + * ``` + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false + * ``` + * + * @param string $tester day name, month name, hour, date, etc. as string + * + * @return bool + */ + public function is(string $tester) + { + $tester = trim($tester); + + if (preg_match('/^\d+$/', $tester)) { + return $this->year === (int) $tester; + } + + if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { + return $this->isSameMonth(static::parse($tester)); + } + + if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { + return $this->isSameDay(static::parse($this->year.'-'.$tester)); + } + + $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); + + /* @var CarbonInterface $max */ + $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); + $current = $this->avoidMutation(); + /* @var CarbonInterface $other */ + $other = $this->avoidMutation()->modify($modifier); + + if ($current->eq($other)) { + return true; + } + + if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { + return $current->startOfSecond()->eq($other); + } + + if (preg_match('/\d:\d{1,2}$/', $tester)) { + return $current->startOfMinute()->eq($other); + } + + if (preg_match('/\d(h|am|pm)$/', $tester)) { + return $current->startOfHour()->eq($other); + } + + if (preg_match( + '/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i', + $tester + )) { + return $current->startOfMonth()->eq($other->startOfMonth()); + } + + $units = [ + 'month' => [1, 'year'], + 'day' => [1, 'month'], + 'hour' => [0, 'day'], + 'minute' => [0, 'hour'], + 'second' => [0, 'minute'], + 'microsecond' => [0, 'second'], + ]; + + foreach ($units as $unit => [$minimum, $startUnit]) { + if ($minimum === $median->$unit) { + $current = $current->startOf($startUnit); + + break; + } + } + + return $current->eq($other); + } + + /** + * Checks if the (date)time string is in a given format with + * given list of pattern replacements. + * + * @example + * ``` + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false + * ``` + * + * @param string $date + * @param string $format + * @param array $replacements + * + * @return bool + */ + private static function matchFormatPattern(string $date, string $format, array $replacements): bool + { + // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. + $regex = str_replace('\\\\', '\\', $format); + // Replace not-escaped letters + $regex = preg_replace_callback( + '/(?startOfTime ?? false; + } + + /** + * Returns true if the date was created using CarbonImmutable::endOfTime() + * + * @return bool + */ + public function isEndOfTime(): bool + { + return $this->endOfTime ?? false; + } + + private function discourageNull($value): void + { + if ($value === null) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); + } + } + + private function discourageBoolean($value): void + { + if (\is_bool($value)) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php new file mode 100644 index 00000000000..12689dc7805 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php @@ -0,0 +1,653 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; +use Carbon\CarbonInterval; +use Carbon\CarbonPeriod; +use Carbon\Exceptions\UnitException; +use Closure; +use DateTime; +use DateTimeImmutable; +use ReturnTypeWillChange; + +/** + * Trait Converter. + * + * Change date into different string formats and types and + * handle the string cast. + * + * Depends on the following methods: + * + * @method static copy() + */ +trait Converter +{ + /** + * Format to use for __toString method when type juggling occurs. + * + * @var string|Closure|null + */ + protected static $toStringFormat; + + /** + * Reset the format used to the default when type juggling a Carbon instance to a string + * + * @return void + */ + public static function resetToStringFormat() + { + static::setToStringFormat(null); + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * + * Set the default format used when type juggling a Carbon instance to a string + * + * @param string|Closure|null $format + * + * @return void + */ + public static function setToStringFormat($format) + { + static::$toStringFormat = $format; + } + + /** + * Returns the formatted date string on success or FALSE on failure. + * + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + #[ReturnTypeWillChange] + public function format($format) + { + $function = $this->localFormatFunction ?: static::$formatFunction; + + if (!$function) { + return $this->rawFormat($format); + } + + if (\is_string($function) && method_exists($this, $function)) { + $function = [$this, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * @see https://php.net/manual/en/datetime.format.php + * + * @param string $format + * + * @return string + */ + public function rawFormat($format) + { + return parent::format($format); + } + + /** + * Format the instance as a string using the set format + * + * @example + * ``` + * echo Carbon::now(); // Carbon instances can be casted to string + * ``` + * + * @return string + */ + public function __toString() + { + $format = $this->localToStringFormat ?? static::$toStringFormat; + + return $format instanceof Closure + ? $format($this) + : $this->rawFormat($format ?: ( + \defined('static::DEFAULT_TO_STRING_FORMAT') + ? static::DEFAULT_TO_STRING_FORMAT + : CarbonInterface::DEFAULT_TO_STRING_FORMAT + )); + } + + /** + * Format the instance as date + * + * @example + * ``` + * echo Carbon::now()->toDateString(); + * ``` + * + * @return string + */ + public function toDateString() + { + return $this->rawFormat('Y-m-d'); + } + + /** + * Format the instance as a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDateString(); + * ``` + * + * @return string + */ + public function toFormattedDateString() + { + return $this->rawFormat('M j, Y'); + } + + /** + * Format the instance as time + * + * @example + * ``` + * echo Carbon::now()->toTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toTimeString($unitPrecision = 'second') + { + return $this->rawFormat(static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Format the instance as date and time + * + * @example + * ``` + * echo Carbon::now()->toDateTimeString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeString($unitPrecision = 'second') + { + return $this->rawFormat('Y-m-d '.static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Return a format from H:i to H:i:s.u according to given unit precision. + * + * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" + * + * @return string + */ + public static function getTimeFormatByPrecision($unitPrecision) + { + switch (static::singularUnit($unitPrecision)) { + case 'minute': + return 'H:i'; + case 'second': + return 'H:i:s'; + case 'm': + case 'millisecond': + return 'H:i:s.v'; + case 'µ': + case 'microsecond': + return 'H:i:s.u'; + } + + throw new UnitException('Precision unit expected among: minute, second, millisecond and microsecond.'); + } + + /** + * Format the instance as date and time T-separated with no timezone + * + * @example + * ``` + * echo Carbon::now()->toDateTimeLocalString(); + * echo "\n"; + * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toDateTimeLocalString($unitPrecision = 'second') + { + return $this->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision)); + } + + /** + * Format the instance with day, date and time + * + * @example + * ``` + * echo Carbon::now()->toDayDateTimeString(); + * ``` + * + * @return string + */ + public function toDayDateTimeString() + { + return $this->rawFormat('D, M j, Y g:i A'); + } + + /** + * Format the instance as ATOM + * + * @example + * ``` + * echo Carbon::now()->toAtomString(); + * ``` + * + * @return string + */ + public function toAtomString() + { + return $this->rawFormat(DateTime::ATOM); + } + + /** + * Format the instance as COOKIE + * + * @example + * ``` + * echo Carbon::now()->toCookieString(); + * ``` + * + * @return string + */ + public function toCookieString() + { + return $this->rawFormat(DateTime::COOKIE); + } + + /** + * Format the instance as ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601String(); + * ``` + * + * @return string + */ + public function toIso8601String() + { + return $this->toAtomString(); + } + + /** + * Format the instance as RFC822 + * + * @example + * ``` + * echo Carbon::now()->toRfc822String(); + * ``` + * + * @return string + */ + public function toRfc822String() + { + return $this->rawFormat(DateTime::RFC822); + } + + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @example + * ``` + * echo Carbon::now()->toIso8601ZuluString(); + * ``` + * + * @param string $unitPrecision + * + * @return string + */ + public function toIso8601ZuluString($unitPrecision = 'second') + { + return $this->avoidMutation() + ->utc() + ->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision).'\Z'); + } + + /** + * Format the instance as RFC850 + * + * @example + * ``` + * echo Carbon::now()->toRfc850String(); + * ``` + * + * @return string + */ + public function toRfc850String() + { + return $this->rawFormat(DateTime::RFC850); + } + + /** + * Format the instance as RFC1036 + * + * @example + * ``` + * echo Carbon::now()->toRfc1036String(); + * ``` + * + * @return string + */ + public function toRfc1036String() + { + return $this->rawFormat(DateTime::RFC1036); + } + + /** + * Format the instance as RFC1123 + * + * @example + * ``` + * echo Carbon::now()->toRfc1123String(); + * ``` + * + * @return string + */ + public function toRfc1123String() + { + return $this->rawFormat(DateTime::RFC1123); + } + + /** + * Format the instance as RFC2822 + * + * @example + * ``` + * echo Carbon::now()->toRfc2822String(); + * ``` + * + * @return string + */ + public function toRfc2822String() + { + return $this->rawFormat(DateTime::RFC2822); + } + + /** + * Format the instance as RFC3339 + * + * @param bool $extended + * + * @example + * ``` + * echo Carbon::now()->toRfc3339String() . "\n"; + * echo Carbon::now()->toRfc3339String(true) . "\n"; + * ``` + * + * @return string + */ + public function toRfc3339String($extended = false) + { + $format = DateTime::RFC3339; + if ($extended) { + $format = DateTime::RFC3339_EXTENDED; + } + + return $this->rawFormat($format); + } + + /** + * Format the instance as RSS + * + * @example + * ``` + * echo Carbon::now()->toRssString(); + * ``` + * + * @return string + */ + public function toRssString() + { + return $this->rawFormat(DateTime::RSS); + } + + /** + * Format the instance as W3C + * + * @example + * ``` + * echo Carbon::now()->toW3cString(); + * ``` + * + * @return string + */ + public function toW3cString() + { + return $this->rawFormat(DateTime::W3C); + } + + /** + * Format the instance as RFC7231 + * + * @example + * ``` + * echo Carbon::now()->toRfc7231String(); + * ``` + * + * @return string + */ + public function toRfc7231String() + { + return $this->avoidMutation() + ->setTimezone('GMT') + ->rawFormat(\defined('static::RFC7231_FORMAT') ? static::RFC7231_FORMAT : CarbonInterface::RFC7231_FORMAT); + } + + /** + * Get default array representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toArray()); + * ``` + * + * @return array + */ + public function toArray() + { + return [ + 'year' => $this->year, + 'month' => $this->month, + 'day' => $this->day, + 'dayOfWeek' => $this->dayOfWeek, + 'dayOfYear' => $this->dayOfYear, + 'hour' => $this->hour, + 'minute' => $this->minute, + 'second' => $this->second, + 'micro' => $this->micro, + 'timestamp' => $this->timestamp, + 'formatted' => $this->rawFormat(\defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT), + 'timezone' => $this->timezone, + ]; + } + + /** + * Get default object representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toObject()); + * ``` + * + * @return object + */ + public function toObject() + { + return (object) $this->toArray(); + } + + /** + * Returns english human readable complete date string. + * + * @example + * ``` + * echo Carbon::now()->toString(); + * ``` + * + * @return string + */ + public function toString() + { + return $this->avoidMutation()->locale('en')->isoFormat('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: + * 1977-04-22T01:00:00-05:00). + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toISOString() . "\n"; + * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; + * ``` + * + * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. + * + * @return null|string + */ + public function toISOString($keepOffset = false) + { + if (!$this->isValid()) { + return null; + } + + $yearFormat = $this->year < 0 || $this->year > 9999 ? 'YYYYYY' : 'YYYY'; + $tzFormat = $keepOffset ? 'Z' : '[Z]'; + $date = $keepOffset ? $this : $this->avoidMutation()->utc(); + + return $date->isoFormat("$yearFormat-MM-DD[T]HH:mm:ss.SSSSSS$tzFormat"); + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toJSON(); + * ``` + * + * @return null|string + */ + public function toJSON() + { + return $this->toISOString(); + } + + /** + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTime()); + * ``` + * + * @return DateTime + */ + public function toDateTime() + { + return new DateTime($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + /** + * Return native toDateTimeImmutable PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTimeImmutable()); + * ``` + * + * @return DateTimeImmutable + */ + public function toDateTimeImmutable() + { + return new DateTimeImmutable($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + /** + * @alias toDateTime + * + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDate()); + * ``` + * + * @return DateTime + */ + public function toDate() + { + return $this->toDateTime(); + } + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function toPeriod($end = null, $interval = null, $unit = null) + { + if ($unit) { + $interval = CarbonInterval::make("$interval ".static::pluralUnit($unit)); + } + + $period = (new CarbonPeriod())->setDateClass(static::class)->setStartDate($this); + + if ($interval) { + $period->setDateInterval($interval); + } + + if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { + $period->setRecurrences($end); + } elseif ($end) { + $period->setEndDate($end); + } + + return $period; + } + + /** + * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). + * + * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date + * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit + * @param string|null $unit if specified, $interval must be an integer + * + * @return CarbonPeriod + */ + public function range($end = null, $interval = null, $unit = null) + { + return $this->toPeriod($end, $interval, $unit); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php new file mode 100644 index 00000000000..c28fc368ea9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php @@ -0,0 +1,943 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; +use Carbon\Exceptions\InvalidDateException; +use Carbon\Exceptions\InvalidFormatException; +use Carbon\Exceptions\OutOfRangeException; +use Carbon\Translator; +use Closure; +use DateTimeInterface; +use DateTimeZone; +use Exception; +use ReturnTypeWillChange; + +/** + * Trait Creator. + * + * Static creators. + * + * Depends on the following methods: + * + * @method static Carbon|CarbonImmutable getTestNow() + */ +trait Creator +{ + use ObjectInitialisation; + + /** + * The errors that can occur. + * + * @var array + */ + protected static $lastErrors; + + /** + * Create a new Carbon instance. + * + * Please see the testing aids section (specifically static::setTestNow()) + * for more on the possibility of this constructor returning a test instance. + * + * @param DateTimeInterface|string|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + */ + public function __construct($time = null, $tz = null) + { + if ($time instanceof DateTimeInterface) { + $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); + } + + if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { + $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); + } + + // If the class has a test now set and we are trying to create a now() + // instance then override as required + $isNow = empty($time) || $time === 'now'; + + if (method_exists(static::class, 'hasTestNow') && + method_exists(static::class, 'getTestNow') && + static::hasTestNow() && + ($isNow || static::hasRelativeKeywords($time)) + ) { + static::mockConstructorParameters($time, $tz); + } + + // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 + if (!str_contains((string) .1, '.')) { + $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore + setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore + } + + try { + parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); + } catch (Exception $exception) { + throw new InvalidFormatException($exception->getMessage(), 0, $exception); + } + + $this->constructedObjectId = spl_object_hash($this); + + if (isset($locale)) { + setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore + } + + self::setLastErrors(parent::getLastErrors()); + } + + /** + * Get timezone from a datetime instance. + * + * @param DateTimeInterface $date + * @param DateTimeZone|string|null $tz + * + * @return DateTimeInterface + */ + private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) + { + if ($tz !== null) { + $safeTz = static::safeCreateDateTimeZone($tz); + + if ($safeTz) { + return $date->setTimezone($safeTz); + } + + return $date; + } + + $tz = $date->getTimezone(); + + return $date; + } + + /** + * Update constructedObjectId on cloned. + */ + public function __clone() + { + $this->constructedObjectId = spl_object_hash($this); + } + + /** + * Create a Carbon instance from a DateTime one. + * + * @param DateTimeInterface $date + * + * @return static + */ + public static function instance($date) + { + if ($date instanceof static) { + return clone $date; + } + + static::expectDateTime($date); + + $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + + if ($date instanceof CarbonInterface) { + $settings = $date->getSettings(); + + if (!$date->hasLocalTranslator()) { + unset($settings['locale']); + } + + $instance->settings($settings); + } + + return $instance; + } + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function rawParse($time = null, $tz = null) + { + if ($time instanceof DateTimeInterface) { + return static::instance($time); + } + + try { + return new static($time, $tz); + } catch (Exception $exception) { + $date = @static::now($tz)->change($time); + + if (!$date) { + throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); + } + + return $date; + } + } + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|DateTimeInterface|null $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parse($time = null, $tz = null) + { + $function = static::$parseFunction; + + if (!$function) { + return static::rawParse($time, $tz); + } + + if (\is_string($function) && method_exists(static::class, $function)) { + $function = [static::class, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * + * @param string $time date/time string in the given language (may also contain English). + * @param string|null $locale if locale is null or not specified, current global locale will be + * used instead. + * @param DateTimeZone|string|null $tz optional timezone for the new instance. + * + * @throws InvalidFormatException + * + * @return static + */ + public static function parseFromLocale($time, $locale = null, $tz = null) + { + return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); + } + + /** + * Get a Carbon instance for the current date and time. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function now($tz = null) + { + return new static(null, $tz); + } + + /** + * Create a Carbon instance for today. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function today($tz = null) + { + return static::rawParse('today', $tz); + } + + /** + * Create a Carbon instance for tomorrow. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function tomorrow($tz = null) + { + return static::rawParse('tomorrow', $tz); + } + + /** + * Create a Carbon instance for yesterday. + * + * @param DateTimeZone|string|null $tz + * + * @return static + */ + public static function yesterday($tz = null) + { + return static::rawParse('yesterday', $tz); + } + + /** + * Create a Carbon instance for the greatest supported date. + * + * @return static + */ + public static function maxValue() + { + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore + } + + // 64 bit + return static::create(9999, 12, 31, 23, 59, 59); + } + + /** + * Create a Carbon instance for the lowest supported date. + * + * @return static + */ + public static function minValue() + { + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore + } + + // 64 bit + return static::create(1, 1, 1, 0, 0, 0); + } + + private static function assertBetween($unit, $value, $min, $max) + { + if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { + throw new OutOfRangeException($unit, $min, $max, $value); + } + } + + private static function createNowInstance($tz) + { + if (!static::hasTestNow()) { + return static::now($tz); + } + + $now = static::getTestNow(); + + if ($now instanceof Closure) { + return $now(static::now($tz)); + } + + return $now->avoidMutation()->tz($tz); + } + + /** + * Create a new Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) + { + if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { + return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); + } + + $defaults = null; + $getDefault = function ($unit) use ($tz, &$defaults) { + if ($defaults === null) { + $now = self::createNowInstance($tz); + + $defaults = array_combine([ + 'year', + 'month', + 'day', + 'hour', + 'minute', + 'second', + ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); + } + + return $defaults[$unit]; + }; + + $year = $year ?? $getDefault('year'); + $month = $month ?? $getDefault('month'); + $day = $day ?? $getDefault('day'); + $hour = $hour ?? $getDefault('hour'); + $minute = $minute ?? $getDefault('minute'); + $second = (float) ($second ?? $getDefault('second')); + + self::assertBetween('month', $month, 0, 99); + self::assertBetween('day', $day, 0, 99); + self::assertBetween('hour', $hour, 0, 99); + self::assertBetween('minute', $minute, 0, 99); + self::assertBetween('second', $second, 0, 99); + + $fixYear = null; + + if ($year < 0) { + $fixYear = $year; + $year = 0; + } elseif ($year > 9999) { + $fixYear = $year - 9999; + $year = 9999; + } + + $second = ($second < 10 ? '0' : '').number_format($second, 6); + $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); + + if ($fixYear !== null) { + $instance = $instance->addYears($fixYear); + } + + return $instance; + } + + /** + * Create a new safe Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidDateException + * + * @return static|false + */ + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) + { + $fields = static::getRangesByUnit(); + + foreach ($fields as $field => $range) { + if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { + if (static::isStrictModeEnabled()) { + throw new InvalidDateException($field, $$field); + } + + return false; + } + } + + $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); + + foreach (array_reverse($fields) as $field => $range) { + if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { + if (static::isStrictModeEnabled()) { + throw new InvalidDateException($field, $$field); + } + + return false; + } + } + + return $instance; + } + + /** + * Create a new Carbon instance from a specific date and time using strict validation. + * + * @see create() + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self + { + $initialStrictMode = static::isStrictModeEnabled(); + static::useStrictMode(true); + + try { + $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); + } finally { + static::useStrictMode($initialStrictMode); + } + + return $date; + } + + /** + * Create a Carbon instance from just a date. The time portion is set to now. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, null, null, null, $tz); + } + + /** + * Create a Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, 0, 0, 0, $tz); + } + + /** + * Create a Carbon instance from just a time. The date portion is set to today. + * + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) + { + return static::create(null, null, null, $hour, $minute, $second, $tz); + } + + /** + * Create a Carbon instance from a time string. The date portion is set to today. + * + * @param string $time + * @param DateTimeZone|string|null $tz + * + * @throws InvalidFormatException + * + * @return static + */ + public static function createFromTimeString($time, $tz = null) + { + return static::today($tz)->setTimeFromTimeString($time); + } + + /** + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $originalTz + * + * @return DateTimeInterface|false + */ + private static function createFromFormatAndTimezone($format, $time, $originalTz) + { + // Work-around for https://bugs.php.net/bug.php?id=75577 + // @codeCoverageIgnoreStart + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { + $format = str_replace('.v', '.u', $format); + } + // @codeCoverageIgnoreEnd + + if ($originalTz === null) { + return parent::createFromFormat($format, (string) $time); + } + + $tz = \is_int($originalTz) + ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) + : $originalTz; + + $tz = static::safeCreateDateTimeZone($tz, $originalTz); + + if ($tz === false) { + return false; + } + + return parent::createFromFormat($format, (string) $time, $tz); + } + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function rawCreateFromFormat($format, $time, $tz = null) + { + // Work-around for https://bugs.php.net/bug.php?id=80141 + $format = preg_replace('/(?getTimezone(); + } + + // Set microseconds to zero to match behavior of DateTime::createFromFormat() + // See https://bugs.php.net/bug.php?id=74332 + $mock = $mock->copy()->microsecond(0); + + // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. + if (!preg_match("/{$nonEscaped}[!|]/", $format)) { + $format = static::MOCK_DATETIME_FORMAT.' '.$format; + $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; + } + + // Regenerate date from the modified format to base result on the mocked instance instead of now. + $date = self::createFromFormatAndTimezone($format, $time, $tz); + } + + if ($date instanceof DateTimeInterface) { + $instance = static::instance($date); + $instance::setLastErrors($lastErrors); + + return $instance; + } + + if (static::isStrictModeEnabled()) { + throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); + } + + return false; + } + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + #[ReturnTypeWillChange] + public static function createFromFormat($format, $time, $tz = null) + { + $function = static::$createFromFormatFunction; + + if (!$function) { + return static::rawCreateFromFormat($format, $time, $tz); + } + + if (\is_string($function) && method_exists(static::class, $function)) { + $function = [static::class, $function]; + } + + return $function(...\func_get_args()); + } + + /** + * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * + * @param string $format Datetime format + * @param string $time + * @param DateTimeZone|string|false|null $tz optional timezone + * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) + * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) + { + $format = preg_replace_callback('/(? static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), + 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), + 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), + 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), + 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), + 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), + ]; + } + + return $formats[$code] ?? preg_replace_callback( + '/MMMM|MM|DD|dddd/', + function ($code) { + return mb_substr($code[0], 1); + }, + $formats[strtoupper($code)] ?? '' + ); + }, $format); + + $format = preg_replace_callback('/(? 'd', + 'OM' => 'M', + 'OY' => 'Y', + 'OH' => 'G', + 'Oh' => 'g', + 'Om' => 'i', + 'Os' => 's', + 'D' => 'd', + 'DD' => 'd', + 'Do' => 'd', + 'd' => '!', + 'dd' => '!', + 'ddd' => 'D', + 'dddd' => 'D', + 'DDD' => 'z', + 'DDDD' => 'z', + 'DDDo' => 'z', + 'e' => '!', + 'E' => '!', + 'H' => 'G', + 'HH' => 'H', + 'h' => 'g', + 'hh' => 'h', + 'k' => 'G', + 'kk' => 'G', + 'hmm' => 'gi', + 'hmmss' => 'gis', + 'Hmm' => 'Gi', + 'Hmmss' => 'Gis', + 'm' => 'i', + 'mm' => 'i', + 'a' => 'a', + 'A' => 'a', + 's' => 's', + 'ss' => 's', + 'S' => '*', + 'SS' => '*', + 'SSS' => '*', + 'SSSS' => '*', + 'SSSSS' => '*', + 'SSSSSS' => 'u', + 'SSSSSSS' => 'u*', + 'SSSSSSSS' => 'u*', + 'SSSSSSSSS' => 'u*', + 'M' => 'm', + 'MM' => 'm', + 'MMM' => 'M', + 'MMMM' => 'M', + 'Mo' => 'm', + 'Q' => '!', + 'Qo' => '!', + 'G' => '!', + 'GG' => '!', + 'GGG' => '!', + 'GGGG' => '!', + 'GGGGG' => '!', + 'g' => '!', + 'gg' => '!', + 'ggg' => '!', + 'gggg' => '!', + 'ggggg' => '!', + 'W' => '!', + 'WW' => '!', + 'Wo' => '!', + 'w' => '!', + 'ww' => '!', + 'wo' => '!', + 'x' => 'U???', + 'X' => 'U', + 'Y' => 'Y', + 'YY' => 'y', + 'YYYY' => 'Y', + 'YYYYY' => 'Y', + 'YYYYYY' => 'Y', + 'z' => 'e', + 'zz' => 'e', + 'Z' => 'e', + 'ZZ' => 'e', + ]; + } + + $format = $replacements[$code] ?? '?'; + + if ($format === '!') { + throw new InvalidFormatException("Format $code not supported for creation."); + } + + return $format; + }, $format); + + return static::rawCreateFromFormat($format, $time, $tz); + } + + /** + * Create a Carbon instance from a specific format and a string in a given language. + * + * @param string $format Datetime format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleFormat($format, $locale, $time, $tz = null) + { + return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); + } + + /** + * Create a Carbon instance from a specific ISO format and a string in a given language. + * + * @param string $format Datetime ISO format + * @param string $locale + * @param string $time + * @param DateTimeZone|string|false|null $tz + * + * @throws InvalidFormatException + * + * @return static|false + */ + public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) + { + $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); + + return static::createFromIsoFormat($format, $time, $tz, $locale); + } + + /** + * Make a Carbon instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @throws InvalidFormatException + * + * @return static|null + */ + public static function make($var) + { + if ($var instanceof DateTimeInterface) { + return static::instance($var); + } + + $date = null; + + if (\is_string($var)) { + $var = trim($var); + + if (!preg_match('/^P[\dT]/', $var) && + !preg_match('/^R\d/', $var) && + preg_match('/[a-z\d]/i', $var) + ) { + $date = static::parse($var); + } + } + + return $date; + } + + /** + * Set last errors. + * + * @param array $lastErrors + * + * @return void + */ + private static function setLastErrors(array $lastErrors) + { + static::$lastErrors = $lastErrors; + } + + /** + * {@inheritdoc} + * + * @return array + */ + #[ReturnTypeWillChange] + public static function getLastErrors() + { + return static::$lastErrors; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Date.php new file mode 100644 index 00000000000..b05b3652c40 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Date.php @@ -0,0 +1,2697 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use BadMethodCallException; +use Carbon\Carbon; +use Carbon\CarbonInterface; +use Carbon\CarbonPeriod; +use Carbon\CarbonTimeZone; +use Carbon\Exceptions\BadComparisonUnitException; +use Carbon\Exceptions\ImmutableException; +use Carbon\Exceptions\InvalidTimeZoneException; +use Carbon\Exceptions\InvalidTypeException; +use Carbon\Exceptions\UnknownGetterException; +use Carbon\Exceptions\UnknownMethodException; +use Carbon\Exceptions\UnknownSetterException; +use Carbon\Exceptions\UnknownUnitException; +use Closure; +use DateInterval; +use DatePeriod; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use InvalidArgumentException; +use ReflectionException; +use ReturnTypeWillChange; +use Throwable; + +/** + * A simple API extension for DateTime. + * + * @mixin DeprecatedProperties + * + * + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance + * + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonInterface years(int $value) Set current instance year to the given value. + * @method CarbonInterface year(int $value) Set current instance year to the given value. + * @method CarbonInterface setYears(int $value) Set current instance year to the given value. + * @method CarbonInterface setYear(int $value) Set current instance year to the given value. + * @method CarbonInterface months(int $value) Set current instance month to the given value. + * @method CarbonInterface month(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. + * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. + * @method CarbonInterface days(int $value) Set current instance day to the given value. + * @method CarbonInterface day(int $value) Set current instance day to the given value. + * @method CarbonInterface setDays(int $value) Set current instance day to the given value. + * @method CarbonInterface setDay(int $value) Set current instance day to the given value. + * @method CarbonInterface hours(int $value) Set current instance hour to the given value. + * @method CarbonInterface hour(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. + * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. + * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface minute(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. + * @method CarbonInterface seconds(int $value) Set current instance second to the given value. + * @method CarbonInterface second(int $value) Set current instance second to the given value. + * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. + * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. + * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addYear() Add one year to the instance (using date interval). + * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subYear() Sub one year to the instance (using date interval). + * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMonth() Add one month to the instance (using date interval). + * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). + * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDay() Add one day to the instance (using date interval). + * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDay() Sub one day to the instance (using date interval). + * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addHour() Add one hour to the instance (using date interval). + * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). + * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). + * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). + * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addSecond() Add one second to the instance (using date interval). + * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). + * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addCentury() Add one century to the instance (using date interval). + * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). + * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). + * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). + * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeek() Add one week to the instance (using date interval). + * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). + * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). + * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). + * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * + * + */ +trait Date +{ + use Boundaries; + use Comparison; + use Converter; + use Creator; + use Difference; + use Macro; + use Modifiers; + use Mutability; + use ObjectInitialisation; + use Options; + use Rounding; + use Serialization; + use Test; + use Timestamp; + use Units; + use Week; + + /** + * Names of days of the week. + * + * @var array + */ + protected static $days = [ + // @call isDayOfWeek + CarbonInterface::SUNDAY => 'Sunday', + // @call isDayOfWeek + CarbonInterface::MONDAY => 'Monday', + // @call isDayOfWeek + CarbonInterface::TUESDAY => 'Tuesday', + // @call isDayOfWeek + CarbonInterface::WEDNESDAY => 'Wednesday', + // @call isDayOfWeek + CarbonInterface::THURSDAY => 'Thursday', + // @call isDayOfWeek + CarbonInterface::FRIDAY => 'Friday', + // @call isDayOfWeek + CarbonInterface::SATURDAY => 'Saturday', + ]; + + /** + * Will UTF8 encoding be used to print localized date/time ? + * + * @var bool + */ + protected static $utf8 = false; + + /** + * List of unit and magic methods associated as doc-comments. + * + * @var array + */ + protected static $units = [ + // @call setUnit + // @call addUnit + 'year', + // @call setUnit + // @call addUnit + 'month', + // @call setUnit + // @call addUnit + 'day', + // @call setUnit + // @call addUnit + 'hour', + // @call setUnit + // @call addUnit + 'minute', + // @call setUnit + // @call addUnit + 'second', + // @call setUnit + // @call addUnit + 'milli', + // @call setUnit + // @call addUnit + 'millisecond', + // @call setUnit + // @call addUnit + 'micro', + // @call setUnit + // @call addUnit + 'microsecond', + ]; + + /** + * Creates a DateTimeZone from a string, DateTimeZone or integer offset. + * + * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. + * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. + * + * @throws InvalidTimeZoneException + * + * @return CarbonTimeZone|false + */ + protected static function safeCreateDateTimeZone($object, $objectDump = null) + { + return CarbonTimeZone::instance($object, $objectDump); + } + + /** + * Get the TimeZone associated with the Carbon instance (as CarbonTimeZone). + * + * @return CarbonTimeZone + * + * @link https://php.net/manual/en/datetime.gettimezone.php + */ + #[ReturnTypeWillChange] + public function getTimezone() + { + return CarbonTimeZone::instance(parent::getTimezone()); + } + + /** + * List of minimum and maximums for each unit. + * + * @return array + */ + protected static function getRangesByUnit(int $daysInMonth = 31): array + { + return [ + // @call roundUnit + 'year' => [1, 9999], + // @call roundUnit + 'month' => [1, static::MONTHS_PER_YEAR], + // @call roundUnit + 'day' => [1, $daysInMonth], + // @call roundUnit + 'hour' => [0, static::HOURS_PER_DAY - 1], + // @call roundUnit + 'minute' => [0, static::MINUTES_PER_HOUR - 1], + // @call roundUnit + 'second' => [0, static::SECONDS_PER_MINUTE - 1], + ]; + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /** + * @alias copy + * + * Get a copy of the instance. + * + * @return static + */ + public function clone() + { + return clone $this; + } + + /** + * Clone the current instance if it's mutable. + * + * This method is convenient to ensure you don't mutate the initial object + * but avoid to make a useless copy of it if it's already immutable. + * + * @return static + */ + public function avoidMutation(): self + { + if ($this instanceof DateTimeImmutable) { + return $this; + } + + return clone $this; + } + + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz() + { + return static::now($this->getTimezone()); + } + + /** + * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface. + * + * @param mixed $date + * @param string|array $other + * + * @throws InvalidTypeException + */ + protected static function expectDateTime($date, $other = []) + { + $message = 'Expected '; + foreach ((array) $other as $expect) { + $message .= "$expect, "; + } + + if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { + throw new InvalidTypeException( + $message.'DateTime or DateTimeInterface, '. + (\is_object($date) ? \get_class($date) : \gettype($date)).' given' + ); + } + } + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param Carbon|DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveCarbon($date = null) + { + if (!$date) { + return $this->nowWithSameTz(); + } + + if (\is_string($date)) { + return static::parse($date, $this->getTimezone()); + } + + static::expectDateTime($date, ['null', 'string']); + + return $date instanceof self ? $date : static::instance($date); + } + + /** + * Return the Carbon instance passed through, a now instance in UTC + * if null given or parse the input if string given (using current timezone + * then switching to UTC). + * + * @param Carbon|DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveUTC($date = null): self + { + if (!$date) { + return static::now('UTC'); + } + + if (\is_string($date)) { + return static::parse($date, $this->getTimezone())->utc(); + } + + static::expectDateTime($date, ['null', 'string']); + + return $date instanceof self ? $date : static::instance($date)->utc(); + } + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date + * + * @return static + */ + public function carbonize($date = null) + { + if ($date instanceof DateInterval) { + return $this->avoidMutation()->add($date); + } + + if ($date instanceof DatePeriod || $date instanceof CarbonPeriod) { + $date = $date->getStartDate(); + } + + return $this->resolveCarbon($date); + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Get a part of the Carbon object + * + * @param string $name + * + * @throws UnknownGetterException + * + * @return string|int|bool|DateTimeZone|null + */ + public function get($name) + { + static $formats = [ + // @property int + 'year' => 'Y', + // @property int + 'yearIso' => 'o', + // @property int + // @call isSameUnit + 'month' => 'n', + // @property int + 'day' => 'j', + // @property int + 'hour' => 'G', + // @property int + 'minute' => 'i', + // @property int + 'second' => 's', + // @property int + 'micro' => 'u', + // @property int + 'microsecond' => 'u', + // @property-read int 0 (for Sunday) through 6 (for Saturday) + 'dayOfWeek' => 'w', + // @property-read int 1 (for Monday) through 7 (for Sunday) + 'dayOfWeekIso' => 'N', + // @property-read int ISO-8601 week number of year, weeks starting on Monday + 'weekOfYear' => 'W', + // @property-read int number of days in the given month + 'daysInMonth' => 't', + // @property int|float|string seconds since the Unix Epoch + 'timestamp' => 'U', + // @property-read string "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + 'latinMeridiem' => 'a', + // @property-read string "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + 'latinUpperMeridiem' => 'A', + // @property string the day of week in English + 'englishDayOfWeek' => 'l', + // @property string the abbreviated day of week in English + 'shortEnglishDayOfWeek' => 'D', + // @property string the month in English + 'englishMonth' => 'F', + // @property string the abbreviated month in English + 'shortEnglishMonth' => 'M', + // @property string the day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMM') instead. + // since: 2.55.0 + 'localeDayOfWeek' => '%A', + // @property string the abbreviated day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('dddd') instead. + // since: 2.55.0 + 'shortLocaleDayOfWeek' => '%a', + // @property string the month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('ddd') instead. + // since: 2.55.0 + 'localeMonth' => '%B', + // @property string the abbreviated month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMMM') instead. + // since: 2.55.0 + 'shortLocaleMonth' => '%b', + // @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + 'timezoneAbbreviatedName' => 'T', + // @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + 'tzAbbrName' => 'T', + ]; + + switch (true) { + case isset($formats[$name]): + $format = $formats[$name]; + $method = str_starts_with($format, '%') ? 'formatLocalized' : 'rawFormat'; + $value = $this->$method($format); + + return is_numeric($value) ? (int) $value : $value; + + // @property-read string long name of weekday translated according to Carbon locale, in english if no translation available for current language + case $name === 'dayName': + return $this->getTranslatedDayName(); + // @property-read string short name of weekday translated according to Carbon locale, in english if no translation available for current language + case $name === 'shortDayName': + return $this->getTranslatedShortDayName(); + // @property-read string very short name of weekday translated according to Carbon locale, in english if no translation available for current language + case $name === 'minDayName': + return $this->getTranslatedMinDayName(); + // @property-read string long name of month translated according to Carbon locale, in english if no translation available for current language + case $name === 'monthName': + return $this->getTranslatedMonthName(); + // @property-read string short name of month translated according to Carbon locale, in english if no translation available for current language + case $name === 'shortMonthName': + return $this->getTranslatedShortMonthName(); + // @property-read string lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + case $name === 'meridiem': + return $this->meridiem(true); + // @property-read string uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + case $name === 'upperMeridiem': + return $this->meridiem(); + // @property-read int current hour from 1 to 24 + case $name === 'noZeroHour': + return $this->hour ?: 24; + // @property int + case $name === 'milliseconds': + // @property int + case $name === 'millisecond': + // @property int + case $name === 'milli': + return (int) floor(((int) $this->rawFormat('u')) / 1000); + + // @property int 1 through 53 + case $name === 'week': + return (int) $this->week(); + + // @property int 1 through 53 + case $name === 'isoWeek': + return (int) $this->isoWeek(); + + // @property int year according to week format + case $name === 'weekYear': + return (int) $this->weekYear(); + + // @property int year according to ISO week format + case $name === 'isoWeekYear': + return (int) $this->isoWeekYear(); + + // @property-read int 51 through 53 + case $name === 'weeksInYear': + return $this->weeksInYear(); + + // @property-read int 51 through 53 + case $name === 'isoWeeksInYear': + return $this->isoWeeksInYear(); + + // @property-read int 1 through 5 + case $name === 'weekOfMonth': + return (int) ceil($this->day / static::DAYS_PER_WEEK); + + // @property-read int 1 through 5 + case $name === 'weekNumberInMonth': + return (int) ceil(($this->day + $this->avoidMutation()->startOfMonth()->dayOfWeekIso - 1) / static::DAYS_PER_WEEK); + + // @property-read int 0 through 6 + case $name === 'firstWeekDay': + return $this->localTranslator ? ($this->getTranslationMessage('first_day_of_week') ?? 0) : static::getWeekStartsAt(); + + // @property-read int 0 through 6 + case $name === 'lastWeekDay': + return $this->localTranslator ? (($this->getTranslationMessage('first_day_of_week') ?? 0) + static::DAYS_PER_WEEK - 1) % static::DAYS_PER_WEEK : static::getWeekEndsAt(); + + // @property int 1 through 366 + case $name === 'dayOfYear': + return 1 + (int) ($this->rawFormat('z')); + + // @property-read int 365 or 366 + case $name === 'daysInYear': + return $this->isLeapYear() ? 366 : 365; + + // @property int does a diffInYears() with default parameters + case $name === 'age': + return $this->diffInYears(); + + // @property-read int the quarter of this instance, 1 - 4 + // @call isSameUnit + case $name === 'quarter': + return (int) ceil($this->month / static::MONTHS_PER_QUARTER); + + // @property-read int the decade of this instance + // @call isSameUnit + case $name === 'decade': + return (int) ceil($this->year / static::YEARS_PER_DECADE); + + // @property-read int the century of this instance + // @call isSameUnit + case $name === 'century': + $factor = 1; + $year = $this->year; + if ($year < 0) { + $year = -$year; + $factor = -1; + } + + return (int) ($factor * ceil($year / static::YEARS_PER_CENTURY)); + + // @property-read int the millennium of this instance + // @call isSameUnit + case $name === 'millennium': + $factor = 1; + $year = $this->year; + if ($year < 0) { + $year = -$year; + $factor = -1; + } + + return (int) ($factor * ceil($year / static::YEARS_PER_MILLENNIUM)); + + // @property int the timezone offset in seconds from UTC + case $name === 'offset': + return $this->getOffset(); + + // @property int the timezone offset in minutes from UTC + case $name === 'offsetMinutes': + return $this->getOffset() / static::SECONDS_PER_MINUTE; + + // @property int the timezone offset in hours from UTC + case $name === 'offsetHours': + return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; + + // @property-read bool daylight savings time indicator, true if DST, false otherwise + case $name === 'dst': + return $this->rawFormat('I') === '1'; + + // @property-read bool checks if the timezone is local, true if local, false otherwise + case $name === 'local': + return $this->getOffset() === $this->avoidMutation()->setTimezone(date_default_timezone_get())->getOffset(); + + // @property-read bool checks if the timezone is UTC, true if UTC, false otherwise + case $name === 'utc': + return $this->getOffset() === 0; + + // @property CarbonTimeZone $timezone the current timezone + // @property CarbonTimeZone $tz alias of $timezone + case $name === 'timezone' || $name === 'tz': + return CarbonTimeZone::instance($this->getTimezone()); + + // @property-read string $timezoneName the current timezone name + // @property-read string $tzName alias of $timezoneName + case $name === 'timezoneName' || $name === 'tzName': + return $this->getTimezone()->getName(); + + // @property-read string locale of the current instance + case $name === 'locale': + return $this->getTranslatorLocale(); + + default: + $macro = $this->getLocalMacro('get'.ucfirst($name)); + + if ($macro) { + return $this->executeCallableWithContext($macro); + } + + throw new UnknownGetterException($name); + } + } + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + try { + $this->__get($name); + } catch (UnknownGetterException | ReflectionException $e) { + return false; + } + + return true; + } + + /** + * Set a part of the Carbon object + * + * @param string $name + * @param string|int|DateTimeZone $value + * + * @throws UnknownSetterException|ReflectionException + * + * @return void + */ + public function __set($name, $value) + { + if ($this->constructedObjectId === spl_object_hash($this)) { + $this->set($name, $value); + + return; + } + + $this->$name = $value; + } + + /** + * Set a part of the Carbon object + * + * @param string|array $name + * @param string|int|DateTimeZone $value + * + * @throws ImmutableException|UnknownSetterException + * + * @return $this + */ + public function set($name, $value = null) + { + if ($this->isImmutable()) { + throw new ImmutableException(sprintf('%s class', static::class)); + } + + if (\is_array($name)) { + foreach ($name as $key => $value) { + $this->set($key, $value); + } + + return $this; + } + + switch ($name) { + case 'milliseconds': + case 'millisecond': + case 'milli': + case 'microseconds': + case 'microsecond': + case 'micro': + if (str_starts_with($name, 'milli')) { + $value *= 1000; + } + + while ($value < 0) { + $this->subSecond(); + $value += static::MICROSECONDS_PER_SECOND; + } + + while ($value >= static::MICROSECONDS_PER_SECOND) { + $this->addSecond(); + $value -= static::MICROSECONDS_PER_SECOND; + } + + $this->modify($this->rawFormat('H:i:s.').str_pad((string) round($value), 6, '0', STR_PAD_LEFT)); + + break; + + case 'year': + case 'month': + case 'day': + case 'hour': + case 'minute': + case 'second': + [$year, $month, $day, $hour, $minute, $second] = array_map('intval', explode('-', $this->rawFormat('Y-n-j-G-i-s'))); + $$name = $value; + $this->setDateTime($year, $month, $day, $hour, $minute, $second); + + break; + + case 'week': + $this->week($value); + + break; + + case 'isoWeek': + $this->isoWeek($value); + + break; + + case 'weekYear': + $this->weekYear($value); + + break; + + case 'isoWeekYear': + $this->isoWeekYear($value); + + break; + + case 'dayOfYear': + $this->addDays($value - $this->dayOfYear); + + break; + + case 'timestamp': + $this->setTimestamp($value); + + break; + + case 'offset': + $this->setTimezone(static::safeCreateDateTimeZone($value / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR)); + + break; + + case 'offsetMinutes': + $this->setTimezone(static::safeCreateDateTimeZone($value / static::MINUTES_PER_HOUR)); + + break; + + case 'offsetHours': + $this->setTimezone(static::safeCreateDateTimeZone($value)); + + break; + + case 'timezone': + case 'tz': + $this->setTimezone($value); + + break; + + default: + $macro = $this->getLocalMacro('set'.ucfirst($name)); + + if ($macro) { + $this->executeCallableWithContext($macro, $value); + + break; + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnknownSetterException($name); + } + + $this->$name = $value; + } + + return $this; + } + + protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) + { + $key = $baseKey.$keySuffix; + $standaloneKey = "{$key}_standalone"; + $baseTranslation = $this->getTranslationMessage($key); + + if ($baseTranslation instanceof Closure) { + return $baseTranslation($this, $context, $subKey) ?: $defaultValue; + } + + if ( + $this->getTranslationMessage("$standaloneKey.$subKey") && + (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) + ) { + $key = $standaloneKey; + } + + return $this->getTranslationMessage("$key.$subKey", null, $defaultValue); + } + + /** + * Get the translation of the current week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "", "_short" or "_min" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null) + { + return $this->getTranslatedFormByRegExp('weekdays', $keySuffix, $context, $this->dayOfWeek, $defaultValue ?: $this->englishDayOfWeek); + } + + /** + * Get the translation of the current short week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortDayName($context = null) + { + return $this->getTranslatedDayName($context, '_short', $this->shortEnglishDayOfWeek); + } + + /** + * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedMinDayName($context = null) + { + return $this->getTranslatedDayName($context, '_min', $this->shortEnglishDayOfWeek); + } + + /** + * Get the translation of the current month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * @param string $keySuffix "" or "_short" + * @param string|null $defaultValue default value if translation missing + * + * @return string + */ + public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null) + { + return $this->getTranslatedFormByRegExp('months', $keySuffix, $context, $this->month - 1, $defaultValue ?: $this->englishMonth); + } + + /** + * Get the translation of the current short month day name (with context for languages with multiple forms). + * + * @param string|null $context whole format string + * + * @return string + */ + public function getTranslatedShortMonthName($context = null) + { + return $this->getTranslatedMonthName($context, '_short', $this->shortEnglishMonth); + } + + /** + * Get/set the day of year. + * + * @param int|null $value new value for day of year if using as setter. + * + * @return static|int + */ + public function dayOfYear($value = null) + { + $dayOfYear = $this->dayOfYear; + + return $value === null ? $dayOfYear : $this->addDays($value - $dayOfYear); + } + + /** + * Get/set the weekday from 0 (Sunday) to 6 (Saturday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function weekday($value = null) + { + $dayOfWeek = ($this->dayOfWeek + 7 - (int) ($this->getTranslationMessage('first_day_of_week') ?? 0)) % 7; + + return $value === null ? $dayOfWeek : $this->addDays($value - $dayOfWeek); + } + + /** + * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). + * + * @param int|null $value new value for weekday if using as setter. + * + * @return static|int + */ + public function isoWeekday($value = null) + { + $dayOfWeekIso = $this->dayOfWeekIso; + + return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso); + } + + /** + * Set any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value new value for the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function setUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + try { + $original = $this->avoidMutation(); + /** @var static $date */ + $date = $this->$valueUnit($value); + $end = $original->avoidMutation()->endOf($overflowUnit); + $start = $original->avoidMutation()->startOf($overflowUnit); + if ($date < $start) { + $date = $date->setDateTimeFrom($start); + } elseif ($date > $end) { + $date = $date->setDateTimeFrom($end); + } + + return $date; + } catch (BadMethodCallException | ReflectionException $exception) { + throw new UnknownUnitException($valueUnit, 0, $exception); + } + } + + /** + * Add any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to add to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function addUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit + $value, $overflowUnit); + } + + /** + * Subtract any unit to a new value without overflowing current other unit given. + * + * @param string $valueUnit unit name to modify + * @param int $value amount to subtract to the input unit + * @param string $overflowUnit unit name to not overflow + * + * @return static + */ + public function subUnitNoOverflow($valueUnit, $value, $overflowUnit) + { + return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit - $value, $overflowUnit); + } + + /** + * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. + * + * @param int|null $minuteOffset + * + * @return int|static + */ + public function utcOffset(int $minuteOffset = null) + { + if (\func_num_args() < 1) { + return $this->offsetMinutes; + } + + return $this->setTimezone(CarbonTimeZone::createFromMinuteOffset($minuteOffset)); + } + + /** + * Set the date with gregorian year, month and day numbers. + * + * @see https://php.net/manual/en/datetime.setdate.php + * + * @param int $year + * @param int $month + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setDate($year, $month, $day) + { + return parent::setDate((int) $year, (int) $month, (int) $day); + } + + /** + * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. + * + * @see https://php.net/manual/en/datetime.setisodate.php + * + * @param int $year + * @param int $week + * @param int $day + * + * @return static + */ + #[ReturnTypeWillChange] + public function setISODate($year, $week, $day = 1) + { + return parent::setISODate((int) $year, (int) $week, (int) $day); + } + + /** + * Set the date and time all together. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0) + { + return $this->setDate($year, $month, $day)->setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); + } + + /** + * Resets the current time of the DateTime object to a different time. + * + * @see https://php.net/manual/en/datetime.settime.php + * + * @param int $hour + * @param int $minute + * @param int $second + * @param int $microseconds + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTime($hour, $minute, $second = 0, $microseconds = 0) + { + return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); + } + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimestamp($unixTimestamp) + { + [$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp); + + return parent::setTimestamp((int) $timestamp)->setMicroseconds((int) $microseconds); + } + + /** + * Set the time by time string. + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time) + { + if (!str_contains($time, ':')) { + $time .= ':0'; + } + + return $this->modify($time); + } + + /** + * @alias setTimezone + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function timezone($value) + { + return $this->setTimezone($value); + } + + /** + * Set the timezone or returns the timezone name if no arguments passed. + * + * @param DateTimeZone|string $value + * + * @return static|string + */ + public function tz($value = null) + { + if (\func_num_args() < 1) { + return $this->tzName; + } + + return $this->setTimezone($value); + } + + /** + * Set the instance's timezone from a string or object. + * + * @param DateTimeZone|string $value + * + * @return static + */ + #[ReturnTypeWillChange] + public function setTimezone($value) + { + $tz = static::safeCreateDateTimeZone($value); + + if ($tz === false && !self::isStrictModeEnabled()) { + $tz = new CarbonTimeZone(); + } + + return parent::setTimezone($tz); + } + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference. + * + * @param DateTimeZone|string $value + * + * @return static + */ + public function shiftTimezone($value) + { + $dateTimeString = $this->format('Y-m-d H:i:s.u'); + + return $this + ->setTimezone($value) + ->modify($dateTimeString); + } + + /** + * Set the instance's timezone to UTC. + * + * @return static + */ + public function utc() + { + return $this->setTimezone('UTC'); + } + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setDateFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->setDate($date->year, $date->month, $date->day); + } + + /** + * Set the hour, minute, second and microseconds for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date now if null + * + * @return static + */ + public function setTimeFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->setTime($date->hour, $date->minute, $date->second, $date->microsecond); + } + + /** + * Set the date and time for this instance to that of the passed instance. + * + * @param Carbon|DateTimeInterface $date + * + * @return static + */ + public function setDateTimeFrom($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->modify($date->rawFormat('Y-m-d H:i:s.u')); + } + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays() + { + return static::$days; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// WEEK SPECIAL DAYS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + private static function getFirstDayOfWeek(): int + { + return (int) static::getTranslationMessageWith( + static::getTranslator(), + 'first_day_of_week' + ); + } + + /** + * Get the first day of week + * + * @return int + */ + public static function getWeekStartsAt() + { + if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { + return self::getFirstDayOfWeek(); + } + + return static::$weekStartsAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * + * Set the first day of week + * + * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekStartsAt($day) + { + static::$weekStartsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); + } + + /** + * Get the last day of week + * + * @return int + */ + public static function getWeekEndsAt() + { + if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { + return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; + } + + return static::$weekEndsAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * + * Set the last day of week + * + * @param int|string $day week end day (or 'auto' to get the day before the first day of week + * from Carbon::getLocale() culture). + * + * @return void + */ + public static function setWeekEndsAt($day) + { + static::$weekEndsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); + } + + /** + * Get weekend days + * + * @return array + */ + public static function getWeekendDays() + { + return static::$weekendDays; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * + * Set weekend days + * + * @param array $days + * + * @return void + */ + public static function setWeekendDays($days) + { + static::$weekendDays = $days; + } + + /** + * Determine if a time string will produce a relative date. + * + * @param string $time + * + * @return bool true if time match a relative date, false if absolute or invalid time string + */ + public static function hasRelativeKeywords($time) + { + if (!$time || strtotime($time) === false) { + return false; + } + + $date1 = new DateTime('2000-01-01T00:00:00Z'); + $date1->modify($time); + $date2 = new DateTime('2001-12-25T00:00:00Z'); + $date2->modify($time); + + return $date1 != $date2; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// STRING FORMATTING ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * + * Set if UTF8 will be used for localized date/time. + * + * @param bool $utf8 + */ + public static function setUtf8($utf8) + { + static::$utf8 = $utf8; + } + + /** + * Format the instance with the current locale. You can set the current + * locale using setlocale() https://php.net/setlocale. + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * + * @param string $format + * + * @return string + */ + public function formatLocalized($format) + { + // Check for Windows to find and replace the %e modifier correctly. + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $format = preg_replace('#(?toDateTimeString()); + $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) + ? strftime($format, $time) + : @strftime($format, $time); + + return static::$utf8 + ? ( + \function_exists('mb_convert_encoding') + ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) + : utf8_encode($formatted) + ) + : $formatted; + } + + /** + * Returns list of locale formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getIsoFormats($locale = null) + { + return [ + 'LT' => $this->getTranslationMessage('formats.LT', $locale, 'h:mm A'), + 'LTS' => $this->getTranslationMessage('formats.LTS', $locale, 'h:mm:ss A'), + 'L' => $this->getTranslationMessage('formats.L', $locale, 'MM/DD/YYYY'), + 'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'), + 'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), + 'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), + ]; + } + + /** + * Returns list of calendar formats for ISO formatting. + * + * @param string|null $locale current locale used if null + * + * @return array + */ + public function getCalendarFormats($locale = null) + { + return [ + 'sameDay' => $this->getTranslationMessage('calendar.sameDay', $locale, '[Today at] LT'), + 'nextDay' => $this->getTranslationMessage('calendar.nextDay', $locale, '[Tomorrow at] LT'), + 'nextWeek' => $this->getTranslationMessage('calendar.nextWeek', $locale, 'dddd [at] LT'), + 'lastDay' => $this->getTranslationMessage('calendar.lastDay', $locale, '[Yesterday at] LT'), + 'lastWeek' => $this->getTranslationMessage('calendar.lastWeek', $locale, '[Last] dddd [at] LT'), + 'sameElse' => $this->getTranslationMessage('calendar.sameElse', $locale, 'L'), + ]; + } + + /** + * Returns list of locale units for ISO formatting. + * + * @return array + */ + public static function getIsoUnits() + { + static $units = null; + + if ($units === null) { + $units = [ + 'OD' => ['getAltNumber', ['day']], + 'OM' => ['getAltNumber', ['month']], + 'OY' => ['getAltNumber', ['year']], + 'OH' => ['getAltNumber', ['hour']], + 'Oh' => ['getAltNumber', ['h']], + 'Om' => ['getAltNumber', ['minute']], + 'Os' => ['getAltNumber', ['second']], + 'D' => 'day', + 'DD' => ['rawFormat', ['d']], + 'Do' => ['ordinal', ['day', 'D']], + 'd' => 'dayOfWeek', + 'dd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedMinDayName($originalFormat); + }, + 'ddd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedShortDayName($originalFormat); + }, + 'dddd' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedDayName($originalFormat); + }, + 'DDD' => 'dayOfYear', + 'DDDD' => ['getPaddedUnit', ['dayOfYear', 3]], + 'DDDo' => ['ordinal', ['dayOfYear', 'DDD']], + 'e' => ['weekday', []], + 'E' => 'dayOfWeekIso', + 'H' => ['rawFormat', ['G']], + 'HH' => ['rawFormat', ['H']], + 'h' => ['rawFormat', ['g']], + 'hh' => ['rawFormat', ['h']], + 'k' => 'noZeroHour', + 'kk' => ['getPaddedUnit', ['noZeroHour']], + 'hmm' => ['rawFormat', ['gi']], + 'hmmss' => ['rawFormat', ['gis']], + 'Hmm' => ['rawFormat', ['Gi']], + 'Hmmss' => ['rawFormat', ['Gis']], + 'm' => 'minute', + 'mm' => ['rawFormat', ['i']], + 'a' => 'meridiem', + 'A' => 'upperMeridiem', + 's' => 'second', + 'ss' => ['getPaddedUnit', ['second']], + 'S' => function (CarbonInterface $date) { + return (string) floor($date->micro / 100000); + }, + 'SS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 10000), 2, '0', STR_PAD_LEFT); + }, + 'SSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 1000), 3, '0', STR_PAD_LEFT); + }, + 'SSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 100), 4, '0', STR_PAD_LEFT); + }, + 'SSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro / 10), 5, '0', STR_PAD_LEFT); + }, + 'SSSSSS' => ['getPaddedUnit', ['micro', 6]], + 'SSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 10), 7, '0', STR_PAD_LEFT); + }, + 'SSSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 100), 8, '0', STR_PAD_LEFT); + }, + 'SSSSSSSSS' => function (CarbonInterface $date) { + return str_pad((string) floor($date->micro * 1000), 9, '0', STR_PAD_LEFT); + }, + 'M' => 'month', + 'MM' => ['rawFormat', ['m']], + 'MMM' => function (CarbonInterface $date, $originalFormat = null) { + $month = $date->getTranslatedShortMonthName($originalFormat); + $suffix = $date->getTranslationMessage('mmm_suffix'); + if ($suffix && $month !== $date->monthName) { + $month .= $suffix; + } + + return $month; + }, + 'MMMM' => function (CarbonInterface $date, $originalFormat = null) { + return $date->getTranslatedMonthName($originalFormat); + }, + 'Mo' => ['ordinal', ['month', 'M']], + 'Q' => 'quarter', + 'Qo' => ['ordinal', ['quarter', 'M']], + 'G' => 'isoWeekYear', + 'GG' => ['getPaddedUnit', ['isoWeekYear']], + 'GGG' => ['getPaddedUnit', ['isoWeekYear', 3]], + 'GGGG' => ['getPaddedUnit', ['isoWeekYear', 4]], + 'GGGGG' => ['getPaddedUnit', ['isoWeekYear', 5]], + 'g' => 'weekYear', + 'gg' => ['getPaddedUnit', ['weekYear']], + 'ggg' => ['getPaddedUnit', ['weekYear', 3]], + 'gggg' => ['getPaddedUnit', ['weekYear', 4]], + 'ggggg' => ['getPaddedUnit', ['weekYear', 5]], + 'W' => 'isoWeek', + 'WW' => ['getPaddedUnit', ['isoWeek']], + 'Wo' => ['ordinal', ['isoWeek', 'W']], + 'w' => 'week', + 'ww' => ['getPaddedUnit', ['week']], + 'wo' => ['ordinal', ['week', 'w']], + 'x' => ['valueOf', []], + 'X' => 'timestamp', + 'Y' => 'year', + 'YY' => ['rawFormat', ['y']], + 'YYYY' => ['getPaddedUnit', ['year', 4]], + 'YYYYY' => ['getPaddedUnit', ['year', 5]], + 'YYYYYY' => function (CarbonInterface $date) { + return ($date->year < 0 ? '' : '+').$date->getPaddedUnit('year', 6); + }, + 'z' => ['rawFormat', ['T']], + 'zz' => 'tzName', + 'Z' => ['getOffsetString', []], + 'ZZ' => ['getOffsetString', ['']], + ]; + } + + return $units; + } + + /** + * Returns a unit of the instance padded with 0 by default or any other string if specified. + * + * @param string $unit Carbon unit name + * @param int $length Length of the output (2 by default) + * @param string $padString String to use for padding ("0" by default) + * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) + * + * @return string + */ + public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = STR_PAD_LEFT) + { + return ($this->$unit < 0 ? '-' : '').str_pad((string) abs($this->$unit), $length, $padString, $padType); + } + + /** + * Return a property with its ordinal. + * + * @param string $key + * @param string|null $period + * + * @return string + */ + public function ordinal(string $key, ?string $period = null): string + { + $number = $this->$key; + $result = $this->translate('ordinal', [ + ':number' => $number, + ':period' => (string) $period, + ]); + + return (string) ($result === 'ordinal' ? $number : $result); + } + + /** + * Return the meridiem of the current time in the current locale. + * + * @param bool $isLower if true, returns lowercase variant if available in the current locale. + * + * @return string + */ + public function meridiem(bool $isLower = false): string + { + $hour = $this->hour; + $index = $hour < 12 ? 0 : 1; + + if ($isLower) { + $key = 'meridiem.'.($index + 2); + $result = $this->translate($key); + + if ($result !== $key) { + return $result; + } + } + + $key = "meridiem.$index"; + $result = $this->translate($key); + if ($result === $key) { + $result = $this->translate('meridiem', [ + ':hour' => $this->hour, + ':minute' => $this->minute, + ':isLower' => $isLower, + ]); + + if ($result === 'meridiem') { + return $isLower ? $this->latinMeridiem : $this->latinUpperMeridiem; + } + } elseif ($isLower) { + $result = mb_strtolower($result); + } + + return $result; + } + + /** + * Returns the alternative number for a given date property if available in the current locale. + * + * @param string $key date property + * + * @return string + */ + public function getAltNumber(string $key): string + { + return $this->translateNumber(\strlen($key) > 1 ? $this->$key : $this->rawFormat('h')); + } + + /** + * Format in the current language using ISO replacement patterns. + * + * @param string $format + * @param string|null $originalFormat provide context if a chunk has been passed alone + * + * @return string + */ + public function isoFormat(string $format, ?string $originalFormat = null): string + { + $result = ''; + $length = mb_strlen($format); + $originalFormat = $originalFormat ?: $format; + $inEscaped = false; + $formats = null; + $units = null; + + for ($i = 0; $i < $length; $i++) { + $char = mb_substr($format, $i, 1); + + if ($char === '\\') { + $result .= mb_substr($format, ++$i, 1); + + continue; + } + + if ($char === '[' && !$inEscaped) { + $inEscaped = true; + + continue; + } + + if ($char === ']' && $inEscaped) { + $inEscaped = false; + + continue; + } + + if ($inEscaped) { + $result .= $char; + + continue; + } + + $input = mb_substr($format, $i); + + if (preg_match('/^(LTS|LT|[Ll]{1,4})/', $input, $match)) { + if ($formats === null) { + $formats = $this->getIsoFormats(); + } + + $code = $match[0]; + $sequence = $formats[$code] ?? preg_replace_callback( + '/MMMM|MM|DD|dddd/', + function ($code) { + return mb_substr($code[0], 1); + }, + $formats[strtoupper($code)] ?? '' + ); + $rest = mb_substr($format, $i + mb_strlen($code)); + $format = mb_substr($format, 0, $i).$sequence.$rest; + $length = mb_strlen($format); + $input = $sequence.$rest; + } + + if (preg_match('/^'.CarbonInterface::ISO_FORMAT_REGEXP.'/', $input, $match)) { + $code = $match[0]; + + if ($units === null) { + $units = static::getIsoUnits(); + } + + $sequence = $units[$code] ?? ''; + + if ($sequence instanceof Closure) { + $sequence = $sequence($this, $originalFormat); + } elseif (\is_array($sequence)) { + try { + $sequence = $this->{$sequence[0]}(...$sequence[1]); + } catch (ReflectionException | InvalidArgumentException | BadMethodCallException $e) { + $sequence = ''; + } + } elseif (\is_string($sequence)) { + $sequence = $this->$sequence ?? $code; + } + + $format = mb_substr($format, 0, $i).$sequence.mb_substr($format, $i + mb_strlen($code)); + $i += mb_strlen((string) $sequence) - 1; + $length = mb_strlen($format); + $char = $sequence; + } + + $result .= $char; + } + + return $result; + } + + /** + * List of replacements from date() format to isoFormat(). + * + * @return array + */ + public static function getFormatsToIsoReplacements() + { + static $replacements = null; + + if ($replacements === null) { + $replacements = [ + 'd' => true, + 'D' => 'ddd', + 'j' => true, + 'l' => 'dddd', + 'N' => true, + 'S' => function ($date) { + $day = $date->rawFormat('j'); + + return str_replace((string) $day, '', $date->isoFormat('Do')); + }, + 'w' => true, + 'z' => true, + 'W' => true, + 'F' => 'MMMM', + 'm' => true, + 'M' => 'MMM', + 'n' => true, + 't' => true, + 'L' => true, + 'o' => true, + 'Y' => true, + 'y' => true, + 'a' => 'a', + 'A' => 'A', + 'B' => true, + 'g' => true, + 'G' => true, + 'h' => true, + 'H' => true, + 'i' => true, + 's' => true, + 'u' => true, + 'v' => true, + 'E' => true, + 'I' => true, + 'O' => true, + 'P' => true, + 'Z' => true, + 'c' => true, + 'r' => true, + 'U' => true, + ]; + } + + return $replacements; + } + + /** + * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) + * but translate words whenever possible (months, day names, etc.) using the current locale. + * + * @param string $format + * + * @return string + */ + public function translatedFormat(string $format): string + { + $replacements = static::getFormatsToIsoReplacements(); + $context = ''; + $isoFormat = ''; + $length = mb_strlen($format); + + for ($i = 0; $i < $length; $i++) { + $char = mb_substr($format, $i, 1); + + if ($char === '\\') { + $replacement = mb_substr($format, $i, 2); + $isoFormat .= $replacement; + $i++; + + continue; + } + + if (!isset($replacements[$char])) { + $replacement = preg_match('/^[A-Za-z]$/', $char) ? "\\$char" : $char; + $isoFormat .= $replacement; + $context .= $replacement; + + continue; + } + + $replacement = $replacements[$char]; + + if ($replacement === true) { + static $contextReplacements = null; + + if ($contextReplacements === null) { + $contextReplacements = [ + 'm' => 'MM', + 'd' => 'DD', + 't' => 'D', + 'j' => 'D', + 'N' => 'e', + 'w' => 'e', + 'n' => 'M', + 'o' => 'YYYY', + 'Y' => 'YYYY', + 'y' => 'YY', + 'g' => 'h', + 'G' => 'H', + 'h' => 'hh', + 'H' => 'HH', + 'i' => 'mm', + 's' => 'ss', + ]; + } + + $isoFormat .= '['.$this->rawFormat($char).']'; + $context .= $contextReplacements[$char] ?? ' '; + + continue; + } + + if ($replacement instanceof Closure) { + $replacement = '['.$replacement($this).']'; + $isoFormat .= $replacement; + $context .= $replacement; + + continue; + } + + $isoFormat .= $replacement; + $context .= $replacement; + } + + return $this->isoFormat($isoFormat, $context); + } + + /** + * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). + * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first + * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something + * like "-12:00". + * + * @param string $separator string to place between hours and minutes (":" by default) + * + * @return string + */ + public function getOffsetString($separator = ':') + { + $second = $this->getOffset(); + $symbol = $second < 0 ? '-' : '+'; + $minute = abs($second) / static::SECONDS_PER_MINUTE; + $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + + return "$symbol$hour$separator$minute"; + } + + protected static function executeStaticCallable($macro, ...$parameters) + { + return static::bindMacroContext(null, function () use (&$macro, &$parameters) { + if ($macro instanceof Closure) { + $boundMacro = @Closure::bind($macro, null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + }); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + if (!static::hasMacro($method)) { + foreach (static::getGenericMacros() as $callback) { + try { + return static::executeStaticCallable($callback, $method, ...$parameters); + } catch (BadMethodCallException $exception) { + continue; + } + } + if (static::isStrictModeEnabled()) { + throw new UnknownMethodException(sprintf('%s::%s', static::class, $method)); + } + + return null; + } + + return static::executeStaticCallable(static::$globalMacros[$method], ...$parameters); + } + + /** + * Set specified unit to new given value. + * + * @param string $unit year, month, day, hour, minute, second or microsecond + * @param int $value new value for given unit + * + * @return static + */ + public function setUnit($unit, $value = null) + { + $unit = static::singularUnit($unit); + $dateUnits = ['year', 'month', 'day']; + if (\in_array($unit, $dateUnits)) { + return $this->setDate(...array_map(function ($name) use ($unit, $value) { + return (int) ($name === $unit ? $value : $this->$name); + }, $dateUnits)); + } + + $units = ['hour', 'minute', 'second', 'micro']; + if ($unit === 'millisecond' || $unit === 'milli') { + $value *= 1000; + $unit = 'micro'; + } elseif ($unit === 'microsecond') { + $unit = 'micro'; + } + + return $this->setTime(...array_map(function ($name) use ($unit, $value) { + return (int) ($name === $unit ? $value : $this->$name); + }, $units)); + } + + /** + * Returns standardized singular of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function singularUnit(string $unit): string + { + $unit = rtrim(mb_strtolower($unit), 's'); + + if ($unit === 'centurie') { + return 'century'; + } + + if ($unit === 'millennia') { + return 'millennium'; + } + + return $unit; + } + + /** + * Returns standardized plural of a given singular/plural unit name (in English). + * + * @param string $unit + * + * @return string + */ + public static function pluralUnit(string $unit): string + { + $unit = rtrim(strtolower($unit), 's'); + + if ($unit === 'century') { + return 'centuries'; + } + + if ($unit === 'millennium' || $unit === 'millennia') { + return 'millennia'; + } + + return "{$unit}s"; + } + + protected function executeCallable($macro, ...$parameters) + { + if ($macro instanceof Closure) { + $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); + + return ($boundMacro ?: $macro)(...$parameters); + } + + return $macro(...$parameters); + } + + protected function executeCallableWithContext($macro, ...$parameters) + { + return static::bindMacroContext($this, function () use (&$macro, &$parameters) { + return $this->executeCallable($macro, ...$parameters); + }); + } + + protected static function getGenericMacros() + { + foreach (static::$globalGenericMacros as $list) { + foreach ($list as $macro) { + yield $macro; + } + } + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method magic method name called + * @param array $parameters parameters list + * + * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable + * + * @return mixed + */ + public function __call($method, $parameters) + { + $diffSizes = [ + // @mode diffForHumans + 'short' => true, + // @mode diffForHumans + 'long' => false, + ]; + $diffSyntaxModes = [ + // @call diffForHumans + 'Absolute' => CarbonInterface::DIFF_ABSOLUTE, + // @call diffForHumans + 'Relative' => CarbonInterface::DIFF_RELATIVE_AUTO, + // @call diffForHumans + 'RelativeToNow' => CarbonInterface::DIFF_RELATIVE_TO_NOW, + // @call diffForHumans + 'RelativeToOther' => CarbonInterface::DIFF_RELATIVE_TO_OTHER, + ]; + $sizePattern = implode('|', array_keys($diffSizes)); + $syntaxPattern = implode('|', array_keys($diffSyntaxModes)); + + if (preg_match("/^(?$sizePattern)(?$syntaxPattern)DiffForHumans$/", $method, $match)) { + $dates = array_filter($parameters, function ($parameter) { + return $parameter instanceof DateTimeInterface; + }); + $other = null; + + if (\count($dates)) { + $key = key($dates); + $other = current($dates); + array_splice($parameters, $key, 1); + } + + return $this->diffForHumans($other, $diffSyntaxModes[$match['syntax']], $diffSizes[$match['size']], ...$parameters); + } + + $roundedValue = $this->callRoundMethod($method, $parameters); + + if ($roundedValue !== null) { + return $roundedValue; + } + + $unit = rtrim($method, 's'); + + if (str_starts_with($unit, 'is')) { + $word = substr($unit, 2); + + if (\in_array($word, static::$days, true)) { + return $this->isDayOfWeek($word); + } + + switch ($word) { + // @call is Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + case 'Utc': + case 'UTC': + return $this->utc; + // @call is Check if the current instance has non-UTC timezone. + case 'Local': + return $this->local; + // @call is Check if the current instance is a valid date. + case 'Valid': + return $this->year !== 0; + // @call is Check if the current instance is in a daylight saving time. + case 'DST': + return $this->dst; + } + } + + $action = substr($unit, 0, 3); + $overflow = null; + + if ($action === 'set') { + $unit = strtolower(substr($unit, 3)); + } + + if (\in_array($unit, static::$units, true)) { + return $this->setUnit($unit, ...$parameters); + } + + if ($action === 'add' || $action === 'sub') { + $unit = substr($unit, 3); + + if (str_starts_with($unit, 'Real')) { + $unit = static::singularUnit(substr($unit, 4)); + + return $this->{"{$action}RealUnit"}($unit, ...$parameters); + } + + if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { + $unit = $match[1]; + $overflow = $match[2] === 'With'; + } + + $unit = static::singularUnit($unit); + } + + if (static::isModifiableUnit($unit)) { + return $this->{"{$action}Unit"}($unit, $parameters[0] ?? 1, $overflow); + } + + $sixFirstLetters = substr($unit, 0, 6); + $factor = -1; + + if ($sixFirstLetters === 'isLast') { + $sixFirstLetters = 'isNext'; + $factor = 1; + } + + if ($sixFirstLetters === 'isNext') { + $lowerUnit = strtolower(substr($unit, 6)); + + if (static::isModifiableUnit($lowerUnit)) { + return $this->copy()->addUnit($lowerUnit, $factor, false)->isSameUnit($lowerUnit, ...$parameters); + } + } + + if ($sixFirstLetters === 'isSame') { + try { + return $this->isSameUnit(strtolower(substr($unit, 6)), ...$parameters); + } catch (BadComparisonUnitException $exception) { + // Try next + } + } + + if (str_starts_with($unit, 'isCurrent')) { + try { + return $this->isCurrentUnit(strtolower(substr($unit, 9))); + } catch (BadComparisonUnitException | BadMethodCallException $exception) { + // Try next + } + } + + if (str_ends_with($method, 'Until')) { + try { + $unit = static::singularUnit(substr($method, 0, -5)); + + return $this->range($parameters[0] ?? $this, $parameters[1] ?? 1, $unit); + } catch (InvalidArgumentException $exception) { + // Try macros + } + } + + return static::bindMacroContext($this, function () use (&$method, &$parameters) { + $macro = $this->getLocalMacro($method); + + if (!$macro) { + foreach ([$this->localGenericMacros ?: [], static::getGenericMacros()] as $list) { + foreach ($list as $callback) { + try { + return $this->executeCallable($callback, $method, ...$parameters); + } catch (BadMethodCallException $exception) { + continue; + } + } + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnknownMethodException($method); + } + + return null; + } + + return $this->executeCallable($macro, ...$parameters); + }); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php new file mode 100644 index 00000000000..5acc6f5c7ef --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +trait DeprecatedProperties +{ + /** + * the day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMM') instead. + * Deprecated since 2.55.0 + */ + public $localeDayOfWeek; + + /** + * the abbreviated day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('dddd') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleDayOfWeek; + + /** + * the month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('ddd') instead. + * Deprecated since 2.55.0 + */ + public $localeMonth; + + /** + * the abbreviated month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMMM') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleMonth; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php new file mode 100644 index 00000000000..e7045dc85b6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php @@ -0,0 +1,1169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; +use Carbon\CarbonInterval; +use Carbon\CarbonPeriod; +use Carbon\Translator; +use Closure; +use DateInterval; +use DateTimeInterface; +use ReturnTypeWillChange; + +/** + * Trait Difference. + * + * Depends on the following methods: + * + * @method bool lessThan($date) + * @method static copy() + * @method static resolveCarbon($date = null) + * @method static Translator translator() + */ +trait Difference +{ + /** + * @codeCoverageIgnore + * + * @param CarbonInterval $diff + */ + protected static function fixNegativeMicroseconds(CarbonInterval $diff) + { + if ($diff->s !== 0 || $diff->i !== 0 || $diff->h !== 0 || $diff->d !== 0 || $diff->m !== 0 || $diff->y !== 0) { + $diff->f = (round($diff->f * 1000000) + 1000000) / 1000000; + $diff->s--; + + if ($diff->s < 0) { + $diff->s += 60; + $diff->i--; + + if ($diff->i < 0) { + $diff->i += 60; + $diff->h--; + + if ($diff->h < 0) { + $diff->h += 24; + $diff->d--; + + if ($diff->d < 0) { + $diff->d += 30; + $diff->m--; + + if ($diff->m < 0) { + $diff->m += 12; + $diff->y--; + } + } + } + } + } + + return; + } + + $diff->f *= -1; + $diff->invert(); + } + + /** + * @param DateInterval $diff + * @param bool $absolute + * + * @return CarbonInterval + */ + protected static function fixDiffInterval(DateInterval $diff, $absolute) + { + $diff = CarbonInterval::instance($diff); + + // Work-around for https://bugs.php.net/bug.php?id=77145 + // @codeCoverageIgnoreStart + if ($diff->f > 0 && $diff->y === -1 && $diff->m === 11 && $diff->d >= 27 && $diff->h === 23 && $diff->i === 59 && $diff->s === 59) { + $diff->y = 0; + $diff->m = 0; + $diff->d = 0; + $diff->h = 0; + $diff->i = 0; + $diff->s = 0; + $diff->f = (1000000 - round($diff->f * 1000000)) / 1000000; + $diff->invert(); + } elseif ($diff->f < 0) { + static::fixNegativeMicroseconds($diff); + } + // @codeCoverageIgnoreEnd + + if ($absolute && $diff->invert) { + $diff->invert(); + } + + return $diff; + } + + /** + * Get the difference as a DateInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return DateInterval + */ + #[ReturnTypeWillChange] + public function diff($date = null, $absolute = false) + { + $other = $this->resolveCarbon($date); + + // Work-around for https://bugs.php.net/bug.php?id=81458 + // It was initially introduced for https://bugs.php.net/bug.php?id=80998 + // The very specific case of 80998 was fixed in PHP 8.1beta3, but it introduced 81458 + // So we still need to keep this for now + // @codeCoverageIgnoreStart + if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && $other->tz !== $this->tz) { + $other = $other->avoidMutation()->tz($this->tz); + } + // @codeCoverageIgnoreEnd + + return parent::diff($other, (bool) $absolute); + } + + /** + * Get the difference as a CarbonInterval instance. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true) + { + return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute); + } + + /** + * Get the difference in years + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInYears($date = null, $absolute = true) + { + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); + } + + /** + * Get the difference in quarters rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInQuarters($date = null, $absolute = true) + { + return (int) ($this->diffInMonths($date, $absolute) / static::MONTHS_PER_QUARTER); + } + + /** + * Get the difference in months rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMonths($date = null, $absolute = true) + { + $date = $this->resolveCarbon($date); + + return $this->diffInYears($date, $absolute) * static::MONTHS_PER_YEAR + (int) $this->diff($date, $absolute)->format('%r%m'); + } + + /** + * Get the difference in weeks rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeeks($date = null, $absolute = true) + { + return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); + } + + /** + * Get the difference in days rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDays($date = null, $absolute = true) + { + return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); + } + + /** + * Get the difference in days using a filter closure rounded down. + * + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) + { + return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); + } + + /** + * Get the difference in hours using a filter closure rounded down. + * + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) + { + return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); + } + + /** + * Get the difference by the given interval using a filter closure. + * + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $inverse = false; + + if ($end < $start) { + $start = $end; + $end = $this; + $inverse = true; + } + + $options = CarbonPeriod::EXCLUDE_END_DATE | ($this->isMutable() ? 0 : CarbonPeriod::IMMUTABLE); + $diff = $ci->toPeriod($start, $end, $options)->filter($callback)->count(); + + return $inverse && !$absolute ? -$diff : $diff; + } + + /** + * Get the difference in weekdays rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekdays($date = null, $absolute = true) + { + return $this->diffInDaysFiltered(function (CarbonInterface $date) { + return $date->isWeekday(); + }, $date, $absolute); + } + + /** + * Get the difference in weekend days using a filter rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInWeekendDays($date = null, $absolute = true) + { + return $this->diffInDaysFiltered(function (CarbonInterface $date) { + return $date->isWeekend(); + }, $date, $absolute); + } + + /** + * Get the difference in hours rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHours($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in hours rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealHours($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in minutes rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in minutes rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in seconds rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds($date = null, $absolute = true) + { + $diff = $this->diff($date); + + if ($diff->days === 0) { + $diff = static::fixDiffInterval($diff, $absolute); + } + + $value = (((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + + $diff->h) * static::MINUTES_PER_HOUR + + $diff->i) * static::SECONDS_PER_MINUTE + + $diff->s; + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in microseconds. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMicroseconds($date = null, $absolute = true) + { + $diff = $this->diff($date); + $value = (int) round(((((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + + $diff->h) * static::MINUTES_PER_HOUR + + $diff->i) * static::SECONDS_PER_MINUTE + + ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND); + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in milliseconds rounded down. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in seconds using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealSeconds($date = null, $absolute = true) + { + /** @var CarbonInterface $date */ + $date = $this->resolveCarbon($date); + $value = $date->getTimestamp() - $this->getTimestamp(); + + return $absolute ? abs($value) : $value; + } + + /** + * Get the difference in microseconds using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMicroseconds($date = null, $absolute = true) + { + /** @var CarbonInterface $date */ + $date = $this->resolveCarbon($date); + $value = ($date->timestamp - $this->timestamp) * static::MICROSECONDS_PER_SECOND + + $date->micro - $this->micro; + + return $absolute ? abs($value) : $value; + } + + /** + * Get the difference in milliseconds rounded down using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in seconds as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInSeconds($date = null, $absolute = true) + { + return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); + } + + /** + * Get the difference in minutes as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMinutes($date = null, $absolute = true) + { + return $this->floatDiffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; + } + + /** + * Get the difference in hours as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInHours($date = null, $absolute = true) + { + return $this->floatDiffInMinutes($date, $absolute) / static::MINUTES_PER_HOUR; + } + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInDays($date = null, $absolute = true) + { + $hoursDiff = $this->floatDiffInHours($date, $absolute); + $interval = $this->diff($date, $absolute); + + if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0) { + return $hoursDiff / static::HOURS_PER_DAY; + } + + $daysDiff = $this->getIntervalDayDiff($interval); + + return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; + } + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInWeeks($date = null, $absolute = true) + { + return $this->floatDiffInDays($date, $absolute) / static::DAYS_PER_WEEK; + } + + /** + * Get the difference in months as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInMonths($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $monthsDiff = $start->diffInMonths($end); + /** @var Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); + + if ($floorEnd >= $end) { + return $sign * $monthsDiff; + } + + /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ + $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); + + if ($startOfMonthAfterFloorEnd > $end) { + return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInMonth); + } + + return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInDays($end) / $end->daysInMonth); + } + + /** + * Get the difference in year as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInYears($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $yearsDiff = $start->diffInYears($end); + /** @var Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addYears($yearsDiff); + + if ($floorEnd >= $end) { + return $sign * $yearsDiff; + } + + /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ + $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); + + if ($startOfYearAfterFloorEnd > $end) { + return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInYear); + } + + return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInDays($end) / $end->daysInYear); + } + + /** + * Get the difference in seconds as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealSeconds($date = null, $absolute = true) + { + return $this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; + } + + /** + * Get the difference in minutes as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMinutes($date = null, $absolute = true) + { + return $this->floatDiffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; + } + + /** + * Get the difference in hours as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealHours($date = null, $absolute = true) + { + return $this->floatDiffInRealMinutes($date, $absolute) / static::MINUTES_PER_HOUR; + } + + /** + * Get the difference in days as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealDays($date = null, $absolute = true) + { + $date = $this->resolveUTC($date); + $utc = $this->avoidMutation()->utc(); + $hoursDiff = $utc->floatDiffInRealHours($date, $absolute); + + return ($hoursDiff < 0 ? -1 : 1) * $utc->diffInDays($date) + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; + } + + /** + * Get the difference in weeks as float (microsecond-precision). + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealWeeks($date = null, $absolute = true) + { + return $this->floatDiffInRealDays($date, $absolute) / static::DAYS_PER_WEEK; + } + + /** + * Get the difference in months as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealMonths($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $monthsDiff = $start->diffInMonths($end); + /** @var Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); + + if ($floorEnd >= $end) { + return $sign * $monthsDiff; + } + + /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ + $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); + + if ($startOfMonthAfterFloorEnd > $end) { + return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInMonth); + } + + return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInMonth); + } + + /** + * Get the difference in year as float (microsecond-precision) using timestamps. + * + * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return float + */ + public function floatDiffInRealYears($date = null, $absolute = true) + { + $start = $this; + $end = $this->resolveCarbon($date); + $ascending = ($start <= $end); + $sign = $absolute || $ascending ? 1 : -1; + if (!$ascending) { + [$start, $end] = [$end, $start]; + } + $yearsDiff = $start->diffInYears($end); + /** @var Carbon|CarbonImmutable $floorEnd */ + $floorEnd = $start->avoidMutation()->addYears($yearsDiff); + + if ($floorEnd >= $end) { + return $sign * $yearsDiff; + } + + /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ + $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); + + if ($startOfYearAfterFloorEnd > $end) { + return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInYear); + } + + return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInYear); + } + + /** + * The number of seconds since midnight. + * + * @return int + */ + public function secondsSinceMidnight() + { + return $this->diffInSeconds($this->avoidMutation()->startOfDay()); + } + + /** + * The number of seconds until 23:59:59. + * + * @return int + */ + public function secondsUntilEndOfDay() + { + return $this->diffInSeconds($this->avoidMutation()->endOfDay()); + } + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @example + * ``` + * echo Carbon::tomorrow()->diffForHumans() . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; + * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; + * ``` + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, µs). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + /* @var CarbonInterface $this */ + if (\is_array($other)) { + $other['syntax'] = \array_key_exists('syntax', $other) ? $other['syntax'] : $syntax; + $syntax = $other; + $other = $syntax['other'] ?? null; + } + + $intSyntax = &$syntax; + if (\is_array($syntax)) { + $syntax['syntax'] = $syntax['syntax'] ?? null; + $intSyntax = &$syntax['syntax']; + } + $intSyntax = (int) ($intSyntax ?? static::DIFF_RELATIVE_AUTO); + $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; + + $parts = min(7, max(1, (int) $parts)); + + return $this->diffAsCarbonInterval($other, false) + ->setLocalTranslator($this->getLocalTranslator()) + ->forHumans($syntax, (bool) $short, $parts, $options ?? $this->localHumanDiffOptions ?? static::getHumanDiffOptions()); + } + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->diffForHumans($other, $syntax, $short, $parts, $options); + } + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + */ + public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->diffForHumans($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * When comparing a value in the past to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the future to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the past to another value: + * 1 hour after + * 5 months after + * + * When comparing a value in the future to another value: + * 1 hour before + * 5 months before + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + if (!$syntax && !$other) { + $syntax = CarbonInterface::DIFF_RELATIVE_TO_NOW; + } + + return $this->resolveCarbon($other)->diffForHumans($this, $syntax, $short, $parts, $options); + } + + /** + * @alias to + * + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; + * if null passed, now will be used as comparison reference; + * if any other type, it will be converted to date and used as reference. + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * - 'other' entry (see above) + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->to($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from current + * instance to now. + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single unit) + * @param int $options human diff options + * + * @return string + */ + public function fromNow($syntax = null, $short = false, $parts = 1, $options = null) + { + $other = null; + + if ($syntax instanceof DateTimeInterface) { + [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); + } + + return $this->from($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function toNow($syntax = null, $short = false, $parts = 1, $options = null) + { + return $this->to(null, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: + * - 'syntax' entry (see below) + * - 'short' entry (see below) + * - 'parts' entry (see below) + * - 'options' entry (see below) + * - 'join' entry determines how to join multiple parts of the string + * ` - if $join is a string, it's used as a joiner glue + * ` - if $join is a callable/closure, it get the list of string and should return a string + * ` - if $join is an array, the first item will be the default glue, and the second item + * ` will be used instead of the glue for the last item + * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) + * ` - if $join is missing, a space will be used as glue + * if int passed, it add modifiers: + * Possible values: + * - CarbonInterface::DIFF_ABSOLUTE no modifiers + * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier + * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier + * Default value: CarbonInterface::DIFF_ABSOLUTE + * @param bool $short displays short format of time units + * @param int $parts maximum number of parts to display (default value: 1: single part) + * @param int $options human diff options + * + * @return string + */ + public function ago($syntax = null, $short = false, $parts = 1, $options = null) + { + $other = null; + + if ($syntax instanceof DateTimeInterface) { + [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); + } + + return $this->from($other, $syntax, $short, $parts, $options); + } + + /** + * Get the difference in a human readable format in the current locale from current instance to an other + * instance given (or now if null given). + * + * @return string + */ + public function timespan($other = null, $timezone = null) + { + if (!$other instanceof DateTimeInterface) { + $other = static::parse($other, $timezone); + } + + return $this->diffForHumans($other, [ + 'join' => ', ', + 'syntax' => CarbonInterface::DIFF_ABSOLUTE, + 'options' => CarbonInterface::NO_ZERO_DIFF, + 'parts' => -1, + ]); + } + + /** + * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, + * or a calendar date (e.g. "10/29/2017") otherwise. + * + * Language, date and time formats will change according to the current locale. + * + * @param Carbon|\DateTimeInterface|string|null $referenceTime + * @param array $formats + * + * @return string + */ + public function calendar($referenceTime = null, array $formats = []) + { + /** @var CarbonInterface $current */ + $current = $this->avoidMutation()->startOfDay(); + /** @var CarbonInterface $other */ + $other = $this->resolveCarbon($referenceTime)->avoidMutation()->setTimezone($this->getTimezone())->startOfDay(); + $diff = $other->diffInDays($current, false); + $format = $diff < -6 ? 'sameElse' : ( + $diff < -1 ? 'lastWeek' : ( + $diff < 0 ? 'lastDay' : ( + $diff < 1 ? 'sameDay' : ( + $diff < 2 ? 'nextDay' : ( + $diff < 7 ? 'nextWeek' : 'sameElse' + ) + ) + ) + ) + ); + $format = array_merge($this->getCalendarFormats(), $formats)[$format]; + if ($format instanceof Closure) { + $format = $format($current, $other) ?? ''; + } + + return $this->isoFormat((string) $format); + } + + private function getIntervalDayDiff(DateInterval $interval): int + { + $daysDiff = (int) $interval->format('%a'); + $sign = $interval->format('%r') === '-' ? -1 : 1; + + if (\is_int($interval->days) && + $interval->y === 0 && + $interval->m === 0 && + version_compare(PHP_VERSION, '8.1.0-dev', '<') && + abs($interval->d - $daysDiff) === 1 + ) { + $daysDiff = abs($interval->d); // @codeCoverageIgnore + } + + return $daysDiff * $sign; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php new file mode 100644 index 00000000000..4cd66b676f1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterval; +use Carbon\Exceptions\InvalidIntervalException; +use DateInterval; + +/** + * Trait to call rounding methods to interval or the interval of a period. + */ +trait IntervalRounding +{ + protected function callRoundMethod(string $method, array $parameters) + { + $action = substr($method, 0, 4); + + if ($action !== 'ceil') { + $action = substr($method, 0, 5); + } + + if (\in_array($action, ['round', 'floor', 'ceil'])) { + return $this->{$action.'Unit'}(substr($method, \strlen($action)), ...$parameters); + } + + return null; + } + + protected function roundWith($precision, $function) + { + $unit = 'second'; + + if ($precision instanceof DateInterval) { + $precision = (string) CarbonInterval::instance($precision); + } + + if (\is_string($precision) && preg_match('/^\s*(?\d+)?\s*(?\w+)(?\W.*)?$/', $precision, $match)) { + if (trim($match['other'] ?? '') !== '') { + throw new InvalidIntervalException('Rounding is only possible with single unit intervals.'); + } + + $precision = (int) ($match['precision'] ?: 1); + $unit = $match['unit']; + } + + return $this->roundUnit($unit, $precision, $function); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php new file mode 100644 index 00000000000..82d7c32649b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; +use Closure; +use DateTimeImmutable; +use DateTimeInterface; + +trait IntervalStep +{ + /** + * Step to apply instead of a fixed interval to get the new date. + * + * @var Closure|null + */ + protected $step; + + /** + * Get the dynamic step in use. + * + * @return Closure + */ + public function getStep(): ?Closure + { + return $this->step; + } + + /** + * Set a step to apply instead of a fixed interval to get the new date. + * + * Or pass null to switch to fixed interval. + * + * @param Closure|null $step + */ + public function setStep(?Closure $step): void + { + $this->step = $step; + } + + /** + * Take a date and apply either the step if set, or the current interval else. + * + * The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true. + * + * @param DateTimeInterface $dateTime + * @param bool $negated + * + * @return CarbonInterface + */ + public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface + { + /** @var CarbonInterface $carbonDate */ + $carbonDate = $dateTime instanceof CarbonInterface ? $dateTime : $this->resolveCarbon($dateTime); + + if ($this->step) { + return $carbonDate->setDateTimeFrom(($this->step)($carbonDate->avoidMutation(), $negated)); + } + + if ($negated) { + return $carbonDate->rawSub($this); + } + + return $carbonDate->rawAdd($this); + } + + /** + * Convert DateTimeImmutable instance to CarbonImmutable instance and DateTime instance to Carbon instance. + * + * @param DateTimeInterface $dateTime + * + * @return Carbon|CarbonImmutable + */ + private function resolveCarbon(DateTimeInterface $dateTime) + { + if ($dateTime instanceof DateTimeImmutable) { + return CarbonImmutable::instance($dateTime); + } + + return Carbon::instance($dateTime); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php new file mode 100644 index 00000000000..bd641743255 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php @@ -0,0 +1,824 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterface; +use Carbon\Exceptions\InvalidTypeException; +use Carbon\Exceptions\NotLocaleAwareException; +use Carbon\Language; +use Carbon\Translator; +use Carbon\TranslatorStrongTypeInterface; +use Closure; +use Symfony\Component\Translation\TranslatorBagInterface; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\LocaleAwareInterface; +use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; + +if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && + !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') +) { + class_alias( + 'Symfony\\Contracts\\Translation\\TranslatorInterface', + 'Symfony\\Component\\Translation\\TranslatorInterface' + ); +} + +/** + * Trait Localization. + * + * Embed default and locale translators and translation base methods. + */ +trait Localization +{ + /** + * Default translator. + * + * @var \Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * Specific translator of the current instance. + * + * @var \Symfony\Component\Translation\TranslatorInterface + */ + protected $localTranslator; + + /** + * Options for diffForHumans(). + * + * @var int + */ + protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions) + { + static::$humanDiffOptions = $humanDiffOptions; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; + } + + /** + * Return default humanDiff() options (merged flags as integer). + * + * @return int + */ + public static function getHumanDiffOptions() + { + return static::$humanDiffOptions; + } + + /** + * Get the default translator instance in use. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator() + { + return static::translator(); + } + + /** + * Set the default translator instance to use. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void + */ + public static function setTranslator(TranslatorInterface $translator) + { + static::$translator = $translator; + } + + /** + * Return true if the current instance has its own translator. + * + * @return bool + */ + public function hasLocalTranslator() + { + return isset($this->localTranslator); + } + + /** + * Get the translator of the current instance or the default if none set. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public function getLocalTranslator() + { + return $this->localTranslator ?: static::translator(); + } + + /** + * Set the translator for the current instance. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return $this + */ + public function setLocalTranslator(TranslatorInterface $translator) + { + $this->localTranslator = $translator; + + return $this; + } + + /** + * Returns raw translation message for a given key. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * + * @return string + */ + public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) + { + if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { + throw new InvalidTypeException( + 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. + (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' + ); + } + + if (!$locale && $translator instanceof LocaleAwareInterface) { + $locale = $translator->getLocale(); + } + + $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); + + return $result === $key ? $default : $result; + } + + /** + * Returns raw translation message for a given key. + * + * @param string $key key to find + * @param string|null $locale current locale used if null + * @param string|null $default default value if translation returns the key + * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use + * + * @return string + */ + public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) + { + return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); + } + + /** + * Translate using translation string or callback available. + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param null $number + * + * @return string + */ + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string + { + $message = static::getTranslationMessageWith($translator, $key, null, $key); + if ($message instanceof Closure) { + return (string) $message(...array_values($parameters)); + } + + if ($number !== null) { + $parameters['%count%'] = $number; + } + if (isset($parameters['%count%'])) { + $parameters[':count'] = $parameters['%count%']; + } + + // @codeCoverageIgnoreStart + $choice = $translator instanceof ContractsTranslatorInterface + ? $translator->trans($key, $parameters) + : $translator->transChoice($key, $number, $parameters); + // @codeCoverageIgnoreEnd + + return (string) $choice; + } + + /** + * Translate using translation string or callback available. + * + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers + * + * @return string + */ + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string + { + $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); + + if ($number !== null && $altNumbers) { + return str_replace($number, $this->translateNumber($number), $translation); + } + + return $translation; + } + + /** + * Returns the alternative number for a given integer if available in the current locale. + * + * @param int $number + * + * @return string + */ + public function translateNumber(int $number): string + { + $translateKey = "alt_numbers.$number"; + $symbol = $this->translate($translateKey); + + if ($symbol !== $translateKey) { + return $symbol; + } + + if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { + $start = ''; + foreach ([10000, 1000, 100] as $exp) { + $key = "alt_numbers_pow.$exp"; + if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { + $unit = floor($number / $exp); + $number -= $unit * $exp; + $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; + } + } + $result = ''; + while ($number) { + $chunk = $number % 100; + $result = $this->translate("alt_numbers.$chunk").$result; + $number = floor($number / 100); + } + + return "$start$result"; + } + + if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { + $result = ''; + while ($number) { + $chunk = $number % 10; + $result = $this->translate("alt_numbers.$chunk").$result; + $number = floor($number / 10); + } + + return $result; + } + + return (string) $number; + } + + /** + * Translate a time string from a locale to an other. + * + * @param string $timeString date/time/duration string to translate (may also contain English) + * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) + * @param string|null $to output locale of the result returned (`"en"` by default) + * @param int $mode specify what to translate with options: + * - CarbonInterface::TRANSLATE_ALL (default) + * - CarbonInterface::TRANSLATE_MONTHS + * - CarbonInterface::TRANSLATE_DAYS + * - CarbonInterface::TRANSLATE_UNITS + * - CarbonInterface::TRANSLATE_MERIDIEM + * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS + * + * @return string + */ + public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) + { + // Fallback source and destination locales + $from = $from ?: static::getLocale(); + $to = $to ?: 'en'; + + if ($from === $to) { + return $timeString; + } + + // Standardize apostrophe + $timeString = strtr($timeString, ['’' => "'"]); + + $fromTranslations = []; + $toTranslations = []; + + foreach (['from', 'to'] as $key) { + $language = $$key; + $translator = Translator::get($language); + $translations = $translator->getMessages(); + + if (!isset($translations[$language])) { + return $timeString; + } + + $translationKey = $key.'Translations'; + $messages = $translations[$language]; + $months = $messages['months'] ?? []; + $weekdays = $messages['weekdays'] ?? []; + $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; + + if ($key === 'from') { + foreach (['months', 'weekdays'] as $variable) { + $list = $messages[$variable.'_standalone'] ?? null; + + if ($list) { + foreach ($$variable as $index => &$name) { + $name .= '|'.$messages[$variable.'_standalone'][$index]; + } + } + } + } + + $$translationKey = array_merge( + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], + $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ + 'diff_now', + 'diff_today', + 'diff_yesterday', + 'diff_tomorrow', + 'diff_before_yesterday', + 'diff_after_tomorrow', + ], $messages, $key) : [], + $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ + 'year', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + ], $messages, $key) : [], + $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { + if (\is_array($meridiem)) { + return $meridiem[$hour < 12 ? 0 : 1]; + } + + return $meridiem($hour, 0, false); + }, range(0, 23)) : [] + ); + } + + return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { + [$chunk] = $match; + + foreach ($fromTranslations as $index => $word) { + if (preg_match("/^$word\$/iu", $chunk)) { + return $toTranslations[$index] ?? ''; + } + } + + return $chunk; // @codeCoverageIgnore + }, " $timeString "), 1, -1); + } + + /** + * Translate a time string from the current locale (`$date->locale()`) to an other. + * + * @param string $timeString time string to translate + * @param string|null $to output locale of the result returned ("en" by default) + * + * @return string + */ + public function translateTimeStringTo($timeString, $to = null) + { + return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); + } + + /** + * Get/set the locale for the current instance. + * + * @param string|null $locale + * @param string ...$fallbackLocales + * + * @return $this|string + */ + public function locale(string $locale = null, ...$fallbackLocales) + { + if ($locale === null) { + return $this->getTranslatorLocale(); + } + + if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { + $translator = Translator::get($locale); + + if (!empty($fallbackLocales)) { + $translator->setFallbackLocales($fallbackLocales); + + foreach ($fallbackLocales as $fallbackLocale) { + $messages = Translator::get($fallbackLocale)->getMessages(); + + if (isset($messages[$fallbackLocale])) { + $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); + } + } + } + + $this->localTranslator = $translator; + } + + return $this; + } + + /** + * Get the current translator locale. + * + * @return string + */ + public static function getLocale() + { + return static::getLocaleAwareTranslator()->getLocale(); + } + + /** + * Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function setLocale($locale) + { + return static::getLocaleAwareTranslator()->setLocale($locale) !== false; + } + + /** + * Set the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @param string $locale + */ + public static function setFallbackLocale($locale) + { + $translator = static::getTranslator(); + + if (method_exists($translator, 'setFallbackLocales')) { + $translator->setFallbackLocales([$locale]); + + if ($translator instanceof Translator) { + $preferredLocale = $translator->getLocale(); + $translator->setMessages($preferredLocale, array_replace_recursive( + $translator->getMessages()[$locale] ?? [], + Translator::get($locale)->getMessages()[$locale] ?? [], + $translator->getMessages($preferredLocale) + )); + } + } + } + + /** + * Get the fallback locale. + * + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales + * + * @return string|null + */ + public static function getFallbackLocale() + { + $translator = static::getTranslator(); + + if (method_exists($translator, 'getFallbackLocales')) { + return $translator->getFallbackLocales()[0] ?? null; + } + + return null; + } + + /** + * Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * + * @param string $locale locale ex. en + * @param callable $func + * + * @return mixed + */ + public static function executeWithLocale($locale, $func) + { + $currentLocale = static::getLocale(); + $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); + static::setLocale($currentLocale); + + return $result; + } + + /** + * Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasShortUnits($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( + ($y = static::translateWith($translator, 'd')) !== 'd' && + $y !== static::translateWith($translator, 'day') + ) || ( + ($y = static::translateWith($translator, 'h')) !== 'h' && + $y !== static::translateWith($translator, 'hour') + ); + }); + } + + /** + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + if (!$newLocale) { + return false; + } + + foreach (['ago', 'from_now', 'before', 'after'] as $key) { + if ($translator instanceof TranslatorBagInterface && + self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure + ) { + continue; + } + + if ($translator->trans($key) === $key) { + return false; + } + } + + return true; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffOneDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_now') !== 'diff_now' && + $translator->trans('diff_yesterday') !== 'diff_yesterday' && + $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffTwoDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && + $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasPeriodSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('period_recurrences') !== 'period_recurrences' && + $translator->trans('period_interval') !== 'period_interval' && + $translator->trans('period_start_date') !== 'period_start_date' && + $translator->trans('period_end_date') !== 'period_end_date'; + }); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @return array + */ + public static function getAvailableLocales() + { + $translator = static::getLocaleAwareTranslator(); + + return $translator instanceof Translator + ? $translator->getAvailableLocales() + : [$translator->getLocale()]; + } + + /** + * Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * + * @return Language[] + */ + public static function getAvailableLocalesInfo() + { + $languages = []; + foreach (static::getAvailableLocales() as $id) { + $languages[$id] = new Language($id); + } + + return $languages; + } + + /** + * Initialize the default translator instance if necessary. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + protected static function translator() + { + if (static::$translator === null) { + static::$translator = Translator::get(); + } + + return static::$translator; + } + + /** + * Get the locale of a given translator. + * + * If null or omitted, current local translator is used. + * If no local translator is in use, current global translator is used. + * + * @param null $translator + * + * @return string|null + */ + protected function getTranslatorLocale($translator = null): ?string + { + if (\func_num_args() === 0) { + $translator = $this->getLocalTranslator(); + } + + $translator = static::getLocaleAwareTranslator($translator); + + return $translator ? $translator->getLocale() : null; + } + + /** + * Throw an error if passed object is not LocaleAwareInterface. + * + * @param LocaleAwareInterface|null $translator + * + * @return LocaleAwareInterface|null + */ + protected static function getLocaleAwareTranslator($translator = null) + { + if (\func_num_args() === 0) { + $translator = static::translator(); + } + + if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { + throw new NotLocaleAwareException($translator); // @codeCoverageIgnore + } + + return $translator; + } + + /** + * @param mixed $translator + * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue + * + * @return mixed + */ + private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') + { + return $translator instanceof TranslatorStrongTypeInterface + ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore + : $catalogue->get($id, $domain); + } + + /** + * Return the word cleaned from its translation codes. + * + * @param string $word + * + * @return string + */ + private static function cleanWordFromTranslationString($word) + { + $word = str_replace([':count', '%count', ':time'], '', $word); + $word = strtr($word, ['’' => "'"]); + $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); + + return trim($word); + } + + /** + * Translate a list of words. + * + * @param string[] $keys keys to translate. + * @param string[] $messages messages bag handling translations. + * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). + * + * @return string[] + */ + private static function translateWordsByKeys($keys, $messages, $key): array + { + return array_map(function ($wordKey) use ($messages, $key) { + $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) + ? $messages[$wordKey.'_regexp'] + : ($messages[$wordKey] ?? null); + + if (!$message) { + return '>>DO NOT REPLACE<<'; + } + + $parts = explode('|', $message); + + return $key === 'to' + ? self::cleanWordFromTranslationString(end($parts)) + : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; + }, $keys); + } + + /** + * Get an array of translations based on the current date. + * + * @param callable $translation + * @param int $length + * @param string $timeString + * + * @return string[] + */ + private static function getTranslationArray($translation, $length, $timeString): array + { + $filler = '>>DO NOT REPLACE<<'; + + if (\is_array($translation)) { + return array_pad($translation, $length, $filler); + } + + $list = []; + $date = static::now(); + + for ($i = 0; $i < $length; $i++) { + $list[] = $translation($date, $timeString, $i) ?? $filler; + } + + return $list; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php new file mode 100644 index 00000000000..92b6c9d866d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php @@ -0,0 +1,136 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +/** + * Trait Macros. + * + * Allows users to register macros within the Carbon class. + */ +trait Macro +{ + use Mixin; + + /** + * The registered macros. + * + * @var array + */ + protected static $globalMacros = []; + + /** + * The registered generic macros. + * + * @var array + */ + protected static $globalGenericMacros = []; + + /** + * Register a custom macro. + * + * @example + * ``` + * $userSettings = [ + * 'locale' => 'pt', + * 'timezone' => 'America/Sao_Paulo', + * ]; + * Carbon::macro('userFormat', function () use ($userSettings) { + * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); + * }); + * echo Carbon::yesterday()->hours(11)->userFormat(); + * ``` + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$globalMacros[$name] = $macro; + } + + /** + * Remove all macros and generic macros. + */ + public static function resetMacros() + { + static::$globalMacros = []; + static::$globalGenericMacros = []; + } + + /** + * Register a custom macro. + * + * @param object|callable $macro + * @param int $priority marco with higher priority is tried first + * + * @return void + */ + public static function genericMacro($macro, $priority = 0) + { + if (!isset(static::$globalGenericMacros[$priority])) { + static::$globalGenericMacros[$priority] = []; + krsort(static::$globalGenericMacros, SORT_NUMERIC); + } + + static::$globalGenericMacros[$priority][] = $macro; + } + + /** + * Checks if macro is registered globally. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$globalMacros[$name]); + } + + /** + * Get the raw callable macro registered globally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public static function getMacro($name) + { + return static::$globalMacros[$name] ?? null; + } + + /** + * Checks if macro is registered globally or locally. + * + * @param string $name + * + * @return bool + */ + public function hasLocalMacro($name) + { + return ($this->localMacros && isset($this->localMacros[$name])) || static::hasMacro($name); + } + + /** + * Get the raw callable macro registered globally or locally for a given name. + * + * @param string $name + * + * @return callable|null + */ + public function getLocalMacro($name) + { + return ($this->localMacros ?? [])[$name] ?? static::getMacro($name); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php new file mode 100644 index 00000000000..88b251df480 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php @@ -0,0 +1,191 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Closure; +use Generator; +use ReflectionClass; +use ReflectionException; +use ReflectionMethod; +use Throwable; + +/** + * Trait Mixin. + * + * Allows mixing in entire classes with multiple macros. + */ +trait Mixin +{ + /** + * Stack of macro instance contexts. + * + * @var array + */ + protected static $macroContextStack = []; + + /** + * Mix another object into the class. + * + * @example + * ``` + * Carbon::mixin(new class { + * public function addMoon() { + * return function () { + * return $this->addDays(30); + * }; + * } + * public function subMoon() { + * return function () { + * return $this->subDays(30); + * }; + * } + * }); + * $fullMoon = Carbon::create('2018-12-22'); + * $nextFullMoon = $fullMoon->addMoon(); + * $blackMoon = Carbon::create('2019-01-06'); + * $previousBlackMoon = $blackMoon->subMoon(); + * echo "$nextFullMoon\n"; + * echo "$previousBlackMoon\n"; + * ``` + * + * @param object|string $mixin + * + * @throws ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + \is_string($mixin) && trait_exists($mixin) + ? self::loadMixinTrait($mixin) + : self::loadMixinClass($mixin); + } + + /** + * @param object|string $mixin + * + * @throws ReflectionException + */ + private static function loadMixinClass($mixin) + { + $methods = (new ReflectionClass($mixin))->getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + if ($method->isConstructor() || $method->isDestructor()) { + continue; + } + + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + + /** + * @param string $trait + */ + private static function loadMixinTrait($trait) + { + $context = eval(self::getAnonymousClassCodeForTrait($trait)); + $className = \get_class($context); + + foreach (self::getMixableMethods($context) as $name) { + $closureBase = Closure::fromCallable([$context, $name]); + + static::macro($name, function () use ($closureBase, $className) { + /** @phpstan-ignore-next-line */ + $context = isset($this) ? $this->cast($className) : new $className(); + + try { + // @ is required to handle error if not converted into exceptions + $closure = @$closureBase->bindTo($context); + } catch (Throwable $throwable) { // @codeCoverageIgnore + $closure = $closureBase; // @codeCoverageIgnore + } + + // in case of errors not converted into exceptions + $closure = $closure ?: $closureBase; + + return $closure(...\func_get_args()); + }); + } + } + + private static function getAnonymousClassCodeForTrait(string $trait) + { + return 'return new class() extends '.static::class.' {use '.$trait.';};'; + } + + private static function getMixableMethods(self $context): Generator + { + foreach (get_class_methods($context) as $name) { + if (method_exists(static::class, $name)) { + continue; + } + + yield $name; + } + } + + /** + * Stack a Carbon context from inside calls of self::this() and execute a given action. + * + * @param static|null $context + * @param callable $callable + * + * @throws Throwable + * + * @return mixed + */ + protected static function bindMacroContext($context, callable $callable) + { + static::$macroContextStack[] = $context; + $exception = null; + $result = null; + + try { + $result = $callable(); + } catch (Throwable $throwable) { + $exception = $throwable; + } + + array_pop(static::$macroContextStack); + + if ($exception) { + throw $exception; + } + + return $result; + } + + /** + * Return the current context from inside a macro callee or a null if static. + * + * @return static|null + */ + protected static function context() + { + return end(static::$macroContextStack) ?: null; + } + + /** + * Return the current context from inside a macro callee or a new one if static. + * + * @return static + */ + protected static function this() + { + return end(static::$macroContextStack) ?: new static(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php new file mode 100644 index 00000000000..164dbbd105d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php @@ -0,0 +1,472 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterface; +use ReturnTypeWillChange; + +/** + * Trait Modifiers. + * + * Returns dates relative to current date using modifier short-hand. + */ +trait Modifiers +{ + /** + * Midday/noon hour. + * + * @var int + */ + protected static $midDayAt = 12; + + /** + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt() + { + return static::$midDayAt; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour) + { + static::$midDayAt = $hour; + } + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay() + { + return $this->setTime(static::$midDayAt, 0, 0, 0); + } + + /** + * Modify to the next occurrence of a given modifier such as a day of + * the week. If no modifier is provided, modify to the next occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static + */ + public function next($modifier = null) + { + if ($modifier === null) { + $modifier = $this->dayOfWeek; + } + + return $this->change( + 'next '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) + ); + } + + /** + * Go forward or backward to the next week- or weekend-day. + * + * @param bool $weekday + * @param bool $forward + * + * @return static + */ + private function nextOrPreviousDay($weekday = true, $forward = true) + { + /** @var CarbonInterface $date */ + $date = $this; + $step = $forward ? 1 : -1; + + do { + $date = $date->addDays($step); + } while ($weekday ? $date->isWeekend() : $date->isWeekday()); + + return $date; + } + + /** + * Go forward to the next weekday. + * + * @return static + */ + public function nextWeekday() + { + return $this->nextOrPreviousDay(); + } + + /** + * Go backward to the previous weekday. + * + * @return static + */ + public function previousWeekday() + { + return $this->nextOrPreviousDay(true, false); + } + + /** + * Go forward to the next weekend day. + * + * @return static + */ + public function nextWeekendDay() + { + return $this->nextOrPreviousDay(false); + } + + /** + * Go backward to the previous weekend day. + * + * @return static + */ + public function previousWeekendDay() + { + return $this->nextOrPreviousDay(false, false); + } + + /** + * Modify to the previous occurrence of a given modifier such as a day of + * the week. If no dayOfWeek is provided, modify to the previous occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param string|int|null $modifier + * + * @return static + */ + public function previous($modifier = null) + { + if ($modifier === null) { + $modifier = $this->dayOfWeek; + } + + return $this->change( + 'last '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) + ); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * first day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfMonth($dayOfWeek = null) + { + $date = $this->startOfDay(); + + if ($dayOfWeek === null) { + return $date->day(1); + } + + return $date->modify('first '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * last day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfMonth($dayOfWeek = null) + { + $date = $this->startOfDay(); + + if ($dayOfWeek === null) { + return $date->day($date->daysInMonth); + } + + return $date->modify('last '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope + * of the current month, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfMonth($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->firstOfMonth(); + $check = $date->rawFormat('Y-m'); + $date = $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $date->rawFormat('Y-m') === $check ? $this->modify((string) $date) : false; + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * first day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * last day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope + * of the current quarter, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfQuarter($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); + $lastMonth = $date->month; + $year = $date->year; + $date = $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify((string) $date); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * first day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function firstOfYear($dayOfWeek = null) + { + return $this->month(1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * last day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek day of the week default null + * + * @return static + */ + public function lastOfYear($dayOfWeek = null) + { + return $this->month(static::MONTHS_PER_YEAR)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope + * of the current year, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfYear($nth, $dayOfWeek) + { + $date = $this->avoidMutation()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $this->year === $date->year ? $this->modify((string) $date) : false; + } + + /** + * Modify the current instance to the average of a given instance (default now) and the current instance + * (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date + * + * @return static + */ + public function average($date = null) + { + return $this->addRealMicroseconds((int) ($this->diffInRealMicroseconds($this->resolveCarbon($date), false) / 2)); + } + + /** + * Get the closest date from the instance (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function closest($date1, $date2) + { + return $this->diffInRealMicroseconds($date1) < $this->diffInRealMicroseconds($date2) ? $date1 : $date2; + } + + /** + * Get the farthest date from the instance (second-precision). + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * + * @return static + */ + public function farthest($date1, $date2) + { + return $this->diffInRealMicroseconds($date1) > $this->diffInRealMicroseconds($date2) ? $date1 : $date2; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function min($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->lt($date) ? $this : $date; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see min() + * + * @return static + */ + public function minimum($date = null) + { + return $this->min($date); + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return static + */ + public function max($date = null) + { + $date = $this->resolveCarbon($date); + + return $this->gt($date) ? $this : $date; + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see max() + * + * @return static + */ + public function maximum($date = null) + { + return $this->max($date); + } + + /** + * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. + * + * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false + */ + #[ReturnTypeWillChange] + public function modify($modify) + { + return parent::modify((string) $modify); + } + + /** + * Similar to native modify() method of DateTime but can handle more grammars. + * + * @example + * ``` + * echo Carbon::now()->change('next 2pm'); + * ``` + * + * @link https://php.net/manual/en/datetime.modify.php + * + * @param string $modifier + * + * @return static + */ + public function change($modifier) + { + return $this->modify(preg_replace_callback('/^(next|previous|last)\s+(\d{1,2}(h|am|pm|:\d{1,2}(:\d{1,2})?))$/i', function ($match) { + $match[2] = str_replace('h', ':00', $match[2]); + $test = $this->avoidMutation()->modify($match[2]); + $method = $match[1] === 'next' ? 'lt' : 'gt'; + $match[1] = $test->$method($this) ? $match[1].' day' : 'today'; + + return $match[1].' '.$match[2]; + }, strtr(trim($modifier), [ + ' at ' => ' ', + 'just now' => 'now', + 'after tomorrow' => 'tomorrow +1 day', + 'before yesterday' => 'yesterday -1 day', + ]))); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php new file mode 100644 index 00000000000..561c867d0f1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Carbon; +use Carbon\CarbonImmutable; + +/** + * Trait Mutability. + * + * Utils to know if the current object is mutable or immutable and convert it. + */ +trait Mutability +{ + use Cast; + + /** + * Returns true if the current class/instance is mutable. + * + * @return bool + */ + public static function isMutable() + { + return false; + } + + /** + * Returns true if the current class/instance is immutable. + * + * @return bool + */ + public static function isImmutable() + { + return !static::isMutable(); + } + + /** + * Return a mutable copy of the instance. + * + * @return Carbon + */ + public function toMutable() + { + /** @var Carbon $date */ + $date = $this->cast(Carbon::class); + + return $date; + } + + /** + * Return a immutable copy of the instance. + * + * @return CarbonImmutable + */ + public function toImmutable() + { + /** @var CarbonImmutable $date */ + $date = $this->cast(CarbonImmutable::class); + + return $date; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php new file mode 100644 index 00000000000..c77a102444e --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +trait ObjectInitialisation +{ + /** + * True when parent::__construct has been called. + * + * @var string + */ + protected $constructedObjectId; +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Options.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Options.php new file mode 100644 index 00000000000..0ddee8dd639 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Options.php @@ -0,0 +1,471 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterface; +use DateTimeInterface; +use Throwable; + +/** + * Trait Options. + * + * Embed base methods to change settings of Carbon classes. + * + * Depends on the following methods: + * + * @method \Carbon\Carbon|\Carbon\CarbonImmutable shiftTimezone($timezone) Set the timezone + */ +trait Options +{ + use Localization; + + /** + * Customizable PHP_INT_SIZE override. + * + * @var int + */ + public static $PHPIntSize = PHP_INT_SIZE; + + /** + * First day of week. + * + * @var int|string + */ + protected static $weekStartsAt = CarbonInterface::MONDAY; + + /** + * Last day of week. + * + * @var int|string + */ + protected static $weekEndsAt = CarbonInterface::SUNDAY; + + /** + * Days of weekend. + * + * @var array + */ + protected static $weekendDays = [ + CarbonInterface::SATURDAY, + CarbonInterface::SUNDAY, + ]; + + /** + * Format regex patterns. + * + * @var array + */ + protected static $regexFormats = [ + 'd' => '(3[01]|[12][0-9]|0[1-9])', + 'D' => '(Sun|Mon|Tue|Wed|Thu|Fri|Sat)', + 'j' => '([123][0-9]|[1-9])', + 'l' => '([a-zA-Z]{2,})', + 'N' => '([1-7])', + 'S' => '(st|nd|rd|th)', + 'w' => '([0-6])', + 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', + 'W' => '(5[012]|[1-4][0-9]|0?[1-9])', + 'F' => '([a-zA-Z]{2,})', + 'm' => '(1[012]|0[1-9])', + 'M' => '([a-zA-Z]{3})', + 'n' => '(1[012]|[1-9])', + 't' => '(2[89]|3[01])', + 'L' => '(0|1)', + 'o' => '([1-9][0-9]{0,4})', + 'Y' => '([1-9]?[0-9]{4})', + 'y' => '([0-9]{2})', + 'a' => '(am|pm)', + 'A' => '(AM|PM)', + 'B' => '([0-9]{3})', + 'g' => '(1[012]|[1-9])', + 'G' => '(2[0-3]|1?[0-9])', + 'h' => '(1[012]|0[1-9])', + 'H' => '(2[0-3]|[01][0-9])', + 'i' => '([0-5][0-9])', + 's' => '([0-5][0-9])', + 'u' => '([0-9]{1,6})', + 'v' => '([0-9]{1,3})', + 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\\/[a-zA-Z]*)', + 'I' => '(0|1)', + 'O' => '([+-](1[012]|0[0-9])[0134][05])', + 'P' => '([+-](1[012]|0[0-9]):[0134][05])', + 'p' => '(Z|[+-](1[012]|0[0-9]):[0134][05])', + 'T' => '([a-zA-Z]{1,5})', + 'Z' => '(-?[1-5]?[0-9]{1,4})', + 'U' => '([0-9]*)', + + // The formats below are combinations of the above formats. + 'c' => '(([1-9]?[0-9]{4})-(1[012]|0[1-9])-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[+-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP + 'r' => '(([a-zA-Z]{3}), ([123][0-9]|0[1-9]) ([a-zA-Z]{3}) ([1-9]?[0-9]{4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [+-](1[012]|0[0-9])([0134][05]))', // D, d M Y H:i:s O + ]; + + /** + * Format modifiers (such as available in createFromFormat) regex patterns. + * + * @var array + */ + protected static $regexFormatModifiers = [ + '*' => '.+', + ' ' => '[ ]', + '#' => '[;:\\/.,()-]', + '?' => '([^a]|[a])', + '!' => '', + '|' => '', + '+' => '', + ]; + + /** + * Indicates if months should be calculated with overflow. + * Global setting. + * + * @var bool + */ + protected static $monthsOverflow = true; + + /** + * Indicates if years should be calculated with overflow. + * Global setting. + * + * @var bool + */ + protected static $yearsOverflow = true; + + /** + * Indicates if the strict mode is in use. + * Global setting. + * + * @var bool + */ + protected static $strictModeEnabled = true; + + /** + * Function to call instead of format. + * + * @var string|callable|null + */ + protected static $formatFunction; + + /** + * Function to call instead of createFromFormat. + * + * @var string|callable|null + */ + protected static $createFromFormatFunction; + + /** + * Function to call instead of parse. + * + * @var string|callable|null + */ + protected static $parseFunction; + + /** + * Indicates if months should be calculated with overflow. + * Specific setting. + * + * @var bool|null + */ + protected $localMonthsOverflow; + + /** + * Indicates if years should be calculated with overflow. + * Specific setting. + * + * @var bool|null + */ + protected $localYearsOverflow; + + /** + * Indicates if the strict mode is in use. + * Specific setting. + * + * @var bool|null + */ + protected $localStrictModeEnabled; + + /** + * Options for diffForHumans and forHumans methods. + * + * @var bool|null + */ + protected $localHumanDiffOptions; + + /** + * Format to use on string cast. + * + * @var string|null + */ + protected $localToStringFormat; + + /** + * Format to use on JSON serialization. + * + * @var string|null + */ + protected $localSerializer; + + /** + * Instance-specific macros. + * + * @var array|null + */ + protected $localMacros; + + /** + * Instance-specific generic macros. + * + * @var array|null + */ + protected $localGenericMacros; + + /** + * Function to call instead of format. + * + * @var string|callable|null + */ + protected $localFormatFunction; + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @see settings + * + * Enable the strict mode (or disable with passing false). + * + * @param bool $strictModeEnabled + */ + public static function useStrictMode($strictModeEnabled = true) + { + static::$strictModeEnabled = $strictModeEnabled; + } + + /** + * Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * + * @return bool + */ + public static function isStrictModeEnabled() + { + return static::$strictModeEnabled; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if months should be calculated with overflow. + * + * @param bool $monthsOverflow + * + * @return void + */ + public static function useMonthsOverflow($monthsOverflow = true) + { + static::$monthsOverflow = $monthsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetMonthsOverflow() + { + static::$monthsOverflow = true; + } + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowMonths() + { + return static::$monthsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true) + { + static::$yearsOverflow = $yearsOverflow; + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @see settings + * + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow() + { + static::$yearsOverflow = true; + } + + /** + * Get the month overflow global behavior (can be overridden in specific instances). + * + * @return bool + */ + public static function shouldOverflowYears() + { + return static::$yearsOverflow; + } + + /** + * Set specific options. + * - strictMode: true|false|null + * - monthOverflow: true|false|null + * - yearOverflow: true|false|null + * - humanDiffOptions: int|null + * - toStringFormat: string|Closure|null + * - toJsonFormat: string|Closure|null + * - locale: string|null + * - timezone: \DateTimeZone|string|int|null + * - macros: array|null + * - genericMacros: array|null + * + * @param array $settings + * + * @return $this|static + */ + public function settings(array $settings) + { + $this->localStrictModeEnabled = $settings['strictMode'] ?? null; + $this->localMonthsOverflow = $settings['monthOverflow'] ?? null; + $this->localYearsOverflow = $settings['yearOverflow'] ?? null; + $this->localHumanDiffOptions = $settings['humanDiffOptions'] ?? null; + $this->localToStringFormat = $settings['toStringFormat'] ?? null; + $this->localSerializer = $settings['toJsonFormat'] ?? null; + $this->localMacros = $settings['macros'] ?? null; + $this->localGenericMacros = $settings['genericMacros'] ?? null; + $this->localFormatFunction = $settings['formatFunction'] ?? null; + + if (isset($settings['locale'])) { + $locales = $settings['locale']; + + if (!\is_array($locales)) { + $locales = [$locales]; + } + + $this->locale(...$locales); + } + + if (isset($settings['innerTimezone'])) { + return $this->setTimezone($settings['innerTimezone']); + } + + if (isset($settings['timezone'])) { + return $this->shiftTimezone($settings['timezone']); + } + + return $this; + } + + /** + * Returns current local settings. + * + * @return array + */ + public function getSettings() + { + $settings = []; + $map = [ + 'localStrictModeEnabled' => 'strictMode', + 'localMonthsOverflow' => 'monthOverflow', + 'localYearsOverflow' => 'yearOverflow', + 'localHumanDiffOptions' => 'humanDiffOptions', + 'localToStringFormat' => 'toStringFormat', + 'localSerializer' => 'toJsonFormat', + 'localMacros' => 'macros', + 'localGenericMacros' => 'genericMacros', + 'locale' => 'locale', + 'tzName' => 'timezone', + 'localFormatFunction' => 'formatFunction', + ]; + + foreach ($map as $property => $key) { + $value = $this->$property ?? null; + + if ($value !== null) { + $settings[$key] = $value; + } + } + + return $settings; + } + + /** + * Show truthy properties on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + $infos = array_filter(get_object_vars($this), function ($var) { + return $var; + }); + + foreach (['dumpProperties', 'constructedObjectId'] as $property) { + if (isset($infos[$property])) { + unset($infos[$property]); + } + } + + $this->addExtraDebugInfos($infos); + + return $infos; + } + + protected function addExtraDebugInfos(&$infos): void + { + if ($this instanceof DateTimeInterface) { + try { + if (!isset($infos['date'])) { + $infos['date'] = $this->format(CarbonInterface::MOCK_DATETIME_FORMAT); + } + + if (!isset($infos['timezone'])) { + $infos['timezone'] = $this->tzName; + } + } catch (Throwable $exception) { + // noop + } + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php new file mode 100644 index 00000000000..c991a9b0aa9 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php @@ -0,0 +1,239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterface; +use Carbon\Exceptions\UnknownUnitException; + +/** + * Trait Rounding. + * + * Round, ceil, floor units. + * + * Depends on the following methods: + * + * @method static copy() + * @method static startOfWeek(int $weekStartsAt = null) + */ +trait Rounding +{ + use IntervalRounding; + + /** + * Round the current instance at the given unit with given precision if specified and the given function. + * + * @param string $unit + * @param float|int $precision + * @param string $function + * + * @return CarbonInterface + */ + public function roundUnit($unit, $precision = 1, $function = 'round') + { + $metaUnits = [ + // @call roundUnit + 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], + // @call roundUnit + 'century' => [static::YEARS_PER_CENTURY, 'year'], + // @call roundUnit + 'decade' => [static::YEARS_PER_DECADE, 'year'], + // @call roundUnit + 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], + // @call roundUnit + 'millisecond' => [1000, 'microsecond'], + ]; + $normalizedUnit = static::singularUnit($unit); + $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ + // @call roundUnit + 'microsecond' => [0, 999999], + ]); + $factor = 1; + $initialMonth = $this->month; + + if ($normalizedUnit === 'week') { + $normalizedUnit = 'day'; + $precision *= static::DAYS_PER_WEEK; + } + + if (isset($metaUnits[$normalizedUnit])) { + [$factor, $normalizedUnit] = $metaUnits[$normalizedUnit]; + } + + $precision *= $factor; + + if (!isset($ranges[$normalizedUnit])) { + throw new UnknownUnitException($unit); + } + + $found = false; + $fraction = 0; + $arguments = null; + $factor = $this->year < 0 ? -1 : 1; + $changes = []; + + foreach ($ranges as $unit => [$minimum, $maximum]) { + if ($normalizedUnit === $unit) { + $arguments = [$this->$unit, $minimum]; + $fraction = $precision - floor($precision); + $found = true; + + continue; + } + + if ($found) { + $delta = $maximum + 1 - $minimum; + $factor /= $delta; + $fraction *= $delta; + $arguments[0] += ($this->$unit - $minimum) * $factor; + $changes[$unit] = round( + $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) + ); + + // Cannot use modulo as it lose double precision + while ($changes[$unit] >= $delta) { + $changes[$unit] -= $delta; + } + + $fraction -= floor($fraction); + } + } + + [$value, $minimum] = $arguments; + $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); + + /** @var CarbonInterface $result */ + $result = $this->$normalizedUnit($normalizedValue); + + foreach ($changes as $unit => $value) { + $result = $result->$unit($value); + } + + return $normalizedUnit === 'month' && $precision <= 1 && abs($result->month - $initialMonth) === 2 + // Re-run the change in case an overflow occurred + ? $result->$normalizedUnit($normalizedValue) + : $result; + } + + /** + * Truncate the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function floorUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'floor'); + } + + /** + * Ceil the current instance at the given unit with given precision if specified. + * + * @param string $unit + * @param float|int $precision + * + * @return CarbonInterface + */ + public function ceilUnit($unit, $precision = 1) + { + return $this->roundUnit($unit, $precision, 'ceil'); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * @param string $function + * + * @return CarbonInterface + */ + public function round($precision = 1, $function = 'round') + { + return $this->roundWith($precision, $function); + } + + /** + * Round the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function floor($precision = 1) + { + return $this->round($precision, 'floor'); + } + + /** + * Ceil the current instance second with given precision if specified. + * + * @param float|int|string|\DateInterval|null $precision + * + * @return CarbonInterface + */ + public function ceil($precision = 1) + { + return $this->round($precision, 'ceil'); + } + + /** + * Round the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function roundWeek($weekStartsAt = null) + { + return $this->closest( + $this->avoidMutation()->floorWeek($weekStartsAt), + $this->avoidMutation()->ceilWeek($weekStartsAt) + ); + } + + /** + * Truncate the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function floorWeek($weekStartsAt = null) + { + return $this->startOfWeek($weekStartsAt); + } + + /** + * Ceil the current instance week. + * + * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week + * + * @return CarbonInterface + */ + public function ceilWeek($weekStartsAt = null) + { + if ($this->isMutable()) { + $startOfWeek = $this->avoidMutation()->startOfWeek($weekStartsAt); + + return $startOfWeek != $this ? + $this->startOfWeek($weekStartsAt)->addWeek() : + $this; + } + + $startOfWeek = $this->startOfWeek($weekStartsAt); + + return $startOfWeek != $this ? + $startOfWeek->addWeek() : + $this->avoidMutation(); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php new file mode 100644 index 00000000000..9e86bd3e9b7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\Exceptions\InvalidFormatException; +use ReturnTypeWillChange; +use Throwable; + +/** + * Trait Serialization. + * + * Serialization and JSON stuff. + * + * Depends on the following properties: + * + * @property int $year + * @property int $month + * @property int $daysInMonth + * @property int $quarter + * + * Depends on the following methods: + * + * @method string|static locale(string $locale = null, string ...$fallbackLocales) + * @method string toJSON() + */ +trait Serialization +{ + use ObjectInitialisation; + + /** + * The custom Carbon JSON serializer. + * + * @var callable|null + */ + protected static $serializer; + + /** + * List of key to use for dump/serialization. + * + * @var string[] + */ + protected $dumpProperties = ['date', 'timezone_type', 'timezone']; + + /** + * Locale to dump comes here before serialization. + * + * @var string|null + */ + protected $dumpLocale; + + /** + * Embed date properties to dump in a dedicated variables so it won't overlap native + * DateTime ones. + * + * @var array|null + */ + protected $dumpDateProperties; + + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize() + { + return serialize($this); + } + + /** + * Create an instance from a serialized string. + * + * @param string $value + * + * @throws InvalidFormatException + * + * @return static + */ + public static function fromSerialized($value) + { + $instance = @unserialize((string) $value); + + if (!$instance instanceof static) { + throw new InvalidFormatException("Invalid serialized value: $value"); + } + + return $instance; + } + + /** + * The __set_state handler. + * + * @param string|array $dump + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump) + { + if (\is_string($dump)) { + return static::parse($dump); + } + + /** @var \DateTimeInterface $date */ + $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') + ? parent::__set_state((array) $dump) + : (object) $dump; + + return static::instance($date); + } + + /** + * Returns the list of properties to dump on serialize() called on. + * + * @return array + */ + public function __sleep() + { + $properties = $this->getSleepProperties(); + + if ($this->localTranslator ?? null) { + $properties[] = 'dumpLocale'; + $this->dumpLocale = $this->locale ?? null; + } + + return $properties; + } + + public function __serialize(): array + { + if (isset($this->timezone_type)) { + return [ + 'date' => $this->date ?? null, + 'timezone_type' => $this->timezone_type, + 'timezone' => $this->timezone ?? null, + ]; + } + + $timezone = $this->getTimezone(); + $export = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone_type' => $timezone->getType(), + 'timezone' => $timezone->getName(), + ]; + + // @codeCoverageIgnoreStart + if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { + $export['dumpDateProperties'] = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + } + // @codeCoverageIgnoreEnd + + if ($this->localTranslator ?? null) { + $export['dumpLocale'] = $this->locale ?? null; + } + + return $export; + } + + /** + * Set locale if specified on unserialize() called. + * + * @return void + */ + #[ReturnTypeWillChange] + public function __wakeup() + { + if (parent::class && method_exists(parent::class, '__wakeup')) { + // @codeCoverageIgnoreStart + try { + parent::__wakeup(); + } catch (Throwable $exception) { + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; + parent::__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + } + + $this->constructedObjectId = spl_object_hash($this); + + if (isset($this->dumpLocale)) { + $this->locale($this->dumpLocale); + $this->dumpLocale = null; + } + + $this->cleanupDumpProperties(); + } + + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + try { + $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); + } catch (Throwable $exception) { + if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { + throw $exception; + } + + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; + $this->__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + + if (isset($data['dumpLocale'])) { + $this->locale($data['dumpLocale']); + } + } + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + $serializer = $this->localSerializer ?? static::$serializer; + + if ($serializer) { + return \is_string($serializer) + ? $this->rawFormat($serializer) + : $serializer($this); + } + + return $this->toJSON(); + } + + /** + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * + * JSON serialize all Carbon instances using the given callback. + * + * @param callable $callback + * + * @return void + */ + public static function serializeUsing($callback) + { + static::$serializer = $callback; + } + + /** + * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. + * foreach ($date as $_) {} + * serializer($date) + * var_export($date) + * get_object_vars($date) + */ + public function cleanupDumpProperties() + { + if (PHP_VERSION < 8.2) { + foreach ($this->dumpProperties as $property) { + if (isset($this->$property)) { + unset($this->$property); + } + } + } + + return $this; + } + + private function getSleepProperties(): array + { + $properties = $this->dumpProperties; + + // @codeCoverageIgnoreStart + if (!\extension_loaded('msgpack')) { + return $properties; + } + + if (isset($this->constructedObjectId)) { + $this->dumpDateProperties = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + + $properties[] = 'dumpDateProperties'; + } + + return $properties; + // @codeCoverageIgnoreEnd + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Test.php new file mode 100644 index 00000000000..e0c9e80683f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Test.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonInterface; +use Carbon\CarbonTimeZone; +use Closure; +use DateTimeImmutable; +use DateTimeInterface; +use InvalidArgumentException; +use Throwable; + +trait Test +{ + /////////////////////////////////////////////////////////////////// + ///////////////////////// TESTING AIDS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * A test Carbon instance to be returned when now instances are created. + * + * @var Closure|static|null + */ + protected static $testNow; + + /** + * The timezone to resto to when clearing the time mock. + * + * @var string|null + */ + protected static $testDefaultTimezone; + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNow($testNow = null) + { + static::$testNow = $testNow instanceof self || $testNow instanceof Closure + ? $testNow + : static::make($testNow); + } + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null) + { + if ($testNow) { + self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); + } + + $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; + + if ($useDateInstanceTimezone) { + self::setDefaultTimezone($testNow->getTimezone()->getName(), $testNow); + } + + static::setTestNow($testNow); + + if (!$useDateInstanceTimezone) { + $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); + $tzName = $now ? $now->tzName : null; + self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); + } + + if (!$testNow) { + self::$testDefaultTimezone = null; + } + } + + /** + * Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * + * /!\ Use this method for unit tests only. + * + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure|null $callback + * + * @return mixed + */ + public static function withTestNow($testNow = null, $callback = null) + { + static::setTestNow($testNow); + + try { + $result = $callback(); + } finally { + static::setTestNow(); + } + + return $result; + } + + /** + * Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * + * @return Closure|static the current instance used for testing + */ + public static function getTestNow() + { + return static::$testNow; + } + + /** + * Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * + * @return bool true if there is a test instance, otherwise false + */ + public static function hasTestNow() + { + return static::getTestNow() !== null; + } + + /** + * Get the mocked date passed in setTestNow() and if it's a Closure, execute it. + * + * @param string|\DateTimeZone $tz + * + * @return \Carbon\CarbonImmutable|\Carbon\Carbon|null + */ + protected static function getMockedTestNow($tz) + { + $testNow = static::getTestNow(); + + if ($testNow instanceof Closure) { + $realNow = new DateTimeImmutable('now'); + $testNow = $testNow(static::parse( + $realNow->format('Y-m-d H:i:s.u'), + $tz ?: $realNow->getTimezone() + )); + } + /* @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $testNow */ + + return $testNow instanceof CarbonInterface + ? $testNow->avoidMutation()->tz($tz) + : $testNow; + } + + protected static function mockConstructorParameters(&$time, $tz) + { + /** @var \Carbon\CarbonImmutable|\Carbon\Carbon $testInstance */ + $testInstance = clone static::getMockedTestNow($tz); + + if (static::hasRelativeKeywords($time)) { + $testInstance = $testInstance->modify($time); + } + + $time = $testInstance instanceof self + ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) + : $testInstance->format(static::MOCK_DATETIME_FORMAT); + } + + private static function setDefaultTimezone($timezone, DateTimeInterface $date = null) + { + $previous = null; + $success = false; + + try { + $success = date_default_timezone_set($timezone); + } catch (Throwable $exception) { + $previous = $exception; + } + + if (!$success) { + $suggestion = @CarbonTimeZone::create($timezone)->toRegionName($date); + + throw new InvalidArgumentException( + "Timezone ID '$timezone' is invalid". + ($suggestion && $suggestion !== $timezone ? ", did you mean '$suggestion'?" : '.')."\n". + "It must be one of the IDs from DateTimeZone::listIdentifiers(),\n". + 'For the record, hours/minutes offset are relevant only for a particular moment, '. + 'but not as a default timezone.', + 0, + $previous + ); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php new file mode 100644 index 00000000000..88a465c938c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php @@ -0,0 +1,198 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +/** + * Trait Timestamp. + */ +trait Timestamp +{ + /** + * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestamp($timestamp, $tz = null) + { + return static::createFromTimestampUTC($timestamp)->setTimezone($tz); + } + + /** + * Create a Carbon instance from an timestamp keeping the timezone to UTC. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampUTC($timestamp) + { + [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); + $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); + $integer += $delta; + $decimal -= $delta * static::MICROSECONDS_PER_SECOND; + $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); + + return static::rawCreateFromFormat('U u', "$integer $decimal"); + } + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * + * @return static + */ + public static function createFromTimestampMsUTC($timestamp) + { + [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); + $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; + $milliseconds = abs($milliseconds); + $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); + $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); + $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); + $seconds += $delta; + $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; + $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); + + return static::rawCreateFromFormat('U u', "$seconds $microseconds"); + } + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null) + { + return static::createFromTimestampMsUTC($timestamp) + ->setTimezone($tz); + } + + /** + * Set the instance's timestamp. + * + * Timestamp input can be given as int, float or a string containing one or more numbers. + * + * @param float|int|string $unixTimestamp + * + * @return static + */ + public function timestamp($unixTimestamp) + { + return $this->setTimestamp($unixTimestamp); + } + + /** + * Returns a timestamp rounded with the given precision (6 by default). + * + * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) + * @example getPreciseTimestamp(6) 1532087464437474 + * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) + * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) + * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) + * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) + * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) + * @example getPreciseTimestamp(0) 1532087464 (second precision) + * @example getPreciseTimestamp(-1) 153208746 (10 second precision) + * @example getPreciseTimestamp(-2) 15320875 (100 second precision) + * + * @param int $precision + * + * @return float + */ + public function getPreciseTimestamp($precision = 6) + { + return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); + } + + /** + * Returns the milliseconds timestamps used amongst other by Date javascript objects. + * + * @return float + */ + public function valueOf() + { + return $this->getPreciseTimestamp(3); + } + + /** + * Returns the timestamp with millisecond precision. + * + * @return int + */ + public function getTimestampMs() + { + return (int) $this->getPreciseTimestamp(3); + } + + /** + * @alias getTimestamp + * + * Returns the UNIX timestamp for the current date. + * + * @return int + */ + public function unix() + { + return $this->getTimestamp(); + } + + /** + * Return an array with integer part digits and decimals digits split from one or more positive numbers + * (such as timestamps) as string with the given number of decimals (6 by default). + * + * By splitting integer and decimal, this method obtain a better precision than + * number_format when the input is a string. + * + * @param float|int|string $numbers one or more numbers + * @param int $decimals number of decimals precision (6 by default) + * + * @return array 0-index is integer part, 1-index is decimal part digits + */ + private static function getIntegerAndDecimalParts($numbers, $decimals = 6) + { + if (\is_int($numbers) || \is_float($numbers)) { + $numbers = number_format($numbers, $decimals, '.', ''); + } + + $sign = str_starts_with($numbers, '-') ? -1 : 1; + $integer = 0; + $decimal = 0; + + foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { + [$integerPart, $decimalPart] = explode('.', "$chunk."); + + $integer += (int) $integerPart; + $decimal += (float) ("0.$decimalPart"); + } + + $overflow = floor($decimal); + $integer += $overflow; + $decimal -= $overflow; + + return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Units.php new file mode 100644 index 00000000000..4fc7d23305b --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Units.php @@ -0,0 +1,404 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +use Carbon\CarbonConverterInterface; +use Carbon\CarbonInterface; +use Carbon\CarbonInterval; +use Carbon\Exceptions\UnitException; +use Closure; +use DateInterval; +use ReturnTypeWillChange; + +/** + * Trait Units. + * + * Add, subtract and set units. + */ +trait Units +{ + /** + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param string $unit + * @param int $value + * + * @return static + */ + public function addRealUnit($unit, $value = 1) + { + switch ($unit) { + // @call addRealUnit + case 'micro': + + // @call addRealUnit + case 'microsecond': + /* @var CarbonInterface $this */ + $diff = $this->microsecond + $value; + $time = $this->getTimestamp(); + $seconds = (int) floor($diff / static::MICROSECONDS_PER_SECOND); + $time += $seconds; + $diff -= $seconds * static::MICROSECONDS_PER_SECOND; + $microtime = str_pad((string) $diff, 6, '0', STR_PAD_LEFT); + $tz = $this->tz; + + return $this->tz('UTC')->modify("@$time.$microtime")->tz($tz); + + // @call addRealUnit + case 'milli': + // @call addRealUnit + case 'millisecond': + return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); + + // @call addRealUnit + case 'second': + break; + + // @call addRealUnit + case 'minute': + $value *= static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'hour': + $value *= static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'day': + $value *= static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'week': + $value *= static::DAYS_PER_WEEK * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'month': + $value *= 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'quarter': + $value *= static::MONTHS_PER_QUARTER * 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'year': + $value *= 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'decade': + $value *= static::YEARS_PER_DECADE * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'century': + $value *= static::YEARS_PER_CENTURY * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + // @call addRealUnit + case 'millennium': + $value *= static::YEARS_PER_MILLENNIUM * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; + + break; + + default: + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new UnitException("Invalid unit for real timestamp add/sub: '$unit'"); + } + + return $this; + } + + /* @var CarbonInterface $this */ + return $this->setTimestamp((int) ($this->getTimestamp() + $value)); + } + + public function subRealUnit($unit, $value = 1) + { + return $this->addRealUnit($unit, -$value); + } + + /** + * Returns true if a property can be changed via setter. + * + * @param string $unit + * + * @return bool + */ + public static function isModifiableUnit($unit) + { + static $modifiableUnits = [ + // @call addUnit + 'millennium', + // @call addUnit + 'century', + // @call addUnit + 'decade', + // @call addUnit + 'quarter', + // @call addUnit + 'week', + // @call addUnit + 'weekday', + ]; + + return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); + } + + /** + * Call native PHP DateTime/DateTimeImmutable add() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawAdd(DateInterval $interval) + { + return parent::add($interval); + } + + /** + * Add given units or interval to the current instance. + * + * @example $date->add('hour', 3) + * @example $date->add(15, 'days') + * @example $date->add(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function add($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit); + } + + if ($unit instanceof CarbonConverterInterface) { + return $this->resolveCarbon($unit->convertDate($this, false)); + } + + if ($unit instanceof Closure) { + return $this->resolveCarbon($unit($this, false)); + } + + if ($unit instanceof DateInterval) { + return parent::add($unit); + } + + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->addUnit($unit, $value, $overflow); + } + + /** + * Add given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function addUnit($unit, $value = 1, $overflow = null) + { + $date = $this; + + if (!is_numeric($value) || !(float) $value) { + return $date->isMutable() ? $date : $date->avoidMutation(); + } + + $unit = self::singularUnit($unit); + $metaUnits = [ + 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], + 'century' => [static::YEARS_PER_CENTURY, 'year'], + 'decade' => [static::YEARS_PER_DECADE, 'year'], + 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], + ]; + + if (isset($metaUnits[$unit])) { + [$factor, $unit] = $metaUnits[$unit]; + $value *= $factor; + } + + if ($unit === 'weekday') { + $weekendDays = static::getWeekendDays(); + + if ($weekendDays !== [static::SATURDAY, static::SUNDAY]) { + $absoluteValue = abs($value); + $sign = $value / max(1, $absoluteValue); + $weekDaysCount = 7 - min(6, \count(array_unique($weekendDays))); + $weeks = floor($absoluteValue / $weekDaysCount); + + for ($diff = $absoluteValue % $weekDaysCount; $diff; $diff--) { + /** @var static $date */ + $date = $date->addDays($sign); + + while (\in_array($date->dayOfWeek, $weekendDays, true)) { + $date = $date->addDays($sign); + } + } + + $value = $weeks * $sign; + $unit = 'week'; + } + + $timeString = $date->toTimeString(); + } elseif ($canOverflow = (\in_array($unit, [ + 'month', + 'year', + ]) && ($overflow === false || ( + $overflow === null && + ($ucUnit = ucfirst($unit).'s') && + !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) + )))) { + $day = $date->day; + } + + $value = (int) $value; + + if ($unit === 'milli' || $unit === 'millisecond') { + $unit = 'microsecond'; + $value *= static::MICROSECONDS_PER_MILLISECOND; + } + + // Work-around for bug https://bugs.php.net/bug.php?id=75642 + if ($unit === 'micro' || $unit === 'microsecond') { + $microseconds = $this->micro + $value; + $second = (int) floor($microseconds / static::MICROSECONDS_PER_SECOND); + $microseconds %= static::MICROSECONDS_PER_SECOND; + if ($microseconds < 0) { + $microseconds += static::MICROSECONDS_PER_SECOND; + } + $date = $date->microseconds($microseconds); + $unit = 'second'; + $value = $second; + } + $date = $date->modify("$value $unit"); + + if (isset($timeString)) { + $date = $date->setTimeFromTimeString($timeString); + } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { + $date = $date->modify('last day of previous month'); + } + + if (!$date) { + throw new UnitException('Unable to add unit '.var_export(\func_get_args(), true)); + } + + return $date; + } + + /** + * Subtract given units to the current instance. + * + * @param string $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subUnit($unit, $value = 1, $overflow = null) + { + return $this->addUnit($unit, -$value, $overflow); + } + + /** + * Call native PHP DateTime/DateTimeImmutable sub() method. + * + * @param DateInterval $interval + * + * @return static + */ + public function rawSub(DateInterval $interval) + { + return parent::sub($interval); + } + + /** + * Subtract given units or interval to the current instance. + * + * @example $date->sub('hour', 3) + * @example $date->sub(15, 'days') + * @example $date->sub(CarbonInterval::days(4)) + * + * @param string|DateInterval|Closure|CarbonConverterInterface $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + #[ReturnTypeWillChange] + public function sub($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit); + } + + if ($unit instanceof CarbonConverterInterface) { + return $this->resolveCarbon($unit->convertDate($this, true)); + } + + if ($unit instanceof Closure) { + return $this->resolveCarbon($unit($this, true)); + } + + if ($unit instanceof DateInterval) { + return parent::sub($unit); + } + + if (is_numeric($unit)) { + [$value, $unit] = [$unit, $value]; + } + + return $this->addUnit($unit, -(float) $value, $overflow); + } + + /** + * Subtract given units or interval to the current instance. + * + * @see sub() + * + * @param string|DateInterval $unit + * @param int $value + * @param bool|null $overflow + * + * @return static + */ + public function subtract($unit, $value = 1, $overflow = null) + { + if (\is_string($unit) && \func_num_args() === 1) { + $unit = CarbonInterval::make($unit); + } + + return $this->sub($unit, $value, $overflow); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Week.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Week.php new file mode 100644 index 00000000000..6f1481456ac --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Week.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +/** + * Trait Week. + * + * week and ISO week number, year and count in year. + * + * Depends on the following properties: + * + * @property int $daysInYear + * @property int $dayOfWeek + * @property int $dayOfYear + * @property int $year + * + * Depends on the following methods: + * + * @method static addWeeks(int $weeks = 1) + * @method static copy() + * @method static dayOfYear(int $dayOfYear) + * @method string getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) + * @method static next(int|string $day = null) + * @method static startOfWeek(int $day = 1) + * @method static subWeeks(int $weeks = 1) + * @method static year(int $year = null) + */ +trait Week +{ + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null) + { + return $this->weekYear( + $year, + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } + + /** + * Set/get the week number of year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int|static + */ + public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null) + { + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + + if ($year !== null) { + $year = (int) round($year); + + if ($this->weekYear(null, $dayOfWeek, $dayOfYear) === $year) { + return $this->avoidMutation(); + } + + $week = $this->week(null, $dayOfWeek, $dayOfYear); + $day = $this->dayOfWeek; + $date = $this->year($year); + switch ($date->weekYear(null, $dayOfWeek, $dayOfYear) - $year) { + case 1: + $date = $date->subWeeks(26); + + break; + case -1: + $date = $date->addWeeks(26); + + break; + } + + $date = $date->addWeeks($week - $date->week(null, $dayOfWeek, $dayOfYear))->startOfWeek($dayOfWeek); + + if ($date->dayOfWeek === $day) { + return $date; + } + + return $date->next($day); + } + + $year = $this->year; + $day = $this->dayOfYear; + $date = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + + if ($date->year === $year && $day < $date->dayOfYear) { + return $year - 1; + } + + $date = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + + if ($date->year === $year && $day >= $date->dayOfYear) { + return $year + 1; + } + + return $year; + } + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null) + { + return $this->weeksInYear( + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } + + /** + * Get the number of weeks of the current week-year using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) + * @param int|null $dayOfYear first day of year included in the week #1 + * + * @return int + */ + public function weeksInYear($dayOfWeek = null, $dayOfYear = null) + { + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + $year = $this->year; + $start = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $startDay = $start->dayOfYear; + if ($start->year !== $year) { + $startDay -= $start->daysInYear; + } + $end = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $endDay = $end->dayOfYear; + if ($end->year !== $year) { + $endDay += $this->daysInYear; + } + + return (int) round(($endDay - $startDay) / 7); + } + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use US format if no settings + * given (Sunday / Jan 6). + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function week($week = null, $dayOfWeek = null, $dayOfYear = null) + { + $date = $this; + $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; + $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; + + if ($week !== null) { + return $date->addWeeks(round($week) - $this->week(null, $dayOfWeek, $dayOfYear)); + } + + $start = $date->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + $end = $date->avoidMutation()->startOfWeek($dayOfWeek); + if ($start > $end) { + $start = $start->subWeeks(26)->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); + } + $week = (int) ($start->diffInDays($end) / 7 + 1); + + return $week > $end->weeksInYear($dayOfWeek, $dayOfYear) ? 1 : $week; + } + + /** + * Get/set the week number using given first day of week and first + * day of year included in the first week. Or use ISO format if no settings + * given. + * + * @param int|null $week + * @param int|null $dayOfWeek + * @param int|null $dayOfYear + * + * @return int|static + */ + public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null) + { + return $this->week( + $week, + $dayOfWeek ?? 1, + $dayOfYear ?? 4 + ); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Translator.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Translator.php new file mode 100644 index 00000000000..491c9e72048 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Translator.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use ReflectionMethod; +use Symfony\Component\Translation; +use Symfony\Contracts\Translation\TranslatorInterface; + +$transMethod = new ReflectionMethod( + class_exists(TranslatorInterface::class) + ? TranslatorInterface::class + : Translation\Translator::class, + 'trans' +); + +require $transMethod->hasReturnType() + ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php' + : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php'; + +class Translator extends LazyTranslator +{ + // Proxy dynamically loaded LazyTranslator in a static way +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php new file mode 100644 index 00000000000..ad36c6704f1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\ImmutableException; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +class TranslatorImmutable extends Translator +{ + /** @var bool */ + private $constructed = false; + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->constructed = true; + } + + /** + * @codeCoverageIgnore + */ + public function setDirectories(array $directories) + { + $this->disallowMutation(__METHOD__); + + return parent::setDirectories($directories); + } + + public function setLocale($locale) + { + $this->disallowMutation(__METHOD__); + + return parent::setLocale($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setMessages($locale, $messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setMessages($locale, $messages); + } + + /** + * @codeCoverageIgnore + */ + public function setTranslations($messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setTranslations($messages); + } + + /** + * @codeCoverageIgnore + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->disallowMutation(__METHOD__); + + parent::setConfigCacheFactory($configCacheFactory); + } + + public function resetMessages($locale = null) + { + $this->disallowMutation(__METHOD__); + + return parent::resetMessages($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setFallbackLocales(array $locales) + { + $this->disallowMutation(__METHOD__); + + parent::setFallbackLocales($locales); + } + + private function disallowMutation($method) + { + if ($this->constructed) { + throw new ImmutableException($method.' not allowed on '.static::class); + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php new file mode 100644 index 00000000000..ef4dee8e287 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Mark translator using strong type from symfony/translation >= 6. + */ +interface TranslatorStrongTypeInterface +{ + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages'); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/.gitignore b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/.gitignore new file mode 100644 index 00000000000..c49a5d8df5c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/CHANGELOG.md b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/CHANGELOG.md new file mode 100644 index 00000000000..7932e26132d --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/CHANGELOG.md @@ -0,0 +1,5 @@ +CHANGELOG +========= + +The changelog is maintained for all Symfony contracts at the following URL: +https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/LICENSE b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/LICENSE new file mode 100644 index 00000000000..406242ff285 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020-2022 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/README.md b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/README.md new file mode 100644 index 00000000000..4957933a6cc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/README.md @@ -0,0 +1,26 @@ +Symfony Deprecation Contracts +============================= + +A generic function and convention to trigger deprecation notices. + +This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices. + +By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, +the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments. + +The function requires at least 3 arguments: + - the name of the Composer package that is triggering the deprecation + - the version of the package that introduced the deprecation + - the message of the deprecation + - more arguments can be provided: they will be inserted in the message using `printf()` formatting + +Example: +```php +trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin'); +``` + +This will generate the following message: +`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` + +While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty +`function trigger_deprecation() {}` in your application. diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/composer.json b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/composer.json new file mode 100644 index 00000000000..cc7cc12372f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/composer.json @@ -0,0 +1,35 @@ +{ + "name": "symfony/deprecation-contracts", + "type": "library", + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/function.php b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/function.php new file mode 100644 index 00000000000..d4371504a03 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/deprecation-contracts/function.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (!function_exists('trigger_deprecation')) { + /** + * Triggers a silenced deprecation notice. + * + * @param string $package The name of the Composer package that is triggering the deprecation + * @param string $version The version of the package that introduced the deprecation + * @param string $message The message of the deprecation + * @param mixed ...$args Values to insert in the message using printf() formatting + * + * @author Nicolas Grekas + */ + function trigger_deprecation(string $package, string $version, string $message, ...$args): void + { + @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/Ctype.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/Ctype.php new file mode 100644 index 00000000000..ba75a2c95fc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/Ctype.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Ctype; + +/** + * Ctype implementation through regex. + * + * @internal + * + * @author Gert de Pagter + */ +final class Ctype +{ + /** + * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. + * + * @see https://php.net/ctype-alnum + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_alnum($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is a letter, FALSE otherwise. + * + * @see https://php.net/ctype-alpha + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_alpha($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); + } + + /** + * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. + * + * @see https://php.net/ctype-cntrl + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_cntrl($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); + } + + /** + * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. + * + * @see https://php.net/ctype-digit + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_digit($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. + * + * @see https://php.net/ctype-graph + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_graph($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); + } + + /** + * Returns TRUE if every character in text is a lowercase letter. + * + * @see https://php.net/ctype-lower + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_lower($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); + } + + /** + * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. + * + * @see https://php.net/ctype-print + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_print($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); + } + + /** + * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. + * + * @see https://php.net/ctype-punct + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_punct($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); + } + + /** + * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. + * + * @see https://php.net/ctype-space + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_space($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); + } + + /** + * Returns TRUE if every character in text is an uppercase letter. + * + * @see https://php.net/ctype-upper + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_upper($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); + } + + /** + * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. + * + * @see https://php.net/ctype-xdigit + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_xdigit($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); + } + + /** + * Converts integers to their char versions according to normal ctype behaviour, if needed. + * + * If an integer between -128 and 255 inclusive is provided, + * it is interpreted as the ASCII value of a single character + * (negative values have 256 added in order to allow characters in the Extended ASCII range). + * Any other integer is interpreted as a string containing the decimal digits of the integer. + * + * @param mixed $int + * @param string $function + * + * @return mixed + */ + private static function convert_int_to_char_for_ctype($int, $function) + { + if (!\is_int($int)) { + return $int; + } + + if ($int < -128 || $int > 255) { + return (string) $int; + } + + if (\PHP_VERSION_ID >= 80100) { + @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED); + } + + if ($int < 0) { + $int += 256; + } + + return \chr($int); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/LICENSE b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/LICENSE new file mode 100644 index 00000000000..3f853aaf35f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/README.md b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/README.md new file mode 100644 index 00000000000..b144d03c3c6 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Ctype +======================== + +This component provides `ctype_*` functions to users who run php versions without the ctype extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 00000000000..d54524b31b4 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('ctype_alnum')) { + function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } +} +if (!function_exists('ctype_alpha')) { + function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } +} +if (!function_exists('ctype_cntrl')) { + function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } +} +if (!function_exists('ctype_digit')) { + function ctype_digit($text) { return p\Ctype::ctype_digit($text); } +} +if (!function_exists('ctype_graph')) { + function ctype_graph($text) { return p\Ctype::ctype_graph($text); } +} +if (!function_exists('ctype_lower')) { + function ctype_lower($text) { return p\Ctype::ctype_lower($text); } +} +if (!function_exists('ctype_print')) { + function ctype_print($text) { return p\Ctype::ctype_print($text); } +} +if (!function_exists('ctype_punct')) { + function ctype_punct($text) { return p\Ctype::ctype_punct($text); } +} +if (!function_exists('ctype_space')) { + function ctype_space($text) { return p\Ctype::ctype_space($text); } +} +if (!function_exists('ctype_upper')) { + function ctype_upper($text) { return p\Ctype::ctype_upper($text); } +} +if (!function_exists('ctype_xdigit')) { + function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap80.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap80.php new file mode 100644 index 00000000000..ab2f8611dac --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/bootstrap80.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (!function_exists('ctype_alnum')) { + function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } +} +if (!function_exists('ctype_alpha')) { + function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } +} +if (!function_exists('ctype_cntrl')) { + function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } +} +if (!function_exists('ctype_digit')) { + function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } +} +if (!function_exists('ctype_graph')) { + function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } +} +if (!function_exists('ctype_lower')) { + function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } +} +if (!function_exists('ctype_print')) { + function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } +} +if (!function_exists('ctype_punct')) { + function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } +} +if (!function_exists('ctype_space')) { + function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } +} +if (!function_exists('ctype_upper')) { + function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } +} +if (!function_exists('ctype_xdigit')) { + function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/composer.json b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/composer.json new file mode 100644 index 00000000000..ee5c931cd1c --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-ctype/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/polyfill-ctype", + "type": "library", + "description": "Symfony polyfill for ctype functions", + "keywords": ["polyfill", "compatibility", "portable", "ctype"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/LICENSE b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 00000000000..4cd8bdd3007 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Mbstring.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 00000000000..693749f22b8 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,873 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + public const MB_CASE_FOLD = \PHP_INT_MAX; + + private const CASE_FOLD = [ + ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], + ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], + ]; + + private static $encodingList = ['ASCII', 'UTF-8']; + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) + { + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return \iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return self::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (\MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); + } else { + if (\MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $normalizedEncoding = self::getEncoding($encoding); + + if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { + self::$internalEncoding = $normalizedEncoding; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($normalizedLang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $normalizedLang; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); + } + + public static function mb_list_encodings() + { + return ['UTF-8']; + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return ['utf8']; + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @\iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + if (80000 > \PHP_VERSION_ID) { + trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); + + return false; + } + + return 0; + } + + return \iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = '' !== $needle || 80000 > \PHP_VERSION_ID + ? \iconv_strrpos($haystack, $needle, $encoding) + : self::mb_strlen($haystack, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + if (80000 > \PHP_VERSION_ID) { + trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); + return false; + } + + throw new \ValueError('Argument #2 ($length) must be greater than 0'); + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + } + + $result = []; + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (null === $c) { + return 'none'; + } + if (0 === strcasecmp($c, 'none')) { + return true; + } + if (80000 > \PHP_VERSION_ID) { + return false; + } + if (\is_int($c) || 'long' === $c || 'entity' === $c) { + return false; + } + + throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = \iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = \iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) \iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + $pos = strrpos($haystack, $needle); + } else { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = \iconv_strrpos($haystack, $needle, $encoding); + } + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = [ + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ]; + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/README.md b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 00000000000..478b40da25e --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 00000000000..fac60b081a1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i̇', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ꭰ' => 'ꭰ', + 'Ꭱ' => 'ꭱ', + 'Ꭲ' => 'ꭲ', + 'Ꭳ' => 'ꭳ', + 'Ꭴ' => 'ꭴ', + 'Ꭵ' => 'ꭵ', + 'Ꭶ' => 'ꭶ', + 'Ꭷ' => 'ꭷ', + 'Ꭸ' => 'ꭸ', + 'Ꭹ' => 'ꭹ', + 'Ꭺ' => 'ꭺ', + 'Ꭻ' => 'ꭻ', + 'Ꭼ' => 'ꭼ', + 'Ꭽ' => 'ꭽ', + 'Ꭾ' => 'ꭾ', + 'Ꭿ' => 'ꭿ', + 'Ꮀ' => 'ꮀ', + 'Ꮁ' => 'ꮁ', + 'Ꮂ' => 'ꮂ', + 'Ꮃ' => 'ꮃ', + 'Ꮄ' => 'ꮄ', + 'Ꮅ' => 'ꮅ', + 'Ꮆ' => 'ꮆ', + 'Ꮇ' => 'ꮇ', + 'Ꮈ' => 'ꮈ', + 'Ꮉ' => 'ꮉ', + 'Ꮊ' => 'ꮊ', + 'Ꮋ' => 'ꮋ', + 'Ꮌ' => 'ꮌ', + 'Ꮍ' => 'ꮍ', + 'Ꮎ' => 'ꮎ', + 'Ꮏ' => 'ꮏ', + 'Ꮐ' => 'ꮐ', + 'Ꮑ' => 'ꮑ', + 'Ꮒ' => 'ꮒ', + 'Ꮓ' => 'ꮓ', + 'Ꮔ' => 'ꮔ', + 'Ꮕ' => 'ꮕ', + 'Ꮖ' => 'ꮖ', + 'Ꮗ' => 'ꮗ', + 'Ꮘ' => 'ꮘ', + 'Ꮙ' => 'ꮙ', + 'Ꮚ' => 'ꮚ', + 'Ꮛ' => 'ꮛ', + 'Ꮜ' => 'ꮜ', + 'Ꮝ' => 'ꮝ', + 'Ꮞ' => 'ꮞ', + 'Ꮟ' => 'ꮟ', + 'Ꮠ' => 'ꮠ', + 'Ꮡ' => 'ꮡ', + 'Ꮢ' => 'ꮢ', + 'Ꮣ' => 'ꮣ', + 'Ꮤ' => 'ꮤ', + 'Ꮥ' => 'ꮥ', + 'Ꮦ' => 'ꮦ', + 'Ꮧ' => 'ꮧ', + 'Ꮨ' => 'ꮨ', + 'Ꮩ' => 'ꮩ', + 'Ꮪ' => 'ꮪ', + 'Ꮫ' => 'ꮫ', + 'Ꮬ' => 'ꮬ', + 'Ꮭ' => 'ꮭ', + 'Ꮮ' => 'ꮮ', + 'Ꮯ' => 'ꮯ', + 'Ꮰ' => 'ꮰ', + 'Ꮱ' => 'ꮱ', + 'Ꮲ' => 'ꮲ', + 'Ꮳ' => 'ꮳ', + 'Ꮴ' => 'ꮴ', + 'Ꮵ' => 'ꮵ', + 'Ꮶ' => 'ꮶ', + 'Ꮷ' => 'ꮷ', + 'Ꮸ' => 'ꮸ', + 'Ꮹ' => 'ꮹ', + 'Ꮺ' => 'ꮺ', + 'Ꮻ' => 'ꮻ', + 'Ꮼ' => 'ꮼ', + 'Ꮽ' => 'ꮽ', + 'Ꮾ' => 'ꮾ', + 'Ꮿ' => 'ꮿ', + 'Ᏸ' => 'ᏸ', + 'Ᏹ' => 'ᏹ', + 'Ᏺ' => 'ᏺ', + 'Ᏻ' => 'ᏻ', + 'Ᏼ' => 'ᏼ', + 'Ᏽ' => 'ᏽ', + 'Ა' => 'ა', + 'Ბ' => 'ბ', + 'Გ' => 'გ', + 'Დ' => 'დ', + 'Ე' => 'ე', + 'Ვ' => 'ვ', + 'Ზ' => 'ზ', + 'Თ' => 'თ', + 'Ი' => 'ი', + 'Კ' => 'კ', + 'Ლ' => 'ლ', + 'Მ' => 'მ', + 'Ნ' => 'ნ', + 'Ო' => 'ო', + 'Პ' => 'პ', + 'Ჟ' => 'ჟ', + 'Რ' => 'რ', + 'Ს' => 'ს', + 'Ტ' => 'ტ', + 'Უ' => 'უ', + 'Ფ' => 'ფ', + 'Ქ' => 'ქ', + 'Ღ' => 'ღ', + 'Ყ' => 'ყ', + 'Შ' => 'შ', + 'Ჩ' => 'ჩ', + 'Ც' => 'ც', + 'Ძ' => 'ძ', + 'Წ' => 'წ', + 'Ჭ' => 'ჭ', + 'Ხ' => 'ხ', + 'Ჯ' => 'ჯ', + 'Ჰ' => 'ჰ', + 'Ჱ' => 'ჱ', + 'Ჲ' => 'ჲ', + 'Ჳ' => 'ჳ', + 'Ჴ' => 'ჴ', + 'Ჵ' => 'ჵ', + 'Ჶ' => 'ჶ', + 'Ჷ' => 'ჷ', + 'Ჸ' => 'ჸ', + 'Ჹ' => 'ჹ', + 'Ჺ' => 'ჺ', + 'Ჽ' => 'ჽ', + 'Ჾ' => 'ჾ', + 'Ჿ' => 'ჿ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ɪ' => 'ɪ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'Ʝ' => 'ʝ', + 'Ꭓ' => 'ꭓ', + 'Ꞵ' => 'ꞵ', + 'Ꞷ' => 'ꞷ', + 'Ꞹ' => 'ꞹ', + 'Ꞻ' => 'ꞻ', + 'Ꞽ' => 'ꞽ', + 'Ꞿ' => 'ꞿ', + 'Ꟃ' => 'ꟃ', + 'Ꞔ' => 'ꞔ', + 'Ʂ' => 'ʂ', + 'Ᶎ' => 'ᶎ', + 'Ꟈ' => 'ꟈ', + 'Ꟊ' => 'ꟊ', + 'Ꟶ' => 'ꟶ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𐒰' => '𐓘', + '𐒱' => '𐓙', + '𐒲' => '𐓚', + '𐒳' => '𐓛', + '𐒴' => '𐓜', + '𐒵' => '𐓝', + '𐒶' => '𐓞', + '𐒷' => '𐓟', + '𐒸' => '𐓠', + '𐒹' => '𐓡', + '𐒺' => '𐓢', + '𐒻' => '𐓣', + '𐒼' => '𐓤', + '𐒽' => '𐓥', + '𐒾' => '𐓦', + '𐒿' => '𐓧', + '𐓀' => '𐓨', + '𐓁' => '𐓩', + '𐓂' => '𐓪', + '𐓃' => '𐓫', + '𐓄' => '𐓬', + '𐓅' => '𐓭', + '𐓆' => '𐓮', + '𐓇' => '𐓯', + '𐓈' => '𐓰', + '𐓉' => '𐓱', + '𐓊' => '𐓲', + '𐓋' => '𐓳', + '𐓌' => '𐓴', + '𐓍' => '𐓵', + '𐓎' => '𐓶', + '𐓏' => '𐓷', + '𐓐' => '𐓸', + '𐓑' => '𐓹', + '𐓒' => '𐓺', + '𐓓' => '𐓻', + '𐲀' => '𐳀', + '𐲁' => '𐳁', + '𐲂' => '𐳂', + '𐲃' => '𐳃', + '𐲄' => '𐳄', + '𐲅' => '𐳅', + '𐲆' => '𐳆', + '𐲇' => '𐳇', + '𐲈' => '𐳈', + '𐲉' => '𐳉', + '𐲊' => '𐳊', + '𐲋' => '𐳋', + '𐲌' => '𐳌', + '𐲍' => '𐳍', + '𐲎' => '𐳎', + '𐲏' => '𐳏', + '𐲐' => '𐳐', + '𐲑' => '𐳑', + '𐲒' => '𐳒', + '𐲓' => '𐳓', + '𐲔' => '𐳔', + '𐲕' => '𐳕', + '𐲖' => '𐳖', + '𐲗' => '𐳗', + '𐲘' => '𐳘', + '𐲙' => '𐳙', + '𐲚' => '𐳚', + '𐲛' => '𐳛', + '𐲜' => '𐳜', + '𐲝' => '𐳝', + '𐲞' => '𐳞', + '𐲟' => '𐳟', + '𐲠' => '𐳠', + '𐲡' => '𐳡', + '𐲢' => '𐳢', + '𐲣' => '𐳣', + '𐲤' => '𐳤', + '𐲥' => '𐳥', + '𐲦' => '𐳦', + '𐲧' => '𐳧', + '𐲨' => '𐳨', + '𐲩' => '𐳩', + '𐲪' => '𐳪', + '𐲫' => '𐳫', + '𐲬' => '𐳬', + '𐲭' => '𐳭', + '𐲮' => '𐳮', + '𐲯' => '𐳯', + '𐲰' => '𐳰', + '𐲱' => '𐳱', + '𐲲' => '𐳲', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', + '𖹀' => '𖹠', + '𖹁' => '𖹡', + '𖹂' => '𖹢', + '𖹃' => '𖹣', + '𖹄' => '𖹤', + '𖹅' => '𖹥', + '𖹆' => '𖹦', + '𖹇' => '𖹧', + '𖹈' => '𖹨', + '𖹉' => '𖹩', + '𖹊' => '𖹪', + '𖹋' => '𖹫', + '𖹌' => '𖹬', + '𖹍' => '𖹭', + '𖹎' => '𖹮', + '𖹏' => '𖹯', + '𖹐' => '𖹰', + '𖹑' => '𖹱', + '𖹒' => '𖹲', + '𖹓' => '𖹳', + '𖹔' => '𖹴', + '𖹕' => '𖹵', + '𖹖' => '𖹶', + '𖹗' => '𖹷', + '𖹘' => '𖹸', + '𖹙' => '𖹹', + '𖹚' => '𖹺', + '𖹛' => '𖹻', + '𖹜' => '𖹼', + '𖹝' => '𖹽', + '𖹞' => '𖹾', + '𖹟' => '𖹿', + '𞤀' => '𞤢', + '𞤁' => '𞤣', + '𞤂' => '𞤤', + '𞤃' => '𞤥', + '𞤄' => '𞤦', + '𞤅' => '𞤧', + '𞤆' => '𞤨', + '𞤇' => '𞤩', + '𞤈' => '𞤪', + '𞤉' => '𞤫', + '𞤊' => '𞤬', + '𞤋' => '𞤭', + '𞤌' => '𞤮', + '𞤍' => '𞤯', + '𞤎' => '𞤰', + '𞤏' => '𞤱', + '𞤐' => '𞤲', + '𞤑' => '𞤳', + '𞤒' => '𞤴', + '𞤓' => '𞤵', + '𞤔' => '𞤶', + '𞤕' => '𞤷', + '𞤖' => '𞤸', + '𞤗' => '𞤹', + '𞤘' => '𞤺', + '𞤙' => '𞤻', + '𞤚' => '𞤼', + '𞤛' => '𞤽', + '𞤜' => '𞤾', + '𞤝' => '𞤿', + '𞤞' => '𞥀', + '𞤟' => '𞥁', + '𞤠' => '𞥂', + '𞤡' => '𞥃', +); diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 00000000000..2a8f6e73b99 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɪ' => 'Ɪ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʂ' => 'Ʂ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʝ' => 'Ʝ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ა' => 'Ა', + 'ბ' => 'Ბ', + 'გ' => 'Გ', + 'დ' => 'Დ', + 'ე' => 'Ე', + 'ვ' => 'Ვ', + 'ზ' => 'Ზ', + 'თ' => 'Თ', + 'ი' => 'Ი', + 'კ' => 'Კ', + 'ლ' => 'Ლ', + 'მ' => 'Მ', + 'ნ' => 'Ნ', + 'ო' => 'Ო', + 'პ' => 'Პ', + 'ჟ' => 'Ჟ', + 'რ' => 'Რ', + 'ს' => 'Ს', + 'ტ' => 'Ტ', + 'უ' => 'Უ', + 'ფ' => 'Ფ', + 'ქ' => 'Ქ', + 'ღ' => 'Ღ', + 'ყ' => 'Ყ', + 'შ' => 'Შ', + 'ჩ' => 'Ჩ', + 'ც' => 'Ც', + 'ძ' => 'Ძ', + 'წ' => 'Წ', + 'ჭ' => 'Ჭ', + 'ხ' => 'Ხ', + 'ჯ' => 'Ჯ', + 'ჰ' => 'Ჰ', + 'ჱ' => 'Ჱ', + 'ჲ' => 'Ჲ', + 'ჳ' => 'Ჳ', + 'ჴ' => 'Ჴ', + 'ჵ' => 'Ჵ', + 'ჶ' => 'Ჶ', + 'ჷ' => 'Ჷ', + 'ჸ' => 'Ჸ', + 'ჹ' => 'Ჹ', + 'ჺ' => 'Ჺ', + 'ჽ' => 'Ჽ', + 'ჾ' => 'Ჾ', + 'ჿ' => 'Ჿ', + 'ᏸ' => 'Ᏸ', + 'ᏹ' => 'Ᏹ', + 'ᏺ' => 'Ᏺ', + 'ᏻ' => 'Ᏻ', + 'ᏼ' => 'Ᏼ', + 'ᏽ' => 'Ᏽ', + 'ᲀ' => 'В', + 'ᲁ' => 'Д', + 'ᲂ' => 'О', + 'ᲃ' => 'С', + 'ᲄ' => 'Т', + 'ᲅ' => 'Т', + 'ᲆ' => 'Ъ', + 'ᲇ' => 'Ѣ', + 'ᲈ' => 'Ꙋ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ᶎ' => 'Ᶎ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ἈΙ', + 'ᾁ' => 'ἉΙ', + 'ᾂ' => 'ἊΙ', + 'ᾃ' => 'ἋΙ', + 'ᾄ' => 'ἌΙ', + 'ᾅ' => 'ἍΙ', + 'ᾆ' => 'ἎΙ', + 'ᾇ' => 'ἏΙ', + 'ᾐ' => 'ἨΙ', + 'ᾑ' => 'ἩΙ', + 'ᾒ' => 'ἪΙ', + 'ᾓ' => 'ἫΙ', + 'ᾔ' => 'ἬΙ', + 'ᾕ' => 'ἭΙ', + 'ᾖ' => 'ἮΙ', + 'ᾗ' => 'ἯΙ', + 'ᾠ' => 'ὨΙ', + 'ᾡ' => 'ὩΙ', + 'ᾢ' => 'ὪΙ', + 'ᾣ' => 'ὫΙ', + 'ᾤ' => 'ὬΙ', + 'ᾥ' => 'ὭΙ', + 'ᾦ' => 'ὮΙ', + 'ᾧ' => 'ὯΙ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ΑΙ', + 'ι' => 'Ι', + 'ῃ' => 'ΗΙ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ΩΙ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞔ' => 'Ꞔ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'ꞵ' => 'Ꞵ', + 'ꞷ' => 'Ꞷ', + 'ꞹ' => 'Ꞹ', + 'ꞻ' => 'Ꞻ', + 'ꞽ' => 'Ꞽ', + 'ꞿ' => 'Ꞿ', + 'ꟃ' => 'Ꟃ', + 'ꟈ' => 'Ꟈ', + 'ꟊ' => 'Ꟊ', + 'ꟶ' => 'Ꟶ', + 'ꭓ' => 'Ꭓ', + 'ꭰ' => 'Ꭰ', + 'ꭱ' => 'Ꭱ', + 'ꭲ' => 'Ꭲ', + 'ꭳ' => 'Ꭳ', + 'ꭴ' => 'Ꭴ', + 'ꭵ' => 'Ꭵ', + 'ꭶ' => 'Ꭶ', + 'ꭷ' => 'Ꭷ', + 'ꭸ' => 'Ꭸ', + 'ꭹ' => 'Ꭹ', + 'ꭺ' => 'Ꭺ', + 'ꭻ' => 'Ꭻ', + 'ꭼ' => 'Ꭼ', + 'ꭽ' => 'Ꭽ', + 'ꭾ' => 'Ꭾ', + 'ꭿ' => 'Ꭿ', + 'ꮀ' => 'Ꮀ', + 'ꮁ' => 'Ꮁ', + 'ꮂ' => 'Ꮂ', + 'ꮃ' => 'Ꮃ', + 'ꮄ' => 'Ꮄ', + 'ꮅ' => 'Ꮅ', + 'ꮆ' => 'Ꮆ', + 'ꮇ' => 'Ꮇ', + 'ꮈ' => 'Ꮈ', + 'ꮉ' => 'Ꮉ', + 'ꮊ' => 'Ꮊ', + 'ꮋ' => 'Ꮋ', + 'ꮌ' => 'Ꮌ', + 'ꮍ' => 'Ꮍ', + 'ꮎ' => 'Ꮎ', + 'ꮏ' => 'Ꮏ', + 'ꮐ' => 'Ꮐ', + 'ꮑ' => 'Ꮑ', + 'ꮒ' => 'Ꮒ', + 'ꮓ' => 'Ꮓ', + 'ꮔ' => 'Ꮔ', + 'ꮕ' => 'Ꮕ', + 'ꮖ' => 'Ꮖ', + 'ꮗ' => 'Ꮗ', + 'ꮘ' => 'Ꮘ', + 'ꮙ' => 'Ꮙ', + 'ꮚ' => 'Ꮚ', + 'ꮛ' => 'Ꮛ', + 'ꮜ' => 'Ꮜ', + 'ꮝ' => 'Ꮝ', + 'ꮞ' => 'Ꮞ', + 'ꮟ' => 'Ꮟ', + 'ꮠ' => 'Ꮠ', + 'ꮡ' => 'Ꮡ', + 'ꮢ' => 'Ꮢ', + 'ꮣ' => 'Ꮣ', + 'ꮤ' => 'Ꮤ', + 'ꮥ' => 'Ꮥ', + 'ꮦ' => 'Ꮦ', + 'ꮧ' => 'Ꮧ', + 'ꮨ' => 'Ꮨ', + 'ꮩ' => 'Ꮩ', + 'ꮪ' => 'Ꮪ', + 'ꮫ' => 'Ꮫ', + 'ꮬ' => 'Ꮬ', + 'ꮭ' => 'Ꮭ', + 'ꮮ' => 'Ꮮ', + 'ꮯ' => 'Ꮯ', + 'ꮰ' => 'Ꮰ', + 'ꮱ' => 'Ꮱ', + 'ꮲ' => 'Ꮲ', + 'ꮳ' => 'Ꮳ', + 'ꮴ' => 'Ꮴ', + 'ꮵ' => 'Ꮵ', + 'ꮶ' => 'Ꮶ', + 'ꮷ' => 'Ꮷ', + 'ꮸ' => 'Ꮸ', + 'ꮹ' => 'Ꮹ', + 'ꮺ' => 'Ꮺ', + 'ꮻ' => 'Ꮻ', + 'ꮼ' => 'Ꮼ', + 'ꮽ' => 'Ꮽ', + 'ꮾ' => 'Ꮾ', + 'ꮿ' => 'Ꮿ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𐓘' => '𐒰', + '𐓙' => '𐒱', + '𐓚' => '𐒲', + '𐓛' => '𐒳', + '𐓜' => '𐒴', + '𐓝' => '𐒵', + '𐓞' => '𐒶', + '𐓟' => '𐒷', + '𐓠' => '𐒸', + '𐓡' => '𐒹', + '𐓢' => '𐒺', + '𐓣' => '𐒻', + '𐓤' => '𐒼', + '𐓥' => '𐒽', + '𐓦' => '𐒾', + '𐓧' => '𐒿', + '𐓨' => '𐓀', + '𐓩' => '𐓁', + '𐓪' => '𐓂', + '𐓫' => '𐓃', + '𐓬' => '𐓄', + '𐓭' => '𐓅', + '𐓮' => '𐓆', + '𐓯' => '𐓇', + '𐓰' => '𐓈', + '𐓱' => '𐓉', + '𐓲' => '𐓊', + '𐓳' => '𐓋', + '𐓴' => '𐓌', + '𐓵' => '𐓍', + '𐓶' => '𐓎', + '𐓷' => '𐓏', + '𐓸' => '𐓐', + '𐓹' => '𐓑', + '𐓺' => '𐓒', + '𐓻' => '𐓓', + '𐳀' => '𐲀', + '𐳁' => '𐲁', + '𐳂' => '𐲂', + '𐳃' => '𐲃', + '𐳄' => '𐲄', + '𐳅' => '𐲅', + '𐳆' => '𐲆', + '𐳇' => '𐲇', + '𐳈' => '𐲈', + '𐳉' => '𐲉', + '𐳊' => '𐲊', + '𐳋' => '𐲋', + '𐳌' => '𐲌', + '𐳍' => '𐲍', + '𐳎' => '𐲎', + '𐳏' => '𐲏', + '𐳐' => '𐲐', + '𐳑' => '𐲑', + '𐳒' => '𐲒', + '𐳓' => '𐲓', + '𐳔' => '𐲔', + '𐳕' => '𐲕', + '𐳖' => '𐲖', + '𐳗' => '𐲗', + '𐳘' => '𐲘', + '𐳙' => '𐲙', + '𐳚' => '𐲚', + '𐳛' => '𐲛', + '𐳜' => '𐲜', + '𐳝' => '𐲝', + '𐳞' => '𐲞', + '𐳟' => '𐲟', + '𐳠' => '𐲠', + '𐳡' => '𐲡', + '𐳢' => '𐲢', + '𐳣' => '𐲣', + '𐳤' => '𐲤', + '𐳥' => '𐲥', + '𐳦' => '𐲦', + '𐳧' => '𐲧', + '𐳨' => '𐲨', + '𐳩' => '𐲩', + '𐳪' => '𐲪', + '𐳫' => '𐲫', + '𐳬' => '𐲬', + '𐳭' => '𐲭', + '𐳮' => '𐲮', + '𐳯' => '𐲯', + '𐳰' => '𐲰', + '𐳱' => '𐲱', + '𐳲' => '𐲲', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', + '𖹠' => '𖹀', + '𖹡' => '𖹁', + '𖹢' => '𖹂', + '𖹣' => '𖹃', + '𖹤' => '𖹄', + '𖹥' => '𖹅', + '𖹦' => '𖹆', + '𖹧' => '𖹇', + '𖹨' => '𖹈', + '𖹩' => '𖹉', + '𖹪' => '𖹊', + '𖹫' => '𖹋', + '𖹬' => '𖹌', + '𖹭' => '𖹍', + '𖹮' => '𖹎', + '𖹯' => '𖹏', + '𖹰' => '𖹐', + '𖹱' => '𖹑', + '𖹲' => '𖹒', + '𖹳' => '𖹓', + '𖹴' => '𖹔', + '𖹵' => '𖹕', + '𖹶' => '𖹖', + '𖹷' => '𖹗', + '𖹸' => '𖹘', + '𖹹' => '𖹙', + '𖹺' => '𖹚', + '𖹻' => '𖹛', + '𖹼' => '𖹜', + '𖹽' => '𖹝', + '𖹾' => '𖹞', + '𖹿' => '𖹟', + '𞤢' => '𞤀', + '𞤣' => '𞤁', + '𞤤' => '𞤂', + '𞤥' => '𞤃', + '𞤦' => '𞤄', + '𞤧' => '𞤅', + '𞤨' => '𞤆', + '𞤩' => '𞤇', + '𞤪' => '𞤈', + '𞤫' => '𞤉', + '𞤬' => '𞤊', + '𞤭' => '𞤋', + '𞤮' => '𞤌', + '𞤯' => '𞤍', + '𞤰' => '𞤎', + '𞤱' => '𞤏', + '𞤲' => '𞤐', + '𞤳' => '𞤑', + '𞤴' => '𞤒', + '𞤵' => '𞤓', + '𞤶' => '𞤔', + '𞤷' => '𞤕', + '𞤸' => '𞤖', + '𞤹' => '𞤗', + '𞤺' => '𞤘', + '𞤻' => '𞤙', + '𞤼' => '𞤚', + '𞤽' => '𞤛', + '𞤾' => '𞤜', + '𞤿' => '𞤝', + '𞥀' => '𞤞', + '𞥁' => '𞤟', + '𞥂' => '𞤠', + '𞥃' => '𞤡', + 'ß' => 'SS', + 'ff' => 'FF', + 'fi' => 'FI', + 'fl' => 'FL', + 'ffi' => 'FFI', + 'ffl' => 'FFL', + 'ſt' => 'ST', + 'st' => 'ST', + 'և' => 'ԵՒ', + 'ﬓ' => 'ՄՆ', + 'ﬔ' => 'ՄԵ', + 'ﬕ' => 'ՄԻ', + 'ﬖ' => 'ՎՆ', + 'ﬗ' => 'ՄԽ', + 'ʼn' => 'ʼN', + 'ΐ' => 'Ϊ́', + 'ΰ' => 'Ϋ́', + 'ǰ' => 'J̌', + 'ẖ' => 'H̱', + 'ẗ' => 'T̈', + 'ẘ' => 'W̊', + 'ẙ' => 'Y̊', + 'ẚ' => 'Aʾ', + 'ὐ' => 'Υ̓', + 'ὒ' => 'Υ̓̀', + 'ὔ' => 'Υ̓́', + 'ὖ' => 'Υ̓͂', + 'ᾶ' => 'Α͂', + 'ῆ' => 'Η͂', + 'ῒ' => 'Ϊ̀', + 'ΐ' => 'Ϊ́', + 'ῖ' => 'Ι͂', + 'ῗ' => 'Ϊ͂', + 'ῢ' => 'Ϋ̀', + 'ΰ' => 'Ϋ́', + 'ῤ' => 'Ρ̓', + 'ῦ' => 'Υ͂', + 'ῧ' => 'Ϋ͂', + 'ῶ' => 'Ω͂', + 'ᾈ' => 'ἈΙ', + 'ᾉ' => 'ἉΙ', + 'ᾊ' => 'ἊΙ', + 'ᾋ' => 'ἋΙ', + 'ᾌ' => 'ἌΙ', + 'ᾍ' => 'ἍΙ', + 'ᾎ' => 'ἎΙ', + 'ᾏ' => 'ἏΙ', + 'ᾘ' => 'ἨΙ', + 'ᾙ' => 'ἩΙ', + 'ᾚ' => 'ἪΙ', + 'ᾛ' => 'ἫΙ', + 'ᾜ' => 'ἬΙ', + 'ᾝ' => 'ἭΙ', + 'ᾞ' => 'ἮΙ', + 'ᾟ' => 'ἯΙ', + 'ᾨ' => 'ὨΙ', + 'ᾩ' => 'ὩΙ', + 'ᾪ' => 'ὪΙ', + 'ᾫ' => 'ὫΙ', + 'ᾬ' => 'ὬΙ', + 'ᾭ' => 'ὭΙ', + 'ᾮ' => 'ὮΙ', + 'ᾯ' => 'ὯΙ', + 'ᾼ' => 'ΑΙ', + 'ῌ' => 'ΗΙ', + 'ῼ' => 'ΩΙ', + 'ᾲ' => 'ᾺΙ', + 'ᾴ' => 'ΆΙ', + 'ῂ' => 'ῊΙ', + 'ῄ' => 'ΉΙ', + 'ῲ' => 'ῺΙ', + 'ῴ' => 'ΏΙ', + 'ᾷ' => 'Α͂Ι', + 'ῇ' => 'Η͂Ι', + 'ῷ' => 'Ω͂Ι', +); diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 00000000000..1fedd1f7c84 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language($language = null) { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap80.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap80.php new file mode 100644 index 00000000000..82f5ac4d0f1 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/composer.json b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 00000000000..9cd2e924e9f --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/LICENSE b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/LICENSE new file mode 100644 index 00000000000..5593b1d84f7 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Php80.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Php80.php new file mode 100644 index 00000000000..362dd1a9596 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Php80.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php80; + +/** + * @author Ion Bazan + * @author Nico Oelgart + * @author Nicolas Grekas + * + * @internal + */ +final class Php80 +{ + public static function fdiv(float $dividend, float $divisor): float + { + return @($dividend / $divisor); + } + + public static function get_debug_type($value): string + { + switch (true) { + case null === $value: return 'null'; + case \is_bool($value): return 'bool'; + case \is_string($value): return 'string'; + case \is_array($value): return 'array'; + case \is_int($value): return 'int'; + case \is_float($value): return 'float'; + case \is_object($value): break; + case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; + default: + if (null === $type = @get_resource_type($value)) { + return 'unknown'; + } + + if ('Unknown' === $type) { + $type = 'closed'; + } + + return "resource ($type)"; + } + + $class = \get_class($value); + + if (false === strpos($class, '@')) { + return $class; + } + + return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; + } + + public static function get_resource_id($res): int + { + if (!\is_resource($res) && null === @get_resource_type($res)) { + throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); + } + + return (int) $res; + } + + public static function preg_last_error_msg(): string + { + switch (preg_last_error()) { + case \PREG_INTERNAL_ERROR: + return 'Internal error'; + case \PREG_BAD_UTF8_ERROR: + return 'Malformed UTF-8 characters, possibly incorrectly encoded'; + case \PREG_BAD_UTF8_OFFSET_ERROR: + return 'The offset did not correspond to the beginning of a valid UTF-8 code point'; + case \PREG_BACKTRACK_LIMIT_ERROR: + return 'Backtrack limit exhausted'; + case \PREG_RECURSION_LIMIT_ERROR: + return 'Recursion limit exhausted'; + case \PREG_JIT_STACKLIMIT_ERROR: + return 'JIT stack limit exhausted'; + case \PREG_NO_ERROR: + return 'No error'; + default: + return 'Unknown error'; + } + } + + public static function str_contains(string $haystack, string $needle): bool + { + return '' === $needle || false !== strpos($haystack, $needle); + } + + public static function str_starts_with(string $haystack, string $needle): bool + { + return 0 === strncmp($haystack, $needle, \strlen($needle)); + } + + public static function str_ends_with(string $haystack, string $needle): bool + { + if ('' === $needle || $needle === $haystack) { + return true; + } + + if ('' === $haystack) { + return false; + } + + $needleLength = \strlen($needle); + + return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength); + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/PhpToken.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/PhpToken.php new file mode 100644 index 00000000000..fe6e6910562 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/PhpToken.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php80; + +/** + * @author Fedonyuk Anton + * + * @internal + */ +class PhpToken implements \Stringable +{ + /** + * @var int + */ + public $id; + + /** + * @var string + */ + public $text; + + /** + * @var int + */ + public $line; + + /** + * @var int + */ + public $pos; + + public function __construct(int $id, string $text, int $line = -1, int $position = -1) + { + $this->id = $id; + $this->text = $text; + $this->line = $line; + $this->pos = $position; + } + + public function getTokenName(): ?string + { + if ('UNKNOWN' === $name = token_name($this->id)) { + $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text; + } + + return $name; + } + + /** + * @param int|string|array $kind + */ + public function is($kind): bool + { + foreach ((array) $kind as $value) { + if (\in_array($value, [$this->id, $this->text], true)) { + return true; + } + } + + return false; + } + + public function isIgnorable(): bool + { + return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true); + } + + public function __toString(): string + { + return (string) $this->text; + } + + /** + * @return static[] + */ + public static function tokenize(string $code, int $flags = 0): array + { + $line = 1; + $position = 0; + $tokens = token_get_all($code, $flags); + foreach ($tokens as $index => $token) { + if (\is_string($token)) { + $id = \ord($token); + $text = $token; + } else { + [$id, $text, $line] = $token; + } + $tokens[$index] = new static($id, $text, $line, $position); + $position += \strlen($text); + } + + return $tokens; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/README.md b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/README.md new file mode 100644 index 00000000000..3816c559d57 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/README.md @@ -0,0 +1,25 @@ +Symfony Polyfill / Php80 +======================== + +This component provides features added to PHP 8.0 core: + +- [`Stringable`](https://php.net/stringable) interface +- [`fdiv`](https://php.net/fdiv) +- [`ValueError`](https://php.net/valueerror) class +- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class +- `FILTER_VALIDATE_BOOL` constant +- [`get_debug_type`](https://php.net/get_debug_type) +- [`PhpToken`](https://php.net/phptoken) class +- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) +- [`str_contains`](https://php.net/str_contains) +- [`str_starts_with`](https://php.net/str_starts_with) +- [`str_ends_with`](https://php.net/str_ends_with) +- [`get_resource_id`](https://php.net/get_resource_id) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php new file mode 100644 index 00000000000..7ea6d2772dc --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php @@ -0,0 +1,22 @@ +flags = $flags; + } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php new file mode 100644 index 00000000000..72f10812b36 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php @@ -0,0 +1,7 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php80 as p; + +if (\PHP_VERSION_ID >= 80000) { + return; +} + +if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { + define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); +} + +if (!function_exists('fdiv')) { + function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } +} +if (!function_exists('preg_last_error_msg')) { + function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } +} +if (!function_exists('str_contains')) { + function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('str_starts_with')) { + function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('str_ends_with')) { + function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('get_debug_type')) { + function get_debug_type($value): string { return p\Php80::get_debug_type($value); } +} +if (!function_exists('get_resource_id')) { + function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } +} diff --git a/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/composer.json b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/composer.json new file mode 100644 index 00000000000..cd3e9b65f46 --- /dev/null +++ b/htdocs/includes/webklex/php-imap/vendor/symfony/polyfill-php80/composer.json @@ -0,0 +1,40 @@ +{ + "name": "symfony/polyfill-php80", + "type": "library", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/htdocs/index.php b/htdocs/index.php index f9bedb661ac..d08e2a0b510 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -106,15 +106,15 @@ if (!empty($conf->global->MAIN_MOTD)) { * Show security warnings */ -// Security warning repertoire install existe (si utilisateur admin) -if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { +// Security warning if install.lock file is missing or if conf file is writable +if (empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { $message = ''; // Check if install lock file is present $lockfile = DOL_DATA_ROOT.'/install.lock'; if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) { $langs->load("errors"); - //if (! empty($message)) $message.='
    '; + //if (!empty($message)) $message.='
    '; $message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } @@ -122,12 +122,12 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { if (is_writable($conffile)) { $langs->load("errors"); //$langs->load("other"); - //if (! empty($message)) $message.='
    '; + //if (!empty($message)) $message.='
    '; $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } if ($message) { - print $message; + print $message.'
    '; //$message.='
    '; //print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install")); } @@ -176,7 +176,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } // Number of commercial customer proposals open (expired) - if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propal', 'lire')) { + if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propal', 'read')) { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $board = new Propal($db); $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); @@ -194,7 +194,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); } - // Number of customer orders a deal + // Number of sales orders a deal if (isModEnabled('commande') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('commande', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $board = new Commande($db); @@ -235,7 +235,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } // Number of supplier invoices (paid) - if (isModEnabled('supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight('fournisseur', 'facture', 'lire')) { + if (isModEnabled('supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight('fournisseur', 'facture', 'lire')) { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $board = new FactureFournisseur($db); $dashboardlines[$board->element] = $board->load_board($user); @@ -255,19 +255,19 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { // Number of cheque to send if (isModEnabled('banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight('banque', 'lire') && !$user->socid) { if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { - include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; + include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $board = new RemiseCheque($db); $dashboardlines[$board->element] = $board->load_board($user); } - if (!empty($conf->prelevement->enabled)) { + if (isModEnabled('prelevement')) { include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; $board = new BonPrelevement($db); - $dashboardlines[$board->element.'_direct_debit'] = $board->load_board($user, 'direct_debit'); + $dashboardlines[$board->element . '_direct_debit'] = $board->load_board($user, 'direct_debit'); } - if (!empty($conf->paymentbybanktransfer->enabled)) { + if (isModEnabled('paymentbybanktransfer')) { include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; $board = new BonPrelevement($db); - $dashboardlines[$board->element.'_credit_transfer'] = $board->load_board($user, 'credit_transfer'); + $dashboardlines[$board->element . '_credit_transfer'] = $board->load_board($user, 'credit_transfer'); } } @@ -558,7 +558,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } $textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate); - $textLateTitle .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; + $textLateTitle .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil(empty($board->warning_delay) ? 0 : $board->warning_delay) >= 0 ? '+' : '').ceil(empty($board->warning_delay) ? 0 : $board->warning_delay).' '.$langs->trans("days").')'; if ($board->id == 'bank_account') { $textLateTitle .= '
    '.$langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")).''; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 1923204c272..c72885ef1ea 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -82,7 +82,7 @@ if (!empty($useragent)) { // Check PHP version min $arrayphpminversionerror = array(5, 6, 0); -$arrayphpminversionwarning = array(5, 6, 0); +$arrayphpminversionwarning = array(7, 0, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { // Minimum to use (error if lower) print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok = 0; // 0=error, 1=warning diff --git a/htdocs/install/doctemplates/proposals/template_proposal.odt b/htdocs/install/doctemplates/proposals/template_proposal.odt index 8ece83c989c..31981d8c120 100644 Binary files a/htdocs/install/doctemplates/proposals/template_proposal.odt and b/htdocs/install/doctemplates/proposals/template_proposal.odt differ diff --git a/htdocs/install/doctemplates/recruitment/template_recruitment.odt b/htdocs/install/doctemplates/recruitment/template_recruitment.odt new file mode 100644 index 00000000000..5955d47e206 Binary files /dev/null and b/htdocs/install/doctemplates/recruitment/template_recruitment.odt differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate.zip b/htdocs/install/doctemplates/websites/website_template-corporate.zip deleted file mode 100644 index e7f645d168a..00000000000 Binary files a/htdocs/install/doctemplates/websites/website_template-corporate.zip and /dev/null differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/LICENSE b/htdocs/install/doctemplates/websites/website_template-corporate/LICENSE new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/LICENSE @@ -0,0 +1 @@ + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/README.md b/htdocs/install/doctemplates/websites/website_template-corporate/README.md new file mode 100644 index 00000000000..12ac388316c --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/README.md @@ -0,0 +1 @@ +This template has been developed by DoliCloud (https://www.dolicloud.com) for Dolibarr ERP CRM. diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-corporate/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-corporate/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/LICENSE b/htdocs/install/doctemplates/websites/website_template-corporate/containers/LICENSE new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/LICENSE @@ -0,0 +1 @@ + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/README.md b/htdocs/install/doctemplates/websites/website_template-corporate/containers/README.md new file mode 100644 index 00000000000..12ac388316c --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/README.md @@ -0,0 +1 @@ +This template has been developed by DoliCloud (https://www.dolicloud.com) for Dolibarr ERP CRM. diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-company-is-now-on-dolibarr.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-company-is-now-on-dolibarr.php new file mode 100644 index 00000000000..99c4f10314b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-company-is-now-on-dolibarr.php @@ -0,0 +1,5 @@ +ref.'/page180.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-new-web-site-has-been-launched.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-new-web-site-has-been-launched.php new file mode 100644 index 00000000000..248bb708f48 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog-our-new-web-site-has-been-launched.php @@ -0,0 +1,5 @@ +ref.'/page181.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog.php new file mode 100644 index 00000000000..43a0212d3f6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/blog.php @@ -0,0 +1,5 @@ +ref.'/page179.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/careers.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/careers.php new file mode 100644 index 00000000000..a2c8a7165a7 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/careers.php @@ -0,0 +1,5 @@ +ref.'/page182.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/carriere.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/carriere.php new file mode 100644 index 00000000000..f32f4818ac4 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/carriere.php @@ -0,0 +1,5 @@ +ref.'/page183.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/clients-testimonials.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/clients-testimonials.php new file mode 100644 index 00000000000..2c01e32e135 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/clients-testimonials.php @@ -0,0 +1,5 @@ +ref.'/page184.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/contact.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/contact.php new file mode 100644 index 00000000000..2c9c69905fa --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/contact.php @@ -0,0 +1,5 @@ +ref.'/page185.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/faq.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/faq.php new file mode 100644 index 00000000000..94f01880f4e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/faq.php @@ -0,0 +1,5 @@ +ref.'/page186.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/footer.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/footer.php new file mode 100644 index 00000000000..533ddc027a2 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/footer.php @@ -0,0 +1,5 @@ +ref.'/page187.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/header.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/header.php new file mode 100644 index 00000000000..831c7ded51a --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/header.php @@ -0,0 +1,5 @@ +ref.'/page188.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/home.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/home.php new file mode 100644 index 00000000000..86a6639e327 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/home.php @@ -0,0 +1,5 @@ +ref.'/page189.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-corporate/containers/htmlheader.html new file mode 100644 index 00000000000..948c6713c3d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/htmlheader.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/index.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/index.php new file mode 100644 index 00000000000..5ac34065524 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/index.php @@ -0,0 +1,11 @@ + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/javascript.js.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/javascript.js.php new file mode 100644 index 00000000000..f58102cf00b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/javascript.js.php @@ -0,0 +1,13 @@ + +/* JS content (all pages) */ + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/manifest.json.php new file mode 100644 index 00000000000..b61531d6c11 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/manifest.json.php @@ -0,0 +1,13 @@ + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/our-team.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/our-team.php new file mode 100644 index 00000000000..1afe5d1523d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/our-team.php @@ -0,0 +1,5 @@ +ref.'/page190.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page179.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page179.tpl.php new file mode 100644 index 00000000000..7a474b5595e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page179.tpl.php @@ -0,0 +1,99 @@ + + + +Blog + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    The latest news... +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +

    + + load("main"); + $fuser = new User($db); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', 5, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang)); + foreach($arrayofblogs as $blog) + { + print ''; + } + ?> +
    +
    + +

    + + + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page180.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page180.tpl.php new file mode 100644 index 00000000000..538fc1764e4 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page180.tpl.php @@ -0,0 +1,84 @@ + + + +Our company is now on Dolibarr ERP CRM + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    title; ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +


    + Like several thousands of companies, our company (name ?>) has moved all its information system to Dolibarr ERP CRM. More than 20 applications have been replaced by only one, easier to use and fully integrated. + This is an important step in improving all of our services. + +


    + +
    + +

    +
    Screenshot of our new Open Source solution
    +
    + + + +





    +
    + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page181.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page181.tpl.php new file mode 100644 index 00000000000..a8a484ccf44 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page181.tpl.php @@ -0,0 +1,85 @@ + + + +Our new web site has been launched + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    title; ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +





    + + + Our new website, based on Dolibarr CMS, has been launched.
    + Now it is modern and directly integrated with the internal management tools of the company. Many new online services will be available for our customers... + + +


    + +
    + +

    +
    Theme of our new web site
    +
    + + +





    +
    + + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page182.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page182.tpl.php new file mode 100644 index 00000000000..49735b4f21a --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page182.tpl.php @@ -0,0 +1,129 @@ + + + +Careers + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page183.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page183.tpl.php new file mode 100644 index 00000000000..bf4d4c92682 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page183.tpl.php @@ -0,0 +1,84 @@ + + + +Carrière + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Offres d'emploi +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +Nous n'avons pas d'offres d'emploi ouvertes en ce moment...
    +
    +
    +
    +
    +
    +
    + + +

    + + + +
    + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page184.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page184.tpl.php new file mode 100644 index 00000000000..fca2346bede --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page184.tpl.php @@ -0,0 +1,78 @@ + + + +Clients Testimonials + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Testimonials +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +

    +

    What they say about us

    +



    + Send us your testimonial (by email to email; ?>) +



    +

    +
    + +

    + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page185.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page185.tpl.php new file mode 100644 index 00000000000..f478da7021f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page185.tpl.php @@ -0,0 +1,84 @@ + + + +Contact + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Contact +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +

    Contact us:



    + email ?>
    + getFullAddress() ?>
    +
    +
    + + + +
    +
    + +
    + +


    + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page186.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page186.tpl.php new file mode 100644 index 00000000000..111e4615774 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page186.tpl.php @@ -0,0 +1,91 @@ + + + +FAQ + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    FAQs +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +


    Frequently Asked Questions

    +
    +
    +
    +

    How can I contact you ?


    +You can contact us by using this page. +
    +
    +
    +

    What is your privacy policy ?


    +You may find information about our privacy policy on this page. + + +



    + +
    +
    + + +

    + + + +
    + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page187.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page187.tpl.php new file mode 100644 index 00000000000..615a2214885 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page187.tpl.php @@ -0,0 +1,132 @@ + + + +Footer + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + componentSelectLang('auto', $weblangs, 'margin-top-10'); ?> +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    getFullAddress(1, '
    ', 1); ?>
    +
    +
    +
    +

    Follow Us:

    +
      + socialnetworks as $key => $value) { + print '
    • '; + } ?> +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + Website generated and powered by Dolibarr ERP & CRM +
    +
    + +
    + + + +
    + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page188.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page188.tpl.php new file mode 100644 index 00000000000..99e9ddd3e9f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page188.tpl.php @@ -0,0 +1,134 @@ + + + +Header and Top Menu + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page189.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page189.tpl.php new file mode 100644 index 00000000000..8e0d8fbbea5 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page189.tpl.php @@ -0,0 +1,576 @@ + + + +Home + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Boost your business +
    +
    +

    We provide powerful solutions for all businesses

    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     Best prices on the market  +
    +
    +

    Our optimized processes allows us to provide you very competitive prices

    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Our sales representative are also technicians.

    +
    +
    +
    +
    +
    + +
    +

    Take a look at our offers...

    +
    +
    +
    +
    +
    + +
    +

    Our customer-supplier relationship is very appreciated by our customers

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    We continue to follow and assist you after the sale. Contact us at any time.

    +
    +
    +
    +
    +
    + + + +
    +
    +

    Looking for

    +

    a high quality service?

    +

    With a lot of experience, hiring us is a security for your business!

    +
    +
    +
    11
    +
    Years of Experience
    +
    +
    +
    + query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?> +
    +
    Experts
    +
    +
    +
    + query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?> +
    +
    Trusted Clients
    +
    +
    +
    + +
    +
    +
    + + + + +
    +
    + +
    +
    + + + +
    +
    +

    our team

    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +

    Request a callback

    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +

    successful cases

    + +
    +
    +
    +
    +
    + + + +
    +
    +

    Latest News

    +
    + fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang)); + foreach($arrayofblogs as $blog) + { + ?> + + + +
    +
    +
    + + + + + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page190.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page190.tpl.php new file mode 100644 index 00000000000..63255c34db5 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page190.tpl.php @@ -0,0 +1,115 @@ + + + +Our team + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Our team +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +

    +

    The crew...




    + query($sql); + if (! $resql) dol_print_error($db); + while ($obj = $db->fetch_object($resql)) + { + $arrayofusers[]=$obj->rowid; + } + + print '
    '; + foreach($arrayofusers as $id) + { + $fuser->fetch($id); + + print '
    '; + print '
    '; + print '
    '; + if ($fuser->photo) print Form::showphoto('userphoto', $fuser, 100, 0, 0, 'photowithmargin', '', 0); + //print ''; + else print ''; + print '
    '; + print '
    '; + print '
    '.$fuser->firstname.'
    '; + print '
      '; + //print '
    • September 24, 2018
    • '; + if ($fuser->job) print '
    • '.$fuser->job.'
    • '; + else print '
    • '; + print '
    '; + print '
    '; + print '
    '; + print '
    '; + } + print '
    '; + + ?> +
    +
    + +

    + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page191.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page191.tpl.php new file mode 100644 index 00000000000..b52ee75825e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page191.tpl.php @@ -0,0 +1,110 @@ + + + +Partners + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Partners +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +

    Our partners...

    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +

    + + + +
    + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page192.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page192.tpl.php new file mode 100644 index 00000000000..4f17f5da805 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page192.tpl.php @@ -0,0 +1,186 @@ + + + +Pricing + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Our plans +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    + +
    +
    + + + +

    + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page193.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page193.tpl.php new file mode 100644 index 00000000000..4e6f65e80a5 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page193.tpl.php @@ -0,0 +1,100 @@ + + + +Privacy Policies + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Privacy Policy +
    +
    +
    +
    +
    +
    +
    +
    + +


    + +
    +
    +

    Information collected and used


    +

    * Your customer information (email, phone, business name, first and last name of contact, address, postal code, country and VAT number) are stored when you become a customer. This information allows us to bill you. +

    * If you paid using our online service, we also store the last 4 digits of your card. The full details of your credit card is stored by our payment provider Stripe (the world leader in online payment).

    +

    * You have the option to request the deletion of your data and the above information at any time (except data required y fiscal tracking rules, like your invoices).

    +

    * The Privacy Policies and GDPR referral contact for our services is: global->MAIN_INFO_GDPR; ?>

    +


    +

    Data Storage and Backups


    +

    * The storage of collected data (see 'Information collected and used') is done in a database.

    +

    * We made one backup every week. Only 4 weeks are kept.

    +


    +

    Subcontractor


    +

    * Our services relies on the following subcontractors and service:
    +** The host of computer servers, which is ABC company. These servers are hosted in US. No customer information is communicated to this subcontractor who only provides the hardware and network layer, the installation and operation being carried out by us directly.
    +** The online payment service Stripe, which is used, to ensure regular payment of subscription or your invoices paid online.

    +


    +

    Software Protection


    +

    * Our services runs on Linux Ubuntu systems and software. They benefit from regular security updates when the operating system editor (Ubuntu Canonical) publishes them.

    +

    * Our services are accessible in HTTPS (HTTP encrypted) only, encrypted with SHA256 certificates.

    +

    * Our technical platform are protected by various solutions.

    +


    +

    Data theft


    +

    * In case of suspicion of a theft of the data we have collected (see first point 'Information collected and used'), customers will be informed by email, at email corresponding to their customer account

    +

     

    +
    +
    + + + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page194.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page194.tpl.php new file mode 100644 index 00000000000..e4aa79e1291 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page194.tpl.php @@ -0,0 +1,84 @@ + + + +Product P + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Product P +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +This is a description page of our product P...
    +
    +
    +
    +
    +
    +
    + + +

    + + + +
    + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page195.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page195.tpl.php new file mode 100644 index 00000000000..0e1774d931b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page195.tpl.php @@ -0,0 +1,112 @@ + + + +Search Page + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Search +
    +
    +
    +
    +
    +
    +
    +
    + +


    + +
    + +
    + + +
    + +
    +
    + + +
    +
    + + load("main"); + + if (function_exists('getPagesFromSearchCriterias')) + { + if (GETPOSTISSET('s')) + { + $listofpages = getPagesFromSearchCriterias('page', 'meta', GETPOST('s', 'alphanohtml')); + if ($listofpages['code'] == 'OK') + { + foreach($listofpages['list'] as $websitepagefound) + { + print '
    '.$websitepagefound->title.' - '.$websitepagefound->description.'
    '; + } + } + else + { + // If error, show message + print $listofpages['message']; + } + } + } + else + { + print $weblangs->trans("FeatureNotYetAvailable"); + } + ?> + +





    +
    + + + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/page196.tpl.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page196.tpl.php new file mode 100644 index 00000000000..d52718bcfc8 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/page196.tpl.php @@ -0,0 +1,82 @@ + + + +Service S + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Service S +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +This is a description page of our service S...
    +
    +
    +
    +
    +
    +
    + + +

    + + + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/partners.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/partners.php new file mode 100644 index 00000000000..44e501d9f4d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/partners.php @@ -0,0 +1,5 @@ +ref.'/page191.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/pricing.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/pricing.php new file mode 100644 index 00000000000..d2866cadf43 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/pricing.php @@ -0,0 +1,5 @@ +ref.'/page192.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/privacy-policies.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/privacy-policies.php new file mode 100644 index 00000000000..59dc87944fe --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/privacy-policies.php @@ -0,0 +1,5 @@ +ref.'/page193.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/product-p.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/product-p.php new file mode 100644 index 00000000000..beac94b27c8 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/product-p.php @@ -0,0 +1,5 @@ +ref.'/page194.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-corporate/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/search.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/search.php new file mode 100644 index 00000000000..359c5bf3b26 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/search.php @@ -0,0 +1,5 @@ +ref.'/page195.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/service-s.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/service-s.php new file mode 100644 index 00000000000..f69f6e7a13e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/service-s.php @@ -0,0 +1,5 @@ +ref.'/page196.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/styles.css.php new file mode 100644 index 00000000000..3307c499765 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/styles.css.php @@ -0,0 +1,20608 @@ + +/* CSS content (all pages) */ +body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; } +.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;} +.bodywebsite a:focus, +.bodywebsite button:focus { + outline: none !important; +} +.bodywebsite button::-moz-focus-inner { + border: 0; +} +.bodywebsite :focus { + outline: none; +} +.bodywebsite input, +.bodywebsite select, +.bodywebsite textarea { + outline: 0; +} +.bodywebsite p { + margin: 0; +} +.bodywebsite q { + font-size: 18px; + color: #fff; +} +.bodywebsite dl { + margin-bottom: 0; +} +.bodywebsite dt { + font-weight: 400; +} +html .bodywebsite p a:hover { + text-decoration: none; +} +.bodywebsite form { + margin-bottom: 0; +} +.bodywebsite .text-left { + text-align: left; +} +.bodywebsite .text-center { + text-align: center; +} +.bodywebsite .text-right { + text-align: right; +} +.bodywebsite .page .text-middle { + vertical-align: middle; +} +.bodywebsite .centpercent { + width: 100%; +} +.bodywebsite .page-head { + position: relative; + z-index: 90; + /* must be lower than 100 */ + background-color: #fff; +} +.bodywebsite .page-content { + position: relative; + z-index: 1; +} +.bodywebsite .page-foot { + background-color: #000; +} +.bodywebsite input, +.bodywebsite button, +.bodywebsite select, +.bodywebsite textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +.bodywebsite a { + display: inline-block; + text-decoration: none; + transition: 0.33s all ease-out; +} +.bodywebsite a, +.bodywebsite a:active, +.bodywebsite a:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite h3 a, +.bodywebsite h3 a:active +{ + font-weight: normal !important; +} +.bodywebsite a:hover, +.bodywebsite a:focus { + color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; + text-decoration: none; +} +.bodywebsite a:focus { + outline: 0; +} +.bodywebsite a[href*='callto'], +.bodywebsite a[href*='mailto'] { + white-space: nowrap; +} +.bodywebsite img { + vertical-align: middle; + max-width: 100%; +} +.bodywebsite .img-responsive { + max-width: 100%; + height: auto; +} +.bodywebsite .img-circle { + border-radius: 50%; +} +.bodywebsite hr { + margin-top: 0; + margin-bottom: 0; + border: 0; + border-top: 1px solid #2a2b2b; +} +.bodywebsite .margin-lr-30 { + margin-left: 30px !important; + margin-right: 30px !important; +} +.bodywebsite .unit-left, +.bodywebsite .unit-body { + white-space: nowrap; + display: inline-block; + vertical-align: middle; +} +.bodywebsite .unit-left { + padding-right: 10px; +} +.bodywebsite [role="button"] { + cursor: pointer; +} +.bodywebsite #sectionnews .nohover { + color: #000; +} +.bodywebsite .blog-box { + box-shadow: -1px -1px 12px 5px rgba(85, 85, 85, 0.1) !important; +} +.bodywebsite .blog-box:hover { + box-shadow: -1px -1px 12px 5px rgba(65, 65, 65, 0.3) !important; +} +.bodywebsite .margin-top-5 { + margin-top: 5px !important; +} +.bodywebsite .margin-top-10 { + margin-top: 10px !important; +} +.bodywebsite .rights { + display: inline-block; + margin: 0; + line-height: 1.5; + letter-spacing: .025em; + vertical-align: baseline; +} +.bodywebsite .rights * { + display: inline; + margin-right: .25em; +} +.bodywebsite .page-foot-default .rights { + color: #fff; + font-weight: 300; +} +.bodywebsite .page-foot .brand + * { + margin-top: 22px; +} +.bodywebsite .page-foot * + .link-block { + margin-top: 15px; +} +.bodywebsite .page-foot .footer-title + * { + margin-top: 30px; +} +.bodywebsite .page-foot .contact-info * + .unit { + margin-top: 15px; +} +.bodywebsite .privacy-link { + margin-top: 30px; +} +.bodywebsite .one-page-section * + .group-xl { + margin-top: 40px; +} +@media (min-width: 768px) { + .bodywebsite .one-page-section * + .group-xl { + margin-top: 60px; + } +} +@media (min-width: 1200px) { + .bodywebsite .one-page-section * + .group-xl { + margin-top: 100px; + } +} +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6, +.bodywebsite .h1, +.bodywebsite .h2, +.bodywebsite .h3, +.bodywebsite .h4, +.bodywebsite .h5, +.bodywebsite .h6 { + margin-top: 0; + margin-bottom: 0; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 700; + color: #000; +} +.bodywebsite h1 > span, +.bodywebsite h2 > span, +.bodywebsite h3 > span, +.bodywebsite h4 > span, +.bodywebsite h5 > span, +.bodywebsite h6 > span, +.bodywebsite .h1 > span, +.bodywebsite .h2 > span, +.bodywebsite .h3 > span, +.bodywebsite .h4 > span, +.bodywebsite .h5 > span, +.bodywebsite .h6 > span { + display: inline-block; + font-size: inherit; +} +.bodywebsite h1 a, +.bodywebsite h2 a, +.bodywebsite h3 a, +.bodywebsite h4 a, +.bodywebsite h5 a, +.bodywebsite h6 a, +.bodywebsite .h1 a, +.bodywebsite .h2 a, +.bodywebsite .h3 a, +.bodywebsite .h4 a, +.bodywebsite .h5 a, +.bodywebsite .h6 a { + display: inline; + font: inherit; + letter-spacing: inherit; + transition: .33s all ease; +} +.bodywebsite h1 a:hover, +.bodywebsite h2 a:hover, +.bodywebsite h3 a:hover, +.bodywebsite h4 a:hover, +.bodywebsite h5 a:hover, +.bodywebsite h6 a:hover, +.bodywebsite .h1 a:hover, +.bodywebsite .h2 a:hover, +.bodywebsite .h3 a:hover, +.bodywebsite .h4 a:hover, +.bodywebsite .h5 a:hover, +.bodywebsite .h6 a:hover { + color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; +} +.bodywebsite h1, +.bodywebsite .h1 { + font-size: 18px; + line-height: 1.35; + text-transform: uppercase; +} +@media (min-width: 1200px) { + .bodywebsite h1, + .bodywebsite .h1 { + line-height: 1.2; + font-size: 33px; + } +} +.bodywebsite h1.small, +.bodywebsite .h1.small { + font-size: 40px; +} +@media (min-width: 768px) { + .bodywebsite h1.small, + .bodywebsite .h1.small { + font-size: 40px; + } +} +@media (min-width: 992px) { + .bodywebsite h1.small, + .bodywebsite .h1.small { + font-size: 60px; + } +} +@media (min-width: 1200px) { + .bodywebsite h1.small, + .bodywebsite .h1.small { + font-size: 72px; + line-height: 1.2; + } +} +.bodywebsite h2, +.bodywebsite .h2 { + font-weight: 500; + font-size: 15px; + line-height: 1.2; +} +@media (min-width: 576px) { + .bodywebsite h2, + .bodywebsite .h2 { + line-height: 1.33333; + font-size: 18px; + } +} +.bodywebsite .text-big-18 { + font-size: 18px; +} +.bodywebsite .text-big-19 { + font-size: 19px; +} +.bodywebsite .text-small { + font-size: 12px; +} +.bodywebsite .text-small-16 { + font-size: 16px; +} +.bodywebsite small, +.bodywebsite .small { + font-size: 12px; + line-height: 18px; +} +.bodywebsite code { + padding: 5px 7px; + font-size: 75%; + color: #fe4a21; + background-color: #f9f9f9; + border-radius: 2px; +} +.bodywebsite em { + font-family: Helvetica, Arial, sans-serif; + font-size: inherit; + font-style: italic; + font-weight: 700; + line-height: inherit; + color: #767877; +} +.bodywebsite address { + margin-top: 0; + margin-bottom: 0; +} +.bodywebsite .context-dark, +.bodywebsite .bg-black, +.bodywebsite .bg-accent { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .context-dark a, +.bodywebsite .bg-black a, +.bodywebsite .bg-accent a, +.bodywebsite .bg-black a:active, +.bodywebsite .bg-accent a:active, +.bodywebsite .context-dark a:focus, +.bodywebsite .bg-black a:focus, +.bodywebsite .bg-accent a:focus, +.bodywebsite .bg-cello a:focus { + color: #fff; +} +.bodywebsite .context-dark a:hover, +.bodywebsite .bg-black a:hover, +.bodywebsite .bg-accent a:hover +{ + color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; +} +.bodywebsite .context-dark .text-extra-large-bordered, +.bodywebsite .bg-black .text-extra-large-bordered, +.bodywebsite .bg-gray-darker .text-extra-large-bordered, +.bodywebsite .bg-gray-dark .text-extra-large-bordered, +.bodywebsite .bg-mine-shaft .text-extra-large-bordered, +.bodywebsite .bg-cod-gray .text-extra-large-bordered, +.bodywebsite .bg-accent .text-extra-large-bordered, +.bodywebsite .bg-cello .text-extra-large-bordered { + color: #fff; +} +.bodywebsite .bg-black { + background: #000; + fill: #000; +} +.bodywebsite .bg-accent { + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + fill: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .bg-accent.bg-default-outline-btn .btn-white-outline:hover { + background: #3a3c3e; + border-color: #3a3c3e; +} +.bodywebsite .bg-porcelain { + background: #e5e7e9; + fill: #e5e7e9; +} +.bodywebsite .bg-cape-cod { + background: #444; + fill: #3a3c3e; +} +.bodywebsite #sectionfirstclass .bg-cape-cod { + background: #fff; + fill: #3a3c3e; +} +.bodywebsite .page .text-primary { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?> !important; +} +.bodywebsite .page a.text-primary:focus, +.bodywebsite .page a.text-primary:hover { + color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?> !important; +} +.bodywebsite .page .text-secondary { + color: #00030a !important; +} +.bodywebsite .page a.text-secondary:focus, +.bodywebsite .page a.text-secondary:hover { + color: black !important; +} +.bodywebsite .page .text-red-orange { + color: #ff4b22 !important; +} +.bodywebsite .page a.text-red-orange:focus, +.bodywebsite .page a.text-red-orange:hover { + color: #ee2c00 !important; +} +.bodywebsite .page .text-black { + color: #000 !important; +} +.bodywebsite .page a.text-black:focus, +.bodywebsite .page a.text-black:hover { + color: black !important; +} +.bodywebsite .page .text-silver { + color: #cdcdcd !important; +} +.bodywebsite .page a.text-silver:focus, +.bodywebsite .page a.text-silver:hover { + color: #b4b4b4 !important; +} +.bodywebsite .page .text-dark { + color: #2a2b2b !important; +} +.bodywebsite .page a.text-dark:focus, +.bodywebsite .page a.text-dark:hover { + color: #111111 !important; +} +.bodywebsite .page .text-gray { + color: #9f9f9f !important; +} +.bodywebsite .page a.text-gray:focus, +.bodywebsite .page a.text-gray:hover { + color: #868686 !important; +} +.bodywebsite .page .text-gray-light { + color: #dedede !important; +} +.bodywebsite .page a.text-gray-light:focus, +.bodywebsite .page a.text-gray-light:hover { + color: #c5c5c5 !important; +} +.bodywebsite .page .text-white { + color: #fff !important; + text-shadow: 1px 1px 8px #222; +} +.bodywebsite .page a.text-white:focus, +.bodywebsite .page a.text-white:hover { + color: #e6e6e6 !important; +} +.bodywebsite .page .text-white-05 { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite .page a.text-white-05:focus, +.bodywebsite .page a.text-white-05:hover { + color: rgba(230, 230, 230, 0.5) !important; +} +.bodywebsite .page .text-white-03 { + color: rgba(255, 255, 255, 0.3) !important; +} +.bodywebsite .page a.text-white-03:focus, +.bodywebsite .page a.text-white-03:hover { + color: rgba(230, 230, 230, 0.3) !important; +} +.bodywebsite .page .text-white-08 { + color: rgba(255, 255, 255, 0.8) !important; +} +.bodywebsite .page a.text-white-08:focus, +.bodywebsite .page a.text-white-08:hover { + color: rgba(230, 230, 230, 0.8) !important; +} +.bodywebsite .page .text-tundora { + color: #414141 !important; +} +.bodywebsite .page a.text-tundora:focus, +.bodywebsite .page a.text-tundora:hover { + color: #282828 !important; +} +.bodywebsite .page .text-black-05 { + color: rgba(0, 0, 0, 0.5) !important; +} +.bodywebsite .page a.text-black-05:focus, +.bodywebsite .page a.text-black-05:hover { + color: rgba(0, 0, 0, 0.5) !important; +} +.bodywebsite .page .text-bismark { + color: #496a8a !important; +} +.bodywebsite .page a.text-bismark:focus, +.bodywebsite .page a.text-bismark:hover { + color: #375069 !important; +} +.bodywebsite .page .text-black-08 { + color: rgba(0, 0, 0, 0.8) !important; +} +.bodywebsite .page a.text-black-08:focus, +.bodywebsite .page a.text-black-08:hover { + color: rgba(0, 0, 0, 0.8) !important; +} +.bodywebsite .page .text-gray-darker { + color: #00030a !important; +} +.bodywebsite .page a.text-gray-darker:focus, +.bodywebsite .page a.text-gray-darker:hover { + color: black !important; +} +.bodywebsite .page .text-abbey { + color: #464a4d !important; +} +.bodywebsite .page a.text-abbey:focus, +.bodywebsite .page a.text-abbey:hover { + color: #2e3032 !important; +} +.bodywebsite .page .text-rolling-stone { + color: #74787C !important; +} +.bodywebsite .page a.text-rolling-stone:focus, +.bodywebsite .page a.text-rolling-stone:hover { + color: #5b5f62 !important; +} +.bodywebsite .page .text-fuel-yellow { + color: #F0B922 !important; +} +.bodywebsite .page a.text-fuel-yellow:focus, +.bodywebsite .page a.text-fuel-yellow:hover { + color: #d19d0e !important; +} +.bodywebsite .hidden { + display: none; +} +.bodywebsite .text-italic { + font-style: italic; +} +.bodywebsite .text-normal { + font-style: normal; +} +.bodywebsite .text-none { + text-transform: none; +} +.bodywebsite .text-underline { + text-decoration: underline; +} +.bodywebsite .text-strike { + text-decoration: line-through; +} +.bodywebsite .text-thin { + font-weight: 100; +} +.bodywebsite .text-light { + font-weight: 300; +} +.bodywebsite .text-regular { + font-weight: 400; +} +.bodywebsite .text-medium { + font-weight: 500; +} +.bodywebsite .text-sbold { + font-weight: 600; +} +.bodywebsite .text-bold, +.bodywebsite strong { + font-weight: 700; +} +.bodywebsite .text-ubold { + font-weight: 900; +} +.bodywebsite .text-spacing-0 { + letter-spacing: 0; +} +.bodywebsite .text-spacing-40 { + letter-spacing: 0.04em; +} +.bodywebsite .text-spacing-inverse-20 { + letter-spacing: -0.02em; +} +.bodywebsite .text-spacing-120 { + letter-spacing: 0.12em; +} +.bodywebsite .btn { + max-width: 100%; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight: 700; + border-radius: 0; + border: 2px solid; + text-transform: uppercase; + transition: 0.3s ease-out; + padding: 11px 15px; +} +@media (min-width: 992px) { + .bodywebsite .btn { + padding: 12px 35px; + } +} +.bodywebsite .btn:focus, +.bodywebsite .btn:active, +.bodywebsite .btn:active:focus { + outline: none; +} +.bodywebsite .btn:active, +.bodywebsite .btn.active { + box-shadow: none; +} +.bodywebsite .btn-smaller { + padding: 8px 25px; +} +.bodywebsite .btn-small { + padding-left: 20px; + padding-right: 20px; +} +@media (min-width: 768px) { + .bodywebsite .btn { + min-width: 190px; + } +} +html .bodywebsite .btn-default, +html .bodywebsite .btn-default:active, +html .bodywebsite .btn-default.active, +html .bodywebsite .btn-default:active:focus, +html .bodywebsite .btn-default.active:focus, +html .bodywebsite .btn-default:focus:active, +html .bodywebsite .btn-default:focus { + color: #fff; + background-color: #464a4d; + border-color: #464a4d; +} +.bodywebsite .open > html .btn-default.dropdown-toggle, +html .bodywebsite .btn-default:hover { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +html .bodywebsite .btn-default.disabled, +html .bodywebsite .btn-default[disabled], +.bodywebsite fieldset[disabled] html .btn-default { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-default .badge { + color: #464a4d; + background-color: #fff; +} +html .bodywebsite .btn-primary, +html .bodywebsite .btn-primary:active, +html .bodywebsite .btn-primary.active, +html .bodywebsite .btn-primary:active:focus, +html .bodywebsite .btn-primary.active:focus, +html .bodywebsite .btn-primary:focus:active, +html .bodywebsite .btn-primary:focus { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + /* border: 0; */ +} +.bodywebsite .open > html .btn-primary.dropdown-toggle { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + /* border: none; */ +} +html .bodywebsite .btn-primary:hover { + color: #fff; + box-shadow: 1px 1px 8px #aaa; +} +html .bodywebsite .btn-primary.disabled, +html .bodywebsite .btn-primary[disabled], +.bodywebsite fieldset[disabled] html .btn-primary { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-primary .badge { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background-color: #fff; +} +html .bodywebsite .btn-primary-contrast, +html .bodywebsite .btn-primary-contrast:active, +html .bodywebsite .btn-primary-contrast.active, +html .bodywebsite .btn-primary-contrast:active:focus, +html .bodywebsite .btn-primary-contrast.active:focus, +html .bodywebsite .btn-primary-contrast:focus:active, +html .bodywebsite .btn-primary-contrast:focus { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .open > html .btn-primary-contrast.dropdown-toggle, +html .bodywebsite .btn-primary-contrast:hover { + color: #fff; + background-color: #42b294; + border-color: #42b294; +} +html .bodywebsite .btn-primary-contrast.disabled, +html .bodywebsite .btn-primary-contrast[disabled], +.bodywebsite fieldset[disabled] html .btn-primary-contrast { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-primary-contrast .badge { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background-color: #fff; +} +html .bodywebsite .btn-primary-outline, +html .bodywebsite .btn-primary-outline:active, +html .bodywebsite .btn-primary-outline.active, +html .bodywebsite .btn-primary-outline:active:focus, +html .bodywebsite .btn-primary-outline.active:focus, +html .bodywebsite .btn-primary-outline:focus:active, +html .bodywebsite .btn-primary-outline:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background-color: transparent; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .open > html .btn-primary-outline.dropdown-toggle, +html .bodywebsite .btn-primary-outline:hover { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +html .bodywebsite .btn-primary-outline.disabled, +html .bodywebsite .btn-primary-outline[disabled], +.bodywebsite fieldset[disabled] html .btn-primary-outline { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-primary-outline .badge { + color: transparent; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +html .bodywebsite .btn-cello-outline, +html .bodywebsite .btn-cello-outline:active, +html .bodywebsite .btn-cello-outline.active, +html .bodywebsite .btn-cello-outline:active:focus, +html .bodywebsite .btn-cello-outline.active:focus, +html .bodywebsite .btn-cello-outline:focus:active, +html .bodywebsite .btn-cello-outline:focus { + color: #1e3953; + background-color: transparent; + border-color: #1e3953; +} +.bodywebsite .open > html .btn-cello-outline.dropdown-toggle, +html .bodywebsite .btn-cello-outline:hover { + color: #fff; + background-color: #1e3953; + border-color: #1e3953; +} +html .bodywebsite .btn-cello-outline.disabled, +html .bodywebsite .btn-cello-outline[disabled], +.bodywebsite fieldset[disabled] html .btn-cello-outline { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-cello-outline .badge { + color: transparent; + background-color: #1e3953; +} +html .bodywebsite .btn-white-outline, +html .bodywebsite .btn-white-outline:active, +html .bodywebsite .btn-white-outline.active, +html .bodywebsite .btn-white-outline:active:focus, +html .bodywebsite .btn-white-outline.active:focus, +html .bodywebsite .btn-white-outline:focus:active, +html .bodywebsite .btn-white-outline:focus { + color: #fff; + background-color: transparent; + border-color: #fff; +} +.bodywebsite .open > html .btn-white-outline.dropdown-toggle, +html .bodywebsite .btn-white-outline:hover { + color: #fff; + background-color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; + border-color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; +} +html .bodywebsite .btn-white-outline.disabled, +html .bodywebsite .btn-white-outline[disabled], +.bodywebsite fieldset[disabled] html .btn-white-outline { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-white-outline .badge { + color: transparent; + background-color: #fff; +} +html .bodywebsite .btn-white-outline-variant-1, +html .bodywebsite .btn-white-outline-variant-1:active, +html .bodywebsite .btn-white-outline-variant-1.active, +html .bodywebsite .btn-white-outline-variant-1:active:focus, +html .bodywebsite .btn-white-outline-variant-1.active:focus, +html .bodywebsite .btn-white-outline-variant-1:focus:active, +html .bodywebsite .btn-white-outline-variant-1:focus { + color: #fff; + background-color: transparent; + border-color: #fff; +} +.bodywebsite .open > html .btn-white-outline-variant-1.dropdown-toggle, +html .bodywebsite .btn-white-outline-variant-1:hover { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +html .bodywebsite .btn-white-outline-variant-1.disabled, +html .bodywebsite .btn-white-outline-variant-1[disabled], +.bodywebsite fieldset[disabled] html .btn-white-outline-variant-1 { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-white-outline-variant-1 .badge { + color: transparent; + background-color: #fff; +} +html .bodywebsite .btn-silver-outline, +html .bodywebsite .btn-silver-outline:active, +html .bodywebsite .btn-silver-outline.active, +html .bodywebsite .btn-silver-outline:active:focus, +html .bodywebsite .btn-silver-outline.active:focus, +html .bodywebsite .btn-silver-outline:focus:active, +html .bodywebsite .btn-silver-outline:focus { + color: #000; + background-color: transparent; + border-color: #cdcdcd; +} +.bodywebsite .open > html .btn-silver-outline.dropdown-toggle, +html .bodywebsite .btn-silver-outline:hover { + color: #fff; + background-color: #cdcdcd; + border-color: #cdcdcd; +} +html .bodywebsite .btn-silver-outline.disabled, +html .bodywebsite .btn-silver-outline[disabled], +.bodywebsite fieldset[disabled] html .btn-silver-outline { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-silver-outline .badge { + color: transparent; + background-color: #000; +} +html .bodywebsite .btn-black-outline, +html .bodywebsite .btn-black-outline:active, +html .bodywebsite .btn-black-outline.active, +html .bodywebsite .btn-black-outline:active:focus, +html .bodywebsite .btn-black-outline.active:focus, +html .bodywebsite .btn-black-outline:focus:active, +html .bodywebsite .btn-black-outline:focus { + color: #000; + background-color: transparent; + border-color: #000; +} +.bodywebsite .open > html .btn-black-outline.dropdown-toggle, +html .bodywebsite .btn-black-outline:hover { + color: #fff; + background-color: #000; + border-color: #000; +} +html .bodywebsite .btn-black-outline.disabled, +html .bodywebsite .btn-black-outline[disabled], +.bodywebsite fieldset[disabled] html .btn-black-outline { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-black-outline .badge { + color: transparent; + background-color: #000; +} +html .bodywebsite .btn-cello, +html .bodywebsite .btn-cello:active, +html .bodywebsite .btn-cello.active, +html .bodywebsite .btn-cello:active:focus, +html .bodywebsite .btn-cello.active:focus, +html .bodywebsite .btn-cello:focus:active, +html .bodywebsite .btn-cello:focus { + color: #fff; + background-color: #1e3953; + border-color: #1e3953; +} +.bodywebsite .open > html .btn-cello.dropdown-toggle, +html .bodywebsite .btn-cello:hover { + color: #fff; + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +html .bodywebsite .btn-cello.disabled, +html .bodywebsite .btn-cello[disabled], +.bodywebsite fieldset[disabled] html .btn-cello { + pointer-events: none; + opacity: .5; +} +html .bodywebsite .btn-cello .badge { + color: #1e3953; + background-color: #fff; +} +.bodywebsite .btn-xs { + padding: 12px 25px; + font-size: 11px; + line-height: 1.71429; + border-radius: 0; +} +@media (min-width: 768px) { + .bodywebsite .btn-xs { + min-width: 165px; + } +} +.bodywebsite .btn-sm { + padding: 10px 20px; + font-size: 13px; + line-height: 1.71429; + border-radius: 0; +} +@media (min-width: 768px) { + .bodywebsite .btn-sm { + min-width: 170px; + } +} +.bodywebsite .btn-lg { + padding: 14px 30px; + font-size: 14px; + line-height: 1.71429; + border-radius: 0; +} +@media (min-width: 768px) { + .bodywebsite .btn-lg { + min-width: 270px; + padding: 18px 40px; + } +} +@media (min-width: 992px) { + .bodywebsite .btn-lg-bigger { + padding-top: 28px; + padding-bottom: 28px; + } +} +.bodywebsite .btn-xl { + padding: 20px 35px; + font-size: 15px; + line-height: 1.71429; + border-radius: 0; +} +@media (min-width: 768px) { + .bodywebsite .btn-xl { + padding: 21px 50px; + } +} +@media (min-width: 992px) { + .bodywebsite .btn-xl { + min-width: 270px; + } +} +.bodywebsite .btn-min-width-0 { + min-width: 0; +} +.bodywebsite .btn-block { + min-width: 30px; + max-width: 100%; +} +.bodywebsite .btn-rect { + border-radius: 0; +} +.bodywebsite .btn-round { + border-radius: 12px; +} +.bodywebsite .btn-circle { + border-radius: 35px; +} +.bodywebsite .btn-round-bottom { + border-radius: 0 0 5px 5px; +} +.bodywebsite .btn-shadow { + box-shadow: -3px 3px 3px 0 rgba(0, 0, 0, 0.14); +} +.bodywebsite .btn.btn-icon { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + vertical-align: middle; +} +.bodywebsite .btn.btn-icon .icon { + position: relative; + top: 1px; + display: inline-block; + width: auto; + height: auto; + line-height: 0; + vertical-align: middle; + transition: 0s; +} +.bodywebsite .btn.btn-icon-left .icon { + margin-right: 10px; +} +.bodywebsite .btn.btn-icon-right { + -webkit-flex-direction: row-reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; +} +.bodywebsite .btn.btn-icon-right .icon { + margin-left: 10px; +} +.bodywebsite .btn-icon-only { + background: none; + border: none; + display: inline-block; + padding: 0; + outline: none; + outline-offset: 0; + cursor: pointer; + -webkit-appearance: none; + font-size: 0; + line-height: 0; + transition: .33s all ease; +} +.bodywebsite .btn-icon-only::-moz-focus-inner { + border: none; + padding: 0; +} +.bodywebsite .btn-icon-only.btn-icon-only-primary, +.bodywebsite .btn-icon-only.btn-icon-only-primary:active, +.bodywebsite .btn-icon-only.btn-icon-only-primary:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .btn-icon-only.btn-icon-only-primary:hover { + color: #000; +} +.bodywebsite .btn-icon-only { + padding: 9px 18px; +} +.bodywebsite .btn-icon-single { + display: inline-block; + padding: 0; + min-width: 0; +} +.bodywebsite .btn-icon-default { + color: #000; +} +.bodywebsite .btn-icon-default:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .btn-cello-outline.btn-icon .icon { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + transition: .33s all ease; +} +.bodywebsite .btn-cello-outline.btn-icon:hover.btn-icon .icon { + color: #fff; +} +.bodywebsite .button-block * + .btn { + margin-top: 0; +} +.bodywebsite .icon { + display: inline-block; + text-align: center; +} +.bodywebsite .icon:before { + display: inline-block; + font-style: normal; + speak: none; + text-transform: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.bodywebsite [class*='icon-circle'] { + border-radius: 50%; + overflow: hidden; +} +.bodywebsite [class*='icon-round'] { + border-radius: 4px; + overflow: hidden; +} +.bodywebsite .page .icon-default { + color: #9f9f9f; +} +.bodywebsite .page .icon-black { + color: #000; +} +.bodywebsite .page .icon-primary { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .icon-gunsmoke { + color: #767877; +} +.bodywebsite .page .icon-tundora { + color: #414141; +} +.bodywebsite .page .icon-gray-dark-filled { + color: #fff; + background: #2a2b2b; +} +.bodywebsite .page .icon-san-juan-filled { + color: #fff; + background: #2e5275; +} +.bodywebsite .page .icon-silver-chalice-filled { + color: #fff; + background: #ababab; +} +.bodywebsite .page .icon-abbey-filled { + color: #fff; + background: #464a4d; +} +.bodywebsite .page .icon-white { + color: #fff; +} +.bodywebsite .page a.icon-default, +.bodywebsite .page a.icon-default:active, +.bodywebsite .page a.icon-default:focus { + color: #9f9f9f; +} +.bodywebsite .page a.icon-default:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page a.icon-primary, +.bodywebsite .page a.icon-primary:active, +.bodywebsite .page a.icon-primary:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page a.icon-primary:hover { + color: #fff; +} +.bodywebsite .page a.icon-abbey-filled:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page a.icon-tundora-inverse, +.bodywebsite .page a.icon-tundora-inverse:active, +.bodywebsite .page a.icon-tundora-inverse:focus { + color: #414141; +} +.bodywebsite .page a.icon-tundora-inverse:hover { + color: #fff; +} +.bodywebsite .page a.icon-gray-dark-filled, +.bodywebsite .page a.icon-gray-dark-filled:active, +.bodywebsite .page a.icon-gray-dark-filled:focus { + color: #fff; + background: #2a2b2b; +} +.bodywebsite .page a.icon-gray-dark-filled:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page a.icon-silver-chalice-filled, +.bodywebsite .page a.icon-silver-chalice-filled:active, +.bodywebsite .page a.icon-silver-chalice-filled:focus { + color: #fff; + background: #ababab; +} +.bodywebsite .page a.icon-silver-chalice-filled:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page a.icon-san-juan-filled, +.bodywebsite .page a.icon-san-juan-filled:active, +.bodywebsite .page a.icon-san-juan-filled:focus { + color: #fff; + background: #2e5275; +} +.bodywebsite .page a.icon-san-juan-filled:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .icon-xxs { + width: 18px; + height: 18px; + font-size: 18px; + line-height: 18px; +} +.bodywebsite .page .icon-xxs-small { + width: 16px; + height: 16px; + font-size: 16px; + line-height: 16px; +} +.bodywebsite .page .icon-xxs-smaller { + width: 14px; + height: 14px; + font-size: 14px; + line-height: 14px; +} +.bodywebsite .page .icon-xxs-smallest { + width: 12px; + height: 12px; + font-size: 12px; + line-height: 12px; +} +.bodywebsite .page .icon-xs { + width: 22px; + height: 22px; + font-size: 22px; + line-height: 22px; +} +.bodywebsite .page .icon-xs-smaller { + width: 20px; + height: 20px; + font-size: 20px; + line-height: 20px; +} +.bodywebsite .page .icon-sm { + width: 24px; + height: 24px; + font-size: 24px; + line-height: 24px; +} +.bodywebsite .page .icon-sm-custom { + width: 24px; + height: 24px; + font-size: 24px; + line-height: 24px; +} +@media (min-width: 992px) { + .bodywebsite .page .icon-sm-custom { + width: 30px; + height: 30px; + font-size: 30px; + line-height: 30px; + } +} +.bodywebsite .page .icon-md { + width: 36px; + height: 36px; + font-size: 36px; + line-height: 36px; +} +.bodywebsite .page .icon-md-custom { + width: 26px; + height: 26px; + font-size: 26px; + line-height: 26px; +} +@media (min-width: 992px) { + .bodywebsite .page .icon-md-custom { + width: 36px; + height: 36px; + font-size: 36px; + line-height: 36px; + } +} +.bodywebsite .page .icon-md-smaller { + width: 30px; + height: 30px; + font-size: 30px; + line-height: 30px; +} +.bodywebsite .page .icon-lg { + width: 45px; + height: 45px; + font-size: 45px; + line-height: 45px; +} +.bodywebsite .page .icon-lg-variant-1 { + width: 42px; + height: 42px; + font-size: 42px; + line-height: 42px; +} +.bodywebsite .page .icon-lg-variant-2 { + width: 44px; + height: 44px; + font-size: 44px; + line-height: 44px; +} +.bodywebsite .page .icon-lg-bigger { + width: 50px; + height: 50px; + font-size: 50px; + line-height: 50px; +} +.bodywebsite .page .icon-xl { + width: 60px; + height: 60px; + font-size: 60px; + line-height: 60px; +} +.bodywebsite .page [class*='icon-round'].icon-xxs-smallest, +.bodywebsite .page [class*='icon-circle'].icon-xxs-smallest { + width: 26px; + height: 26px; + line-height: 26px; +} +.bodywebsite .icon-shift-1 { + position: relative; + top: 2px; +} +.bodywebsite .icon-shift-2 { + position: relative; + top: 2px; +} +@media (min-width: 992px) { + .bodywebsite .icon-shift-2 { + top: 4px; + } +} +.bodywebsite .icon-1:before, +.bodywebsite .icon-2:before, +.bodywebsite .icon-4:before, +.bodywebsite .icon-5:before, +.bodywebsite .icon-6:before, +.bodywebsite .icon-3:before { + content: ''; + display: inline-block; + width: 40px; + height: 40px; +} +.bodywebsite .thumbnail { + position: relative; + z-index: 1; + width: 100%; + max-height: 100%; + overflow: hidden; + padding: 0; + margin: 0; + border: none; + border-radius: 0; + background-color: transparent; +} +.bodywebsite .thumbnail .caption { + padding: 0; +} +.bodywebsite .thumbnail { + box-shadow: none; +} +.bodywebsite .thumbnail-variant-1 { + background-color: transparent; + text-align: center; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image { + position: relative; + display: inline-block; + overflow: hidden; + pointer-events: none; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image, +.bodywebsite .thumbnail-variant-1 .thumbnail-image > img { + border-radius: 600px; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image > img { + width: auto; + pointer-events: auto; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image-inner { + position: absolute; + top: 0; + right: 1px; + bottom: 0; + left: 1px; + z-index: 2; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + padding: 20px 5px 5px; + background: rgba(0, 0, 0, 0.4); + border-radius: 600px; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image-inner * { + pointer-events: auto; +} +.bodywebsite .thumbnail-variant-1 .thumbnail-image-inner > * + * { + margin-top: 0; + margin-left: 20px; +} +.bodywebsite .thumbnail-variant-1 .header { + line-height: 1.2; +} +.bodywebsite .thumbnail-variant-1 * + p { + margin-top: 0; +} +.bodywebsite .thumbnail-variant-1 * + .thumbnail-caption { + margin-top: 18px; +} +@media (min-width: 992px) { + .bodywebsite .desktop .thumbnail-variant-1 .thumbnail-image-inner { + opacity: 0; + visibility: hidden; + transform: rotate3d(0, 1, 0, 60deg); + transition: .55s all ease; + background: rgba(0, 0, 0, 0.6); + } + .bodywebsite .desktop .thumbnail-variant-1 .thumbnail-image:hover .thumbnail-image-inner { + opacity: 1; + visibility: visible; + transform: rotate3d(0, 1, 0, 0deg); + } +} +@media (min-width: 1200px) { + .bodywebsite .thumbnail-variant-1 * + .thumbnail-caption { + margin-top: 30px; + } +} +.bodywebsite .thumbnail-variant-2 { + min-height: 300px; + padding: 30px 0 0; + overflow: visible; + text-align: center; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; +} +.bodywebsite .thumbnail-variant-2-wrap { + padding-bottom: 25px; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-image { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: 100%; + width: 100%; + overflow: hidden; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-image > img { + position: absolute; + top: 20%; + left: 50%; + transform: translate(-50%, -20%); + width: auto; + min-width: 101%; + max-width: none; + height: auto; + min-height: 100%; + max-height: none; +} +.bodywebsite .thumbnail-variant-2:before { + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + background: rgba(0, 0, 0, 0.5); +} +.bodywebsite .thumbnail-variant-2 .thumbnail-inner { + position: relative; + z-index: 2; + padding: 30px 10px; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-caption { + position: relative; + z-index: 3; + width: calc(66%); + padding: 17px 8px 25px; + margin: 31px 17px -25px 17px; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-caption * { + color: #fff; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-caption a, +.bodywebsite .thumbnail-variant-2 .thumbnail-caption a:active, +.bodywebsite .thumbnail-variant-2 .thumbnail-caption a:focus { + color: #fff; +} +.bodywebsite .thumbnail-variant-2 .thumbnail-caption a:hover { + color: #9f9f9f; +} +.bodywebsite .thumbnail-variant-2 .text-header { + font-size: 18px; + font-weight: 700; +} +.bodywebsite .thumbnail-variant-2 .text-caption { + font-style: italic; + line-height: 1.3; + font-family: "Roboto", Helvetica, Arial, sans-serif; +} +@media (min-width: 768px) { + .bodywebsite .thumbnail-variant-2 .text-caption { + font-size: 16px; + } +} +@media (min-width: 992px) { + .bodywebsite .desktop .thumbnail-variant-2:before { + top: 40px; + } + .bodywebsite .desktop .thumbnail-variant-2 .thumbnail-inner > * { + position: relative; + transform: translateY(14px); + transition: 0.4s all ease-in-out; + } + .bodywebsite .desktop .thumbnail-variant-2:before, + .bodywebsite .desktop .thumbnail-variant-2 .thumbnail-inner { + opacity: 0; + visibility: hidden; + transition: 0.33s all ease-out; + } + .bodywebsite .desktop .thumbnail-variant-2:hover:before { + top: 0; + left: 0; + right: 0; + } + .bodywebsite .desktop .thumbnail-variant-2:hover .thumbnail-inner > * { + transform: translateY(0); + } + .bodywebsite .desktop .thumbnail-variant-2:hover:before, + .bodywebsite .desktop .thumbnail-variant-2:hover .thumbnail-inner { + opacity: 1; + visibility: visible; + } +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-variant-2 .thumbnail-caption { + width: calc(84%); + margin: 31px 8px -25px 8px; + } +} +@media (min-width: 1200px) { + .bodywebsite .thumbnail-variant-2 { + width: calc(78%); + margin: 0 11px 0; + } + .bodywebsite .thumbnail-variant-2 .thumbnail-caption { + width: calc(66%); + margin: 31px 17px -25px 17px; + } +} +.bodywebsite .ie-11 .thumbnail-variant-2 { + min-height: 0; +} +.bodywebsite .thumbnail-variant-3 { + width: 100.025%; + text-align: center; +} +.bodywebsite .thumbnail-variant-3 img { + position: relative; + left: 50%; + transform: translateX(-50%); + width: auto; + max-width: none; + min-width: 100.5%; +} +.bodywebsite .thumbnail-variant-3 .link-external { + position: absolute; + top: -30px; + right: -30px; + z-index: 1; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + width: 200px; + height: 110px; + padding: 55px 15px 5px; + vertical-align: bottom; + line-height: 40px; + background: #fafafa; + transform-origin: 74% 110%; + transform: rotate(45deg); + will-change: transform; + text-align: center; + /** + @bugfix: color flickering in child objects on hover + @affected: IE Edge + */ + transition: top 0.28s cubic-bezier(0.79, 0.14, 0.15, 0.86), right 0.28s cubic-bezier(0.79, 0.14, 0.15, 0.86), opacity 0.28s cubic-bezier(0.79, 0.14, 0.15, 0.86), visibility 0.28s cubic-bezier(0.79, 0.14, 0.15, 0.86); +} +.bodywebsite .thumbnail-variant-3 .link-external .icon { + transition: none; + transform: rotate(-45deg); + color: #000; + vertical-align: bottom; +} +.bodywebsite .thumbnail-variant-3 .link-external:hover { + top: -12px; + right: -12px; +} +.bodywebsite .thumbnail-variant-3 .link-original { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: flex-end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.bodywebsite .thumbnail-variant-3 .link-original, +.bodywebsite .thumbnail-variant-3 .link-original:active, +.bodywebsite .thumbnail-variant-3 .link-original:focus, +.bodywebsite .thumbnail-variant-3 .link-original:hover { + color: #fff; +} +.bodywebsite .thumbnail-variant-3 .link-original:before { + content: '\e8ff'; + position: relative; + left: 20px; + bottom: 30px; + z-index: 3; + font-family: 'Material Icons'; + font-size: 140px; + line-height: 1; + opacity: .2; + transition: .33s all ease; +} +.bodywebsite .thumbnail-variant-3 .caption { + position: absolute; + top: -2px; + right: 0; + bottom: -2px; + left: 0; + padding: 15px; + transition: 0.33s all ease-in-out; + background: rgba(0, 0, 0, 0.6); +} +@media (min-width: 992px) { + .bodywebsite .desktop .thumbnail-variant-3 figure img { + will-change: transform; + transition: 0.4s ease-out; + } + .bodywebsite .desktop .thumbnail-variant-3 .caption, + .bodywebsite .desktop .thumbnail-variant-3 .link-external { + opacity: 0; + visibility: hidden; + } + .bodywebsite .desktop .thumbnail-variant-3 .link-external { + right: -50px; + top: -50px; + } + .bodywebsite .desktop .thumbnail-variant-3:hover .caption, + .bodywebsite .desktop .thumbnail-variant-3:hover .link-external { + opacity: 1; + visibility: visible; + } + .bodywebsite .desktop .thumbnail-variant-3:hover figure img { + transform: translateX(-50%) scale(1.08); + } + .bodywebsite .desktop .thumbnail-variant-3:hover .link-external { + right: -30px; + top: -30px; + } + .bodywebsite .desktop .thumbnail-variant-3:hover .link-external:hover { + top: -20px; + right: -20px; + } +} +.bodywebsite .thumbnail-variant-3 > * + * { + margin-top: 0; +} +@media (min-width: 768px) { + .bodywebsite .thumbnail-wrap { + padding: 0 5px; + } +} +@media (min-width: 1200px) { + .bodywebsite .thumbnail-wrap { + padding: 0 9px; + } +} +.bodywebsite .thumbnail-variant-4 { + position: relative; + overflow: hidden; + box-shadow: 0px 0px 13px 0px rgba(1, 3, 4, 0.15); +} +.bodywebsite .thumbnail-variant-4 .thumbnail-image { + background: #000; +} +.bodywebsite .thumbnail-variant-4 .thumbnail-image img { + opacity: .92; +} +.bodywebsite .thumbnail-variant-4 .caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 16px 15px; + text-align: center; + color: #000; + background: #fff; +} +.bodywebsite .thumbnail-variant-4 .text-light { + color: #0d0d0d; +} +@media (min-width: 992px) { + .bodywebsite .desktop .thumbnail-variant-4 .thumbnail-image img { + position: relative; + will-change: transform; + opacity: 1; + transition: opacity .7s, transform .7s; + transform: scale3d(1.0001, 1.0001, 1); + } + .bodywebsite .desktop .thumbnail-variant-4 .caption, + .bodywebsite .desktop .thumbnail-variant-4 .caption-header { + transition: transform 0.55s; + transform: translate3d(0, 200%, 0); + } + .bodywebsite .desktop .thumbnail-variant-4 .caption-header { + transition-delay: 0.05s; + } + .bodywebsite .desktop .thumbnail-variant-4:hover .thumbnail-image img { + opacity: .9; + transform: scale3d(1.07, 1.07, 1); + } + .bodywebsite .desktop .thumbnail-variant-4:hover .caption, + .bodywebsite .desktop .thumbnail-variant-4:hover .caption-header { + transform: translate3d(0, 0, 0); + } +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-variant-4 .caption { + padding: 20px 15px; + } +} +.bodywebsite .thumbnail-profile .thumbnail-image img { + width: 100%; +} +.bodywebsite .thumbnail-profile .thumbnail-caption { + padding: 20px; + background: #f2f3f7; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner { + margin-bottom: -12px; + -webkit-align-items: flex-end; + -ms-flex-align: end; + align-items: flex-end; + transform: translateY(-12px); + text-align: center; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner > * { + display: inline-block; + margin-top: 12px; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner, +.bodywebsite .thumbnail-profile .thumbnail-caption-inner > ul { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner ul { + position: relative; + margin-bottom: -3px; + transform: translateY(-3px); + -webkit-flex-grow: 2; + -ms-flex-positive: 2; + flex-grow: 2; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner ul > li { + display: inline-block; + margin-top: 3px; + padding: 0 7px; +} +.bodywebsite .thumbnail-profile .thumbnail-caption-inner .btn-wrap { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +@media (min-width: 576px) { + .bodywebsite .thumbnail-profile .thumbnail-caption-inner, + .bodywebsite .thumbnail-profile .thumbnail-caption-inner ul { + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + } +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-profile .thumbnail-caption-inner ul { + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; + } +} +@media (min-width: 1200px) { + .bodywebsite .thumbnail-profile .thumbnail-caption-inner { + text-align: left; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + } + .bodywebsite .thumbnail-profile .thumbnail-caption-inner .btn-wrap { + text-align: right; + } +} +@media (max-width: 767px) { + .bodywebsite .thumbnail-variant-2 { + max-width: 300px; + margin-left: auto; + margin-right: auto; + } + .bodywebsite .thumbnail-variant-3, + .bodywebsite .thumbnail-profile { + max-width: 370px; + margin-left: auto; + margin-right: auto; + } +} +.bodywebsite .thumbnail-block { + display: block; +} +.bodywebsite .thumbnail-block > img, +.bodywebsite .thumbnail-block a > img { + width: 100%; + height: auto; +} +.bodywebsite .thumbnail-variant-5 { + padding: 40px 20px; + display: inline-block; +} +.bodywebsite .thumbnail-variant-5, +.bodywebsite .thumbnail-variant-5 img { + transition: 0.2s ease-in-out; +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-variant-5 { + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + } + .bodywebsite .thumbnail-variant-5 .thumbnail-variant-5-img-wrap { + position: relative; + display: inline-block; + } + .bodywebsite .thumbnail-variant-5 .thumbnail-variant-5-img-wrap:before { + content: ''; + position: absolute; + top: 0; + right: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 50%; + background: rgba(0, 0, 0, 0.4); + transition: 0.2s ease-in-out; + } + .bodywebsite .thumbnail-variant-5 { + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.15); + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + } + .bodywebsite .thumbnail-variant-5:hover .thumbnail-variant-5-img-wrap:before { + opacity: 0; + } + .bodywebsite .thumbnail-variant-5:hover img { + will-change: transform; + -webkit-transform: scale(1.18); + transform: scale(1.18); + } +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-variant-5 { + padding: 40px 50px; + } +} +@media (min-width: 1200px) { + .bodywebsite .thumbnail-variant-5 { + padding: 65px 50px; + } +} +.bodywebsite .thumbnail-variant-5 * + h2 { + margin-top: 36px; +} +.bodywebsite .thumbnail-variant-5 h2 + * { + margin-top: 0; +} +.bodywebsite .thumbnail-variant-5 .link-group + .link-group { + margin-top: 7px; +} +.bodywebsite .thumbnail-variant-5 .divider-fullwidth { + margin-top: 12px; + margin-bottom: 17px; +} +.bodywebsite .thumbnail-with-img * + .thumbnail-title { + margin-top: 22px; +} +.bodywebsite .thumbnail-with-img .thumbnail-title + * { + margin-top: 10px; +} +.bodywebsite .thumbnail-profile-info h4 + * { + margin-top: 0; +} +.bodywebsite .thumbnail-profile-info * + .profile-quote { + margin-top: 15px; +} +.bodywebsite .thumbnail-profile-info .profile-quote + * { + margin-top: 15px; +} +.bodywebsite .thumbnail-profile-info * + .list-progress { + margin-top: 35px; +} +@media (min-width: 992px) { + .bodywebsite .thumbnail-profile-info * + .profile-quote { + margin-top: 0; + } + .bodywebsite .thumbnail-profile-info .profile-quote + * { + margin-top: 0; + } +} +.bodywebsite figure img { + margin: 18px; + border: 1px solid #ccc; + box-shadow: 1px 1px 25px #aaa; + max-width: calc(44%); +} +.bodywebsite figure img { + width: 100%; + height: auto; + max-width: none; +} +.bodywebsite .figure .caption { + padding: 15px; +} +.bodywebsite .rd-mailform { + position: relative; +} +.bodywebsite label { + margin-bottom: 0; +} +.bodywebsite input::-webkit-autofill + .form-label { + display: none; + transition: none; +} +.bodywebsite .form-label, +.bodywebsite .form-input { + font-weight: 400; +} +.bodywebsite .input-sm, +.bodywebsite .input-lg, +.bodywebsite .form-input { + font-size: 14px; +} +.bodywebsite .input-sm, +.bodywebsite .input-sm:focus, +.bodywebsite .input-lg, +.bodywebsite .input-lg:focus, +.bodywebsite .form-input, +.bodywebsite .form-input:focus { + box-shadow: none; +} +.bodywebsite textarea.form-input { + height: 166px; + min-height: 52px; + max-height: 249px; + resize: vertical; +} +.bodywebsite .form-input { + height: auto; + min-height: 20px; + border: 0px solid #dedede; + border-radius: 0; + -webkit-appearance: none; + line-height: 24px; +} +.bodywebsite .form-input:focus { + outline: 0; +} +.bodywebsite .form-wrap { + position: relative; + margin-bottom: 0; +} +.bodywebsite .form-wrap + .form-wrap { + margin-top: 10px; +} +.bodywebsite .form-label { + position: absolute; + top: 26px; + left: 19px; + font-size: 14px; + color: #9f9f9f; + pointer-events: none; + z-index: 9; + transition: .3s; + transform: translateY(-50%); + will-change: transform; +} +.bodywebsite .form-label.focus { + opacity: 0; +} +.bodywebsite .form-label.auto-fill { + color: #9f9f9f; +} +@media (min-width: 768px) { + .bodywebsite .form-label-outside { + position: static; + margin-bottom: 8px; + } + .bodywebsite .form-label-outside, + .bodywebsite .form-label-outside.focus, + .bodywebsite .form-label-outside.auto-fill { + transform: none; + color: #9f9f9f; + font-size: 14px; + } +} +.bodywebsite .form-wrap-outside { + margin-top: 10px; +} +.bodywebsite .form-wrap-outside .form-label-outside { + position: absolute; + top: -15px; + left: 0; +} +.bodywebsite .form-wrap-outside .form-label-outside.focus { + opacity: 1; +} +@media (min-width: 768px) { + .bodywebsite .form-wrap-outside .form-label-outside { + top: -30px; + } +} +.bodywebsite .form-border-bottom { + border-bottom: 3px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .form-validation { + position: absolute; + right: 10px; + top: 2px; + font-size: 11px; + line-height: 11px; + color: #fe4a21; + margin-top: 2px; + transition: .3s; +} +.bodywebsite form.label-outside .form-validation { + top: 12px; +} +.bodywebsite .has-error .help-block, +.bodywebsite .has-error .control-label, +.bodywebsite .has-error .radio, +.bodywebsite .has-error .checkbox, +.bodywebsite .has-error .radio-inline, +.bodywebsite .has-error .checkbox-inline, +.bodywebsite .has-error.radio label, +.bodywebsite .has-error.checkbox label, +.bodywebsite .has-error.radio-inline label, +.bodywebsite .has-error.checkbox-inline label { + color: #fe4a21; +} +.bodywebsite .has-error .form-input:not(.form-input-impressed), +.bodywebsite .has-error .form-input:not(.form-input-impressed):focus { + border-color: #fe4a21; + box-shadow: none; +} +.bodywebsite .has-error .form-input-impressed, +.bodywebsite .has-error .form-input-impressed:focus { + box-shadow: inset 0 0 0 1px #fe4a21; +} +.bodywebsite .has-error .input-group-addon { + color: #fff; + border-color: #fe4a21; + background-color: #fe4a21; +} +.bodywebsite .form-inline .has-error ~ button[type='submit'] { + border-color: #fe4a21; + background: #fe4a21; +} +.bodywebsite .has-error .form-validation { + color: #fe4a21; +} +.bodywebsite .has-success .help-block, +.bodywebsite .has-success .control-label, +.bodywebsite .has-success .radio, +.bodywebsite .has-success .checkbox, +.bodywebsite .has-success .radio-inline, +.bodywebsite .has-success .checkbox-inline, +.bodywebsite .has-success.radio label, +.bodywebsite .has-success.checkbox label, +.bodywebsite .has-success.radio-inline label, +.bodywebsite .has-success.checkbox-inline label { + color: #58c476; +} +.bodywebsite .has-success .form-input:not(.form-input-impressed), +.bodywebsite .has-success .form-input:not(.form-input-impressed):focus { + border-color: #dff0d8; + box-shadow: none; +} +.bodywebsite .has-success .form-input-impressed, +.bodywebsite .has-success .form-input-impressed:focus { + box-shadow: inset 0 0 0 1px #dff0d8; +} +.bodywebsite .has-success .input-group-addon { + color: #fff; + border-color: #dff0d8; + background-color: #dff0d8; +} +.bodywebsite .form-inline .has-success ~ button[type='submit'] { + border-color: #dff0d8; + background: #dff0d8; +} +.bodywebsite .has-success .form-validation { + color: #58c476; +} +.bodywebsite .has-warning .help-block, +.bodywebsite .has-warning .control-label, +.bodywebsite .has-warning .radio, +.bodywebsite .has-warning .checkbox, +.bodywebsite .has-warning .radio-inline, +.bodywebsite .has-warning .checkbox-inline, +.bodywebsite .has-warning.radio label, +.bodywebsite .has-warning.checkbox label, +.bodywebsite .has-warning.radio-inline label, +.bodywebsite .has-warning.checkbox-inline label { + color: #c49558; +} +.bodywebsite .has-warning .form-input:not(.form-input-impressed), +.bodywebsite .has-warning .form-input:not(.form-input-impressed):focus { + border-color: #fcf8e3; + box-shadow: none; +} +.bodywebsite .has-warning .form-input-impressed, +.bodywebsite .has-warning .form-input-impressed:focus { + box-shadow: inset 0 0 0 1px #fcf8e3; +} +.bodywebsite .has-warning .input-group-addon { + color: #fff; + border-color: #fcf8e3; + background-color: #fcf8e3; +} +.bodywebsite .form-inline .has-warning ~ button[type='submit'] { + border-color: #fcf8e3; + background: #fcf8e3; +} +.bodywebsite .has-warning .form-validation { + color: #c49558; +} +.bodywebsite .has-info .help-block, +.bodywebsite .has-info .control-label, +.bodywebsite .has-info .radio, +.bodywebsite .has-info .checkbox, +.bodywebsite .has-info .radio-inline, +.bodywebsite .has-info .checkbox-inline, +.bodywebsite .has-info.radio label, +.bodywebsite .has-info.checkbox label, +.bodywebsite .has-info.radio-inline label, +.bodywebsite .has-info.checkbox-inline label { + color: #3e9cf6; +} +.bodywebsite .has-info .form-input:not(.form-input-impressed), +.bodywebsite .has-info .form-input:not(.form-input-impressed):focus { + border-color: #d9edf7; + box-shadow: none; +} +.bodywebsite .has-info .form-input-impressed, +.bodywebsite .has-info .form-input-impressed:focus { + box-shadow: inset 0 0 0 1px #d9edf7; +} +.bodywebsite .has-info .input-group-addon { + color: #fff; + border-color: #d9edf7; + background-color: #d9edf7; +} +.bodywebsite .form-inline .has-info ~ button[type='submit'] { + border-color: #d9edf7; + background: #d9edf7; +} +.bodywebsite .has-info .form-validation { + color: #3e9cf6; +} +.bodywebsite #form-output-global { + position: fixed; + bottom: 30px; + left: 15px; + visibility: hidden; + transform: translateX(-500px); + transition: .3s all ease; + z-index: 9999999; +} +.bodywebsite #form-output-global.active { + transform: translateX(0); + visibility: visible; +} +@media (min-width: 576px) { + .bodywebsite #form-output-global { + left: 30px; + } +} +.bodywebsite .form-output { + position: absolute; + top: 100%; + left: 0; + font-size: 14px; + line-height: 1.5; + margin-top: 2px; + transition: .3s; + opacity: 0; + visibility: hidden; +} +.bodywebsite .form-output.active { + opacity: 1; + visibility: visible; +} +.bodywebsite .form-output.error { + color: #fe4a21; +} +.bodywebsite .form-output.success { + color: #58c476; +} +.bodywebsite .radio .radio-custom, +.bodywebsite .radio-inline .radio-custom, +.bodywebsite .checkbox .checkbox-custom, +.bodywebsite .checkbox-inline .checkbox-custom { + opacity: 0; +} +.bodywebsite .radio .radio-custom, +.bodywebsite .radio .radio-custom-dummy, +.bodywebsite .radio-inline .radio-custom, +.bodywebsite .radio-inline .radio-custom-dummy, +.bodywebsite .checkbox .checkbox-custom, +.bodywebsite .checkbox .checkbox-custom-dummy, +.bodywebsite .checkbox-inline .checkbox-custom, +.bodywebsite .checkbox-inline .checkbox-custom-dummy { + position: absolute; + width: 18px; + height: 18px; + margin-left: -20px; + margin-top: 3px; + outline: none; + cursor: pointer; +} +.bodywebsite .radio .radio-custom-dummy, +.bodywebsite .radio-inline .radio-custom-dummy, +.bodywebsite .checkbox .checkbox-custom-dummy, +.bodywebsite .checkbox-inline .checkbox-custom-dummy { + pointer-events: none; +} +.bodywebsite .radio .radio-custom-dummy:after, +.bodywebsite .radio-inline .radio-custom-dummy:after, +.bodywebsite .checkbox .checkbox-custom-dummy:after, +.bodywebsite .checkbox-inline .checkbox-custom-dummy:after { + position: absolute; + opacity: 0; + transition: .22s; +} +.bodywebsite .radio .radio-custom:focus, +.bodywebsite .radio-inline .radio-custom:focus, +.bodywebsite .checkbox .checkbox-custom:focus, +.bodywebsite .checkbox-inline .checkbox-custom:focus { + outline: none; +} +.bodywebsite .radio-custom:checked + .radio-custom-dummy:after, +.bodywebsite .checkbox-custom:checked + .checkbox-custom-dummy:after { + opacity: 1; +} +.bodywebsite .radio, +.bodywebsite .radio-inline { + padding-left: 30px; +} +.bodywebsite .radio .radio-custom-dummy, +.bodywebsite .radio-inline .radio-custom-dummy { + margin-top: 2px; + border-radius: 50%; + margin-left: -30px; + background: transparent; + border: 2px solid #000; +} +.bodywebsite .radio .radio-custom-dummy:after, +.bodywebsite .radio-inline .radio-custom-dummy:after { + content: ''; + top: 3px; + right: 3px; + bottom: 3px; + left: 3px; + background: #00030a; + border-radius: 50%; +} +.bodywebsite .form-wrap-color .radio-inline, +.bodywebsite .form-wrap-size .radio-inline { + padding-left: 0; +} +.bodywebsite .form-wrap-color .radio-control, +.bodywebsite .form-wrap-size .radio-control { + position: relative; + display: block; + width: 24px; + height: 24px; + border-radius: 50%; + margin-top: 23px; + margin-bottom: 23px; +} +.bodywebsite .form-wrap-color .radio-control:after, +.bodywebsite .form-wrap-size .radio-control:after { + bottom: 0; +} +.bodywebsite .form-wrap-color .radio-control:after, +.bodywebsite .form-wrap-size .radio-control:after { + content: ''; + position: absolute; + left: 50%; + bottom: -23px; + transform: translateX(-50%); + width: 0; + max-width: 100%; + height: 3px; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + visibility: hidden; + transition: .2s; +} +.bodywebsite .form-wrap-color .radio-custom:checked ~ .radio-control:after, +.bodywebsite .form-wrap-size .radio-custom:checked ~ .radio-control:after { + visibility: visible; + width: 100%; +} +.bodywebsite .form-wrap-color .radio-custom-dummy, +.bodywebsite .form-wrap-size .radio-custom-dummy { + display: none; +} +.bodywebsite .form-wrap-size .radio-inline { + padding-left: 2px; + padding-right: 2px; +} +.bodywebsite .form-wrap-size .radio-inline + .radio-inline { + margin-left: 1px; +} +.bodywebsite .form-wrap-size .radio-control { + color: #9f9f9f; + text-align: center; + text-transform: uppercase; + transition: .2s; +} +.bodywebsite .form-wrap-size .radio-control:hover { + color: #000; +} +.bodywebsite .form-wrap-size .radio-custom:checked ~ .radio-control { + color: #000; +} +.bodywebsite .checkbox, +.bodywebsite .checkbox-inline { + padding-left: 38px; + color: #000; +} +.bodywebsite .checkbox .checkbox-custom-dummy, +.bodywebsite .checkbox-inline .checkbox-custom-dummy { + pointer-events: none; + border-radius: 2px; + margin-left: 0; + left: 0; + background: #fff; + box-shadow: none; + border: 2px solid #dedede; +} +.bodywebsite .checkbox .checkbox-custom-dummy:after, +.bodywebsite .checkbox-inline .checkbox-custom-dummy:after { + content: '\e5ca'; + font-family: 'Material Icons'; + font-size: 22px; + line-height: 10px; + position: absolute; + top: 0; + left: -1px; + color: #2a2b2b; +} +.bodywebsite .checkbox-small { + padding-left: 26px; +} +.bodywebsite .checkbox-small .checkbox-custom-dummy { + margin-top: 6px; + width: 12px; + height: 12px; + border-width: 1px; + border-radius: 1px; +} +.bodywebsite .checkbox-small .checkbox-custom-dummy:after { + top: -1px; + left: -2px; + font-size: 18px; +} +.bodywebsite .textarea-lined-wrap { + position: relative; + line-height: 2.39; +} +.bodywebsite .textarea-lined-wrap textarea { + height: 203px; + resize: none; + overflow: hidden; + line-height: 2.39; + background-color: transparent; +} +.bodywebsite .textarea-lined-wrap-xs textarea { + height: 68px; +} +.bodywebsite .page .form-classic-bordered .form-label, +.bodywebsite .page .form-classic-bordered .form-label-outside, +.bodywebsite .page .form-classic-bordered .form-input { + color: #000; +} +.bodywebsite .page .form-classic-bordered .form-input { + border: 1px solid #dedede; +} +.bodywebsite .page .form-modern .form-input, +.bodywebsite .page .form-modern .form-label { + color: #9f9f9f; +} +.bodywebsite .page .form-modern input { + height: auto; + min-height: 20px; +} +.bodywebsite .page .form-modern .form-input:focus { + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .form-modern .form-input { + padding: 6px 0; + border-radius: 0; + border-width: 0 0 1px 0; + border-color: #dedede; + background-color: transparent; +} +.bodywebsite .page .form-modern .form-label { + left: 0; + top: 18px; +} +.bodywebsite .page .form-modern .form-validation { + top: auto; + left: auto; + right: 0; + bottom: -12px; + font-style: italic; +} +.bodywebsite .page .form-modern .has-error .help-block, +.bodywebsite .page .form-modern .has-error .control-label, +.bodywebsite .page .form-modern .has-error .radio, +.bodywebsite .page .form-modern .has-error .checkbox, +.bodywebsite .page .form-modern .has-error .radio-inline, +.bodywebsite .page .form-modern .has-error .checkbox-inline, +.bodywebsite .page .form-modern .has-error.radio label, +.bodywebsite .page .form-modern .has-error.checkbox label, +.bodywebsite .page .form-modern .has-error.radio-inline label, +.bodywebsite .page .form-modern .has-error.checkbox-inline label { + color: #fe4a21; +} +.bodywebsite .page .form-modern .has-error .form-input:not(.form-input-impressed), +.bodywebsite .page .form-modern .has-error .form-input:not(.form-input-impressed):focus { + border-color: #fe4a21; + box-shadow: none; +} +.bodywebsite .page .form-modern .has-error .form-input-impressed, +.bodywebsite .page .form-modern .has-error .form-input-impressed:focus { + box-shadow: inset 0 0 0 1px #fe4a21; +} +.bodywebsite .page .form-modern .has-error .input-group-addon { + color: #fff; + border-color: #fe4a21; + background-color: #fe4a21; +} +.bodywebsite .form-inline .page .form-modern .has-error ~ button[type='submit'] { + border-color: #fe4a21; + background: #fe4a21; +} +.bodywebsite .page .form-modern .has-error .form-validation { + color: #fe4a21; +} +.bodywebsite .page .form-modern.form-darker .form-input, +.bodywebsite .page .form-modern.form-darker .form-label { + color: #000; +} +.bodywebsite .page .form-modern.form-darker .form-label:not(.focus) + .form-input { + border-color: #cdcdcd; +} +.bodywebsite .page .form-modern.form-inverse .form-label, +.bodywebsite .page .form-modern.form-inverse .form-input { + color: #9f9f9f; + background-color: transparent; +} +.bodywebsite .page .form-modern.form-inverse .form-label.text-white-05, +.bodywebsite .page .form-modern.form-inverse .form-input.text-white-05 { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .stacktable { + width: 100%; + text-align: left; +} +.bodywebsite .st-head-row { + padding-top: 1em; +} +.bodywebsite .st-head-row.st-head-row-main { + font-size: 1.5em; + padding-top: 0; +} +.bodywebsite .st-key { + width: 49%; + text-align: right; + padding-right: 1%; +} +.bodywebsite .st-val { + width: 49%; + padding-left: 1%; +} +.bodywebsite .stacktable.large-only { + display: none; +} +.bodywebsite .stacktable.small-only { + display: table; +} +@media (min-width: 768px) { + .bodywebsite .stacktable.large-only { + display: table; + } + .bodywebsite .stacktable.small-only { + display: none; + } +} +.bodywebsite .section-relative { + position: relative; +} +.bodywebsite #sectionfooter h4, +.bodywebsite #sectiontestimonies h1 { + color: #fff; +} +@media (min-width: 768px) { + .bodywebsite .section-with-counters { + padding-top: 1px; + padding-bottom: 1px; + } + .bodywebsite .section-with-counters > div { + position: relative; + box-shadow: 2px 2px 27px 0px rgba(1, 3, 4, 0.35); + z-index: 2; + margin-top: -30px; + margin-bottom: -30px; + } +} +@media (min-width: 768px) { + .bodywebsite .section-image-aside { + position: relative; + } +} +.bodywebsite .section-image-aside-img { + position: absolute; + top: 0; + bottom: 0; + width: 190%; + -webkit-background-size: cover; + background-size: cover; +} +@media (min-width: 768px) { + .bodywebsite .section-image-aside-img { + width: 50vw; + } +} +.bodywebsite .section-image-aside-left .section-image-aside-img { + right: -50%; +} +@media (min-width: 768px) { + .bodywebsite .section-image-aside-left .section-image-aside-img { + right: 0; + } +} +.bodywebsite .section-image-aside-right .section-image-aside-img { + left: -50%; +} +@media (min-width: 768px) { + .bodywebsite .section-image-aside-right .section-image-aside-img { + left: 0; + } +} +.bodywebsite .section-15 { + padding-top: 15px; + padding-bottom: 15px; +} +.bodywebsite .section-30 { + padding-top: 30px; + padding-bottom: 30px; +} +.bodywebsite .section-35 { + padding-top: 35px; + padding-bottom: 35px; +} +.bodywebsite .section-40 { + padding-top: 40px; + padding-bottom: 40px; +} +.bodywebsite .section-45 { + padding-top: 45px; + padding-bottom: 45px; +} +.bodywebsite .section-50 { + padding-top: 50px; + padding-bottom: 50px; +} +.bodywebsite .section-60 { + padding-top: 60px; + padding-bottom: 60px; +} +.bodywebsite .section-66 { + padding-top: 66px; + padding-bottom: 66px; +} +.bodywebsite .section-75 { + padding-top: 75px; + padding-bottom: 75px; +} +.bodywebsite .section-90 { + padding-top: 90px; + padding-bottom: 90px; +} +.bodywebsite .section-100 { + padding-top: 100px; + padding-bottom: 100px; +} +.bodywebsite .section-120 { + padding-top: 120px; + padding-bottom: 120px; +} +.bodywebsite .section-130 { + padding-top: 130px; + padding-bottom: 130px; +} +.bodywebsite .section-145 { + padding-top: 145px; + padding-bottom: 145px; +} +.bodywebsite .section-165 { + padding-top: 165px; + padding-bottom: 165px; +} +@media (min-width: 576px) { + .bodywebsite .section-sm-15 { + padding-top: 15px; + padding-bottom: 15px; + } + .bodywebsite .section-sm-30 { + padding-top: 30px; + padding-bottom: 30px; + } + .bodywebsite .section-sm-35 { + padding-top: 35px; + padding-bottom: 35px; + } + .bodywebsite .section-sm-40 { + padding-top: 40px; + padding-bottom: 40px; + } + .bodywebsite .section-sm-45 { + padding-top: 45px; + padding-bottom: 45px; + } + .bodywebsite .section-sm-50 { + padding-top: 50px; + padding-bottom: 50px; + } + .bodywebsite .section-sm-60 { + padding-top: 60px; + padding-bottom: 60px; + } + .bodywebsite .section-sm-66 { + padding-top: 66px; + padding-bottom: 66px; + } + .bodywebsite .section-sm-75 { + padding-top: 75px; + padding-bottom: 75px; + } + .bodywebsite .section-sm-90 { + padding-top: 90px; + padding-bottom: 90px; + } + .bodywebsite .section-sm-100 { + padding-top: 100px; + padding-bottom: 100px; + } + .bodywebsite .section-sm-120 { + padding-top: 120px; + padding-bottom: 120px; + } + .bodywebsite .section-sm-130 { + padding-top: 130px; + padding-bottom: 130px; + } + .bodywebsite .section-sm-145 { + padding-top: 145px; + padding-bottom: 145px; + } + .bodywebsite .section-sm-165 { + padding-top: 165px; + padding-bottom: 165px; + } +} +@media (min-width: 768px) { + .bodywebsite .section-md-15 { + padding-top: 15px; + padding-bottom: 15px; + } + .bodywebsite .section-md-30 { + padding-top: 30px; + padding-bottom: 30px; + } + .bodywebsite .section-md-35 { + padding-top: 35px; + padding-bottom: 35px; + } + .bodywebsite .section-md-40 { + padding-top: 40px; + padding-bottom: 40px; + } + .bodywebsite .section-md-45 { + padding-top: 45px; + padding-bottom: 45px; + } + .bodywebsite .section-md-50 { + padding-top: 50px; + padding-bottom: 50px; + } + .bodywebsite .section-md-60 { + padding-top: 60px; + padding-bottom: 60px; + } + .bodywebsite .section-md-66 { + padding-top: 66px; + padding-bottom: 66px; + } + .bodywebsite .section-md-75 { + padding-top: 75px; + padding-bottom: 75px; + } + .bodywebsite .section-md-90 { + padding-top: 90px; + padding-bottom: 90px; + } + .bodywebsite .section-md-100 { + padding-top: 100px; + padding-bottom: 100px; + } + .bodywebsite .section-md-120 { + padding-top: 120px; + padding-bottom: 120px; + } + .bodywebsite .section-md-130 { + padding-top: 130px; + padding-bottom: 130px; + } + .bodywebsite .section-md-145 { + padding-top: 145px; + padding-bottom: 145px; + } + .bodywebsite .section-md-165 { + padding-top: 165px; + padding-bottom: 165px; + } +} +@media (min-width: 992px) { + .bodywebsite .section-lg-15 { + padding-top: 15px; + padding-bottom: 15px; + } + .bodywebsite .section-lg-30 { + padding-top: 30px; + padding-bottom: 30px; + } + .bodywebsite .section-lg-35 { + padding-top: 35px; + padding-bottom: 35px; + } + .bodywebsite .section-lg-40 { + padding-top: 40px; + padding-bottom: 40px; + } + .bodywebsite .section-lg-45 { + padding-top: 45px; + padding-bottom: 45px; + } + .bodywebsite .section-lg-50 { + padding-top: 50px; + padding-bottom: 50px; + } + .bodywebsite .section-lg-60 { + padding-top: 60px; + padding-bottom: 60px; + } + .bodywebsite .section-lg-66 { + padding-top: 66px; + padding-bottom: 66px; + } + .bodywebsite .section-lg-75 { + padding-top: 75px; + padding-bottom: 75px; + } + .bodywebsite .section-lg-90 { + padding-top: 90px; + padding-bottom: 90px; + } + .bodywebsite .section-lg-100 { + padding-top: 100px; + padding-bottom: 100px; + } + .bodywebsite .section-lg-120 { + padding-top: 120px; + padding-bottom: 120px; + } + .bodywebsite .section-lg-130 { + padding-top: 130px; + padding-bottom: 130px; + } + .bodywebsite .section-lg-145 { + padding-top: 145px; + padding-bottom: 145px; + } + .bodywebsite .section-lg-165 { + padding-top: 165px; + padding-bottom: 165px; + } +} +@media (min-width: 1200px) { + .bodywebsite .section-xl-15 { + padding-top: 15px; + padding-bottom: 15px; + } + .bodywebsite .section-xl-30 { + padding-top: 30px; + padding-bottom: 30px; + } + .bodywebsite .section-xl-35 { + padding-top: 35px; + padding-bottom: 35px; + } + .bodywebsite .section-xl-40 { + padding-top: 40px; + padding-bottom: 40px; + } + .bodywebsite .section-xl-45 { + padding-top: 45px; + padding-bottom: 45px; + } + .bodywebsite .section-xl-50 { + padding-top: 50px; + padding-bottom: 50px; + } + .bodywebsite .section-xl-60 { + padding-top: 60px; + padding-bottom: 60px; + } + .bodywebsite .section-xl-66 { + padding-top: 66px; + padding-bottom: 66px; + } + .bodywebsite .section-xl-75 { + padding-top: 75px; + padding-bottom: 75px; + } + .bodywebsite .section-xl-90 { + padding-top: 90px; + padding-bottom: 90px; + } + .bodywebsite .section-xl-100 { + padding-top: 100px; + padding-bottom: 100px; + } + .bodywebsite .section-xl-120 { + padding-top: 120px; + padding-bottom: 120px; + } + .bodywebsite .section-xl-130 { + padding-top: 130px; + padding-bottom: 130px; + } + .bodywebsite .section-xl-145 { + padding-top: 145px; + padding-bottom: 145px; + } + .bodywebsite .section-xl-165 { + padding-top: 165px; + padding-bottom: 165px; + } +} +@media (min-width: 1800px) { + .bodywebsite .section-xxl-15 { + padding-top: 15px; + padding-bottom: 15px; + } + .bodywebsite .section-xxl-30 { + padding-top: 30px; + padding-bottom: 30px; + } + .bodywebsite .section-xxl-35 { + padding-top: 35px; + padding-bottom: 35px; + } + .bodywebsite .section-xxl-40 { + padding-top: 40px; + padding-bottom: 40px; + } + .bodywebsite .section-xxl-45 { + padding-top: 45px; + padding-bottom: 45px; + } + .bodywebsite .section-xxl-50 { + padding-top: 50px; + padding-bottom: 50px; + } + .bodywebsite .section-xxl-60 { + padding-top: 60px; + padding-bottom: 60px; + } + .bodywebsite .section-xxl-66 { + padding-top: 66px; + padding-bottom: 66px; + } + .bodywebsite .section-xxl-75 { + padding-top: 75px; + padding-bottom: 75px; + } + .bodywebsite .section-xxl-90 { + padding-top: 90px; + padding-bottom: 90px; + } + .bodywebsite .section-xxl-100 { + padding-top: 100px; + padding-bottom: 100px; + } + .bodywebsite .section-xxl-120 { + padding-top: 120px; + padding-bottom: 120px; + } + .bodywebsite .section-xxl-130 { + padding-top: 130px; + padding-bottom: 130px; + } + .bodywebsite .section-xxl-145 { + padding-top: 145px; + padding-bottom: 145px; + } + .bodywebsite .section-xxl-165 { + padding-top: 165px; + padding-bottom: 165px; + } +} +.bodywebsite .section-top-15 { + padding-top: 15px; +} +.bodywebsite .section-top-30 { + padding-top: 30px; +} +.bodywebsite .section-top-35 { + padding-top: 35px; +} +.bodywebsite .section-top-40 { + padding-top: 40px; +} +.bodywebsite .section-top-45 { + padding-top: 45px; +} +.bodywebsite .section-top-50 { + padding-top: 50px; +} +.bodywebsite .section-top-60 { + padding-top: 60px; +} +.bodywebsite .section-top-66 { + padding-top: 66px; +} +.bodywebsite .section-top-75 { + padding-top: 75px; +} +.bodywebsite .section-top-90 { + padding-top: 90px; +} +.bodywebsite .section-top-100 { + padding-top: 100px; +} +.bodywebsite .section-top-120 { + padding-top: 120px; +} +.bodywebsite .section-top-130 { + padding-top: 130px; +} +.bodywebsite .section-top-145 { + padding-top: 145px; +} +.bodywebsite .section-top-165 { + padding-top: 165px; +} +@media (min-width: 576px) { + .bodywebsite .section-sm-top-15 { + padding-top: 15px; + } + .bodywebsite .section-sm-top-30 { + padding-top: 30px; + } + .bodywebsite .section-sm-top-35 { + padding-top: 35px; + } + .bodywebsite .section-sm-top-40 { + padding-top: 40px; + } + .bodywebsite .section-sm-top-45 { + padding-top: 45px; + } + .bodywebsite .section-sm-top-50 { + padding-top: 50px; + } + .bodywebsite .section-sm-top-60 { + padding-top: 60px; + } + .bodywebsite .section-sm-top-66 { + padding-top: 66px; + } + .bodywebsite .section-sm-top-75 { + padding-top: 75px; + } + .bodywebsite .section-sm-top-90 { + padding-top: 90px; + } + .bodywebsite .section-sm-top-100 { + padding-top: 100px; + } + .bodywebsite .section-sm-top-120 { + padding-top: 120px; + } + .bodywebsite .section-sm-top-130 { + padding-top: 130px; + } + .bodywebsite .section-sm-top-145 { + padding-top: 145px; + } + .bodywebsite .section-sm-top-165 { + padding-top: 165px; + } +} +@media (min-width: 768px) { + .bodywebsite .section-md-top-15 { + padding-top: 15px; + } + .bodywebsite .section-md-top-30 { + padding-top: 30px; + } + .bodywebsite .section-md-top-35 { + padding-top: 35px; + } + .bodywebsite .section-md-top-40 { + padding-top: 40px; + } + .bodywebsite .section-md-top-45 { + padding-top: 45px; + } + .bodywebsite .section-md-top-50 { + padding-top: 50px; + } + .bodywebsite .section-md-top-60 { + padding-top: 60px; + } + .bodywebsite .section-md-top-66 { + padding-top: 66px; + } + .bodywebsite .section-md-top-75 { + padding-top: 75px; + } + .bodywebsite .section-md-top-90 { + padding-top: 90px; + } + .bodywebsite .section-md-top-100 { + padding-top: 100px; + } + .bodywebsite .section-md-top-120 { + padding-top: 120px; + } + .bodywebsite .section-md-top-130 { + padding-top: 130px; + } + .bodywebsite .section-md-top-145 { + padding-top: 145px; + } + .bodywebsite .section-md-top-165 { + padding-top: 165px; + } +} +@media (min-width: 992px) { + .bodywebsite .section-lg-top-15 { + padding-top: 15px; + } + .bodywebsite .section-lg-top-30 { + padding-top: 30px; + } + .bodywebsite .section-lg-top-35 { + padding-top: 35px; + } + .bodywebsite .section-lg-top-40 { + padding-top: 40px; + } + .bodywebsite .section-lg-top-45 { + padding-top: 45px; + } + .bodywebsite .section-lg-top-50 { + padding-top: 50px; + } + .bodywebsite .section-lg-top-60 { + padding-top: 60px; + } + .bodywebsite .section-lg-top-66 { + padding-top: 66px; + } + .bodywebsite .section-lg-top-75 { + padding-top: 75px; + } + .bodywebsite .section-lg-top-90 { + padding-top: 90px; + } + .bodywebsite .section-lg-top-100 { + padding-top: 100px; + } + .bodywebsite .section-lg-top-120 { + padding-top: 120px; + } + .bodywebsite .section-lg-top-130 { + padding-top: 130px; + } + .bodywebsite .section-lg-top-145 { + padding-top: 145px; + } + .bodywebsite .section-lg-top-165 { + padding-top: 165px; + } +} +@media (min-width: 1200px) { + .bodywebsite .section-xl-top-15 { + padding-top: 15px; + } + .bodywebsite .section-xl-top-30 { + padding-top: 30px; + } + .bodywebsite .section-xl-top-35 { + padding-top: 35px; + } + .bodywebsite .section-xl-top-40 { + padding-top: 40px; + } + .bodywebsite .section-xl-top-45 { + padding-top: 45px; + } + .bodywebsite .section-xl-top-50 { + padding-top: 50px; + } + .bodywebsite .section-xl-top-60 { + padding-top: 60px; + } + .bodywebsite .section-xl-top-66 { + padding-top: 66px; + } + .bodywebsite .section-xl-top-75 { + padding-top: 75px; + } + .bodywebsite .section-xl-top-90 { + padding-top: 90px; + } + .bodywebsite .section-xl-top-100 { + padding-top: 100px; + } + .bodywebsite .section-xl-top-120 { + padding-top: 120px; + } + .bodywebsite .section-xl-top-130 { + padding-top: 130px; + } + .bodywebsite .section-xl-top-145 { + padding-top: 145px; + } + .bodywebsite .section-xl-top-165 { + padding-top: 165px; + } +} +@media (min-width: 1800px) { + .bodywebsite .section-xxl-top-15 { + padding-top: 15px; + } + .bodywebsite .section-xxl-top-30 { + padding-top: 30px; + } + .bodywebsite .section-xxl-top-35 { + padding-top: 35px; + } + .bodywebsite .section-xxl-top-40 { + padding-top: 40px; + } + .bodywebsite .section-xxl-top-45 { + padding-top: 45px; + } + .bodywebsite .section-xxl-top-50 { + padding-top: 50px; + } + .bodywebsite .section-xxl-top-60 { + padding-top: 60px; + } + .bodywebsite .section-xxl-top-66 { + padding-top: 66px; + } + .bodywebsite .section-xxl-top-75 { + padding-top: 75px; + } + .bodywebsite .section-xxl-top-90 { + padding-top: 90px; + } + .bodywebsite .section-xxl-top-100 { + padding-top: 100px; + } + .bodywebsite .section-xxl-top-120 { + padding-top: 120px; + } + .bodywebsite .section-xxl-top-130 { + padding-top: 130px; + } + .bodywebsite .section-xxl-top-145 { + padding-top: 145px; + } + .bodywebsite .section-xxl-top-165 { + padding-top: 165px; + } +} +.bodywebsite .section-bottom-15 { + padding-bottom: 15px; +} +.bodywebsite .section-bottom-30 { + padding-bottom: 30px; +} +.bodywebsite .section-bottom-35 { + padding-bottom: 35px; +} +.bodywebsite .section-bottom-40 { + padding-bottom: 40px; +} +.bodywebsite .section-bottom-45 { + padding-bottom: 45px; +} +.bodywebsite .section-bottom-50 { + padding-bottom: 50px; +} +.bodywebsite .section-bottom-60 { + padding-bottom: 60px; +} +.bodywebsite .section-bottom-66 { + padding-bottom: 66px; +} +.bodywebsite .section-bottom-75 { + padding-bottom: 75px; +} +.bodywebsite .section-bottom-90 { + padding-bottom: 90px; +} +.bodywebsite .section-bottom-100 { + padding-bottom: 100px; +} +.bodywebsite .section-bottom-120 { + padding-bottom: 120px; +} +.bodywebsite .section-bottom-130 { + padding-bottom: 130px; +} +.bodywebsite .section-bottom-145 { + padding-bottom: 145px; +} +.bodywebsite .section-bottom-165 { + padding-bottom: 165px; +} +@media (min-width: 576px) { + .bodywebsite .section-sm-bottom-15 { + padding-bottom: 15px; + } + .bodywebsite .section-sm-bottom-30 { + padding-bottom: 30px; + } + .bodywebsite .section-sm-bottom-35 { + padding-bottom: 35px; + } + .bodywebsite .section-sm-bottom-40 { + padding-bottom: 40px; + } + .bodywebsite .section-sm-bottom-45 { + padding-bottom: 45px; + } + .bodywebsite .section-sm-bottom-50 { + padding-bottom: 50px; + } + .bodywebsite .section-sm-bottom-60 { + padding-bottom: 60px; + } + .bodywebsite .section-sm-bottom-66 { + padding-bottom: 66px; + } + .bodywebsite .section-sm-bottom-75 { + padding-bottom: 75px; + } + .bodywebsite .section-sm-bottom-90 { + padding-bottom: 90px; + } + .bodywebsite .section-sm-bottom-100 { + padding-bottom: 100px; + } + .bodywebsite .section-sm-bottom-120 { + padding-bottom: 120px; + } + .bodywebsite .section-sm-bottom-130 { + padding-bottom: 130px; + } + .bodywebsite .section-sm-bottom-145 { + padding-bottom: 145px; + } + .bodywebsite .section-sm-bottom-165 { + padding-bottom: 165px; + } +} +@media (min-width: 768px) { + .bodywebsite .section-md-bottom-15 { + padding-bottom: 15px; + } + .bodywebsite .section-md-bottom-30 { + padding-bottom: 30px; + } + .bodywebsite .section-md-bottom-35 { + padding-bottom: 35px; + } + .bodywebsite .section-md-bottom-40 { + padding-bottom: 40px; + } + .bodywebsite .section-md-bottom-45 { + padding-bottom: 45px; + } + .bodywebsite .section-md-bottom-50 { + padding-bottom: 50px; + } + .bodywebsite .section-md-bottom-60 { + padding-bottom: 60px; + } + .bodywebsite .section-md-bottom-66 { + padding-bottom: 66px; + } + .bodywebsite .section-md-bottom-75 { + padding-bottom: 75px; + } + .bodywebsite .section-md-bottom-90 { + padding-bottom: 90px; + } + .bodywebsite .section-md-bottom-100 { + padding-bottom: 100px; + } + .bodywebsite .section-md-bottom-120 { + padding-bottom: 120px; + } + .bodywebsite .section-md-bottom-130 { + padding-bottom: 130px; + } + .bodywebsite .section-md-bottom-145 { + padding-bottom: 145px; + } + .bodywebsite .section-md-bottom-165 { + padding-bottom: 165px; + } +} +@media (min-width: 992px) { + .bodywebsite .section-lg-bottom-15 { + padding-bottom: 15px; + } + .bodywebsite .section-lg-bottom-30 { + padding-bottom: 30px; + } + .bodywebsite .section-lg-bottom-35 { + padding-bottom: 35px; + } + .bodywebsite .section-lg-bottom-40 { + padding-bottom: 40px; + } + .bodywebsite .section-lg-bottom-45 { + padding-bottom: 45px; + } + .bodywebsite .section-lg-bottom-50 { + padding-bottom: 50px; + } + .bodywebsite .section-lg-bottom-60 { + padding-bottom: 60px; + } + .bodywebsite .section-lg-bottom-66 { + padding-bottom: 66px; + } + .bodywebsite .section-lg-bottom-75 { + padding-bottom: 75px; + } + .bodywebsite .section-lg-bottom-90 { + padding-bottom: 90px; + } + .bodywebsite .section-lg-bottom-100 { + padding-bottom: 100px; + } + .bodywebsite .section-lg-bottom-120 { + padding-bottom: 120px; + } + .bodywebsite .section-lg-bottom-130 { + padding-bottom: 130px; + } + .bodywebsite .section-lg-bottom-145 { + padding-bottom: 145px; + } + .bodywebsite .section-lg-bottom-165 { + padding-bottom: 165px; + } +} +@media (min-width: 1200px) { + .bodywebsite .section-xl-bottom-15 { + padding-bottom: 15px; + } + .bodywebsite .section-xl-bottom-30 { + padding-bottom: 30px; + } + .bodywebsite .section-xl-bottom-35 { + padding-bottom: 35px; + } + .bodywebsite .section-xl-bottom-40 { + padding-bottom: 40px; + } + .bodywebsite .section-xl-bottom-45 { + padding-bottom: 45px; + } + .bodywebsite .section-xl-bottom-50 { + padding-bottom: 50px; + } + .bodywebsite .section-xl-bottom-60 { + padding-bottom: 60px; + } + .bodywebsite .section-xl-bottom-66 { + padding-bottom: 66px; + } + .bodywebsite .section-xl-bottom-75 { + padding-bottom: 75px; + } + .bodywebsite .section-xl-bottom-90 { + padding-bottom: 90px; + } + .bodywebsite .section-xl-bottom-100 { + padding-bottom: 100px; + } + .bodywebsite .section-xl-bottom-120 { + padding-bottom: 120px; + } + .bodywebsite .section-xl-bottom-130 { + padding-bottom: 130px; + } + .bodywebsite .section-xl-bottom-145 { + padding-bottom: 145px; + } + .bodywebsite .section-xl-bottom-165 { + padding-bottom: 165px; + } +} +@media (min-width: 1800px) { + .bodywebsite .section-xxl-bottom-15 { + padding-bottom: 15px; + } + .bodywebsite .section-xxl-bottom-30 { + padding-bottom: 30px; + } + .bodywebsite .section-xxl-bottom-35 { + padding-bottom: 35px; + } + .bodywebsite .section-xxl-bottom-40 { + padding-bottom: 40px; + } + .bodywebsite .section-xxl-bottom-45 { + padding-bottom: 45px; + } + .bodywebsite .section-xxl-bottom-50 { + padding-bottom: 50px; + } + .bodywebsite .section-xxl-bottom-60 { + padding-bottom: 60px; + } + .bodywebsite .section-xxl-bottom-66 { + padding-bottom: 66px; + } + .bodywebsite .section-xxl-bottom-75 { + padding-bottom: 75px; + } + .bodywebsite .section-xxl-bottom-90 { + padding-bottom: 90px; + } + .bodywebsite .section-xxl-bottom-100 { + padding-bottom: 100px; + } + .bodywebsite .section-xxl-bottom-120 { + padding-bottom: 120px; + } + .bodywebsite .section-xxl-bottom-130 { + padding-bottom: 130px; + } + .bodywebsite .section-xxl-bottom-145 { + padding-bottom: 145px; + } + .bodywebsite .section-xxl-bottom-165 { + padding-bottom: 165px; + } +} +html .bodywebsite .group { + -webkit-transform: translateY(-15px); + transform: translateY(-15px); + margin-bottom: -15px; + margin-left: -15px; +} +html .bodywebsite .group > *, +html .bodywebsite .group > *:first-child { + display: inline-block; + margin-top: 15px; + margin-left: 15px; +} +html .bodywebsite .group-xs { + -webkit-transform: translateY(-5px); + transform: translateY(-5px); + margin-bottom: -5px; + margin-left: -5px; +} +html .bodywebsite .group-xs > *, +html .bodywebsite .group-xs > *:first-child { + display: inline-block; + margin-top: 5px; + margin-left: 5px; +} +html .bodywebsite .group-sm { + -webkit-transform: translateY(-10px); + transform: translateY(-10px); + margin-bottom: -10px; + margin-left: -10px; +} +html .bodywebsite .group-sm > *, +html .bodywebsite .group-sm > *:first-child { + display: inline-block; + margin-top: 10px; + margin-left: 10px; +} +html .bodywebsite .group-md { + -webkit-transform: translateY(-15px); + transform: translateY(-15px); + margin-bottom: -15px; + margin-left: -15px; +} +html .bodywebsite .group-md > *, +html .bodywebsite .group-md > *:first-child { + display: inline-block; + margin-top: 15px; + margin-left: 15px; +} +html .bodywebsite .group-lg { + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + margin-bottom: -20px; + margin-left: -20px; +} +html .bodywebsite .group-lg > *, +html .bodywebsite .group-lg > *:first-child { + display: inline-block; + margin-top: 20px; + margin-left: 20px; +} +html .bodywebsite .group-xl { + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + margin-bottom: -30px; + margin-left: -30px; +} +html .bodywebsite .group-xl > *, +html .bodywebsite .group-xl > *:first-child { + display: inline-block; + margin-top: 30px; + margin-left: 30px; +} +html .bodywebsite .group-top > *, +html .bodywebsite .group-top > *:first-child { + vertical-align: top; +} +html .bodywebsite .group-middle > *, +html .bodywebsite .group-middle > *:first-child { + vertical-align: middle; +} +html .bodywebsite .group-bottom > *, +html .bodywebsite .group-bottom > *:first-child { + vertical-align: bottom; +} +html .bodywebsite .group-inline > * { + display: inline; +} +html .bodywebsite .group-inline > *:not(:last-child) { + margin-right: .25em; +} +html .bodywebsite .group-xl-responsive { + -webkit-transform: translateY(-18px); + transform: translateY(-18px); + margin-bottom: -18px; + margin-left: -18px; +} +html .bodywebsite .group-xl-responsive > *, +html .bodywebsite .group-xl-responsive > *:first-child { + display: inline-block; + margin-top: 18px; + margin-left: 18px; +} +@media (min-width: 768px) { + html .bodywebsite .group-xl-responsive { + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + margin-bottom: -30px; + margin-left: -30px; + } + html .bodywebsite .group-xl-responsive > *, + html .bodywebsite .group-xl-responsive > *:first-child { + display: inline-block; + margin-top: 30px; + margin-left: 30px; + } +} +.bodywebsite .group-flex-center { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.bodywebsite .relative { + position: relative; +} +.bodywebsite .static { + position: static; +} +.bodywebsite .block-top-level { + position: relative; + z-index: 3; +} +.bodywebsite .height-fill { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +.bodywebsite .height-fill > * { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .centered { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.bodywebsite .align-bottom { + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; +} +.bodywebsite .block-centered { + margin-left: auto; + margin-right: auto; +} +@media (max-width: 767px) { + .bodywebsite .responsive-centered { + margin-left: auto; + margin-right: auto; + } +} +.bodywebsite .overflow-hidden { + overflow: hidden; +} +.bodywebsite .page .white-space-normal { + white-space: normal; +} +.bodywebsite * + h1, +.bodywebsite * + .h1 { + margin-top: 20px; +} +@media (min-width: 768px) { + .bodywebsite * + h1, + .bodywebsite * + .h1 { + margin-top: 27px; + } +} +@media (min-width: 992px) { + .bodywebsite * + h1, + .bodywebsite * + .h1 { + margin-top: 34px; + } +} +.bodywebsite * + h2, +.bodywebsite * + .h2 { + margin-top: 25px; +} +.bodywebsite * + h3, +.bodywebsite * + .h3 { + margin-top: 17px; +} +.bodywebsite * + h4, +.bodywebsite * + .h4 { + margin-top: 15px; +} +.bodywebsite h1 + *, +.bodywebsite .h1 + * { + margin-top: 25px; +} +.bodywebsite h2 + *, +.bodywebsite .h2 + * { + margin-top: 18px; +} +.bodywebsite h3 + *, +.bodywebsite .h3 + * { + margin-top: 19px; +} +.bodywebsite h4 + *, +.bodywebsite .h4 + * { + margin-top: 18px; +} +.bodywebsite * + p, +.bodywebsite * + p { + margin-top: 14px; +} +.bodywebsite * + .text-big { + margin-top: 20px; +} +.bodywebsite hr + * { + margin-top: 18px; +} +@media (min-width: 1200px) { + .bodywebsite hr + * { + margin-top: 26px; + } +} +.bodywebsite * + .big { + margin-top: 6px; +} +.bodywebsite * + .text-large { + margin-top: 10px; +} +.bodywebsite * + .text-bigger { + margin-top: 28px; +} +.bodywebsite * + .btn { + margin-top: 30px; +} +@media (min-width: 1200px) { + .bodywebsite * + .btn { + margin-top: 44px; + } +} +.bodywebsite * + .link { + margin-top: 18px; +} +.bodywebsite * + .contact-info { + margin-top: 16px; +} +.bodywebsite * + .list-inline { + margin-top: 32px; +} +.bodywebsite * + .list-terms { + margin-top: 42px; +} +@media (min-width: 1200px) { + .bodywebsite * + .list-terms { + margin-top: 62px; + } +} +.bodywebsite * + .list-marked, +.bodywebsite * + .list-ordered { + margin-top: 22px; +} +.bodywebsite * + .link-wrap { + margin-top: 8px; +} +.bodywebsite * + .link-iconed { + margin-top: 2px; +} +.bodywebsite .contact-info { + vertical-align: baseline; +} +.bodywebsite .contact-info a { + display: inline-block; +} +.bodywebsite .contact-info dl dt, +.bodywebsite .contact-info dl dd { + display: inline-block; +} +.bodywebsite .contact-info dl dt:after { + content: ':'; + display: inline-block; + text-align: center; +} +.bodywebsite .contact-info .dl-inline dt { + padding-right: 0; +} +.bodywebsite .grid-system p { + color: #00030a; +} +@media (max-width: 1199px) { + .bodywebsite .grid-system p { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} +.bodywebsite .object-inline, +.bodywebsite .object-inline-baseline { + white-space: nowrap; +} +.bodywebsite .object-inline > * + *, +.bodywebsite .object-inline-baseline > * + * { + margin-top: 0; + margin-left: 5px; +} +.bodywebsite .object-inline { + vertical-align: middle; +} +.bodywebsite .object-inline > * { + display: inline-block; + vertical-align: middle; +} +.bodywebsite .object-inline-baseline { + vertical-align: baseline; +} +.bodywebsite .object-inline-baseline > * { + display: inline-block; + vertical-align: baseline; +} +.bodywebsite .row-no-gutter { + margin-left: 0; + margin-right: 0; +} +.bodywebsite .row-no-gutter [class*='col'] { + padding: 0; +} +.bodywebsite .text-width-1 { + max-width: 400px; +} +@media (min-width: 992px) { + .bodywebsite .text-width-1 { + max-width: 310px; + } +} +.bodywebsite .min-width-1 { + min-width: 100%; +} +@media (min-width: 576px) { + .bodywebsite .min-width-1 { + min-width: 270px; + } +} +.bodywebsite .img-shadow { + box-shadow: -3px 2px 4px 0px rgba(0, 0, 0, 0.58); +} +@media (min-width: 768px) { + .bodywebsite .img-shadow { + box-shadow: -5px 4px 8px 0px rgba(0, 0, 0, 0.58); + } +} +.bodywebsite .box { + box-shadow: 0 5px 23px 0 rgba(0, 0, 0, 0.3); + padding: 50px 30px; + margin-top: 10px; + margin-bottom: 10px; +} +@media (min-width: 992px) { + .bodywebsite .box { + padding: 55px 30px 65px 44px; + } +} +@media (min-width: 1200px) { + .bodywebsite .box { + padding: 54px 40px 85px 54px; + } +} +.bodywebsite .box-xs { + padding: 38px 20px; +} +.bodywebsite .page .box-list-xs { + box-shadow: 0 5px 13px 0 rgba(0, 0, 0, 0.2); +} +.bodywebsite .page .box-list-xs .box-xs + .box-xs { + border-top: 1px solid #1c2e3f; +} +@media (min-width: 768px) { + .bodywebsite .page .box-list-xs { + max-width: 170px; + } +} +.bodywebsite .group-item { + width: 100%; + max-width: 220px; + margin-left: auto; + margin-right: auto; +} +@media (min-width: 576px) { + .bodywebsite .group-item { + max-width: 300px; + } +} +@media (min-width: 768px) { + .bodywebsite .group-item { + min-width: 40%; + max-width: 0; + } +} +@media (min-width: 1200px) { + .bodywebsite .group-item { + min-width: 272px; + } + .bodywebsite .group-item-sm { + min-width: 195px; + } +} +@media (min-width: 1200px) { + .bodywebsite .border-modern { + position: relative; + } + .bodywebsite .border-modern .border-modern-item-1, + .bodywebsite .border-modern .border-modern-item-2, + .bodywebsite .border-modern .border-modern-item-3, + .bodywebsite .border-modern .border-modern-item-4 { + position: absolute; + width: 45px; + height: 45px; + border-left: 3px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-top: 3px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + } + .bodywebsite .border-modern .border-modern-item-1, + .bodywebsite .border-modern .border-modern-item-2 { + top: -27px; + } + .bodywebsite .border-modern .border-modern-item-3, + .bodywebsite .border-modern .border-modern-item-4 { + bottom: -68px; + } + .bodywebsite .border-modern .border-modern-item-1, + .bodywebsite .border-modern .border-modern-item-3 { + left: 0px; + } + .bodywebsite .border-modern .border-modern-item-2, + .bodywebsite .border-modern .border-modern-item-4 { + right: 0px; + } + .bodywebsite .border-modern .border-modern-item-2 { + transform: rotate(90deg); + } + .bodywebsite .border-modern .border-modern-item-3 { + transform: rotate(-90deg); + } + .bodywebsite .border-modern .border-modern-item-4 { + transform: rotate(180deg); + } +} +.bodywebsite .pagination-custom { + display: inline-block; + position: relative; + transform: translateY(-4px); + margin-bottom: -4px; +} +.bodywebsite .pagination-custom > * { + margin-top: 4px; +} +.bodywebsite .pagination-custom > *:not(:last-child) { + margin-right: 4px; +} +.bodywebsite .pagination-custom .page-item { + display: inline-block; + line-height: 1; +} +.bodywebsite .pagination-custom .page-item:first-child .page-link, +.bodywebsite .pagination-custom .page-item:last-child .page-link { + padding-left: 25px; + padding-right: 25px; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .pagination-custom .page-item .page-link { + display: block; + width: auto; + min-width: 52px; + height: 52px; + padding: 10px 20px; + border: 2px solid; + border-radius: 0; + font: 700 14px/14px "Roboto", Helvetica, Arial, sans-serif; + text-transform: uppercase; + vertical-align: middle; +} +.bodywebsite .pagination-custom .page-item .page-link:after { + content: ''; + height: 108%; + width: 0; + display: inline-block; + vertical-align: middle; +} +.bodywebsite .pagination-custom .page-item .page-link, +.bodywebsite .pagination-custom .page-item .page-link:active, +.bodywebsite .pagination-custom .page-item .page-link:focus { + color: #000; + background: transparent; + border-color: #cdcdcd; +} +.bodywebsite .pagination-custom .page-item .page-link:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .pagination-custom .page-item.disabled, +.bodywebsite .pagination-custom .page-item.active { + pointer-events: none; +} +.bodywebsite .pagination-custom .page-item.active .page-link { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .pagination-custom .page-item.disabled .page-link { + color: #f9f9f9; + background: #cdcdcd; + border-color: #cdcdcd; +} +.bodywebsite .label-custom { + padding: .35em .3em .25em; + font-weight: 400; + font-size: 70%; + text-transform: uppercase; +} +.bodywebsite .mac .label-custom { + padding-top: .4em; +} +.bodywebsite .label-custom.label-danger { + color: #fff; + background: #fe4a21; + box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.25); +} +.bodywebsite .label-custom.label-info { + color: #fff; + background: #3e9cf6; + box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.25); +} +.bodywebsite blockquote { + font: inherit; + padding: 0; + margin: 0; + border: 0; +} +.bodywebsite blockquote q:before, +.bodywebsite blockquote q:after { + content: none; +} +.bodywebsite blockquote cite { + font-style: normal; +} +.bodywebsite .quote-default { + position: relative; + padding: 43px 0 43px 6px; + color: #00030a; +} +.bodywebsite .quote-default svg { + fill: #ddd; +} +.bodywebsite .quote-default .quote-open, +.bodywebsite .quote-default .quote-close { + position: absolute; + left: 30px; +} +.bodywebsite .quote-default .quote-open { + top: 0; +} +.bodywebsite .quote-default .quote-close { + bottom: 0; +} +.bodywebsite .quote-bordered { + padding-top: 14px; +} +.bodywebsite .quote-bordered .quote-body { + position: relative; + padding-bottom: 10px; +} +.bodywebsite .quote-bordered h6 { + font-size: 18px; +} +.bodywebsite .quote-bordered .quote-body-inner { + position: relative; + padding: 37px 22px 29px 34px; + border-style: solid; + border-width: 1px 1px 0 1px; + border-color: #e5e7e9; +} +.bodywebsite .quote-bordered .quote-body-inner:before, +.bodywebsite .quote-bordered .quote-body-inner:after { + content: ''; + position: absolute; + bottom: -10px; + height: 10px; + border-style: solid; + border-color: #e5e7e9; + background-color: transparent; +} +.bodywebsite .quote-bordered .quote-body-inner:before { + left: 10px; + width: 46px; + border-width: 1px 1px 0 0; + transform: skew(45deg); + transform-origin: 100% 100%; +} +.bodywebsite .quote-bordered .quote-body-inner:after { + right: 10px; + width: calc(34%); + border-width: 1px 0 0 1px; + transform: skew(-45deg); + transform-origin: 0 100%; +} +.bodywebsite .quote-bordered .quote-open { + position: absolute; + top: -10px; + left: 34px; + z-index: 2; +} +.bodywebsite .quote-bordered .quote-open > svg { + fill: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .quote-bordered .quote-footer { + padding-left: 25px; +} +.bodywebsite .quote-bordered cite { + font-size: 17px; + font-weight: 900; + line-height: 21px; + color: #fff; +} +.bodywebsite .quote-bordered * + .quote-footer { + margin-top: 9px; +} +.bodywebsite .quote-bordered cite + p { + margin-top: 0; +} +.bodywebsite .quote-bordered-inverse cite, +.bodywebsite .quote-bordered-inverse q { + color: #000; +} +.bodywebsite .quote-minimal-bordered { + position: relative; + padding: 16px 0 26px; + text-align: center; +} +.bodywebsite .quote-minimal-bordered q { + font: 400 20px "Roboto", Helvetica, Arial, sans-serif; + font-style: italic; + color: #464a4d; +} +.bodywebsite .quote-minimal-bordered q:before, +.bodywebsite .quote-minimal-bordered q:after { + content: '"'; +} +.bodywebsite .quote-minimal-bordered:before, +.bodywebsite .quote-minimal-bordered:after { + content: ''; + position: absolute; + left: 50%; + width: 270px; + height: 1px; + transform: translateX(-50%); + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, #dedede 50%, rgba(0, 0, 0, 0) 100%); + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, #dedede 50%, rgba(0, 0, 0, 0) 100%); + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #dedede 50%, rgba(0, 0, 0, 0) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffffff', endColorstr='#00000000', GradientType=1); +} +.bodywebsite .quote-minimal-bordered:before { + top: 0; +} +.bodywebsite .quote-minimal-bordered:after { + bottom: 0; +} +@media (min-width: 768px) { + .bodywebsite .quote-minimal-bordered q { + font-size: 24px; + line-height: 1.55; + } +} +@media (min-width: 1200px) { + .bodywebsite .quote-minimal-bordered q { + font-size: 30px; + } +} +.bodywebsite .quote-minimal q { + font-size: 18px; + font-weight: 300; + font-style: italic; + line-height: 1.2; + color: #000; +} +.bodywebsite .quote-minimal cite { + font: 700 15px "Roboto", Helvetica, Arial, sans-serif; + line-height: 1.1; + color: #000; +} +.bodywebsite .quote-minimal .caption { + color: #9f9f9f; +} +.bodywebsite .quote-minimal.quote-minimal-inverse q { + color: #fff; +} +.bodywebsite .quote-minimal.quote-minimal-inverse cite { + color: #fff; +} +.bodywebsite .quote-minimal.quote-minimal-inverse .caption { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .quote-minimal * + .caption { + margin-top: 0; +} +.bodywebsite .quote-minimal * + .quote-meta { + margin-top: 20px; +} +.bodywebsite .quote-strict q, +.bodywebsite .quote-strict cite { + color: #000; +} +.bodywebsite .quote-strict q { + font-size: 19px; + font-weight: 300; + font-style: italic; + line-height: 28px; +} +.bodywebsite .quote-strict cite { + display: block; + font: 700 16px/21px "Roboto", Helvetica, Arial, sans-serif; + text-transform: uppercase; +} +.bodywebsite .quote-strict * + cite { + margin-top: 20px; +} +.bodywebsite .quote-strict.quote-strict-inverse q, +.bodywebsite .quote-strict.quote-strict-inverse cite { + color: #fff; +} +.bodywebsite .quote-vertical { + max-width: 360px; + margin-left: auto; + margin-right: auto; + text-align: center; +} +.bodywebsite .quote-vertical q { + font-size: 16px; + line-height: 1.57895; + font-weight: 100; + color: rgba(0, 0, 0, 0.5); +} +.bodywebsite .quote-vertical cite { + display: block; + color: #000; + font: 700 14px/18px "Roboto", Helvetica, Arial, sans-serif; +} +.bodywebsite .quote-vertical .quote-open > svg { + fill: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .quote-vertical .quote-image, +.bodywebsite .quote-vertical .quote-image > img { + border-radius: 600px; +} +.bodywebsite .quote-vertical .quote-image > img { + width: auto; +} +.bodywebsite .quote-vertical * + cite { + margin-top: 16px; +} +.bodywebsite .quote-vertical * + .caption { + margin-top: 0; +} +.bodywebsite .quote-vertical * + .quote-text { + margin-top: 25px; +} +.bodywebsite .quote-vertical * + .quote-meta { + margin-top: 25px; +} +.bodywebsite .quote-vertical.quote-vertical-inverse q, +.bodywebsite .quote-vertical.quote-vertical-inverse cite { + color: #fff; +} +.bodywebsite .quote-vertical.quote-vertical-inverse .cite { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .quote-vertical.quote-vertical-inverse .quote-open > svg { + fill: #fff; +} +.bodywebsite .quote-review cite { + font: 700 14px/18px "Roboto", Helvetica, Arial, sans-serif; + text-transform: uppercase; + letter-spacing: -0.025em; + color: #000; +} +.bodywebsite .quote-review .quote-header { + position: relative; + transform: translateY(-2px); + margin-bottom: -2px; +} +.bodywebsite .quote-review .quote-header > * { + margin-top: 2px; +} +.bodywebsite .quote-review .quote-header > *:not(:last-child) { + margin-right: 10px; +} +.bodywebsite .quote-review .quote-header > * { + display: inline-block; + vertical-align: middle; +} +.bodywebsite .quote-review * + .quote-body { + margin-top: 10px; +} +.bodywebsite * + .quote-review { + margin-top: 35px; +} +@media (min-width: 768px) { + .bodywebsite .quote-minimal q { + font-size: 22px; + } + .bodywebsite .quote-minimal cite { + font-size: 19px; + } + .bodywebsite .quote-minimal * + .quote-meta { + margin-top: 37px; + } + .bodywebsite * + .quote-review { + margin-top: 45px; + } +} +@media (min-width: 992px) { + .bodywebsite .quote-minimal q { + font-size: 24px; + } + .bodywebsite .quote-vertical q { + font-size: 19px; + } +} +.bodywebsite .quote-left .divider-fullwidth { + margin-top: 20px; + background: #bcd; +} +.bodywebsite .quote-left .quote-name { + font-size: 18px; + font-weight: 500; + color: #fff; +} +@media (min-width: 992px) { + .bodywebsite .quote-left .quote-name { + font-size: 24px; + } +} +.bodywebsite .quote-left .quote-desc-text { + font-size: 26px; + line-height: 1; + font-style: italic; + font-weight: 700; +} +@media (min-width: 992px) { + .bodywebsite .quote-left .quote-desc-text { + font-size: 36px; + } +} +.bodywebsite .quote-left .quote-body { + margin-top: 27px; + padding-left: 75px; + position: relative; + text-align: left; +} +.bodywebsite .quote-left .quote-body:before { + content: ''; + position: absolute; + top: 6px; + left: 0; + width: 50px; + height: 36px; + background: url("medias/image/ref; ?>/icon-quote.png") no-repeat top left; + opacity: .5; +} +.bodywebsite .quote-left .quote-body q { + color: #fff; +} +.bodywebsite .quote-left .h4 + *, +.bodywebsite .quote-left h5 + * { + margin-top: 0; +} +.bodywebsite .page .box-text > * { + display: inline; + margin: 0 .25em 0 0; +} +.bodywebsite .icon-box-horizontal .unit-left { + min-width: 48px; +} +.bodywebsite .icon-box-horizontal [class*='icon-md'] { + margin-top: -2px; +} +.bodywebsite .icon-box-horizontal [class*='icon-lg'] { + margin-top: -5px; +} +.bodywebsite .icon-box-horizontal * + p { + margin-top: 9px; +} +.bodywebsite .icon-box-vertical * + p { + margin-top: 9px; +} +.bodywebsite .icon-box-vertical-sm { + max-width: 370px; +} +@media (max-width: 767px) { + .bodywebsite .icon-box-vertical-sm { + margin-left: auto; + margin-right: auto; + } +} +.bodywebsite .icon-box { + position: relative; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + width: 100%; + padding: 35px 30px; + text-align: center; + cursor: default; +} +@media (min-width: 768px) { + .bodywebsite .icon-box:before, + .bodywebsite .icon-box:after { + content: ''; + position: absolute; + width: 100%; + height: 100%; + border: 1px solid #e5e7e9; + pointer-events: none; + transition: .33s all ease; + } + .bodywebsite .icon-box.icon-box-top-line:before { + border-width: 1px 0 0 0; + } + .bodywebsite .icon-box:before { + top: 0; + left: 0; + border-width: 0 0 0 0; + } + .bodywebsite .icon-box:after { + bottom: 0; + right: 0; + border-width: 0 1px 1px 0; + } +} +.bodywebsite .icon-box .icon:after { + opacity: 0; +} +.bodywebsite .icon-box .btn:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .icon-box .box-top, +.bodywebsite .icon-box .box-body { + position: relative; + will-change: transform; + transition: .33s all ease; + -webkit-filter: blur(0); +} +.bodywebsite .icon-box .box-top { + top: 0; +} +.bodywebsite .icon-box .box-body { + max-width: 100%; +} +.bodywebsite .icon-box .box-header { + bottom: 0; +} +.bodywebsite .icon-box .box-icon { + min-height: 46px; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.bodywebsite .icon-box * + .box-header { + margin-top: 10px; +} +.bodywebsite .icon-box * + .box-body { + margin-top: 22px; +} +.bodywebsite .icon-box .box-body + .btn { + margin-top: 18px; +} +.bodywebsite .icon-box.hover .box-top, +.bodywebsite .icon-box:hover .box-top { + -webkit-transform: translateY(-7px); + transform: translateY(-7px); +} +.bodywebsite .icon-box.hover .btn, +.bodywebsite .icon-box.hover .box-body, +.bodywebsite .icon-box:hover .btn, +.bodywebsite .icon-box:hover .box-body { + -webkit-transform: translateY(7px); + transform: translateY(7px); +} +@media (min-width: 992px) { + .bodywebsite .desktop .icon-box .icon-box-overlay { + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + opacity: 0; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + transition: 0.2s ease-in-out; + } + .bodywebsite .desktop .icon-box:hover .icon-box-overlay { + opacity: 1; + z-index: 5; + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + .bodywebsite .desktop .icon-box:hover .btn { + z-index: 6; + } + .bodywebsite .desktop .icon-box:hover .box-body, + .bodywebsite .desktop .icon-box:hover .box-top { + z-index: 6; + } +} +@media (min-width: 768px) { + .bodywebsite .icon-box { + padding: 67px 37px 61px; + margin-left: auto; + margin-right: auto; + } +} +@media (min-width: 1400px) { + .bodywebsite .icon-box { + padding: 67px 110px 61px; + } +} +@media (min-width: 1800px) { + .bodywebsite .icon-box { + padding: 90px 165px 82px; + } +} +.bodywebsite .list-blocks { + counter-reset: li; +} +.bodywebsite .list-blocks > li { + display: block; +} +.bodywebsite .list-blocks .block-list-counter:before { + position: relative; + content: counter(li, decimal-leading-zero); + counter-increment: li; + font: 700 30px/30px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: -0.025em; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-blocks > li + li { + margin-top: 50px; +} +.bodywebsite .block-image-plate { + display: block; + width: 100%; +} +.bodywebsite .block-image-plate .block-header { + max-width: 400px; +} +.bodywebsite .block-image-plate .block-inner { + position: relative; + padding: 45px 30px; +} +.bodywebsite .block-image-plate .block-inner:after { + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 0; + background: rgba(0, 0, 0, 0.7); +} +.bodywebsite .block-image-plate .block-inner > * { + position: relative; + z-index: 2; +} +.bodywebsite .block-image-plate * + .block-text { + margin-top: 18px; +} +.bodywebsite .block-image-plate * + .block-body { + margin-top: 22px; +} +@media (max-width: 767px) { + .bodywebsite .block-image-plate { + margin-left: -16px; + margin-right: -15px; + width: calc(132%); + } +} +@media (min-width: 768px) { + .bodywebsite .block-image-plate .block-header { + max-width: 340px; + } + .bodywebsite .block-image-plate .block-header h3 { + line-height: 1.2; + } + .bodywebsite .block-image-plate .block-inner { + padding: 60px 12.5% 60px 8.33333%; + } + .bodywebsite .block-image-plate .block-body { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: flex-start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + } + .bodywebsite .block-image-plate .block-left { + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-flex-basis: 11.11111%; + -ms-flex-preferred-size: 11.11111%; + flex-basis: 11.11111%; + max-width: 11.11111%; + max-width: 100px; + } + .bodywebsite .block-image-plate .block-body { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + } + .bodywebsite .block-image-plate * + .block-text { + margin-top: 0; + } +} +@media (min-width: 992px) { + .bodywebsite .block-image-plate .block-header { + max-width: 410px; + } + .bodywebsite .block-image-plate .block-inner { + padding-right: 16%; + padding-top: 90px; + padding-bottom: 95px; + } +} +.bodywebsite .block-vacation { + position: relative; + width: 100%; + padding: 39px 9% 45px; + border-radius: 4px; + background: #fff; + box-shadow: -1px 0px 10px 0px rgba(65, 65, 65, 0.12); +} +.bodywebsite .block-vacation, +.bodywebsite .block-vacation:active, +.bodywebsite .block-vacation:focus, +.bodywebsite .block-vacation:hover { + color: #9f9f9f; +} +.bodywebsite .block-vacation:hover { + box-shadow: -3px 5px 12px 0px rgba(65, 65, 65, 0.16); +} +.bodywebsite .block-vacation * + .block-meta { + margin-top: 14px; +} +@media (min-width: 1200px) { + .bodywebsite .block-vacation * + .block-meta { + margin-top: 5px; + } +} +.bodywebsite .block-shadow { + position: relative; + width: 100%; + padding-top: 30px; + overflow: hidden; + border-radius: 0; + background: #fff; + box-shadow: 0px 1px 10px 0px rgba(65, 65, 65, 0.12); + text-align: center; +} +.bodywebsite .block-shadow .block-inner { + padding: 0 40px; +} +.bodywebsite .block-shadow * + .block-footer { + margin-top: 32px; +} +.bodywebsite .block-shadow * + .icon-block { + margin-top: 40px; +} +@media (min-width: 768px) { + .bodywebsite .block-shadow { + padding-top: 38px; + } + .bodywebsite .block-shadow .block-inner { + padding: 0 70px; + } + .bodywebsite .block-shadow * + .icon-block { + margin-top: 60px; + } +} +.bodywebsite .box-counter { + text-align: center; +} +.bodywebsite .box-counter .box-header { + text-transform: uppercase; +} +.bodywebsite .box-counter * + .box-header { + margin-top: 10px; +} +@media (min-width: 768px) and (max-width: 1199px) { + .bodywebsite .box-counter .box-header { + font-size: 15px; + } +} +.bodywebsite .box-counter-inverse .box-header { + color: rgba(255, 255, 255, 0.2); +} +.bodywebsite .box-counter-inverse .counter { + color: #dedede; +} +.bodywebsite .box-counter-inverse-lighter .box-header { + color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .box-counter-inverse-lighter .counter { + color: #dedede; +} +.bodywebsite .box-container-small { + display: inline-block; + width: 100%; + max-width: 280px; +} +.bodywebsite .post-single .post-footer { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + position: relative; + transform: translateY(-10px); + margin-bottom: -10px; +} +.bodywebsite .post-single .post-footer > * { + margin-top: 10px; +} +.bodywebsite .post-single .post-footer > *:not(:last-child) { + margin-right: 20px; +} +.bodywebsite .post-single * + .post-header { + margin-top: 15px; +} +.bodywebsite .post-single * + .post-meta { + margin-top: 20px; +} +.bodywebsite .post-single * + .post-body { + margin-top: 20px; +} +.bodywebsite .post-single * + .post-footer { + margin-top: 42px; +} +.bodywebsite .post-single + * { + margin-top: 40px; +} +@media (min-width: 768px) { + .bodywebsite .post-single * + .post-header { + margin-top: 22px; + } + .bodywebsite .post-single * + .post-meta { + margin-top: 10px; + } +} +.bodywebsite .post-info * + .post-main { + margin-top: 30px; +} +.bodywebsite .post-info * + .post-body { + margin-top: 20px; +} +@media (min-width: 768px) { + .bodywebsite .post-info .post-main { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .bodywebsite .post-info .post-left { + -webkit-flex-basis: 33.33333%; + -ms-flex-preferred-size: 33.33333%; + flex-basis: 33.33333%; + max-width: 33.33333%; + padding-right: 25px; + } + .bodywebsite .post-info .post-body { + -webkit-flex-basis: 66.66667%; + -ms-flex-preferred-size: 66.66667%; + flex-basis: 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .post-info * + .post-body { + margin-top: 0; + } +} +.bodywebsite .post-minimal { + position: relative; + border-radius: 4px; + overflow: hidden; + background: #fff; + box-shadow: -1px 0px 10px 0px rgba(65, 65, 65, 0.12); +} +.bodywebsite .post-minimal .post-body { + padding: 20px; +} +.bodywebsite .post-minimal * + p { + margin-top: 8px; +} +.bodywebsite .post-minimal * + .post-meta { + margin-top: 5px; +} +@media (max-width: 575px) { + .bodywebsite .post-minimal { + display: inline-block; + width: 100%; + max-width: 300px; + } +} +@media (min-width: 576px) { + .bodywebsite .post-minimal { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + } + .bodywebsite .post-minimal .post-left { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-align-self: stretch; + -ms-flex-item-align: stretch; + align-self: stretch; + width: 220px; + } + .bodywebsite .post-minimal .post-image { + position: relative; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-align-self: stretch; + -ms-flex-item-align: stretch; + align-self: stretch; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + overflow: hidden; + } + .bodywebsite .post-minimal .post-image img { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + height: auto; + width: auto; + min-height: 100%; + min-width: 100%; + z-index: 1; + } + .bodywebsite .post-minimal .post-body { + padding: 30px 24px 30px 27px; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + } +} +@media (min-width: 1200px) { + .bodywebsite .post-minimal .post-body { + padding: 40px 26px 40px 50px; + } +} +.bodywebsite .post-preview { + max-width: 320px; +} +.bodywebsite .post-preview a { + display: block; +} +.bodywebsite .post-preview .post-image, +.bodywebsite .post-preview .post-image img { + border-radius: 5px; +} +.bodywebsite .post-preview .post-image img { + width: auto; +} +.bodywebsite .post-preview .post-header { + line-height: 1.5; + color: #000; + transition: .33s all ease; +} +.bodywebsite .post-preview .list-meta > li { + display: inline-block; + font-size: 12px; + font-style: italic; + color: #9b9b9b; +} +.bodywebsite .post-preview .list-meta > li:not(:last-child):after { + content: '/'; +} +.bodywebsite .post-preview:hover .post-header { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .post-preview * + .post-meta { + margin-top: 5px; +} +.bodywebsite .post-preview.post-preview-inverse > li { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .post-preview.post-preview-inverse .post-header { + color: #fff; +} +.bodywebsite .post-preview.post-preview-inverse:hover .post-header { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .blog-timeline > dt { + font: 700 25px "Roboto", Helvetica, Arial, sans-serif; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .blog-timeline > dd { + margin-top: 20px; +} +@media (min-width: 768px) { + .bodywebsite .blog-timeline { + word-spacing: 0; + white-space: nowrap; + } + .bodywebsite .blog-timeline > * { + display: inline-block; + } + .bodywebsite .blog-timeline > dt { + min-width: 65px; + padding-right: 20px; + margin-top: -0.15em; + vertical-align: top; + } + .bodywebsite .blog-timeline > dd { + margin-top: 0; + width: calc(0%); + } +} +@media (min-width: 992px) { + .bodywebsite .blog-timeline > dt { + min-width: 100px; + padding-right: 30px; + } +} +.bodywebsite .post-boxed { + max-width: 330px; + margin-right: auto; + margin-left: auto; + padding-top: 10px; + text-align: center; + box-shadow: -1px 0px 10px 0px rgba(65, 65, 65, 0.12); + transition: .3s all ease; +} +.bodywebsite .post-boxed-img-wrap a { + display: block; +} +.bodywebsite .post-boxed-title { + font: 500 18px/28px "Roboto", Helvetica, Arial, sans-serif; +} +.bodywebsite .post-boxed-title { + color: #000; +} +.bodywebsite .post-boxed-title a { + display: inline; + color: #000; +} +.bodywebsite .post-boxed-title a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .post-boxed img { + max-width: 75%; +} +.bodywebsite .post-boxed .list-inline { + font-size: 12px; + letter-spacing: .05em; +} +.bodywebsite .post-boxed-caption { + padding: 20px; +} +.bodywebsite #sectionteam .post-boxed-caption { + height: 140px; +} +.bodywebsite .post-boxed .post-boxed-title + * { + margin-top: 5px; +} +@media (min-width: 768px) { + .bodywebsite .post-boxed .post-boxed-caption { + padding: 28px 42px 36px 28px; + } +} +@media (min-width: 1200px) { + .bodywebsite .post-boxed:hover { + box-shadow: -3px 5px 12px 0px rgba(65, 65, 65, 0.16); + } +} +.bodywebsite .post-minimal .post-image { + height: 100%; +} +.bodywebsite .post-minimal .post-image img { + width: 100%; + height: 100%; + object-fit: cover; +} +.bodywebsite * + .post-blockquote { + margin-top: 30px; +} +.bodywebsite .post-blockquote + * { + margin-top: 30px; +} +@media (min-width: 768px) { + .bodywebsite * + .post-blockquote { + margin-top: 50px; + } + .bodywebsite .post-blockquote + * { + margin-top: 50px; + } +} +.bodywebsite * + .post-comment-block, +.bodywebsite * + .post-comment-form { + margin-top: 40px; +} +.bodywebsite .post-comment-form h4 + * { + margin-top: 15px; +} +.bodywebsite .comment figure, +.bodywebsite .comment figure img { + border-radius: 50%; + max-width: 71px; +} +.bodywebsite .comment time { + font-size: 12px; + line-height: 1; + color: #9b9b9b; +} +.bodywebsite .comment .user { + font-size: 16px; + line-height: 1.33333; + font-weight: 700; + text-transform: uppercase; + color: #000; +} +.bodywebsite .comment .list-icon-meta { + position: relative; + transform: translateY(0); + margin-bottom: 0; +} +.bodywebsite .comment .list-icon-meta > * { + margin-top: 0; +} +.bodywebsite .comment .list-icon-meta > *:not(:last-child) { + margin-right: 8px; +} +.bodywebsite .comment .list-icon-meta > li { + display: inline-block; +} +.bodywebsite .comment .list-icon-meta li { + font-size: 12px; + line-height: 1; + font-weight: 400; +} +.bodywebsite .comment .comment-body { + padding: 17px 22px; + border: 1px solid #dedede; + border-radius: 7px; +} +.bodywebsite .comment .comment-body-header { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: flex-start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + position: relative; + transform: translateY(-5px); + margin-bottom: -5px; +} +.bodywebsite .comment .comment-body-header > * { + margin-top: 5px; +} +.bodywebsite .comment .comment-body-header > *:not(:last-child) { + margin-right: 5px; +} +@media (min-width: 768px) { + .bodywebsite .comment .comment-body-header { + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + } +} +.bodywebsite .comment .comment-body-header > * { + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.bodywebsite .comment .comment-meta { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + position: relative; + transform: translateY(-5px); + margin-bottom: -5px; +} +.bodywebsite .comment .comment-meta > * { + margin-top: 5px; +} +.bodywebsite .comment .comment-meta > *:not(:last-child) { + margin-right: 10px; +} +@media (min-width: 768px) { + .bodywebsite .comment .comment-meta > * { + display: inline-block; + vertical-align: baseline; + } +} +.bodywebsite .comment .comment-body-text { + margin-top: 10px; +} +.bodywebsite .comment-minimal .author { + font: 700 14px/18px "Roboto", Helvetica, Arial, sans-serif; + text-transform: uppercase; + letter-spacing: -0.025em; + color: #000; +} +.bodywebsite .comment-minimal * + .comment-body { + margin-top: 10px; +} +.bodywebsite * + .comment-minimal { + margin-top: 35px; +} +.bodywebsite .comment-group-reply { + padding-left: 12%; +} +.bodywebsite .comment + * { + margin-top: 21px; +} +.bodywebsite * + .comment-group { + margin-top: 30px; +} +@media (min-width: 768px) { + .bodywebsite .comment > .unit > .unit-left { + margin-top: 16px; + } + .bodywebsite * + .comment-minimal { + margin-top: 45px; + } +} +@media (min-width: 992px) { + .bodywebsite * + .post-comment { + margin-top: 80px; + } +} +.bodywebsite .page-title { + text-align: center; +} +.bodywebsite .page-title > * { + letter-spacing: 0; + text-transform: uppercase; +} +.bodywebsite .page-title .page-title-inner { + position: relative; + display: inline-block; +} +.bodywebsite .page-title .page-title-left, +.bodywebsite .page-title .page-title-right { + position: absolute; + top: 50%; + width: auto; + overflow: hidden; + white-space: nowrap; + vertical-align: middle; +} +.bodywebsite .page-title .page-title-left *, +.bodywebsite .page-title .page-title-right * { + display: inline; + white-space: nowrap; +} +.bodywebsite .page-title .page-title-left { + left: 0; + text-align: right; + transform: translate(-100%, -50%); +} +.bodywebsite .page-title .page-title-left * { + padding-right: .85em; +} +.bodywebsite .page-title .page-title-left *:nth-last-child(odd) { + color: rgba(255, 255, 255, 0.1); +} +.bodywebsite .page-title .page-title-left *:nth-last-child(even) { + color: rgba(255, 255, 255, 0.2); +} +.bodywebsite .page-title .page-title-right { + right: 0; + text-align: left; + transform: translate(100%, -50%); +} +.bodywebsite .page-title .page-title-right * { + padding-left: .85em; +} +.bodywebsite .page-title .page-title-right *:nth-child(odd) { + color: rgba(255, 255, 255, 0.1); +} +.bodywebsite .page-title .page-title-right *:nth-child(even) { + color: rgba(255, 255, 255, 0.2); +} +.bodywebsite .page-title-wrap { + background: #000; + background-attachment: fixed; + -webkit-background-size: cover; + background-size: cover; + background-position: center 80%; +} +@media (min-width: 768px) { + .bodywebsite .page-title { + text-align: left; + } +} +.bodywebsite .preloader { + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + z-index: 10000; + display: flex; + justify-content: center; + align-items: center; + padding: 20px; + background: #fff; + transition: .3s all ease; +} +.bodywebsite .preloader.loaded { + opacity: 0; + visibility: hidden; +} +.bodywebsite .preloader-body { + text-align: center; +} +.bodywebsite .preloader-body p { + position: relative; + right: -8px; +} +.bodywebsite .cssload-container { + width: 100%; + height: 36px; + text-align: center; +} +.bodywebsite .cssload-speeding-wheel { + width: 36px; + height: 36px; + margin: 0 auto; + border: 3px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-radius: 50%; + border-left-color: transparent; + border-bottom-color: transparent; + animation: cssload-spin 0.88s infinite linear; +} +@-webkit-keyframes cssload-spin { + 100% { + transform: rotate(360deg); + } +} +@keyframes cssload-spin { + 100% { + transform: rotate(360deg); + } +} +.bodywebsite .pricing-table { + overflow: hidden; + background: #fff; + text-align: center; + box-shadow: -1px 2px 5px 0 rgba(65, 65, 65, 0.12); +} +.bodywebsite .pricing-table-header { + font-size: 18px; + text-transform: uppercase; + letter-spacing: .05em; + color: #464a4d; +} +.bodywebsite .pricing-table-body { + padding: 35px 30px; +} +.bodywebsite .pricing-table-label { + padding: 17px 15px; + text-align: center; + background: #3a3c3e; +} +.bodywebsite .pricing-table-label p { + font: 700 14px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: .05em; + text-transform: uppercase; + color: #fff; +} +.bodywebsite .pricing-table .pricing-list { + font-size: 16px; + font-weight: 300; + color: #00030a; +} +.bodywebsite .pricing-table .pricing-list span { + display: inline-block; + margin-right: .25em; +} +.bodywebsite .pricing-table .pricing-list > li + li { + margin-top: 12px; +} +.bodywebsite .pricing-table * + .price-object { + margin-top: 22px; +} +.bodywebsite .pricing-table * + .pricing-list { + margin-top: 22px; +} +.bodywebsite .pricing-object { + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 900; + font-size: 0; + line-height: 0; + color: #000; +} +.bodywebsite .pricing-object > * { + margin-top: 0; +} +.bodywebsite .pricing-object .price { + font-family: Helvetica, Arial, sans-serif; + font-weight: 900; +} +.bodywebsite .pricing-object .small { + position: relative; + font: 700 10px "Roboto", Helvetica, Arial, sans-serif; + color: inherit; + text-transform: uppercase; +} +.bodywebsite .pricing-object .small-middle { + vertical-align: middle; +} +.bodywebsite .pricing-object .small-bottom { + vertical-align: bottom; +} +.bodywebsite .pricing-object-sm { + font-size: 32px; + line-height: .8; +} +.bodywebsite .pricing-object-sm .small { + font-size: 12px; +} +.bodywebsite .pricing-object-sm .small-middle { + margin-right: 3px; +} +.bodywebsite .pricing-object-sm .small-bottom { + margin-left: 1px; + vertical-align: bottom; +} +.bodywebsite .price-irrelevant { + color: #9f9f9f; + text-decoration: line-through; +} +.bodywebsite .pricing-object-md { + font-size: 53px; + line-height: 1; +} +.bodywebsite .pricing-object-md .price { + line-height: .5; +} +.bodywebsite .pricing-object-md .small { + font-size: 17px; + font-weight: 400; +} +.bodywebsite .pricing-object-md .small-middle { + font-size: 23px; +} +.bodywebsite .pricing-object-md .small-bottom { + bottom: -0.25em; +} +.bodywebsite .pricing-object-lg, +.bodywebsite .pricing-object-xl { + font-size: 64px; + line-height: .7; +} +.bodywebsite .pricing-object-lg .small, +.bodywebsite .pricing-object-xl .small { + font-size: 9px; +} +.bodywebsite .pricing-object-lg .small-top, +.bodywebsite .pricing-object-xl .small-top { + top: 11px; + margin-right: 5px; + font-size: 14px; + vertical-align: top; + font-weight: 700; +} +.bodywebsite .pricing-object-lg .small-bottom, +.bodywebsite .pricing-object-xl .small-bottom { + bottom: -10px; + margin-left: -2px; + font-weight: 700; + vertical-align: bottom; +} +.bodywebsite .price-current .small { + position: relative; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 400; +} +.bodywebsite .price-current .small-middle { + vertical-align: middle; + top: -0.3em; +} +.bodywebsite .price-current .small-bottom { + top: .3em; +} +@media (min-width: 768px) { + .bodywebsite .pricing-object-lg { + font-size: 72px; + } + .bodywebsite .pricing-object-xl { + font-size: 54px; + } + .bodywebsite .pricing-object-xl .small-middle { + font-size: 30px; + } + .bodywebsite .pricing-object-xl .small-bottom { + font-size: 25px; + } +} +@media (min-width: 992px) { + .bodywebsite .pricing-object-xl { + font-size: 76px; + } +} +.bodywebsite .panel.bg-accent.bg-default-outline-btn.text-center { + background: transparent; +} +.bodywebsite .product .product-label { + padding: 7px 11px; + min-width: 90px; + font: 700 12px/16px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: .05em; + text-align: center; + border-radius: 0 0 7px 7px; +} +.bodywebsite .product .product-rating { + position: relative; + transform: translateY(-2px); + margin-bottom: -2px; +} +.bodywebsite .product .product-rating > * { + margin-top: 2px; +} +.bodywebsite .product .product-rating > *:not(:last-child) { + margin-right: 5px; +} +.bodywebsite .product .product-rating > * { + display: inline-block; + vertical-align: middle; +} +.bodywebsite .product .product-color { + display: inline-block; + width: 24px; + height: 24px; + font-size: 0; + line-height: 0; + border-radius: 50%; + background: #000; + vertical-align: middle; +} +.bodywebsite .product .product-size { + font: 700 14px/18px "Roboto", Helvetica, Arial, sans-serif; + color: #000; +} +.bodywebsite .product * + .product-brand, +.bodywebsite .product .product-brand + * { + margin-top: 0; +} +.bodywebsite .one-screen-page .page { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.bodywebsite .one-screen-page .page-inner { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + min-height: 100vh; + text-align: center; +} +.bodywebsite .one-screen-page .page-inner, +.bodywebsite .one-screen-page .page-inner > * { + width: 100%; +} +.bodywebsite .one-screen-page .page-head, +.bodywebsite .one-screen-page .page-foot { + padding: 0; + background: transparent; +} +.bodywebsite .one-screen-page .page-head-inner { + padding: calc(5em) 0 calc(3em); +} +.bodywebsite .one-screen-page .page-content { + padding: calc(5em) 0; +} +.bodywebsite .one-screen-page .page-foot-inner { + padding: calc(3em) 0 calc(5em); +} +.bodywebsite .one-screen-page .rights { + color: #fff; +} +.bodywebsite .one-screen-page .rights a, +.bodywebsite .one-screen-page .rights a:active, +.bodywebsite .one-screen-page .rights a:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .one-screen-page .rights a:hover { + color: #ababab; +} +@media (min-width: 576px) { + .bodywebsite .one-screen-page .page-inner { + text-align: left; + } +} +@media (min-width: 1800px) { + .bodywebsite .one-screen-page .page-head-inner { + padding: 50px 0 10px; + } + .bodywebsite .one-screen-page .page-content { + padding: 30px 0; + } + .bodywebsite .one-screen-page .page-foot-inner { + padding: 50px 0 23px; + } +} +.bodywebsite .ie-10 .one-screen-page, +.bodywebsite .ie-11 .one-screen-page { + overflow-x: hidden; + overflow-y: auto; +} +.bodywebsite .inset-left-0 { + padding-left: 0; +} +.bodywebsite .inset-left-10 { + padding-left: 10px; +} +.bodywebsite .inset-left-15 { + padding-left: 15px; +} +.bodywebsite .inset-left-20 { + padding-left: 20px; +} +.bodywebsite .inset-left-30 { + padding-left: 30px; +} +.bodywebsite .inset-left-40 { + padding-left: 40px; +} +.bodywebsite .inset-left-50 { + padding-left: 50px; +} +.bodywebsite .inset-left-60 { + padding-left: 60px; +} +.bodywebsite .inset-left-70 { + padding-left: 70px; +} +.bodywebsite .inset-left-85 { + padding-left: 85px; +} +.bodywebsite .inset-left-100 { + padding-left: 100px; +} +@media (min-width: 576px) { + .bodywebsite .inset-sm-left-0 { + padding-left: 0; + } + .bodywebsite .inset-sm-left-10 { + padding-left: 10px; + } + .bodywebsite .inset-sm-left-15 { + padding-left: 15px; + } + .bodywebsite .inset-sm-left-20 { + padding-left: 20px; + } + .bodywebsite .inset-sm-left-30 { + padding-left: 30px; + } + .bodywebsite .inset-sm-left-40 { + padding-left: 40px; + } + .bodywebsite .inset-sm-left-50 { + padding-left: 50px; + } + .bodywebsite .inset-sm-left-60 { + padding-left: 60px; + } + .bodywebsite .inset-sm-left-70 { + padding-left: 70px; + } + .bodywebsite .inset-sm-left-85 { + padding-left: 85px; + } + .bodywebsite .inset-sm-left-100 { + padding-left: 100px; + } +} +@media (min-width: 768px) { + .bodywebsite .inset-md-left-0 { + padding-left: 0; + } + .bodywebsite .inset-md-left-10 { + padding-left: 10px; + } + .bodywebsite .inset-md-left-15 { + padding-left: 15px; + } + .bodywebsite .inset-md-left-20 { + padding-left: 20px; + } + .bodywebsite .inset-md-left-30 { + padding-left: 30px; + } + .bodywebsite .inset-md-left-40 { + padding-left: 40px; + } + .bodywebsite .inset-md-left-50 { + padding-left: 50px; + } + .bodywebsite .inset-md-left-60 { + padding-left: 60px; + } + .bodywebsite .inset-md-left-70 { + padding-left: 70px; + } + .bodywebsite .inset-md-left-85 { + padding-left: 85px; + } + .bodywebsite .inset-md-left-100 { + padding-left: 100px; + } +} +@media (min-width: 992px) { + .bodywebsite .inset-lg-left-0 { + padding-left: 0; + } + .bodywebsite .inset-lg-left-10 { + padding-left: 10px; + } + .bodywebsite .inset-lg-left-15 { + padding-left: 15px; + } + .bodywebsite .inset-lg-left-20 { + padding-left: 20px; + } + .bodywebsite .inset-lg-left-30 { + padding-left: 30px; + } + .bodywebsite .inset-lg-left-40 { + padding-left: 40px; + } + .bodywebsite .inset-lg-left-50 { + padding-left: 50px; + } + .bodywebsite .inset-lg-left-60 { + padding-left: 60px; + } + .bodywebsite .inset-lg-left-70 { + padding-left: 70px; + } + .bodywebsite .inset-lg-left-85 { + padding-left: 85px; + } + .bodywebsite .inset-lg-left-100 { + padding-left: 100px; + } +} +@media (min-width: 1200px) { + .bodywebsite .inset-xl-left-0 { + padding-left: 0; + } + .bodywebsite .inset-xl-left-10 { + padding-left: 10px; + } + .bodywebsite .inset-xl-left-15 { + padding-left: 15px; + } + .bodywebsite .inset-xl-left-20 { + padding-left: 20px; + } + .bodywebsite .inset-xl-left-30 { + padding-left: 30px; + } + .bodywebsite .inset-xl-left-40 { + padding-left: 40px; + } + .bodywebsite .inset-xl-left-50 { + padding-left: 50px; + } + .bodywebsite .inset-xl-left-60 { + padding-left: 60px; + } + .bodywebsite .inset-xl-left-70 { + padding-left: 70px; + } + .bodywebsite .inset-xl-left-85 { + padding-left: 85px; + } + .bodywebsite .inset-xl-left-100 { + padding-left: 100px; + } +} +@media (min-width: 1800px) { + .bodywebsite .inset-xxl-left-0 { + padding-left: 0; + } + .bodywebsite .inset-xxl-left-10 { + padding-left: 10px; + } + .bodywebsite .inset-xxl-left-15 { + padding-left: 15px; + } + .bodywebsite .inset-xxl-left-20 { + padding-left: 20px; + } + .bodywebsite .inset-xxl-left-30 { + padding-left: 30px; + } + .bodywebsite .inset-xxl-left-40 { + padding-left: 40px; + } + .bodywebsite .inset-xxl-left-50 { + padding-left: 50px; + } + .bodywebsite .inset-xxl-left-60 { + padding-left: 60px; + } + .bodywebsite .inset-xxl-left-70 { + padding-left: 70px; + } + .bodywebsite .inset-xxl-left-85 { + padding-left: 85px; + } + .bodywebsite .inset-xxl-left-100 { + padding-left: 100px; + } +} +.bodywebsite .inset-right-0 { + padding-right: 0; +} +.bodywebsite .inset-right-10 { + padding-right: 10px; +} +.bodywebsite .inset-right-15 { + padding-right: 15px; +} +.bodywebsite .inset-right-20 { + padding-right: 20px; +} +.bodywebsite .inset-right-30 { + padding-right: 30px; +} +.bodywebsite .inset-right-40 { + padding-right: 40px; +} +.bodywebsite .inset-right-50 { + padding-right: 50px; +} +.bodywebsite .inset-right-60 { + padding-right: 60px; +} +.bodywebsite .inset-right-70 { + padding-right: 70px; +} +.bodywebsite .inset-right-85 { + padding-right: 85px; +} +.bodywebsite .inset-right-100 { + padding-right: 100px; +} +@media (min-width: 576px) { + .bodywebsite .inset-sm-right-0 { + padding-right: 0; + } + .bodywebsite .inset-sm-right-10 { + padding-right: 10px; + } + .bodywebsite .inset-sm-right-15 { + padding-right: 15px; + } + .bodywebsite .inset-sm-right-20 { + padding-right: 20px; + } + .bodywebsite .inset-sm-right-30 { + padding-right: 30px; + } + .bodywebsite .inset-sm-right-40 { + padding-right: 40px; + } + .bodywebsite .inset-sm-right-50 { + padding-right: 50px; + } + .bodywebsite .inset-sm-right-60 { + padding-right: 60px; + } + .bodywebsite .inset-sm-right-70 { + padding-right: 70px; + } + .bodywebsite .inset-sm-right-85 { + padding-right: 85px; + } + .bodywebsite .inset-sm-right-100 { + padding-right: 100px; + } +} +@media (min-width: 768px) { + .bodywebsite .inset-md-right-0 { + padding-right: 0; + } + .bodywebsite .inset-md-right-10 { + padding-right: 10px; + } + .bodywebsite .inset-md-right-15 { + padding-right: 15px; + } + .bodywebsite .inset-md-right-20 { + padding-right: 20px; + } + .bodywebsite .inset-md-right-30 { + padding-right: 30px; + } + .bodywebsite .inset-md-right-40 { + padding-right: 40px; + } + .bodywebsite .inset-md-right-50 { + padding-right: 50px; + } + .bodywebsite .inset-md-right-60 { + padding-right: 60px; + } + .bodywebsite .inset-md-right-70 { + padding-right: 70px; + } + .bodywebsite .inset-md-right-85 { + padding-right: 85px; + } + .bodywebsite .inset-md-right-100 { + padding-right: 100px; + } +} +@media (min-width: 992px) { + .bodywebsite .inset-lg-right-0 { + padding-right: 0; + } + .bodywebsite .inset-lg-right-10 { + padding-right: 10px; + } + .bodywebsite .inset-lg-right-15 { + padding-right: 15px; + } + .bodywebsite .inset-lg-right-20 { + padding-right: 20px; + } + .bodywebsite .inset-lg-right-30 { + padding-right: 30px; + } + .bodywebsite .inset-lg-right-40 { + padding-right: 40px; + } + .bodywebsite .inset-lg-right-50 { + padding-right: 50px; + } + .bodywebsite .inset-lg-right-60 { + padding-right: 60px; + } + .bodywebsite .inset-lg-right-70 { + padding-right: 70px; + } + .bodywebsite .inset-lg-right-85 { + padding-right: 85px; + } + .bodywebsite .inset-lg-right-100 { + padding-right: 100px; + } +} +@media (min-width: 1200px) { + .bodywebsite .inset-xl-right-0 { + padding-right: 0; + } + .bodywebsite .inset-xl-right-10 { + padding-right: 10px; + } + .bodywebsite .inset-xl-right-15 { + padding-right: 15px; + } + .bodywebsite .inset-xl-right-20 { + padding-right: 20px; + } + .bodywebsite .inset-xl-right-30 { + padding-right: 30px; + } + .bodywebsite .inset-xl-right-40 { + padding-right: 40px; + } + .bodywebsite .inset-xl-right-50 { + padding-right: 50px; + } + .bodywebsite .inset-xl-right-60 { + padding-right: 60px; + } + .bodywebsite .inset-xl-right-70 { + padding-right: 70px; + } + .bodywebsite .inset-xl-right-85 { + padding-right: 85px; + } + .bodywebsite .inset-xl-right-100 { + padding-right: 100px; + } +} +@media (min-width: 1800px) { + .bodywebsite .inset-xxl-right-0 { + padding-right: 0; + } + .bodywebsite .inset-xxl-right-10 { + padding-right: 10px; + } + .bodywebsite .inset-xxl-right-15 { + padding-right: 15px; + } + .bodywebsite .inset-xxl-right-20 { + padding-right: 20px; + } + .bodywebsite .inset-xxl-right-30 { + padding-right: 30px; + } + .bodywebsite .inset-xxl-right-40 { + padding-right: 40px; + } + .bodywebsite .inset-xxl-right-50 { + padding-right: 50px; + } + .bodywebsite .inset-xxl-right-60 { + padding-right: 60px; + } + .bodywebsite .inset-xxl-right-70 { + padding-right: 70px; + } + .bodywebsite .inset-xxl-right-85 { + padding-right: 85px; + } + .bodywebsite .inset-xxl-right-100 { + padding-right: 100px; + } +} +.bodywebsite .container + .container { + margin-top: 60px; +} +.bodywebsite h3.section-title { + color: #000; +} +.bodywebsite h4 + .section-title { + margin-top: 2px; +} +.bodywebsite h4 + .comment-list { + margin-top: 30px; +} +.bodywebsite h3 + p { + margin-top: 15px; +} +.bodywebsite h3 + p.h4 { + margin-top: 2px; +} +.bodywebsite h3 + .row { + margin-top: 40px; +} +.bodywebsite h3 + * { + margin-top: 40px; +} +.bodywebsite .row + .row { + margin-top: 60px; +} +.bodywebsite * + .row.list-md-dashed { + margin-top: 60px; +} +.bodywebsite .row + .button-block { + margin-top: 60px; +} +.bodywebsite .slick-slider + .slick-slider.carousel-parent { + margin-top: 35px; +} +.bodywebsite .quote-left + .button-block { + margin-top: 22px; +} +.bodywebsite .aside-title + * { + margin-top: 22px; +} +.bodywebsite * + .button-group { + margin-top: 25px; +} +html .bodywebsite .page .offset-top-0 { + margin-top: 0; +} +html .bodywebsite .page .offset-top-2 { + margin-top: 2px; +} +html .bodywebsite .page .offset-top-5 { + margin-top: 5px; +} +html .bodywebsite .page .offset-top-10 { + margin-top: 10px; +} +html .bodywebsite .page .offset-top-15 { + margin-top: 15px; +} +html .bodywebsite .page .offset-top-22 { + margin-top: 22px; +} +html .bodywebsite .page .offset-top-27 { + margin-top: 27px; +} +html .bodywebsite .page .offset-top-30 { + margin-top: 30px; +} +html .bodywebsite .page .offset-top-35 { + margin-top: 35px; +} +html .bodywebsite .page .offset-top-40 { + margin-top: 40px; +} +html .bodywebsite .page .offset-top-45 { + margin-top: 45px; +} +html .bodywebsite .page .offset-top-50 { + margin-top: 50px; +} +html .bodywebsite .page .offset-top-60 { + margin-top: 60px; +} +html .bodywebsite .page .offset-top-75 { + margin-top: 75px; +} +html .bodywebsite .page .offset-top-90 { + margin-top: 90px; +} +html .bodywebsite .page .offset-top-100 { + margin-top: 100px; +} +html .bodywebsite .page .offset-top-120 { + margin-top: 120px; +} +@media (min-width: 576px) { + html .bodywebsite .page .offset-sm-top-0 { + margin-top: 0; + } + html .bodywebsite .page .offset-sm-top-2 { + margin-top: 2px; + } + html .bodywebsite .page .offset-sm-top-5 { + margin-top: 5px; + } + html .bodywebsite .page .offset-sm-top-10 { + margin-top: 10px; + } + html .bodywebsite .page .offset-sm-top-15 { + margin-top: 15px; + } + html .bodywebsite .page .offset-sm-top-22 { + margin-top: 22px; + } + html .bodywebsite .page .offset-sm-top-27 { + margin-top: 27px; + } + html .bodywebsite .page .offset-sm-top-30 { + margin-top: 30px; + } + html .bodywebsite .page .offset-sm-top-35 { + margin-top: 35px; + } + html .bodywebsite .page .offset-sm-top-40 { + margin-top: 40px; + } + html .bodywebsite .page .offset-sm-top-45 { + margin-top: 45px; + } + html .bodywebsite .page .offset-sm-top-50 { + margin-top: 50px; + } + html .bodywebsite .page .offset-sm-top-60 { + margin-top: 60px; + } + html .bodywebsite .page .offset-sm-top-75 { + margin-top: 75px; + } + html .bodywebsite .page .offset-sm-top-90 { + margin-top: 90px; + } + html .bodywebsite .page .offset-sm-top-100 { + margin-top: 100px; + } + html .bodywebsite .page .offset-sm-top-120 { + margin-top: 120px; + } +} +@media (min-width: 768px) { + html .bodywebsite .page .offset-md-top-0 { + margin-top: 0; + } + html .bodywebsite .page .offset-md-top-2 { + margin-top: 2px; + } + html .bodywebsite .page .offset-md-top-5 { + margin-top: 5px; + } + html .bodywebsite .page .offset-md-top-10 { + margin-top: 10px; + } + html .bodywebsite .page .offset-md-top-15 { + margin-top: 15px; + } + html .bodywebsite .page .offset-md-top-22 { + margin-top: 22px; + } + html .bodywebsite .page .offset-md-top-27 { + margin-top: 27px; + } + html .bodywebsite .page .offset-md-top-30 { + margin-top: 30px; + } + html .bodywebsite .page .offset-md-top-35 { + margin-top: 35px; + } + html .bodywebsite .page .offset-md-top-40 { + margin-top: 40px; + } + html .bodywebsite .page .offset-md-top-45 { + margin-top: 45px; + } + html .bodywebsite .page .offset-md-top-50 { + margin-top: 50px; + } + html .bodywebsite .page .offset-md-top-60 { + margin-top: 60px; + } + html .bodywebsite .page .offset-md-top-75 { + margin-top: 75px; + } + html .bodywebsite .page .offset-md-top-90 { + margin-top: 90px; + } + html .bodywebsite .page .offset-md-top-100 { + margin-top: 100px; + } + html .bodywebsite .page .offset-md-top-120 { + margin-top: 120px; + } +} +@media (min-width: 992px) { + html .bodywebsite .page .offset-lg-top-0 { + margin-top: 0; + } + html .bodywebsite .page .offset-lg-top-2 { + margin-top: 2px; + } + html .bodywebsite .page .offset-lg-top-5 { + margin-top: 5px; + } + html .bodywebsite .page .offset-lg-top-10 { + margin-top: 10px; + } + html .bodywebsite .page .offset-lg-top-15 { + margin-top: 15px; + } + html .bodywebsite .page .offset-lg-top-22 { + margin-top: 22px; + } + html .bodywebsite .page .offset-lg-top-27 { + margin-top: 27px; + } + html .bodywebsite .page .offset-lg-top-30 { + margin-top: 30px; + } + html .bodywebsite .page .offset-lg-top-35 { + margin-top: 35px; + } + html .bodywebsite .page .offset-lg-top-40 { + margin-top: 40px; + } + html .bodywebsite .page .offset-lg-top-45 { + margin-top: 45px; + } + html .bodywebsite .page .offset-lg-top-50 { + margin-top: 50px; + } + html .bodywebsite .page .offset-lg-top-60 { + margin-top: 60px; + } + html .bodywebsite .page .offset-lg-top-75 { + margin-top: 75px; + } + html .bodywebsite .page .offset-lg-top-90 { + margin-top: 90px; + } + html .bodywebsite .page .offset-lg-top-100 { + margin-top: 100px; + } + html .bodywebsite .page .offset-lg-top-120 { + margin-top: 120px; + } +} +@media (min-width: 1200px) { + html .bodywebsite .page .offset-xl-top-0 { + margin-top: 0; + } + html .bodywebsite .page .offset-xl-top-2 { + margin-top: 2px; + } + html .bodywebsite .page .offset-xl-top-5 { + margin-top: 5px; + } + html .bodywebsite .page .offset-xl-top-10 { + margin-top: 10px; + } + html .bodywebsite .page .offset-xl-top-15 { + margin-top: 15px; + } + html .bodywebsite .page .offset-xl-top-22 { + margin-top: 22px; + } + html .bodywebsite .page .offset-xl-top-27 { + margin-top: 27px; + } + html .bodywebsite .page .offset-xl-top-30 { + margin-top: 30px; + } + html .bodywebsite .page .offset-xl-top-35 { + margin-top: 35px; + } + html .bodywebsite .page .offset-xl-top-40 { + margin-top: 40px; + } + html .bodywebsite .page .offset-xl-top-45 { + margin-top: 45px; + } + html .bodywebsite .page .offset-xl-top-50 { + margin-top: 50px; + } + html .bodywebsite .page .offset-xl-top-60 { + margin-top: 60px; + } + html .bodywebsite .page .offset-xl-top-75 { + margin-top: 75px; + } + html .bodywebsite .page .offset-xl-top-90 { + margin-top: 90px; + } + html .bodywebsite .page .offset-xl-top-100 { + margin-top: 100px; + } + html .bodywebsite .page .offset-xl-top-120 { + margin-top: 120px; + } +} +@media (min-width: 1800px) { + html .bodywebsite .page .offset-xxl-top-0 { + margin-top: 0; + } + html .bodywebsite .page .offset-xxl-top-2 { + margin-top: 2px; + } + html .bodywebsite .page .offset-xxl-top-5 { + margin-top: 5px; + } + html .bodywebsite .page .offset-xxl-top-10 { + margin-top: 10px; + } + html .bodywebsite .page .offset-xxl-top-15 { + margin-top: 15px; + } + html .bodywebsite .page .offset-xxl-top-22 { + margin-top: 22px; + } + html .bodywebsite .page .offset-xxl-top-27 { + margin-top: 27px; + } + html .bodywebsite .page .offset-xxl-top-30 { + margin-top: 30px; + } + html .bodywebsite .page .offset-xxl-top-35 { + margin-top: 35px; + } + html .bodywebsite .page .offset-xxl-top-40 { + margin-top: 40px; + } + html .bodywebsite .page .offset-xxl-top-45 { + margin-top: 45px; + } + html .bodywebsite .page .offset-xxl-top-50 { + margin-top: 50px; + } + html .bodywebsite .page .offset-xxl-top-60 { + margin-top: 60px; + } + html .bodywebsite .page .offset-xxl-top-75 { + margin-top: 75px; + } + html .bodywebsite .page .offset-xxl-top-90 { + margin-top: 90px; + } + html .bodywebsite .page .offset-xxl-top-100 { + margin-top: 100px; + } + html .bodywebsite .page .offset-xxl-top-120 { + margin-top: 120px; + } +} +@media (min-width: 768px) { + .bodywebsite .shift-sm-top-1 { + margin-top: -18px; + } +} +@media (min-width: 992px) { + .bodywebsite .shift-sm-top-1 { + margin-top: -23px; + } +} +@media (min-width: 992px) { + .bodywebsite .shift-md-top-1 { + margin-top: -33px; + } +} +@media (min-width: 1200px) { + .bodywebsite .shift-md-top-1 { + margin-top: -43px; + } +} +.bodywebsite .row-0 { + margin-bottom: 0px; +} +.bodywebsite .row-0:empty { + margin-bottom: 0; +} +.bodywebsite .row-0 > * { + margin-bottom: 0px; +} +.bodywebsite .row-15 { + margin-bottom: -15px; +} +.bodywebsite .row-15:empty { + margin-bottom: 0; +} +.bodywebsite .row-15 > * { + margin-bottom: 15px; +} +.bodywebsite .row-20 { + margin-bottom: -20px; +} +.bodywebsite .row-20:empty { + margin-bottom: 0; +} +.bodywebsite .row-20 > * { + margin-bottom: 20px; +} +.bodywebsite .row-30 { + margin-bottom: -30px; +} +.bodywebsite .row-30:empty { + margin-bottom: 0; +} +.bodywebsite .row-30 > * { + margin-bottom: 30px; +} +.bodywebsite .row-40 { + margin-bottom: -40px; +} +.bodywebsite .row-40:empty { + margin-bottom: 0; +} +.bodywebsite .row-40 > * { + margin-bottom: 40px; +} +.bodywebsite .row-50 { + margin-bottom: -50px; +} +.bodywebsite .row-50:empty { + margin-bottom: 0; +} +.bodywebsite .row-50 > * { + margin-bottom: 50px; +} +.bodywebsite .row-60 { + margin-bottom: -60px; +} +.bodywebsite .row-60:empty { + margin-bottom: 0; +} +.bodywebsite .row-60 > * { + margin-bottom: 60px; +} +@media (min-width: 576px) { + .bodywebsite .row-sm-50 { + margin-bottom: -50px; + } + .bodywebsite .row-sm-50:empty { + margin-bottom: 0; + } + .bodywebsite .row-sm-50 > * { + margin-bottom: 50px; + } + .bodywebsite .row-sm-0 { + margin-bottom: 0px; + } + .bodywebsite .row-sm-0:empty { + margin-bottom: 0; + } + .bodywebsite .row-sm-0 > * { + margin-bottom: 0px; + } +} +@media (min-width: 768px) { + .bodywebsite .row-md-60 { + margin-bottom: -60px; + } + .bodywebsite .row-md-60:empty { + margin-bottom: 0; + } + .bodywebsite .row-md-60 > * { + margin-bottom: 60px; + } +} +@media (min-width: 992px) { + .bodywebsite .row-md-30 { + margin-bottom: -30px; + } + .bodywebsite .row-md-30:empty { + margin-bottom: 0; + } + .bodywebsite .row-md-30 > * { + margin-bottom: 30px; + } +} +@media (min-width: 1200px) { + .bodywebsite .row-xl-100 { + margin-bottom: -100px; + } + .bodywebsite .row-xl-100:empty { + margin-bottom: 0; + } + .bodywebsite .row-xl-100 > * { + margin-bottom: 100px; + } + .bodywebsite .row-xl-90 { + margin-bottom: -90px; + } + .bodywebsite .row-xl-90:empty { + margin-bottom: 0; + } + .bodywebsite .row-xl-90 > * { + margin-bottom: 90px; + } +} +.bodywebsite .link { + display: inline-block; +} +.bodywebsite .link-inline { + font: inherit; + line-height: inherit; + text-decoration: underline; +} +.bodywebsite .link-underline, +.bodywebsite .link-underline:active, +.bodywebsite .link-underline:focus { + text-decoration: underline; +} +.bodywebsite .link-underline:hover { + text-decoration: none; +} +.bodywebsite .link-circle { + border-radius: 50%; +} +.bodywebsite .link-circle .icon, +.bodywebsite .link-circle .icon:before { + position: static; +} +.bodywebsite .link-bold { + font: 700 18px/22px "Roboto", Helvetica, Arial, sans-serif; +} +.bodywebsite .link-group { + white-space: nowrap; +} +.bodywebsite .link-group * { + vertical-align: middle; +} +.bodywebsite .link-group span { + display: inline-block; +} +.bodywebsite .link-group span + *, +.bodywebsite .link-group * + span { + margin-left: 5px; +} +.bodywebsite .link-group.link-group-animated .icon { + position: relative; + right: 0; + transition: .22s; +} +.bodywebsite .link-group.link-group-animated:hover .icon { + right: -5px; +} +.bodywebsite .link-group-baseline * { + vertical-align: baseline; +} +.bodywebsite .link-icon, +.bodywebsite .link-icon * { + vertical-align: middle; +} +.bodywebsite .link-icon .icon { + margin-right: 5px; +} +.bodywebsite .link-icon-mod .icon { + position: relative; + top: -3px; +} +.bodywebsite .link-image img { + width: auto; + transition: .44s all ease; + opacity: .5; +} +.bodywebsite .link-image:hover img { + opacity: 1; +} +.bodywebsite .link-image-wrap { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + min-height: 126px; +} +.bodywebsite * + .link-image-wrap { + margin-top: 13px; +} +.bodywebsite .page .link-primary-inline { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-primary-inline.active, +.bodywebsite .page .link-primary-inline:active, +.bodywebsite .page .link-primary-inline:focus { + color: #9b9b9b; +} +.bodywebsite .page .link-primary-inline.hover, +.bodywebsite .page .link-primary-inline:hover { + color: #42b294; +} +.bodywebsite .page .link-default, +.bodywebsite .page .link-default:active, +.bodywebsite .page .link-default:focus { + color: #9f9f9f; +} +.bodywebsite .page .link-default:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-primary, +.bodywebsite .page .link-primary:active, +.bodywebsite .page .link-primary:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-primary:hover { + color: #00030a; +} +.bodywebsite .page .link-primary-inverse, +.bodywebsite .page .link-primary-inverse:active, +.bodywebsite .page .link-primary-inverse:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-primary-inverse:hover { + color: #ddd; +} +.bodywebsite .page .link-primary-inverse-v2, +.bodywebsite .page .link-primary-inverse-v2:active, +.bodywebsite .page .link-primary-inverse-v2:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-primary-inverse-v2:hover { + color: #fff; +} +.bodywebsite .page .link-secondary, +.bodywebsite .page .link-secondary:active, +.bodywebsite .page .link-secondary:focus { + color: #00030a; +} +.bodywebsite .page .link-secondary:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-tundora, +.bodywebsite .page .link-tundora:active, +.bodywebsite .page .link-tundora:focus { + color: #414141; +} +.bodywebsite .page .link-tundora:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-tundora-inverse, +.bodywebsite .page .link-tundora-inverse:active, +.bodywebsite .page .link-tundora-inverse:focus { + color: #414141; +} +.bodywebsite .page .link-tundora-inverse:hover { + color: #fff; +} +.bodywebsite .page .link-secondary, +.bodywebsite .page .link-secondary:active, +.bodywebsite .page .link-secondary:focus { + color: #000; +} +.bodywebsite .page .link-secondary:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-gray-light, +.bodywebsite .page .link-gray-light:active, +.bodywebsite .page .link-gray-light:focus { + color: #dedede; +} +.bodywebsite .page .link-gray-light:hover { + color: #000; +} +.bodywebsite .page .link-white, +.bodywebsite .page .link-white:active, +.bodywebsite .page .link-white:focus { + color: #fff; +} +.bodywebsite .page .link-white:hover { + color: #fff; +} +.bodywebsite .page .link-black, +.bodywebsite .page .link-black:active, +.bodywebsite .page .link-black:focus { + color: #000; +} +.bodywebsite .page .link-black:hover { + color: maincolorbis) ? 'rgb(50, 120, 180)' : '#'.$website->maincolorbis; ?>; +} +.bodywebsite .page .link-black:hover { + text-decoration: underline; +} +.bodywebsite .page .link-gray-dark-filled, +.bodywebsite .page .link-gray-dark-filled:active, +.bodywebsite .page .link-gray-dark-filled:focus { + color: #fff; + background: #2a2b2b; +} +.bodywebsite .page .link-gray-dark-filled:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .page .link-shop { + width: 25px; + height: 25px; + font-size: 25px; + line-height: 25px; +} +.bodywebsite .page .link-shop, +.bodywebsite .page .link-shop:active, +.bodywebsite .page .link-shop:focus { + color: #00030a; +} +.bodywebsite .page .link-shop:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite ul, +.bodywebsite ol { + list-style: none; + padding: 0; + margin: 0; +} +.bodywebsite dl { + margin: 0; +} +.bodywebsite dt { + font-weight: inherit; +} +.bodywebsite .list > li + li { + margin-top: 5px; +} +.bodywebsite .list-xl > li + li { + margin-top: 44px; +} +.bodywebsite .list-inline { + margin-left: -5px; + margin-right: -5px; + vertical-align: baseline; +} +.bodywebsite .list-inline > li { + display: inline-block; + padding-left: 8px; + padding-right: 8px; +} +.bodywebsite .list-inline-xs { + margin-left: -6px; + margin-right: -6px; +} +.bodywebsite .list-inline-xs > li { + display: inline-block; + padding-left: 6px; + padding-right: 6px; +} +.bodywebsite .list-inline-sm { + margin-left: -10px; + margin-right: -10px; +} +.bodywebsite .list-inline-sm > li { + display: inline-block; + padding-left: 10px; + padding-right: 10px; +} +.bodywebsite .list-inline-md { + margin-left: -15px; + margin-right: -15px; +} +.bodywebsite .list-inline-md > li { + display: inline-block; + padding-left: 15px; + padding-right: 15px; +} +.bodywebsite .list-objects-inline { + margin-bottom: -4px; + margin-left: -22px; + transform: translateY(-4px); +} +.bodywebsite .list-objects-inline > *, +.bodywebsite .list-objects-inline > *:first-child { + display: inline-block; + vertical-align: middle; + margin-top: 4px; + margin-left: 22px; +} +.bodywebsite .list-objects-inline > li > * { + display: inline-block; + vertical-align: middle; +} +.bodywebsite .list-objects-inline > li > * + * { + margin-left: 5px; +} +.bodywebsite .list-terms dt + dd { + margin-top: 10px; +} +.bodywebsite .list-terms dd + dt { + margin-top: 31px; +} +.bodywebsite .list-terms-variant-1 dt { + font: 700 16px/22px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: -0.025em; + color: #000; +} +.bodywebsite .list-terms-variant-1 dt + dd { + margin-top: 18px; +} +.bodywebsite .list-terms-variant-1 dd + dt { + margin-top: 40px; +} +@media (min-width: 1200px) { + .bodywebsite .list-terms-variant-1 dt { + font-size: 24px; + line-height: 1.2; + } + .bodywebsite .list-terms-variant-1 dd + dt { + margin-top: 50px; + } +} +.bodywebsite .list-inline-dashed { + margin-left: -15px; +} +.bodywebsite .list-inline-dashed li { + padding-left: 15px; + padding-right: 10px; +} +.bodywebsite .list-inline-dashed li:after { + content: '|'; + position: relative; + right: -12.5px; + color: #e5e7e9; +} +.bodywebsite .list-inline-dashed li:last-child { + padding-right: 0; +} +.bodywebsite .list-inline-dashed li:last-child:after { + display: none; +} +@media (min-width: 992px) { + .bodywebsite .list-md-dashed > * { + position: relative; + } + .bodywebsite .list-md-dashed > *:after { + content: ''; + position: absolute; + font-weight: 100; + top: 0; + right: -6%; + height: 73px; + -webkit-transform: translateX(-50%) skew(-21deg); + transform: translateX(-50%) skew(-21deg); + width: 1px; + background: #48494a; + } +} +@media (min-width: 992px) and (min-width: 1200px) { + .bodywebsite .list-md-dashed > *:after { + right: -3%; + height: 120px; + } +} +@media (min-width: 992px) { + .bodywebsite .list-md-dashed > *:last-child::after { + display: none; + } +} +.bodywebsite .dl-inline { + vertical-align: middle; +} +.bodywebsite .dl-inline dt, +.bodywebsite .dl-inline dd { + display: inline-block; + vertical-align: middle; +} +.bodywebsite .dl-inline dt { + padding-right: 5px; +} +.bodywebsite .dl-inline dt:after { + content: ':'; +} +.bodywebsite .dl-inline .pricing-object-sm { + position: relative; + top: -5px; +} +.bodywebsite .list-terms-inline dt, +.bodywebsite .list-terms-inline dd { + display: inline-block; +} +.bodywebsite .list-terms-inline dt { + color: #000; +} +.bodywebsite .list-terms-inline dd { + color: #9f9f9f; +} +.bodywebsite .list-terms-inline dt:after { + content: ':'; +} +.bodywebsite .list-index { + counter-reset: li; +} +.bodywebsite .list-index > li .list-index-counter:before { + content: counter(li, decimal-leading-zero); + counter-increment: li; +} +.bodywebsite .list-marked li { + color: #000; + position: relative; + padding-left: 32px; +} +.bodywebsite .list-marked li:before { + position: absolute; + top: 1px; + left: 0; + content: '\e005'; + font-family: "fl-flat-icons-set-2"; + display: inline-block; + margin-right: 11px; + font-size: 13px; + line-height: inherit; + vertical-align: middle; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-marked li:not(:last-child):after { + content: ';'; +} +.bodywebsite .list-marked li:last-child:after { + content: '.'; +} +.bodywebsite .list-marked li + li { + margin-top: 11px; +} +.bodywebsite .list-marked-spacing-lg li { + padding-left: 26px; +} +@media (min-width: 992px) and (max-width: 1799px) { + .bodywebsite .list-marked li { + padding-left: 24px; + font-size: 13px; + } + .bodywebsite .list-marked li:before { + font-size: 11px; + } +} +.bodywebsite .list-marked-variant-2 > li > a { + position: relative; + display: inline-block; +} +.bodywebsite .list-marked-variant-2 > li > a:hover:before { + left: 4px; +} +.bodywebsite .list-marked-variant-2 > li + li { + margin-top: 14px; +} +.bodywebsite .list-ordered { + counter-reset: li; +} +.bodywebsite .list-ordered li { + color: #000; +} +.bodywebsite .list-ordered li:before { + display: inline-block; + margin-right: 13px; + width: 15px; + content: counter(li, decimal) "."; + counter-increment: li; +} +.bodywebsite .list-ordered li:not(:last-child):after { + content: ';'; +} +.bodywebsite .list-ordered li:last-child:after { + content: '.'; +} +.bodywebsite .list-ordered li + li { + margin-top: 11px; +} +.bodywebsite .list-tags > li { + display: inline-block; + font-style: italic; +} +.bodywebsite .list-tags > li a, +.bodywebsite .list-tags > li a:active, +.bodywebsite .list-tags > li a:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-tags > li a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-tags > li:after { + content: ','; + display: inline-block; + color: #f9f9f9; +} +.bodywebsite .list-tags > li:last-child:after { + display: none; +} +.bodywebsite .list-numbered { + counter-reset: li; +} +.bodywebsite .list-numbered > li { + position: relative; + padding-left: 30px; +} +.bodywebsite .list-numbered > li:before { + position: absolute; + top: 0; + left: 0; + content: counter(li, decimal) "."; + counter-increment: li; +} +.bodywebsite .list-numbered > li + li { + margin-top: 10px; +} +.bodywebsite .list-icon-pack { + margin-top: 6px; +} +.bodywebsite .list-icon-pack > li { + margin-top: 25px; +} +.bodywebsite .list-icon-pack > li span { + display: block; +} +.bodywebsite .list-icon-pack > li span + span { + margin-left: .25em; +} +.bodywebsite .list-icon-pack h6 + *, +.bodywebsite .list-icon-pack .h6 + * { + margin-top: 2px; +} +.bodywebsite .list-links > li { + display: inline-block; +} +.bodywebsite .list-links > li:after { + content: ';'; +} +.bodywebsite .list-links > li:last-child:after { + display: none; +} +.bodywebsite .list-hashtags > li { + display: inline-block; +} +.bodywebsite .list-hashtags > li a { + color: inherit; +} +.bodywebsite .list-hashtags > li a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-hashtags > li > a:before { + content: '#'; +} +.bodywebsite .list-marked-bordered { + color: #000; +} +.bodywebsite .list-marked-bordered li a { + display: block; + padding: 10px 7px; + border-bottom: 1px solid #f9f9f9; +} +.bodywebsite .list-marked-bordered li a:before { + position: relative; + display: inline-block; + padding-right: 10px; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + line-height: inherit; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + content: '\f105'; +} +.bodywebsite .list-marked-bordered li a span { + color: inherit; + transition: color .33s; +} +.bodywebsite .list-marked-bordered li a span:first-child { + color: #000; +} +.bodywebsite .list-marked-bordered li a:hover, +.bodywebsite .list-marked-bordered li a:hover span:nth-child(n) { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-marked-bordered li span:not(:last-child) { + margin-right: .25em; +} +.bodywebsite .list-bordered-horizontal { + position: relative; + transform: translateY(-7px); + margin-bottom: -7px; +} +.bodywebsite .list-bordered-horizontal > * { + margin-top: 7px; +} +.bodywebsite .list-bordered-horizontal > *:not(:last-child) { + margin-right: 35px; +} +@media (min-width: 768px) { + .bodywebsite .list-bordered-horizontal > li { + display: inline-block; + } + .bodywebsite .list-bordered-horizontal > li:not(:last-child) { + position: relative; + } + .bodywebsite .list-bordered-horizontal > li:not(:last-child):after { + content: ''; + position: absolute; + top: 50%; + transform: translateY(-50%); + right: -20px; + width: 1px; + height: 22px; + background: #dedede; + } +} +.bodywebsite .list-tag-blocks { + position: relative; + transform: translateY(-6px); + margin-bottom: -6px; +} +.bodywebsite .list-tag-blocks > * { + margin-top: 6px; +} +.bodywebsite .list-tag-blocks > *:not(:last-child) { + margin-right: 6px; +} +.bodywebsite .list-tag-blocks li { + display: inline-block; + font-size: 11px; + font-weight: 700; + text-transform: uppercase; +} +.bodywebsite .list-tag-blocks li a { + display: inline-block; + padding: 6px 19px; + border-radius: 0; + border: 1px solid transparent; +} +.bodywebsite .list-tag-blocks li a, +.bodywebsite .list-tag-blocks li a:active, +.bodywebsite .list-tag-blocks li a:focus { + color: #000; + background: #fff; +} +.bodywebsite .list-tag-blocks li a:hover { + background: transparent; + border-color: #cdcdcd; +} +.bodywebsite .list-progress { + font-family: "Roboto", Helvetica, Arial, sans-serif; + color: #00030a; +} +.bodywebsite .list-progress li + li { + margin-top: 23px; +} +.bodywebsite .list-progress p { + padding-right: 40px; +} +.bodywebsite .list-tags-inline > li { + display: inline; +} +.bodywebsite .list-tags-inline > li a { + color: inherit; +} +.bodywebsite .list-tags-inline > li a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .list-tags-inline > li:not(:last-child):after { + content: ','; +} +.bodywebsite .list-rating { + font-size: 0; + line-height: 0; +} +.bodywebsite .list-rating > li { + display: inline-block; +} +.bodywebsite .list-rating .icon { + color: #ffd400; +} +.bodywebsite .list-wide-bordered { + color: #00030a; + font: 400 14px/22px "Roboto", Helvetica, Arial, sans-serif; + border-top: 1px solid #dedede; +} +.bodywebsite .list-wide-bordered dl { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + width: 100%; + font-weight: 700; +} +.bodywebsite .list-wide-bordered dl dt { + padding-right: 15px; +} +.bodywebsite .list-wide-bordered dl dd { + font-weight: 700; + font-size: 14px; +} +.bodywebsite .list-wide-bordered li { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + min-height: 54px; + padding: 10px 20px; + border-bottom: 1px solid #dedede; +} +.bodywebsite .list-wide-bordered + .list-wide-bordered { + border-top: 0; +} +@media (min-width: 768px) { + .bodywebsite .list-wide-bordered { + font-size: 16px; + } + .bodywebsite .list-wide-bordered li { + min-height: 73px; + padding: 20px 30px; + } +} +.bodywebsite .object-wrap { + position: relative; + overflow: hidden; +} +.bodywebsite .object-wrap-right > .object-wrap-body { + right: 0; +} +.bodywebsite .object-wrap-left > .object-wrap-body { + left: 0; +} +@media (min-width: 768px) { + .bodywebsite .object-wrap-sm-right > .object-wrap-body { + right: 0; + } + .bodywebsite .object-wrap-sm-left > .object-wrap-body { + left: 0; + } +} + +@media (max-width: 767px) { + .bodywebsite .object-wrap-body { + position: relative; + overflow: hidden; + min-height: 300px; + width: 100%; + } + .bodywebsite .object-wrap-body > img { + position: absolute; + min-width: 100%; + max-width: none; + height: auto; + max-height: none; + top: 20%; + left: 50%; + transform: translate(-50%, -20%); + } + .bodywebsite .page .text-primary { + word-break: break-all; + } + .bodywebsite figure img { + margin: unset; + } +} + +@media (min-width: 768px) { + .bodywebsite .object-wrap-body { + overflow: hidden; + position: absolute; + top: 0; + bottom: 0; + width: 100vw; + min-width: 1px; + max-width: none; + height: 100%; + min-height: 100%; + max-height: none; + margin: 0; + background: inherit; + z-index: 0; + } + .bodywebsite .object-wrap-body > img { + position: relative; + height: auto; + min-height: 100.5%; + width: auto; + min-width: 102%; + max-width: none; + left: 50%; + transform: translateX(-50%); + } + .bodywebsite .object-wrap-body + * { + margin-top: 0; + } +} +@media (min-width: 768px) { + .bodywebsite .sm-width-c6 { + width: calc(50vw); + } +} +@media (min-width: 992px) { + .bodywebsite .md-width-c7d20 { + width: calc(150vw); + } +} +@media (min-width: 1200px) { + .bodywebsite .md-width-c7d20 { + width: calc(167.5vw); + } +} +@media (min-width: 992px) { + .bodywebsite .md-width-c5dm20 { + width: calc(-50vw); + } +} +@media (min-width: 1200px) { + .bodywebsite .md-width-c5dm20 { + width: calc(-67.5vw); + } +} +.bodywebsite .bg-wrap { + position: relative; +} +.bodywebsite .bg-wrap:before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 120vw; + left: 50%; + transform: translateX(-50%); + background: inherit; + z-index: -1; +} +.bodywebsite .bg-wrap-sm-left { + z-index: 1; +} +@media (min-width: 992px) { + .bodywebsite .bg-wrap-sm-left:before { + width: 100vw; + right: 0; + transform: none; + } +} +.bodywebsite .bg-wrap-sm-right { + z-index: 1; +} +@media (min-width: 992px) { + .bodywebsite .bg-wrap-sm-right:before { + width: 100vw; + left: 0; + transform: none; + } +} +@media (min-width: 576px) { + .bodywebsite .wrap-justify { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; + } + .bodywebsite .wrap-justify > * + * { + margin-top: 0; + } +} +@media (min-width: 768px) { + .bodywebsite .wrap-justify { + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + } +} +@media (min-width: 1200px) { + .bodywebsite .wrap-justify { + padding-right: 30px; + } +} +.bodywebsite .link-wrap { + line-height: 1; +} +.bodywebsite .link-wrap a { + display: inline; + line-height: 1; +} +.bodywebsite [class*='bg-decoration-wrap'] { + position: relative; + overflow: hidden; +} +.bodywebsite [class*='bg-decoration-wrap'] .bg-decoration-content { + position: relative; + z-index: 2; +} +.bodywebsite [class*='bg-decoration-wrap'] .bg-decoration-object { + top: 0; + bottom: auto; +} +.bodywebsite .bg-decoration-bottom .bg-decoration-object { + top: auto; + bottom: 0; +} +@media (min-width: 768px) { + .bodywebsite .bg-decoration-wrap-sm .bg-decoration-object { + height: 50%; + position: absolute; + right: 0; + left: 0; + } + .bodywebsite .bg-decoration-bottom-sm .bg-decoration-object { + height: 34%; + } +} +@media (min-width: 1200px) { + .bodywebsite .bg-decoration-object { + height: 50%; + position: absolute; + right: 0; + left: 0; + } + .bodywebsite .bg-decoration-bottom-mod .bg-decoration-object { + height: 45%; + } +} +.bodywebsite .divider-fullwidth { + height: 1px; + width: 100%; +} +.bodywebsite .hr { + border: none; + height: 1px; + width: 100%; +} +.bodywebsite .tabs-custom .nav-tabs { + display: block; + word-spacing: 0; + border: 0; +} +.bodywebsite .tabs-custom .nav-tabs:before, +.bodywebsite .tabs-custom .nav-tabs:after { + display: none; +} +.bodywebsite .tabs-custom .nav-tabs .nav-item { + float: none; + border: 0; + cursor: pointer; + transition: .33s all ease; +} +.bodywebsite .tabs-custom .nav-tabs .nav-item .nav-link.active { + cursor: default; + border: 0; +} +.bodywebsite .tabs-custom .nav-tabs .nav-link { + margin: 0; + border: 0; +} +.bodywebsite * + .tabs-custom { + margin-top: 35px; +} +@media (min-width: 992px) { + .bodywebsite * + .tabs-custom { + margin-top: 50px; + } +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs, +.bodywebsite .tabs-custom.tabs-line .nav-tabs, +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs { + font-size: 0; + line-height: 0; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs { + border: 1px solid #dedede; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs li { + margin: -1px 0; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link { + padding: 8px 10px; + font: 700 11px/18px "Roboto", Helvetica, Arial, sans-serif; + color: #000; + background: transparent; + border-bottom: 1px solid #dedede; + text-align: center; + vertical-align: middle; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link:after { + font: 400 17px 'Material Design Icons'; + color: transparent; + position: relative; + top: -12px; + display: inline-block; + margin-left: 5px; + content: '\f236'; + vertical-align: middle; + transition: .33s all ease; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link:first-child { + border-top: 1px solid #dedede; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .active.nav-link { + color: #fff; + background: #3a3c3e; + border-color: #3a3c3e; +} +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link:hover:after, +.bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .active.nav-link:after { + top: -1px; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .tabs-custom.tabs-corporate .tab-content { + padding: 22px 0 0; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item, +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item { + margin: 0; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item + .nav-item, +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item + .nav-item { + margin-top: -1px; +} +.bodywebsite .tabs-custom.tabs-line .tab-content, +.bodywebsite .tabs-custom.tabs-minimal .tab-content { + padding: 22px 0 0; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link { + font: 400 11px/16px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: -0.05em; + text-transform: uppercase; + color: #9b9b9b; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .active.nav-link { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link { + font: 700 11px/24px "Roboto", Helvetica, Arial, sans-serif; + color: #000; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .active.nav-link { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs { + text-align: center; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item { + display: block; + margin: 0 -1px; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link { + padding: 8px 15px; + border: 1px solid #e5e7e9; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link:last-child { + margin-right: 0; + border-bottom-width: 1px; +} +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .active.nav-link { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs { + text-align: center; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item { + display: block; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link { + padding: 7px 15px; + border: 1px solid #e5e7e9; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link:last-child { + border-bottom-width: 1px; +} +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .active.nav-link { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +@media (min-width: 768px) { + .bodywebsite .tabs-custom.tabs-line .nav-item, + .bodywebsite .tabs-custom.tabs-minimal .nav-item { + margin: 0; + } + .bodywebsite .tabs-custom.tabs-line .nav-tabs .nav-item .nav-link { + font-size: 14px; + line-height: 24px; + } + .bodywebsite .tabs-custom.tabs-minimal .nav-tabs .nav-item .nav-link { + font-size: 14px; + line-height: 24px; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + text-align: left; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .nav-link, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .nav-link { + position: relative; + z-index: 10; + display: inline-block; + border: 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item + .nav-item, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item + .nav-item { + margin-top: 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .tab-content, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .tab-content { + padding: 40px 0 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs .nav-item, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs .nav-link { + display: block; + border: 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs { + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + border-bottom: 2px solid #e5e7e9; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .nav-link { + padding: 8px 0 8px 0; + margin: 0 30px 0 0; + font-weight: 700; + background: transparent; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .nav-link:after { + content: ''; + position: absolute; + left: 0; + right: 100%; + bottom: -1px; + border-bottom: 2px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + opacity: 0; + visibility: hidden; + transition: .33s all ease; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .nav-link:hover, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .active.nav-link { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-line .nav-tabs .nav-item .active.nav-link:after { + right: 0; + opacity: 1; + visibility: visible; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs { + margin-top: -10px; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item { + display: inline-block; + margin: 10px 15px 0 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .nav-link { + position: relative; + bottom: -1px; + z-index: 10; + display: inline-block; + padding: 0 0 5px 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .nav-link:after { + content: ''; + position: absolute; + left: 0; + right: 100%; + bottom: 0; + border-bottom: 2px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + opacity: 0; + visibility: hidden; + transition: .33s all ease; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .nav-link:last-child { + margin-right: 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .nav-link:hover, + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .active.nav-link { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-minimal .nav-tabs .nav-item .active.nav-link:after { + right: 0; + opacity: 1; + visibility: visible; + } +} +.bodywebsite .tabs-vertical .nav-tabs { + position: relative; +} +.bodywebsite .tabs-vertical .nav-tabs > .nav-item { + z-index: 10; + display: block; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .tabs-vertical.tabs-corporate .nav-tabs { + width: 100%; +} +.bodywebsite .tabs-vertical.tabs-corporate .nav-tabs .nav-item { + display: block; +} +.bodywebsite .tabs-vertical.tabs-corporate .nav-tabs .nav-item .nav-link { + position: relative; + padding: 8px 10px; +} +.bodywebsite .tabs-vertical.tabs-corporate .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-vertical.tabs-corporate .nav-tabs .nav-item .active.nav-link { + border-color: #3a3c3e; +} +.bodywebsite .tabs-vertical.tabs-corporate .tab-content { + padding: 30px 0 0; +} +.bodywebsite .tabs-vertical.tabs-minimal .nav-tabs { + border-right: 1px solid #ddd; +} +.bodywebsite .tabs-vertical.tabs-minimal .nav-tabs .nav-item .nav-link { + position: relative; + right: -1px; + padding: 0 16px 0 0; + text-align: right; + border-right: 1px solid transparent; + background-color: transparent; +} +.bodywebsite .tabs-vertical.tabs-minimal .nav-tabs .nav-item .nav-link:hover, +.bodywebsite .tabs-vertical.tabs-minimal .nav-tabs .nav-item .nav-link.resp-tab-active { + border-right-color: #00030a; +} +.bodywebsite .tabs-vertical.tabs-minimal .nav-tabs .nav-item + .nav-item { + margin-top: 16px; +} +@media (min-width: 768px) { + .bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link { + font-size: 16px; + line-height: 26px; + } + .bodywebsite .tabs-custom.tabs-corporate .nav-tabs .nav-item .nav-link:after { + font-size: 25px; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs { + position: relative; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs .nav-item { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .nav-tabs .nav-item .nav-link { + display: block; + padding: 21px 10px 19px; + } + .bodywebsite .tabs-custom.tabs-horizontal.tabs-corporate .tab-content { + padding: 30px 0 0; + } + .bodywebsite .tabs-custom.tabs-vertical { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: flex-start; + -ms-flex-align: start; + align-items: flex-start; + } + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + max-width: 50%; + } + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item { + width: 100%; + } + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item .nav-link { + text-align: left; + } + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item .nav-link:hover, + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item .active.nav-link { + border-color: #3a3c3e; + } + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item .nav-link:hover:after, + .bodywebsite .tabs-custom.tabs-vertical .nav-tabs .nav-item .active.nav-link:after { + right: 15px; + } + .bodywebsite .tabs-custom.tabs-vertical .tab-content { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs { + width: auto; + min-width: 240px; + border-width: 0 0 1px 0; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs .nav-item { + margin: 0; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs .nav-item .nav-link { + padding: 23px 44px 22px 30px; + border-width: 1px 0 0 0; + text-align: left; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs .nav-item .nav-link:after { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: 26px; + content: '\f238'; + transition: .33s all ease; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs .nav-item .nav-link:hover:after, + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs .nav-item .active.nav-link:after { + right: 15px; + top: 50%; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .tab-content { + padding: 0 0 0 30px; + margin-top: -5px; + } +} +@media (min-width: 992px) { + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .nav-tabs { + min-width: 300px; + } + .bodywebsite .tabs-custom.tabs-vertical.tabs-corporate .tab-content { + padding: 0 0 0 44px; + } +} +.bodywebsite .card-group.card-group-custom { + margin-bottom: 0; +} +.bodywebsite .card-group.card-group-custom .card-heading + .card-collapse > .card-body, +.bodywebsite .card-group.card-group-custom .card-heading + .card-collapse > .list-group { + border-top: 0; +} +.bodywebsite .card-group.card-group-custom .card + .card { + margin-top: 0; +} +.bodywebsite .card-group.card-group-corporate .card + .card { + margin-top: 30px; +} +.bodywebsite .card-custom { + margin: 0; + background: inherit; + border: 0; + border-radius: 0; + box-shadow: none; +} +.bodywebsite .card-custom a { + display: block; +} +.bodywebsite .card-custom .card-heading { + padding: 0; + border-bottom: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.bodywebsite .card-custom .card-body { + padding: 0; + border: 0; +} +.bodywebsite * + .card-group-custom { + margin-top: 35px; +} +@media (min-width: 768px) { + .bodywebsite * + .card-group-custom { + margin-top: 50px; + } +} +.bodywebsite .card-light:first-child .card-title { + border-top: 1px solid #dedede; +} +.bodywebsite .card-light .card-title { + border-bottom: 1px solid #dedede; +} +.bodywebsite .card-light .card-title:nth-child(n + 2) { + margin-top: -1px; +} +.bodywebsite .card-light .card-title a { + position: relative; + padding: 24px 55px 22px 32px; + font: 500 18px/24px "Roboto", Helvetica, Arial, sans-serif; + color: #000; + transition: 1.5s all ease; +} +.bodywebsite .card-light .card-title a .card-arrow:after { + opacity: 0; + visibility: hidden; +} +.bodywebsite .card-light .card-title a.collapsed .card-arrow:after { + opacity: 1; + visibility: visible; +} +.bodywebsite .card-light .card-arrow { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: 26px; + transition: .33s; + will-change: transform; +} +.bodywebsite .card-light .card-arrow:before, +.bodywebsite .card-light .card-arrow:after { + content: ''; + position: absolute; + top: 50%; + transform: translateY(-50%); + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .card-light .card-arrow:before { + width: 14px; + height: 2px; + right: 0; +} +.bodywebsite .card-light .card-arrow:after { + width: 2px; + height: 14px; + right: 6px; + transition: .2s all ease; +} +.bodywebsite .card-light .card-collapse { + position: relative; + margin-top: -1px; + border-bottom: 1px solid #dedede; + color: #9f9f9f; + will-change: transform; +} +.bodywebsite .card-light .card-body { + padding: 25px 44px 25px 32px; +} +@media (max-width: 767px) { + .bodywebsite .card-light .card-title a, + .bodywebsite .card-light .card-body { + padding-left: 15px; + } +} +.bodywebsite .card-corporate .card-title a, +.bodywebsite .card-corporate .card-collapse { + background: #fff; + box-shadow: -1px 0px 10px 0px rgba(65, 65, 65, 0.12); +} +.bodywebsite .card-corporate .card-collapse.in { + box-shadow: -1px 0 5px 0 rgba(65, 65, 65, 0.12); +} +.bodywebsite .card-corporate .card-collapse.in:before { + content: ''; + position: absolute; + top: -1px; + height: 1px; + background: #ededed; + left: 0; + width: 100%; +} +.bodywebsite .card-corporate .card-title a { + position: relative; + z-index: 1; + padding: 24px 82px 22px 32px; + font: 500 18px/24px "Roboto", Helvetica, Arial, sans-serif; + color: #000; + transition: 1.3s all ease; + letter-spacing: -0.025em; + border-radius: 6px 6px 0 0; +} +.bodywebsite .card-corporate .card-title a .card-arrow:after { + opacity: 0; + visibility: hidden; +} +.bodywebsite .card-corporate .card-title a.collapsed { + border-radius: 6px; +} +.bodywebsite .card-corporate .card-title a.collapsed .card-arrow { + border-radius: 0 6px 6px 0; +} +.bodywebsite .card-corporate .card-title a.collapsed .card-arrow:after { + opacity: 1; + visibility: visible; +} +.bodywebsite .card-corporate .card-arrow { + position: absolute; + top: 0; + bottom: 0; + right: 0; + z-index: 2; + width: 70px; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-radius: 0 6px 0 0; + transition: 1.3s all ease; +} +.bodywebsite .card-corporate .card-arrow:before, +.bodywebsite .card-corporate .card-arrow:after { + content: ''; + position: absolute; + top: 50%; + z-index: 4; + transform: translateY(-50%); + background: #fff; +} +.bodywebsite .card-corporate .card-arrow:before { + width: 14px; + height: 2px; + right: 28px; +} +.bodywebsite .card-corporate .card-arrow:after { + width: 2px; + height: 14px; + right: 34px; +} +.bodywebsite .card-corporate .card-collapse { + position: relative; + z-index: 2; + color: #9f9f9f; + border-radius: 0 0 6px 6px; +} +.bodywebsite .card-corporate .card-body { + padding: 25px 44px 25px 32px; +} +@media (max-width: 767px) { + .bodywebsite .card-corporate .card-title a, + .bodywebsite .card-corporate .card-body { + padding-left: 25px; + } +} +.bodywebsite .card-lg { + position: relative; + padding: 50px 15px; +} +.bodywebsite .card-lg:before { + content: ''; + position: absolute; + top: -45px; + left: 50%; + width: 55px; + height: 55px; + margin-left: -10px; + background: #fff; + transform: translateX(-50%) rotate(-45deg); +} +@media (min-width: 768px) { + .bodywebsite .card-lg { + padding: 90px 35px 100px; + } +} +.bodywebsite table { + background-color: transparent; +} +.bodywebsite caption { + padding-top: 17px 25px 18px; + padding-bottom: 17px 25px 18px; + color: #dedede; + text-align: left; +} +.bodywebsite th { + text-align: left; +} +.bodywebsite .table { + width: 100%; + max-width: 100%; + margin-bottom: 0; + color: #00030a; +} +.bodywebsite .table > thead > tr > th, +.bodywebsite .table > thead > tr > td, +.bodywebsite .table > tbody > tr > th, +.bodywebsite .table > tbody > tr > td, +.bodywebsite .table > tfoot > tr > th, +.bodywebsite .table > tfoot > tr > td { + line-height: 1.71429; + vertical-align: top; + border-top: 0; +} +.bodywebsite .table > tbody > tr > th, +.bodywebsite .table > tbody > tr > td, +.bodywebsite .table > tfoot > tr > th, +.bodywebsite .table > tfoot > tr > td { + padding: 17px 25px 18px; + line-height: 1.71429; + vertical-align: top; + border-bottom: 1px solid #d9d9d9; +} +.bodywebsite .table > thead > tr > th { + font-family: "Playfair Display", Helvetica, Arial, sans-serif; + font-size: 16px; + font-weight: 700; + padding: 26px 25px; + vertical-align: bottom; + background: #f6f7fa; + border-bottom: 0; +} +@media (min-width: 576px) { + .bodywebsite .table > thead > tr > th { + padding: 34px 25px 29px; + } +} +.bodywebsite .table > tfoot > tr > td { + font-weight: 700; +} +.bodywebsite .table > caption + thead > tr:first-child > th, +.bodywebsite .table > caption + thead > tr:first-child > td, +.bodywebsite .table > colgroup + thead > tr:first-child > th, +.bodywebsite .table > colgroup + thead > tr:first-child > td, +.bodywebsite .table > thead:first-child > tr:first-child > th, +.bodywebsite .table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.bodywebsite .table > tbody + tbody { + border-top: 0; +} +.bodywebsite .table .table { + background-color: #fff; +} +.bodywebsite .table-condensed > thead > tr > th, +.bodywebsite .table-condensed > thead > tr > td, +.bodywebsite .table-condensed > tbody > tr > th, +.bodywebsite .table-condensed > tbody > tr > td, +.bodywebsite .table-condensed > tfoot > tr > th, +.bodywebsite .table-condensed > tfoot > tr > td { + padding: 5px; +} +.bodywebsite .table-bordered { + border: 1px solid #d9d9d9; +} +.bodywebsite .table-bordered > thead > tr > th, +.bodywebsite .table-bordered > thead > tr > td, +.bodywebsite .table-bordered > tbody > tr > th, +.bodywebsite .table-bordered > tbody > tr > td, +.bodywebsite .table-bordered > tfoot > tr > th, +.bodywebsite .table-bordered > tfoot > tr > td { + border: 1px solid #d9d9d9; +} +.bodywebsite .table-bordered > thead > tr > th, +.bodywebsite .table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.bodywebsite .table-primary { + background: #fff; +} +.bodywebsite .table-primary thead > tr > th { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .table-striped > tbody > tr:nth-of-type(even) { + background-color: #f6f7fa; +} +.bodywebsite .table-striped > tbody > tr:nth-of-type(odd) { + background-color: #fff; +} +.bodywebsite .table-striped > tbody > tr > td { + border-bottom: 0; +} +.bodywebsite .table-hover > tbody > tr:hover { + background-color: #f6f7fa; +} +.bodywebsite table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} +.bodywebsite table td[class*="col-"], +.bodywebsite table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} +.bodywebsite .table-active, +.bodywebsite .table-active > th, +.bodywebsite .table-active > td { + background-color: #f6f7fa; +} +.bodywebsite .table-hover .table-active:hover { + background-color: #e6e8f1; +} +.bodywebsite .table-hover .table-active:hover > td, +.bodywebsite .table-hover .table-active:hover > th { + background-color: #e6e8f1; +} +.bodywebsite .table-success, +.bodywebsite .table-success > th, +.bodywebsite .table-success > td { + background-color: #dff0d8; +} +.bodywebsite .table-hover .table-success:hover { + background-color: #d0e9c6; +} +.bodywebsite .table-hover .table-success:hover > td, +.bodywebsite .table-hover .table-success:hover > th { + background-color: #d0e9c6; +} +.bodywebsite .table-info, +.bodywebsite .table-info > th, +.bodywebsite .table-info > td { + background-color: #d9edf7; +} +.bodywebsite .table-hover .table-info:hover { + background-color: #c4e3f3; +} +.bodywebsite .table-hover .table-info:hover > td, +.bodywebsite .table-hover .table-info:hover > th { + background-color: #c4e3f3; +} +.bodywebsite .table-warning, +.bodywebsite .table-warning > th, +.bodywebsite .table-warning > td { + background-color: #fcf8e3; +} +.bodywebsite .table-hover .table-warning:hover { + background-color: #faf2cc; +} +.bodywebsite .table-hover .table-warning:hover > td, +.bodywebsite .table-hover .table-warning:hover > th { + background-color: #faf2cc; +} +.bodywebsite .table-danger, +.bodywebsite .table-danger > th, +.bodywebsite .table-danger > td { + background-color: #fe4a21; +} +.bodywebsite .table-hover .table-danger:hover { + background-color: #fe3508; +} +.bodywebsite .table-hover .table-danger:hover > td, +.bodywebsite .table-hover .table-danger:hover > th { + background-color: #fe3508; +} +.bodywebsite .table-responsive { + overflow-x: auto; + min-height: 0.01%; +} +@media (max-width: 575px) { + .bodywebsite .table-responsive { + width: 100%; + margin-bottom: 1.28571; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #d9d9d9; + } + .bodywebsite .table-responsive > .table { + margin-bottom: 0; + } + .bodywebsite .table-responsive > .table > thead > tr > th, + .bodywebsite .table-responsive > .table > thead > tr > td, + .bodywebsite .table-responsive > .table > tbody > tr > th, + .bodywebsite .table-responsive > .table > tbody > tr > td, + .bodywebsite .table-responsive > .table > tfoot > tr > th, + .bodywebsite .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .bodywebsite .table-responsive > .table-bordered { + border: 0; + } + .bodywebsite .table-responsive > .table-bordered > thead > tr > th:first-child, + .bodywebsite .table-responsive > .table-bordered > thead > tr > td:first-child, + .bodywebsite .table-responsive > .table-bordered > tbody > tr > th:first-child, + .bodywebsite .table-responsive > .table-bordered > tbody > tr > td:first-child, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .bodywebsite .table-responsive > .table-bordered > thead > tr > th:last-child, + .bodywebsite .table-responsive > .table-bordered > thead > tr > td:last-child, + .bodywebsite .table-responsive > .table-bordered > tbody > tr > th:last-child, + .bodywebsite .table-responsive > .table-bordered > tbody > tr > td:last-child, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .bodywebsite .table-responsive > .table-bordered > tbody > tr:last-child > th, + .bodywebsite .table-responsive > .table-bordered > tbody > tr:last-child > td, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .bodywebsite .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +.bodywebsite .jumbotron-custom { + font-weight: 900; + font-size: 35px; + line-height: 1.2; + letter-spacing: .01em; +} +.bodywebsite .jumbotron-custom > span { + font-size: 31px; + line-height: 1.2; +} +@media (min-width: 768px) { + .bodywebsite .jumbotron-custom { + font-size: 45px; + } + .bodywebsite .jumbotron-custom > span { + font-size: 41px; + } +} +@media (min-width: 992px) { + .bodywebsite .jumbotron-custom { + font-size: 55px; + } + .bodywebsite .jumbotron-custom > span { + font-size: 51px; + } +} +@media (min-width: 1200px) { + .bodywebsite .jumbotron-custom { + font-size: 65px; + } + .bodywebsite .jumbotron-custom > span { + font-size: 61px; + } +} +.bodywebsite [class^="thin-icon-"]:before, +.bodywebsite [class*=" thin-icon-"]:before, +.bodywebsite .thin-ico { + font-family: "Thin Regular"; + font-weight: 400; + font-style: normal; + font-size: inherit; + text-transform: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.bodywebsite .thin-icon-volume-on:before { + content: '\e800'; +} +.bodywebsite .thin-icon-gift:before { + content: '\e801'; +} +.bodywebsite .thin-icon-cup:before { + content: '\e802'; +} +.bodywebsite .thin-icon-folder:before { + content: '\e803'; +} +.bodywebsite .thin-icon-dublicate:before { + content: '\e804'; +} +.bodywebsite .thin-icon-tag:before { + content: '\e805'; +} +.bodywebsite .thin-icon-chat:before { + content: '\e806'; +} +.bodywebsite .thin-icon-clock:before { + content: '\e807'; +} +.bodywebsite .thin-icon-microphone:before { + content: '\e808'; +} +.bodywebsite .thin-icon-map-marker:before { + content: '\e809'; +} +.bodywebsite .thin-icon-mobile:before { + content: '\e80a'; +} +.bodywebsite .thin-icon-cloud-charge:before { + content: '\e80b'; +} +.bodywebsite .thin-icon-resize:before { + content: '\e80c'; +} +.bodywebsite .thin-icon-cake:before { + content: '\e80d'; +} +.bodywebsite .thin-icon-case:before { + content: '\e80e'; +} +.bodywebsite .thin-icon-address:before { + content: '\e80f'; +} +.bodywebsite .thin-icon-phone-support:before { + content: '\e810'; +} +.bodywebsite .thin-icon-fullscreen:before { + content: '\e811'; +} +.bodywebsite .thin-icon-db:before { + content: '\e812'; +} +.bodywebsite .thin-icon-music:before { + content: '\e813'; +} +.bodywebsite .thin-icon-network:before { + content: '\e814'; +} +.bodywebsite .thin-icon-db-network:before { + content: '\e815'; +} +.bodywebsite .thin-icon-dropbox-upload:before { + content: '\e816'; +} +.bodywebsite .thin-icon-phone-call:before { + content: '\e817'; +} +.bodywebsite .thin-icon-briefcase-2:before { + content: '\e818'; +} +.bodywebsite .thin-icon-card:before { + content: '\e819'; +} +.bodywebsite .thin-icon-support:before { + content: '\e81a'; +} +.bodywebsite .thin-icon-pull:before { + content: '\e81b'; +} +.bodywebsite .thin-icon-desktop:before { + content: '\e81c'; +} +.bodywebsite .thin-icon-pass:before { + content: '\e81d'; +} +.bodywebsite .thin-icon-picture:before { + content: '\e81e'; +} +.bodywebsite .thin-icon-email:before { + content: '\e81f'; +} +.bodywebsite .thin-icon-push:before { + content: '\e820'; +} +.bodywebsite .thin-icon-house:before { + content: '\e821'; +} +.bodywebsite .thin-icon-download:before { + content: '\e822'; +} +.bodywebsite .thin-icon-storage:before { + content: '\e823'; +} +.bodywebsite .thin-icon-milk:before { + content: '\e824'; +} +.bodywebsite .thin-icon-external-right:before { + content: '\e825'; +} +.bodywebsite .thin-icon-email-open:before { + content: '\e826'; +} +.bodywebsite .thin-icon-planet:before { + content: '\e827'; +} +.bodywebsite .thin-icon-pointer:before { + content: '\e828'; +} +.bodywebsite .thin-icon-email-search:before { + content: '\e829'; +} +.bodywebsite .thin-icon-external-left:before { + content: '\e82a'; +} +.bodywebsite .thin-icon-shirt:before { + content: '\e82b'; +} +.bodywebsite .thin-icon-document-edit:before { + content: '\e82c'; +} +.bodywebsite .thin-icon-document-delete:before { + content: '\e82d'; +} +.bodywebsite .thin-icon-money:before { + content: '\e82e'; +} +.bodywebsite .thin-icon-eye:before { + content: '\e82f'; +} +.bodywebsite .thin-icon-settings:before { + content: '\e830'; +} +.bodywebsite .thin-icon-arrow-bottom-right:before { + content: '\e831'; +} +.bodywebsite .thin-icon-arrow-right:before { + content: '\e832'; +} +.bodywebsite .thin-icon-flag:before { + content: '\e833'; +} +.bodywebsite .thin-icon-star:before { + content: '\e834'; +} +.bodywebsite .thin-icon-calculator:before { + content: '\e835'; +} +.bodywebsite .thin-icon-safe:before { + content: '\e836'; +} +.bodywebsite .thin-icon-cart:before { + content: '\e837'; +} +.bodywebsite .thin-icon-bullhorn:before { + content: '\e838'; +} +.bodywebsite .thin-icon-anchor:before { + content: '\e839'; +} +.bodywebsite .thin-icon-globe:before { + content: '\e83a'; +} +.bodywebsite .thin-icon-statistics:before { + content: '\e83b'; +} +.bodywebsite .thin-icon-thumb-up:before { + content: '\e83c'; +} +.bodywebsite .thin-icon-headphones:before { + content: '\e83d'; +} +.bodywebsite .thin-icon-bell:before { + content: '\e83e'; +} +.bodywebsite .thin-icon-study:before { + content: '\e83f'; +} +.bodywebsite .thin-icon-cart-add:before { + content: '\e840'; +} +.bodywebsite .thin-icon-cart-delete:before { + content: '\e841'; +} +.bodywebsite .thin-icon-satelite:before { + content: '\e842'; +} +.bodywebsite .thin-icon-home:before { + content: '\e843'; +} +.bodywebsite .thin-icon-time:before { + content: '\e844'; +} +.bodywebsite .thin-icon-book:before { + content: '\e845'; +} +.bodywebsite .thin-icon-bookmark:before { + content: '\e846'; +} +.bodywebsite .thin-icon-key:before { + content: '\e847'; +} +.bodywebsite .thin-icon-timer:before { + content: '\e848'; +} +.bodywebsite .thin-icon-saturn:before { + content: '\e849'; +} +.bodywebsite .thin-icon-notes:before { + content: '\e84a'; +} +.bodywebsite .thin-icon-ambulance:before { + content: '\e84b'; +} +.bodywebsite .thin-icon-briefcase:before { + content: '\e84c'; +} +.bodywebsite .thin-icon-layers:before { + content: '\e84d'; +} +.bodywebsite .thin-icon-delivery:before { + content: '\e84e'; +} +.bodywebsite .thin-icon-tint:before { + content: '\e84f'; +} +.bodywebsite .thin-icon-trash:before { + content: '\e850'; +} +.bodywebsite .thin-icon-lightbulb:before { + content: '\e851'; +} +.bodywebsite .thin-icon-calendar:before { + content: '\e852'; +} +.bodywebsite .thin-icon-chart:before { + content: '\e853'; +} +.bodywebsite .thin-icon-documents:before { + content: '\e854'; +} +.bodywebsite .thin-icon-checklist:before { + content: '\e855'; +} +.bodywebsite .thin-icon-camera-web:before { + content: '\e856'; +} +.bodywebsite .thin-icon-camera:before { + content: '\e857'; +} +.bodywebsite .thin-icon-lock:before { + content: '\e858'; +} +.bodywebsite .thin-icon-umbrella:before { + content: '\e859'; +} +.bodywebsite .thin-icon-user:before { + content: '\e85a'; +} +.bodywebsite .thin-icon-love:before { + content: '\e85b'; +} +.bodywebsite .thin-icon-hanger:before { + content: '\e85c'; +} +.bodywebsite .thin-icon-car:before { + content: '\e85d'; +} +.bodywebsite .thin-icon-cloth:before { + content: '\e85e'; +} +.bodywebsite .thin-icon-box:before { + content: '\e85f'; +} +.bodywebsite .thin-icon-attachment:before { + content: '\e860'; +} +.bodywebsite .thin-icon-cd:before { + content: '\e861'; +} +.bodywebsite .thin-icon-love-broken:before { + content: '\e862'; +} +.bodywebsite .thin-icon-volume-off:before { + content: '\e863'; +} +.bodywebsite .slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} +.bodywebsite .counter { + font: 900 45px/45px "Roboto", Helvetica, Arial, sans-serif; + margin-bottom: 0; + color: #fff; +} +.bodywebsite .counter-bold { + font-weight: 700; +} +.bodywebsite .counter-k:after { + content: 'k'; +} +.bodywebsite * + .counter-title { + margin-top: 0; +} +.bodywebsite .countdown-default { + color: #000; +} +.bodywebsite .countdown-default .countdown-section { + position: relative; + display: inline-block; + min-width: 90px; + padding: 0 10px; + text-align: center; +} +.bodywebsite .countdown-default .countdown-section > * { + display: block; +} +.bodywebsite .countdown-default .countdown-section:after { + position: absolute; + top: 35%; + transform: translateY(-35%); + border-radius: 20px; + background: #000; +} +.bodywebsite .countdown-default .countdown-section:nth-last-child(n + 3):after { + content: ''; + right: -2px; + width: 5px; + height: 5px; +} +@media (max-width: 767px) { + .bodywebsite .countdown-default .countdown-section:last-child { + display: none; + } +} +.bodywebsite .countdown-default .countdown-amount { + font-family: Helvetica, Arial, sans-serif; + font-size: 30px; + font-weight: 900; + line-height: 1; +} +.bodywebsite .countdown-default .countdown-period { + margin-top: 10px; + font-size: 12px; + text-transform: uppercase; + letter-spacing: -0.025em; + color: rgba(0, 0, 0, 0.4); +} +.bodywebsite .countdown-default.countdown-inverse .countdown-section:after { + background: #fff; +} +.bodywebsite .countdown-default.countdown-inverse .countdown-period { + color: rgba(255, 255, 255, 0.4); +} +@media (min-width: 768px) { + .bodywebsite .countdown-default .countdown-section { + min-width: 150px; + } + .bodywebsite .countdown-default .countdown-section:not(:last-child):after { + content: ''; + top: 50%; + right: -5px; + transform: translateY(-50%); + width: 10px; + height: 10px; + } + .bodywebsite .countdown-default .countdown-amount { + font-size: 50px; + } + .bodywebsite .countdown-default .countdown-period { + font-size: 14px; + } +} +@media (min-width: 992px) { + .bodywebsite .countdown-default .countdown-section { + min-width: 200px; + } + .bodywebsite .countdown-default .countdown-amount { + font-size: 72px; + } +} +.bodywebsite .countdown-inverse { + color: #fff; +} +.bodywebsite .owl-carousel .animated { + -webkit-animation-duration: 1000ms; + animation-duration: 1000ms; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} +.bodywebsite .owl-carousel .owl-animated-in { + z-index: 0; +} +.bodywebsite .owl-carousel .owl-animated-out { + z-index: 1; +} +.bodywebsite .owl-carousel .fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} +@-webkit-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +.bodywebsite .owl-height { + -webkit-transition: height 500ms ease-in-out; + -moz-transition: height 500ms ease-in-out; + -ms-transition: height 500ms ease-in-out; + -o-transition: height 500ms ease-in-out; + transition: height 500ms ease-in-out; +} +.bodywebsite .owl-carousel { + display: none; + width: 100%; + -webkit-tap-highlight-color: transparent; + /* position relative and z-index fix webkit rendering fonts issue */ + position: relative; + z-index: 1; +} +.bodywebsite .owl-carousel .owl-stage { + position: relative; + -ms-touch-action: pan-Y; +} +.bodywebsite .owl-carousel .owl-stage:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} +.bodywebsite .owl-carousel .owl-stage-outer { + position: relative; + overflow: hidden; + /* fix for flashing background */ + -webkit-transform: translate3d(0px, 0px, 0px); +} +.bodywebsite .owl-carousel .owl-controls .owl-nav .owl-prev, +.bodywebsite .owl-carousel .owl-controls .owl-nav .owl-next, +.bodywebsite .owl-carousel .owl-controls .owl-dot { + cursor: pointer; + cursor: hand; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.bodywebsite .owl-carousel.owl-loaded { + display: block; +} +.bodywebsite .owl-carousel.owl-loading { + opacity: 0; + display: block; +} +.bodywebsite .owl-carousel.owl-hidden { + opacity: 0; +} +.bodywebsite .owl-carousel .owl-refresh .owl-item { + display: none; +} +.bodywebsite .owl-carousel .owl-item { + position: relative; + min-height: 1px; + float: left; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.bodywebsite .owl-carousel.owl-text-select-on .owl-item { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.bodywebsite .owl-carousel .owl-grab { + cursor: move; + cursor: -webkit-grab; + cursor: grab; +} +.bodywebsite .owl-carousel.owl-rtl { + direction: rtl; +} +.bodywebsite .owl-carousel.owl-rtl .owl-item { + float: right; +} +.bodywebsite .no-js .owl-carousel { + display: block; +} +.bodywebsite .owl-carousel .owl-item .owl-lazy { + opacity: 0; + -webkit-transition: opacity 400ms ease; + -moz-transition: opacity 400ms ease; + -ms-transition: opacity 400ms ease; + -o-transition: opacity 400ms ease; + transition: opacity 400ms ease; +} +.bodywebsite .owl-carousel .owl-video-wrapper { + position: relative; + height: 100%; + background: #000; +} +.bodywebsite .owl-carousel .owl-video-play-icon { + position: absolute; + height: 80px; + width: 80px; + left: 50%; + top: 50%; + margin-left: -40px; + margin-top: -40px; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + cursor: pointer; + z-index: 1; + -webkit-transition: scale 100ms ease; + -moz-transition: scale 100ms ease; + -ms-transition: scale 100ms ease; + -o-transition: scale 100ms ease; + transition: scale 100ms ease; +} +.bodywebsite .owl-carousel .owl-video-play-icon:before { + content: '\f144'; +} +.bodywebsite .owl-carousel .owl-video-play-icon:hover { + -webkit-transform: scale(1.3); + transform: scale(1.3); +} +.bodywebsite .owl-carousel .owl-video-playing .owl-video-tn, +.bodywebsite .owl-carousel .owl-video-playing .owl-video-play-icon { + display: none; +} +.bodywebsite .owl-carousel .owl-video-tn { + opacity: 0; + height: 100%; + background-position: center center; + background-repeat: no-repeat; + -webkit-background-size: contain; + -moz-background-size: contain; + -o-background-size: contain; + background-size: contain; + -webkit-transition: opacity 400ms ease; + -moz-transition: opacity 400ms ease; + -ms-transition: opacity 400ms ease; + -o-transition: opacity 400ms ease; + transition: opacity 400ms ease; +} +.bodywebsite .owl-carousel .owl-video-frame { + position: relative; + z-index: 1; +} +.bodywebsite .owl-carousel .owl-stage { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +.bodywebsite .owl-carousel .owl-item { + float: none; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +.bodywebsite .owl-carousel .item { + width: 100%; +} +.bodywebsite .owl-carousel-center .owl-item { + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.bodywebsite .owl-carousel-center .owl-stage { + -webkit-justify-content: space-around; + -ms-flex-pack: distribute; + justify-content: space-around; +} +.bodywebsite .owl-prev, +.bodywebsite .owl-next { + position: absolute; + top: 50%; + transform: translateY(-50%); + color: #000; + transition: .22s; +} +.bodywebsite .owl-prev.disabled, +.bodywebsite .owl-next.disabled { + opacity: 0; +} +.bodywebsite .owl-prev:hover, +.bodywebsite .owl-next:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .owl-prev { + left: 0; +} +.bodywebsite .owl-prev:before { + content: '\e5c4'; +} +.bodywebsite .owl-next { + right: 0; +} +.bodywebsite .owl-next:before { + content: '\e5c8'; +} +.bodywebsite .owl-dots { + text-align: center; +} +.bodywebsite .owl-dot { + display: inline-block; +} +.bodywebsite .owl-numbering-default { + padding-bottom: 15px; +} +.bodywebsite .owl-numbering-default > * { + display: inline-block; +} +.bodywebsite .owl-numbering-default .numbering-current { + min-width: 16px; + font: 700 25px "Roboto", Helvetica, Arial, sans-serif; + color: #000; + transition: .33s all ease; +} +.bodywebsite .owl-numbering-default .numbering-separator { + position: relative; + display: inline-block; + margin: 0 10px; +} +.bodywebsite .owl-numbering-default .numbering-separator:after { + position: absolute; + top: -23px; + left: -12px; + content: ''; + width: 2px; + height: 51px; + transform-origin: 50% 75%; + transform: rotate(30deg); + background: rgba(0, 0, 0, 0.3); +} +.bodywebsite .owl-numbering-default .numbering-count { + position: relative; + top: 19px; + left: -7px; + font: 400 18px "Roboto", Helvetica, Arial, sans-serif; + color: rgba(0, 0, 0, 0.3); +} +.bodywebsite .owl-carousel-inverse .owl-next, +.bodywebsite .owl-carousel-inverse .owl-prev { + color: #fff; +} +.bodywebsite .owl-carousel-inverse .owl-next:hover, +.bodywebsite .owl-carousel-inverse .owl-prev:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .owl-carousel-inverse .owl-numbering-default .numbering-current { + color: #fff; +} +.bodywebsite .owl-carousel-inverse .owl-numbering-default .numbering-separator:after { + background: rgba(255, 255, 255, 0.3); +} +.bodywebsite .owl-carousel-inverse .owl-numbering-default .numbering-count { + color: rgba(255, 255, 255, 0.3); +} +.bodywebsite .owl-carousel-dark .owl-next, +.bodywebsite .owl-carousel-dark .owl-prev { + color: #000; +} +.bodywebsite .owl-carousel-dark .owl-next:hover, +.bodywebsite .owl-carousel-dark .owl-prev:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .owl-nav-position-numbering .owl-next, +.bodywebsite .owl-nav-position-numbering .owl-prev { + top: auto; + bottom: -53px; + transform: none; +} +.bodywebsite .owl-nav-position-numbering .owl-prev { + left: auto; + right: calc(92%); +} +.bodywebsite .owl-nav-position-numbering .owl-next { + right: auto; + left: calc(92%); +} +.bodywebsite .owl-nav-position-numbering + .owl-numbering { + margin-top: 15px; +} +.bodywebsite .owl-nav-bottom-left .owl-nav { + margin-top: 15px; +} +.bodywebsite .owl-nav-bottom-left .owl-next, +.bodywebsite .owl-nav-bottom-left .owl-prev { + display: inline-block; + position: static; + top: auto; + transform: none; +} +.bodywebsite .owl-nav-bottom-left .owl-prev { + left: auto; +} +.bodywebsite .owl-nav-bottom-left .owl-next { + right: auto; + margin-left: 10px; +} +.bodywebsite .owl-style-minimal .item { + width: 100%; +} +.bodywebsite .owl-style-minimal .item img { + width: 100%; +} +.bodywebsite .owl-style-minimal .owl-dots { + margin-top: 10px; + text-align: center; +} +.bodywebsite .owl-style-minimal .owl-dot { + width: 8px; + height: 8px; + border-radius: 10px; + background: #dedede; + transition: .33s all ease; +} +.bodywebsite .owl-style-minimal .owl-dot.active, +.bodywebsite .owl-style-minimal .owl-dot:hover { + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .owl-style-minimal .owl-dot + .owl-dot { + margin-left: 8px; +} +.bodywebsite .owl-style-minimal-inverse .owl-dot { + background: #74787C; +} +@media (min-width: 992px) { + .bodywebsite .owl-spacing-1 { + padding-right: 60px; + padding-left: 60px; + } +} +@media (min-width: 1200px) { + .bodywebsite .owl-spacing-1 { + padding: 0; + } + .bodywebsite .owl-spacing-1 .owl-item { + padding-right: 41px; + padding-left: 41px; + } + .bodywebsite .owl-spacing-1 .owl-prev { + left: -6%; + } + .bodywebsite .owl-spacing-1 .owl-next { + right: -6%; + } +} +.bodywebsite .owl-nav-classic .owl-nav { + display: none; +} +@media (min-width: 992px) { + .bodywebsite .owl-nav-classic .owl-dots { + display: none !important; + } + .bodywebsite .owl-nav-classic .owl-nav { + display: block; + } + .bodywebsite .owl-nav-classic .owl-nav .owl-prev, + .bodywebsite .owl-nav-classic .owl-nav .owl-next { + top: 39%; + transform: translateY(-45%); + width: 45px; + height: 45px; + line-height: 45px; + color: #fff; + background: rgba(255, 255, 255, 0.2); + text-align: center; + font: 400 20px/45px 'fl-flat-icons-set-2'; + } + .bodywebsite .owl-nav-classic .owl-nav .owl-prev:hover, + .bodywebsite .owl-nav-classic .owl-nav .owl-next:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + } + .bodywebsite .owl-nav-classic .owl-nav .owl-prev { + padding-right: 3px; + } + .bodywebsite .owl-nav-classic .owl-nav .owl-prev:before { + position: relative; + display: inline-block; + content: '\e015'; + transform: scale(-1, 1); + } + .bodywebsite .owl-nav-classic .owl-nav .owl-next { + padding-left: 3px; + } + .bodywebsite .owl-nav-classic .owl-nav .owl-next:before { + content: '\e015'; + } +} +.bodywebsite .owl-nav-modern .owl-nav { + display: none; +} +@media (min-width: 1400px) { + .bodywebsite .owl-nav-modern .owl-dots { + display: none !important; + } + .bodywebsite .owl-nav-modern .owl-nav { + display: block; + } + .bodywebsite .owl-nav-modern .owl-nav .owl-prev:before, + .bodywebsite .owl-nav-modern .owl-nav .owl-next:before { + content: ''; + } + .bodywebsite .owl-nav-modern .owl-nav .owl-prev:hover, + .bodywebsite .owl-nav-modern .owl-nav .owl-next:hover { + opacity: 0.5; + } + .bodywebsite .owl-nav-modern .owl-nav .owl-prev { + left: -58px; + } + .bodywebsite .owl-nav-modern .owl-nav .owl-next { + right: -50px; + } + .bodywebsite .owl-nav-modern .owl-nav .owl-next { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); + } +} +@-webkit-keyframes rd-navbar-slide-down { + 0% { + transform: translateY(-100%); + } + 100% { + transform: translateY(0); + } +} + +.rd-navbar-group.rd-navbar-search-wrap.toggle-original-elements.active { + overflow: hidden; +} + +.bodywebsite .rd-navbar-wrap, +.bodywebsite .rd-navbar-static .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu, +.bodywebsite .rd-navbar-static .rd-navbar-inner, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-wrap, +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu, +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-group, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-group, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search { + transition: 0.3s all cubic-bezier(0.785, 0.135, 0.15, 0.86); +} +.bodywebsite .rd-navbar, +.bodywebsite .rd-navbar.rd-navbar--is-clone { + display: none; +} +.bodywebsite .rd-navbar-fixed, +.bodywebsite .rd-navbar-static, +.bodywebsite .rd-navbar-fullwidth, +.bodywebsite .rd-navbar-sidebar { + display: block; +} +.bodywebsite .rd-navbar--no-transition, +.bodywebsite .rd-navbar--no-transition * { + transition: none !important; +} +.bodywebsite .rd-navbar-wrap { + position: relative; + z-index: 10; +} +.bodywebsite .rd-navbar-wrap, +.bodywebsite .rd-navbar, +.bodywebsite .rd-navbar-brand, +.bodywebsite .rd-navbar-slogan, +.bodywebsite .rd-navbar-dropdown, +.bodywebsite .rd-navbar-megamenu, +.bodywebsite .rd-navbar-collapse-items, +.bodywebsite .brand-name, +.bodywebsite .rd-navbar-nav, +.bodywebsite .rd-navbar-panel, +.bodywebsite .rd-navbar-search-form-input, +.bodywebsite .rd-navbar-search-form-submit, +.bodywebsite .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-live-search-results, +.bodywebsite .rd-navbar-search-form { + transition: 0.33s all ease-out; +} +.bodywebsite .rd-navbar-collapse-toggle { + display: inline-block; + position: relative; + width: 48px; + height: 48px; + line-height: 48px; + cursor: pointer; + color: #00030a; + display: none; +} +.bodywebsite .rd-navbar-collapse-toggle span { + top: 50%; + margin-top: -3px; +} +.bodywebsite .rd-navbar-collapse-toggle span, +.bodywebsite .rd-navbar-collapse-toggle span:before, +.bodywebsite .rd-navbar-collapse-toggle span:after { + position: absolute; + width: 6px; + height: 6px; + line-height: 6px; + text-align: center; + background: #00030a; + left: 50%; + margin-left: -3px; + border-radius: 50%; + transition: .3s all ease; +} +.bodywebsite .rd-navbar-collapse-toggle span:before, +.bodywebsite .rd-navbar-collapse-toggle span:after { + content: ''; +} +.bodywebsite .rd-navbar-collapse-toggle span:before { + bottom: 100%; + margin-bottom: 3px; +} +.bodywebsite .rd-navbar-collapse-toggle span:after { + top: 100%; + margin-top: 3px; +} +.bodywebsite .rd-navbar-collapse-toggle.active span { + transform: scale(0.7); +} +.bodywebsite .rd-navbar-collapse-toggle.active span:before { + transform: translateY(18px); +} +.bodywebsite .rd-navbar-collapse-toggle.active span:after { + transform: translateY(-18px); +} +.bodywebsite .rd-navbar--has-sidebar body { + padding-left: 270px; +} +.bodywebsite .rd-navbar--is-stuck { + border-bottom: 1px solid #e5e7e9; +} +.bodywebsite .rd-navbar.rd-navbar-fixed + .rd-navbar.rd-navbar--is-clone, +.bodywebsite .rd-navbar.rd-navbar-sidebar + .rd-navbar.rd-navbar--is-clone { + display: none; +} +.bodywebsite .rd-navbar { + display: none; + background: #fff; + box-shadow: none; +} +.bodywebsite .rd-navbar-toggle { + display: inline-block; + position: relative; + width: 48px; + height: 48px; + line-height: 48px; + cursor: pointer; + color: #000; + background-color: transparent; + border: none; + display: none; +} +.bodywebsite .rd-navbar-toggle span { + position: relative; + display: block; + margin: auto; + transition: .3s all ease; +} +.bodywebsite .rd-navbar-toggle span:after, +.bodywebsite .rd-navbar-toggle span:before { + content: ""; + position: absolute; + left: 0; + top: -8px; + transition: .3s all ease; +} +.bodywebsite .rd-navbar-toggle span:after { + top: 8px; +} +.bodywebsite .rd-navbar-toggle span:after, +.bodywebsite .rd-navbar-toggle span:before, +.bodywebsite .rd-navbar-toggle span { + width: 24px; + height: 4px; + background-color: #000; + backface-visibility: hidden; + border-radius: 2px; +} +.bodywebsite .rd-navbar-toggle span { + transform: rotate(180deg); +} +.bodywebsite .rd-navbar-toggle span:before, +.bodywebsite .rd-navbar-toggle span:after { + transform-origin: 1.71429px center; +} +.bodywebsite .rd-navbar-toggle.active span { + transform: rotate(360deg); +} +.bodywebsite .rd-navbar-toggle.active span:before, +.bodywebsite .rd-navbar-toggle.active span:after { + top: 0; + width: 15px; +} +.bodywebsite .rd-navbar-toggle.active span:before { + -webkit-transform: rotate3d(0, 0, 1, -40deg); + transform: rotate3d(0, 0, 1, -40deg); +} +.bodywebsite .rd-navbar-toggle.active span:after { + -webkit-transform: rotate3d(0, 0, 1, 40deg); + transform: rotate3d(0, 0, 1, 40deg); +} +.bodywebsite .rd-navbar-toggle:focus { + outline: none; +} +.bodywebsite .rd-navbar-brand { + transition: none !important; +} +.bodywebsite .rd-navbar-brand svg { + fill: #000; +} +.bodywebsite .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-search .rd-search-submit, +.bodywebsite .buttonwithnoborder { + background: none; + border: none; + display: inline-block; + padding: 0; + outline: none; + outline-offset: 0; + cursor: pointer; + -webkit-appearance: none; +} +.bodywebsite .rd-navbar-search .rd-navbar-search-toggle::-moz-focus-inner, +.bodywebsite .rd-navbar-search .rd-search-submit::-moz-focus-inner { + border: none; + padding: 0; +} +.bodywebsite .rd-navbar-search .form-input::-ms-clear { + display: none; +} +.bodywebsite .rd-navbar-search-toggle { + display: inline-block; + width: 36px; + height: 36px; + text-align: center; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; +} +.bodywebsite .rd-navbar-search-toggle:before { + content: '\f002'; + position: absolute; + left: 0; + top: 0; +} +.bodywebsite .rd-navbar-search-toggle:after { + display: none; +} +.bodywebsite .rd-navbar-aside { + pointer-events: none; +} +.bodywebsite .rd-navbar-aside > * { + pointer-events: auto; +} +.bodywebsite .rd-navbar-aside-toggle { + display: none; + pointer-events: auto; +} +.bodywebsite .rd-navbar-static .rd-navbar-search-form-input input, +.bodywebsite .rd-navbar-sidebar .rd-navbar-search-form-input input, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-search-form-input input { + width: 100%; + padding: 0 10px; + font-size: 16px; +} +.bodywebsite .rd-navbar-static:after, +.bodywebsite .rd-navbar-fullwidth:after { + content: ''; + background: #fff; +} +.bodywebsite .rd-navbar-static .rd-navbar-brand, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-brand, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-search-toggle { + position: relative; + z-index: 2; +} +.bodywebsite .rd-navbar-static .rd-navbar-inner, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-inner { + position: relative; + max-width: 1200px; + padding-left: 15px; + padding-right: 15px; + margin-left: auto; + margin-right: auto; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a { + position: relative; + padding: 5px 0; + font-size: 13px; + line-height: 1.2; + color: #00030a; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > a .label, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a .label { + position: absolute; + left: 0; + margin: -18px 0 0 0; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-static .rd-navbar-nav > li > a, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a { + font-size: 14px; + } +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li.active > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li.active > a { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li.focus > a, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li.focus > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav .rd-navbar-submenu > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav .rd-navbar-submenu > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav .rd-navbar-submenu > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav .rd-navbar-submenu > .rd-navbar-megamenu { + opacity: 0; + visibility: hidden; + font-size: 14px; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav .rd-navbar-submenu.focus, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav .rd-navbar-submenu.focus { + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu > .rd-navbar-megamenu { + transform: translateY(30px); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu.opened > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu.focus > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu.opened > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu.focus > .rd-navbar-megamenu { + transform: translateY(0); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu > .rd-navbar-dropdown { + transform: translateX(-20px); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.opened > .rd-navbar-dropdown { + transform: translateX(0); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > .rd-navbar-submenu .rd-navbar-submenu.opened > .rd-navbar-dropdown { + display: block; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li { + display: inline-block; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav li.rd-navbar--has-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav li.rd-navbar--has-dropdown { + position: relative; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav li.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav li.focus > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-static .rd-navbar-nav li.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-nav li.opened > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav li.focus > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav li.focus > .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav li.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav li.opened > .rd-navbar-megamenu { + opacity: 1; + visibility: visible; + transform: translateY(0); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > .rd-navbar-dropdown { + position: absolute; + left: 0; + z-index: 5; + display: block; + margin-top: 27px; + text-align: left; + background: #fff; +} +.bodywebsite .rd-navbar-static .rd-navbar-list li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list li { + padding-left: 5px; + padding-right: 5px; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a { + position: relative; + display: block; + width: 100%; + padding-left: 0; + padding-right: 14px; + font-size: 14px; + line-height: 1.3; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:before, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:before { + transition: .33s all ease; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:before, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:before { + position: absolute; + top: 0; + left: -6px; + content: '\f105'; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + line-height: inherit; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:hover, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:hover { + padding-left: 14px; + padding-right: 0; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:hover:before, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:hover:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:hover:before, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:hover:before { + left: 0; + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:focus, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:active, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:focus, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:active, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:focus, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:active, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:focus, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:active { + color: #9f9f9f; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:hover, +.bodywebsite .rd-navbar-static .rd-navbar-list > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li + li, +.bodywebsite .rd-navbar-static .rd-navbar-list > li + li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li + li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li + li { + margin-top: 14px; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, + .bodywebsite .rd-navbar-static .rd-navbar-list > li > a, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li > a { + font-size: 16px; + } +} +@media (min-width: 1800px) { + .bodywebsite .rd-navbar-static .rd-navbar-dropdown > li + li, + .bodywebsite .rd-navbar-static .rd-navbar-list > li + li, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li + li, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-list > li + li { + margin-top: 17px; + } +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown, +.bodywebsite .rd-navbar-static .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu { + box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.13); + border-top: 2px solid maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown { + width: 188px; + padding: 25px 25px 30px; + margin-left: -32px; + background: #fff; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-static .rd-navbar-dropdown, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown { + width: 235px; + } +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown .rd-navbar-dropdown { + position: absolute; + left: 100%; + margin-left: 91px; + top: -20px; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a { + display: block; + width: 100%; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:focus, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:active, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:focus, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:active { + color: #9f9f9f; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li.focus > a, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li.opened > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li.focus > a, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li.opened > a { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu { + position: absolute; + z-index: 4; + display: table; + table-layout: fixed; + width: calc(70%); + left: 15px; + max-width: 1200px; + margin-top: 27px; + text-align: left; + background: #fff; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu > li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu > li { + position: relative; + display: table-cell; + padding: 34px 20px 30px 35px; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu > li + li, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu > li + li { + border-left: 1px solid #ededed; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu * + .rd-megamenu-header, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu * + .rd-megamenu-header { + margin-top: 40px; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu * + .rd-navbar-list, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu * + .rd-navbar-list { + margin-top: 20px; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-static .rd-navbar-megamenu, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu { + width: 1140px; + } + .bodywebsite .rd-navbar-static .rd-navbar-megamenu > li, + .bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu > li { + padding: 44px 25px 50px 45px; + } +} +.bodywebsite .rd-navbar-static .rd-navbar-submenu-toggle, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-submenu-toggle { + display: none; + cursor: pointer; + z-index: 100; +} +.bodywebsite .rd-navbar-static .rd-navbar-submenu-toggle:hover, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-submenu-toggle:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > .rd-navbar-submenu-toggle, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > .rd-navbar-submenu-toggle { + display: none; + -webkit-align-self: center; + -ms-flex-item-align: center; + align-self: center; + width: 24px; + text-align: center; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > .rd-navbar-submenu-toggle::after { + content: '\f107'; + position: relative; + display: inline-block; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + text-align: center; + transition: 0.4s all ease; + z-index: 2; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + will-change: transform; + -webkit-filter: blur(0); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li li > a:hover + .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li li > a:hover + .rd-navbar-submenu-toggle::after { + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-nav > li > a:hover + .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li > a:hover + .rd-navbar-submenu-toggle::after { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown .rd-navbar-submenu-toggle, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown .rd-navbar-submenu-toggle { + display: none; + vertical-align: middle; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown .rd-navbar-submenu-toggle::after { + top: 1px; +} +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-static .rd-navbar-dropdown > li > a:hover + .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li.opened > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-dropdown > li > a:hover + .rd-navbar-submenu-toggle::after { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-clone { + display: none; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone.rd-navbar--is-stuck, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-clone.rd-navbar--is-stuck { + display: block; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-stuck, +.bodywebsite .rd-navbar-static.rd-navbar--is-clone, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-stuck, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-clone { + position: fixed; + left: 0; + top: 0; + right: 0; + z-index: 999; + background: #fff; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-stuck .rd-navbar-megamenu, +.bodywebsite .rd-navbar-static.rd-navbar--is-clone .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-stuck .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-clone .rd-navbar-megamenu { + margin-top: 18px; +} +.bodywebsite .rd-navbar-static .rd-navbar-megamenu, +.bodywebsite .rd-navbar-fullwidth .rd-navbar-megamenu { + position: absolute; + transform: translateY(30px); + text-align: left; + visibility: hidden; + opacity: 0; +} +.bodywebsite .rd-navbar-static .rd-navbar--has-dropdown, +.bodywebsite .rd-navbar-fullwidth .rd-navbar--has-dropdown { + position: relative; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-toggle, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-toggle { + display: inline-block; + z-index: 9999; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-dropdown, +.bodywebsite .rd-navbar-sidebar .rd-navbar-dropdown { + display: block; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items { + position: absolute; + width: 260px; + padding: 25px 15px; + box-shadow: none; + color: #00030a; + background: #fff; + font-size: 16px; + line-height: 34px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items li > *, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items li > * { + vertical-align: middle; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items li + li, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items li + li { + margin-top: 10px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items .icon, +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items a, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items .icon, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items a { + display: inline-block; + font-size: 16px; + line-height: 30px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items .icon, +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse-items a[class*="fa"]:before, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items .icon, +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items a[class*="fa"]:before { + display: inline-block; + width: 30px; + height: 30px; + padding-right: 5px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav, +.bodywebsite .rd-navbar-sidebar { + width: 270px; + left: 0; + top: 0; + font-size: 16px; + line-height: 34px; + color: #00030a; + background: #fff; + z-index: 998; +} +.bodywebsite .rd-navbar-static-smooth .rd-navbar { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 9999; +} +.bodywebsite .rd-navbar-static { + display: block; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li { + display: inline-block; +} +.bodywebsite .rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 10px; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search { + position: static; + z-index: 2; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search .rd-search, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search .rd-search { + position: absolute; + top: -1px; + right: 4px; + bottom: 0; + left: 0; + z-index: 5; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search .rd-search-submit, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search .rd-search-submit { + width: 39px; + height: 39px; + line-height: 38px; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search .rd-search-results-live, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search .rd-search-results-live { + padding: 0; + border: 0; + background: #fff; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search .rd-search-results-live > *, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search .rd-search-results-live > * { + display: none; + padding: 16px; + border: 1px solid #e5e7e9; + border-top: 0; + border-radius: 0 0 3px 3px; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search .form-label, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search .form-label { + border: 0; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search.active .rd-search, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search.active .rd-search { + opacity: 1; + visibility: visible; + transition: .22s; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search.active .rd-search-results-live > *, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search.active .rd-search-results-live > * { + display: block; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search-wrap.active .rd-navbar-nav-inner, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search-wrap.active .rd-navbar-nav-inner { + position: relative; +} +.bodywebsite .rd-navbar-static.rd-navbar-default .rd-navbar-search.active + .rd-navbar-nav, +.bodywebsite .rd-navbar-static.rd-navbar-corporate-dark .rd-navbar-search.active + .rd-navbar-nav { + opacity: 0; + visibility: hidden; + pointer-events: none; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone { + display: block; + transform: translateY(-105%); + transition: .33s all ease; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone.rd-navbar--is-stuck { + transform: translateY(0); +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone .rd-navbar-inner, +.bodywebsite .rd-navbar-static.rd-navbar--is-stuck .rd-navbar-inner { + padding: 13px 30px; +} +.bodywebsite .rd-navbar-static.rd-navbar--is-clone .rd-navbar-nav-wrap, +.bodywebsite .rd-navbar-static.rd-navbar--is-stuck .rd-navbar-nav-wrap { + margin-top: 0; +} +.bodywebsite .rd-navbar-fullwidth { + display: block; + text-align: center; +} +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav { + width: 100%; +} +.bodywebsite .rd-navbar-fullwidth .rd-navbar-nav > li + li { + margin-left: 20px; +} +.bodywebsite .rd-navbar-fullwidth.rd-navbar--is-stuck .rd-navbar-panel { + display: none; +} +.bodywebsite .rd-navbar-fixed { + display: block; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-brand { + /*position: fixed; */ + top: 10px; + left: 64px; + z-index: 17; + display: block; + overflow: hidden; + text-align: left; + white-space: nowrap; + text-overflow: ellipsis; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-brand .brand-slogan { + display: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-panel { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + /* position: fixed; */ + left: 0; + top: 0; + right: 0; + padding: 4px; + height: 56px; + color: #9f9f9f; + z-index: 999; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-panel:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + box-shadow: none; + border-bottom: 1px solid #e5e7e9; + background: #fff; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-toggle { + display: inline-block; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-wrap { + position: fixed; + top: 56px; + left: 0; + bottom: -56px; + z-index: 998; + width: 270px; + padding: 0 0 56px; + color: #fff; + background: #fff; + border-right: 1px solid #e5e7e9; + transform: translateX(-105%); + pointer-events: none; + overflow: hidden; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-wrap.active { + transform: translateX(0); +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-inner { + position: relative; + z-index: 100000; + height: 100%; + padding: 10px 0 20px; + pointer-events: auto; + -webkit-overflow-scrolling: touch; + overflow-x: hidden; + overflow-y: auto; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-inner::-webkit-scrollbar { + width: 4px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-inner::-webkit-scrollbar-thumb { + background: white; + border: none; + border-radius: 0; + opacity: .2; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav-inner::-webkit-scrollbar-track { + background: #fff; + border: none; + border-radius: 0; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav { + display: block; + font-size: 16px; + line-height: 26px; + text-align: left; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li > a { + display: block; + font-size: 16px; + padding: 14px 56px 14px 16px; + color: #464a4d; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li:hover > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li:hover > a:hover, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.focus > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.focus > a:hover, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.active > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.active > a:hover, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > a:hover { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li:hover > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.focus > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.active > .rd-navbar-submenu-toggle::after, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > .rd-navbar-submenu-toggle::after { + color: #fff; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav > li + li { + margin-top: 4px; +} +.bodywebsite .rd-navbar-fixed .label-custom { + position: relative; + top: -1px; + display: inline-block; + margin: 0 0 0 8px; + font-size: 60%; + line-height: 1; + padding: 6px .5em 5px; + vertical-align: middle; +} +.bodywebsite .iphone .rd-navbar-fixed .label-custom, +.bodywebsite .ipad .rd-navbar-fixed .label-custom, +.bodywebsite .mac .rd-navbar-fixed .label-custom { + padding: 6px .5em 4px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-dropdown > li > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-list > li > a { + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-size: 12px; + line-height: 1.2; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-megamenu .rd-megamenu-header { + padding: 0 15px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-megamenu > li { + padding-top: 15px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-megamenu * + .rd-megamenu-header { + margin-top: 15px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-megamenu * + .rd-navbar-list { + margin-top: 10px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fixed .rd-navbar-megamenu { + display: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu { + position: relative; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu li > a { + font-size: 14px; + padding-left: 30px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu .rd-navbar-dropdown li li > a, +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu .rd-navbar-megamenu ul li li > a { + padding-left: 48px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu.opened > .rd-navbar-megamenu { + display: block; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-search, +.bodywebsite .rd-navbar-fixed .rd-navbar-btn-wrap { + display: block; + padding: 16px 5px; +} +.bodywebsite .rd-navbar-fixed .rd-search .rd-search-results-live { + display: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-btn-wrap { + padding: 16px 10px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-btn-wrap .btn { + width: 100%; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li .rd-navbar-megamenu { + transition: opacity 0.3s, height 0.4s ease; + opacity: 0; + height: 0; + overflow: hidden; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > .rd-navbar-megamenu { + padding: 3px 0; + opacity: 1; + height: auto; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > .rd-navbar-submenu-toggle { + color: #fff; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-nav li.opened > .rd-navbar-submenu-toggle::after { + transform: rotate(180deg); + margin-top: -24px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-submenu-toggle::after { + content: '\f107'; + position: absolute; + top: 24px; + right: 0; + margin-top: -18px; + width: 65px; + height: 44px; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + line-height: 42px; + text-align: center; + transition: 0.4s all ease; + z-index: 2; + cursor: pointer; + color: #000; + will-change: transform; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse, +.bodywebsite .rd-navbar-fixed .rd-navbar-search-toggle { + position: fixed; + top: 4px; + height: 48px; + z-index: 1000; + background-color: transparent; + border: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-collapse:focus, +.bodywebsite .rd-navbar-fixed .rd-navbar-search-toggle:focus { + outline: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside { + top: 0; + right: 0; + width: 100%; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside, +.bodywebsite .rd-navbar-fixed .rd-navbar-aside .rd-navbar-aside-toggle { + position: fixed; + z-index: 1000; + display: block; + height: 48px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside.active .rd-navbar-aside-content { + visibility: visible; + opacity: 1; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle { + top: 4px; + right: 4px; + display: inline-block; + position: relative; + width: 48px; + height: 48px; + line-height: 48px; + cursor: pointer; + color: #000; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span { + top: 50%; + margin-top: -3px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span, +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:before, +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:after { + position: absolute; + width: 6px; + height: 6px; + line-height: 6px; + text-align: center; + background: #000; + left: 50%; + margin-left: -3px; + border-radius: 50%; + transition: .3s all ease; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:before, +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:after { + content: ''; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:before { + bottom: 100%; + margin-bottom: 3px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle span:after { + top: 100%; + margin-top: 3px; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle.active span { + transform: scale(0.7); +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle.active span:before { + transform: translateY(18px); +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-toggle.active span:after { + transform: translateY(-18px); +} +.bodywebsite .rd-navbar-fixed .rd-navbar-aside-content { + position: absolute; + top: calc(107%); + right: 0; + width: calc(102%); + padding: 20px 35px; + margin: 0 -1px; + pointer-events: auto; + opacity: 0; + visibility: hidden; + transition: 0.23s all ease-out; +} +@media (min-width: 768px) { + .bodywebsite .rd-navbar-fixed .rd-navbar-aside-content { + width: auto; + } +} +.bodywebsite .rd-navbar-fixed.rd-navbar--is-clone { + display: none; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-fixed--visible { + display: block; +} +.bodywebsite .rd-navbar-fixed .rd-navbar-fixed--hidden { + display: none; +} +.bodywebsite html.rd-navbar-fixed-linked .page { + padding-top: 56px; +} +.bodywebsite html.rd-navbar-sidebar-linked body { + padding-left: 270px; +} +.bodywebsite .rd-navbar-sidebar { + position: fixed; + display: block; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li:hover > a, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li:hover > a:hover, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.focus > a, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.focus > a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + background: transparent; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li:hover > .rd-navbar-submenu-toggle, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.focus > .rd-navbar-submenu-toggle { + color: #fff; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li:hover > .rd-navbar-submenu-toggle:hover, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.focus > .rd-navbar-submenu-toggle:hover { + cursor: pointer; + color: #fff; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li .rd-navbar-dropdown, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li .rd-navbar-megamenu { + transition: opacity 0.3s, height 0.4s ease; + opacity: 0; + height: 0; + overflow: hidden; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.opened > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.opened > .rd-navbar-megamenu { + opacity: 1; + height: auto; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.opened > a { + background: transparent; + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.opened > .rd-navbar-submenu-toggle { + color: #fff; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-nav li.opened > .rd-navbar-submenu-toggle::after { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-submenu-toggle::after { + content: '\f078'; + position: absolute; + top: 22px; + right: 0; + margin-top: -22px; + width: 65px; + height: 44px; + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + line-height: 42px; + text-align: center; + transition: 0.4s all ease; + z-index: 2; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-brand { + text-align: center; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse-items { + top: 0; + left: 0; + padding-top: 45px; + transform: scale(0.7); + transform-origin: 0% 0%; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse { + position: absolute; + top: 4px; + left: 4px; + display: inline-block; + z-index: 1; +} +.bodywebsite .rd-navbar-sidebar .rd-navbar-collapse.active .rd-navbar-collapse-items { + opacity: 1; + visibility: visible; + transform: scale(1); +} +.bodywebsite .rd-navbar-default .rd-navbar-nav > li > a { + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 700; + line-height: 1.2; + text-transform: uppercase; + color: #00030a; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .form-input, +.bodywebsite .rd-navbar-default .rd-navbar-search .form-label { + font-size: 16px; + line-height: 1.3; + color: #9b9b9b; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .form-label { + top: 18px; + left: 22px; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .form-input { + padding: 7px 45px 10px 22px; + height: auto; + min-height: 20px; + border: 1px solid #e5e7e9; + border-radius: 3px; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit { + font-size: 25px; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle:active, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle:focus, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit:active, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit:focus { + color: #00030a; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle:hover, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit, +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-search-submit:before { + font-family: 'Material Icons'; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle { + position: relative; +} +.bodywebsite .rd-navbar-default .rd-navbar-search .rd-navbar-search-toggle:after { + content: '\e5cd'; +} +.bodywebsite .rd-navbar-default.rd-navbar-fixed .rd-navbar-shop { + position: fixed; + top: 15px; + right: 15px; + z-index: 1001; +} +.bodywebsite .rd-navbar-default.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle { + display: none; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-inner, +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-group { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-inner { + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 44px 15px 42px; + font-size: 0; + line-height: 0; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-panel { + min-width: 100px; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-group { + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav-inner { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row-reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + margin-right: 12px; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav { + z-index: 0; + margin-right: 40px; + transition: .25s; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 32px; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav { + margin-right: 77px; + } + .bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 48px; + } +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-toggle .rd-navbar-nav > li .rd-navbar-toggle { + display: none; +} +.bodywebsite .rd-navbar-default.rd-navbar-static .rd-navbar-nav > li > .rd-navbar-dropdown { + margin-top: 54px; +} +.bodywebsite .rd-navbar-default.rd-navbar-static.rd-navbar--is-clone .rd-navbar-inner, +.bodywebsite .rd-navbar-default.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-inner { + padding: 18px 15px; +} +.bodywebsite .rd-navbar-default.rd-navbar-static.rd-navbar--is-clone .rd-navbar-nav > li > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-default.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-nav > li > .rd-navbar-dropdown { + margin-top: 49px; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-nav > li > a { + font-weight: 700; + font-size: 14px; + letter-spacing: .05em; + text-transform: uppercase; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .form-input, +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .form-label { + font-size: 16px; + line-height: 1.3; + color: #9b9b9b; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .form-label { + top: 18px; + left: 22px; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .form-input { + padding: 7px 45px 7px 22px; + height: auto; + min-height: 20px; + border: 1px solid #e5e7e9; + border-radius: 3px; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-search-submit { + text-align: center; + color: #000; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-search-submit:before { + position: static; + display: inline-block; + font-family: 'fl-bigmug-line'; + font-size: 20px; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-navbar-search-toggle:hover, +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-search-submit:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-search .rd-navbar-search-toggle:after { + display: none; +} +.bodywebsite .rd-navbar-corporate-dark .rd-navbar-aside { + width: 100%; + font-size: 14px; + line-height: 1.71429; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-fixed .rd-navbar-aside-content { + border-bottom: 1px solid #000; + border-left: 1px solid #000; + background: #111; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-fixed .rd-navbar-aside .list-units > li + li { + margin-top: 10px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-fixed .rd-navbar-aside * + .rd-navbar-aside-group { + margin-top: 14px; +} +@media (min-width: 576px) { + .bodywebsite .rd-navbar-corporate-dark.rd-navbar-fixed .rd-navbar-aside-content { + width: auto; + } +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-group { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-inner { + padding: 0; + font-size: 0; + line-height: 0; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-panel { + min-width: 100px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside { + position: relative; + z-index: 2; + background: #3a3c3e; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside:after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + transform: translateX(-50%); + background: inherit; + width: 102vw; + z-index: -1; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-content, +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-content { + padding: 12px 15px; + margin-bottom: -5px; + transform: translateY(-5px); + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group { + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group:first-child { + margin-top: 7px; + -webkit-flex-grow: 8; + -ms-flex-positive: 8; + flex-grow: 8; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + margin-right: 20px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group:last-child { + margin-top: 5px; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .list-units li { + display: inline-block; + margin-top: 0; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .list-units li:not(:last-child) { + margin-right: 25px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-group { + /* padding: 35px 15px; */ + padding-top: 18px; + padding-bottom: 18px; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav-inner { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row-reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav { + margin-right: 23px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li { + padding-left: 5px; + padding-right: 5px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li > a { + font-size: 13px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li.rd-navbar-submenu { + margin-right: -18px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li > .rd-navbar-submenu-toggle { + display: inline-block; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 32px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav .rd-navbar-dropdown > li { + padding-left: 5px; + padding-right: 5px; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li > a { + font-size: 14px; + } + .bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 29px; + } + .bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-aside .list-units li:not(:last-child) { + margin-right: 50px; + } +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-search { + position: static; + z-index: 2; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-search .rd-search { + position: absolute; + top: -2px; + /* right: -2px; */ + bottom: 0; + left: 0; + z-index: 5; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-search .rd-search-submit { + width: 39px; + height: 39px; + line-height: 38px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-search-wrap.active .rd-navbar-nav-wrap { + position: relative; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-search.active + .rd-navbar-nav { + opacity: 0; + visibility: hidden; + pointer-events: none; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static .rd-navbar-toggle .rd-navbar-nav > li .rd-navbar-toggle { + display: none; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-clone .rd-navbar-aside, +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-aside { + display: none; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-clone .rd-navbar-group, +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-group { + padding-top: 18px; + padding-bottom: 18px; +} +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-clone .rd-navbar-nav > li > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-corporate-dark.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-nav > li > .rd-navbar-dropdown { + margin-top: 18px; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-nav > li > a { + font: 400 16px "Roboto", Helvetica, Arial, sans-serif; + letter-spacing: .025em; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .form-input, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .form-label { + font-size: 16px; + line-height: 1.3; + color: #9b9b9b; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .form-label { + top: 18px; + left: 22px; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .form-input { + padding: 7px 22px 10px; + height: auto; + min-height: 20px; + border: 1px solid #e5e7e9; + border-radius: 3px; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-search-submit { + text-align: center; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-search-submit:before { + font-family: 'fl-bigmug-line'; + position: static; + display: inline-block; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after { + font-size: 20px; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before { + font-family: 'fl-bigmug-line'; + color: #000; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after { + font-family: 'Material Icons'; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:hover:before { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after { + width: 36px; + height: 36px; + text-align: center; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before, +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after { + display: block; + position: absolute; + left: 0; + top: 0; +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:before { + content: ""; + transform: scale(1) rotate(0deg); +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle:after { + content: ""; + opacity: 0; + transform: scale(0) rotate(-90deg); +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle.active:before { + opacity: 0; + transform: scale(0) rotate(90deg); +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-search .rd-navbar-search-toggle.active:after { + opacity: 1; + transform: scale(1) rotate(0deg); +} +.bodywebsite .rd-navbar-corporate-light .rd-navbar-aside { + width: 100%; + font-size: 14px; + line-height: 1.71429; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search { + padding: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search { + opacity: 0; + visibility: hidden; + position: fixed; + width: 100%; + padding: 8px 10px; + transform: translateY(-80%); + background: #fff; + border: 1px solid #e5e7e9; + border-top: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search.active .rd-search { + opacity: 1; + visibility: visible; + transform: translateY(0); +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .form-input { + padding: 7px 46px 10px 22px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit { + font-size: 20px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle:focus, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit:focus { + color: #000; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle:hover, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-navbar-search-toggle { + position: fixed; + right: 56px; + top: 10px; + z-index: 1000; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-search .rd-search-submit { + right: 10px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-aside-content { + border: 1px solid #e5e7e9; + background: #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-aside .list-units > li + li { + margin-top: 10px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-aside * + .rd-navbar-aside-group { + margin-top: 14px; +} +@media (min-width: 576px) { + .bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-aside-content { + width: auto; + } +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-fixed .rd-navbar-btn-wrap { + padding: 16px 5px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-group { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-inner { + padding: 0; + font-size: 0; + line-height: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-panel { + min-width: 100px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside { + position: relative; + z-index: 100; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside-wrap, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-content, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside-wrap { + position: relative; + z-index: 1001; + padding: 6px 20px 6px 10px; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside-wrap:after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + transform: translateX(-50%); + border-bottom: 1px solid #e5e7e9; + width: 101vw; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside-wrap > * + * { + margin-left: 10px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-content { + margin-bottom: -5px; + transform: translateY(-5px); + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group { + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group:first-child { + margin-top: 7px; + -webkit-flex-grow: 8; + -ms-flex-positive: 8; + flex-grow: 8; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + margin-right: 20px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .rd-navbar-aside-group:last-child { + margin-top: 5px; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .list-units li { + display: inline-block; + margin-top: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-aside .list-units li:not(:last-child) { + margin-right: 30px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-group { + padding: 35px 15px; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav-inner { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row-reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav { + margin-right: 40px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > a { + font-size: 15px; + padding: 7px 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li.rd-navbar-submenu { + margin-right: -24px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > .rd-navbar-submenu-toggle { + position: relative; + top: 2px; + display: inline-block; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 37px; +} +@media (min-width: 1200px) { + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > a { + font-size: 16px; + } + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li + li { + margin-left: 48px; + } +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search { + position: relative; + z-index: 1500; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .form-label { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .form-input, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .form-label { + color: #fff; + font-size: 30px; + font-weight: 700; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .form-label { + top: 24px; + left: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .form-input { + padding: 10px 50px 9px 0; + background-color: transparent; + border: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search .btn { + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1000; + opacity: 0; + visibility: hidden; + background: rgba(0, 0, 0, 0.96); +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-inner { + width: 540px; + margin-top: 75px; + margin-left: auto; + margin-right: auto; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + border-bottom: 1px solid #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-submit { + position: relative; + left: 0; + top: 0; + width: 39px; + height: 39px; + font-size: 25px; + line-height: 39px; + transform: none; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-submit, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-submit:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-submit:focus { + color: #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-submit:hover { + color: #ababab; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live { + position: relative; + display: block; + top: auto; + right: auto; + bottom: auto; + left: auto; + margin-top: 60px; + margin-left: auto; + margin-right: auto; + width: 800px; + font-size: 20px; + background-color: transparent; + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live > * { + display: block; + padding: 0; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .active .search_list li { + top: 0; + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search-quick-result { + display: none; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list { + margin: 0; + background-color: transparent; + text-align: left; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li { + position: relative; + top: 30px; + display: inline-block; + width: 48%; + padding: 0 15px; + text-align: left; + transition: 0.5s all ease-in-out; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list .search_all { + top: 0; + margin-top: 40px; + display: inline-block; + width: 100%; + text-align: right; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(0) { + transition-delay: 0s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(1) { + transition-delay: 0.15s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(2) { + transition-delay: 0.3s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(3) { + transition-delay: 0.45s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(4) { + transition-delay: 0.6s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(5) { + transition-delay: 0.75s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(6) { + transition-delay: 0.9s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(7) { + transition-delay: 1.05s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(8) { + transition-delay: 1.2s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(9) { + transition-delay: 1.35s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li:nth-child(10) { + transition-delay: 1.5s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(0) { + transition-delay: 0s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(1) { + transition-delay: 0.2s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(2) { + transition-delay: 0.4s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(3) { + transition-delay: 0.6s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(4) { + transition-delay: 0.8s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(5) { + transition-delay: 1s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(6) { + transition-delay: 1.2s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(7) { + transition-delay: 1.4s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(8) { + transition-delay: 1.6s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(9) { + transition-delay: 1.8s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_list li.search_all:nth-child(10) { + transition-delay: 2s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .result-item:only-child { + top: 0; + width: 100%; + text-align: center; + transition-delay: 0s; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .result-item:nth-child(n + 3) { + margin-top: 50px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title { + font: 700 30px/26px Helvetica, Arial, sans-serif; + font-style: italic; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title a, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title a:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title a:focus { + color: #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title a:hover { + color: #ababab; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_title + p { + margin-top: 16px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_error { + line-height: 1.35; + text-align: center; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit { + display: inline-block; + padding: 10px 35px; + border: 2px solid; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit.active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit:active:focus, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit.active:focus, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit:focus:active, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit:focus { + color: #fff; + background-color: transparent; + border-color: #fff; +} +.bodywebsite .open > .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit.dropdown-toggle, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit:hover { + color: #414141; + background-color: #fff; + border-color: #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit.disabled, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit[disabled], +.bodywebsite fieldset[disabled] .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit { + pointer-events: none; + opacity: .5; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search-results-live .search_submit .badge { + color: transparent; + background-color: #fff; +} +@media (min-width: 1600px) and (min-height: 767px) { + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search .rd-search-inner { + margin-top: 10%; + } +} +@media (max-height: 767px) { + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search .rd-search-results-live .result-item:nth-child(5), + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search .rd-search-results-live .result-item:nth-child(6) { + display: none; + } + .bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-search .rd-search-results-live .search_list > li.search_all { + transition-delay: 0.8s; + } +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search.active .rd-search { + display: block; + z-index: 10000; + margin: 0; + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search.active .rd-navbar-search-toggle { + z-index: 10002; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search.active .rd-navbar-search-toggle:after { + color: #fff; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-search.active .rd-navbar-search-toggle:hover:after { + color: #ababab; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-toggle .rd-navbar-nav > li .rd-navbar-toggle { + display: none; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-clone .rd-navbar-aside-wrap, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-aside-wrap { + position: absolute; + top: -60px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-clone .rd-navbar-group, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-group { + padding-top: 17px; + padding-bottom: 17px; +} +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-clone .rd-navbar-nav > li > .rd-navbar-dropdown, +.bodywebsite .rd-navbar-corporate-light.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-nav > li > .rd-navbar-dropdown { + margin-top: 50px; +} +html .bodywebsite.boxed.rd-navbar--has-sidebar body { + padding-left: 300px; + padding-right: 30px; +} +html .bodywebsite.boxed .rd-navbar--is-clone { + max-width: 1920px; + margin-left: auto; + margin-right: auto; +} + + +.bodywebsite .rd-parallax-inner { + position: relative; + overflow: hidden; + -webkit-transform: translate3d(0px, 0px, 0px); + transform: translate3d(0px, 0px, 0px); + z-index: 1; +} +.bodywebsite .rd-parallax-layer[data-type="media"] { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + height: 100%; + pointer-events: none; +} +.bodywebsite .rd-parallax-layer[data-type="media"] iframe { + width: 100%; + height: 100%; +} +.bodywebsite .rd-parallax-layer[data-url] { + -webkit-background-size: cover; + background-size: cover; + background-position: center center; +} +.bodywebsite .rd-parallax[class*="rd-parallax-overlay"] { + background-color: #000; + color: #fff; +} +.bodywebsite .rd-parallax[class*="rd-parallax-overlay"] .rd-parallax-layer[data-type="media"] { + opacity: 0.2; +} +.bodywebsite .rd-parallax[class*="rd-parallax-overlay"] .rd-parallax-layer[data-type="media"] + * { + position: relative; +} +.bodywebsite .rd-parallax.rd-parallax-overlay-2 .rd-parallax-layer[data-type="media"] { + opacity: 0.8; +} +.bodywebsite .google-map-markers { + display: none; +} +.bodywebsite .google-map-container { + width: 100%; +} +.bodywebsite .google-map { + height: 250px; + color: #333; +} +.bodywebsite .google-map img { + max-width: none !important; +} +@media (min-width: 576px) { + .bodywebsite .google-map { + height: 250px; + } +} +@media (min-width: 768px) { + .bodywebsite .google-map { + height: 400px; + } +} +@media (min-width: 1200px) { + .bodywebsite .google-map { + height: 450px; + } +} +@media (min-width: 1800px) { + .bodywebsite .google-map { + height: 532px; + } +} +.bodywebsite .rd-search { + position: relative; +} +.bodywebsite .rd-search .form-wrap { + display: block; + margin: 0; + font-size: 0; +} +.bodywebsite .rd-search label * { + margin-top: 0; +} +.bodywebsite .rd-search .rd-search-submit { + top: 19px; + right: -4px; + background-color: transparent; + border: none; + transform: translateY(-50%); +} +.bodywebsite .rd-search .text-mobile { + display: block; +} +.bodywebsite .rd-search .text-default { + display: none; +} +@media (min-width: 768px) { + .bodywebsite .rd-search .text-mobile { + display: none; + } + .bodywebsite .rd-search .text-default { + display: block; + } +} +.bodywebsite .rd-search-submit { + background: none; + border: none; + padding: 0; + outline: none; + outline-offset: 0; + -webkit-appearance: none; + display: inline-block; + position: relative; + width: 48px; + height: 48px; + line-height: 48px; + cursor: pointer; + color: #00030a; + text-align: center; + font-size: 22px; + position: absolute; + right: 0; + transition: color .33s; +} +.bodywebsite .rd-search-submit::-moz-focus-inner { + border: none; + padding: 0; +} +.bodywebsite .rd-search-submit:before { + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; +} +.bodywebsite .rd-search-submit.active { + transform: scale(0.7); +} +.bodywebsite .rd-search-submit:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-search-minimal { + position: relative; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + padding-left: 40px; + border-bottom: 1px solid #dedede; +} +.bodywebsite .rd-search-minimal:before { + content: '\e8b6'; + position: absolute; + top: 50%; + transform: translateY(-50%); + left: 10px; + font: 400 21px 'Material Icons'; + color: #000; +} +.bodywebsite .rd-search-minimal .form-wrap { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.bodywebsite .rd-search-minimal .form-label, +.bodywebsite .rd-search-minimal .form-input { + font: 400 16px/24px "Roboto", Helvetica, Arial, sans-serif; + color: rgba(0, 0, 0, 0.2); + letter-spacing: -0.025em; +} +.bodywebsite .rd-search-minimal .form-label { + top: 29px; +} +.bodywebsite .rd-search-minimal .form-input { + padding: 17px 20px; +} +.bodywebsite .rd-search-minimal button[type='submit'] { + padding: 0 20px; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} +@media (min-width: 768px) { + .bodywebsite .rd-search-minimal .form-label, + .bodywebsite .rd-search-minimal .form-input { + font-size: 19px; + } +} +.bodywebsite .rd-search-classic { + overflow: hidden; + border: 1px solid #dedede; + border-radius: 0; +} +.bodywebsite .rd-search-classic .form-input { + min-height: 50px; + padding: 13px 50px 15px 19px; + border: 0; +} +.bodywebsite .rd-search-classic .rd-search-submit { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 40px; + line-height: 0; + height: auto; + transform: none; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + text-align: left; +} +.bodywebsite .rd-search-classic .rd-search-submit:before { + font: 400 25px 'Material Icons'; +} +.bodywebsite .search_error { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; +} +.bodywebsite .rd-search-results-live { + position: absolute; + left: 0; + right: 0; + top: 100%; + z-index: 998; + margin: -3px 0 0; + font-size: 14px; + line-height: 34px; + text-align: left; + color: #9f9f9f; + opacity: 0; + visibility: hidden; +} +.bodywebsite .rd-search-results-live > * { + padding: 16px; + border: 0px solid #dedede; + border-top: 0; +} +.bodywebsite .rd-search-results-live .search-quick-result { + font: 700 14px/24px "Roboto", Helvetica, Arial, sans-serif; + color: #000; + letter-spacing: .06em; + text-transform: uppercase; +} +.bodywebsite .rd-search-results-live .search_list { + margin-top: 10px; + font-size: 16px; + line-height: 30px; +} +.bodywebsite .rd-search-results-live .search_list li + li { + margin-top: 20px; +} +.bodywebsite .rd-search-results-live .search_list .search_error { + padding-bottom: 10px; + font-size: 14px; + line-height: 1.1; +} +.bodywebsite .rd-search-results-live .search_link, +.bodywebsite .rd-search-results-live .search_link:active, +.bodywebsite .rd-search-results-live .search_link:focus { + color: #464a4d; +} +.bodywebsite .rd-search-results-live .search_link:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-search-results-live p { + margin-top: 0; + font-size: 14px; + line-height: 1.6; +} +.bodywebsite .rd-search-results-live .search_title { + margin-bottom: 0; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight: 700; + color: #000; +} +.bodywebsite .rd-search-results-live .search_submit { + display: block; + padding: 6px 20px; + font-size: 14px; + font-weight: 700; + text-align: center; + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + border-radius: 5px; + border: 0; + text-transform: uppercase; + transition: 0.3s ease-out; +} +.bodywebsite .rd-search-results-live .search_submit:hover { + color: #fff; + background: #3a3c3e; +} +.bodywebsite .rd-search-results-live .match { + display: none; +} +@media (min-width: 1200px) { + .bodywebsite .rd-search-results-live .search_link p { + display: block; + } +} +.bodywebsite .rd-navbar-fixed-linked .rd-search-results-live { + display: none; +} +.bodywebsite .rd-search-results-live.active.cleared { + opacity: 0; + visibility: hidden; + transition-delay: .08s; +} +.bodywebsite .active .rd-search-results-live { + display: block; + opacity: 1; + visibility: visible; +} +.bodywebsite .rd-search-results .search_list { + text-align: left; + padding-left: 0; + font-size: 14px; + list-style-type: none; + counter-reset: result; +} +.bodywebsite .rd-search-results .result-item { + position: relative; + padding-left: 40px; + color: #9f9f9f; +} +.bodywebsite .rd-search-results .result-item:before { + position: absolute; + top: -1px; + left: 0; + content: counter(result, decimal-leading-zero) "."; + counter-increment: result; + font: 500 19px "Roboto", Helvetica, Arial, sans-serif; + line-height: 1; + color: #cdcdcd; +} +.bodywebsite .rd-search-results .result-item:only-child:before { + display: none; +} +.bodywebsite .rd-search-results .search { + color: #fff; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .rd-search-results .search_error .search { + color: #9f9f9f; + background-color: transparent; +} +.bodywebsite .rd-search-results .match em { + font: 700 12px/16px "Roboto", Helvetica, Arial, sans-serif; + font-style: normal; + text-transform: uppercase; + color: #000; +} +.bodywebsite .rd-search-results * + p { + margin-top: 10px; +} +.bodywebsite .rd-search-results * + .match { + margin-top: 5px; +} +.bodywebsite .rd-search-results * + .result-item { + margin-top: 35px; +} +@media (min-width: 576px) { + .bodywebsite .rd-search-results .result-item { + padding-left: 60px; + } + .bodywebsite .rd-search-results .result-item:before { + left: 15px; + font-size: 19px; + } +} +@media (min-width: 768px) { + .bodywebsite .rd-search-results .result-item:before { + top: 0; + } +} +@media (min-width: 992px) { + .bodywebsite .rd-search-results .result-item { + padding-left: 85px; + } + .bodywebsite .rd-search-results .result-item:before { + top: 0; + left: 40px; + } +} +@media (min-width: 1200px) { + .bodywebsite .rd-search-results .result-item { + padding-left: 100px; + } + .bodywebsite .rd-search-results .result-item:before { + left: 44px; + } +} +.bodywebsite .twitter-item-minimal .tweet-user { + font-size: 16px; + font-weight: 700; +} +.bodywebsite .twitter-item-minimal .tweet-user a, +.bodywebsite .twitter-item-minimal .tweet-user a:active, +.bodywebsite .twitter-item-minimal .tweet-user a:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .twitter-item-minimal .tweet-user a:hover { + color: #000; +} +.bodywebsite .twitter-item-minimal .tweet-user a:before { + content: '-'; +} +.bodywebsite .twitter-item-minimal .tweet-text a, +.bodywebsite .twitter-item-minimal .tweet-text a:active, +.bodywebsite .twitter-item-minimal .tweet-text a:focus { + color: #000; +} +.bodywebsite .twitter-item-minimal .tweet-text a:hover { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .twitter-item-minimal * + .tweet-text { + margin-top: 0; +} +.bodywebsite .twitter-item-minimal * + .tweet-user { + margin-top: 10px; +} +.bodywebsite .twitter-item-minimal + .twitter-item-minimal { + margin-top: 25px; +} +.bodywebsite .twitter-widget { + overflow: hidden; + background: #fff; + border-radius: 6px; + box-shadow: -1px 0px 10px 0px rgba(65, 65, 65, 0.12); +} +.bodywebsite .twitter-widget > a { + display: block; + color: #9f9f9f; +} +.bodywebsite .twitter-widget .tweet-text a, +.bodywebsite .twitter-widget .tweet-text a:active, +.bodywebsite .twitter-widget .tweet-text a:focus { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .twitter-widget .tweet-text a:hover { + color: #000; +} +.bodywebsite .twitter-widget .twitter-widget-time { + color: #9f9f9f; +} +.bodywebsite .twitter-widget .twitter-widget-meta > * { + line-height: 1.1; +} +.bodywebsite .twitter-widget .twitter-widget-meta > * + * { + margin-top: 5px; +} +.bodywebsite .twitter-widget .twitter-widget-media { + position: relative; + z-index: 1; + overflow: hidden; +} +.bodywebsite .twitter-widget .twitter-widget-media > img { + position: absolute; + top: 0; + right: 0; + left: 0; + min-height: 101%; +} +.bodywebsite .twitter-widget .twitter-widget-media:empty { + display: none; +} +.bodywebsite .twitter-widget .twitter-widget-media:not(:empty) { + padding-bottom: 42.5170068%; +} +.bodywebsite .twitter-widget .tweet-avatar { + display: block; + width: 48px; + height: 48px; + background: #dedede; +} +.bodywebsite .twitter-widget .twitter-widget-header { + padding: 30px 30px 0 30px; +} +.bodywebsite .twitter-widget .twitter-widget-inset { + padding: 25px 30px 15px; +} +.bodywebsite .twitter-widget .twitter-widget-footer { + padding: 15px 30px; +} +.bodywebsite * + .twitter-widget { + margin-top: 30px; +} +.bodywebsite .swiper-container { + margin: 0 auto; + position: relative; + overflow: hidden; + /* Fix of Webkit flickering */ + z-index: 1; + height: auto; +} +.bodywebsite .swiper-container .swiper-wrapper { + height: auto; + min-height: 36.25vw; +} +@media (min-width: 1800px) { + .bodywebsite .swiper-container .swiper-wrapper { + height: auto; + min-height: 680px; + } +} +.bodywebsite .swiper-container-no-flexbox .swiper-slide { + float: left; +} +.bodywebsite .swiper-container-vertical > .swiper-wrapper { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.bodywebsite .swiper-wrapper { + position: relative; + width: 100%; + z-index: 1; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-align-self: stretch; + -ms-flex-item-align: stretch; + align-self: stretch; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +.bodywebsite .swiper-container-android .swiper-slide, +.bodywebsite .swiper-wrapper { + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate(0px, 0px); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); +} +.bodywebsite .swiper-container-multirow > .swiper-wrapper { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} +.bodywebsite .swiper-container-free-mode > .swiper-wrapper { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + margin: 0 auto; +} +.bodywebsite .swiper-slide { + position: relative; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 100%; + min-height: inherit; +} +.bodywebsite .swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +.bodywebsite .swiper-wp8-horizontal { + -ms-touch-action: pan-y; + touch-action: pan-y; +} +.bodywebsite .swiper-wp8-vertical { + -ms-touch-action: pan-x; + touch-action: pan-x; +} +.bodywebsite .swiper-nav { + position: absolute; + top: 50%; + right: 0; + left: 0; + z-index: 10; + pointer-events: none; + transform: translateY(-50%); +} +.bodywebsite .swiper-button-prev, +.bodywebsite .swiper-button-next { + z-index: 10; + width: 48px; + height: 48px; + background-size: 48px 48px; + color: #fff; + transition: 180ms ease-in-out; + text-align: center; + cursor: pointer; + pointer-events: auto; +} +.bodywebsite .swiper-button-prev:hover, +.bodywebsite .swiper-button-next:hover { + opacity: .7; +} +.bodywebsite .swiper-button-prev.swiper-button-disabled, +.bodywebsite .swiper-button-next.swiper-button-disabled { + opacity: 0; + cursor: auto; + pointer-events: none; +} +.bodywebsite .swiper-button-next { + transform: rotate(180deg); +} +.bodywebsite .swiper-pagination-wrap { + position: absolute; + bottom: 20px; + left: 50%; + width: 100%; + transform: translate3d(-50%, 0, 0); + z-index: 10; +} +@media (min-width: 992px) { + .bodywebsite .swiper-pagination-wrap { + bottom: 35px; + } +} +@media (min-width: 1200px) { + .bodywebsite .swiper-pagination-wrap { + bottom: 55px; + } +} +.bodywebsite .swiper-pagination { + display: block; + width: 100%; + text-align: center; + transition: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + z-index: 10; +} +@media (min-width: 768px) { + .bodywebsite .swiper-pagination { + text-align: left; + } +} +.bodywebsite .swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +.bodywebsite .swiper-pagination-bullet { + display: inline-block; + width: 6px; + height: 6px; + border-radius: 20px; + background: #cdcdcd; + pointer-events: none; + transition: all 0.2s ease-out; +} +.bodywebsite .swiper-pagination-bullet + * { + margin-left: 10px; +} +@media (min-width: 768px) { + .bodywebsite .swiper-pagination-bullet { + width: 12px; + height: 12px; + pointer-events: auto; + } + .bodywebsite .swiper-pagination-bullet + * { + margin-left: 20px; + } +} +.bodywebsite .swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.bodywebsite .swiper-pagination-white .swiper-pagination-bullet { + background: #fff; +} +.bodywebsite .swiper-pagination-bullet:hover, +.bodywebsite .swiper-pagination-bullet-active { + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .swiper-pagination-white .swiper-pagination-bullet-active { + background: #fff; +} +.bodywebsite .swiper-pagination-black .swiper-pagination-bullet-active { + background: #000; +} +.bodywebsite .swiper-container-vertical > .swiper-pagination { + right: 10px; + top: 50%; + -webkit-transform: translate3d(0px, -50%, 0); + -moz-transform: translate3d(0px, -50%, 0); + -o-transform: translate(0px, -50%); + -ms-transform: translate3d(0px, -50%, 0); + transform: translate3d(0px, -50%, 0); +} +.bodywebsite .swiper-container-vertical > .swiper-pagination .swiper-pagination-bullet { + margin: 5px 0; + display: block; +} +.bodywebsite .swiper-container-horizontal > .swiper-pagination { + bottom: 20px; + left: 0; + width: 100%; +} +.bodywebsite .swiper-container-horizontal > .swiper-pagination .swiper-pagination-bullet { + margin: 0 5px; +} + +.bodywebsite .swiper-container-coverflow .swiper-wrapper { + /* Windows 8 IE 10 fix */ + -ms-perspective: 1200px; +} +.bodywebsite .swiper-container-fade.swiper-container-free-mode .swiper-slide { + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.bodywebsite .swiper-container-fade .swiper-slide { + pointer-events: none; +} +.bodywebsite .swiper-container-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.bodywebsite .swiper-container-fade .swiper-slide-active, +.bodywebsite .swiper-container-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.bodywebsite .swiper-container-cube { + overflow: visible; +} +.bodywebsite .swiper-container-cube .swiper-slide { + pointer-events: none; + visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + width: 100%; + height: 100%; + z-index: 1; +} +.bodywebsite .swiper-container-cube.swiper-container-rtl .swiper-slide { + -webkit-transform-origin: 100% 0; + -moz-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; +} +.bodywebsite .swiper-container-cube .swiper-slide-active, +.bodywebsite .swiper-container-cube .swiper-slide-next, +.bodywebsite .swiper-container-cube .swiper-slide-prev, +.bodywebsite .swiper-container-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.bodywebsite .swiper-container-cube .swiper-slide-shadow-top, +.bodywebsite .swiper-container-cube .swiper-slide-shadow-bottom, +.bodywebsite .swiper-container-cube .swiper-slide-shadow-left, +.bodywebsite .swiper-container-cube .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; +} +.bodywebsite .swiper-container-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; +} +.bodywebsite .swiper-scrollbar { + position: relative; + -ms-touch-action: none; +} +.bodywebsite .swiper-container-horizontal > .swiper-scrollbar { + position: absolute; + top: 0; + left: 0; + z-index: 50; + height: 5px; + width: 100%; +} +.bodywebsite .swiper-container-vertical > .swiper-scrollbar { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; +} +.bodywebsite .swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; + left: 0; + top: 0; +} +.bodywebsite .swiper-scrollbar-cursor-drag { + cursor: move; +} +.bodywebsite .swiper-lazy-preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; + -webkit-transform-origin: 50%; + -moz-transform-origin: 50%; + transform-origin: 50%; + -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite; + -moz-animation: swiper-preloader-spin 1s steps(12, end) infinite; + animation: swiper-preloader-spin 1s steps(12, end) infinite; +} +.bodywebsite .swiper-lazy-preloader:after { + display: block; + content: ""; + width: 100%; + height: 100%; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); + background-position: 50%; + -webkit-background-size: 100%; + background-size: 100%; + background-repeat: no-repeat; +} +.bodywebsite .swiper-lazy-preloader-white:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +@-webkit-keyframes swiper-preloader-spin { + 100% { + -webkit-transform: rotate(360deg); + } +} +@keyframes swiper-preloader-spin { + 100% { + transform: rotate(360deg); + } +} +.bodywebsite .swiper-slide > .vide__body, +.bodywebsite .swiper-slide > .parallax_cnt { + height: 100%; +} +.bodywebsite .swiper-slide { + position: relative; + text-align: center; + white-space: nowrap; + background-position: center center; + overflow: hidden; +} +.bodywebsite .swiper-slide:not(.vide):not(.rd-parallax):before, +.bodywebsite .swiper-slide .parallax_cnt:before, +.bodywebsite .swiper-slide .vide__body:before { + content: ''; + display: inline-block; + height: 50%; +} +.bodywebsite .swiper-slide-caption { + display: inline-block; + width: 100%; + max-height: 100%; + margin-left: -0.25em; + vertical-align: middle; + white-space: normal; + z-index: 1; +} +.bodywebsite .swiper-variant-1, +.bodywebsite .swiper-variant-1 .swiper-wrapper { + height: auto; + min-height: calc(44vh); +} +.bodywebsite .swiper-variant-1 .swiper-slide-caption { + padding: 40px 0 40px; +} +.bodywebsite .swiper-variant-1 .swiper-button-prev, +.bodywebsite .swiper-variant-1 .swiper-button-next { + display: none; +} +.bodywebsite .swiper-variant-1 .slider-text { + display: none; +} +.bodywebsite .swiper-variant-1 .jumbotron-custom + * { + margin-top: 5px; +} +.bodywebsite .swiper-variant-1 * + .button-block { + margin-top: 27px; +} +@media (min-width: 768px) { + .bodywebsite .swiper-variant-1, + .bodywebsite .swiper-variant-1 .swiper-wrapper { + height: auto; + min-height: 36.25vw; + } + .bodywebsite .swiper-variant-1 .swiper-slide-caption { + padding: 60px 0 115px; + } + .bodywebsite .swiper-variant-1 .slider-header { + font-size: 50px; + } + .bodywebsite .swiper-variant-1 .slider-text { + display: block; + } +} +@media (min-width: 992px) { + .bodywebsite .swiper-variant-1 .swiper-slide-caption { + padding: 100px 0 155px; + } + .bodywebsite .swiper-variant-1 .swiper-button-prev, + .bodywebsite .swiper-variant-1 .swiper-button-next { + position: absolute; + top: 50%; + transform: translateY(-59%); + z-index: 10; + display: block; + transition: .3s all ease; + } + .bodywebsite .swiper-variant-1 .swiper-button-prev { + left: 5.1%; + transform: scale(-1, 1); + } + .bodywebsite .swiper-variant-1 .swiper-button-next { + right: 5.1%; + } +} +@media (min-width: 1200px) { + .bodywebsite .swiper-variant-1 .slider-header { + font-size: 59px; + } + .bodywebsite .swiper-variant-1 .swiper-button-prev { + left: 20px; + } + .bodywebsite .swiper-variant-1 .swiper-button-next { + right: 20px; + } +} +@media (min-width: 1599px) { + .bodywebsite .swiper-variant-1 .swiper-button-prev { + left: calc(50vw - 1170px / 2 - 170px + (1170px / 12) * 0); + } + .bodywebsite .swiper-variant-1 .swiper-button-next { + right: calc(50vw - 1170px / 2 - 170px + (1170px / 12) * 0); + } +} +@media (min-width: 1800px) { + .bodywebsite .swiper-variant-1, + .bodywebsite .swiper-variant-1 .swiper-wrapper { + height: auto; + min-height: 680px; + } +} +.bodywebsite .ui-to-top { + width: 40px; + height: 40px; + font-size: 18px; + line-height: 38px; + border-radius: 50%; + position: fixed; + right: 15px; + bottom: 15px; + overflow: hidden; + text-align: center; + text-decoration: none; + z-index: 20; + transition: .3s all ease; + box-shadow: 0 0 1px 0px rgba(55, 195, 134, 0.3); + transform: translateY(100px); +} +.bodywebsite .ui-to-top, +.bodywebsite .ui-to-top:active, +.bodywebsite .ui-to-top:focus { + color: #fff; + background: maincolor) ? 'rgb(150, 150, 150)' : '#'.$website->maincolor; ?>; + opacity: 0.6; +} +.bodywebsite .ui-to-top:hover { + color: #fff; + background: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?>; + box-shadow: 0 0 1px 0px rgba(0, 0, 0, 0.4); +} +.bodywebsite .ui-to-top:focus { + outline: 0; +} +.bodywebsite .ui-to-top.active { + transform: translateY(0); +} +.bodywebsite .mobile .ui-to-top, +.bodywebsite .tablet .ui-to-top { + display: none !important; +} +@media (min-width: 576px) { + .bodywebsite .ui-to-top { + right: 40px; + bottom: 40px; + } +} +.bodywebsite .progress-bar-wrap { + max-width: 100%; + width: 210px; +} +@media (min-width: 576px) and (max-width: 767px) { + .bodywebsite .progress-bar-wrap { + max-width: 120px; + } +} +@media (min-width: 768px) { + .bodywebsite .progress-bar-wrap { + max-width: 150px; + } +} +.bodywebsite .progress-bar { + position: relative; + width: 100%; + margin: 0; + font-family: "Roboto", Helvetica, Arial, sans-serif; +} +.bodywebsite .progress-bar .progress-bar__body { + position: absolute; + right: 50%; + width: 100%; + top: 50%; + padding: 0; + margin: 0; + white-space: nowrap; + font-size: 34px; + font-weight: 400; + line-height: 26px; + color: #00030a; + text-align: right; +} +.bodywebsite .progress-bar .progress-bar__body:after { + content: '%'; +} +.bodywebsite .progress-bar .progress-bar__stroke, +.bodywebsite .progress-bar .progress-bar__trail { + stroke-linejoin: round; +} +.bodywebsite .progress-bar-horizontal { + position: relative; + font-family: "Roboto", Helvetica, Arial, sans-serif; + text-align: right; +} +.bodywebsite .progress-bar-horizontal > svg { + margin-top: 3px; + border-radius: 3px; +} +.bodywebsite .progress-bar-horizontal .progress-bar__body { + position: absolute; + top: -27px; + margin-top: 0; + padding-right: 0; +} +.bodywebsite .progress-bar-horizontal .progress-bar__body:after { + content: '%'; +} +.bodywebsite .progress-bar-radial { + position: relative; + padding-bottom: 100%; +} +.bodywebsite .progress-bar-radial > svg { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + border-radius: 5px; + overflow: hidden; +} +.bodywebsite .progress-bar-radial .progress-bar__stroke, +.bodywebsite .progress-bar-radial .progress-bar__trail { + stroke-location: outside; +} +.bodywebsite .progress-bar-radial .progress-bar__body { + transform: translate(50%, -50%); +} +.bodywebsite .progress-bar-default .progress-bar__stroke { + stroke: #9f9f9f; +} +.bodywebsite .progress-bar-default .progress-bar__trail { + stroke: rgba(159, 159, 159, 0.05); +} +.bodywebsite .progress-bar-primary .progress-bar__stroke { + stroke: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .progress-bar-primary .progress-bar__trail { + stroke: #F8F9FB; +} +.bodywebsite .progress-bar-bermuda-gray .progress-bar__stroke { + stroke: #6f8fad; +} +.bodywebsite .progress-bar-bermuda-gray .progress-bar__trail { + stroke: #F8F9FB; +} +.bodywebsite .progress-bar-contessa .progress-bar__stroke { + stroke: #e76752; +} +.bodywebsite .progress-bar-contessa .progress-bar__trail { + stroke: #F8F9FB; +} +.bodywebsite .progress-bar-red-orange-1 .progress-bar__stroke { + stroke: #f8333c; +} +.bodywebsite .progress-bar-red-orange-1 .progress-bar__trail { + stroke: #ededed; +} +.bodywebsite .progress-bar-dodger-blue .progress-bar__stroke { + stroke: #45a4ff; +} +.bodywebsite .progress-bar-dodger-blue .progress-bar__trail { + stroke: #ededed; +} +.bodywebsite .progress-bar-gorse .progress-bar__stroke { + stroke: #fde74c; +} +.bodywebsite .progress-bar-gorse .progress-bar__trail { + stroke: #ededed; +} +.bodywebsite .progress-bar-old-gold .progress-bar__stroke { + stroke: #ecd746; +} +.bodywebsite .progress-bar-old-gold .progress-bar__trail { + stroke: #F8F9FB; +} +.bodywebsite .progress-bar-secondary-2 .progress-bar__stroke { + stroke: #dedede; +} +.bodywebsite .progress-bar-secondary-2 .progress-bar__trail { + stroke: gray; +} +.bodywebsite .progress-bar-secondary-1 .progress-bar__stroke { + stroke: #dedede; +} +.bodywebsite .progress-bar-secondary-1 .progress-bar__trail { + stroke: rgba(159, 159, 159, 0.05); +} +.bodywebsite .progress-bar-secondary-3 .progress-bar__stroke { + stroke: #c49558; +} +.bodywebsite .progress-bar-secondary-3 .progress-bar__trail { + stroke: rgba(159, 159, 159, 0.05); +} +.bodywebsite .progress-bar-secondary-4 .progress-bar__stroke { + stroke: #fe4a21; +} +.bodywebsite .progress-bar-secondary-4 .progress-bar__trail { + stroke: rgba(159, 159, 159, 0.05); +} +.bodywebsite .countdown-wrap { + max-width: 720px; + max-height: 134px; +} +.bodywebsite .countdown-wrap .time_circles > div { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column-reverse; + -ms-flex-direction: column-reverse; + flex-direction: column-reverse; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + font-size: 0; + line-height: 0; +} +.bodywebsite .countdown-wrap div > h4 { + position: relative; + margin-top: -2px; + font: 500 12px "Roboto", Helvetica, Arial, sans-serif !important; + color: rgba(0, 0, 0, 0.2); + letter-spacing: -0.025em; + bottom: auto !important; + text-transform: uppercase; +} +@media (min-width: 576px) { + .bodywebsite .countdown-wrap div > h4 { + font-size: 14px !important; + } +} +.bodywebsite .countdown-wrap span { + font: 900 18px "Roboto", Helvetica, Arial, sans-serif !important; + font-style: normal; + color: #000; +} +@media (min-width: 576px) { + .bodywebsite .countdown-wrap span { + font-size: 40px !important; + } +} +@media (min-width: 768px) { + .bodywebsite .countdown-wrap span { + font-size: 45px !important; + line-height: 1; + } +} +.bodywebsite .slick-slider { + position: relative; + display: block; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -ms-touch-action: pan-y; + touch-action: pan-y; + -webkit-tap-highlight-color: transparent; +} +.bodywebsite .slick-list { + position: relative; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.bodywebsite .slick-list:focus { + outline: none; +} +.bodywebsite .slick-list.dragging { + cursor: pointer; + cursor: hand; +} +.bodywebsite .slick-slider .slick-track, +.bodywebsite .slick-slider .slick-list { + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.bodywebsite .slick-track { + position: relative; + left: 0; + top: 0; + display: block; +} +.bodywebsite .slick-track:before, +.bodywebsite .slick-track:after { + content: ""; + display: table; +} +.bodywebsite .slick-track:after { + clear: both; +} +.bodywebsite .slick-loading .slick-track { + visibility: hidden; +} +.bodywebsite .slick-slide { + float: left; + min-height: 1px; + display: none; +} +.bodywebsite [dir="rtl"] .slick-slide { + float: right; +} +.bodywebsite .slick-slide img { + display: block; +} +.bodywebsite .slick-slide.slick-loading img { + display: none; +} +.bodywebsite .slick-slide.dragging img { + pointer-events: none; +} +.bodywebsite .slick-initialized .slick-slide { + display: block; +} +.bodywebsite .slick-loading .slick-slide { + visibility: hidden; +} +.bodywebsite .slick-vertical .slick-slide { + display: block; + height: auto; + border: 1px solid transparent; +} +.bodywebsite .slick-arrow.slick-hidden { + display: none; +} +.bodywebsite .slick-loading .slick-list { + background: #fff url("medias/image/ref; ?>/ajax-loading.gif") center center no-repeat; +} +.bodywebsite .slick-prev, +.bodywebsite .slick-next { + position: absolute; + display: block; + height: 20px; + width: 20px; + line-height: 0; + font-size: 0; + cursor: pointer; + background: rgba(0, 0, 0, 0.6); + color: transparent; + top: 50%; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + padding: 0; + border: none; + outline: none; + z-index: 999; +} +.bodywebsite .slick-prev:hover, +.bodywebsite .slick-prev:focus, +.bodywebsite .slick-next:hover, +.bodywebsite .slick-next:focus { + outline: none; + background: transparent; + color: transparent; +} +.bodywebsite .slick-prev:hover:before, +.bodywebsite .slick-prev:focus:before, +.bodywebsite .slick-next:hover:before, +.bodywebsite .slick-next:focus:before { + opacity: 1; +} +.bodywebsite .slick-prev.slick-disabled:before, +.bodywebsite .slick-next.slick-disabled:before { + opacity: 0.25; +} +.bodywebsite .slick-prev:before, +.bodywebsite .slick-next:before { + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-size: 20px; + line-height: 1; + color: white; + opacity: 0.75; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.bodywebsite .slick-prev { + left: 0; +} +.bodywebsite [dir="rtl"] .slick-prev { + left: auto; + right: 0; +} +.bodywebsite .slick-prev:before { + content: "←"; +} +.bodywebsite [dir="rtl"] .slick-prev:before { + content: "→"; +} +.bodywebsite .slick-next { + right: 0; +} +.bodywebsite [dir="rtl"] .slick-next { + left: 0; + right: auto; +} +.bodywebsite .slick-next:before { + content: "→"; +} +.bodywebsite [dir="rtl"] .slick-next:before { + content: "←"; +} +.bodywebsite .slick-slider { + margin-top: 30px; +} +.bodywebsite .slick-slider *:focus { + outline: 0; +} +.bodywebsite .slick-dots { + display: block; + margin-top: 20px; + list-style: none; + width: 100%; + padding: 0; + text-align: center; + font-size: 0; + line-height: 0; + word-spacing: 0; +} +.bodywebsite .slick-dots li { + position: relative; + display: inline-block; + height: 20px; + width: 20px; + margin: 0 5px; + padding: 0; + cursor: pointer; +} +.bodywebsite .slick-dots li button { + background: none; + border: none; + display: inline-block; + padding: 0; + outline: none; + outline-offset: 0; + cursor: pointer; + -webkit-appearance: none; + width: 8px; + height: 8px; + border-radius: 100px; + background: #ababab; +} +.bodywebsite .slick-dots li button::-moz-focus-inner { + border: none; + padding: 0; +} +.bodywebsite .slick-dots li.slick-active button, +.bodywebsite .slick-dots li:hover button { + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .slick-dots-variant-1 .slick-dots li button { + height: 12px; + width: 12px; + background: rgba(58, 60, 62, 0.5); + transition: .33s all ease; + position: relative; +} +.bodywebsite .slick-dots-variant-1 .slick-dots li button:after { + content: ''; + position: absolute; + top: 50%; + left: 50%; + width: 19px; + height: 19px; + border: 4px solid #fff; + opacity: 0; + border-radius: 50%; + -webkit-transform: translate(-50%, -50%) scale(0); + transform: translate(-50%, -50%) scale(0); + transition: 180ms ease-in-out; +} +.bodywebsite .slick-dots-variant-1 .slick-dots li.slick-active button, +.bodywebsite .slick-dots-variant-1 .slick-dots li:hover button { + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .slick-dots-variant-1 .slick-dots li.slick-active button:after, +.bodywebsite .slick-dots-variant-1 .slick-dots li:hover button:after { + opacity: 1; + -webkit-transform: translate(-50%, -50%) scale(1); + transform: translate(-50%, -50%) scale(1); +} +.bodywebsite .slick-carousel-complex-variant-1 { + position: relative; + padding-bottom: 60px; +} +.bodywebsite .slick-carousel-complex-variant-1:after { + content: ''; + position: absolute; + top: 80px; + left: 50%; + bottom: 0; + transform: translateX(-50%); + width: 101vw; + background: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .slick-carousel-complex-variant-1 > * { + position: relative; + z-index: 2; +} +.bodywebsite .slick-carousel-complex-variant-1 .slick-slider { + margin-bottom: 0; +} +.bodywebsite .slick-carousel-complex-variant-1 .slick-dots { + margin-top: 30px; +} +@media (min-width: 768px) { + .bodywebsite .slick-carousel-complex-variant-1 { + padding-bottom: 90px; + } +} +.bodywebsite .slick-slider-images .item { + padding: 0 15px; + text-align: right; +} +.bodywebsite .slick-slider-images .item img { + display: inline-block; + transform: scale(0.75); + transform-origin: 100% 50%; + will-change: transform; + cursor: pointer; + transition: .5s all ease; +} +.bodywebsite .slick-slider-images .item.slick-center { + text-align: center; +} +.bodywebsite .slick-slider-images .item.slick-center img { + transform-origin: 50% 50%; + transform: scale(1); +} +.bodywebsite .slick-slider-images .item.slick-center + * { + text-align: left; +} +.bodywebsite .slick-slider-images .item.slick-center + * img { + transform-origin: 0 50%; +} +.bodywebsite .slick-carousel-round-image .item img { + border-radius: 50%; +} +.bodywebsite .carousel-testimonials-home .slick-slide { + text-align: center; +} +.bodywebsite #sectiontestimonies.maincolorbackground { + background-image: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +@media (min-width: 576px) { + .bodywebsite .carousel-testimonials-home .slick-slide { + text-align: left; + } +} +.bodywebsite .carousel-testimonials-home .slick-dots li button { + background: rgba(246, 247, 250, 0.5); +} +.bodywebsite .carousel-testimonials-home .item { + padding-left: 10px; + padding-right: 10px; +} +@media (min-width: 1200px) { + .bodywebsite .carousel-testimonials-home .item { + padding-left: 0; + padding-right: 0; + } +} +@media (min-width: 576px) { + .bodywebsite .carousel-testimonials-home .slick-dots { + display: none !important; + } +} +.bodywebsite .carousel-testimonials-home .slick-images .item { + padding-left: 0; + padding-right: 0; +} +.bodywebsite .carousel-testimonials-home .slick-images .item .imp-wrap { + text-align: center; + position: relative; + padding: 10px; +} +.bodywebsite .carousel-testimonials-home .slick-images .item .imp-wrap:after { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0); + content: ''; + display: inline-block; + margin-left: 0px; + border: 1px solid #fccb56; + width: 116px; + height: 116px; + border-radius: 50%; + transition: 200ms ease-in-out; + opacity: 0; + pointer-events: none; +} +.bodywebsite .carousel-testimonials-home .slick-images .item .imp-wrap img { + display: inline-block; + border-radius: 50%; + cursor: pointer; +} +.bodywebsite .carousel-testimonials-home .slick-images .item:hover .imp-wrap:after, +.bodywebsite .carousel-testimonials-home .slick-images .item.slick-current .imp-wrap:after { + transform: translate(-50%, -50%) scale(1); + opacity: 1; +} +.bodywebsite .carousel-testimonials-home .quote-desc { + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.bodywebsite .websitemaincolor { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .maincolor { + color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .maincolorbis { + color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?> !important; +} +.bodywebsite .maincolorbackground { + background-color: maincolor) ? 'rgb(50, 120, 180)' : '#'.$website->maincolor; ?>; +} +.bodywebsite .maincolorbisbackground { + background-color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?> !important; + border-color: maincolorbis) ? '#6ca' : '#'.$website->maincolorbis; ?> !important; +} +.bodywebsite .maincolorbisbackground:hover { + box-shadow: 1px 1px 8px #aaa; +} +.bodywebsite textarea:focus, +.bodywebsite button:focus { + border: unset !important; +} +.bodywebsite .marginrightonly { + margin-right: 10px !important; +} +.bodywebsite .inline-block { + display: inline-block; +} +.bodywebsite .valignmiddle { + vertical-align: middle; +} +.bodywebsite .center { + text-align: center; +} +.bodywebsite button.buttonwithnoborder.toggle-original.active { + display: none; +} +.bodywebsite .rd-navbar-nav-wrap.active .toggle-original span.icon.icon-xs.icon-dusty-gray.fa.fa-search { + display: none; +} +.bodywebsite ul.rd-navbar-list { + padding-top: 20px; +} +.bodywebsite .photouser:hover, +.bodywebsite .photouser:active { + border: 2px solid #eee; +} +.bodywebsite .imp-wrap { + display: inline-block; +} +.bodywebsite .imp-wrap img { + border-radius: 50px; +} +.bodywebsite .text-green { + color: #6ca; +} +.bodywebsite .plan-tile .plan-title { + padding: 20px 0 0; + font-size: 20px; + font-weight: bold; + text-align: center; +} +.bodywebsite .plan-tile .plan-tag { + color: #687484; + text-align: center; + font-size: 16px; + padding: 0 5px 10px; + font-weight: 300; + min-height: 70px; +} +.bodywebsite .plan-tile .plan-pricer .plan-price-title { + display: block; + text-align: center; + color: #8492A6; + font-style: italic; + position: absolute; + top: 30px; + transform: translateX(-50%); + -webkit-transform: translateX(-50%); + left: 50%; + font-size: 16px; + width: 100%; + font-weight: 300; +} +.bodywebsite .plan-tile .plan-feat { + display: block; + font-size: 14px; + color: #3C4858; + text-align: center; + padding: 22px 10px; + min-height: 90px; +} +.bodywebsite .plan-tile .plan-pricer .plan-price { + border-bottom: 1px solid #d5dadf; + border-top: 1px solid #d5dadf; + padding: 20px 0 20px; + display: block; +} +.bodywebsite .plan-tile .plan-pricer .plan-price > span { + color: #3C4858; + font-size: 32px; +} +.bodywebsite .plan-tile .plan-pricer .plan-price > span > sup { + font-size: 13px; + top: -0.9em; +} +.bodywebsite .plan-tile .plan-pricer { + padding: 5px 0; + text-align: center; + max-width: 90%; + position: relative; + margin: auto; +} +.bodywebsite .pricing-plan-slider .plan-tile .plan-btn { + position: absolute; + bottom: 0px; + left: 0; + width: 100%; +} +.bodywebsite .plan-tile .plan-btn { + text-align: center; + padding: 0 15px 15px 15px; +} +.bodywebsite .plan-features { + padding-top: 20px; + padding-bottom: 20px; + padding-left: 20px; + padding-right: 20px; +} +.bodywebsite .formcontact div { + margin: 2px; +} +.bodywebsite section#sectionfooterdolibarr { + padding-left: 3px; + padding-right: 3px; + padding-bottom: 10px; +} +.bodywebsite button.buttonwithnoborder.toggle-original { + font-family: "Font Awesome 5 Free"; + font-weight: 600; + font-size: initial; + /* If removed, the search icon is not visible */ +} +.bodywebsite .rd-navbar-fixed .buttonsearchwhenstatic { + display: none; +} +.bodywebsite input[type="text"] { + display: block; + width: 100%; + padding: 11px 35px; + font-size: 14px; + line-height: 1.25; + background-image: none; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: 0.25rem; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; +} +@media print { + .bodywebsite *, + .bodywebsite *::before, + .bodywebsite *::after { + text-shadow: none !important; + box-shadow: none !important; + } + .bodywebsite a, + .bodywebsite a:visited { + text-decoration: underline; + } + .bodywebsite abbr[title]::after { + content: " (" attr(title) ")"; + } + .bodywebsite pre { + white-space: pre-wrap !important; + } + .bodywebsite pre, + .bodywebsite blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + .bodywebsite thead { + display: table-header-group; + } + .bodywebsite tr, + .bodywebsite img { + page-break-inside: avoid; + } + .bodywebsite p, + .bodywebsite h2, + .bodywebsite h3 { + orphans: 3; + widows: 3; + } + .bodywebsite h2, + .bodywebsite h3 { + page-break-after: avoid; + } + .bodywebsite .navbar { + display: none; + } + .bodywebsite .badge { + border: 1px solid #000; + } + .bodywebsite .table { + border-collapse: collapse !important; + } + .bodywebsite .table td, + .bodywebsite .table th { + background-color: #fff !important; + } + .bodywebsite .table-bordered th, + .bodywebsite .table-bordered td { + border: 1px solid #ddd !important; + } +} +.bodywebsite *, +.bodywebsite *::before, +.bodywebsite *::after { + box-sizing: border-box; +} +html .bodywebsite { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +@-ms-viewport { + width: device-width; +} +.bodywebsite article, +.bodywebsite aside, +.bodywebsite dialog, +.bodywebsite figcaption, +.bodywebsite figure, +.bodywebsite footer, +.bodywebsite header, +.bodywebsite hgroup, +.bodywebsite main, +.bodywebsite nav, +.bodywebsite section { + display: block; +} +.bodywebsite { + margin: 0; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight: 400; + line-height: 1.71429; + text-align: left; + background-color: #fff; +} +.bodywebsite [tabindex="-1"]:focus { + outline: none !important; +} +.bodywebsite hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + margin-top: 0; + margin-bottom: 0.5rem; +} +.bodywebsite abbr[title], +.bodywebsite abbr[data-original-title] { + text-decoration: underline; + text-decoration: underline dotted; + cursor: help; + border-bottom: 0; +} +.bodywebsite address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} +.bodywebsite ol, +.bodywebsite ul, +.bodywebsite dl { + margin-top: 0; +} +.bodywebsite ol ol, +.bodywebsite ul ul, +.bodywebsite ol ul, +.bodywebsite ul ol { + margin-bottom: 0; +} +.bodywebsite dt { + font-weight: inherit; +} +.bodywebsite dd { + margin-bottom: .5rem; + margin-left: 0; +} +.bodywebsite blockquote { + margin: 0 0 1rem; +} +.bodywebsite dfn { + font-style: italic; +} +.bodywebsite b, +.bodywebsite strong { + font-weight: bolder; +} +.bodywebsite small { + font-size: 80%; +} +.bodywebsite sub, +.bodywebsite sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +.bodywebsite sub { + bottom: -0.25em; +} +.bodywebsite sup { + top: -0.5em; +} +.bodywebsite a { + text-decoration: none; + -webkit-text-decoration-skip: objects; +} +.bodywebsite a:hover { + text-decoration: none; +} +.bodywebsite a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} +.bodywebsite a:not([href]):not([tabindex]):focus, +.bodywebsite a:not([href]):not([tabindex]):hover { + color: inherit; + text-decoration: none; +} +.bodywebsite a:not([href]):not([tabindex]):focus { + outline: 0; +} +.bodywebsite pre, +.bodywebsite code, +.bodywebsite kbd, +.bodywebsite samp { + font-family: monospace, monospace; + font-size: 1em; +} +.bodywebsite pre { + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + -ms-overflow-style: scrollbar; +} +.bodywebsite figure { + margin: 0 0 1rem; +} +.bodywebsite img { + vertical-align: middle; + border-style: none; +} +.bodywebsite svg:not(:root) { + overflow: hidden; +} +.bodywebsite a, +.bodywebsite area, +.bodywebsite button, +.bodywebsite [role="button"], +.bodywebsite input:not([type="range"]), +.bodywebsite label, +.bodywebsite select, +.bodywebsite summary, +.bodywebsite textarea { + touch-action: manipulation; +} +.bodywebsite table { + border-collapse: collapse; +} +.bodywebsite caption { + padding-top: 17px 25px 18px; + padding-bottom: 17px 25px 18px; + color: #dedede; + text-align: left; + caption-side: bottom; +} +.bodywebsite th { + text-align: inherit; +} +.bodywebsite label { + display: inline-block; + margin-bottom: .5rem; +} +.bodywebsite button { + border-radius: 0; +} +.bodywebsite button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} +.bodywebsite input, +.bodywebsite button, +.bodywebsite select, +.bodywebsite optgroup, +.bodywebsite textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +.bodywebsite button, +.bodywebsite input { + overflow: visible; +} +.bodywebsite button, +.bodywebsite select { + text-transform: none; +} +.bodywebsite button, +html .bodywebsite [type="button"], +.bodywebsite [type="reset"], +.bodywebsite [type="submit"] { + -webkit-appearance: button; +} +.bodywebsite button::-moz-focus-inner, +.bodywebsite [type="button"]::-moz-focus-inner, +.bodywebsite [type="reset"]::-moz-focus-inner, +.bodywebsite [type="submit"]::-moz-focus-inner { + padding: 0; + border-style: none; +} +.bodywebsite input[type="radio"], +.bodywebsite input[type="checkbox"] { + box-sizing: border-box; + padding: 0; +} +.bodywebsite input[type="date"], +.bodywebsite input[type="time"], +.bodywebsite input[type="datetime-local"], +.bodywebsite input[type="month"] { + -webkit-appearance: listbox; +} +.bodywebsite textarea { + overflow: auto; + resize: vertical; +} +.bodywebsite fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +.bodywebsite legend { + display: block; + width: 100%; + max-width: 100%; + padding: 0; + margin-bottom: .5rem; + font-size: 1.5rem; + line-height: inherit; + color: inherit; + white-space: normal; +} +.bodywebsite progress { + vertical-align: baseline; +} +.bodywebsite [type="number"]::-webkit-inner-spin-button, +.bodywebsite [type="number"]::-webkit-outer-spin-button { + height: auto; +} +.bodywebsite [type="search"] { + outline-offset: -2px; + -webkit-appearance: none; +} +.bodywebsite [type="search"]::-webkit-search-cancel-button, +.bodywebsite [type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +.bodywebsite ::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} +.bodywebsite output { + display: inline-block; +} +.bodywebsite summary { + display: list-item; +} +.bodywebsite template { + display: none; +} +.bodywebsite [hidden] { + display: none !important; +} +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6, +.bodywebsite .h1, +.bodywebsite .h2, +.bodywebsite .h3, +.bodywebsite .h4, +.bodywebsite .h5, +.bodywebsite .h6 { + margin-bottom: 0.5rem; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-weight: 700; + line-height: 1.1; + color: #000; +} +.bodywebsite h1, +.bodywebsite .h1 { + font-size: 45px; +} +.bodywebsite h2, +.bodywebsite .h2 { + font-size: 24px; +} +.bodywebsite h3, +.bodywebsite .h3 { + font-size: 33px; +} +.bodywebsite h4, +.bodywebsite .h4 { + font-size: 18px; +} +.bodywebsite .lead { + font-size: 24px; + font-weight: 300; +} +.bodywebsite hr { + margin-top: 1rem; + margin-bottom: 1rem; + border: 0; + border-top: 1px solid #2a2b2b; +} +.bodywebsite small, +.bodywebsite .small { + font-size: 80%; + font-weight: 400; +} +.bodywebsite mark, +.bodywebsite .mark { + padding: 5px 10px; + background-color: #37c386; +} +.bodywebsite .list-unstyled { + padding-left: 0; + list-style: none; +} +.bodywebsite .list-inline { + padding-left: 0; + list-style: none; +} +.bodywebsite .list-inline-item { + display: inline-block; +} +.bodywebsite .list-inline-item:not(:last-child) { + margin-right: 5px; +} +.bodywebsite .initialism { + font-size: 90%; + text-transform: uppercase; +} +.bodywebsite .blockquote { + margin-bottom: 1rem; + font-size: 17.5px; +} +.bodywebsite .blockquote-footer { + display: block; + font-size: 80%; + color: #dedede; +} +.bodywebsite .blockquote-footer::before { + content: "\2014 \00A0"; +} +.bodywebsite .img-fluid { + max-width: 100%; + height: auto; +} +.bodywebsite code, +.bodywebsite kbd, +.bodywebsite pre, +.bodywebsite samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +.bodywebsite code { + padding: 10px 5px; + font-size: 90%; + color: #00030a; + background-color: #edeff4; + border-radius: 0; +} +.bodywebsite a > code { + padding: 0; + color: inherit; + background-color: inherit; +} +.bodywebsite kbd { + padding: 10px 5px; + font-size: 90%; + color: #fff; + background-color: #212529; + border-radius: 3px; + box-shadow: inset 0 -0.1rem 0 rgba(0, 0, 0, 0.25); +} +.bodywebsite kbd kbd { + padding: 0; + font-size: 100%; + font-weight: 700; + box-shadow: none; +} +.bodywebsite pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + font-size: 90%; + color: #212529; +} +.bodywebsite pre code { + padding: 0; + font-size: inherit; + color: inherit; + background-color: transparent; + border-radius: 0; +} +.bodywebsite .pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.bodywebsite .container { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 576px) { + .bodywebsite .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .bodywebsite .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .bodywebsite .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .bodywebsite .container { + max-width: 1170px; + } +} +.bodywebsite .container-fluid { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.bodywebsite .row { + display: flex; + flex-wrap: wrap; + /*margin-right: -15px; + margin-left: -15px; */ +} +.bodywebsite .no-gutters { + margin-right: 0; + margin-left: 0; +} +.bodywebsite .no-gutters > .col, +.bodywebsite .no-gutters > [class*="col-"] { + padding-right: 0; + padding-left: 0; +} +.bodywebsite .col-1, +.bodywebsite .col-2, +.bodywebsite .col-3, +.bodywebsite .col-4, +.bodywebsite .col-5, +.bodywebsite .col-6, +.bodywebsite .col-7, +.bodywebsite .col-8, +.bodywebsite .col-9, +.bodywebsite .col-10, +.bodywebsite .col-11, +.bodywebsite .col-12, +.bodywebsite .col, +.bodywebsite .col-auto, +.bodywebsite .col-sm-1, +.bodywebsite .col-sm-2, +.bodywebsite .col-sm-3, +.bodywebsite .col-sm-4, +.bodywebsite .col-sm-5, +.bodywebsite .col-sm-6, +.bodywebsite .col-sm-7, +.bodywebsite .col-sm-8, +.bodywebsite .col-sm-9, +.bodywebsite .col-sm-10, +.bodywebsite .col-sm-11, +.bodywebsite .col-sm-12, +.bodywebsite .col-sm, +.bodywebsite .col-sm-auto, +.bodywebsite .col-md-1, +.bodywebsite .col-md-2, +.bodywebsite .col-md-3, +.bodywebsite .col-md-4, +.bodywebsite .col-md-5, +.bodywebsite .col-md-6, +.bodywebsite .col-md-7, +.bodywebsite .col-md-8, +.bodywebsite .col-md-9, +.bodywebsite .col-md-10, +.bodywebsite .col-md-11, +.bodywebsite .col-md-12, +.bodywebsite .col-md, +.bodywebsite .col-md-auto, +.bodywebsite .col-lg-1, +.bodywebsite .col-lg-2, +.bodywebsite .col-lg-3, +.bodywebsite .col-lg-4, +.bodywebsite .col-lg-5, +.bodywebsite .col-lg-6, +.bodywebsite .col-lg-7, +.bodywebsite .col-lg-8, +.bodywebsite .col-lg-9, +.bodywebsite .col-lg-10, +.bodywebsite .col-lg-11, +.bodywebsite .col-lg-12, +.bodywebsite .col-lg, +.bodywebsite .col-lg-auto, +.bodywebsite .col-xl-1, +.bodywebsite .col-xl-2, +.bodywebsite .col-xl-3, +.bodywebsite .col-xl-4, +.bodywebsite .col-xl-5, +.bodywebsite .col-xl-6, +.bodywebsite .col-xl-7, +.bodywebsite .col-xl-8, +.bodywebsite .col-xl-9, +.bodywebsite .col-xl-10, +.bodywebsite .col-xl-11, +.bodywebsite .col-xl-12, +.bodywebsite .col-xl, +.bodywebsite .col-xl-auto, +.bodywebsite .col-xxl-1, +.bodywebsite .col-xxl-2, +.bodywebsite .col-xxl-3, +.bodywebsite .col-xxl-4, +.bodywebsite .col-xxl-5, +.bodywebsite .col-xxl-6, +.bodywebsite .col-xxl-7, +.bodywebsite .col-xxl-8, +.bodywebsite .col-xxl-9, +.bodywebsite .col-xxl-10, +.bodywebsite .col-xxl-11, +.bodywebsite .col-xxl-12, +.bodywebsite .col-xxl, +.bodywebsite .col-xxl-auto { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px +} +.bodywebsite .col { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; +} +.bodywebsite .col-auto { + flex: 0 0 auto; + width: auto; + max-width: none; +} +.bodywebsite .col-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; +} +.bodywebsite .col-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; +} +.bodywebsite .col-3 { + flex: 0 0 25%; + max-width: 25%; +} +.bodywebsite .col-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; +} +.bodywebsite .col-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; +} +.bodywebsite .col-6 { + flex: 0 0 50%; + max-width: 50%; +} +.bodywebsite .col-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; +} +.bodywebsite .col-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; +} +.bodywebsite .col-9 { + flex: 0 0 75%; + max-width: 75%; +} +.bodywebsite .col-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; +} +.bodywebsite .col-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; +} +.bodywebsite .col-12 { + flex: 0 0 100%; + max-width: 100%; +} +.bodywebsite .order-first { + order: -1; +} +.bodywebsite .order-1 { + order: 1; +} +.bodywebsite .order-2 { + order: 2; +} +.bodywebsite .order-3 { + order: 3; +} +.bodywebsite .order-4 { + order: 4; +} +.bodywebsite .order-5 { + order: 5; +} +.bodywebsite .order-6 { + order: 6; +} +.bodywebsite .order-7 { + order: 7; +} +.bodywebsite .order-8 { + order: 8; +} +.bodywebsite .order-9 { + order: 9; +} +.bodywebsite .order-10 { + order: 10; +} +.bodywebsite .order-11 { + order: 11; +} +.bodywebsite .order-12 { + order: 12; +} +.bodywebsite .offset-1 { + margin-left: 8.33333%; +} +.bodywebsite .offset-2 { + margin-left: 16.66667%; +} +.bodywebsite .offset-3 { + margin-left: 25%; +} +.bodywebsite .offset-4 { + margin-left: 33.33333%; +} +.bodywebsite .offset-5 { + margin-left: 41.66667%; +} +.bodywebsite .offset-6 { + margin-left: 50%; +} +.bodywebsite .offset-7 { + margin-left: 58.33333%; +} +.bodywebsite .offset-8 { + margin-left: 66.66667%; +} +.bodywebsite .offset-9 { + margin-left: 75%; +} +.bodywebsite .offset-10 { + margin-left: 83.33333%; +} +.bodywebsite .offset-11 { + margin-left: 91.66667%; +} +@media (min-width: 576px) { + .bodywebsite .col-sm { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .bodywebsite .col-sm-auto { + flex: 0 0 auto; + width: auto; + max-width: none; + } + .bodywebsite .col-sm-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .bodywebsite .col-sm-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .bodywebsite .col-sm-3 { + flex: 0 0 25%; + max-width: 25%; + } + .bodywebsite .col-sm-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .bodywebsite .col-sm-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .bodywebsite .col-sm-6 { + flex: 0 0 50%; + max-width: 50%; + } + .bodywebsite .col-sm-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .bodywebsite .col-sm-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .col-sm-9 { + flex: 0 0 75%; + max-width: 75%; + } + .bodywebsite .col-sm-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .bodywebsite .col-sm-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .bodywebsite .col-sm-12 { + flex: 0 0 100%; + max-width: 100%; + } + .bodywebsite .order-sm-first { + order: -1; + } + .bodywebsite .order-sm-1 { + order: 1; + } + .bodywebsite .order-sm-2 { + order: 2; + } + .bodywebsite .order-sm-3 { + order: 3; + } + .bodywebsite .order-sm-4 { + order: 4; + } + .bodywebsite .order-sm-5 { + order: 5; + } + .bodywebsite .order-sm-6 { + order: 6; + } + .bodywebsite .order-sm-7 { + order: 7; + } + .bodywebsite .order-sm-8 { + order: 8; + } + .bodywebsite .order-sm-9 { + order: 9; + } + .bodywebsite .order-sm-10 { + order: 10; + } + .bodywebsite .order-sm-11 { + order: 11; + } + .bodywebsite .order-sm-12 { + order: 12; + } + .bodywebsite .offset-sm-0 { + margin-left: 0; + } + .bodywebsite .offset-sm-1 { + margin-left: 8.33333%; + } + .bodywebsite .offset-sm-2 { + margin-left: 16.66667%; + } + .bodywebsite .offset-sm-3 { + margin-left: 25%; + } + .bodywebsite .offset-sm-4 { + margin-left: 33.33333%; + } + .bodywebsite .offset-sm-5 { + margin-left: 41.66667%; + } + .bodywebsite .offset-sm-6 { + margin-left: 50%; + } + .bodywebsite .offset-sm-7 { + margin-left: 58.33333%; + } + .bodywebsite .offset-sm-8 { + margin-left: 66.66667%; + } + .bodywebsite .offset-sm-9 { + margin-left: 75%; + } + .bodywebsite .offset-sm-10 { + margin-left: 83.33333%; + } + .bodywebsite .offset-sm-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 768px) { + .bodywebsite .col-md { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .bodywebsite .col-md-auto { + flex: 0 0 auto; + width: auto; + max-width: none; + } + .bodywebsite .col-md-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .bodywebsite .col-md-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .bodywebsite .col-md-3 { + flex: 0 0 25%; + max-width: 25%; + } + .bodywebsite .col-md-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .bodywebsite .col-md-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .bodywebsite .col-md-6 { + flex: 0 0 50%; + max-width: 50%; + } + .bodywebsite .col-md-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .bodywebsite .col-md-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .col-md-9 { + flex: 0 0 75%; + max-width: 75%; + } + .bodywebsite .col-md-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .bodywebsite .col-md-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .bodywebsite .col-md-12 { + flex: 0 0 100%; + max-width: 100%; + } + .bodywebsite .order-md-first { + order: -1; + } + .bodywebsite .order-md-1 { + order: 1; + } + .bodywebsite .order-md-2 { + order: 2; + } + .bodywebsite .order-md-3 { + order: 3; + } + .bodywebsite .order-md-4 { + order: 4; + } + .bodywebsite .order-md-5 { + order: 5; + } + .bodywebsite .order-md-6 { + order: 6; + } + .bodywebsite .order-md-7 { + order: 7; + } + .bodywebsite .order-md-8 { + order: 8; + } + .bodywebsite .order-md-9 { + order: 9; + } + .bodywebsite .order-md-10 { + order: 10; + } + .bodywebsite .order-md-11 { + order: 11; + } + .bodywebsite .order-md-12 { + order: 12; + } + .bodywebsite .offset-md-0 { + margin-left: 0; + } + .bodywebsite .offset-md-1 { + margin-left: 8.33333%; + } + .bodywebsite .offset-md-2 { + margin-left: 16.66667%; + } + .bodywebsite .offset-md-3 { + margin-left: 25%; + } + .bodywebsite .offset-md-4 { + margin-left: 33.33333%; + } + .bodywebsite .offset-md-5 { + margin-left: 41.66667%; + } + .bodywebsite .offset-md-6 { + margin-left: 50%; + } + .bodywebsite .offset-md-7 { + margin-left: 58.33333%; + } + .bodywebsite .offset-md-8 { + margin-left: 66.66667%; + } + .bodywebsite .offset-md-9 { + margin-left: 75%; + } + .bodywebsite .offset-md-10 { + margin-left: 83.33333%; + } + .bodywebsite .offset-md-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 992px) { + .bodywebsite .col-lg { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .bodywebsite .col-lg-auto { + flex: 0 0 auto; + width: auto; + max-width: none; + } + .bodywebsite .col-lg-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .bodywebsite .col-lg-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .bodywebsite .col-lg-3 { + flex: 0 0 25%; + max-width: 25%; + } + .bodywebsite .col-lg-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .bodywebsite .col-lg-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .bodywebsite .col-lg-6 { + flex: 0 0 50%; + max-width: 50%; + } + .bodywebsite .col-lg-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .bodywebsite .col-lg-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .col-lg-9 { + flex: 0 0 75%; + max-width: 75%; + } + .bodywebsite .col-lg-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .bodywebsite .col-lg-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .bodywebsite .col-lg-12 { + flex: 0 0 100%; + max-width: 100%; + } + .bodywebsite .order-lg-first { + order: -1; + } + .bodywebsite .order-lg-1 { + order: 1; + } + .bodywebsite .order-lg-2 { + order: 2; + } + .bodywebsite .order-lg-3 { + order: 3; + } + .bodywebsite .order-lg-4 { + order: 4; + } + .bodywebsite .order-lg-5 { + order: 5; + } + .bodywebsite .order-lg-6 { + order: 6; + } + .bodywebsite .order-lg-7 { + order: 7; + } + .bodywebsite .order-lg-8 { + order: 8; + } + .bodywebsite .order-lg-9 { + order: 9; + } + .bodywebsite .order-lg-10 { + order: 10; + } + .bodywebsite .order-lg-11 { + order: 11; + } + .bodywebsite .order-lg-12 { + order: 12; + } + .bodywebsite .offset-lg-0 { + margin-left: 0; + } + .bodywebsite .offset-lg-1 { + margin-left: 8.33333%; + } + .bodywebsite .offset-lg-2 { + margin-left: 16.66667%; + } + .bodywebsite .offset-lg-3 { + margin-left: 25%; + } + .bodywebsite .offset-lg-4 { + margin-left: 33.33333%; + } + .bodywebsite .offset-lg-5 { + margin-left: 41.66667%; + } + .bodywebsite .offset-lg-6 { + margin-left: 50%; + } + .bodywebsite .offset-lg-7 { + margin-left: 58.33333%; + } + .bodywebsite .offset-lg-8 { + margin-left: 66.66667%; + } + .bodywebsite .offset-lg-9 { + margin-left: 75%; + } + .bodywebsite .offset-lg-10 { + margin-left: 83.33333%; + } + .bodywebsite .offset-lg-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 1200px) { + .bodywebsite .col-xl { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .bodywebsite .col-xl-auto { + flex: 0 0 auto; + width: auto; + max-width: none; + } + .bodywebsite .col-xl-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .bodywebsite .col-xl-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .bodywebsite .col-xl-3 { + flex: 0 0 25%; + max-width: 25%; + } + .bodywebsite .col-xl-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .bodywebsite .col-xl-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .bodywebsite .col-xl-6 { + flex: 0 0 50%; + max-width: 50%; + } + .bodywebsite .col-xl-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .bodywebsite .col-xl-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .col-xl-9 { + flex: 0 0 75%; + max-width: 75%; + } + .bodywebsite .col-xl-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .bodywebsite .col-xl-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .bodywebsite .col-xl-12 { + flex: 0 0 100%; + max-width: 100%; + } + .bodywebsite .order-xl-first { + order: -1; + } + .bodywebsite .order-xl-1 { + order: 1; + } + .bodywebsite .order-xl-2 { + order: 2; + } + .bodywebsite .order-xl-3 { + order: 3; + } + .bodywebsite .order-xl-4 { + order: 4; + } + .bodywebsite .order-xl-5 { + order: 5; + } + .bodywebsite .order-xl-6 { + order: 6; + } + .bodywebsite .order-xl-7 { + order: 7; + } + .bodywebsite .order-xl-8 { + order: 8; + } + .bodywebsite .order-xl-9 { + order: 9; + } + .bodywebsite .order-xl-10 { + order: 10; + } + .bodywebsite .order-xl-11 { + order: 11; + } + .bodywebsite .order-xl-12 { + order: 12; + } + .bodywebsite .offset-xl-0 { + margin-left: 0; + } + .bodywebsite .offset-xl-1 { + margin-left: 8.33333%; + } + .bodywebsite .offset-xl-2 { + margin-left: 16.66667%; + } + .bodywebsite .offset-xl-3 { + margin-left: 25%; + } + .bodywebsite .offset-xl-4 { + margin-left: 33.33333%; + } + .bodywebsite .offset-xl-5 { + margin-left: 41.66667%; + } + .bodywebsite .offset-xl-6 { + margin-left: 50%; + } + .bodywebsite .offset-xl-7 { + margin-left: 58.33333%; + } + .bodywebsite .offset-xl-8 { + margin-left: 66.66667%; + } + .bodywebsite .offset-xl-9 { + margin-left: 75%; + } + .bodywebsite .offset-xl-10 { + margin-left: 83.33333%; + } + .bodywebsite .offset-xl-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 1800px) { + .bodywebsite .col-xxl { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .bodywebsite .col-xxl-auto { + flex: 0 0 auto; + width: auto; + max-width: none; + } + .bodywebsite .col-xxl-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .bodywebsite .col-xxl-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .bodywebsite .col-xxl-3 { + flex: 0 0 25%; + max-width: 25%; + } + .bodywebsite .col-xxl-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .bodywebsite .col-xxl-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .bodywebsite .col-xxl-6 { + flex: 0 0 50%; + max-width: 50%; + } + .bodywebsite .col-xxl-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .bodywebsite .col-xxl-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .bodywebsite .col-xxl-9 { + flex: 0 0 75%; + max-width: 75%; + } + .bodywebsite .col-xxl-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .bodywebsite .col-xxl-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .bodywebsite .col-xxl-12 { + flex: 0 0 100%; + max-width: 100%; + } + .bodywebsite .order-xxl-first { + order: -1; + } + .bodywebsite .order-xxl-1 { + order: 1; + } + .bodywebsite .order-xxl-2 { + order: 2; + } + .bodywebsite .order-xxl-3 { + order: 3; + } + .bodywebsite .order-xxl-4 { + order: 4; + } + .bodywebsite .order-xxl-5 { + order: 5; + } + .bodywebsite .order-xxl-6 { + order: 6; + } + .bodywebsite .order-xxl-7 { + order: 7; + } + .bodywebsite .order-xxl-8 { + order: 8; + } + .bodywebsite .order-xxl-9 { + order: 9; + } + .bodywebsite .order-xxl-10 { + order: 10; + } + .bodywebsite .order-xxl-11 { + order: 11; + } + .bodywebsite .order-xxl-12 { + order: 12; + } + .bodywebsite .offset-xxl-0 { + margin-left: 0; + } + .bodywebsite .offset-xxl-1 { + margin-left: 8.33333%; + } + .bodywebsite .offset-xxl-2 { + margin-left: 16.66667%; + } + .bodywebsite .offset-xxl-3 { + margin-left: 25%; + } + .bodywebsite .offset-xxl-4 { + margin-left: 33.33333%; + } + .bodywebsite .offset-xxl-5 { + margin-left: 41.66667%; + } + .bodywebsite .offset-xxl-6 { + margin-left: 50%; + } + .bodywebsite .offset-xxl-7 { + margin-left: 58.33333%; + } + .bodywebsite .offset-xxl-8 { + margin-left: 66.66667%; + } + .bodywebsite .offset-xxl-9 { + margin-left: 75%; + } + .bodywebsite .offset-xxl-10 { + margin-left: 83.33333%; + } + .bodywebsite .offset-xxl-11 { + margin-left: 91.66667%; + } +} +.bodywebsite .table { + width: 100%; + max-width: 100%; + margin-bottom: 1rem; + background-color: transparent; +} +.bodywebsite .table th, +.bodywebsite .table td { + padding: 17px 25px 18px; + vertical-align: top; + border-top: 1px solid #d9d9d9; +} +.bodywebsite .table thead th { + vertical-align: bottom; + border-bottom: 2px solid #d9d9d9; +} +.bodywebsite .table tbody + tbody { + border-top: 2px solid #d9d9d9; +} +.bodywebsite .table .table { + background-color: #fff; +} +.bodywebsite .table-sm th, +.bodywebsite .table-sm td { + padding: 0.3rem; +} +.bodywebsite .table-bordered { + border: 1px solid #d9d9d9; +} +.bodywebsite .table-bordered th, +.bodywebsite .table-bordered td { + border: 1px solid #d9d9d9; +} +.bodywebsite .table-bordered thead th, +.bodywebsite .table-bordered thead td { + border-bottom-width: 2px; +} +.bodywebsite .table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(0, 0, 0, 0.05); +} +.bodywebsite .table-hover tbody tr:hover { + background-color: rgba(0, 0, 0, 0.075); +} +.bodywebsite .table-primary, +.bodywebsite .table-primary > th, +.bodywebsite .table-primary > td { + background-color: #b8daff; +} +.bodywebsite .table-hover .table-primary:hover { + background-color: #9fcdff; +} +.bodywebsite .table-hover .table-primary:hover > td, +.bodywebsite .table-hover .table-primary:hover > th { + background-color: #9fcdff; +} +.bodywebsite .table-secondary, +.bodywebsite .table-secondary > th, +.bodywebsite .table-secondary > td { + background-color: #dddfe2; +} +.bodywebsite .table-hover .table-secondary:hover { + background-color: #cfd2d6; +} +.bodywebsite .table-hover .table-secondary:hover > td, +.bodywebsite .table-hover .table-secondary:hover > th { + background-color: #cfd2d6; +} +.bodywebsite .table-success, +.bodywebsite .table-success > th, +.bodywebsite .table-success > td { + background-color: #c3e6cb; +} +.bodywebsite .table-hover .table-success:hover { + background-color: #b1dfbb; +} +.bodywebsite .table-hover .table-success:hover > td, +.bodywebsite .table-hover .table-success:hover > th { + background-color: #b1dfbb; +} +.bodywebsite .table-info, +.bodywebsite .table-info > th, +.bodywebsite .table-info > td { + background-color: #bee5eb; +} +.bodywebsite .table-hover .table-info:hover { + background-color: #abdde5; +} +.bodywebsite .table-hover .table-info:hover > td, +.bodywebsite .table-hover .table-info:hover > th { + background-color: #abdde5; +} +.bodywebsite .table-warning, +.bodywebsite .table-warning > th, +.bodywebsite .table-warning > td { + background-color: #ffeeba; +} +.bodywebsite .table-hover .table-warning:hover { + background-color: #ffe8a1; +} +.bodywebsite .table-hover .table-warning:hover > td, +.bodywebsite .table-hover .table-warning:hover > th { + background-color: #ffe8a1; +} +.bodywebsite .table-danger, +.bodywebsite .table-danger > th, +.bodywebsite .table-danger > td { + background-color: #f5c6cb; +} +.bodywebsite .table-hover .table-danger:hover { + background-color: #f1b0b7; +} +.bodywebsite .table-hover .table-danger:hover > td, +.bodywebsite .table-hover .table-danger:hover > th { + background-color: #f1b0b7; +} +.bodywebsite .table-light, +.bodywebsite .table-light > th, +.bodywebsite .table-light > td { + background-color: #fdfdfe; +} +.bodywebsite .table-hover .table-light:hover { + background-color: #ececf6; +} +.bodywebsite .table-hover .table-light:hover > td, +.bodywebsite .table-hover .table-light:hover > th { + background-color: #ececf6; +} +.bodywebsite .table-dark, +.bodywebsite .table-dark > th, +.bodywebsite .table-dark > td { + background-color: #c6c8ca; +} +.bodywebsite .table-hover .table-dark:hover { + background-color: #b9bbbe; +} +.bodywebsite .table-hover .table-dark:hover > td, +.bodywebsite .table-hover .table-dark:hover > th { + background-color: #b9bbbe; +} +.bodywebsite .table-active, +.bodywebsite .table-active > th, +.bodywebsite .table-active > td { + background-color: rgba(0, 0, 0, 0.075); +} +.bodywebsite .table-hover .table-active:hover { + background-color: rgba(0, 0, 0, 0.075); +} +.bodywebsite .table-hover .table-active:hover > td, +.bodywebsite .table-hover .table-active:hover > th { + background-color: rgba(0, 0, 0, 0.075); +} +.bodywebsite .table .thead-dark th { + color: #fff; + background-color: #212529; + border-color: #32383e; +} +.bodywebsite .table .thead-light th { + color: #495057; + background-color: #e9ecef; + border-color: #d9d9d9; +} +.bodywebsite .table-dark { + color: #fff; + background-color: #212529; +} +.bodywebsite .table-dark th, +.bodywebsite .table-dark td, +.bodywebsite .table-dark thead th { + border-color: #32383e; +} +.bodywebsite .table-dark.table-bordered { + border: 0; +} +.bodywebsite .table-dark.table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(255, 255, 255, 0.05); +} +.bodywebsite .table-dark.table-hover tbody tr:hover { + background-color: rgba(255, 255, 255, 0.075); +} +@media (max-width: 575px) { + .bodywebsite .table-responsive-sm { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .bodywebsite .table-responsive-sm.table-bordered { + border: 0; + } +} +@media (max-width: 767px) { + .bodywebsite .table-responsive-md { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .bodywebsite .table-responsive-md.table-bordered { + border: 0; + } +} +@media (max-width: 991px) { + .bodywebsite .table-responsive-lg { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .bodywebsite .table-responsive-lg.table-bordered { + border: 0; + } +} +@media (max-width: 1199px) { + .bodywebsite .table-responsive-xl { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .bodywebsite .table-responsive-xl.table-bordered { + border: 0; + } +} +@media (max-width: 1799px) { + .bodywebsite .table-responsive-xxl { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .bodywebsite .table-responsive-xxl.table-bordered { + border: 0; + } +} +.bodywebsite .table-responsive { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; +} +.bodywebsite .table-responsive.table-bordered { + border: 0; +} +.bodywebsite .form-input { + display: block; + width: 100%; + padding: 11px 35px; + font-size: 14px; + line-height: 1.25; + background-image: none; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: 0.25rem; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; +} +.bodywebsite .form-input::-ms-expand { + background-color: transparent; + border: 0; +} +.bodywebsite .form-input:focus { + color: #495057; + background-color: #fff; + border-color: #80bdff; + outline: none; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} +.bodywebsite .form-input::placeholder { + color: #868e96; + opacity: 1; +} +.bodywebsite .form-input:disabled, +.bodywebsite .form-input[readonly] { + background-color: #e9ecef; + opacity: 1; +} +.bodywebsite select.form-input:not([size]):not([multiple]) { + height: calc(4.25rem); +} +.bodywebsite .form-input-file, +.bodywebsite .form-input-range { + display: block; +} +.bodywebsite .col-form-label { + padding-top: calc(12px); + padding-bottom: calc(12px); + margin-bottom: 0; + line-height: 1.25; +} +.bodywebsite .col-form-label-lg { + padding-top: calc(13px); + padding-bottom: calc(13px); + font-size: 18px; + line-height: 1.5; +} +.bodywebsite .col-form-label-sm { + padding-top: calc(6px); + padding-bottom: calc(6px); + font-size: 12px; + line-height: 1.5; +} +.bodywebsite .col-form-legend { + padding-top: 11px; + padding-bottom: 11px; + margin-bottom: 0; + font-size: 14px; +} +.bodywebsite .form-input-plaintext { + padding-top: 11px; + padding-bottom: 11px; + margin-bottom: 0; + line-height: 1.25; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} +.bodywebsite .form-input-plaintext.form-input-sm, +.bodywebsite .input-group-sm > .form-input-plaintext.form-input, +.bodywebsite .input-group-sm > .form-input-plaintext.input-group-addon, +.bodywebsite .input-group-sm > .input-group-btn > .form-input-plaintext.btn, +.bodywebsite .form-input-plaintext.form-input-lg, +.bodywebsite .input-group-lg > .form-input-plaintext.form-input, +.bodywebsite .input-group-lg > .form-input-plaintext.input-group-addon, +.bodywebsite .input-group-lg > .input-group-btn > .form-input-plaintext.btn { + padding-right: 0; + padding-left: 0; +} +.bodywebsite .form-input-sm, +.bodywebsite .input-group-sm > .form-input, +.bodywebsite .input-group-sm > .input-group-addon, +.bodywebsite .input-group-sm > .input-group-btn > .btn { + padding: 5px 25px; + font-size: 12px; + line-height: 1.5; + border-radius: 0.2rem; +} +.bodywebsite select.form-input-sm:not([size]):not([multiple]), +.bodywebsite .input-group-sm > select.form-input:not([size]):not([multiple]), +.bodywebsite .input-group-sm > select.input-group-addon:not([size]):not([multiple]), +.bodywebsite .input-group-sm > .input-group-btn > select.btn:not([size]):not([multiple]) { + height: calc(3.8125rem); +} +.bodywebsite .form-input-lg, +.bodywebsite .input-group-lg > .form-input, +.bodywebsite .input-group-lg > .input-group-addon, +.bodywebsite .input-group-lg > .input-group-btn > .btn { + padding: 12px 50px; + font-size: 18px; + line-height: 1.5; + border-radius: 0.3rem; +} +.bodywebsite select.form-input-lg:not([size]):not([multiple]), +.bodywebsite .input-group-lg > select.form-input:not([size]):not([multiple]), +.bodywebsite .input-group-lg > select.input-group-addon:not([size]):not([multiple]), +.bodywebsite .input-group-lg > .input-group-btn > select.btn:not([size]):not([multiple]) { + height: calc(4.875rem); +} +.bodywebsite .form-label { + margin-bottom: 1rem; +} +.bodywebsite .form-text { + display: block; + margin-top: 0.25rem; +} +.bodywebsite .form-row { + display: flex; + flex-wrap: wrap; + margin-right: -5px; + margin-left: -5px; +} +.bodywebsite .form-row > .col, +.bodywebsite .form-row > [class*="col-"] { + padding-right: 5px; + padding-left: 5px; +} +.bodywebsite .form-check { + position: relative; + display: block; + margin-bottom: 0.5rem; +} +.bodywebsite .form-check.disabled .form-check-label { + color: #dedede; +} +.bodywebsite .form-check-label { + padding-left: 1.25rem; + margin-bottom: 0; +} +.bodywebsite .form-check-input { + position: absolute; + margin-top: 0.25rem; + margin-left: -1.25rem; +} +.bodywebsite .form-check-inline { + display: inline-block; + margin-right: 0.75rem; +} +.bodywebsite .form-check-inline .form-check-label { + vertical-align: middle; +} +.bodywebsite .was-validated .form-input:valid, +.bodywebsite .form-input.is-valid, +.bodywebsite .was-validated .custom-select:valid, +.bodywebsite .custom-select.is-valid { + border-color: #98bf44; +} +.bodywebsite .was-validated .form-input:valid:focus, +.bodywebsite .form-input.is-valid:focus, +.bodywebsite .was-validated .custom-select:valid:focus, +.bodywebsite .custom-select.is-valid:focus { + box-shadow: 0 0 0 0.2rem rgba(152, 191, 68, 0.25); +} +.bodywebsite .was-validated .form-check-input:valid + .form-check-label, +.bodywebsite .form-check-input.is-valid + .form-check-label { + color: #98bf44; +} +.bodywebsite .was-validated .custom-control-input:valid ~ .custom-control-indicator, +.bodywebsite .custom-control-input.is-valid ~ .custom-control-indicator { + background-color: rgba(152, 191, 68, 0.25); +} +.bodywebsite .was-validated .custom-control-input:valid ~ .custom-control-description, +.bodywebsite .custom-control-input.is-valid ~ .custom-control-description { + color: #98bf44; +} +.bodywebsite .was-validated .custom-file-input:valid ~ .custom-file-control, +.bodywebsite .custom-file-input.is-valid ~ .custom-file-control { + border-color: #98bf44; +} +.bodywebsite .was-validated .custom-file-input:valid ~ .custom-file-control::before, +.bodywebsite .custom-file-input.is-valid ~ .custom-file-control::before { + border-color: inherit; +} +.bodywebsite .was-validated .custom-file-input:valid:focus, +.bodywebsite .custom-file-input.is-valid:focus { + box-shadow: 0 0 0 0.2rem rgba(152, 191, 68, 0.25); +} +.bodywebsite .was-validated .form-input:invalid, +.bodywebsite .form-input.is-invalid, +.bodywebsite .was-validated .custom-select:invalid, +.bodywebsite .custom-select.is-invalid { + border-color: #f5543f; +} +.bodywebsite .was-validated .form-input:invalid:focus, +.bodywebsite .form-input.is-invalid:focus, +.bodywebsite .was-validated .custom-select:invalid:focus, +.bodywebsite .custom-select.is-invalid:focus { + box-shadow: 0 0 0 0.2rem rgba(245, 84, 63, 0.25); +} +.bodywebsite .was-validated .form-check-input:invalid + .form-check-label, +.bodywebsite .form-check-input.is-invalid + .form-check-label { + color: #f5543f; +} +.bodywebsite .was-validated .custom-control-input:invalid ~ .custom-control-indicator, +.bodywebsite .custom-control-input.is-invalid ~ .custom-control-indicator { + background-color: rgba(245, 84, 63, 0.25); +} +.bodywebsite .was-validated .custom-control-input:invalid ~ .custom-control-description, +.bodywebsite .custom-control-input.is-invalid ~ .custom-control-description { + color: #f5543f; +} +.bodywebsite .was-validated .custom-file-input:invalid ~ .custom-file-control, +.bodywebsite .custom-file-input.is-invalid ~ .custom-file-control { + border-color: #f5543f; +} +.bodywebsite .was-validated .custom-file-input:invalid ~ .custom-file-control::before, +.bodywebsite .custom-file-input.is-invalid ~ .custom-file-control::before { + border-color: inherit; +} +.bodywebsite .was-validated .custom-file-input:invalid:focus, +.bodywebsite .custom-file-input.is-invalid:focus { + box-shadow: 0 0 0 0.2rem rgba(245, 84, 63, 0.25); +} +.bodywebsite .form-inline { + display: flex; + flex-flow: row wrap; + align-items: center; +} +.bodywebsite .form-inline .form-check { + width: 100%; +} +@media (min-width: 576px) { + .bodywebsite .form-inline label { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 0; + } + .bodywebsite .form-inline .form-label { + display: flex; + flex: 0 0 auto; + flex-flow: row wrap; + align-items: center; + margin-bottom: 0; + } + .bodywebsite .form-inline .form-input { + display: inline-block; + width: auto; + vertical-align: middle; + } + .bodywebsite .form-inline .form-input-plaintext { + display: inline-block; + } + .bodywebsite .form-inline .input-group { + width: auto; + } + .bodywebsite .form-inline .form-check { + display: flex; + align-items: center; + justify-content: center; + width: auto; + margin-top: 0; + margin-bottom: 0; + } + .bodywebsite .form-inline .form-check-label { + padding-left: 0; + } + .bodywebsite .form-inline .form-check-input { + position: relative; + margin-top: 0; + margin-right: 0.25rem; + margin-left: 0; + } + .bodywebsite .form-inline .custom-control { + display: flex; + align-items: center; + justify-content: center; + padding-left: 0; + } + .bodywebsite .form-inline .custom-control-indicator { + position: static; + display: inline-block; + margin-right: 0.25rem; + vertical-align: text-bottom; + } + .bodywebsite .form-inline .has-feedback .form-input-feedback { + top: 0; + } +} +.bodywebsite .btn { + display: inline-block; + font-weight: 700; + text-align: center; + white-space: nowrap; + vertical-align: middle; + user-select: none; + border: 1px solid transparent; + padding: 11px 35px; + font-size: 14px; + line-height: 1.25; + border-radius: 5px; + transition: all 0.15s ease-in-out; +} +.bodywebsite .btn:focus, +.bodywebsite .btn:hover { + text-decoration: none; +} +.bodywebsite .btn:focus, +.bodywebsite .btn.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} +.bodywebsite .btn.disabled, +.bodywebsite .btn:disabled { + opacity: .65; + box-shadow: none; +} +.bodywebsite .btn:not([disabled]):not(.disabled):active, +.bodywebsite .btn:not([disabled]):not(.disabled).active { + background-image: none; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25), 0; +} +.bodywebsite a.btn.disabled, +.bodywebsite fieldset[disabled] a.btn { + pointer-events: none; +} +.bodywebsite .btn-primary { + color: #fff; + background-color: #007bff; + border-color: #007bff; + box-shadow: 0; +} +.bodywebsite .btn-primary:focus, +.bodywebsite .btn-primary.focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} +.bodywebsite .btn-primary.maincolorbisbackground:focus, +.bodywebsite .btn-primary.maincolorbisbackground.focus { + box-shadow: 0 0 0 0.2rem rgba(0, 255, 123, 0.5); +} +.bodywebsite .btn-primary.maincolorbisbackground:hover { + box-shadow: 1px 1px 8px #aaa; +} +.bodywebsite .btn-primary.disabled, +.bodywebsite .btn-primary:disabled { + background-color: #007bff; + border-color: #007bff; +} +.bodywebsite .btn-primary:not([disabled]):not(.disabled):active, +.bodywebsite .btn-primary:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-primary.dropdown-toggle { + color: #fff; + background-color: #0062cc; + border-color: #005cbf; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} +.bodywebsite .btn-secondary { + color: #fff; + background-color: #868e96; + border-color: #868e96; + box-shadow: 0; +} +.bodywebsite .btn-secondary:hover { + color: #fff; + background-color: #727b84; + border-color: #6c757d; +} +.bodywebsite .btn-secondary:focus, +.bodywebsite .btn-secondary.focus { + box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); +} +.bodywebsite .btn-secondary.disabled, +.bodywebsite .btn-secondary:disabled { + background-color: #868e96; + border-color: #868e96; +} +.bodywebsite .btn-secondary:not([disabled]):not(.disabled):active, +.bodywebsite .btn-secondary:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-secondary.dropdown-toggle { + color: #fff; + background-color: #6c757d; + border-color: #666e76; + box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); +} +.bodywebsite .btn-success { + color: #fff; + background-color: #28a745; + border-color: #28a745; + box-shadow: 0; +} +.bodywebsite .btn-success:hover { + color: #fff; + background-color: #218838; + border-color: #1e7e34; +} +.bodywebsite .btn-success:focus, +.bodywebsite .btn-success.focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} +.bodywebsite .btn-success.disabled, +.bodywebsite .btn-success:disabled { + background-color: #28a745; + border-color: #28a745; +} +.bodywebsite .btn-success:not([disabled]):not(.disabled):active, +.bodywebsite .btn-success:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-success.dropdown-toggle { + color: #fff; + background-color: #1e7e34; + border-color: #1c7430; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} +.bodywebsite .btn-info { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; + box-shadow: 0; +} +.bodywebsite .btn-info:hover { + color: #fff; + background-color: #138496; + border-color: #117a8b; +} +.bodywebsite .btn-info:focus, +.bodywebsite .btn-info.focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} +.bodywebsite .btn-info.disabled, +.bodywebsite .btn-info:disabled { + background-color: #17a2b8; + border-color: #17a2b8; +} +.bodywebsite .btn-info:not([disabled]):not(.disabled):active, +.bodywebsite .btn-info:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-info.dropdown-toggle { + color: #fff; + background-color: #117a8b; + border-color: #10707f; + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} +.bodywebsite .btn-warning { + color: #111; + background-color: #ffc107; + border-color: #ffc107; + box-shadow: 0; +} +.bodywebsite .btn-warning:hover { + color: #111; + background-color: #e0a800; + border-color: #d39e00; +} +.bodywebsite .btn-warning:focus, +.bodywebsite .btn-warning.focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} +.bodywebsite .btn-warning.disabled, +.bodywebsite .btn-warning:disabled { + background-color: #ffc107; + border-color: #ffc107; +} +.bodywebsite .btn-warning:not([disabled]):not(.disabled):active, +.bodywebsite .btn-warning:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-warning.dropdown-toggle { + color: #111; + background-color: #d39e00; + border-color: #c69500; + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} +.bodywebsite .btn-danger { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; + box-shadow: 0; +} +.bodywebsite .btn-danger:hover { + color: #fff; + background-color: #c82333; + border-color: #bd2130; +} +.bodywebsite .btn-danger:focus, +.bodywebsite .btn-danger.focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} +.bodywebsite .btn-danger.disabled, +.bodywebsite .btn-danger:disabled { + background-color: #dc3545; + border-color: #dc3545; +} +.bodywebsite .btn-danger:not([disabled]):not(.disabled):active, +.bodywebsite .btn-danger:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-danger.dropdown-toggle { + color: #fff; + background-color: #bd2130; + border-color: #b21f2d; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} +.bodywebsite .btn-light { + color: #111; + background-color: #f8f9fa; + border-color: #f8f9fa; + box-shadow: 0; +} +.bodywebsite .btn-light:hover { + color: #111; + background-color: #e2e6ea; + border-color: #dae0e5; +} +.bodywebsite .btn-light:focus, +.bodywebsite .btn-light.focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} +.bodywebsite .btn-light.disabled, +.bodywebsite .btn-light:disabled { + background-color: #f8f9fa; + border-color: #f8f9fa; +} +.bodywebsite .btn-light:not([disabled]):not(.disabled):active, +.bodywebsite .btn-light:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-light.dropdown-toggle { + color: #111; + background-color: #dae0e5; + border-color: #d3d9df; + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} +.bodywebsite .btn-dark { + color: #fff; + background-color: #343a40; + border-color: #343a40; + box-shadow: 0; +} +.bodywebsite .btn-dark:hover { + color: #fff; + background-color: #23272b; + border-color: #1d2124; +} +.bodywebsite .btn-dark:focus, +.bodywebsite .btn-dark.focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} +.bodywebsite .btn-dark.disabled, +.bodywebsite .btn-dark:disabled { + background-color: #343a40; + border-color: #343a40; +} +.bodywebsite .btn-dark:not([disabled]):not(.disabled):active, +.bodywebsite .btn-dark:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-dark.dropdown-toggle { + color: #fff; + background-color: #1d2124; + border-color: #171a1d; + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} +.bodywebsite .btn-outline-primary { + color: #007bff; + background-color: transparent; + background-image: none; + border-color: #007bff; +} +.bodywebsite .btn-outline-primary:hover { + color: #fff; + background-color: #007bff; + border-color: #007bff; +} +.bodywebsite .btn-outline-primary:focus, +.bodywebsite .btn-outline-primary.focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} +.bodywebsite .btn-outline-primary.disabled, +.bodywebsite .btn-outline-primary:disabled { + color: #007bff; + background-color: transparent; +} +.bodywebsite .btn-outline-primary:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-primary:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-primary.dropdown-toggle { + color: #fff; + background-color: #007bff; + border-color: #007bff; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} +.bodywebsite .btn-outline-secondary { + color: #868e96; + background-color: transparent; + background-image: none; + border-color: #868e96; +} +.bodywebsite .btn-outline-secondary:hover { + color: #fff; + background-color: #868e96; + border-color: #868e96; +} +.bodywebsite .btn-outline-secondary:focus, +.bodywebsite .btn-outline-secondary.focus { + box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); +} +.bodywebsite .btn-outline-secondary.disabled, +.bodywebsite .btn-outline-secondary:disabled { + color: #868e96; + background-color: transparent; +} +.bodywebsite .btn-outline-secondary:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-secondary:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-secondary.dropdown-toggle { + color: #fff; + background-color: #868e96; + border-color: #868e96; + box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); +} +.bodywebsite .btn-outline-success { + color: #28a745; + background-color: transparent; + background-image: none; + border-color: #28a745; +} +.bodywebsite .btn-outline-success:hover { + color: #fff; + background-color: #28a745; + border-color: #28a745; +} +.bodywebsite .btn-outline-success:focus, +.bodywebsite .btn-outline-success.focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} +.bodywebsite .btn-outline-success.disabled, +.bodywebsite .btn-outline-success:disabled { + color: #28a745; + background-color: transparent; +} +.bodywebsite .btn-outline-success:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-success:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-success.dropdown-toggle { + color: #fff; + background-color: #28a745; + border-color: #28a745; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} +.bodywebsite .btn-outline-info { + color: #17a2b8; + background-color: transparent; + background-image: none; + border-color: #17a2b8; +} +.bodywebsite .btn-outline-info:hover { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; +} +.bodywebsite .btn-outline-info:focus, +.bodywebsite .btn-outline-info.focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} +.bodywebsite .btn-outline-info.disabled, +.bodywebsite .btn-outline-info:disabled { + color: #17a2b8; + background-color: transparent; +} +.bodywebsite .btn-outline-info:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-info:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-info.dropdown-toggle { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} +.bodywebsite .btn-outline-warning { + color: #ffc107; + background-color: transparent; + background-image: none; + border-color: #ffc107; +} +.bodywebsite .btn-outline-warning:hover { + color: #fff; + background-color: #ffc107; + border-color: #ffc107; +} +.bodywebsite .btn-outline-warning:focus, +.bodywebsite .btn-outline-warning.focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} +.bodywebsite .btn-outline-warning.disabled, +.bodywebsite .btn-outline-warning:disabled { + color: #ffc107; + background-color: transparent; +} +.bodywebsite .btn-outline-warning:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-warning:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-warning.dropdown-toggle { + color: #fff; + background-color: #ffc107; + border-color: #ffc107; + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} +.bodywebsite .btn-outline-danger { + color: #dc3545; + background-color: transparent; + background-image: none; + border-color: #dc3545; +} +.bodywebsite .btn-outline-danger:hover { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; +} +.bodywebsite .btn-outline-danger:focus, +.bodywebsite .btn-outline-danger.focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} +.bodywebsite .btn-outline-danger.disabled, +.bodywebsite .btn-outline-danger:disabled { + color: #dc3545; + background-color: transparent; +} +.bodywebsite .btn-outline-danger:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-danger:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-danger.dropdown-toggle { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} +.bodywebsite .btn-outline-light { + color: #f8f9fa; + background-color: transparent; + background-image: none; + border-color: #f8f9fa; +} +.bodywebsite .btn-outline-light:hover { + color: #00030a; + background-color: #f8f9fa; + border-color: #f8f9fa; +} +.bodywebsite .btn-outline-light:focus, +.bodywebsite .btn-outline-light.focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} +.bodywebsite .btn-outline-light.disabled, +.bodywebsite .btn-outline-light:disabled { + color: #f8f9fa; + background-color: transparent; +} +.bodywebsite .btn-outline-light:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-light:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-light.dropdown-toggle { + color: #00030a; + background-color: #f8f9fa; + border-color: #f8f9fa; + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} +.bodywebsite .btn-outline-dark { + color: #343a40; + background-color: transparent; + background-image: none; + border-color: #343a40; +} +.bodywebsite .btn-outline-dark:hover { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} +.bodywebsite .btn-outline-dark:focus, +.bodywebsite .btn-outline-dark.focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} +.bodywebsite .btn-outline-dark.disabled, +.bodywebsite .btn-outline-dark:disabled { + color: #343a40; + background-color: transparent; +} +.bodywebsite .btn-outline-dark:not([disabled]):not(.disabled):active, +.bodywebsite .btn-outline-dark:not([disabled]):not(.disabled).active, +.bodywebsite .show > .btn-outline-dark.dropdown-toggle { + color: #fff; + background-color: #343a40; + border-color: #343a40; + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} +.bodywebsite .btn-link { + font-weight: 400; + color: #37c386; + background-color: transparent; +} +.bodywebsite .btn-link:hover { + color: #26875d; + text-decoration: none; + background-color: transparent; + border-color: transparent; +} +.bodywebsite .btn-link:focus, +.bodywebsite .btn-link.focus { + border-color: transparent; + box-shadow: none; +} +.bodywebsite .btn-link:disabled, +.bodywebsite .btn-link.disabled { + color: #dedede; +} +.bodywebsite .btn-lg, +.bodywebsite .btn-group-lg > .btn { + padding: 12px 50px; + font-size: 18px; + line-height: 1.5; + border-radius: 6px; +} +.bodywebsite .btn-sm, +.bodywebsite .btn-group-sm > .btn { + padding: 5px 25px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.bodywebsite .btn-block { + display: block; + width: 100%; +} +.bodywebsite .btn-block + .btn-block { + margin-top: 0.5rem; +} +.bodywebsite input[type="submit"].btn-block, +.bodywebsite input[type="reset"].btn-block, +.bodywebsite input[type="button"].btn-block { + width: 100%; +} +.bodywebsite .fade { + opacity: 0; + transition: opacity 0.15s linear; +} +.bodywebsite .fade.show { + opacity: 1; +} +.bodywebsite .collapse { + display: none; +} +.bodywebsite .collapse.show { + display: block; +} +.bodywebsite tr.collapse.show { + display: table-row; +} +.bodywebsite tbody.collapse.show { + display: table-row-group; +} +.bodywebsite .collapsing { + position: relative; + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} +.bodywebsite .dropup, +.bodywebsite .dropdown { + position: relative; +} +.bodywebsite .dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} +.bodywebsite .dropdown-toggle:empty::after { + margin-left: 0; +} +.bodywebsite .dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 10rem; + padding: 0.5rem 0; + margin: 0.125rem 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0; + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175); +} +.bodywebsite .dropup .dropdown-menu { + margin-top: 0; + margin-bottom: 0.125rem; +} +.bodywebsite .dropup .dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} +.bodywebsite .dropup .dropdown-toggle:empty::after { + margin-left: 0; +} +.bodywebsite .dropdown-divider { + height: 0; + margin: 0.5rem 0; + overflow: hidden; + border-top: 1px solid #e5e5e5; +} +.bodywebsite .dropdown-item { + display: block; + width: 100%; + padding: 0.25rem 1.5rem; + clear: both; + font-weight: 400; + color: #2a2b2b; + text-align: inherit; + white-space: nowrap; + background: none; + border: 0; +} +.bodywebsite .dropdown-item:focus, +.bodywebsite .dropdown-item:hover { + color: #1d1e1e; + text-decoration: none; + background-color: #f5f5f5; +} +.bodywebsite .dropdown-item.active, +.bodywebsite .dropdown-item:active { + color: #2a2b2b; + text-decoration: none; + background-color: #37c386; +} +.bodywebsite .dropdown-item.disabled, +.bodywebsite .dropdown-item:disabled { + color: #dedede; + background-color: transparent; +} +.bodywebsite .dropdown-menu.show { + display: block; +} +.bodywebsite .dropdown-header { + display: block; + padding: 0.5rem 1.5rem; + margin-bottom: 0; + font-size: 12px; + color: #dedede; + white-space: nowrap; +} +.bodywebsite .btn-group, +.bodywebsite .btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} +.bodywebsite .btn-group > .btn, +.bodywebsite .btn-group-vertical > .btn { + position: relative; + flex: 0 1 auto; +} +.bodywebsite .btn-group > .btn:hover, +.bodywebsite .btn-group-vertical > .btn:hover { + z-index: 2; +} +.bodywebsite .btn-group > .btn:focus, +.bodywebsite .btn-group > .btn:active, +.bodywebsite .btn-group > .btn.active, +.bodywebsite .btn-group-vertical > .btn:focus, +.bodywebsite .btn-group-vertical > .btn:active, +.bodywebsite .btn-group-vertical > .btn.active { + z-index: 2; +} +.bodywebsite .btn-group .btn + .btn, +.bodywebsite .btn-group .btn + .btn-group, +.bodywebsite .btn-group .btn-group + .btn, +.bodywebsite .btn-group .btn-group + .btn-group, +.bodywebsite .btn-group-vertical .btn + .btn, +.bodywebsite .btn-group-vertical .btn + .btn-group, +.bodywebsite .btn-group-vertical .btn-group + .btn, +.bodywebsite .btn-group-vertical .btn-group + .btn-group { + margin-left: -1px; +} +.bodywebsite .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} +.bodywebsite .btn-toolbar .input-group { + width: auto; +} +.bodywebsite .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.bodywebsite .btn-group > .btn:first-child { + margin-left: 0; +} +.bodywebsite .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.bodywebsite .btn-group > .btn:last-child:not(:first-child), +.bodywebsite .btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite .btn-group > .btn-group { + float: left; +} +.bodywebsite .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.bodywebsite .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.bodywebsite .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.bodywebsite .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite .btn + .dropdown-toggle-split { + padding-right: 26.25px; + padding-left: 26.25px; +} +.bodywebsite .btn + .dropdown-toggle-split::after { + margin-left: 0; +} +.bodywebsite .btn-sm + .dropdown-toggle-split, +.bodywebsite .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 18.75px; + padding-left: 18.75px; +} +.bodywebsite .btn-lg + .dropdown-toggle-split, +.bodywebsite .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 37.5px; + padding-left: 37.5px; +} +.bodywebsite .btn-group.show .dropdown-toggle { + box-shadow: 0; +} +.bodywebsite .btn-group.show .dropdown-toggle.btn-link { + box-shadow: none; +} +.bodywebsite .btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} +.bodywebsite .btn-group-vertical .btn, +.bodywebsite .btn-group-vertical .btn-group { + width: 100%; +} +.bodywebsite .btn-group-vertical > .btn + .btn, +.bodywebsite .btn-group-vertical > .btn + .btn-group, +.bodywebsite .btn-group-vertical > .btn-group + .btn, +.bodywebsite .btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.bodywebsite .btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.bodywebsite .btn-group-vertical > .btn:first-child:not(:last-child) { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite .btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.bodywebsite .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.bodywebsite .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.bodywebsite .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.bodywebsite [data-toggle="buttons"] > .btn input[type="radio"], +.bodywebsite [data-toggle="buttons"] > .btn input[type="checkbox"], +.bodywebsite [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +.bodywebsite [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.bodywebsite .input-group { + position: relative; + display: flex; + align-items: stretch; + width: 100%; +} +.bodywebsite .input-group .form-input { + position: relative; + z-index: 2; + flex: 1 1 auto; + width: 1%; + margin-bottom: 0; +} +.bodywebsite .input-group .form-input:focus, +.bodywebsite .input-group .form-input:active, +.bodywebsite .input-group .form-input:hover { + z-index: 3; +} +.bodywebsite .input-group-addon, +.bodywebsite .input-group-btn, +.bodywebsite .input-group .form-input { + display: flex; + align-items: center; +} +.bodywebsite .input-group-addon:not(:first-child):not(:last-child), +.bodywebsite .input-group-btn:not(:first-child):not(:last-child), +.bodywebsite .input-group .form-input:not(:first-child):not(:last-child) { + border-radius: 0; +} +.bodywebsite .input-group-addon, +.bodywebsite .input-group-btn { + white-space: nowrap; +} +.bodywebsite .input-group-addon { + padding: 11px 35px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.25; + color: #495057; + text-align: center; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.25rem; +} +.bodywebsite .input-group-addon.form-input-sm, +.bodywebsite .input-group-sm > .input-group-addon, +.bodywebsite .input-group-sm > .input-group-btn > .input-group-addon.btn { + padding: 5px 25px; + font-size: 12px; + border-radius: 0.2rem; +} +.bodywebsite .input-group-addon.form-input-lg, +.bodywebsite .input-group-lg > .input-group-addon, +.bodywebsite .input-group-lg > .input-group-btn > .input-group-addon.btn { + padding: 12px 50px; + font-size: 18px; + border-radius: 0.3rem; +} +.bodywebsite .input-group-addon input[type="radio"], +.bodywebsite .input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.bodywebsite .input-group .form-input:not(:last-child), +.bodywebsite .input-group-addon:not(:last-child), +.bodywebsite .input-group-btn:not(:last-child) > .btn, +.bodywebsite .input-group-btn:not(:last-child) > .btn-group > .btn, +.bodywebsite .input-group-btn:not(:last-child) > .dropdown-toggle, +.bodywebsite .input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle), +.bodywebsite .input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.bodywebsite .input-group-addon:not(:last-child) { + border-right: 0; +} +.bodywebsite .input-group .form-input:not(:first-child), +.bodywebsite .input-group-addon:not(:first-child), +.bodywebsite .input-group-btn:not(:first-child) > .btn, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group > .btn, +.bodywebsite .input-group-btn:not(:first-child) > .dropdown-toggle, +.bodywebsite .input-group-btn:not(:last-child) > .btn:not(:first-child), +.bodywebsite .input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite .form-input + .input-group-addon:not(:first-child) { + border-left: 0; +} +.bodywebsite .input-group-btn { + position: relative; + align-items: stretch; + font-size: 0; + white-space: nowrap; +} +.bodywebsite .input-group-btn > .btn { + position: relative; +} +.bodywebsite .input-group-btn > .btn + .btn { + margin-left: -1px; +} +.bodywebsite .input-group-btn > .btn:focus, +.bodywebsite .input-group-btn > .btn:active, +.bodywebsite .input-group-btn > .btn:hover { + z-index: 3; +} +.bodywebsite .input-group-btn:first-child > .btn + .btn { + margin-left: 0; +} +.bodywebsite .input-group-btn:not(:last-child) > .btn, +.bodywebsite .input-group-btn:not(:last-child) > .btn-group { + margin-right: -1px; +} +.bodywebsite .input-group-btn:not(:first-child) > .btn, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group { + z-index: 2; + margin-left: 0; +} +.bodywebsite .input-group-btn:not(:first-child) > .btn:first-child, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group:first-child { + margin-left: -1px; +} +.bodywebsite .input-group-btn:not(:first-child) > .btn:focus, +.bodywebsite .input-group-btn:not(:first-child) > .btn:active, +.bodywebsite .input-group-btn:not(:first-child) > .btn:hover, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group:focus, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group:active, +.bodywebsite .input-group-btn:not(:first-child) > .btn-group:hover { + z-index: 3; +} +.bodywebsite .custom-control { + position: relative; + display: inline-flex; + min-height: 1.71429rem; + padding-left: 1.5rem; + margin-right: 1rem; +} +.bodywebsite .custom-control-input { + position: absolute; + z-index: -1; + opacity: 0; +} +.bodywebsite .custom-control-input:checked ~ .custom-control-indicator { + color: #fff; + background-color: #007bff; + box-shadow: none; +} +.bodywebsite .custom-control-input:focus ~ .custom-control-indicator { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} +.bodywebsite .custom-control-input:active ~ .custom-control-indicator { + color: #fff; + background-color: #b3d7ff; + box-shadow: none; +} +.bodywebsite .custom-control-input:disabled ~ .custom-control-indicator { + background-color: #e9ecef; +} +.bodywebsite .custom-control-input:disabled ~ .custom-control-description { + color: #868e96; +} +.bodywebsite .custom-control-indicator { + position: absolute; + top: 0.35714rem; + left: 0; + display: block; + width: 1rem; + height: 1rem; + pointer-events: none; + user-select: none; + background-color: #ddd; + background-repeat: no-repeat; + background-position: center center; + background-size: 50% 50%; + box-shadow: inset 0 0.25rem 0.25rem rgba(0, 0, 0, 0.1); +} +.bodywebsite .custom-checkbox .custom-control-indicator { + border-radius: 0.25rem; +} +.bodywebsite .custom-checkbox .custom-control-input:checked ~ .custom-control-indicator { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"); +} +.bodywebsite .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-indicator { + background-color: #007bff; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E"); + box-shadow: none; +} +.bodywebsite .custom-radio .custom-control-indicator { + border-radius: 50%; +} +.bodywebsite .custom-radio .custom-control-input:checked ~ .custom-control-indicator { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E"); +} +.bodywebsite .custom-controls-stacked { + display: flex; + flex-direction: column; +} +.bodywebsite .custom-controls-stacked .custom-control { + margin-bottom: 0.25rem; +} +.bodywebsite .custom-controls-stacked .custom-control + .custom-control { + margin-left: 0; +} +.bodywebsite .custom-select { + display: inline-block; + max-width: 100%; + height: calc(4.25rem); + padding: 0.375rem 1.75rem 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + vertical-align: middle; + background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center; + background-size: 8px 10px; + border: 1px solid #ced4da; + border-radius: 0.25rem; + appearance: none; +} +.bodywebsite .custom-select:focus { + border-color: #80bdff; + outline: none; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(128, 189, 255, 0.5); +} +.bodywebsite .custom-select[multiple] { + height: auto; + background-image: none; +} +.bodywebsite .custom-select:disabled { + color: #868e96; + background-color: #e9ecef; +} +.bodywebsite .custom-select::-ms-expand { + opacity: 0; +} +.bodywebsite .custom-select-sm { + height: calc(3.8125rem); + padding-top: 0.375rem; + padding-bottom: 0.375rem; + font-size: 75%; +} +.bodywebsite .custom-file { + position: relative; + display: inline-block; + max-width: 100%; + height: calc(4.25rem); + margin-bottom: 0; +} +.bodywebsite .custom-file-input { + min-width: 14rem; + max-width: 100%; + height: calc(4.25rem); + margin: 0; + opacity: 0; +} +.bodywebsite .custom-file-input:focus ~ .custom-file-control { + box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #007bff; +} +.bodywebsite .custom-file-control { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 5; + height: calc(4.25rem); + padding: 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + pointer-events: none; + user-select: none; + background-color: #fff; + border: 1px solid #ced4da; + border-radius: 0.25rem; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.bodywebsite .custom-file-control:lang(en):empty::after { + content: "Choose file..."; +} +.bodywebsite .custom-file-control::before { + position: absolute; + top: -1px; + right: -1px; + bottom: -1px; + z-index: 6; + display: block; + height: calc(4.25rem); + padding: 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0 0.25rem 0.25rem 0; +} +.bodywebsite .custom-file-control:lang(en)::before { + content: "Browse"; +} +.bodywebsite .nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.bodywebsite .nav-link { + display: block; + padding: 0.5rem 1rem; +} +.bodywebsite .nav-link:focus, +.bodywebsite .nav-link:hover { + text-decoration: none; +} +.bodywebsite .nav-link.disabled { + color: #868e96; +} +.bodywebsite .nav-tabs { + border-bottom: 1px solid #ddd; +} +.bodywebsite .nav-tabs .nav-item { + margin-bottom: -1px; +} +.bodywebsite .nav-tabs .nav-link { + border: 1px solid transparent; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} +.bodywebsite .nav-tabs .nav-link:focus, +.bodywebsite .nav-tabs .nav-link:hover { + border-color: #f9f9f9 #f9f9f9 #ddd; +} +.bodywebsite .nav-tabs .nav-link.disabled { + color: #868e96; + background-color: transparent; + border-color: transparent; +} +.bodywebsite .nav-tabs .nav-link.active, +.bodywebsite .nav-tabs .nav-item.show .nav-link { + color: #495057; + background-color: #fff; + border-color: #ddd #ddd #fff; +} +.bodywebsite .nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.bodywebsite .nav-pills .nav-link { + border-radius: 0; +} +.bodywebsite .nav-pills .nav-link.active, +.bodywebsite .nav-pills .show > .nav-link { + color: #fff; + background-color: #007bff; +} +.bodywebsite .nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} +.bodywebsite .nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} +.bodywebsite .tab-content > .tab-pane { + display: none; +} +.bodywebsite .tab-content > .active { + display: block; +} +.bodywebsite .navbar { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: 0.5rem 1rem; +} +.bodywebsite .navbar > .container, +.bodywebsite .navbar > .container-fluid { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; +} +.bodywebsite .navbar-brand { + display: inline-block; + padding-top: 0.3125rem; + padding-bottom: 0.3125rem; + margin-right: 1rem; + font-size: 1.25rem; + line-height: inherit; + white-space: nowrap; +} +.bodywebsite .navbar-brand:focus, +.bodywebsite .navbar-brand:hover { + text-decoration: none; +} +.bodywebsite .navbar-nav { + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.bodywebsite .navbar-nav .nav-link { + padding-right: 0; + padding-left: 0; +} +.bodywebsite .navbar-nav .dropdown-menu { + position: static; + float: none; +} +.bodywebsite .navbar-text { + display: inline-block; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.bodywebsite .navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} +.bodywebsite .navbar-toggler { + padding: 0.25rem 0.75rem; + font-size: 1.25rem; + line-height: 1; + background: transparent; + border: 1px solid transparent; + border-radius: 0.25rem; +} +.bodywebsite .navbar-toggler:focus, +.bodywebsite .navbar-toggler:hover { + text-decoration: none; +} +.bodywebsite .navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + content: ""; + background: no-repeat center center; + background-size: 100% 100%; +} +@media (max-width: 575px) { + .bodywebsite .navbar-expand-sm > .container, + .bodywebsite .navbar-expand-sm > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} +@media (min-width: 576px) { + .bodywebsite .navbar-expand-sm { + flex-flow: row nowrap; + justify-content: flex-start; + } + .bodywebsite .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .bodywebsite .navbar-expand-sm .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + .bodywebsite .navbar-expand-sm > .container, + .bodywebsite .navbar-expand-sm > .container-fluid { + flex-wrap: nowrap; + } + .bodywebsite .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .bodywebsite .navbar-expand-sm .navbar-toggler { + display: none; + } + .bodywebsite .navbar-expand-sm .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } +} +@media (max-width: 767px) { + .bodywebsite .navbar-expand-md > .container, + .bodywebsite .navbar-expand-md > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} +@media (min-width: 768px) { + .bodywebsite .navbar-expand-md { + flex-flow: row nowrap; + justify-content: flex-start; + } + .bodywebsite .navbar-expand-md .navbar-nav { + flex-direction: row; + } + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .bodywebsite .navbar-expand-md .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + .bodywebsite .navbar-expand-md > .container, + .bodywebsite .navbar-expand-md > .container-fluid { + flex-wrap: nowrap; + } + .bodywebsite .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .bodywebsite .navbar-expand-md .navbar-toggler { + display: none; + } + .bodywebsite .navbar-expand-md .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } +} +@media (max-width: 991px) { + .bodywebsite .navbar-expand-lg > .container, + .bodywebsite .navbar-expand-lg > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} +@media (min-width: 992px) { + .bodywebsite .navbar-expand-lg { + flex-flow: row nowrap; + justify-content: flex-start; + } + .bodywebsite .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + .bodywebsite .navbar-expand-lg > .container, + .bodywebsite .navbar-expand-lg > .container-fluid { + flex-wrap: nowrap; + } + .bodywebsite .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .bodywebsite .navbar-expand-lg .navbar-toggler { + display: none; + } + .bodywebsite .navbar-expand-lg .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } +} +@media (max-width: 1199px) { + .bodywebsite .navbar-expand-xl > .container, + .bodywebsite .navbar-expand-xl > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} +@media (min-width: 1200px) { + .bodywebsite .navbar-expand-xl { + flex-flow: row nowrap; + justify-content: flex-start; + } + .bodywebsite .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .bodywebsite .navbar-expand-xl .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + .bodywebsite .navbar-expand-xl > .container, + .bodywebsite .navbar-expand-xl > .container-fluid { + flex-wrap: nowrap; + } + .bodywebsite .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .bodywebsite .navbar-expand-xl .navbar-toggler { + display: none; + } + .bodywebsite .navbar-expand-xl .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } +} +@media (max-width: 1799px) { + .bodywebsite .navbar-expand-xxl > .container, + .bodywebsite .navbar-expand-xxl > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} +@media (min-width: 1800px) { + .bodywebsite .navbar-expand-xxl { + flex-flow: row nowrap; + justify-content: flex-start; + } + .bodywebsite .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; + } + .bodywebsite .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + } + .bodywebsite .navbar-expand-xxl > .container, + .bodywebsite .navbar-expand-xxl > .container-fluid { + flex-wrap: nowrap; + } + .bodywebsite .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .bodywebsite .navbar-expand-xxl .navbar-toggler { + display: none; + } + .bodywebsite .navbar-expand-xxl .dropup .dropdown-menu { + top: auto; + bottom: 100%; + } +} +.bodywebsite .navbar-expand { + flex-flow: row nowrap; + justify-content: flex-start; +} +.bodywebsite .navbar-expand > .container, +.bodywebsite .navbar-expand > .container-fluid { + padding-right: 0; + padding-left: 0; +} +.bodywebsite .navbar-expand .navbar-nav { + flex-direction: row; +} +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu-right { + right: 0; + left: auto; +} +.bodywebsite .navbar-expand .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; +} +.bodywebsite .navbar-expand > .container, +.bodywebsite .navbar-expand > .container-fluid { + flex-wrap: nowrap; +} +.bodywebsite .navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} +.bodywebsite .navbar-expand .navbar-toggler { + display: none; +} +.bodywebsite .navbar-expand .dropup .dropdown-menu { + top: auto; + bottom: 100%; +} +.bodywebsite .navbar-light .navbar-brand { + color: rgba(0, 0, 0, 0.9); +} +.bodywebsite .navbar-light .navbar-brand:focus, +.bodywebsite .navbar-light .navbar-brand:hover { + color: rgba(0, 0, 0, 0.9); +} +.bodywebsite .navbar-light .navbar-nav .nav-link { + color: rgba(0, 0, 0, 0.5); +} +.bodywebsite .navbar-light .navbar-nav .nav-link:focus, +.bodywebsite .navbar-light .navbar-nav .nav-link:hover { + color: rgba(0, 0, 0, 0.7); +} +.bodywebsite .navbar-light .navbar-nav .nav-link.disabled { + color: rgba(0, 0, 0, 0.3); +} +.bodywebsite .navbar-light .navbar-nav .show > .nav-link, +.bodywebsite .navbar-light .navbar-nav .active > .nav-link, +.bodywebsite .navbar-light .navbar-nav .nav-link.show, +.bodywebsite .navbar-light .navbar-nav .nav-link.active { + color: rgba(0, 0, 0, 0.9); +} +.bodywebsite .navbar-light .navbar-toggler { + color: rgba(0, 0, 0, 0.5); + border-color: rgba(0, 0, 0, 0.1); +} +.bodywebsite .navbar-light .navbar-toggler-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); +} +.bodywebsite .navbar-light .navbar-text { + color: rgba(0, 0, 0, 0.5); +} +.bodywebsite .navbar-light .navbar-text a { + color: rgba(0, 0, 0, 0.9); +} +.bodywebsite .navbar-light .navbar-text a:focus, +.bodywebsite .navbar-light .navbar-text a:hover { + color: rgba(0, 0, 0, 0.9); +} +.bodywebsite .navbar-dark .navbar-brand { + color: #fff; +} +.bodywebsite .navbar-dark .navbar-brand:focus, +.bodywebsite .navbar-dark .navbar-brand:hover { + color: #fff; +} +.bodywebsite .navbar-dark .navbar-nav .nav-link { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .navbar-dark .navbar-nav .nav-link:focus, +.bodywebsite .navbar-dark .navbar-nav .nav-link:hover { + color: rgba(255, 255, 255, 0.75); +} +.bodywebsite .navbar-dark .navbar-nav .nav-link.disabled { + color: rgba(255, 255, 255, 0.25); +} +.bodywebsite .navbar-dark .navbar-nav .show > .nav-link, +.bodywebsite .navbar-dark .navbar-nav .active > .nav-link, +.bodywebsite .navbar-dark .navbar-nav .nav-link.show, +.bodywebsite .navbar-dark .navbar-nav .nav-link.active { + color: #fff; +} +.bodywebsite .navbar-dark .navbar-toggler { + color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.1); +} +.bodywebsite .navbar-dark .navbar-toggler-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); +} +.bodywebsite .navbar-dark .navbar-text { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .navbar-dark .navbar-text a { + color: #fff; +} +.bodywebsite .navbar-dark .navbar-text a:focus, +.bodywebsite .navbar-dark .navbar-text a:hover { + color: #fff; +} +.bodywebsite .jumbotron { + padding: 2rem 1rem; + margin-bottom: 2rem; + background-color: #e9ecef; + border-radius: 6px; +} +@media (min-width: 576px) { + .bodywebsite .jumbotron { + padding: 4rem 2rem; + } +} +.bodywebsite .jumbotron-fluid { + padding-right: 0; + padding-left: 0; + border-radius: 0; +} +.bodywebsite .alert { + position: relative; + padding: 0.75rem 1.25rem; + margin-bottom: 1rem; + border: 1px solid transparent; + border-radius: 0.25rem; +} +.bodywebsite .alert-heading { + color: inherit; +} +.bodywebsite .alert-link { + font-weight: 700; +} +.bodywebsite .alert-dismissible .close { + position: absolute; + top: 0; + right: 0; + padding: 0.75rem 1.25rem; + color: inherit; +} +.bodywebsite .alert-primary { + color: #004085; + background-color: #cce5ff; + border-color: #b8daff; +} +.bodywebsite .alert-primary hr { + border-top-color: #9fcdff; +} +.bodywebsite .alert-primary .alert-link { + color: #002752; +} +.bodywebsite .alert-secondary { + color: #464a4e; + background-color: #e7e8ea; + border-color: #dddfe2; +} +.bodywebsite .alert-secondary hr { + border-top-color: #cfd2d6; +} +.bodywebsite .alert-secondary .alert-link { + color: #2e3133; +} +.bodywebsite .alert-success { + color: #155724; + background-color: #d4edda; + border-color: #c3e6cb; +} +.bodywebsite .alert-success hr { + border-top-color: #b1dfbb; +} +.bodywebsite .alert-success .alert-link { + color: #0b2e13; +} +.bodywebsite .alert-info { + color: #0c5460; + background-color: #d1ecf1; + border-color: #bee5eb; +} +.bodywebsite .alert-info hr { + border-top-color: #abdde5; +} +.bodywebsite .alert-info .alert-link { + color: #062c33; +} +.bodywebsite .alert-warning { + color: #856404; + background-color: #fff3cd; + border-color: #ffeeba; +} +.bodywebsite .alert-warning hr { + border-top-color: #ffe8a1; +} +.bodywebsite .alert-warning .alert-link { + color: #533f03; +} +.bodywebsite .alert-danger { + color: #721c24; + background-color: #f8d7da; + border-color: #f5c6cb; +} +.bodywebsite .alert-danger hr { + border-top-color: #f1b0b7; +} +.bodywebsite .alert-danger .alert-link { + color: #491217; +} +.bodywebsite .alert-light { + color: #818182; + background-color: #fefefe; + border-color: #fdfdfe; +} +.bodywebsite .alert-light hr { + border-top-color: #ececf6; +} +.bodywebsite .alert-light .alert-link { + color: #686868; +} +.bodywebsite .alert-dark { + color: #1b1e21; + background-color: #d6d8d9; + border-color: #c6c8ca; +} +.bodywebsite .alert-dark hr { + border-top-color: #b9bbbe; +} +.bodywebsite .alert-dark .alert-link { + color: #040505; +} +@keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} +.bodywebsite .progress { + display: flex; + height: 1rem; + overflow: hidden; + font-size: 0.75rem; + background-color: #e9ecef; + border-radius: 0.25rem; +} +.bodywebsite .progress-bar { + display: flex; + align-items: center; + justify-content: center; + color: #fff; + background-color: #007bff; +} +.bodywebsite .progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; +} +.bodywebsite .progress-bar-animated { + animation: progress-bar-stripes 1s linear infinite; +} +.bodywebsite .media { + display: flex; + align-items: flex-start; +} +.bodywebsite .media-body { + flex: 1; +} +.bodywebsite .list-group { + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; +} +.bodywebsite .list-group-item-action { + width: 100%; + color: #495057; + text-align: inherit; +} +.bodywebsite .list-group-item-action:focus, +.bodywebsite .list-group-item-action:hover { + color: #495057; + text-decoration: none; + background-color: #f8f9fa; +} +.bodywebsite .list-group-item-action:active { + color: #212529; + background-color: #e9ecef; +} +.bodywebsite .list-group-item { + position: relative; + display: block; + padding: 0.75rem 1.25rem; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.125); +} +.bodywebsite .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} +.bodywebsite .list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.bodywebsite .list-group-item:focus, +.bodywebsite .list-group-item:hover { + text-decoration: none; +} +.bodywebsite .list-group-item.disabled, +.bodywebsite .list-group-item:disabled { + color: #868e96; + background-color: #fff; +} +.bodywebsite .list-group-item.active { + z-index: 2; + color: #fff; + background-color: #007bff; + border-color: #007bff; +} +.bodywebsite .list-group-flush .list-group-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} +.bodywebsite .list-group-flush:first-child .list-group-item:first-child { + border-top: 0; +} +.bodywebsite .list-group-flush:last-child .list-group-item:last-child { + border-bottom: 0; +} +.bodywebsite .list-group-item-primary { + color: #004085; + background-color: #b8daff; +} +.bodywebsite a.list-group-item-primary, +.bodywebsite button.list-group-item-primary { + color: #004085; +} +.bodywebsite a.list-group-item-primary:focus, +.bodywebsite a.list-group-item-primary:hover, +.bodywebsite button.list-group-item-primary:focus, +.bodywebsite button.list-group-item-primary:hover { + color: #004085; + background-color: #9fcdff; +} +.bodywebsite a.list-group-item-primary.active, +.bodywebsite button.list-group-item-primary.active { + color: #fff; + background-color: #004085; + border-color: #004085; +} +.bodywebsite .list-group-item-secondary { + color: #464a4e; + background-color: #dddfe2; +} +.bodywebsite a.list-group-item-secondary, +.bodywebsite button.list-group-item-secondary { + color: #464a4e; +} +.bodywebsite a.list-group-item-secondary:focus, +.bodywebsite a.list-group-item-secondary:hover, +.bodywebsite button.list-group-item-secondary:focus, +.bodywebsite button.list-group-item-secondary:hover { + color: #464a4e; + background-color: #cfd2d6; +} +.bodywebsite a.list-group-item-secondary.active, +.bodywebsite button.list-group-item-secondary.active { + color: #fff; + background-color: #464a4e; + border-color: #464a4e; +} +.bodywebsite .list-group-item-success { + color: #155724; + background-color: #c3e6cb; +} +.bodywebsite a.list-group-item-success, +.bodywebsite button.list-group-item-success { + color: #155724; +} +.bodywebsite a.list-group-item-success:focus, +.bodywebsite a.list-group-item-success:hover, +.bodywebsite button.list-group-item-success:focus, +.bodywebsite button.list-group-item-success:hover { + color: #155724; + background-color: #b1dfbb; +} +.bodywebsite a.list-group-item-success.active, +.bodywebsite button.list-group-item-success.active { + color: #fff; + background-color: #155724; + border-color: #155724; +} +.bodywebsite .list-group-item-info { + color: #0c5460; + background-color: #bee5eb; +} +.bodywebsite a.list-group-item-info, +.bodywebsite button.list-group-item-info { + color: #0c5460; +} +.bodywebsite a.list-group-item-info:focus, +.bodywebsite a.list-group-item-info:hover, +.bodywebsite button.list-group-item-info:focus, +.bodywebsite button.list-group-item-info:hover { + color: #0c5460; + background-color: #abdde5; +} +.bodywebsite a.list-group-item-info.active, +.bodywebsite button.list-group-item-info.active { + color: #fff; + background-color: #0c5460; + border-color: #0c5460; +} +.bodywebsite .list-group-item-warning { + color: #856404; + background-color: #ffeeba; +} +.bodywebsite a.list-group-item-warning, +.bodywebsite button.list-group-item-warning { + color: #856404; +} +.bodywebsite a.list-group-item-warning:focus, +.bodywebsite a.list-group-item-warning:hover, +.bodywebsite button.list-group-item-warning:focus, +.bodywebsite button.list-group-item-warning:hover { + color: #856404; + background-color: #ffe8a1; +} +.bodywebsite a.list-group-item-warning.active, +.bodywebsite button.list-group-item-warning.active { + color: #fff; + background-color: #856404; + border-color: #856404; +} +.bodywebsite .list-group-item-danger { + color: #721c24; + background-color: #f5c6cb; +} +.bodywebsite a.list-group-item-danger, +.bodywebsite button.list-group-item-danger { + color: #721c24; +} +.bodywebsite a.list-group-item-danger:focus, +.bodywebsite a.list-group-item-danger:hover, +.bodywebsite button.list-group-item-danger:focus, +.bodywebsite button.list-group-item-danger:hover { + color: #721c24; + background-color: #f1b0b7; +} +.bodywebsite a.list-group-item-danger.active, +.bodywebsite button.list-group-item-danger.active { + color: #fff; + background-color: #721c24; + border-color: #721c24; +} +.bodywebsite .list-group-item-light { + color: #818182; + background-color: #fdfdfe; +} +.bodywebsite a.list-group-item-light, +.bodywebsite button.list-group-item-light { + color: #818182; +} +.bodywebsite a.list-group-item-light:focus, +.bodywebsite a.list-group-item-light:hover, +.bodywebsite button.list-group-item-light:focus, +.bodywebsite button.list-group-item-light:hover { + color: #818182; + background-color: #ececf6; +} +.bodywebsite a.list-group-item-light.active, +.bodywebsite button.list-group-item-light.active { + color: #fff; + background-color: #818182; + border-color: #818182; +} +.bodywebsite .list-group-item-dark { + color: #1b1e21; + background-color: #c6c8ca; +} +.bodywebsite a.list-group-item-dark, +.bodywebsite button.list-group-item-dark { + color: #1b1e21; +} +.bodywebsite a.list-group-item-dark:focus, +.bodywebsite a.list-group-item-dark:hover, +.bodywebsite button.list-group-item-dark:focus, +.bodywebsite button.list-group-item-dark:hover { + color: #1b1e21; + background-color: #b9bbbe; +} +.bodywebsite a.list-group-item-dark.active, +.bodywebsite button.list-group-item-dark.active { + color: #fff; + background-color: #1b1e21; + border-color: #1b1e21; +} +.bodywebsite .close { + float: right; + font-size: 1.5rem; + font-weight: 700; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + opacity: .5; +} +.bodywebsite .close:focus, +.bodywebsite .close:hover { + color: #000; + text-decoration: none; + opacity: .75; +} +.bodywebsite button.close { + padding: 0; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.bodywebsite .tooltip { + position: absolute; + z-index: 1070; + display: block; + margin: 0; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; + line-height: 1.71429; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + white-space: normal; + line-break: auto; + font-size: 12px; + word-wrap: break-word; + opacity: 0; +} +.bodywebsite .tooltip.show { + opacity: 1; +} +.bodywebsite .tooltip .arrow { + position: absolute; + display: block; + width: 6px; + height: 6px; +} +.bodywebsite .tooltip .arrow::before { + position: absolute; + border-color: transparent; + border-style: solid; +} +.bodywebsite .tooltip.bs-tooltip-top, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="top"] { + padding: 6px 0; +} +.bodywebsite .tooltip.bs-tooltip-top .arrow, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow { + bottom: 0; +} +.bodywebsite .tooltip.bs-tooltip-top .arrow::before, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before { + margin-left: -4px; + content: ""; + border-width: 6px 6px 0; + border-top-color: #37c386; +} +.bodywebsite .tooltip.bs-tooltip-right, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="right"] { + padding: 0 6px; +} +.bodywebsite .tooltip.bs-tooltip-right .arrow, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow { + left: 0; +} +.bodywebsite .tooltip.bs-tooltip-right .arrow::before, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow::before { + margin-top: -4px; + content: ""; + border-width: 6px 6px 6px 0; + border-right-color: #37c386; +} +.bodywebsite .tooltip.bs-tooltip-bottom, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="bottom"] { + padding: 6px 0; +} +.bodywebsite .tooltip.bs-tooltip-bottom .arrow, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow { + top: 0; +} +.bodywebsite .tooltip.bs-tooltip-bottom .arrow::before, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow::before { + margin-left: -4px; + content: ""; + border-width: 0 6px 6px; + border-bottom-color: #37c386; +} +.bodywebsite .tooltip.bs-tooltip-left, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="left"] { + padding: 0 6px; +} +.bodywebsite .tooltip.bs-tooltip-left .arrow, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow { + right: 0; +} +.bodywebsite .tooltip.bs-tooltip-left .arrow::before, +.bodywebsite .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow::before { + right: 0; + margin-top: -4px; + content: ""; + border-width: 6px 0 6px 6px; + border-left-color: #37c386; +} +.bodywebsite .tooltip-inner { + max-width: 200px; + padding: 6px 10px; + color: #fff; + text-align: center; + background-color: #37c386; + border-radius: 0; +} +.bodywebsite .popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: block; + max-width: 276px; + font-family: "Roboto", Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; + line-height: 1.71429; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + white-space: normal; + line-break: auto; + font-size: 12px; + word-wrap: break-word; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2); +} +.bodywebsite .popover .arrow { + position: absolute; + display: block; + width: 0.8rem; + height: 0.4rem; +} +.bodywebsite .popover .arrow::before, +.bodywebsite .popover .arrow::after { + position: absolute; + display: block; + border-color: transparent; + border-style: solid; +} +.bodywebsite .popover .arrow::before { + content: ""; + border-width: 0.8rem; +} +.bodywebsite .popover .arrow::after { + content: ""; + border-width: 0.8rem; +} +.bodywebsite .popover.bs-popover-top, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] { + margin-bottom: 0.8rem; +} +.bodywebsite .popover.bs-popover-top .arrow, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] .arrow { + bottom: 0; +} +.bodywebsite .popover.bs-popover-top .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] .arrow::before, +.bodywebsite .popover.bs-popover-top .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] .arrow::after { + border-bottom-width: 0; +} +.bodywebsite .popover.bs-popover-top .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] .arrow::before { + bottom: -0.8rem; + margin-left: -0.8rem; + border-top-color: rgba(0, 0, 0, 0.25); +} +.bodywebsite .popover.bs-popover-top .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="top"] .arrow::after { + bottom: calc(0.2rem); + margin-left: -0.8rem; + border-top-color: #fff; +} +.bodywebsite .popover.bs-popover-right, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] { + margin-left: 0.8rem; +} +.bodywebsite .popover.bs-popover-right .arrow, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] .arrow { + left: 0; +} +.bodywebsite .popover.bs-popover-right .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] .arrow::before, +.bodywebsite .popover.bs-popover-right .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] .arrow::after { + margin-top: -0.8rem; + border-left-width: 0; +} +.bodywebsite .popover.bs-popover-right .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] .arrow::before { + left: -0.8rem; + border-right-color: rgba(0, 0, 0, 0.25); +} +.bodywebsite .popover.bs-popover-right .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="right"] .arrow::after { + left: calc(0.2rem); + border-right-color: #fff; +} +.bodywebsite .popover.bs-popover-bottom, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] { + margin-top: 0.8rem; +} +.bodywebsite .popover.bs-popover-bottom .arrow, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .arrow { + top: 0; +} +.bodywebsite .popover.bs-popover-bottom .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .arrow::before, +.bodywebsite .popover.bs-popover-bottom .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .arrow::after { + margin-left: -0.8rem; + border-top-width: 0; +} +.bodywebsite .popover.bs-popover-bottom .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .arrow::before { + top: -0.8rem; + border-bottom-color: rgba(0, 0, 0, 0.25); +} +.bodywebsite .popover.bs-popover-bottom .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .arrow::after { + top: calc(0.2rem); + border-bottom-color: #fff; +} +.bodywebsite .popover.bs-popover-bottom .popover-header::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="bottom"] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: 20px; + margin-left: -10px; + content: ""; + border-bottom: 1px solid #f7f7f7; +} +.bodywebsite .popover.bs-popover-left, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] { + margin-right: 0.8rem; +} +.bodywebsite .popover.bs-popover-left .arrow, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] .arrow { + right: 0; +} +.bodywebsite .popover.bs-popover-left .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] .arrow::before, +.bodywebsite .popover.bs-popover-left .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] .arrow::after { + margin-top: -0.8rem; + border-right-width: 0; +} +.bodywebsite .popover.bs-popover-left .arrow::before, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] .arrow::before { + right: -0.8rem; + border-left-color: rgba(0, 0, 0, 0.25); +} +.bodywebsite .popover.bs-popover-left .arrow::after, +.bodywebsite .popover.bs-popover-auto[x-placement^="left"] .arrow::after { + right: calc(0.2rem); + border-left-color: #fff; +} +.bodywebsite .popover-header { + padding: 0.5rem 0.75rem; + margin-bottom: 0; + font-size: 14px; + color: inherit; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-top-left-radius: calc(5px); + border-top-right-radius: calc(5px); +} +.bodywebsite .popover-header:empty { + display: none; +} +.bodywebsite .popover-body { + padding: 0.5rem 0.75rem; + color: #212529; +} +.bodywebsite .carousel { + position: relative; +} +.bodywebsite .carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.bodywebsite .carousel-item { + position: relative; + display: none; + align-items: center; + width: 100%; + transition: transform 0.6s ease; + backface-visibility: hidden; + perspective: 1000px; +} +.bodywebsite .carousel-item.active, +.bodywebsite .carousel-item-next, +.bodywebsite .carousel-item-prev { + display: block; +} +.bodywebsite .carousel-item-next, +.bodywebsite .carousel-item-prev { + position: absolute; + top: 0; +} +.bodywebsite .carousel-item-next.carousel-item-left, +.bodywebsite .carousel-item-prev.carousel-item-right { + transform: translateX(0); +} +@supports (transform-style: preserve-3d) { + .bodywebsite .carousel-item-next.carousel-item-left, + .bodywebsite .carousel-item-prev.carousel-item-right { + transform: translate3d(0, 0, 0); + } +} +.bodywebsite .carousel-item-next, +.bodywebsite .active.carousel-item-right { + transform: translateX(100%); +} +@supports (transform-style: preserve-3d) { + .bodywebsite .carousel-item-next, + .bodywebsite .active.carousel-item-right { + transform: translate3d(100%, 0, 0); + } +} +.bodywebsite .carousel-item-prev, +.bodywebsite .active.carousel-item-left { + transform: translateX(-100%); +} +@supports (transform-style: preserve-3d) { + .bodywebsite .carousel-item-prev, + .bodywebsite .active.carousel-item-left { + transform: translate3d(-100%, 0, 0); + } +} +.bodywebsite .carousel-control-prev, +.bodywebsite .carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + color: #fff; + text-align: center; + opacity: 0.5; +} +.bodywebsite .carousel-control-prev:focus, +.bodywebsite .carousel-control-prev:hover, +.bodywebsite .carousel-control-next:focus, +.bodywebsite .carousel-control-next:hover { + color: #fff; + text-decoration: none; + outline: 0; + opacity: .9; +} +.bodywebsite .carousel-control-prev { + left: 0; +} +.bodywebsite .carousel-control-next { + right: 0; +} +.bodywebsite .carousel-control-prev-icon, +.bodywebsite .carousel-control-next-icon { + display: inline-block; + width: 20px; + height: 20px; + background: transparent no-repeat center center; + background-size: 100% 100%; +} +.bodywebsite .carousel-control-prev-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"); +} +.bodywebsite .carousel-control-next-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"); +} +.bodywebsite .carousel-indicators { + position: absolute; + right: 0; + bottom: 10px; + left: 0; + z-index: 15; + display: flex; + justify-content: center; + padding-left: 0; + margin-right: 15%; + margin-left: 15%; + list-style: none; +} +.bodywebsite .carousel-indicators li { + position: relative; + flex: 0 1 auto; + width: 30px; + height: 3px; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + background-color: rgba(255, 255, 255, 0.5); +} +.bodywebsite .carousel-indicators li::before { + position: absolute; + top: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; +} +.bodywebsite .carousel-indicators li::after { + position: absolute; + bottom: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; +} +.bodywebsite .carousel-indicators .active { + background-color: #fff; +} +.bodywebsite .carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; +} +.bodywebsite .align-baseline { + vertical-align: baseline !important; +} +.bodywebsite .align-top { + vertical-align: top !important; +} +.bodywebsite .align-middle { + vertical-align: middle !important; +} +.bodywebsite .align-bottom { + vertical-align: bottom !important; +} +.bodywebsite .align-text-bottom { + vertical-align: text-bottom !important; +} +.bodywebsite .align-text-top { + vertical-align: text-top !important; +} +.bodywebsite .bg-primary { + background-color: #007bff !important; +} +.bodywebsite a.bg-primary:focus, +.bodywebsite a.bg-primary:hover { + background-color: #0062cc !important; +} +.bodywebsite .bg-secondary { + background-color: #868e96 !important; +} +.bodywebsite a.bg-secondary:focus, +.bodywebsite a.bg-secondary:hover { + background-color: #6c757d !important; +} +.bodywebsite .bg-success { + background-color: #28a745 !important; +} +.bodywebsite a.bg-success:focus, +.bodywebsite a.bg-success:hover { + background-color: #1e7e34 !important; +} +.bodywebsite .bg-info { + background-color: #17a2b8 !important; +} +.bodywebsite a.bg-info:focus, +.bodywebsite a.bg-info:hover { + background-color: #117a8b !important; +} +.bodywebsite .bg-warning { + background-color: #ffc107 !important; +} +.bodywebsite a.bg-warning:focus, +.bodywebsite a.bg-warning:hover { + background-color: #d39e00 !important; +} +.bodywebsite .bg-danger { + background-color: #dc3545 !important; +} +.bodywebsite a.bg-danger:focus, +.bodywebsite a.bg-danger:hover { + background-color: #bd2130 !important; +} +.bodywebsite .bg-light { + background-color: #f8f9fa !important; +} +.bodywebsite a.bg-light:focus, +.bodywebsite a.bg-light:hover { + background-color: #dae0e5 !important; +} +.bodywebsite .bg-dark { + background-color: #343a40 !important; +} +.bodywebsite a.bg-dark:focus, +.bodywebsite a.bg-dark:hover { + background-color: #1d2124 !important; +} +.bodywebsite .bg-default { + background-color: #fff !important; +} +.bodywebsite .bg-transparent { + background-color: transparent !important; +} +.bodywebsite .border { + border: 1px solid #e9ecef !important; +} +.bodywebsite .border-0 { + border: 0 !important; +} +.bodywebsite .border-top-0 { + border-top: 0 !important; +} +.bodywebsite .border-right-0 { + border-right: 0 !important; +} +.bodywebsite .border-bottom-0 { + border-bottom: 0 !important; +} +.bodywebsite .border-left-0 { + border-left: 0 !important; +} +.bodywebsite .border-primary { + border-color: #007bff !important; +} +.bodywebsite .border-secondary { + border-color: #868e96 !important; +} +.bodywebsite .border-success { + border-color: #28a745 !important; +} +.bodywebsite .border-info { + border-color: #17a2b8 !important; +} +.bodywebsite .border-warning { + border-color: #ffc107 !important; +} +.bodywebsite .border-danger { + border-color: #dc3545 !important; +} +.bodywebsite .border-light { + border-color: #f8f9fa !important; +} +.bodywebsite .border-dark { + border-color: #343a40 !important; +} +.bodywebsite .border-white { + border-color: #fff !important; +} +.bodywebsite .rounded { + border-radius: 0 !important; +} +.bodywebsite .rounded-top { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; +} +.bodywebsite .rounded-right { + border-top-right-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} +.bodywebsite .rounded-bottom { + border-bottom-right-radius: 0 !important; + border-bottom-left-radius: 0 !important; +} +.bodywebsite .rounded-left { + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; +} +.bodywebsite .rounded-circle { + border-radius: 50% !important; +} +.bodywebsite .rounded-0 { + border-radius: 0 !important; +} +.bodywebsite .clearfix::after { + display: block; + clear: both; + content: ""; +} +.bodywebsite .d-none { + display: none !important; +} +.bodywebsite .d-inline { + display: inline !important; +} +.bodywebsite .d-inline-block { + display: inline-block !important; +} +.bodywebsite .d-block { + display: block !important; +} +.bodywebsite .d-table { + display: table !important; +} +.bodywebsite .d-table-row { + display: table-row !important; +} +.bodywebsite .d-table-cell { + display: table-cell !important; +} +.bodywebsite .d-flex { + display: flex !important; +} +.bodywebsite .d-inline-flex { + display: inline-flex !important; +} +@media (min-width: 576px) { + .bodywebsite .d-sm-none { + display: none !important; + } + .bodywebsite .d-sm-inline { + display: inline !important; + } + .bodywebsite .d-sm-inline-block { + display: inline-block !important; + } + .bodywebsite .d-sm-block { + display: block !important; + } + .bodywebsite .d-sm-table { + display: table !important; + } + .bodywebsite .d-sm-table-row { + display: table-row !important; + } + .bodywebsite .d-sm-table-cell { + display: table-cell !important; + } + .bodywebsite .d-sm-flex { + display: flex !important; + } + .bodywebsite .d-sm-inline-flex { + display: inline-flex !important; + } +} +@media (min-width: 768px) { + .bodywebsite .d-md-none { + display: none !important; + } + .bodywebsite .d-md-inline { + display: inline !important; + } + .bodywebsite .d-md-inline-block { + display: inline-block !important; + } + .bodywebsite .d-md-block { + display: block !important; + } + .bodywebsite .d-md-table { + display: table !important; + } + .bodywebsite .d-md-table-row { + display: table-row !important; + } + .bodywebsite .d-md-table-cell { + display: table-cell !important; + } + .bodywebsite .d-md-flex { + display: flex !important; + } + .bodywebsite .d-md-inline-flex { + display: inline-flex !important; + } +} +@media (min-width: 992px) { + .bodywebsite .d-lg-none { + display: none !important; + } + .bodywebsite .d-lg-inline { + display: inline !important; + } + .bodywebsite .d-lg-inline-block { + display: inline-block !important; + } + .bodywebsite .d-lg-block { + display: block !important; + } + .bodywebsite .d-lg-table { + display: table !important; + } + .bodywebsite .d-lg-table-row { + display: table-row !important; + } + .bodywebsite .d-lg-table-cell { + display: table-cell !important; + } + .bodywebsite .d-lg-flex { + display: flex !important; + } + .bodywebsite .d-lg-inline-flex { + display: inline-flex !important; + } +} +@media (min-width: 1200px) { + .bodywebsite .d-xl-none { + display: none !important; + } + .bodywebsite .d-xl-inline { + display: inline !important; + } + .bodywebsite .d-xl-inline-block { + display: inline-block !important; + } + .bodywebsite .d-xl-block { + display: block !important; + } + .bodywebsite .d-xl-table { + display: table !important; + } + .bodywebsite .d-xl-table-row { + display: table-row !important; + } + .bodywebsite .d-xl-table-cell { + display: table-cell !important; + } + .bodywebsite .d-xl-flex { + display: flex !important; + } + .bodywebsite .d-xl-inline-flex { + display: inline-flex !important; + } +} +@media (min-width: 1800px) { + .bodywebsite .d-xxl-none { + display: none !important; + } + .bodywebsite .d-xxl-inline { + display: inline !important; + } + .bodywebsite .d-xxl-inline-block { + display: inline-block !important; + } + .bodywebsite .d-xxl-block { + display: block !important; + } + .bodywebsite .d-xxl-table { + display: table !important; + } + .bodywebsite .d-xxl-table-row { + display: table-row !important; + } + .bodywebsite .d-xxl-table-cell { + display: table-cell !important; + } + .bodywebsite .d-xxl-flex { + display: flex !important; + } + .bodywebsite .d-xxl-inline-flex { + display: inline-flex !important; + } +} +.bodywebsite .d-print-block { + display: none !important; +} +@media print { + .bodywebsite .d-print-block { + display: block !important; + } +} +.bodywebsite .d-print-inline { + display: none !important; +} +@media print { + .bodywebsite .d-print-inline { + display: inline !important; + } +} +.bodywebsite .d-print-inline-block { + display: none !important; +} +@media print { + .bodywebsite .d-print-inline-block { + display: inline-block !important; + } +} +@media print { + .bodywebsite .d-print-none { + display: none !important; + } +} +.bodywebsite .embed-responsive { + position: relative; + display: block; + width: 100%; + padding: 0; + overflow: hidden; +} +.bodywebsite .embed-responsive::before { + display: block; + content: ""; +} +.bodywebsite .embed-responsive .embed-responsive-item, +.bodywebsite .embed-responsive iframe, +.bodywebsite .embed-responsive embed, +.bodywebsite .embed-responsive object, +.bodywebsite .embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.bodywebsite .embed-responsive-21by9::before { + padding-top: 42.85714%; +} +.bodywebsite .embed-responsive-16by9::before { + padding-top: 56.25%; +} +.bodywebsite .embed-responsive-4by3::before { + padding-top: 75%; +} +.bodywebsite .embed-responsive-1by1::before { + padding-top: 100%; +} +.bodywebsite .flex-row { + flex-direction: row !important; +} +.bodywebsite .flex-column { + flex-direction: column !important; +} +.bodywebsite .flex-row-reverse { + flex-direction: row-reverse !important; +} +.bodywebsite .flex-column-reverse { + flex-direction: column-reverse !important; +} +.bodywebsite .flex-wrap { + flex-wrap: wrap !important; +} +.bodywebsite .flex-nowrap { + flex-wrap: nowrap !important; +} +.bodywebsite .flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} +.bodywebsite .justify-content-start { + justify-content: flex-start !important; +} +.bodywebsite .justify-content-end { + justify-content: flex-end !important; +} +.bodywebsite .justify-content-center { + justify-content: center !important; +} +.bodywebsite .justify-content-between { + justify-content: space-between !important; +} +.bodywebsite .justify-content-around { + justify-content: space-around !important; +} +.bodywebsite .align-items-start { + align-items: flex-start !important; +} +.bodywebsite .align-items-end { + align-items: flex-end !important; +} +.bodywebsite .align-items-center { + align-items: center !important; +} +.bodywebsite .align-items-baseline { + align-items: baseline !important; +} +.bodywebsite .align-items-stretch { + align-items: stretch !important; +} +.bodywebsite .align-content-start { + align-content: flex-start !important; +} +.bodywebsite .align-content-end { + align-content: flex-end !important; +} +.bodywebsite .align-content-center { + align-content: center !important; +} +.bodywebsite .align-content-between { + align-content: space-between !important; +} +.bodywebsite .align-content-around { + align-content: space-around !important; +} +.bodywebsite .align-content-stretch { + align-content: stretch !important; +} +.bodywebsite .align-self-auto { + align-self: auto !important; +} +.bodywebsite .align-self-start { + align-self: flex-start !important; +} +.bodywebsite .align-self-end { + align-self: flex-end !important; +} +.bodywebsite .align-self-center { + align-self: center !important; +} +.bodywebsite .align-self-baseline { + align-self: baseline !important; +} +.bodywebsite .align-self-stretch { + align-self: stretch !important; +} +@media (min-width: 576px) { + .bodywebsite .flex-sm-row { + flex-direction: row !important; + } + .bodywebsite .flex-sm-column { + flex-direction: column !important; + } + .bodywebsite .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + .bodywebsite .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + .bodywebsite .flex-sm-wrap { + flex-wrap: wrap !important; + } + .bodywebsite .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + .bodywebsite .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .bodywebsite .justify-content-sm-start { + justify-content: flex-start !important; + } + .bodywebsite .justify-content-sm-end { + justify-content: flex-end !important; + } + .bodywebsite .justify-content-sm-center { + justify-content: center !important; + } + .bodywebsite .justify-content-sm-between { + justify-content: space-between !important; + } + .bodywebsite .justify-content-sm-around { + justify-content: space-around !important; + } + .bodywebsite .align-items-sm-start { + align-items: flex-start !important; + } + .bodywebsite .align-items-sm-end { + align-items: flex-end !important; + } + .bodywebsite .align-items-sm-center { + align-items: center !important; + } + .bodywebsite .align-items-sm-baseline { + align-items: baseline !important; + } + .bodywebsite .align-items-sm-stretch { + align-items: stretch !important; + } + .bodywebsite .align-content-sm-start { + align-content: flex-start !important; + } + .bodywebsite .align-content-sm-end { + align-content: flex-end !important; + } + .bodywebsite .align-content-sm-center { + align-content: center !important; + } + .bodywebsite .align-content-sm-between { + align-content: space-between !important; + } + .bodywebsite .align-content-sm-around { + align-content: space-around !important; + } + .bodywebsite .align-content-sm-stretch { + align-content: stretch !important; + } + .bodywebsite .align-self-sm-auto { + align-self: auto !important; + } + .bodywebsite .align-self-sm-start { + align-self: flex-start !important; + } + .bodywebsite .align-self-sm-end { + align-self: flex-end !important; + } + .bodywebsite .align-self-sm-center { + align-self: center !important; + } + .bodywebsite .align-self-sm-baseline { + align-self: baseline !important; + } + .bodywebsite .align-self-sm-stretch { + align-self: stretch !important; + } +} +@media (min-width: 768px) { + .bodywebsite .flex-md-row { + flex-direction: row !important; + } + .bodywebsite .flex-md-column { + flex-direction: column !important; + } + .bodywebsite .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + .bodywebsite .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + .bodywebsite .flex-md-wrap { + flex-wrap: wrap !important; + } + .bodywebsite .flex-md-nowrap { + flex-wrap: nowrap !important; + } + .bodywebsite .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .bodywebsite .justify-content-md-start { + justify-content: flex-start !important; + } + .bodywebsite .justify-content-md-end { + justify-content: flex-end !important; + } + .bodywebsite .justify-content-md-center { + justify-content: center !important; + } + .bodywebsite .justify-content-md-between { + justify-content: space-between !important; + } + .bodywebsite .justify-content-md-around { + justify-content: space-around !important; + } + .bodywebsite .align-items-md-start { + align-items: flex-start !important; + } + .bodywebsite .align-items-md-end { + align-items: flex-end !important; + } + .bodywebsite .align-items-md-center { + align-items: center !important; + } + .bodywebsite .align-items-md-baseline { + align-items: baseline !important; + } + .bodywebsite .align-items-md-stretch { + align-items: stretch !important; + } + .bodywebsite .align-content-md-start { + align-content: flex-start !important; + } + .bodywebsite .align-content-md-end { + align-content: flex-end !important; + } + .bodywebsite .align-content-md-center { + align-content: center !important; + } + .bodywebsite .align-content-md-between { + align-content: space-between !important; + } + .bodywebsite .align-content-md-around { + align-content: space-around !important; + } + .bodywebsite .align-content-md-stretch { + align-content: stretch !important; + } + .bodywebsite .align-self-md-auto { + align-self: auto !important; + } + .bodywebsite .align-self-md-start { + align-self: flex-start !important; + } + .bodywebsite .align-self-md-end { + align-self: flex-end !important; + } + .bodywebsite .align-self-md-center { + align-self: center !important; + } + .bodywebsite .align-self-md-baseline { + align-self: baseline !important; + } + .bodywebsite .align-self-md-stretch { + align-self: stretch !important; + } +} +@media (min-width: 992px) { + .bodywebsite .flex-lg-row { + flex-direction: row !important; + } + .bodywebsite .flex-lg-column { + flex-direction: column !important; + } + .bodywebsite .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + .bodywebsite .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + .bodywebsite .flex-lg-wrap { + flex-wrap: wrap !important; + } + .bodywebsite .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + .bodywebsite .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .bodywebsite .justify-content-lg-start { + justify-content: flex-start !important; + } + .bodywebsite .justify-content-lg-end { + justify-content: flex-end !important; + } + .bodywebsite .justify-content-lg-center { + justify-content: center !important; + } + .bodywebsite .justify-content-lg-between { + justify-content: space-between !important; + } + .bodywebsite .justify-content-lg-around { + justify-content: space-around !important; + } + .bodywebsite .align-items-lg-start { + align-items: flex-start !important; + } + .bodywebsite .align-items-lg-end { + align-items: flex-end !important; + } + .bodywebsite .align-items-lg-center { + align-items: center !important; + } + .bodywebsite .align-items-lg-baseline { + align-items: baseline !important; + } + .bodywebsite .align-items-lg-stretch { + align-items: stretch !important; + } + .bodywebsite .align-content-lg-start { + align-content: flex-start !important; + } + .bodywebsite .align-content-lg-end { + align-content: flex-end !important; + } + .bodywebsite .align-content-lg-center { + align-content: center !important; + } + .bodywebsite .align-content-lg-between { + align-content: space-between !important; + } + .bodywebsite .align-content-lg-around { + align-content: space-around !important; + } + .bodywebsite .align-content-lg-stretch { + align-content: stretch !important; + } + .bodywebsite .align-self-lg-auto { + align-self: auto !important; + } + .bodywebsite .align-self-lg-start { + align-self: flex-start !important; + } + .bodywebsite .align-self-lg-end { + align-self: flex-end !important; + } + .bodywebsite .align-self-lg-center { + align-self: center !important; + } + .bodywebsite .align-self-lg-baseline { + align-self: baseline !important; + } + .bodywebsite .align-self-lg-stretch { + align-self: stretch !important; + } +} +@media (min-width: 1200px) { + .bodywebsite .flex-xl-row { + flex-direction: row !important; + } + .bodywebsite .flex-xl-column { + flex-direction: column !important; + } + .bodywebsite .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + .bodywebsite .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + .bodywebsite .flex-xl-wrap { + flex-wrap: wrap !important; + } + .bodywebsite .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + .bodywebsite .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .bodywebsite .justify-content-xl-start { + justify-content: flex-start !important; + } + .bodywebsite .justify-content-xl-end { + justify-content: flex-end !important; + } + .bodywebsite .justify-content-xl-center { + justify-content: center !important; + } + .bodywebsite .justify-content-xl-between { + justify-content: space-between !important; + } + .bodywebsite .justify-content-xl-around { + justify-content: space-around !important; + } + .bodywebsite .align-items-xl-start { + align-items: flex-start !important; + } + .bodywebsite .align-items-xl-end { + align-items: flex-end !important; + } + .bodywebsite .align-items-xl-center { + align-items: center !important; + } + .bodywebsite .align-items-xl-baseline { + align-items: baseline !important; + } + .bodywebsite .align-items-xl-stretch { + align-items: stretch !important; + } + .bodywebsite .align-content-xl-start { + align-content: flex-start !important; + } + .bodywebsite .align-content-xl-end { + align-content: flex-end !important; + } + .bodywebsite .align-content-xl-center { + align-content: center !important; + } + .bodywebsite .align-content-xl-between { + align-content: space-between !important; + } + .bodywebsite .align-content-xl-around { + align-content: space-around !important; + } + .bodywebsite .align-content-xl-stretch { + align-content: stretch !important; + } + .bodywebsite .align-self-xl-auto { + align-self: auto !important; + } + .bodywebsite .align-self-xl-start { + align-self: flex-start !important; + } + .bodywebsite .align-self-xl-end { + align-self: flex-end !important; + } + .bodywebsite .align-self-xl-center { + align-self: center !important; + } + .bodywebsite .align-self-xl-baseline { + align-self: baseline !important; + } + .bodywebsite .align-self-xl-stretch { + align-self: stretch !important; + } +} +@media (min-width: 1800px) { + .bodywebsite .flex-xxl-row { + flex-direction: row !important; + } + .bodywebsite .flex-xxl-column { + flex-direction: column !important; + } + .bodywebsite .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + .bodywebsite .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + .bodywebsite .flex-xxl-wrap { + flex-wrap: wrap !important; + } + .bodywebsite .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + .bodywebsite .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .bodywebsite .justify-content-xxl-start { + justify-content: flex-start !important; + } + .bodywebsite .justify-content-xxl-end { + justify-content: flex-end !important; + } + .bodywebsite .justify-content-xxl-center { + justify-content: center !important; + } + .bodywebsite .justify-content-xxl-between { + justify-content: space-between !important; + } + .bodywebsite .justify-content-xxl-around { + justify-content: space-around !important; + } + .bodywebsite .align-items-xxl-start { + align-items: flex-start !important; + } + .bodywebsite .align-items-xxl-end { + align-items: flex-end !important; + } + .bodywebsite .align-items-xxl-center { + align-items: center !important; + } + .bodywebsite .align-items-xxl-baseline { + align-items: baseline !important; + } + .bodywebsite .align-items-xxl-stretch { + align-items: stretch !important; + } + .bodywebsite .align-content-xxl-start { + align-content: flex-start !important; + } + .bodywebsite .align-content-xxl-end { + align-content: flex-end !important; + } + .bodywebsite .align-content-xxl-center { + align-content: center !important; + } + .bodywebsite .align-content-xxl-between { + align-content: space-between !important; + } + .bodywebsite .align-content-xxl-around { + align-content: space-around !important; + } + .bodywebsite .align-content-xxl-stretch { + align-content: stretch !important; + } + .bodywebsite .align-self-xxl-auto { + align-self: auto !important; + } + .bodywebsite .align-self-xxl-start { + align-self: flex-start !important; + } + .bodywebsite .align-self-xxl-end { + align-self: flex-end !important; + } + .bodywebsite .align-self-xxl-center { + align-self: center !important; + } + .bodywebsite .align-self-xxl-baseline { + align-self: baseline !important; + } + .bodywebsite .align-self-xxl-stretch { + align-self: stretch !important; + } +} +.bodywebsite .float-left { + float: left !important; +} +.bodywebsite .float-right { + float: right !important; +} +.bodywebsite .float-none { + float: none !important; +} +@media (min-width: 576px) { + .bodywebsite .float-sm-left { + float: left !important; + } + .bodywebsite .float-sm-right { + float: right !important; + } + .bodywebsite .float-sm-none { + float: none !important; + } +} +@media (min-width: 768px) { + .bodywebsite .float-md-left { + float: left !important; + } + .bodywebsite .float-md-right { + float: right !important; + } + .bodywebsite .float-md-none { + float: none !important; + } +} +@media (min-width: 992px) { + .bodywebsite .float-lg-left { + float: left !important; + } + .bodywebsite .float-lg-right { + float: right !important; + } + .bodywebsite .float-lg-none { + float: none !important; + } +} +@media (min-width: 1200px) { + .bodywebsite .float-xl-left { + float: left !important; + } + .bodywebsite .float-xl-right { + float: right !important; + } + .bodywebsite .float-xl-none { + float: none !important; + } +} +@media (min-width: 1800px) { + .bodywebsite .float-xxl-left { + float: left !important; + } + .bodywebsite .float-xxl-right { + float: right !important; + } + .bodywebsite .float-xxl-none { + float: none !important; + } +} +.bodywebsite .position-static { + position: static !important; +} +.bodywebsite .position-relative { + position: relative !important; +} +.bodywebsite .position-absolute { + position: absolute !important; +} +.bodywebsite .position-fixed { + position: fixed !important; +} +.bodywebsite .position-sticky { + position: sticky !important; +} +.bodywebsite .dolsticky { + position: sticky; + top: 0; + z-index: 100; +} +.bodywebsite .fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} +.bodywebsite .fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} +@supports (position: sticky) { + .bodywebsite .sticky-top { + position: sticky; + top: 0; + z-index: 1020; + } +} +.bodywebsite .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + clip-path: inset(50%); + border: 0; +} +.bodywebsite .sr-only-focusable:active, +.bodywebsite .sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + overflow: visible; + clip: auto; + white-space: normal; + clip-path: none; +} +.bodywebsite .w-25 { + width: 25% !important; +} +.bodywebsite .w-50 { + width: 50% !important; +} +.bodywebsite .w-75 { + width: 75% !important; +} +.bodywebsite .w-100 { + width: 100% !important; +} +.bodywebsite .h-25 { + height: 25% !important; +} +.bodywebsite .h-50 { + height: 50% !important; +} +.bodywebsite .h-75 { + height: 75% !important; +} +.bodywebsite .h-100 { + height: 100% !important; +} +.bodywebsite .mw-100 { + max-width: 100% !important; +} +.bodywebsite .mh-100 { + max-height: 100% !important; +} +.bodywebsite .m-0 { + margin: 0 !important; +} +.bodywebsite .mt-0, +.bodywebsite .my-0 { + margin-top: 0 !important; +} +.bodywebsite .mr-0, +.bodywebsite .mx-0 { + margin-right: 0 !important; +} +.bodywebsite .mb-0, +.bodywebsite .my-0 { + margin-bottom: 0 !important; +} +.bodywebsite .ml-0, +.bodywebsite .mx-0 { + margin-left: 0 !important; +} +.bodywebsite .m-1 { + margin: 0.25rem !important; +} +.bodywebsite .mt-1, +.bodywebsite .my-1 { + margin-top: 0.25rem !important; +} +.bodywebsite .mr-1, +.bodywebsite .mx-1 { + margin-right: 0.25rem !important; +} +.bodywebsite .mb-1, +.bodywebsite .my-1 { + margin-bottom: 0.25rem !important; +} +.bodywebsite .ml-1, +.bodywebsite .mx-1 { + margin-left: 0.25rem !important; +} +.bodywebsite .m-2 { + margin: 0.5rem !important; +} +.bodywebsite .mt-2, +.bodywebsite .my-2 { + margin-top: 0.5rem !important; +} +.bodywebsite .mr-2, +.bodywebsite .mx-2 { + margin-right: 0.5rem !important; +} +.bodywebsite .mb-2, +.bodywebsite .my-2 { + margin-bottom: 0.5rem !important; +} +.bodywebsite .ml-2, +.bodywebsite .mx-2 { + margin-left: 0.5rem !important; +} +.bodywebsite .m-3 { + margin: 1rem !important; +} +.bodywebsite .mt-3, +.bodywebsite .my-3 { + margin-top: 1rem !important; +} +.bodywebsite .mr-3, +.bodywebsite .mx-3 { + margin-right: 1rem !important; +} +.bodywebsite .mb-3, +.bodywebsite .my-3 { + margin-bottom: 1rem !important; +} +.bodywebsite .ml-3, +.bodywebsite .mx-3 { + margin-left: 1rem !important; +} +.bodywebsite .m-4 { + margin: 1.5rem !important; +} +.bodywebsite .mt-4, +.bodywebsite .my-4 { + margin-top: 1.5rem !important; +} +.bodywebsite .mr-4, +.bodywebsite .mx-4 { + margin-right: 1.5rem !important; +} +.bodywebsite .mb-4, +.bodywebsite .my-4 { + margin-bottom: 1.5rem !important; +} +.bodywebsite .ml-4, +.bodywebsite .mx-4 { + margin-left: 1.5rem !important; +} +.bodywebsite .m-5 { + margin: 3rem !important; +} +.bodywebsite .mt-5, +.bodywebsite .my-5 { + margin-top: 3rem !important; +} +.bodywebsite .mr-5, +.bodywebsite .mx-5 { + margin-right: 3rem !important; +} +.bodywebsite .mb-5, +.bodywebsite .my-5 { + margin-bottom: 3rem !important; +} +.bodywebsite .ml-5, +.bodywebsite .mx-5 { + margin-left: 3rem !important; +} +.bodywebsite .p-0 { + padding: 0 !important; +} +.bodywebsite .pt-0, +.bodywebsite .py-0 { + padding-top: 0 !important; +} +.bodywebsite .pr-0, +.bodywebsite .px-0 { + padding-right: 0 !important; +} +.bodywebsite .pb-0, +.bodywebsite .py-0 { + padding-bottom: 0 !important; +} +.bodywebsite .pl-0, +.bodywebsite .px-0 { + padding-left: 0 !important; +} +.bodywebsite .p-1 { + padding: 0.25rem !important; +} +.bodywebsite .pt-1, +.bodywebsite .py-1 { + padding-top: 0.25rem !important; +} +.bodywebsite .pr-1, +.bodywebsite .px-1 { + padding-right: 0.25rem !important; +} +.bodywebsite .pb-1, +.bodywebsite .py-1 { + padding-bottom: 0.25rem !important; +} +.bodywebsite .pl-1, +.bodywebsite .px-1 { + padding-left: 0.25rem !important; +} +.bodywebsite .p-2 { + padding: 0.5rem !important; +} +.bodywebsite .pt-2, +.bodywebsite .py-2 { + padding-top: 0.5rem !important; +} +.bodywebsite .pr-2, +.bodywebsite .px-2 { + padding-right: 0.5rem !important; +} +.bodywebsite .pb-2, +.bodywebsite .py-2 { + padding-bottom: 0.5rem !important; +} +.bodywebsite .pl-2, +.bodywebsite .px-2 { + padding-left: 0.5rem !important; +} +.bodywebsite .p-3 { + padding: 1rem !important; +} +.bodywebsite .pt-3, +.bodywebsite .py-3 { + padding-top: 1rem !important; +} +.bodywebsite .pr-3, +.bodywebsite .px-3 { + padding-right: 1rem !important; +} +.bodywebsite .pb-3, +.bodywebsite .py-3 { + padding-bottom: 1rem !important; +} +.bodywebsite .pl-3, +.bodywebsite .px-3 { + padding-left: 1rem !important; +} +.bodywebsite .p-4 { + padding: 1.5rem !important; +} +.bodywebsite .pt-4, +.bodywebsite .py-4 { + padding-top: 1.5rem !important; +} +.bodywebsite .pr-4, +.bodywebsite .px-4 { + padding-right: 1.5rem !important; +} +.bodywebsite .pb-4, +.bodywebsite .py-4 { + padding-bottom: 1.5rem !important; +} +.bodywebsite .pl-4, +.bodywebsite .px-4 { + padding-left: 1.5rem !important; +} +.bodywebsite .p-5 { + padding: 3rem !important; +} +.bodywebsite .pt-5, +.bodywebsite .py-5 { + padding-top: 3rem !important; +} +.bodywebsite .pr-5, +.bodywebsite .px-5 { + padding-right: 3rem !important; +} +.bodywebsite .pb-5, +.bodywebsite .py-5 { + padding-bottom: 3rem !important; +} +.bodywebsite .pl-5, +.bodywebsite .px-5 { + padding-left: 3rem !important; +} +.bodywebsite .m-auto { + margin: auto !important; +} +.bodywebsite .mt-auto, +.bodywebsite .my-auto { + margin-top: auto !important; +} +.bodywebsite .mr-auto, +.bodywebsite .mx-auto { + margin-right: auto !important; +} +.bodywebsite .mb-auto, +.bodywebsite .my-auto { + margin-bottom: auto !important; +} +.bodywebsite .ml-auto, +.bodywebsite .mx-auto { + margin-left: auto !important; +} +@media (min-width: 576px) { + .bodywebsite .m-sm-0 { + margin: 0 !important; + } + .bodywebsite .mt-sm-0, + .bodywebsite .my-sm-0 { + margin-top: 0 !important; + } + .bodywebsite .mr-sm-0, + .bodywebsite .mx-sm-0 { + margin-right: 0 !important; + } + .bodywebsite .mb-sm-0, + .bodywebsite .my-sm-0 { + margin-bottom: 0 !important; + } + .bodywebsite .ml-sm-0, + .bodywebsite .mx-sm-0 { + margin-left: 0 !important; + } + .bodywebsite .m-sm-1 { + margin: 0.25rem !important; + } + .bodywebsite .mt-sm-1, + .bodywebsite .my-sm-1 { + margin-top: 0.25rem !important; + } + .bodywebsite .mr-sm-1, + .bodywebsite .mx-sm-1 { + margin-right: 0.25rem !important; + } + .bodywebsite .mb-sm-1, + .bodywebsite .my-sm-1 { + margin-bottom: 0.25rem !important; + } + .bodywebsite .ml-sm-1, + .bodywebsite .mx-sm-1 { + margin-left: 0.25rem !important; + } + .bodywebsite .m-sm-2 { + margin: 0.5rem !important; + } + .bodywebsite .mt-sm-2, + .bodywebsite .my-sm-2 { + margin-top: 0.5rem !important; + } + .bodywebsite .mr-sm-2, + .bodywebsite .mx-sm-2 { + margin-right: 0.5rem !important; + } + .bodywebsite .mb-sm-2, + .bodywebsite .my-sm-2 { + margin-bottom: 0.5rem !important; + } + .bodywebsite .ml-sm-2, + .bodywebsite .mx-sm-2 { + margin-left: 0.5rem !important; + } + .bodywebsite .m-sm-3 { + margin: 1rem !important; + } + .bodywebsite .mt-sm-3, + .bodywebsite .my-sm-3 { + margin-top: 1rem !important; + } + .bodywebsite .mr-sm-3, + .bodywebsite .mx-sm-3 { + margin-right: 1rem !important; + } + .bodywebsite .mb-sm-3, + .bodywebsite .my-sm-3 { + margin-bottom: 1rem !important; + } + .bodywebsite .ml-sm-3, + .bodywebsite .mx-sm-3 { + margin-left: 1rem !important; + } + .bodywebsite .m-sm-4 { + margin: 1.5rem !important; + } + .bodywebsite .mt-sm-4, + .bodywebsite .my-sm-4 { + margin-top: 1.5rem !important; + } + .bodywebsite .mr-sm-4, + .bodywebsite .mx-sm-4 { + margin-right: 1.5rem !important; + } + .bodywebsite .mb-sm-4, + .bodywebsite .my-sm-4 { + margin-bottom: 1.5rem !important; + } + .bodywebsite .ml-sm-4, + .bodywebsite .mx-sm-4 { + margin-left: 1.5rem !important; + } + .bodywebsite .m-sm-5 { + margin: 3rem !important; + } + .bodywebsite .mt-sm-5, + .bodywebsite .my-sm-5 { + margin-top: 3rem !important; + } + .bodywebsite .mr-sm-5, + .bodywebsite .mx-sm-5 { + margin-right: 3rem !important; + } + .bodywebsite .mb-sm-5, + .bodywebsite .my-sm-5 { + margin-bottom: 3rem !important; + } + .bodywebsite .ml-sm-5, + .bodywebsite .mx-sm-5 { + margin-left: 3rem !important; + } + .bodywebsite .p-sm-0 { + padding: 0 !important; + } + .bodywebsite .pt-sm-0, + .bodywebsite .py-sm-0 { + padding-top: 0 !important; + } + .bodywebsite .pr-sm-0, + .bodywebsite .px-sm-0 { + padding-right: 0 !important; + } + .bodywebsite .pb-sm-0, + .bodywebsite .py-sm-0 { + padding-bottom: 0 !important; + } + .bodywebsite .pl-sm-0, + .bodywebsite .px-sm-0 { + padding-left: 0 !important; + } + .bodywebsite .p-sm-1 { + padding: 0.25rem !important; + } + .bodywebsite .pt-sm-1, + .bodywebsite .py-sm-1 { + padding-top: 0.25rem !important; + } + .bodywebsite .pr-sm-1, + .bodywebsite .px-sm-1 { + padding-right: 0.25rem !important; + } + .bodywebsite .pb-sm-1, + .bodywebsite .py-sm-1 { + padding-bottom: 0.25rem !important; + } + .bodywebsite .pl-sm-1, + .bodywebsite .px-sm-1 { + padding-left: 0.25rem !important; + } + .bodywebsite .p-sm-2 { + padding: 0.5rem !important; + } + .bodywebsite .pt-sm-2, + .bodywebsite .py-sm-2 { + padding-top: 0.5rem !important; + } + .bodywebsite .pr-sm-2, + .bodywebsite .px-sm-2 { + padding-right: 0.5rem !important; + } + .bodywebsite .pb-sm-2, + .bodywebsite .py-sm-2 { + padding-bottom: 0.5rem !important; + } + .bodywebsite .pl-sm-2, + .bodywebsite .px-sm-2 { + padding-left: 0.5rem !important; + } + .bodywebsite .p-sm-3 { + padding: 1rem !important; + } + .bodywebsite .pt-sm-3, + .bodywebsite .py-sm-3 { + padding-top: 1rem !important; + } + .bodywebsite .pr-sm-3, + .bodywebsite .px-sm-3 { + padding-right: 1rem !important; + } + .bodywebsite .pb-sm-3, + .bodywebsite .py-sm-3 { + padding-bottom: 1rem !important; + } + .bodywebsite .pl-sm-3, + .bodywebsite .px-sm-3 { + padding-left: 1rem !important; + } + .bodywebsite .p-sm-4 { + padding: 1.5rem !important; + } + .bodywebsite .pt-sm-4, + .bodywebsite .py-sm-4 { + padding-top: 1.5rem !important; + } + .bodywebsite .pr-sm-4, + .bodywebsite .px-sm-4 { + padding-right: 1.5rem !important; + } + .bodywebsite .pb-sm-4, + .bodywebsite .py-sm-4 { + padding-bottom: 1.5rem !important; + } + .bodywebsite .pl-sm-4, + .bodywebsite .px-sm-4 { + padding-left: 1.5rem !important; + } + .bodywebsite .p-sm-5 { + padding: 3rem !important; + } + .bodywebsite .pt-sm-5, + .bodywebsite .py-sm-5 { + padding-top: 3rem !important; + } + .bodywebsite .pr-sm-5, + .bodywebsite .px-sm-5 { + padding-right: 3rem !important; + } + .bodywebsite .pb-sm-5, + .bodywebsite .py-sm-5 { + padding-bottom: 3rem !important; + } + .bodywebsite .pl-sm-5, + .bodywebsite .px-sm-5 { + padding-left: 3rem !important; + } + .bodywebsite .m-sm-auto { + margin: auto !important; + } + .bodywebsite .mt-sm-auto, + .bodywebsite .my-sm-auto { + margin-top: auto !important; + } + .bodywebsite .mr-sm-auto, + .bodywebsite .mx-sm-auto { + margin-right: auto !important; + } + .bodywebsite .mb-sm-auto, + .bodywebsite .my-sm-auto { + margin-bottom: auto !important; + } + .bodywebsite .ml-sm-auto, + .bodywebsite .mx-sm-auto { + margin-left: auto !important; + } +} +@media (min-width: 768px) { + .bodywebsite .m-md-0 { + margin: 0 !important; + } + .bodywebsite .mt-md-0, + .bodywebsite .my-md-0 { + margin-top: 0 !important; + } + .bodywebsite .mr-md-0, + .bodywebsite .mx-md-0 { + margin-right: 0 !important; + } + .bodywebsite .mb-md-0, + .bodywebsite .my-md-0 { + margin-bottom: 0 !important; + } + .bodywebsite .ml-md-0, + .bodywebsite .mx-md-0 { + margin-left: 0 !important; + } + .bodywebsite .m-md-1 { + margin: 0.25rem !important; + } + .bodywebsite .mt-md-1, + .bodywebsite .my-md-1 { + margin-top: 0.25rem !important; + } + .bodywebsite .mr-md-1, + .bodywebsite .mx-md-1 { + margin-right: 0.25rem !important; + } + .bodywebsite .mb-md-1, + .bodywebsite .my-md-1 { + margin-bottom: 0.25rem !important; + } + .bodywebsite .ml-md-1, + .bodywebsite .mx-md-1 { + margin-left: 0.25rem !important; + } + .bodywebsite .m-md-2 { + margin: 0.5rem !important; + } + .bodywebsite .mt-md-2, + .bodywebsite .my-md-2 { + margin-top: 0.5rem !important; + } + .bodywebsite .mr-md-2, + .bodywebsite .mx-md-2 { + margin-right: 0.5rem !important; + } + .bodywebsite .mb-md-2, + .bodywebsite .my-md-2 { + margin-bottom: 0.5rem !important; + } + .bodywebsite .ml-md-2, + .bodywebsite .mx-md-2 { + margin-left: 0.5rem !important; + } + .bodywebsite .m-md-3 { + margin: 1rem !important; + } + .bodywebsite .mt-md-3, + .bodywebsite .my-md-3 { + margin-top: 1rem !important; + } + .bodywebsite .mr-md-3, + .bodywebsite .mx-md-3 { + margin-right: 1rem !important; + } + .bodywebsite .mb-md-3, + .bodywebsite .my-md-3 { + margin-bottom: 1rem !important; + } + .bodywebsite .ml-md-3, + .bodywebsite .mx-md-3 { + margin-left: 1rem !important; + } + .bodywebsite .m-md-4 { + margin: 1.5rem !important; + } + .bodywebsite .mt-md-4, + .bodywebsite .my-md-4 { + margin-top: 1.5rem !important; + } + .bodywebsite .mr-md-4, + .bodywebsite .mx-md-4 { + margin-right: 1.5rem !important; + } + .bodywebsite .mb-md-4, + .bodywebsite .my-md-4 { + margin-bottom: 1.5rem !important; + } + .bodywebsite .ml-md-4, + .bodywebsite .mx-md-4 { + margin-left: 1.5rem !important; + } + .bodywebsite .m-md-5 { + margin: 3rem !important; + } + .bodywebsite .mt-md-5, + .bodywebsite .my-md-5 { + margin-top: 3rem !important; + } + .bodywebsite .mr-md-5, + .bodywebsite .mx-md-5 { + margin-right: 3rem !important; + } + .bodywebsite .mb-md-5, + .bodywebsite .my-md-5 { + margin-bottom: 3rem !important; + } + .bodywebsite .ml-md-5, + .bodywebsite .mx-md-5 { + margin-left: 3rem !important; + } + .bodywebsite .p-md-0 { + padding: 0 !important; + } + .bodywebsite .pt-md-0, + .bodywebsite .py-md-0 { + padding-top: 0 !important; + } + .bodywebsite .pr-md-0, + .bodywebsite .px-md-0 { + padding-right: 0 !important; + } + .bodywebsite .pb-md-0, + .bodywebsite .py-md-0 { + padding-bottom: 0 !important; + } + .bodywebsite .pl-md-0, + .bodywebsite .px-md-0 { + padding-left: 0 !important; + } + .bodywebsite .p-md-1 { + padding: 0.25rem !important; + } + .bodywebsite .pt-md-1, + .bodywebsite .py-md-1 { + padding-top: 0.25rem !important; + } + .bodywebsite .pr-md-1, + .bodywebsite .px-md-1 { + padding-right: 0.25rem !important; + } + .bodywebsite .pb-md-1, + .bodywebsite .py-md-1 { + padding-bottom: 0.25rem !important; + } + .bodywebsite .pl-md-1, + .bodywebsite .px-md-1 { + padding-left: 0.25rem !important; + } + .bodywebsite .p-md-2 { + padding: 0.5rem !important; + } + .bodywebsite .pt-md-2, + .bodywebsite .py-md-2 { + padding-top: 0.5rem !important; + } + .bodywebsite .pr-md-2, + .bodywebsite .px-md-2 { + padding-right: 0.5rem !important; + } + .bodywebsite .pb-md-2, + .bodywebsite .py-md-2 { + padding-bottom: 0.5rem !important; + } + .bodywebsite .pl-md-2, + .bodywebsite .px-md-2 { + padding-left: 0.5rem !important; + } + .bodywebsite .p-md-3 { + padding: 1rem !important; + } + .bodywebsite .pt-md-3, + .bodywebsite .py-md-3 { + padding-top: 1rem !important; + } + .bodywebsite .pr-md-3, + .bodywebsite .px-md-3 { + padding-right: 1rem !important; + } + .bodywebsite .pb-md-3, + .bodywebsite .py-md-3 { + padding-bottom: 1rem !important; + } + .bodywebsite .pl-md-3, + .bodywebsite .px-md-3 { + padding-left: 1rem !important; + } + .bodywebsite .p-md-4 { + padding: 1.5rem !important; + } + .bodywebsite .pt-md-4, + .bodywebsite .py-md-4 { + padding-top: 1.5rem !important; + } + .bodywebsite .pr-md-4, + .bodywebsite .px-md-4 { + padding-right: 1.5rem !important; + } + .bodywebsite .pb-md-4, + .bodywebsite .py-md-4 { + padding-bottom: 1.5rem !important; + } + .bodywebsite .pl-md-4, + .bodywebsite .px-md-4 { + padding-left: 1.5rem !important; + } + .bodywebsite .p-md-5 { + padding: 3rem !important; + } + .bodywebsite .pt-md-5, + .bodywebsite .py-md-5 { + padding-top: 3rem !important; + } + .bodywebsite .pr-md-5, + .bodywebsite .px-md-5 { + padding-right: 3rem !important; + } + .bodywebsite .pb-md-5, + .bodywebsite .py-md-5 { + padding-bottom: 3rem !important; + } + .bodywebsite .pl-md-5, + .bodywebsite .px-md-5 { + padding-left: 3rem !important; + } + .bodywebsite .m-md-auto { + margin: auto !important; + } + .bodywebsite .mt-md-auto, + .bodywebsite .my-md-auto { + margin-top: auto !important; + } + .bodywebsite .mr-md-auto, + .bodywebsite .mx-md-auto { + margin-right: auto !important; + } + .bodywebsite .mb-md-auto, + .bodywebsite .my-md-auto { + margin-bottom: auto !important; + } + .bodywebsite .ml-md-auto, + .bodywebsite .mx-md-auto { + margin-left: auto !important; + } +} +@media (min-width: 992px) { + .bodywebsite .m-lg-0 { + margin: 0 !important; + } + .bodywebsite .mt-lg-0, + .bodywebsite .my-lg-0 { + margin-top: 0 !important; + } + .bodywebsite .mr-lg-0, + .bodywebsite .mx-lg-0 { + margin-right: 0 !important; + } + .bodywebsite .mb-lg-0, + .bodywebsite .my-lg-0 { + margin-bottom: 0 !important; + } + .bodywebsite .ml-lg-0, + .bodywebsite .mx-lg-0 { + margin-left: 0 !important; + } + .bodywebsite .m-lg-1 { + margin: 0.25rem !important; + } + .bodywebsite .mt-lg-1, + .bodywebsite .my-lg-1 { + margin-top: 0.25rem !important; + } + .bodywebsite .mr-lg-1, + .bodywebsite .mx-lg-1 { + margin-right: 0.25rem !important; + } + .bodywebsite .mb-lg-1, + .bodywebsite .my-lg-1 { + margin-bottom: 0.25rem !important; + } + .bodywebsite .ml-lg-1, + .bodywebsite .mx-lg-1 { + margin-left: 0.25rem !important; + } + .bodywebsite .m-lg-2 { + margin: 0.5rem !important; + } + .bodywebsite .mt-lg-2, + .bodywebsite .my-lg-2 { + margin-top: 0.5rem !important; + } + .bodywebsite .mr-lg-2, + .bodywebsite .mx-lg-2 { + margin-right: 0.5rem !important; + } + .bodywebsite .mb-lg-2, + .bodywebsite .my-lg-2 { + margin-bottom: 0.5rem !important; + } + .bodywebsite .ml-lg-2, + .bodywebsite .mx-lg-2 { + margin-left: 0.5rem !important; + } + .bodywebsite .m-lg-3 { + margin: 1rem !important; + } + .bodywebsite .mt-lg-3, + .bodywebsite .my-lg-3 { + margin-top: 1rem !important; + } + .bodywebsite .mr-lg-3, + .bodywebsite .mx-lg-3 { + margin-right: 1rem !important; + } + .bodywebsite .mb-lg-3, + .bodywebsite .my-lg-3 { + margin-bottom: 1rem !important; + } + .bodywebsite .ml-lg-3, + .bodywebsite .mx-lg-3 { + margin-left: 1rem !important; + } + .bodywebsite .m-lg-4 { + margin: 1.5rem !important; + } + .bodywebsite .mt-lg-4, + .bodywebsite .my-lg-4 { + margin-top: 1.5rem !important; + } + .bodywebsite .mr-lg-4, + .bodywebsite .mx-lg-4 { + margin-right: 1.5rem !important; + } + .bodywebsite .mb-lg-4, + .bodywebsite .my-lg-4 { + margin-bottom: 1.5rem !important; + } + .bodywebsite .ml-lg-4, + .bodywebsite .mx-lg-4 { + margin-left: 1.5rem !important; + } + .bodywebsite .m-lg-5 { + margin: 3rem !important; + } + .bodywebsite .mt-lg-5, + .bodywebsite .my-lg-5 { + margin-top: 3rem !important; + } + .bodywebsite .mr-lg-5, + .bodywebsite .mx-lg-5 { + margin-right: 3rem !important; + } + .bodywebsite .mb-lg-5, + .bodywebsite .my-lg-5 { + margin-bottom: 3rem !important; + } + .bodywebsite .ml-lg-5, + .bodywebsite .mx-lg-5 { + margin-left: 3rem !important; + } + .bodywebsite .p-lg-0 { + padding: 0 !important; + } + .bodywebsite .pt-lg-0, + .bodywebsite .py-lg-0 { + padding-top: 0 !important; + } + .bodywebsite .pr-lg-0, + .bodywebsite .px-lg-0 { + padding-right: 0 !important; + } + .bodywebsite .pb-lg-0, + .bodywebsite .py-lg-0 { + padding-bottom: 0 !important; + } + .bodywebsite .pl-lg-0, + .bodywebsite .px-lg-0 { + padding-left: 0 !important; + } + .bodywebsite .p-lg-1 { + padding: 0.25rem !important; + } + .bodywebsite .pt-lg-1, + .bodywebsite .py-lg-1 { + padding-top: 0.25rem !important; + } + .bodywebsite .pr-lg-1, + .bodywebsite .px-lg-1 { + padding-right: 0.25rem !important; + } + .bodywebsite .pb-lg-1, + .bodywebsite .py-lg-1 { + padding-bottom: 0.25rem !important; + } + .bodywebsite .pl-lg-1, + .bodywebsite .px-lg-1 { + padding-left: 0.25rem !important; + } + .bodywebsite .p-lg-2 { + padding: 0.5rem !important; + } + .bodywebsite .pt-lg-2, + .bodywebsite .py-lg-2 { + padding-top: 0.5rem !important; + } + .bodywebsite .pr-lg-2, + .bodywebsite .px-lg-2 { + padding-right: 0.5rem !important; + } + .bodywebsite .pb-lg-2, + .bodywebsite .py-lg-2 { + padding-bottom: 0.5rem !important; + } + .bodywebsite .pl-lg-2, + .bodywebsite .px-lg-2 { + padding-left: 0.5rem !important; + } + .bodywebsite .p-lg-3 { + padding: 1rem !important; + } + .bodywebsite .pt-lg-3, + .bodywebsite .py-lg-3 { + padding-top: 1rem !important; + } + .bodywebsite .pr-lg-3, + .bodywebsite .px-lg-3 { + padding-right: 1rem !important; + } + .bodywebsite .pb-lg-3, + .bodywebsite .py-lg-3 { + padding-bottom: 1rem !important; + } + .bodywebsite .pl-lg-3, + .bodywebsite .px-lg-3 { + padding-left: 1rem !important; + } + .bodywebsite .p-lg-4 { + padding: 1.5rem !important; + } + .bodywebsite .pt-lg-4, + .bodywebsite .py-lg-4 { + padding-top: 1.5rem !important; + } + .bodywebsite .pr-lg-4, + .bodywebsite .px-lg-4 { + padding-right: 1.5rem !important; + } + .bodywebsite .pb-lg-4, + .bodywebsite .py-lg-4 { + padding-bottom: 1.5rem !important; + } + .bodywebsite .pl-lg-4, + .bodywebsite .px-lg-4 { + padding-left: 1.5rem !important; + } + .bodywebsite .p-lg-5 { + padding: 3rem !important; + } + .bodywebsite .pt-lg-5, + .bodywebsite .py-lg-5 { + padding-top: 3rem !important; + } + .bodywebsite .pr-lg-5, + .bodywebsite .px-lg-5 { + padding-right: 3rem !important; + } + .bodywebsite .pb-lg-5, + .bodywebsite .py-lg-5 { + padding-bottom: 3rem !important; + } + .bodywebsite .pl-lg-5, + .bodywebsite .px-lg-5 { + padding-left: 3rem !important; + } + .bodywebsite .m-lg-auto { + margin: auto !important; + } + .bodywebsite .mt-lg-auto, + .bodywebsite .my-lg-auto { + margin-top: auto !important; + } + .bodywebsite .mr-lg-auto, + .bodywebsite .mx-lg-auto { + margin-right: auto !important; + } + .bodywebsite .mb-lg-auto, + .bodywebsite .my-lg-auto { + margin-bottom: auto !important; + } + .bodywebsite .ml-lg-auto, + .bodywebsite .mx-lg-auto { + margin-left: auto !important; + } +} +@media (min-width: 1200px) { + .bodywebsite .m-xl-0 { + margin: 0 !important; + } + .bodywebsite .mt-xl-0, + .bodywebsite .my-xl-0 { + margin-top: 0 !important; + } + .bodywebsite .mr-xl-0, + .bodywebsite .mx-xl-0 { + margin-right: 0 !important; + } + .bodywebsite .mb-xl-0, + .bodywebsite .my-xl-0 { + margin-bottom: 0 !important; + } + .bodywebsite .ml-xl-0, + .bodywebsite .mx-xl-0 { + margin-left: 0 !important; + } + .bodywebsite .m-xl-1 { + margin: 0.25rem !important; + } + .bodywebsite .mt-xl-1, + .bodywebsite .my-xl-1 { + margin-top: 0.25rem !important; + } + .bodywebsite .mr-xl-1, + .bodywebsite .mx-xl-1 { + margin-right: 0.25rem !important; + } + .bodywebsite .mb-xl-1, + .bodywebsite .my-xl-1 { + margin-bottom: 0.25rem !important; + } + .bodywebsite .ml-xl-1, + .bodywebsite .mx-xl-1 { + margin-left: 0.25rem !important; + } + .bodywebsite .m-xl-2 { + margin: 0.5rem !important; + } + .bodywebsite .mt-xl-2, + .bodywebsite .my-xl-2 { + margin-top: 0.5rem !important; + } + .bodywebsite .mr-xl-2, + .bodywebsite .mx-xl-2 { + margin-right: 0.5rem !important; + } + .bodywebsite .mb-xl-2, + .bodywebsite .my-xl-2 { + margin-bottom: 0.5rem !important; + } + .bodywebsite .ml-xl-2, + .bodywebsite .mx-xl-2 { + margin-left: 0.5rem !important; + } + .bodywebsite .m-xl-3 { + margin: 1rem !important; + } + .bodywebsite .mt-xl-3, + .bodywebsite .my-xl-3 { + margin-top: 1rem !important; + } + .bodywebsite .mr-xl-3, + .bodywebsite .mx-xl-3 { + margin-right: 1rem !important; + } + .bodywebsite .mb-xl-3, + .bodywebsite .my-xl-3 { + margin-bottom: 1rem !important; + } + .bodywebsite .ml-xl-3, + .bodywebsite .mx-xl-3 { + margin-left: 1rem !important; + } + .bodywebsite .m-xl-4 { + margin: 1.5rem !important; + } + .bodywebsite .mt-xl-4, + .bodywebsite .my-xl-4 { + margin-top: 1.5rem !important; + } + .bodywebsite .mr-xl-4, + .bodywebsite .mx-xl-4 { + margin-right: 1.5rem !important; + } + .bodywebsite .mb-xl-4, + .bodywebsite .my-xl-4 { + margin-bottom: 1.5rem !important; + } + .bodywebsite .ml-xl-4, + .bodywebsite .mx-xl-4 { + margin-left: 1.5rem !important; + } + .bodywebsite .m-xl-5 { + margin: 3rem !important; + } + .bodywebsite .mt-xl-5, + .bodywebsite .my-xl-5 { + margin-top: 3rem !important; + } + .bodywebsite .mr-xl-5, + .bodywebsite .mx-xl-5 { + margin-right: 3rem !important; + } + .bodywebsite .mb-xl-5, + .bodywebsite .my-xl-5 { + margin-bottom: 3rem !important; + } + .bodywebsite .ml-xl-5, + .bodywebsite .mx-xl-5 { + margin-left: 3rem !important; + } + .bodywebsite .p-xl-0 { + padding: 0 !important; + } + .bodywebsite .pt-xl-0, + .bodywebsite .py-xl-0 { + padding-top: 0 !important; + } + .bodywebsite .pr-xl-0, + .bodywebsite .px-xl-0 { + padding-right: 0 !important; + } + .bodywebsite .pb-xl-0, + .bodywebsite .py-xl-0 { + padding-bottom: 0 !important; + } + .bodywebsite .pl-xl-0, + .bodywebsite .px-xl-0 { + padding-left: 0 !important; + } + .bodywebsite .p-xl-1 { + padding: 0.25rem !important; + } + .bodywebsite .pt-xl-1, + .bodywebsite .py-xl-1 { + padding-top: 0.25rem !important; + } + .bodywebsite .pr-xl-1, + .bodywebsite .px-xl-1 { + padding-right: 0.25rem !important; + } + .bodywebsite .pb-xl-1, + .bodywebsite .py-xl-1 { + padding-bottom: 0.25rem !important; + } + .bodywebsite .pl-xl-1, + .bodywebsite .px-xl-1 { + padding-left: 0.25rem !important; + } + .bodywebsite .p-xl-2 { + padding: 0.5rem !important; + } + .bodywebsite .pt-xl-2, + .bodywebsite .py-xl-2 { + padding-top: 0.5rem !important; + } + .bodywebsite .pr-xl-2, + .bodywebsite .px-xl-2 { + padding-right: 0.5rem !important; + } + .bodywebsite .pb-xl-2, + .bodywebsite .py-xl-2 { + padding-bottom: 0.5rem !important; + } + .bodywebsite .pl-xl-2, + .bodywebsite .px-xl-2 { + padding-left: 0.5rem !important; + } + .bodywebsite .p-xl-3 { + padding: 1rem !important; + } + .bodywebsite .pt-xl-3, + .bodywebsite .py-xl-3 { + padding-top: 1rem !important; + } + .bodywebsite .pr-xl-3, + .bodywebsite .px-xl-3 { + padding-right: 1rem !important; + } + .bodywebsite .pb-xl-3, + .bodywebsite .py-xl-3 { + padding-bottom: 1rem !important; + } + .bodywebsite .pl-xl-3, + .bodywebsite .px-xl-3 { + padding-left: 1rem !important; + } + .bodywebsite .p-xl-4 { + padding: 1.5rem !important; + } + .bodywebsite .pt-xl-4, + .bodywebsite .py-xl-4 { + padding-top: 1.5rem !important; + } + .bodywebsite .pr-xl-4, + .bodywebsite .px-xl-4 { + padding-right: 1.5rem !important; + } + .bodywebsite .pb-xl-4, + .bodywebsite .py-xl-4 { + padding-bottom: 1.5rem !important; + } + .bodywebsite .pl-xl-4, + .bodywebsite .px-xl-4 { + padding-left: 1.5rem !important; + } + .bodywebsite .p-xl-5 { + padding: 3rem !important; + } + .bodywebsite .pt-xl-5, + .bodywebsite .py-xl-5 { + padding-top: 3rem !important; + } + .bodywebsite .pr-xl-5, + .bodywebsite .px-xl-5 { + padding-right: 3rem !important; + } + .bodywebsite .pb-xl-5, + .bodywebsite .py-xl-5 { + padding-bottom: 3rem !important; + } + .bodywebsite .pl-xl-5, + .bodywebsite .px-xl-5 { + padding-left: 3rem !important; + } + .bodywebsite .m-xl-auto { + margin: auto !important; + } + .bodywebsite .mt-xl-auto, + .bodywebsite .my-xl-auto { + margin-top: auto !important; + } + .bodywebsite .mr-xl-auto, + .bodywebsite .mx-xl-auto { + margin-right: auto !important; + } + .bodywebsite .mb-xl-auto, + .bodywebsite .my-xl-auto { + margin-bottom: auto !important; + } + .bodywebsite .ml-xl-auto, + .bodywebsite .mx-xl-auto { + margin-left: auto !important; + } +} +@media (min-width: 1800px) { + .bodywebsite .m-xxl-0 { + margin: 0 !important; + } + .bodywebsite .mt-xxl-0, + .bodywebsite .my-xxl-0 { + margin-top: 0 !important; + } + .bodywebsite .mr-xxl-0, + .bodywebsite .mx-xxl-0 { + margin-right: 0 !important; + } + .bodywebsite .mb-xxl-0, + .bodywebsite .my-xxl-0 { + margin-bottom: 0 !important; + } + .bodywebsite .ml-xxl-0, + .bodywebsite .mx-xxl-0 { + margin-left: 0 !important; + } + .bodywebsite .m-xxl-1 { + margin: 0.25rem !important; + } + .bodywebsite .mt-xxl-1, + .bodywebsite .my-xxl-1 { + margin-top: 0.25rem !important; + } + .bodywebsite .mr-xxl-1, + .bodywebsite .mx-xxl-1 { + margin-right: 0.25rem !important; + } + .bodywebsite .mb-xxl-1, + .bodywebsite .my-xxl-1 { + margin-bottom: 0.25rem !important; + } + .bodywebsite .ml-xxl-1, + .bodywebsite .mx-xxl-1 { + margin-left: 0.25rem !important; + } + .bodywebsite .m-xxl-2 { + margin: 0.5rem !important; + } + .bodywebsite .mt-xxl-2, + .bodywebsite .my-xxl-2 { + margin-top: 0.5rem !important; + } + .bodywebsite .mr-xxl-2, + .bodywebsite .mx-xxl-2 { + margin-right: 0.5rem !important; + } + .bodywebsite .mb-xxl-2, + .bodywebsite .my-xxl-2 { + margin-bottom: 0.5rem !important; + } + .bodywebsite .ml-xxl-2, + .bodywebsite .mx-xxl-2 { + margin-left: 0.5rem !important; + } + .bodywebsite .m-xxl-3 { + margin: 1rem !important; + } + .bodywebsite .mt-xxl-3, + .bodywebsite .my-xxl-3 { + margin-top: 1rem !important; + } + .bodywebsite .mr-xxl-3, + .bodywebsite .mx-xxl-3 { + margin-right: 1rem !important; + } + .bodywebsite .mb-xxl-3, + .bodywebsite .my-xxl-3 { + margin-bottom: 1rem !important; + } + .bodywebsite .ml-xxl-3, + .bodywebsite .mx-xxl-3 { + margin-left: 1rem !important; + } + .bodywebsite .m-xxl-4 { + margin: 1.5rem !important; + } + .bodywebsite .mt-xxl-4, + .bodywebsite .my-xxl-4 { + margin-top: 1.5rem !important; + } + .bodywebsite .mr-xxl-4, + .bodywebsite .mx-xxl-4 { + margin-right: 1.5rem !important; + } + .bodywebsite .mb-xxl-4, + .bodywebsite .my-xxl-4 { + margin-bottom: 1.5rem !important; + } + .bodywebsite .ml-xxl-4, + .bodywebsite .mx-xxl-4 { + margin-left: 1.5rem !important; + } + .bodywebsite .m-xxl-5 { + margin: 3rem !important; + } + .bodywebsite .mt-xxl-5, + .bodywebsite .my-xxl-5 { + margin-top: 3rem !important; + } + .bodywebsite .mr-xxl-5, + .bodywebsite .mx-xxl-5 { + margin-right: 3rem !important; + } + .bodywebsite .mb-xxl-5, + .bodywebsite .my-xxl-5 { + margin-bottom: 3rem !important; + } + .bodywebsite .ml-xxl-5, + .bodywebsite .mx-xxl-5 { + margin-left: 3rem !important; + } + .bodywebsite .p-xxl-0 { + padding: 0 !important; + } + .bodywebsite .pt-xxl-0, + .bodywebsite .py-xxl-0 { + padding-top: 0 !important; + } + .bodywebsite .pr-xxl-0, + .bodywebsite .px-xxl-0 { + padding-right: 0 !important; + } + .bodywebsite .pb-xxl-0, + .bodywebsite .py-xxl-0 { + padding-bottom: 0 !important; + } + .bodywebsite .pl-xxl-0, + .bodywebsite .px-xxl-0 { + padding-left: 0 !important; + } + .bodywebsite .p-xxl-1 { + padding: 0.25rem !important; + } + .bodywebsite .pt-xxl-1, + .bodywebsite .py-xxl-1 { + padding-top: 0.25rem !important; + } + .bodywebsite .pr-xxl-1, + .bodywebsite .px-xxl-1 { + padding-right: 0.25rem !important; + } + .bodywebsite .pb-xxl-1, + .bodywebsite .py-xxl-1 { + padding-bottom: 0.25rem !important; + } + .bodywebsite .pl-xxl-1, + .bodywebsite .px-xxl-1 { + padding-left: 0.25rem !important; + } + .bodywebsite .p-xxl-2 { + padding: 0.5rem !important; + } + .bodywebsite .pt-xxl-2, + .bodywebsite .py-xxl-2 { + padding-top: 0.5rem !important; + } + .bodywebsite .pr-xxl-2, + .bodywebsite .px-xxl-2 { + padding-right: 0.5rem !important; + } + .bodywebsite .pb-xxl-2, + .bodywebsite .py-xxl-2 { + padding-bottom: 0.5rem !important; + } + .bodywebsite .pl-xxl-2, + .bodywebsite .px-xxl-2 { + padding-left: 0.5rem !important; + } + .bodywebsite .p-xxl-3 { + padding: 1rem !important; + } + .bodywebsite .pt-xxl-3, + .bodywebsite .py-xxl-3 { + padding-top: 1rem !important; + } + .bodywebsite .pr-xxl-3, + .bodywebsite .px-xxl-3 { + padding-right: 1rem !important; + } + .bodywebsite .pb-xxl-3, + .bodywebsite .py-xxl-3 { + padding-bottom: 1rem !important; + } + .bodywebsite .pl-xxl-3, + .bodywebsite .px-xxl-3 { + padding-left: 1rem !important; + } + .bodywebsite .p-xxl-4 { + padding: 1.5rem !important; + } + .bodywebsite .pt-xxl-4, + .bodywebsite .py-xxl-4 { + padding-top: 1.5rem !important; + } + .bodywebsite .pr-xxl-4, + .bodywebsite .px-xxl-4 { + padding-right: 1.5rem !important; + } + .bodywebsite .pb-xxl-4, + .bodywebsite .py-xxl-4 { + padding-bottom: 1.5rem !important; + } + .bodywebsite .pl-xxl-4, + .bodywebsite .px-xxl-4 { + padding-left: 1.5rem !important; + } + .bodywebsite .p-xxl-5 { + padding: 3rem !important; + } + .bodywebsite .pt-xxl-5, + .bodywebsite .py-xxl-5 { + padding-top: 3rem !important; + } + .bodywebsite .pr-xxl-5, + .bodywebsite .px-xxl-5 { + padding-right: 3rem !important; + } + .bodywebsite .pb-xxl-5, + .bodywebsite .py-xxl-5 { + padding-bottom: 3rem !important; + } + .bodywebsite .pl-xxl-5, + .bodywebsite .px-xxl-5 { + padding-left: 3rem !important; + } + .bodywebsite .m-xxl-auto { + margin: auto !important; + } + .bodywebsite .mt-xxl-auto, + .bodywebsite .my-xxl-auto { + margin-top: auto !important; + } + .bodywebsite .mr-xxl-auto, + .bodywebsite .mx-xxl-auto { + margin-right: auto !important; + } + .bodywebsite .mb-xxl-auto, + .bodywebsite .my-xxl-auto { + margin-bottom: auto !important; + } + .bodywebsite .ml-xxl-auto, + .bodywebsite .mx-xxl-auto { + margin-left: auto !important; + } +} +.bodywebsite .text-justify { + text-align: justify !important; +} +.bodywebsite .text-nowrap { + white-space: nowrap !important; +} +.bodywebsite .text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.bodywebsite .text-left { + text-align: left !important; +} +.bodywebsite .text-right { + text-align: right !important; +} +.bodywebsite .text-center { + text-align: center !important; +} +@media (min-width: 576px) { + .bodywebsite .text-sm-left { + text-align: left !important; + } + .bodywebsite .text-sm-right { + text-align: right !important; + } + .bodywebsite .text-sm-center { + text-align: center !important; + } +} +@media (min-width: 768px) { + .bodywebsite .text-md-left { + text-align: left !important; + } + .bodywebsite .text-md-right { + text-align: right !important; + } + .bodywebsite .text-md-center { + text-align: center !important; + } +} +@media (min-width: 992px) { + .bodywebsite .text-lg-left { + text-align: left !important; + } + .bodywebsite .text-lg-right { + text-align: right !important; + } + .bodywebsite .text-lg-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .bodywebsite .text-xl-left { + text-align: left !important; + } + .bodywebsite .text-xl-right { + text-align: right !important; + } + .bodywebsite .text-xl-center { + text-align: center !important; + } +} +@media (min-width: 1800px) { + .bodywebsite .text-xxl-left { + text-align: left !important; + } + .bodywebsite .text-xxl-right { + text-align: right !important; + } + .bodywebsite .text-xxl-center { + text-align: center !important; + } +} +.bodywebsite .text-lowercase { + text-transform: lowercase !important; +} +.bodywebsite .text-uppercase { + text-transform: uppercase !important; +} +.bodywebsite .text-capitalize { + text-transform: capitalize !important; +} +.bodywebsite .font-weight-light { + font-weight: 300 !important; +} +.bodywebsite .font-weight-normal { + font-weight: 400 !important; +} +.bodywebsite .font-weight-bold { + font-weight: 700 !important; +} +.bodywebsite .font-italic { + font-style: italic !important; +} +.bodywebsite .text-white { + color: #fff !important; +} +.bodywebsite .text-primary { + color: #007bff !important; +} +.bodywebsite a.text-primary:focus, +.bodywebsite a.text-primary:hover { + color: #0062cc !important; +} +.bodywebsite .text-secondary { + color: #868e96 !important; +} +.bodywebsite a.text-secondary:focus, +.bodywebsite a.text-secondary:hover { + color: #6c757d !important; +} +.bodywebsite .text-success { + color: #28a745 !important; +} +.bodywebsite a.text-success:focus, +.bodywebsite a.text-success:hover { + color: #1e7e34 !important; +} +.bodywebsite .text-info { + color: #17a2b8 !important; +} +.bodywebsite a.text-info:focus, +.bodywebsite a.text-info:hover { + color: #117a8b !important; +} +.bodywebsite .text-warning { + color: #ffc107 !important; +} +.bodywebsite a.text-warning:focus, +.bodywebsite a.text-warning:hover { + color: #d39e00 !important; +} +.bodywebsite .text-danger { + color: #dc3545 !important; +} +.bodywebsite a.text-danger:focus, +.bodywebsite a.text-danger:hover { + color: #bd2130 !important; +} +.bodywebsite .text-light { + color: #f8f9fa !important; +} +.bodywebsite a.text-light:focus, +.bodywebsite a.text-light:hover { + color: #dae0e5 !important; +} +.bodywebsite .text-dark { + color: #343a40 !important; +} +.bodywebsite a.text-dark:focus, +.bodywebsite a.text-dark:hover { + color: #1d2124 !important; +} +.bodywebsite .text-muted { + color: #dedede !important; +} +.bodywebsite .text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.bodywebsite .visible { + visibility: visible !important; +} +.bodywebsite .invisible { + visibility: hidden !important; +} +.bodywebsite .animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + opacity: 1; +} +.bodywebsite .animated:not(.page) { + will-change: transform; +} +.bodywebsite .animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +.bodywebsite .animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} +html .bodywebsite:not(.lt-ie10) .not-animated { + opacity: 0; +} +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +.bodywebsite .fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; +} +@-webkit-keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +.bodywebsite .fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; +} + diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/test2.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/test2.php new file mode 100644 index 00000000000..9939ba32bf6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/test2.php @@ -0,0 +1,4 @@ +ref.'/page126.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-corporate/containers/wrapper.php new file mode 100644 index 00000000000..26adb3ef220 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/containers/wrapper.php @@ -0,0 +1,278 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) { + $original_file = 'blog.rss'; +} + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost', 'status'=>1); + if ($l) { + $filters['lang'] = $l; + } + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($l); + $outputlangs->loadLangs(array("main", "other")); + $title = $desc = $outputlangs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed']; + $sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) { + $db->close(); +} +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ajax-loading.gif b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ajax-loading.gif new file mode 100644 index 00000000000..f7e0378a8ca Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ajax-loading.gif differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/alberteinstein.jpg b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/alberteinstein.jpg new file mode 100644 index 00000000000..869d4762746 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/alberteinstein.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/apache.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/apache.png new file mode 100644 index 00000000000..73a380ba51c Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/apache.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_coder.webp b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_coder.webp new file mode 100644 index 00000000000..b2e8e72e9dd Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_coder.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_computer_coffee.webp b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_computer_coffee.webp new file mode 100644 index 00000000000..792fdadeeee Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_computer_coffee.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_dolibarr.webp b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_dolibarr.webp new file mode 100644 index 00000000000..66d7c020d21 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_dolibarr.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_rough-horn.webp b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_rough-horn.webp new file mode 100644 index 00000000000..7c9420b5591 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_rough-horn.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_sunset.webp b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_sunset.webp new file mode 100644 index 00000000000..a89a14fdec8 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/background_sunset.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/briefcase.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/briefcase.png new file mode 100644 index 00000000000..bf6fa1aa05c Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/briefcase.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/calendar.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/calendar.png new file mode 100644 index 00000000000..d065bdcf9f4 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/calendar.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/daviddoe.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/daviddoe.png new file mode 100644 index 00000000000..ec1fe6eacb9 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/daviddoe.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr.ico b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr.ico new file mode 100644 index 00000000000..611e4bf150e Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr.ico differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_256x256.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_256x256.png new file mode 100644 index 00000000000..970f841001b Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_256x256.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_logo.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_logo.png new file mode 100644 index 00000000000..8edd0660e60 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/dolibarr_logo.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-5.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-5.png new file mode 100644 index 00000000000..319e564ed3c Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-5.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-6.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-6.png new file mode 100644 index 00000000000..6991f9b0e72 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-6.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-quote.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-quote.png new file mode 100644 index 00000000000..3e903027e37 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/icon-quote.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/light-bulb.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/light-bulb.png new file mode 100644 index 00000000000..deaa9cf4ae1 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/light-bulb.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariadb.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariadb.png new file mode 100644 index 00000000000..26caeaea837 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariadb.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariecurie.jpg b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariecurie.jpg new file mode 100644 index 00000000000..c6aab3154f1 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/mariecurie.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/organization.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/organization.png new file mode 100644 index 00000000000..c77120cefae Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/organization.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ovh.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ovh.png new file mode 100644 index 00000000000..c4036d82bed Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ovh.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/package.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/package.png new file mode 100644 index 00000000000..f6ca65c0447 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/package.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/php.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/php.png new file mode 100644 index 00000000000..7b3e8ce8f6f Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/php.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/pierrecurie.jpg b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/pierrecurie.jpg new file mode 100644 index 00000000000..8ea6696ba45 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/pierrecurie.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_mini.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_mini.png new file mode 100644 index 00000000000..438d91ed1f9 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_mini.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_small.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_small.png new file mode 100644 index 00000000000..29580ebc5b0 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/apache_small.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_mini.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_mini.png new file mode 100644 index 00000000000..ed00343bf25 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_mini.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_small.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_small.png new file mode 100644 index 00000000000..fd206b7d0c4 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/mariadb_small.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_mini.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_mini.png new file mode 100644 index 00000000000..a4f3dc65994 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_mini.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_small.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_small.png new file mode 100644 index 00000000000..77dae0c33ac Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ovh_small.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_mini.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_mini.png new file mode 100644 index 00000000000..67b1977d1c5 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_mini.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_small.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_small.png new file mode 100644 index 00000000000..ee42122929d Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/php_small.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_mini.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_mini.png new file mode 100644 index 00000000000..8218af0ea05 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_mini.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_small.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_small.png new file mode 100644 index 00000000000..0f5df4b61ae Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/thumbs/ubuntu_small.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ubuntu.png b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ubuntu.png new file mode 100644 index 00000000000..4bd8dbe0a0c Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-corporate/medias/image/websitekey/ubuntu.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate/medias/js/websitekey/extlib.min.js b/htdocs/install/doctemplates/websites/website_template-corporate/medias/js/websitekey/extlib.min.js new file mode 100644 index 00000000000..7e0209f1df6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-corporate/medias/js/websitekey/extlib.min.js @@ -0,0 +1,853 @@ + + +/** + * @module Popper.js + * @author Federico Zivolo + * @see https://github.com/FezVrasta/popper.js + * @license MIT + * @version 1.11.0 + */ +(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var f=a.commonAncestorContainer;if(e!==f&&t!==f||i.contains(n))return p(f)?f:r(f);var l=s(e);return l.host?d(l.host,t):d(e,s(t).host)}function a(e){var t=1=o.clientWidth&&i>=o.clientHeight}),f=0i[e]&&!t.escapeWithReference&&(n=z(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=V,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,p=n.reference,s=-1!==['left','right'].indexOf(i),d=s?'height':'width',a=s?'top':'left',f=s?'left':'top',l=s?'bottom':'right',m=O(o)[d];p[l]-mr[l]&&(e.offsets.popper[a]+=p[a]+m-r[l]);var h=p[a]+p[d]/2-m/2,g=h-c(e.offsets.popper)[a];return g=_(z(r[d]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[a]=Math.round(g),e.offsets.arrow[f]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,f=e.offsets.reference,l=V,m='left'===i&&l(a.right)>l(f.left)||'right'===i&&l(a.left)l(f.top)||'bottom'===i&&l(a.top)l(o.right),g=l(a.top)l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[t]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(r.end)},supportsTransitionEnd:function(){return Boolean(r)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(e,n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var r=i[s],o=n[s],l=o&&a.isElement(o)?"element":t(o);if(!new RegExp(r).test(l))throw new Error(e.toUpperCase()+': Option "'+s+'" provided type "'+l+'" but expected type "'+r+'".')}}};return r=i(),e.fn.emulateTransitionEnd=s,a.supportsTransitionEnd()&&(e.event.special[a.TRANSITION_END]=n()),a}(),r=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},a=function(){var t="alert",n=e.fn[t],i={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},o={ALERT:"alert",FADE:"fade",SHOW:"show"},a=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=s.getSelectorFromElement(t),i=!1;return n&&(i=e(n)[0]),i||(i=e(t).closest("."+o.ALERT)[0]),i},n._triggerCloseEvent=function(t){var n=e.Event(i.CLOSE);return e(t).trigger(n),n},n._removeElement=function(t){var n=this;e(t).removeClass(o.SHOW),s.supportsTransitionEnd()&&e(t).hasClass(o.FADE)?e(t).one(s.TRANSITION_END,function(e){return n._destroyElement(t,e)}).emulateTransitionEnd(150):this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger(i.CLOSED).remove()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),s=i.data("bs.alert");s||(s=new t(this),i.data("bs.alert",s)),"close"===n&&s[n](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),t}();return e(document).on(i.CLICK_DATA_API,{DISMISS:'[data-dismiss="alert"]'}.DISMISS,a._handleDismiss(new a)),e.fn[t]=a._jQueryInterface,e.fn[t].Constructor=a,e.fn[t].noConflict=function(){return e.fn[t]=n,a._jQueryInterface},a}(),l=function(){var t="button",n=e.fn[t],i={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},o={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},a=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,r=e(this._element).closest(s.DATA_TOGGLE)[0];if(r){var o=e(this._element).find(s.INPUT)[0];if(o){if("radio"===o.type)if(o.checked&&e(this._element).hasClass(i.ACTIVE))t=!1;else{var a=e(r).find(s.ACTIVE)[0];a&&e(a).removeClass(i.ACTIVE)}if(t){if(o.hasAttribute("disabled")||r.hasAttribute("disabled")||o.classList.contains("disabled")||r.classList.contains("disabled"))return;o.checked=!e(this._element).hasClass(i.ACTIVE),e(o).trigger("change")}o.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!e(this._element).hasClass(i.ACTIVE)),t&&e(this._element).toggleClass(i.ACTIVE)},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each(function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()})},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),t}();return e(document).on(o.CLICK_DATA_API,s.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var n=t.target;e(n).hasClass(i.BUTTON)||(n=e(n).closest(s.BUTTON)),a._jQueryInterface.call(e(n),"toggle")}).on(o.FOCUS_BLUR_DATA_API,s.DATA_TOGGLE_CARROT,function(t){var n=e(t.target).closest(s.BUTTON)[0];e(n).toggleClass(i.FOCUS,/^focus(in)?$/.test(t.type))}),e.fn[t]=a._jQueryInterface,e.fn[t].Constructor=a,e.fn[t].noConflict=function(){return e.fn[t]=n,a._jQueryInterface},a}(),h=function(){var t="carousel",n="bs.carousel",i="."+n,o=e.fn[t],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},c={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},u={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},d={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},f=function(){function o(t,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=e(t)[0],this._indicatorsElement=e(this._element).find(d.INDICATORS)[0],this._addEventListeners()}var f=o.prototype;return f.next=function(){this._isSliding||this._slide(h.NEXT)},f.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},f.prev=function(){this._isSliding||this._slide(h.PREV)},f.pause=function(t){t||(this._isPaused=!0),e(this._element).find(d.NEXT_PREV)[0]&&s.supportsTransitionEnd()&&(s.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},f.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},f.to=function(t){var n=this;this._activeElement=e(this._element).find(d.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(c.SLID,function(){return n.to(t)});else{if(i===t)return this.pause(),void this.cycle();var s=t>i?h.NEXT:h.PREV;this._slide(s,this._items[t])}},f.dispose=function(){e(this._element).off(i),e.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},f._getConfig=function(n){return n=e.extend({},a,n),s.typeCheckConfig(t,n,l),n},f._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(c.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(e(this._element).on(c.MOUSEENTER,function(e){return t.pause(e)}).on(c.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&e(this._element).on(c.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},f._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},f._getItemIndex=function(t){return this._items=e.makeArray(e(t).parent().find(d.ITEM)),this._items.indexOf(t)},f._getItemByDirection=function(t,e){var n=t===h.NEXT,i=t===h.PREV,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===h.PREV?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},f._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),s=this._getItemIndex(e(this._element).find(d.ACTIVE_ITEM)[0]),r=e.Event(c.SLIDE,{relatedTarget:t,direction:n,from:s,to:i});return e(this._element).trigger(r),r},f._setActiveIndicatorElement=function(t){if(this._indicatorsElement){e(this._indicatorsElement).find(d.ACTIVE).removeClass(u.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&e(n).addClass(u.ACTIVE)}},f._slide=function(t,n){var i,r,o,a=this,l=e(this._element).find(d.ACTIVE_ITEM)[0],f=this._getItemIndex(l),_=n||l&&this._getItemByDirection(t,l),g=this._getItemIndex(_),m=Boolean(this._interval);if(t===h.NEXT?(i=u.LEFT,r=u.NEXT,o=h.LEFT):(i=u.RIGHT,r=u.PREV,o=h.RIGHT),_&&e(_).hasClass(u.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(_,o).isDefaultPrevented()&&l&&_){this._isSliding=!0,m&&this.pause(),this._setActiveIndicatorElement(_);var p=e.Event(c.SLID,{relatedTarget:_,direction:o,from:f,to:g});s.supportsTransitionEnd()&&e(this._element).hasClass(u.SLIDE)?(e(_).addClass(r),s.reflow(_),e(l).addClass(i),e(_).addClass(i),e(l).one(s.TRANSITION_END,function(){e(_).removeClass(i+" "+r).addClass(u.ACTIVE),e(l).removeClass(u.ACTIVE+" "+r+" "+i),a._isSliding=!1,setTimeout(function(){return e(a._element).trigger(p)},0)}).emulateTransitionEnd(600)):(e(l).removeClass(u.ACTIVE),e(_).addClass(u.ACTIVE),this._isSliding=!1,e(this._element).trigger(p)),m&&this.cycle()}},o._jQueryInterface=function(t){return this.each(function(){var i=e(this).data(n),s=e.extend({},a,e(this).data());"object"==typeof t&&e.extend(s,t);var r="string"==typeof t?t:s.slide;if(i||(i=new o(this,s),e(this).data(n,i)),"number"==typeof t)i.to(t);else if("string"==typeof r){if("undefined"==typeof i[r])throw new Error('No method named "'+r+'"');i[r]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(t){var i=s.getSelectorFromElement(this);if(i){var r=e(i)[0];if(r&&e(r).hasClass(u.CAROUSEL)){var a=e.extend({},e(r).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(e(r),a),l&&e(r).data(n).to(l),t.preventDefault()}}},r(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return a}}]),o}();return e(document).on(c.CLICK_DATA_API,d.DATA_SLIDE,f._dataApiClickHandler),e(window).on(c.LOAD_DATA_API,function(){e(d.DATA_RIDE).each(function(){var t=e(this);f._jQueryInterface.call(t,t.data())})}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=o,f._jQueryInterface},f}(),c=function(){var t="collapse",n="bs.collapse",i=e.fn[t],o={toggle:!0,parent:""},a={toggle:"boolean",parent:"(string|element)"},l={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},h={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},c={WIDTH:"width",HEIGHT:"height"},u={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},d=function(){function i(t,n){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var i=e(u.DATA_TOGGLE),r=0;r0&&this._triggerArray.push(o)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var d=i.prototype;return d.toggle=function(){e(this._element).hasClass(h.SHOW)?this.hide():this.show()},d.show=function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(h.SHOW)){var r,o;if(this._parent&&((r=e.makeArray(e(this._parent).children().children(u.ACTIVES))).length||(r=null)),!(r&&(o=e(r).data(n))&&o._isTransitioning)){var a=e.Event(l.SHOW);if(e(this._element).trigger(a),!a.isDefaultPrevented()){r&&(i._jQueryInterface.call(e(r),"hide"),o||e(r).data(n,null));var c=this._getDimension();e(this._element).removeClass(h.COLLAPSE).addClass(h.COLLAPSING),this._element.style[c]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(h.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var d=function(){e(t._element).removeClass(h.COLLAPSING).addClass(h.COLLAPSE).addClass(h.SHOW),t._element.style[c]="",t.setTransitioning(!1),e(t._element).trigger(l.SHOWN)};if(s.supportsTransitionEnd()){var f="scroll"+(c[0].toUpperCase()+c.slice(1));e(this._element).one(s.TRANSITION_END,d).emulateTransitionEnd(600),this._element.style[c]=this._element[f]+"px"}else d()}}}},d.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(h.SHOW)){var n=e.Event(l.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",s.reflow(this._element),e(this._element).addClass(h.COLLAPSING).removeClass(h.COLLAPSE).removeClass(h.SHOW),this._triggerArray.length)for(var r=0;r0},g._getPopperConfig=function(){var t=this,n={};"function"==typeof this._config.offset?n.fn=function(n){return n.offsets=e.extend({},n.offsets,t._config.offset(n.offsets)||{}),n}:n.offset=this._config.offset;var i={placement:this._getPlacement(),modifiers:{offset:n,flip:{enabled:this._config.flip}}};return this._inNavbar&&(i.modifiers.applyStyle={enabled:!this._inNavbar}),i},a._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(i),s="object"==typeof t?t:null;if(n||(n=new a(this,s),e(this).data(i,n)),"string"==typeof t){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},a._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var n=e.makeArray(e(u.DATA_TOGGLE)),s=0;s0&&r--,40===t.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},u._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},u._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},u={SHOW:"show",OUT:"out"},d={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},f={FADE:"fade",SHOW:"show"},_={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},m=function(){function o(t,e){this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var m=o.prototype;return m.enable=function(){this._isEnabled=!0},m.disable=function(){this._isEnabled=!1},m.toggleEnabled=function(){this._isEnabled=!this._isEnabled},m.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(f.SHOW))return void this._leave(null,this);this._enter(null,this)}},m.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},m.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var r=e.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!r)return;var a=this.getTipElement(),l=s.getUID(this.constructor.NAME);a.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&e(a).addClass(f.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,c=this._getAttachment(h);this.addAttachmentClass(c);var d=!1===this.config.container?document.body:e(this.config.container);e(a).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(a).appendTo(d),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,a,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_.ARROW}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),e(a).addClass(f.SHOW),"ontouchstart"in document.documentElement&&e("body").children().on("mouseover",null,e.noop);var g=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===u.OUT&&t._leave(null,t)};s.supportsTransitionEnd()&&e(this.tip).hasClass(f.FADE)?e(this.tip).one(s.TRANSITION_END,g).emulateTransitionEnd(o._TRANSITION_DURATION):g()}},m.hide=function(t){var n=this,i=this.getTipElement(),r=e.Event(this.constructor.Event.HIDE),o=function(){n._hoverState!==u.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};e(this.element).trigger(r),r.isDefaultPrevented()||(e(i).removeClass(f.SHOW),"ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,s.supportsTransitionEnd()&&e(this.tip).hasClass(f.FADE)?e(i).one(s.TRANSITION_END,o).emulateTransitionEnd(150):o(),this._hoverState="")},m.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},m.isWithContent=function(){return Boolean(this.getTitle())},m.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},m.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},m.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(_.TOOLTIP_INNER),this.getTitle()),t.removeClass(f.FADE+" "+f.SHOW)},m.setElementContent=function(t,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text()):t[i?"html":"text"](n)},m.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},m._getAttachment=function(t){return h[t.toUpperCase()]},m._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(n!==g.MANUAL){var i=n===g.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,s=n===g.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,function(e){return t._enter(e)}).on(s,t.config.selector,function(e){return t._leave(e)})}e(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=e.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},m._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},m._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?g.FOCUS:g.HOVER]=!0),e(n.getTipElement()).hasClass(f.SHOW)||n._hoverState===u.SHOW?n._hoverState=u.SHOW:(clearTimeout(n._timeout),n._hoverState=u.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===u.SHOW&&n.show()},n.config.delay.show):n.show())},m._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?g.FOCUS:g.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=u.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===u.OUT&&n.hide()},n.config.delay.hide):n.hide())},m._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},m._getConfig=function(n){return"number"==typeof(n=e.extend({},this.constructor.Default,e(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),s.typeCheckConfig(t,n,this.constructor.DefaultType),n},m._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},m._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(a);null!==n&&n.length>0&&t.removeClass(n.join(""))},m._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},m._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(f.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},o._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.tooltip"),i="object"==typeof t&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new o(this,i),e(this).data("bs.tooltip",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},r(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return c}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return l}}]),o}();return e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=o,m._jQueryInterface},m}(),_=function(){var t="popover",n=".bs.popover",i=e.fn[t],s=new RegExp("(^|\\s)bs-popover\\S+","g"),a=e.extend({},f.Default,{placement:"right",trigger:"click",content:"",template:''}),l=e.extend({},f.DefaultType,{content:"(string|element|function)"}),h={FADE:"fade",SHOW:"show"},c={TITLE:".popover-header",CONTENT:".popover-body"},u={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,INSERTED:"inserted"+n,CLICK:"click"+n,FOCUSIN:"focusin"+n,FOCUSOUT:"focusout"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n},d=function(i){function d(){return i.apply(this,arguments)||this}o(d,i);var f=d.prototype;return f.isWithContent=function(){return this.getTitle()||this._getContent()},f.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},f.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},f.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(c.TITLE),this.getTitle()),this.setElementContent(t.find(c.CONTENT),this._getContent()),t.removeClass(h.FADE+" "+h.SHOW)},f._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},f._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(s);null!==n&&n.length>0&&t.removeClass(n.join(""))},d._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/destroy|hide/.test(t))&&(n||(n=new d(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},r(d,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return a}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return u}},{key:"EVENT_KEY",get:function(){return n}},{key:"DefaultType",get:function(){return l}}]),d}(f);return e.fn[t]=d._jQueryInterface,e.fn[t].Constructor=d,e.fn[t].noConflict=function(){return e.fn[t]=i,d._jQueryInterface},d}(),g=function(){var t="scrollspy",n=e.fn[t],i={offset:10,method:"auto",target:""},o={offset:"number",method:"string",target:"(string|element)"},a={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},l={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},h={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},c={OFFSET:"offset",POSITION:"position"},u=function(){function n(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+h.NAV_LINKS+","+this._config.target+" "+h.LIST_ITEMS+","+this._config.target+" "+h.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(a.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var u=n.prototype;return u.refresh=function(){var t=this,n=this._scrollElement!==this._scrollElement.window?c.POSITION:c.OFFSET,i="auto"===this._config.method?n:this._config.method,r=i===c.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),e.makeArray(e(this._selector)).map(function(t){var n,o=s.getSelectorFromElement(t);if(o&&(n=e(o)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[e(n)[i]().top+r,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},u.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},u._getConfig=function(n){if("string"!=typeof(n=e.extend({},i,n)).target){var r=e(n.target).attr("id");r||(r=s.getUID(t),e(n.target).attr("id",r)),n.target="#"+r}return s.typeCheckConfig(t,n,o),n},u._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},u._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},u._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},u._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;)this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},a=function(){function t(t){this._element=t}var a=t.prototype;return a.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(i.ACTIVE)||e(this._element).hasClass(i.DISABLED))){var r,a,l=e(this._element).closest(o.NAV_LIST_GROUP)[0],h=s.getSelectorFromElement(this._element);if(l){var c="UL"===l.nodeName?o.ACTIVE_UL:o.ACTIVE;a=e.makeArray(e(l).find(c)),a=a[a.length-1]}var u=e.Event(n.HIDE,{relatedTarget:this._element}),d=e.Event(n.SHOW,{relatedTarget:a});if(a&&e(a).trigger(u),e(this._element).trigger(d),!d.isDefaultPrevented()&&!u.isDefaultPrevented()){h&&(r=e(h)[0]),this._activate(this._element,l);var f=function(){var i=e.Event(n.HIDDEN,{relatedTarget:t._element}),s=e.Event(n.SHOWN,{relatedTarget:a});e(a).trigger(i),e(t._element).trigger(s)};r?this._activate(r,r.parentNode,f):f()}}},a.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},a._activate=function(t,n,r){var a,l=this,h=(a="UL"===n.nodeName?e(n).find(o.ACTIVE_UL):e(n).children(o.ACTIVE))[0],c=r&&s.supportsTransitionEnd()&&h&&e(h).hasClass(i.FADE),u=function(){return l._transitionComplete(t,h,c,r)};h&&c?e(h).one(s.TRANSITION_END,u).emulateTransitionEnd(150):u(),h&&e(h).removeClass(i.SHOW)},a._transitionComplete=function(t,n,r,a){if(n){e(n).removeClass(i.ACTIVE);var l=e(n.parentNode).find(o.DROPDOWN_ACTIVE_CHILD)[0];l&&e(l).removeClass(i.ACTIVE),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass(i.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),r?(s.reflow(t),e(t).addClass(i.SHOW)):e(t).removeClass(i.FADE),t.parentNode&&e(t.parentNode).hasClass(i.DROPDOWN_MENU)){var h=e(t).closest(o.DROPDOWN)[0];h&&e(h).find(o.DROPDOWN_TOGGLE).addClass(i.ACTIVE),t.setAttribute("aria-expanded",!0)}a&&a()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),s=i.data("bs.tab");if(s||(s=new t(this),i.data("bs.tab",s)),"string"==typeof n){if("undefined"==typeof s[n])throw new Error('No method named "'+n+'"');s[n]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),t}();return e(document).on(n.CLICK_DATA_API,o.DATA_TOGGLE,function(t){t.preventDefault(),a._jQueryInterface.call(e(this),"show")}),e.fn.tab=a._jQueryInterface,e.fn.tab.Constructor=a,e.fn.tab.noConflict=function(){return e.fn.tab=t,a._jQueryInterface},a}();return function(){if("undefined"==typeof e)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=s,t.Alert=a,t.Button=l,t.Carousel=h,t.Collapse=c,t.Dropdown=u,t.Modal=d,t.Popover=_,t.Scrollspy=g,t.Tab=m,t.Tooltip=f,t}({},$,Popper); + + +/** + * @module Regula + * @description An annotation-based form-validation framework in Javascript + * @license BSD + * @version 1.3.4 + * @copyright Robert Nyman, http://www.robertnyman.com + */ +(function(e,t){typeof define=="function"&&define.amd?define("utils/MapUtils",t):(typeof e.regulaModules=="undefined"&&(e.regulaModules={}),e.regulaModules.MapUtils=t())})(this,function(){return{iterateOverMap:function(e,t){var n=0;for(var r in e)e.hasOwnProperty(r)&&r!=="__size__"&&(t.call(e,r,e[r],n),n++)},exists:function(e,t){var n=!1,r=0;while(!n&&r0&&(typeof r=="undefined"||o&&o.test(a))&&s.push(u);return s}function n(e,t){var n=e.getAttribute&&e.getAttribute(t)||null;if(!n){var r=e.attributes;for(var i=0;i0)for(var s in e)e.hasOwnProperty(s)&&s!="__size__"&&t.put(i,s,e[s]);return i}function f(e,t,n,i){var s=o[y.constraintType],a=W(t,s,i),f={group:n,constraintName:e.constraintName,custom:u[s].custom,compound:u[s].compound,async:u[s].async,constraintParameters:y.params,failingElements:e.failingElements,message:a};return r.reportAsSingleViolation||(f.composingConstraintViolations=e.composingConstraintViolations||[]),f}var l=[],c=[];for(var h=0;h0){v=[];for(var h=0;h0){v===null&&(v=[]);var T=0;for(var h=0;h0)throw new r.Exception.IllegalArgumentException("No constraints have been bound to the specified elements: "+i.explode(p)+". "+r.explodeParameters(e));return n=M(n),D(n,e)}function N(e){var t=[],n={asyncContexts:[],syncContexts:[]};for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];for(var u=0;u0)throw new r.Exception.IllegalArgumentException("No constraints have been bound to the specified elements: "+i.explode(t)+". "+r.explodeParameters(e));return n=M(n),D(n,e)}function C(e){var t=!1,n={groupedContexts:{}},i=0;while(i0)throw new r.Exception.IllegalArgumentException("The following elements: "+i.explode(n)+" were not found in one or more of the following group(s): ["+i.explode(t,",").replace(/,/g,", ")+"]. "+r.explodeParameters(e));var m=_(o);return e.groups=m.groups,o=m.uniqueConstraintsToValidate,P(e,o,s)}function A(e){var t=!1,n={groupedContexts:{}},r=0;while(r0&&(n=B(e));if(e.asyncContexts.length>0){if(!t.callback)throw new r.Exception.IllegalArgumentException("One or more constraints to be validated are asynchronous, but a callback has not been provided.");j(e,function(e){n.length>0?n=n.concat(e):n=e,t.callback(n)})}else t.callback&&t.callback(n);return n}function P(e,t,n){var i=F(e.groups,e.independent,t);if(n){if(!e.callback)throw new r.Exception.IllegalArgumentException("One or more constraints to be validated are asynchronous, but a callback has not been provided.");if(!e.independent&&i.length>0){var s=i[0].group,o=t.groupedContexts[s];t.groupedContexts={},t.groupedContexts[s]=o}I(e.groups,e.independent,t,function(t){i.length>0?i=i.concat(t):i=t,e.callback(i)})}else e.callback&&e.callback(i);return i}function H(e,t,n){var i=a[e];if(!i)throw new r.Exception.IllegalArgumentException("Undefined group in group list (group: "+e+", elementId: "+t+", constraint: "+n+")");var s=i[t];if(!s)throw new r.Exception.IllegalArgumentException("No constraints have been defined for the element with id: "+t+" in group "+e);var o=s[n];if(!o)throw new r.Exception.IllegalArgumentException("Constraint "+n+" in group "+e+" hasn't been bound to the element with id "+t);return{group:e,elementId:t,elementConstraint:n,params:o,async:u[n].async}}function B(e){var t=[],n=0;while(n0},max:function(e){var t=!0;return g(this,e)&&(t=parseFloat(this.value)<=parseFloat(e.value)),t},min:function(e){var t=!0;return g(this,e)&&(t=parseFloat(this.value)>=parseFloat(e.value)),t},range:function(e){var t=!0;return g(this,e)&&(t=this.value.replace(/\s/g,"")!=""&&parseFloat(this.value)<=parseFloat(e.max)&&parseFloat(this.value)>=parseFloat(e.min)),t},notBlank:function(e){return this.value.replace(/\s/g,"")!=""},blank:function(e){return this.value.replace(/\s/g,"")===""},matches:function(e){var t=!0;if(g(this,e)){var n,r;typeof e["regex"]=="string"?r=e.regex.replace(/^\//,"").replace(/\/$/,""):r=e.regex,typeof e["flags"]!="undefined"?n=new RegExp(r.toString().replace(/^\//,"").replace(/\/[^\/]*$/,""),e.flags):n=new RegExp(r),t=n.test(this.value)}return t},email:function(e){var t=!0;return g(this,e)&&(t=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(this.value)),t},alpha:function(e){var t=!0;return g(this,e)&&(t=/^[A-Za-z]+$/.test(this.value)),t},numeric:function(e){var t=!0;return g(this,e)&&(t=/^[0-9]+$/.test(this.value)),t},integer:function(e){var t=!0;return g(this,e)&&(t=/^-?[0-9]+$/.test(this.value)),t},real:function(e){var t=!0;return g(this,e)&&(t=/^-?([0-9]+(\.[0-9]+)?|\.[0-9]+)$/.test(this.value)),t},alphaNumeric:function(e){var t=!0;return g(this,e)&&(t=/^[0-9A-Za-z]+$/.test(this.value)),t},completelyFilled:function(e){var t=[];for(var n=0;n=e.min&&this.value.length<=e.max),t},digits:function(e){var t=!0;if(g(this,e)){var n=this.value.replace(/\s/g,""),r=n.split(/\./);t=!1,n.length>0&&(r.length==1&&(r[1]=""),e.integer>0?t=r[0].length<=e.integer:t=!0,e.fraction>0&&(t=t&&r[1].length<=e.fraction))}return t},past:function(e){var t=!0;if(g(this,e)){var n=y.call(this,e);t=n.dateToValidaten.dateToTestAgainst}return t},url:function(e){var t=!0;return g(this,e)&&(t=/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(this.value)),t},step:function(e){var t=!0;if(g(this,e)){var n=parseFloat(this.value),r=parseFloat(e.max),i=parseFloat(e.min),s=parseFloat(e.value);t=n<=r&&n>=i&&n%s===0}return t},html5Required:function(e){return!this.validity.valueMissing},html5Email:w,html5URL:w,html5Number:w,html5DateTime:w,html5DateTimeLocal:w,html5Date:w,html5Month:w,html5Time:w,html5Week:w,html5Range:w,html5Tel:w,html5Color:w,html5Pattern:function(e){return!this.validity.patternMismatch},html5MaxLength:function(e){return!this.validity.tooLong},html5Min:function(e){return!this.validity.rowUnderflow},html5Max:function(e){return!this.validity.rowOverflow},html5Step:function(e){return!this.validity.stepMismatch}};return{Validator:d,init:p,wrapValidatorWithEmptyCheck:b,initializePublicValidators:h,compoundValidator:m,validate:E,runValidatorFor:U,interpolateConstraintDefaultMessage:W,createPublicValidator:v}}),function(e,t){typeof define=="function"&&define.amd?define("domain/CompositionGraph",t):(typeof e.regulaModules=="undefined"&&(e.regulaModules={}),e.regulaModules.CompositionGraph=t())}(this,function(){function n(n){var r=n.type,i=n.name,s=n.parent,o=typeof e[r]=="undefined"?{visited:!1,name:i,type:r,parents:[],children:[]}:e[r];s==null?t.children.push(o):(s.children.push(o),o.parents.push(s)),e[r]=o}function r(){var e={},n=function r(t,n){var i=typeof e[t.type]=="undefined"?{visited:t.visited,name:t.name,type:t.type,parents:[],children:[]}:e[t.type];n!==null&&i.parents.push(n);for(var s=0;s0&&(s={error:!0,message:n.generateExceptionMessage(e,o[t.constraintType],"You seem to have provided some optional or required parameters for @"+o[t.constraintType]+", but you are still missing the following "+u.length+" required parameter(s): "+i.explode(u,", ")),data:null}),s}function d(e,n){var r=t.getNodeByType(s[e]);r==null&&(t.addNode({type:s[e],name:e,parent:null}),r=t.getNodeByType(s[e]));for(var i=0;i0&&t.successful)t=c(e),n.push(t.data);return t.data=n,t}function c(e){var n={successful:!0,message:"",data:null},i=e.shift();return r(i).length==0&&(i=e.shift()),i=="@"?n=h(e):n={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid constraint. Constraint definitions need to start with '@'")+" "+n.message,data:null},n}function h(e){var r={Between:"Range",Matches:"Pattern",Empty:"Blank",NotEmpty:"NotBlank",IsAlpha:"Alpha",IsNumeric:"Integer",IsAlphaNumeric:"AlphaNumeric"},i=p(e);if(i.successful){a=i.data,a=r[a]?r[a]:a;if(n.constraintDefinitions[a]){i=m(e);if(i.successful){i=n.verifyConstraintDefinition(o,a,i.data);if(i.successful){var s=i.data;i.data={element:o,constraintName:a,definedParameters:s}}}}else i={successful:!1,message:t.generateExceptionMessage(o,a,"I cannot find the specified constraint name. If this is a custom constraint, you need to define it before you bind to it")+" "+i.message,data:null}}else i={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid constraint name in constraint definition")+" "+i.message,data:null};return i}function p(e){var n=r(e.shift()),i=d(n.charAt(0));if(i.successful){var s=1;while(s0&&i(n)==","&&s.successful)n.shift(),s=g(n),s.successful&&(e.put(u,s.data.name,s.data.value),r(i(n)).length==0&&n.shift());if(s.successful){var f=n.shift();r(f).length==0&&(f=n.shift()),f!=")"?s={successful:!1,message:t.generateExceptionMessage(o,a,"Cannot find matching closing ) in parameter list")+" "+s.message,data:null}:s.data=u}}else s={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid parameter definition")+" "+s.message,data:null}}}else i(n)!==undefined&&i(n)!="@"&&(s={successful:!1,message:t.generateExceptionMessage(o,a,"Unexpected character '"+i(n)+"'"+" after constraint definition")+" "+s.message,data:null});return s}function g(e){var n=y(e);if(n.successful){var r=n.data,i=e.shift();i=="="?(n=b(e),n.successful?n.data={name:r,value:n.data}:n={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid parameter value")+" "+n.message,data:null}):(e.unshift(i),n={successful:!1,message:t.generateExceptionMessage(o,a,"'=' expected after parameter name "+n.message),data:null})}else n={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid parameter name. You might have unmatched parentheses")+" "+n.message,data:null};return n}function y(e){var n=r(e.shift());n.length==0&&(n=e.shift());var i={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid starting character for parameter name. Can only include A-Z, a-z, and _"),data:null};if(typeof n!="undefined"){i=d(n.charAt(0));if(i.successful){var s=1;while(s0&&s.successful&&!u)i(e)=='"'?(u=!0,e.shift()):(s=k(e),r+=s.data);u||(s={successful:!1,message:t.generateExceptionMessage(o,a,"Unterminated string literal"),data:null})}else e.unshift(n),s={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid quoted string"),data:null};return s.successful=s.successful&&u,s.data=r,s}function k(e){var t="",n=e.shift();return n=="\\"&&(t=e.shift()),{successful:!0,message:"",data:n+t}}function L(e){var n="",r=e.shift(),s={successful:!0,message:"",data:null};if(r=="/"){n=r;var u=!1;while(e.length>0&&s.successful&&!u)i(e)=="/"?(n+=e.shift(),u=!0):(s=k(e),n+=s.data);u||(s={successful:!1,message:t.generateExceptionMessage(o,a,"Unterminated regex literal"),data:null})}else e.unshift(r),s={successful:!1,message:t.generateExceptionMessage(o,a,"Not a regular expression"),data:null};return s.successful=s.successful&&u,s.data=n,s}function A(e){var n=e.shift(),i={successful:!0,message:"",data:null};return r(n)=="true"||r(n)=="false"?i={successful:!0,message:"",data:n==="true"}:(e.unshift(n),i={successful:!1,message:t.generateExceptionMessage(o,a,"Not a boolean"),data:null}),i}function O(e){var n=[],s=e.shift(),u={successful:!0,message:"",data:null};if(s=="["){r(i(e)).length==0&&e.shift(),i(e)=="]"?u={successful:!0,message:"",data:""}:u=M(e);if(u.successful){n.push(u.data),r(i(e)).length==0&&e.shift();while(e.length>0&&i(e)==","&&u.successful)e.shift(),u=M(e),n.push(u.data),r(i(e)).length==0&&e.shift();u.data=n,s=e.shift(),r(s).length==0&&e.shift(),s!="]"&&(u={successful:!1,message:t.generateExceptionMessage(o,a,"Cannot find matching closing ] in group definition")+" "+u.message,data:null})}else u={successful:!1,message:t.generateExceptionMessage(o,a,"Invalid group definition")+" "+u.message,data:null}}else e.unshift(s),u={successful:!1,message:t.generateExceptionMessage(o,a,"Not a valid group definition"),data:null};return u}function M(e){var n={successful:!0,message:"",data:""},i=r(e.shift());i.length==0&&(i=e.shift()),n=d(i.charAt(0));if(n.successful){var s=1;while(s0){var o=0;while(o0?h=t.deletedGroupIndices.pop():h=t.firstCustomGroupIndex++,t.Group[c]=h,t.ReverseGroup[h]=c,o[c]={}}o[c][n.id]||(o[c][n.id]={}),o[c][n.id][r]=u}if(i.constraintDefinitions[r].html5)if(n.getAttribute("type")!==null&&i.constraintDefinitions[r].inputType!==null&&n.getAttribute("type")!==i.constraintDefinitions[r].inputType)a={successful:!1,message:s.generateExceptionMessage(n,r,"Element type of "+n.getAttribute("type")+" conflicts with type of constraint @"+r+": "+i.constraintDefinitions[r].inputType),data:null};else{var p=i.constraintDefinitions[r].attribute,d=i.constraintDefinitions[r].inputType;(p!==null&&n.getAttribute(p)===null||d!==null&&n.getAttribute("type")===null)&&y(n,r,u)}return a}function y(e,t,n){if(t===i.ReverseConstraint[i.Constraint.HTML5Required])e.setAttribute("required","true");else{var r=i.constraintDefinitions[t];for(var s=0;s0&&!t)throw new s.Exception.IllegalArgumentException("Element with id "+r+" does not have any constraints bound to it. "+s.explodeParameters(e))}function w(e){var n=e.elementId,r=e.group,s=e.constraint,u=typeof o[t.ReverseGroup[t.Group.Default]][n]!="undefined";if(u&&typeof r!="undefined"&&typeof s=="undefined"){var a=t.ReverseGroup[r];u=typeof a!="undefined"&&typeof o[a][n]!="undefined"}else if(u&&typeof r=="undefined"&&typeof s!="undefined"){var f=i.ReverseConstraint[s];u=typeof f!="undefined"&&typeof o[t.ReverseGroup[t.Group.Default]][n][f]!="undefined"}else if(u&&typeof r!="undefined"&&typeof s!="undefined"){var a=t.ReverseGroup[r],f=i.ReverseConstraint[s];u=typeof a!="undefined"&&typeof f!="undefined"&&typeof o[a][n]!="undefined"&&typeof o[a][n][f]!="undefined"}return u}var o=null,u={};return{initializeBoundConstraints:a,resetBoundConstraints:f,getBoundConstraints:l,removeElementAndGroupFromBoundConstraintsIfEmpty:c,bindAfterParsing:p,bindHTML5ValidationConstraints:d,bindFromOptions:v,unbind:b,isBound:w}}),function(e,t){typeof define=="function"&&define.amd?define("regula",["utils/MapUtils","utils/DOMUtils","service/BindingService","service/ExceptionService","service/ConstraintService","service/ValidationService","service/GroupService"],t):(e.regula=t(e.regulaModules.MapUtils,e.regulaModules.DOMUtils,e.regulaModules.BindingService,e.regulaModules.ExceptionService,e.regulaModules.ConstraintService,e.regulaModules.ValidationService,e.regulaModules.GroupService),e.regula._modules=e.regulaModules,e.regulaModules=undefined)}(this,function(e,t,n,r,i,s,o){function f(t){e.iterateOverMap(t,function(e,t,n){typeof u[e]!="undefined"&&(u[e]=t)})}function l(e){var i={successful:!0,message:"",data:null};if(typeof e=="undefined"||!e)n.resetBoundConstraints(),u.enableHTML5Validation&&t.supportsHTML5Validation()&&(i=n.bindHTML5ValidationConstraints({element:null})),i.successful&&(i=n.bindAfterParsing({element:null}));else{var s=e.elements;if(typeof s=="undefined"||!s)u.enableHTML5Validation&&t.supportsHTML5Validation()&&typeof e.element!="undefined"&&e.element!==null&&(i=n.bindHTML5ValidationConstraints({element:e.element})),i.successful&&(i=n.bindFromOptions(e));else{var o=0;while(i.successful&&o0&&n.extend(!0,t,{elements:this.get()})),regula.bind(t),this},unbind:function(t){return this instanceof e&&(t||(t={}),this.get().length>0&&n.extend(!0,t,{elements:this.get()})),regula.unbind(t),this},isBound:function(t){return this instanceof e&&(t||(t={}),this.get().length>0&&n.extend(!0,t,{element:this.get(0)})),regula.isBound(t),this},validate:function(t){return this instanceof e&&(t||(t={}),this.get().length>0&&n.extend(!0,t,{elements:this.get()})),regula.validate(t)},custom:function(e){return regula.custom(e),this},compound:function(e){return regula.compound(e),this},override:function(e){return regula.override(e),this}};i.on=i.bind,i.off=i.unbind,n.fn.regula=t,n.regula=t}); + + +/** + * @module jQuery Count To + * @author Matt Huggins + * @see https://github.com/mhuggins/jquery-countTo + * @license MIT + */ +!function(t){function e(t,e){return t.toFixed(e.decimals)}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,this.dataOptions(),i),this.init()};o.DEFAULTS={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:e,onUpdate:null,onComplete:null},o.prototype.init=function(){this.value=this.options.from,this.loops=Math.ceil(this.options.speed/this.options.refreshInterval),this.loopCount=0,this.increment=(this.options.to-this.options.from)/this.loops},o.prototype.dataOptions=function(){var t={from:this.$element.data("from"),to:this.$element.data("to"),speed:this.$element.data("speed"),refreshInterval:this.$element.data("refresh-interval"),decimals:this.$element.data("decimals")},e=Object.keys(t);for(var o in e){var i=e[o];"undefined"==typeof t[i]&&delete t[i]}return t},o.prototype.update=function(){this.value+=this.increment,this.loopCount++,this.render(),"function"==typeof this.options.onUpdate&&this.options.onUpdate.call(this.$element,this.value),this.loopCount>=this.loops&&(clearInterval(this.interval),this.value=this.options.to,"function"==typeof this.options.onComplete&&this.options.onComplete.call(this.$element,this.value))},o.prototype.render=function(){var t=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(t)},o.prototype.restart=function(){this.stop(),this.init(),this.start()},o.prototype.start=function(){this.stop(),this.render(),this.interval=setInterval(this.update.bind(this),this.options.refreshInterval)},o.prototype.stop=function(){this.interval&&clearInterval(this.interval)},o.prototype.toggle=function(){this.interval?this.stop():this.start()},t.fn.countTo=function(e){return this.each(function(){var i=t(this),n=i.data("countTo"),s=!n||"object"==typeof e,r="object"==typeof e?e:{},a="string"==typeof e?e:"start";s&&(n&&n.stop(),i.data("countTo",n=new o(this,r))),n[a].call(n)})}}(jQuery); + + +/** + * @module Swiper + * @description Most modern mobile touch slider and framework with hardware accelerated transitions + * @author Vladimir Kharlampidi + * @see http://www.idangero.us/swiper/ + * @licesne MIT + * @version 3.4.2 + */ +!function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=y.params.autoplay,a=y.slides.eq(y.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||y.params.autoplay),y.autoplayTimeoutId=setTimeout(function(){y.params.loop?(y.fixLoop(),y._slideNext(),y.emit("onAutoplay",y)):y.isEnd?s.autoplayStopOnLast?y.stopAutoplay():(y._slideTo(0),y.emit("onAutoplay",y)):(y._slideNext(),y.emit("onAutoplay",y))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=new(window.MutationObserver||window.WebkitMutationObserver)(function(e){e.forEach(function(e){y.onResize(!0),y.emit("onObserverUpdate",y,e)})});t.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),y.observers.push(t)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!y.params.allowSwipeToNext&&(y.isHorizontal()&&39===a||!y.isHorizontal()&&40===a))return!1;if(!y.params.allowSwipeToPrev&&(y.isHorizontal()&&37===a||!y.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(y.container.parents("."+y.params.slideClass).length>0&&0===y.container.parents("."+y.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=y.container.offset();y.rtl&&(n.left=n.left-y.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+y.width,n.top],[n.left,n.top+y.height],[n.left+y.width,n.top+y.height]],l=0;l=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}y.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!y.rtl||37===a&&y.rtl)&&y.slideNext(),(37===a&&!y.rtl||39===a&&y.rtl)&&y.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&y.slideNext(),38===a&&y.slidePrev()),y.emit("onKeyPress",y,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=y.rtl?-1:1,s=p(e);if(y.params.mousewheelForceToAxis)if(y.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(y.params.mousewheelInvert&&(a=-a),y.params.freeMode){var r=y.getWrapperTranslate()+a*y.params.mousewheelSensitivity,i=y.isBeginning,n=y.isEnd;if(r>=y.minTranslate()&&(r=y.minTranslate()),r<=y.maxTranslate()&&(r=y.maxTranslate()),y.setWrapperTransition(0),y.setWrapperTranslate(r),y.updateProgress(),y.updateActiveIndex(),(!i&&y.isBeginning||!n&&y.isEnd)&&y.updateClasses(),y.params.freeModeSticky?(clearTimeout(y.mousewheel.timeout),y.mousewheel.timeout=setTimeout(function(){y.slideReset()},300)):y.params.lazyLoading&&y.lazy&&y.lazy.load(),y.emit("onScroll",y,e),y.params.autoplay&&y.params.autoplayDisableOnInteraction&&y.stopAutoplay(),0===r||r===y.maxTranslate())return}else{if((new window.Date).getTime()-y.mousewheel.lastScrollTime>60)if(a<0)if(y.isEnd&&!y.params.loop||y.animating){if(y.params.mousewheelReleaseOnEdges)return!0}else y.slideNext(),y.emit("onScroll",y,e);else if(y.isBeginning&&!y.params.loop||y.animating){if(y.params.mousewheelReleaseOnEdges)return!0}else y.slidePrev(),y.emit("onScroll",y,e);y.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=y.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):y.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslate;s=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery)h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var x in c[w])void 0===s[w][x]&&(s[w][x]=c[w][x]);var y=this;if(y.params=s,y.originalParams=h,y.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(y.$=e,y.currentBreakpoint=void 0,y.getActiveBreakpoint=function(){if(!y.params.breakpoints)return!1;var e,a=!1,t=[];for(e in y.params.breakpoints)y.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s=window.innerWidth&&!a&&(a=e);return a||"max"},y.setBreakpoint=function(){var e=y.getActiveBreakpoint();if(e&&y.currentBreakpoint!==e){var a=e in y.params.breakpoints?y.params.breakpoints[e]:y.originalParams,t=y.params.loop&&a.slidesPerView!==y.params.slidesPerView;for(var s in a)y.params[s]=a[s];y.currentBreakpoint=e,t&&y.destroyLoop&&y.reLoop(!0)}},y.params.breakpoints&&y.setBreakpoint(),y.container=e(t),0!==y.container.length)){if(y.container.length>1){var T=[];return y.container.each(function(){T.push(new a(this,s))}),T}y.container[0].swiper=y,y.container.data("swiper",y),y.classNames.push(y.params.containerModifierClass+y.params.direction),y.params.freeMode&&y.classNames.push(y.params.containerModifierClass+"free-mode"),y.support.flexbox||(y.classNames.push(y.params.containerModifierClass+"no-flexbox"),y.params.slidesPerColumn=1),y.params.autoHeight&&y.classNames.push(y.params.containerModifierClass+"autoheight"),(y.params.parallax||y.params.watchSlidesVisibility)&&(y.params.watchSlidesProgress=!0),y.params.touchReleaseOnEdges&&(y.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(y.params.effect)>=0&&(y.support.transforms3d?(y.params.watchSlidesProgress=!0,y.classNames.push(y.params.containerModifierClass+"3d")):y.params.effect="slide"),"slide"!==y.params.effect&&y.classNames.push(y.params.containerModifierClass+y.params.effect),"cube"===y.params.effect&&(y.params.resistanceRatio=0,y.params.slidesPerView=1,y.params.slidesPerColumn=1,y.params.slidesPerGroup=1,y.params.centeredSlides=!1,y.params.spaceBetween=0,y.params.virtualTranslate=!0),"fade"!==y.params.effect&&"flip"!==y.params.effect||(y.params.slidesPerView=1,y.params.slidesPerColumn=1,y.params.slidesPerGroup=1,y.params.watchSlidesProgress=!0,y.params.spaceBetween=0,void 0===g&&(y.params.virtualTranslate=!0)),y.params.grabCursor&&y.support.touch&&(y.params.grabCursor=!1),y.wrapper=y.container.children("."+y.params.wrapperClass),y.params.pagination&&(y.paginationContainer=e(y.params.pagination),y.params.uniqueNavElements&&"string"==typeof y.params.pagination&&y.paginationContainer.length>1&&1===y.container.find(y.params.pagination).length&&(y.paginationContainer=y.container.find(y.params.pagination)),"bullets"===y.params.paginationType&&y.params.paginationClickable?y.paginationContainer.addClass(y.params.paginationModifierClass+"clickable"):y.params.paginationClickable=!1,y.paginationContainer.addClass(y.params.paginationModifierClass+y.params.paginationType)),(y.params.nextButton||y.params.prevButton)&&(y.params.nextButton&&(y.nextButton=e(y.params.nextButton),y.params.uniqueNavElements&&"string"==typeof y.params.nextButton&&y.nextButton.length>1&&1===y.container.find(y.params.nextButton).length&&(y.nextButton=y.container.find(y.params.nextButton))),y.params.prevButton&&(y.prevButton=e(y.params.prevButton),y.params.uniqueNavElements&&"string"==typeof y.params.prevButton&&y.prevButton.length>1&&1===y.container.find(y.params.prevButton).length&&(y.prevButton=y.container.find(y.params.prevButton)))),y.isHorizontal=function(){return"horizontal"===y.params.direction},y.rtl=y.isHorizontal()&&("rtl"===y.container[0].dir.toLowerCase()||"rtl"===y.container.css("direction")),y.rtl&&y.classNames.push(y.params.containerModifierClass+"rtl"),y.rtl&&(y.wrongRTL="-webkit-box"===y.wrapper.css("display")),y.params.slidesPerColumn>1&&y.classNames.push(y.params.containerModifierClass+"multirow"),y.device.android&&y.classNames.push(y.params.containerModifierClass+"android"),y.container.addClass(y.classNames.join(" ")),y.translate=0,y.progress=0,y.velocity=0,y.lockSwipeToNext=function(){y.params.allowSwipeToNext=!1,!1===y.params.allowSwipeToPrev&&y.params.grabCursor&&y.unsetGrabCursor()},y.lockSwipeToPrev=function(){y.params.allowSwipeToPrev=!1,!1===y.params.allowSwipeToNext&&y.params.grabCursor&&y.unsetGrabCursor()},y.lockSwipes=function(){y.params.allowSwipeToNext=y.params.allowSwipeToPrev=!1,y.params.grabCursor&&y.unsetGrabCursor()},y.unlockSwipeToNext=function(){y.params.allowSwipeToNext=!0,!0===y.params.allowSwipeToPrev&&y.params.grabCursor&&y.setGrabCursor()},y.unlockSwipeToPrev=function(){y.params.allowSwipeToPrev=!0,!0===y.params.allowSwipeToNext&&y.params.grabCursor&&y.setGrabCursor()},y.unlockSwipes=function(){y.params.allowSwipeToNext=y.params.allowSwipeToPrev=!0,y.params.grabCursor&&y.setGrabCursor()},y.setGrabCursor=function(e){y.container[0].style.cursor="move",y.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",y.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",y.container[0].style.cursor=e?"grabbing":"grab"},y.unsetGrabCursor=function(){y.container[0].style.cursor=""},y.params.grabCursor&&y.setGrabCursor(),y.imagesToLoad=[],y.imagesLoaded=0,y.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},y.preloadImages=function(){y.imagesToLoad=y.container.find("img");for(var e=0;e1)for(e=0;ey.slides.length)break;a.push(y.slides.eq(s)[0])}else a.push(y.slides.eq(y.activeIndex)[0]);for(e=0;et?r:t}t&&y.wrapper.css("height",t+"px")},y.updateContainerSize=function(){var e,a;e=void 0!==y.params.width?y.params.width:y.container[0].clientWidth,a=void 0!==y.params.height?y.params.height:y.container[0].clientHeight,0===e&&y.isHorizontal()||0===a&&!y.isHorizontal()||(e=e-parseInt(y.container.css("padding-left"),10)-parseInt(y.container.css("padding-right"),10),a=a-parseInt(y.container.css("padding-top"),10)-parseInt(y.container.css("padding-bottom"),10),y.width=e,y.height=a,y.size=y.isHorizontal()?y.width:y.height)},y.updateSlidesSize=function(){y.slides=y.wrapper.children("."+y.params.slideClass),y.snapGrid=[],y.slidesGrid=[],y.slidesSizesGrid=[];var e,a=y.params.spaceBetween,t=-y.params.slidesOffsetBefore,s=0,i=0;if(void 0!==y.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*y.size),y.virtualSize=-a,y.rtl?y.slides.css({marginLeft:"",marginTop:""}):y.slides.css({marginRight:"",marginBottom:""});var n;y.params.slidesPerColumn>1&&(n=Math.floor(y.slides.length/y.params.slidesPerColumn)===y.slides.length/y.params.slidesPerColumn?y.slides.length:Math.ceil(y.slides.length/y.params.slidesPerColumn)*y.params.slidesPerColumn,"auto"!==y.params.slidesPerView&&"row"===y.params.slidesPerColumnFill&&(n=Math.max(n,y.params.slidesPerView*y.params.slidesPerColumn)));var o,l=y.params.slidesPerColumn,p=n/l,d=p-(y.params.slidesPerColumn*p-y.slides.length);for(e=0;e1){var u,c,g;"column"===y.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(y.isHorizontal()?"top":"left"),0!==g&&y.params.spaceBetween&&y.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===y.params.slidesPerView?(o=y.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),y.params.roundLengths&&(o=r(o))):(o=(y.size-(y.params.slidesPerView-1)*a)/y.params.slidesPerView,y.params.roundLengths&&(o=r(o)),y.isHorizontal()?y.slides[e].style.width=o+"px":y.slides[e].style.height=o+"px"),y.slides[e].swiperSlideSize=o,y.slidesSizesGrid.push(o),y.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-y.size/2-a),0===e&&(t=t-y.size/2-a),Math.abs(t)<.001&&(t=0),i%y.params.slidesPerGroup==0&&y.snapGrid.push(t),y.slidesGrid.push(t)):(i%y.params.slidesPerGroup==0&&y.snapGrid.push(t),y.slidesGrid.push(t),t=t+o+a),y.virtualSize+=o+a,s=o,i++)}y.virtualSize=Math.max(y.virtualSize,y.size)+y.params.slidesOffsetAfter;var h;if(y.rtl&&y.wrongRTL&&("slide"===y.params.effect||"coverflow"===y.params.effect)&&y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}),y.support.flexbox&&!y.params.setWrapperSize||(y.isHorizontal()?y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}):y.wrapper.css({height:y.virtualSize+y.params.spaceBetween+"px"})),y.params.slidesPerColumn>1&&(y.virtualSize=(o+y.params.spaceBetween)*n,y.virtualSize=Math.ceil(y.virtualSize/y.params.slidesPerColumn)-y.params.spaceBetween,y.isHorizontal()?y.wrapper.css({width:y.virtualSize+y.params.spaceBetween+"px"}):y.wrapper.css({height:y.virtualSize+y.params.spaceBetween+"px"}),y.params.centeredSlides)){for(h=[],e=0;e1&&y.snapGrid.push(y.virtualSize-y.size)}0===y.snapGrid.length&&(y.snapGrid=[0]),0!==y.params.spaceBetween&&(y.isHorizontal()?y.rtl?y.slides.css({marginLeft:a+"px"}):y.slides.css({marginRight:a+"px"}):y.slides.css({marginBottom:a+"px"})),y.params.watchSlidesProgress&&y.updateSlidesOffset()}},y.updateSlidesOffset=function(){for(var e=0;ey.size&&(s=!0));for(a=y.activeIndex-1;a>=0;a--)y.slides[a]&&!s&&(r+=y.slides[a].swiperSlideSize,t++,r>y.size&&(s=!0))}else for(e=y.activeIndex+1;e=0&&i0&&n<=y.size||i<=0&&n>=y.size)&&y.slides.eq(t).addClass(y.params.slideVisibleClass)}s.progress=y.rtl?-r:r}}},y.updateProgress=function(e){void 0===e&&(e=y.translate||0);var a=y.maxTranslate()-y.minTranslate(),t=y.isBeginning,s=y.isEnd;0===a?(y.progress=0,y.isBeginning=y.isEnd=!0):(y.progress=(e-y.minTranslate())/a,y.isBeginning=y.progress<=0,y.isEnd=y.progress>=1),y.isBeginning&&!t&&y.emit("onReachBeginning",y),y.isEnd&&!s&&y.emit("onReachEnd",y),y.params.watchSlidesProgress&&y.updateSlidesProgress(e),y.emit("onProgress",y,y.progress)},y.updateActiveIndex=function(){var e,a,t,s=y.rtl?y.translate:-y.translate;for(a=0;a=y.slidesGrid[a]&&s=y.slidesGrid[a]&&s=y.slidesGrid[a]&&(e=a);y.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),(t=Math.floor(e/y.params.slidesPerGroup))>=y.snapGrid.length&&(t=y.snapGrid.length-1),e!==y.activeIndex&&(y.snapIndex=t,y.previousIndex=y.activeIndex,y.activeIndex=e,y.updateClasses(),y.updateRealIndex())},y.updateRealIndex=function(){y.realIndex=parseInt(y.slides.eq(y.activeIndex).attr("data-swiper-slide-index")||y.activeIndex,10)},y.updateClasses=function(){y.slides.removeClass(y.params.slideActiveClass+" "+y.params.slideNextClass+" "+y.params.slidePrevClass+" "+y.params.slideDuplicateActiveClass+" "+y.params.slideDuplicateNextClass+" "+y.params.slideDuplicatePrevClass);var a=y.slides.eq(y.activeIndex);a.addClass(y.params.slideActiveClass),s.loop&&(a.hasClass(y.params.slideDuplicateClass)?y.wrapper.children("."+y.params.slideClass+":not(."+y.params.slideDuplicateClass+')[data-swiper-slide-index="'+y.realIndex+'"]').addClass(y.params.slideDuplicateActiveClass):y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass+'[data-swiper-slide-index="'+y.realIndex+'"]').addClass(y.params.slideDuplicateActiveClass));var t=a.next("."+y.params.slideClass).addClass(y.params.slideNextClass);y.params.loop&&0===t.length&&(t=y.slides.eq(0)).addClass(y.params.slideNextClass);var r=a.prev("."+y.params.slideClass).addClass(y.params.slidePrevClass);if(y.params.loop&&0===r.length&&(r=y.slides.eq(-1)).addClass(y.params.slidePrevClass),s.loop&&(t.hasClass(y.params.slideDuplicateClass)?y.wrapper.children("."+y.params.slideClass+":not(."+y.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(y.params.slideDuplicateNextClass):y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(y.params.slideDuplicateNextClass),r.hasClass(y.params.slideDuplicateClass)?y.wrapper.children("."+y.params.slideClass+":not(."+y.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(y.params.slideDuplicatePrevClass):y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(y.params.slideDuplicatePrevClass)),y.paginationContainer&&y.paginationContainer.length>0){var i,n=y.params.loop?Math.ceil((y.slides.length-2*y.loopedSlides)/y.params.slidesPerGroup):y.snapGrid.length;if(y.params.loop?((i=Math.ceil((y.activeIndex-y.loopedSlides)/y.params.slidesPerGroup))>y.slides.length-1-2*y.loopedSlides&&(i-=y.slides.length-2*y.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==y.params.paginationType&&(i=n+i)):i=void 0!==y.snapIndex?y.snapIndex:y.activeIndex||0,"bullets"===y.params.paginationType&&y.bullets&&y.bullets.length>0&&(y.bullets.removeClass(y.params.bulletActiveClass),y.paginationContainer.length>1?y.bullets.each(function(){e(this).index()===i&&e(this).addClass(y.params.bulletActiveClass)}):y.bullets.eq(i).addClass(y.params.bulletActiveClass)),"fraction"===y.params.paginationType&&(y.paginationContainer.find("."+y.params.paginationCurrentClass).text(i+1),y.paginationContainer.find("."+y.params.paginationTotalClass).text(n)),"progress"===y.params.paginationType){var o=(i+1)/n,l=o,p=1;y.isHorizontal()||(p=o,l=1),y.paginationContainer.find("."+y.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(y.params.speed)}"custom"===y.params.paginationType&&y.params.paginationCustomRender&&(y.paginationContainer.html(y.params.paginationCustomRender(y,i+1,n)),y.emit("onPaginationRendered",y,y.paginationContainer[0]))}y.params.loop||(y.params.prevButton&&y.prevButton&&y.prevButton.length>0&&(y.isBeginning?(y.prevButton.addClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.disable(y.prevButton)):(y.prevButton.removeClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.enable(y.prevButton))),y.params.nextButton&&y.nextButton&&y.nextButton.length>0&&(y.isEnd?(y.nextButton.addClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.disable(y.nextButton)):(y.nextButton.removeClass(y.params.buttonDisabledClass),y.params.a11y&&y.a11y&&y.a11y.enable(y.nextButton))))},y.updatePagination=function(){if(y.params.pagination&&y.paginationContainer&&y.paginationContainer.length>0){var e="";if("bullets"===y.params.paginationType){for(var a=y.params.loop?Math.ceil((y.slides.length-2*y.loopedSlides)/y.params.slidesPerGroup):y.snapGrid.length,t=0;t";y.paginationContainer.html(e),y.bullets=y.paginationContainer.find("."+y.params.bulletClass),y.params.paginationClickable&&y.params.a11y&&y.a11y&&y.a11y.initPagination()}"fraction"===y.params.paginationType&&(e=y.params.paginationFractionRender?y.params.paginationFractionRender(y,y.params.paginationCurrentClass,y.params.paginationTotalClass):' / ',y.paginationContainer.html(e)),"progress"===y.params.paginationType&&(e=y.params.paginationProgressRender?y.params.paginationProgressRender(y,y.params.paginationProgressbarClass):'',y.paginationContainer.html(e)),"custom"!==y.params.paginationType&&y.emit("onPaginationRendered",y,y.paginationContainer[0])}},y.update=function(e){function a(){y.rtl,y.translate,t=Math.min(Math.max(y.translate,y.maxTranslate()),y.minTranslate()),y.setWrapperTranslate(t),y.updateActiveIndex(),y.updateClasses()}if(y){y.updateContainerSize(),y.updateSlidesSize(),y.updateProgress(),y.updatePagination(),y.updateClasses(),y.params.scrollbar&&y.scrollbar&&y.scrollbar.set();var t;e?(y.controller&&y.controller.spline&&(y.controller.spline=void 0),y.params.freeMode?(a(),y.params.autoHeight&&y.updateAutoHeight()):(("auto"===y.params.slidesPerView||y.params.slidesPerView>1)&&y.isEnd&&!y.params.centeredSlides?y.slideTo(y.slides.length-1,0,!1,!0):y.slideTo(y.activeIndex,0,!1,!0))||a()):y.params.autoHeight&&y.updateAutoHeight()}},y.onResize=function(e){y.params.onBeforeResize&&y.params.onBeforeResize(y),y.params.breakpoints&&y.setBreakpoint();var a=y.params.allowSwipeToPrev,t=y.params.allowSwipeToNext;y.params.allowSwipeToPrev=y.params.allowSwipeToNext=!0,y.updateContainerSize(),y.updateSlidesSize(),("auto"===y.params.slidesPerView||y.params.freeMode||e)&&y.updatePagination(),y.params.scrollbar&&y.scrollbar&&y.scrollbar.set(),y.controller&&y.controller.spline&&(y.controller.spline=void 0);var s=!1;if(y.params.freeMode){var r=Math.min(Math.max(y.translate,y.maxTranslate()),y.minTranslate());y.setWrapperTranslate(r),y.updateActiveIndex(),y.updateClasses(),y.params.autoHeight&&y.updateAutoHeight()}else y.updateClasses(),s=("auto"===y.params.slidesPerView||y.params.slidesPerView>1)&&y.isEnd&&!y.params.centeredSlides?y.slideTo(y.slides.length-1,0,!1,!0):y.slideTo(y.activeIndex,0,!1,!0);y.params.lazyLoading&&!s&&y.lazy&&y.lazy.load(),y.params.allowSwipeToPrev=a,y.params.allowSwipeToNext=t,y.params.onAfterResize&&y.params.onAfterResize(y)},y.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?y.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(y.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),y.touchEvents={start:y.support.touch||!y.params.simulateTouch?"touchstart":y.touchEventsDesktop.start,move:y.support.touch||!y.params.simulateTouch?"touchmove":y.touchEventsDesktop.move,end:y.support.touch||!y.params.simulateTouch?"touchend":y.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===y.params.touchEventsTarget?y.container:y.wrapper).addClass("swiper-wp8-"+y.params.direction),y.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===y.params.touchEventsTarget?y.container[0]:y.wrapper[0],i=y.support.touch?r:document,n=!!y.params.nested;if(y.browser.ie)r[t](y.touchEvents.start,y.onTouchStart,!1),i[t](y.touchEvents.move,y.onTouchMove,n),i[t](y.touchEvents.end,y.onTouchEnd,!1);else{if(y.support.touch){var o=!("touchstart"!==y.touchEvents.start||!y.support.passiveListener||!y.params.passiveListeners)&&{passive:!0,capture:!1};r[t](y.touchEvents.start,y.onTouchStart,o),r[t](y.touchEvents.move,y.onTouchMove,n),r[t](y.touchEvents.end,y.onTouchEnd,o)}(s.simulateTouch&&!y.device.ios&&!y.device.android||s.simulateTouch&&!y.support.touch&&y.device.ios)&&(r[t]("mousedown",y.onTouchStart,!1),document[t]("mousemove",y.onTouchMove,n),document[t]("mouseup",y.onTouchEnd,!1))}window[t]("resize",y.onResize),y.params.nextButton&&y.nextButton&&y.nextButton.length>0&&(y.nextButton[a]("click",y.onClickNext),y.params.a11y&&y.a11y&&y.nextButton[a]("keydown",y.a11y.onEnterKey)),y.params.prevButton&&y.prevButton&&y.prevButton.length>0&&(y.prevButton[a]("click",y.onClickPrev),y.params.a11y&&y.a11y&&y.prevButton[a]("keydown",y.a11y.onEnterKey)),y.params.pagination&&y.params.paginationClickable&&(y.paginationContainer[a]("click","."+y.params.bulletClass,y.onClickIndex),y.params.a11y&&y.a11y&&y.paginationContainer[a]("keydown","."+y.params.bulletClass,y.a11y.onEnterKey)),(y.params.preventClicks||y.params.preventClicksPropagation)&&r[t]("click",y.preventClicks,!0)},y.attachEvents=function(){y.initEvents()},y.detachEvents=function(){y.initEvents(!0)},y.allowClick=!0,y.preventClicks=function(e){y.allowClick||(y.params.preventClicks&&e.preventDefault(),y.params.preventClicksPropagation&&y.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},y.onClickNext=function(e){e.preventDefault(),y.isEnd&&!y.params.loop||y.slideNext()},y.onClickPrev=function(e){e.preventDefault(),y.isBeginning&&!y.params.loop||y.slidePrev()},y.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*y.params.slidesPerGroup;y.params.loop&&(t+=y.loopedSlides),y.slideTo(t)},y.updateClickedSlide=function(a){var t=n(a,"."+y.params.slideClass),s=!1;if(t)for(var r=0;ry.slides.length-y.loopedSlides+l/2?(y.fixLoop(),o=y.wrapper.children("."+y.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+y.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){y.slideTo(o)},0)):y.slideTo(o):o>y.slides.length-l?(y.fixLoop(),o=y.wrapper.children("."+y.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+y.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){y.slideTo(o)},0)):y.slideTo(o)}else y.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];y.animating=!1,y.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;y.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(y.params.noSwiping&&n(a,"."+y.params.noSwipingClass))return void(y.allowClick=!0);if(!y.params.swipeHandler||n(a,y.params.swipeHandler)){var t=y.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=y.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(y.device.ios&&y.params.iOSEdgeSwipeDetection&&t<=y.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,y.touches.startX=t,y.touches.startY=s,z=Date.now(),y.allowClick=!0,y.updateContainerSize(),y.swipeDirection=void 0,y.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}y.emit("onTouchStart",y,a)}}}},y.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return y.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(y.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(y.params.onlyExternal)return y.allowClick=!1,void(b&&(y.touches.startX=y.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,y.touches.startY=y.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&y.params.touchReleaseOnEdges&&!y.params.loop)if(y.isHorizontal()){if(y.touches.currentXy.touches.startX&&y.translate>=y.minTranslate())return}else if(y.touches.currentYy.touches.startY&&y.translate>=y.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(y.allowClick=!1);if(S&&y.emit("onTouchMove",y,a),!(a.targetTouches&&a.targetTouches.length>1)){if(y.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,y.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;y.isHorizontal()&&y.touches.currentY===y.touches.startY||!y.isHorizontal()&&y.touches.currentX===y.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(y.touches.currentY-y.touches.startY),Math.abs(y.touches.currentX-y.touches.startX))/Math.PI,M=y.isHorizontal()?t>y.params.touchAngle:90-t>y.params.touchAngle)}if(M&&y.emit("onTouchMoveOpposite",y,a),void 0===X&&(y.touches.currentX===y.touches.startX&&y.touches.currentY===y.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){y.allowClick=!1,y.emit("onSliderMove",y,a),a.preventDefault(),y.params.touchMoveStopPropagation&&!y.params.nested&&a.stopPropagation(),C||(s.loop&&y.fixLoop(),E=y.getWrapperTranslate(),y.setWrapperTransition(0),y.animating&&y.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),y.params.autoplay&&y.autoplaying&&(y.params.autoplayDisableOnInteraction?y.stopAutoplay():y.pauseAutoplay()),D=!1,!y.params.grabCursor||!0!==y.params.allowSwipeToNext&&!0!==y.params.allowSwipeToPrev||y.setGrabCursor(!0)),C=!0;var r=y.touches.diff=y.isHorizontal()?y.touches.currentX-y.touches.startX:y.touches.currentY-y.touches.startY;r*=y.params.touchRatio,y.rtl&&(r=-r),y.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>y.minTranslate()?(i=!1,y.params.resistance&&(P=y.minTranslate()-1+Math.pow(-y.minTranslate()+E+r,y.params.resistanceRatio))):r<0&&PE&&(P=E),y.params.threshold>0){if(!(Math.abs(r)>y.params.threshold||I))return void(P=E);if(!I)return I=!0,y.touches.startX=y.touches.currentX,y.touches.startY=y.touches.currentY,P=E,void(y.touches.diff=y.isHorizontal()?y.touches.currentX-y.touches.startX:y.touches.currentY-y.touches.startY)}y.params.followFinger&&((y.params.freeMode||y.params.watchSlidesProgress)&&y.updateActiveIndex(),y.params.freeMode&&(0===H.length&&H.push({position:y.touches[y.isHorizontal()?"startX":"startY"],time:z}),H.push({position:y.touches[y.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),y.updateProgress(P),y.setWrapperTranslate(P))}}}}},y.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&y.emit("onTouchEnd",y,a),S=!1,b){y.params.grabCursor&&C&&b&&(!0===y.params.allowSwipeToNext||!0===y.params.allowSwipeToPrev)&&y.setGrabCursor(!1);var t=Date.now(),s=t-z;if(y.allowClick&&(y.updateClickedSlide(a),y.emit("onTap",y,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){y&&(y.params.paginationHide&&y.paginationContainer.length>0&&!e(a.target).hasClass(y.params.bulletClass)&&y.paginationContainer.toggleClass(y.params.paginationHiddenClass),y.emit("onClick",y,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),y.emit("onDoubleTap",y,a))),B=Date.now(),setTimeout(function(){y&&(y.allowClick=!0)},0),!b||!C||!y.swipeDirection||0===y.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=y.params.followFinger?y.rtl?y.translate:-y.translate:-P,y.params.freeMode){if(r<-y.minTranslate())return void y.slideTo(y.activeIndex);if(r>-y.maxTranslate())return void(y.slides.length1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;y.velocity=o/l,y.velocity=y.velocity/2,Math.abs(y.velocity)150||(new window.Date).getTime()-i.time>300)&&(y.velocity=0)}else y.velocity=0;y.velocity=y.velocity*y.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*y.params.freeModeMomentumRatio,d=y.velocity*p,m=y.translate+d;y.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(y.velocity)*y.params.freeModeMomentumBounceRatio;if(my.minTranslate())y.params.freeModeMomentumBounce?(m-y.minTranslate()>g&&(m=y.minTranslate()+g),u=y.minTranslate(),c=!0,D=!0):m=y.minTranslate();else if(y.params.freeModeSticky){var h,v=0;for(v=0;v-m){h=v;break}m=Math.abs(y.snapGrid[h]-m)=y.params.longSwipesMs)&&(y.updateProgress(),y.updateActiveIndex()))}var f,w=0,x=y.slidesSizesGrid[0];for(f=0;f=y.slidesGrid[f]&&r=y.slidesGrid[f]&&(w=f,x=y.slidesGrid[y.slidesGrid.length-1]-y.slidesGrid[y.slidesGrid.length-2]);var T=(r-y.slidesGrid[w])/x;if(s>y.params.longSwipesMs){if(!y.params.longSwipes)return void y.slideTo(y.activeIndex);"next"===y.swipeDirection&&(T>=y.params.longSwipesRatio?y.slideTo(w+y.params.slidesPerGroup):y.slideTo(w)),"prev"===y.swipeDirection&&(T>1-y.params.longSwipesRatio?y.slideTo(w+y.params.slidesPerGroup):y.slideTo(w))}else{if(!y.params.shortSwipes)return void y.slideTo(y.activeIndex);"next"===y.swipeDirection&&y.slideTo(w+y.params.slidesPerGroup),"prev"===y.swipeDirection&&y.slideTo(w)}}},y._slideTo=function(e,a){return y.slideTo(e,a,!0,!0)},y.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),y.snapIndex=Math.floor(e/y.params.slidesPerGroup),y.snapIndex>=y.snapGrid.length&&(y.snapIndex=y.snapGrid.length-1);var r=-y.snapGrid[y.snapIndex];if(y.params.autoplay&&y.autoplaying&&(s||!y.params.autoplayDisableOnInteraction?y.pauseAutoplay(a):y.stopAutoplay()),y.updateProgress(r),y.params.normalizeSlideIndex)for(var i=0;i=Math.floor(100*y.slidesGrid[i])&&(e=i);return!(!y.params.allowSwipeToNext&&ry.translate&&r>y.maxTranslate()&&(y.activeIndex||0)!==e||(void 0===a&&(a=y.params.speed),y.previousIndex=y.activeIndex||0,y.activeIndex=e,y.updateRealIndex(),y.rtl&&-r===y.translate||!y.rtl&&r===y.translate?(y.params.autoHeight&&y.updateAutoHeight(),y.updateClasses(),"slide"!==y.params.effect&&y.setWrapperTranslate(r),1):(y.updateClasses(),y.onTransitionStart(t),0===a||y.browser.lteIE9?(y.setWrapperTranslate(r),y.setWrapperTransition(0),y.onTransitionEnd(t)):(y.setWrapperTranslate(r),y.setWrapperTransition(a),y.animating||(y.animating=!0,y.wrapper.transitionEnd(function(){y&&y.onTransitionEnd(t)}))),0)))},y.onTransitionStart=function(e){void 0===e&&(e=!0),y.params.autoHeight&&y.updateAutoHeight(),y.lazy&&y.lazy.onTransitionStart(),e&&(y.emit("onTransitionStart",y),y.activeIndex!==y.previousIndex&&(y.emit("onSlideChangeStart",y),y.activeIndex>y.previousIndex?y.emit("onSlideNextStart",y):y.emit("onSlidePrevStart",y)))},y.onTransitionEnd=function(e){y.animating=!1,y.setWrapperTransition(0),void 0===e&&(e=!0),y.lazy&&y.lazy.onTransitionEnd(),e&&(y.emit("onTransitionEnd",y),y.activeIndex!==y.previousIndex&&(y.emit("onSlideChangeEnd",y),y.activeIndex>y.previousIndex?y.emit("onSlideNextEnd",y):y.emit("onSlidePrevEnd",y))),y.params.history&&y.history&&y.history.setHistory(y.params.history,y.activeIndex),y.params.hashnav&&y.hashnav&&y.hashnav.setHash()},y.slideNext=function(e,a,t){return y.params.loop?!y.animating&&(y.fixLoop(),y.container[0].clientLeft,y.slideTo(y.activeIndex+y.params.slidesPerGroup,a,e,t)):y.slideTo(y.activeIndex+y.params.slidesPerGroup,a,e,t)},y._slideNext=function(e){return y.slideNext(!0,e,!0)},y.slidePrev=function(e,a,t){return y.params.loop?!y.animating&&(y.fixLoop(),y.container[0].clientLeft,y.slideTo(y.activeIndex-1,a,e,t)):y.slideTo(y.activeIndex-1,a,e,t)},y._slidePrev=function(e){return y.slidePrev(!0,e,!0)},y.slideReset=function(e,a,t){return y.slideTo(y.activeIndex,a,e)},y.disableTouchControl=function(){return y.params.onlyExternal=!0,!0},y.enableTouchControl=function(){return y.params.onlyExternal=!1,!0},y.setWrapperTransition=function(e,a){y.wrapper.transition(e),"slide"!==y.params.effect&&y.effects[y.params.effect]&&y.effects[y.params.effect].setTransition(e),y.params.parallax&&y.parallax&&y.parallax.setTransition(e),y.params.scrollbar&&y.scrollbar&&y.scrollbar.setTransition(e),y.params.control&&y.controller&&y.controller.setTransition(e,a),y.emit("onSetTransition",y,e)},y.setWrapperTranslate=function(e,a,t){var s=0,i=0;y.isHorizontal()?s=y.rtl?-e:e:i=e,y.params.roundLengths&&(s=r(s),i=r(i)),y.params.virtualTranslate||(y.support.transforms3d?y.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):y.wrapper.transform("translate("+s+"px, "+i+"px)")),y.translate=y.isHorizontal()?s:i;var n=y.maxTranslate()-y.minTranslate();(0===n?0:(e-y.minTranslate())/n)!==y.progress&&y.updateProgress(e),a&&y.updateActiveIndex(),"slide"!==y.params.effect&&y.effects[y.params.effect]&&y.effects[y.params.effect].setTranslate(y.translate),y.params.parallax&&y.parallax&&y.parallax.setTranslate(y.translate),y.params.scrollbar&&y.scrollbar&&y.scrollbar.setTranslate(y.translate),y.params.control&&y.controller&&y.controller.setTranslate(y.translate,t),y.emit("onSetTranslate",y,y.translate)},y.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),y.params.virtualTranslate?y.rtl?-y.translate:y.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?((s=r.transform||r.webkitTransform).split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),y.rtl&&s&&(s=-s),s||0)},y.getWrapperTranslate=function(e){return void 0===e&&(e=y.isHorizontal()?"x":"y"),y.getTranslate(y.wrapper[0],e)},y.observers=[],y.initObservers=function(){if(y.params.observeParents)for(var e=y.container.parents(),a=0;aa.length&&(y.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t=a.length-y.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t=0;t--)y.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(y.params.slideDuplicateClass))},y.destroyLoop=function(){y.wrapper.children("."+y.params.slideClass+"."+y.params.slideDuplicateClass).remove(),y.slides.removeAttr("data-swiper-slide-index")},y.reLoop=function(e){var a=y.activeIndex-y.loopedSlides;y.destroyLoop(),y.createLoop(),y.updateSlidesSize(),e&&y.slideTo(a+y.loopedSlides,0,!1)},y.fixLoop=function(){var e;y.activeIndex=2*y.loopedSlides||y.activeIndex>y.slides.length-2*y.params.slidesPerView)&&(e=-y.slides.length+y.activeIndex+y.loopedSlides,e+=y.loopedSlides,y.slideTo(e,0,!1,!0))},y.appendSlide=function(e){if(y.params.loop&&y.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a
    '),t.append(l)),0===p.length&&(p=e('
    '),t.append(p)),l.length&&(l[0].style.opacity=Math.max(-s,0)),p.length&&(p[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+n+"px, "+o+"px, 0px) rotateX("+i+"deg) rotateY("+r+"deg)")}},setTransition:function(a){if(y.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),y.params.virtualTranslate&&0!==a){var t=!1;y.slides.eq(y.activeIndex).transitionEnd(function(){if(!t&&y&&e(this).hasClass(y.params.slideActiveClass)){t=!0,y.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s
    '),y.wrapper.append(a)),a.css({height:y.width+"px"})):0===(a=y.container.find(".swiper-cube-shadow")).length&&(a=e('
    '),y.container.append(a)));for(var s=0;s-1&&(t=90*s+90*o,y.rtl&&(t=90*-s-90*o)),r.transform(m),y.params.cube.slideShadows){var u=y.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=y.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('
    '),r.append(u)),0===c.length&&(c=e('
    '),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(y.wrapper.css({"-webkit-transform-origin":"50% 50% -"+y.size/2+"px","-moz-transform-origin":"50% 50% -"+y.size/2+"px","-ms-transform-origin":"50% 50% -"+y.size/2+"px","transform-origin":"50% 50% -"+y.size/2+"px"}),y.params.cube.shadow)if(y.isHorizontal())a.transform("translate3d(0px, "+(y.width/2+y.params.cube.shadowOffset)+"px, "+-y.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+y.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=y.params.cube.shadowScale,f=y.params.cube.shadowScale/h,w=y.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(y.height/2+w)+"px, "+-y.height/2/f+"px) rotateX(-90deg)")}var x=y.isSafari||y.isUiWebView?-y.size/2:0;y.wrapper.transform("translate3d(0px,0,"+x+"px) rotateX("+(y.isHorizontal()?0:t)+"deg) rotateY("+(y.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),y.params.cube.shadow&&!y.isHorizontal()&&y.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=y.translate,t=y.isHorizontal()?-a+y.width/2:-a+y.height/2,s=y.isHorizontal()?y.params.coverflow.rotate:-y.params.coverflow.rotate,r=y.params.coverflow.depth,i=0,n=y.slides.length;i
    '),o.append(v)),0===f.length&&(f=e('
    '),o.append(f)),v.length&&(v[0].style.opacity=p>0?p:0),f.length&&(f[0].style.opacity=-p>0?-p:0)}}y.browser.ie&&(y.wrapper[0].style.perspectiveOrigin=t+"px 50%")},setTransition:function(e){y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},y.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==y.slides.length)){var s=y.slides.eq(a),r=s.find("."+y.params.lazyLoadingClass+":not(."+y.params.lazyStatusLoadedClass+"):not(."+y.params.lazyStatusLoadingClass+")");!s.hasClass(y.params.lazyLoadingClass)||s.hasClass(y.params.lazyStatusLoadedClass)||s.hasClass(y.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(y.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");y.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==y&&null!==y&&y){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(y.params.lazyStatusLoadedClass).removeClass(y.params.lazyStatusLoadingClass),s.find("."+y.params.lazyPreloaderClass+", ."+y.params.preloaderClass).remove(),y.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(y.params.slideDuplicateClass)){var l=y.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+y.params.slideDuplicateClass+")");y.lazy.loadImageInSlide(l.index(),!1)}else{var p=y.wrapper.children("."+y.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');y.lazy.loadImageInSlide(p.index(),!1)}}y.emit("onLazyImageReady",y,s[0],a[0])}}),y.emit("onLazyImageLoad",y,s[0],a[0])})}},load:function(){var a,t=y.params.slidesPerView;if("auto"===t&&(t=0),y.lazy.initialImageLoaded||(y.lazy.initialImageLoaded=!0),y.params.watchSlidesVisibility)y.wrapper.children("."+y.params.slideVisibleClass).each(function(){y.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=y.activeIndex;a1||y.params.lazyLoadingInPrevNextAmount&&y.params.lazyLoadingInPrevNextAmount>1){var s=y.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(y.activeIndex+r+Math.max(s,r),y.slides.length),n=Math.max(y.activeIndex-Math.max(r,s),0);for(a=y.activeIndex+t;a0&&y.lazy.loadImageInSlide(o.index());var l=y.wrapper.children("."+y.params.slidePrevClass);l.length>0&&y.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){y.params.lazyLoading&&(y.params.lazyLoadingOnTransitionStart||!y.params.lazyLoadingOnTransitionStart&&!y.lazy.initialImageLoaded)&&y.lazy.load()},onTransitionEnd:function(){y.params.lazyLoading&&!y.params.lazyLoadingOnTransitionStart&&y.lazy.load()}},y.scrollbar={isTouched:!1,setDragPosition:function(e){var a=y.scrollbar,t=(y.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY)-a.track.offset()[y.isHorizontal()?"left":"top"]-a.dragSize/2,s=-y.minTranslate()*a.moveDivider,r=-y.maxTranslate()*a.moveDivider;tr&&(t=r),t=-t/a.moveDivider,y.updateProgress(t),y.setWrapperTranslate(t,!0)},dragStart:function(e){var a=y.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),y.params.scrollbarHide&&a.track.css("opacity",1),y.wrapper.transition(100),a.drag.transition(100),y.emit("onScrollbarDragStart",y)},dragMove:function(e){var a=y.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),y.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),y.emit("onScrollbarDragMove",y))},dragEnd:function(e){var a=y.scrollbar;a.isTouched&&(a.isTouched=!1,y.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),y.emit("onScrollbarDragEnd",y),y.params.scrollbarSnapOnRelease&&y.slideReset())},draggableEvents:!1!==y.params.simulateTouch||y.support.touch?y.touchEvents:y.touchEventsDesktop,enableDraggable:function(){var a=y.scrollbar,t=y.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=y.scrollbar,t=y.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(y.params.scrollbar){var a=y.scrollbar;a.track=e(y.params.scrollbar),y.params.uniqueNavElements&&"string"==typeof y.params.scrollbar&&a.track.length>1&&1===y.container.find(y.params.scrollbar).length&&(a.track=y.container.find(y.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('
    '),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=y.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=y.size/y.virtualSize,a.moveDivider=a.divider*(a.trackSize/y.size),a.dragSize=a.trackSize*a.divider,y.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",y.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(y.params.scrollbar){var e,a=y.scrollbar,t=(y.translate,a.dragSize);e=(a.trackSize-a.dragSize)*y.progress,y.rtl&&y.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),y.isHorizontal()?(y.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(y.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),y.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){y.params.scrollbar&&y.scrollbar.drag.transition(e)}},y.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length,this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){y.controller.spline||(y.controller.spline=y.params.loop?new y.controller.LinearSpline(y.slidesGrid,e.slidesGrid):new y.controller.LinearSpline(y.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-y.translate:y.translate,"slide"===y.params.controlBy&&(y.controller.getInterpolateFunction(a),i=-y.controller.spline.interpolate(-e)),i&&"container"!==y.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(y.maxTranslate()-y.minTranslate()),i=(e-y.minTranslate())*r+a.minTranslate()),y.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,y),a.updateActiveIndex()}var r,i,n=y.params.control;if(Array.isArray(n))for(var o=0;o-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),y.disableMousewheelControl=function(){if(!y.mousewheel.event)return!1;var a=y.container;return"container"!==y.params.mousewheelEventsTarged&&(a=e(y.params.mousewheelEventsTarged)),a.off(y.mousewheel.event,d),y.params.mousewheelControl=!1,!0},y.enableMousewheelControl=function(){if(!y.mousewheel.event)return!1;var a=y.container;return"container"!==y.params.mousewheelEventsTarged&&(a=e(y.params.mousewheelEventsTarged)),a.on(y.mousewheel.event,d),y.params.mousewheelControl=!0,!0},y.parallax={setTranslate:function(){y.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,y.progress)}),y.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=y.params.speed),y.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},y.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:y.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=y.zoom;if(!y.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=y.slides.eq(y.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+y.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||y.params.zoomMax,0!==t.gesture.imageWrap.length)?(t.gesture.image.transition(0),t.isScaling=!0):t.gesture.image=void 0},onGestureChange:function(e){var a=y.zoom;if(!y.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(y.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!y.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,x,y,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(y=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+y/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(y/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,x=-f,d=l*s.scale,m=p*s.scale,dw&&(d=w),mx&&(m=x)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(y.params.zoom){var s=(y.slides,!("touchstart"!==y.touchEvents.start||!y.support.passiveListener||!y.params.passiveListeners)&&{passive:!0,capture:!1});y.support.gestures?(y.slides[t]("gesturestart",y.zoom.onGestureStart,s),y.slides[t]("gesturechange",y.zoom.onGestureChange,s),y.slides[t]("gestureend",y.zoom.onGestureEnd,s)):"touchstart"===y.touchEvents.start&&(y.slides[t](y.touchEvents.start,y.zoom.onGestureStart,s),y.slides[t](y.touchEvents.move,y.zoom.onGestureChange,s),y.slides[t](y.touchEvents.end,y.zoom.onGestureEnd,s)),y[t]("touchStart",y.zoom.onTouchStart),y.slides.each(function(a,s){e(s).find("."+y.params.zoomContainerClass).length>0&&e(s)[t](y.touchEvents.move,y.zoom.onTouchMove)}),y[t]("touchEnd",y.zoom.onTouchEnd),y[t]("transitionEnd",y.zoom.onTransitionEnd),y.params.zoomToggle&&y.on("doubleTap",y.zoom.toggleZoom)}},init:function(){y.zoom.attachEvents()},destroy:function(){y.zoom.attachEvents(!0)}},y._plugins=[];for(var Y in y.plugins){var A=y.plugins[Y](y,y.params[Y]);A&&y._plugins.push(A)}return y.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=y.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){y.params.nextButton&&y.nextButton&&y.nextButton.length>0&&(y.a11y.makeFocusable(y.nextButton),y.a11y.addRole(y.nextButton,"button"),y.a11y.addLabel(y.nextButton,y.params.nextSlideMessage)),y.params.prevButton&&y.prevButton&&y.prevButton.length>0&&(y.a11y.makeFocusable(y.prevButton),y.a11y.addRole(y.prevButton,"button"),y.a11y.addLabel(y.prevButton,y.params.prevSlideMessage)),e(y.container).append(y.a11y.liveRegion)},initPagination:function(){y.params.pagination&&y.params.paginationClickable&&y.bullets&&y.bullets.length&&y.bullets.each(function(){var a=e(this);y.a11y.makeFocusable(a),y.a11y.addRole(a,"button"),y.a11y.addLabel(a,y.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){y.a11y.liveRegion&&y.a11y.liveRegion.length>0&&y.a11y.liveRegion.remove()}},y.init=function(){y.params.loop&&y.createLoop(),y.updateContainerSize(),y.updateSlidesSize(),y.updatePagination(),y.params.scrollbar&&y.scrollbar&&(y.scrollbar.set(),y.params.scrollbarDraggable&&y.scrollbar.enableDraggable()),"slide"!==y.params.effect&&y.effects[y.params.effect]&&(y.params.loop||y.updateProgress(),y.effects[y.params.effect].setTranslate()),y.params.loop?y.slideTo(y.params.initialSlide+y.loopedSlides,0,y.params.runCallbacksOnInit):(y.slideTo(y.params.initialSlide,0,y.params.runCallbacksOnInit),0===y.params.initialSlide&&(y.parallax&&y.params.parallax&&y.parallax.setTranslate(),y.lazy&&y.params.lazyLoading&&(y.lazy.load(),y.lazy.initialImageLoaded=!0))),y.attachEvents(),y.params.observer&&y.support.observer&&y.initObservers(),y.params.preloadImages&&!y.params.lazyLoading&&y.preloadImages(),y.params.zoom&&y.zoom&&y.zoom.init(),y.params.autoplay&&y.startAutoplay(),y.params.keyboardControl&&y.enableKeyboardControl&&y.enableKeyboardControl(),y.params.mousewheelControl&&y.enableMousewheelControl&&y.enableMousewheelControl(),y.params.hashnavReplaceState&&(y.params.replaceState=y.params.hashnavReplaceState),y.params.history&&y.history&&y.history.init(),y.params.hashnav&&y.hashnav&&y.hashnav.init(),y.params.a11y&&y.a11y&&y.a11y.init(),y.emit("onInit",y)},y.cleanupStyles=function(){y.container.removeClass(y.classNames.join(" ")).removeAttr("style"),y.wrapper.removeAttr("style"),y.slides&&y.slides.length&&y.slides.removeClass([y.params.slideVisibleClass,y.params.slideActiveClass,y.params.slideNextClass,y.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),y.paginationContainer&&y.paginationContainer.length&&y.paginationContainer.removeClass(y.params.paginationHiddenClass),y.bullets&&y.bullets.length&&y.bullets.removeClass(y.params.bulletActiveClass),y.params.prevButton&&e(y.params.prevButton).removeClass(y.params.buttonDisabledClass),y.params.nextButton&&e(y.params.nextButton).removeClass(y.params.buttonDisabledClass),y.params.scrollbar&&y.scrollbar&&(y.scrollbar.track&&y.scrollbar.track.length&&y.scrollbar.track.removeAttr("style"),y.scrollbar.drag&&y.scrollbar.drag.length&&y.scrollbar.drag.removeAttr("style"))},y.destroy=function(e,a){y.detachEvents(),y.stopAutoplay(),y.params.scrollbar&&y.scrollbar&&y.params.scrollbarDraggable&&y.scrollbar.disableDraggable(),y.params.loop&&y.destroyLoop(),a&&y.cleanupStyles(),y.disconnectObservers(),y.params.zoom&&y.zoom&&y.zoom.destroy(),y.params.keyboardControl&&y.disableKeyboardControl&&y.disableKeyboardControl(),y.params.mousewheelControl&&y.disableMousewheelControl&&y.disableMousewheelControl(),y.params.a11y&&y.a11y&&y.a11y.destroy(),y.params.history&&!y.params.replaceState&&window.removeEventListener("popstate",y.history.setHistoryPopState),y.params.hashnav&&y.hashnav&&y.hashnav.destroy(),y.emit("onDestroy"),!1!==e&&(y=null)},y.init(),y}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="\x3c!--[if lte IE 9]>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper}); + + +/** + * @module WOW + * @author Matthieu Aussaguel + * @license MIT + * @version 1.1.3 + */ +(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); + + +/** + * @module Owl carousel + * @version 2.2.1 + * @author Bartosz Wojciechowski + * @license MIT + */ +!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&e<=0&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('
    '),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.$element.is(":visible")&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&bh-f-e&&b",g[a+1]||h-f)&&(d="left"===c?a+1:a),d===-1},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=f*-1*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&a.namespace.indexOf("owl")!==-1?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&e*-1||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='
    ',d=k.lazyLoad?'
    ':'
    ',b.after(d),b.after(e)};if(b.wrap('
    "),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='':"vimeo"===f.type?c='':"vzaar"===f.type&&(c=''),a('
    '+c+"
    ").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)}, + a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
    '+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
    ")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
    ").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("
    ").addClass(c.dotClass).append(a("")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("
    ").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); + + +/** + * @module RD Navbar + * @author Evgeniy Gusarov + * @see https://ua.linkedin.com/pub/evgeniy-gusarov/8a/a40/54a + * @version 2.2.5 + */ +/** + * @module RD Navbar + * @author Evgeniy Gusarov + * @version 2.2.5 + */ +(function() { + var isTouch; + + isTouch = "ontouchstart" in window; + + (function($, document, window) { + + /** + * Creates a RDNavbar. + * @class RDNavbar. + * @public + * @param {HTMLElement} element - The element to create the RDNavbar for. + * @param {Object} [options] - The options + */ + var RDNavbar; + RDNavbar = (function() { + + /** + * Default options for RDNavbar. + * @protected + */ + RDNavbar.prototype.Defaults = { + layout: 'rd-navbar-static', + deviceLayout: 'rd-navbar-fixed', + focusOnHover: true, + focusOnHoverTimeout: 800, + linkedElements: ["html"], + domAppend: true, + stickUp: true, + stickUpClone: true, + stickUpOffset: '100%', + anchorNav: true, + anchorNavSpeed: 400, + anchorNavOffset: 0, + anchorNavEasing: 'swing', + autoHeight: true, + responsive: { + 0: { + layout: "rd-navbar-fixed", + deviceLayout: "rd-navbar-fixed", + focusOnHover: false, + stickUp: false + }, + 992: { + layout: "rd-navbar-static", + deviceLayout: "rd-navbar-static", + focusOnHover: true, + stickUp: true + } + }, + callbacks: { + onToggleSwitch: false, + onToggleClose: false, + onDomAppend: false, + onDropdownOver: false, + onDropdownOut: false, + onDropdownToggle: false, + onDropdownClose: false, + onStuck: false, + onUnstuck: false, + onAnchorChange: false + } + }; + + function RDNavbar(element, options) { + + /** + * Current options set + * @public + */ + this.options = $.extend(true, {}, this.Defaults, options); + + /** + * Plugin element + * @public + */ + this.$element = $(element); + + /** + * Plugin element clone + * @public + */ + this.$clone = null; + + /** + * Additional references + * @public + */ + this.$win = $(window); + this.$doc = $(document); + this.currentLayout = this.options.layout; + this.loaded = false; + this.focusOnHover = this.options.focusOnHover; + this.focusTimer = false; + this.cloneTimer = false; + this.isStuck = false; + this.initialize(); + } + + + /** + * Initializes the RDNavbar. + * @protected + */ + + RDNavbar.prototype.initialize = function() { + var ctx; + ctx = this; + ctx.$element.addClass("rd-navbar").addClass(ctx.options.layout); + if (isTouch) { + ctx.$element.addClass("rd-navbar--is-touch"); + } + if (ctx.options.domAppend) { + ctx.createNav(ctx); + } + if (ctx.options.stickUpClone) { + ctx.createClone(ctx); + } + ctx.$element.addClass('rd-navbar-original'); + ctx.addAdditionalClassToToggles('.rd-navbar-original', 'toggle-original', 'toggle-original-elements'); + ctx.applyHandlers(ctx); + ctx.offset = ctx.$element.offset().top; + ctx.height = ctx.$element.outerHeight(); + ctx.loaded = true; + return ctx; + }; + + + /** + * Changes {ctx.$element} layout basing on screen resolution + * @protected + */ + + RDNavbar.prototype.resize = function(ctx, e) { + var targetElement, targetLayout; + targetLayout = isTouch ? ctx.getOption('deviceLayout') : ctx.getOption('layout'); + targetElement = ctx.$element.add(ctx.$clone); + if (targetLayout !== ctx.currentLayout || !ctx.loaded) { + ctx.switchClass(targetElement, ctx.currentLayout, targetLayout); + if (ctx.options.linkedElements != null) { + $.grep(ctx.options.linkedElements, function(link, index) { + return ctx.switchClass(link, ctx.currentLayout + '-linked', targetLayout + '-linked'); + }); + } + ctx.currentLayout = targetLayout; + } + ctx.focusOnHover = ctx.getOption('focusOnHover'); + return ctx; + }; + + + /** + * Toggles bar stickup on scroll + * @protected + */ + + RDNavbar.prototype.stickUp = function(ctx, e) { + var scrollTop, stickUp, stickUpOffset, targetElement, threshold; + stickUp = ctx.getOption("stickUp"); + if ($('html').hasClass('ios') || ctx.$element.hasClass('rd-navbar-fixed')) { + stickUp = false; + } + scrollTop = ctx.$doc.scrollTop(); + targetElement = ctx.$clone != null ? ctx.$clone : ctx.$element; + stickUpOffset = ctx.getOption('stickUpOffset'); + threshold = (typeof stickUpOffset === 'string' ? (stickUpOffset.indexOf('%') > 0 ? parseFloat(stickUpOffset) * ctx.height / 100 : parseFloat(stickUpOffset)) : stickUpOffset); + if (stickUp) { + if ((scrollTop >= threshold && !ctx.isStuck) || (scrollTop < threshold && ctx.isStuck)) { + ctx.$element.add(ctx.$clone).find('[data-rd-navbar-toggle]').each(function() { + $.proxy(ctx.closeToggle, this)(ctx, false); + }).end().find('.rd-navbar-submenu').removeClass('opened').removeClass('focus'); + if (scrollTop >= threshold && !ctx.isStuck && !ctx.$element.hasClass('rd-navbar-fixed')) { + if (ctx.options.callbacks.onStuck) { + ctx.options.callbacks.onStuck.call(ctx); + } + + + setTimeout(function(){ + if (e.type === 'resize') { + ctx.switchClass(targetElement, '', 'rd-navbar--is-stuck'); + } else { + targetElement.addClass('rd-navbar--is-stuck'); + } + ctx.isStuck = true; + }, navigator.platform.match(/(Mac)/i) ? 10 : 0); + + } else { + if (e.type === 'resize') { + ctx.switchClass(targetElement, 'rd-navbar--is-stuck', ''); + } else { + targetElement.removeClass('rd-navbar--is-stuck').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', $.proxy(ctx.resizeWrap, ctx, e)); + } + ctx.isStuck = false; + if (ctx.options.callbacks.onUnstuck) { + ctx.options.callbacks.onUnstuck.call(ctx); + } + } + } + } else { + ctx.$element.find('.rd-navbar-submenu').removeClass('opened').removeClass('focus'); + if (ctx.isStuck) { + ctx.switchClass(targetElement, 'rd-navbar--is-stuck', ''); + ctx.isStuck = false; + ctx.resizeWrap(e); + } + } + return ctx; + }; + + + /** + * Resizes an external wrap of navbar + * @protected + */ + + RDNavbar.prototype.resizeWrap = function(e) { + var $wrap, ctx; + ctx = this; + if ((ctx.$clone == null) && !ctx.isStuck) { + $wrap = ctx.$element.parent(); + if (!ctx.getOption('autoHeight')) { + $wrap.css('height', 'auto'); + return; + } + ctx.height = ctx.$element.outerHeight(); + if (e.type === 'resize') { + $wrap.addClass('rd-navbar--no-transition').css('height', ctx.height); + $wrap[0].offsetHeight; + return $wrap.removeClass('rd-navbar--no-transition'); + } else { + return $wrap.css('height', ctx.height); + } + } + }; + + + /** + * Creates additional DOM for navigation functionality + * @protected + */ + + RDNavbar.prototype.createNav = function(ctx) { + ctx.$element.find('.rd-navbar-dropdown, .rd-navbar-megamenu').each(function() { + var $this, rect; + $this = $(this); + rect = this.getBoundingClientRect(); + if ($this.hasClass('rd-navbar-megamenu')) { + return $this.parent().addClass('rd-navbar--has-megamenu'); + } else { + return $this.parent().addClass('rd-navbar--has-dropdown'); + } + }).parents("li").addClass("rd-navbar-submenu"); + $('').insertAfter('.rd-navbar-nav li.rd-navbar-submenu > a'); + if (ctx.options.callbacks.onDomAppend) { + ctx.options.callbacks.onDomAppend.call(this); + } + return ctx; + }; + + + /** + * Creates navbar clone to stick up + * @protected + */ + + RDNavbar.prototype.createClone = function(ctx) { + ctx.$clone = ctx.$element.clone().insertAfter(ctx.$element).addClass('rd-navbar--is-clone'); + ctx.addAdditionalClassToToggles('.rd-navbar--is-clone', 'toggle-cloned', 'toggle-cloned-elements'); + return ctx; + }; + + + /** + * Closes all toggles on outside click of each item + * @protected + */ + + RDNavbar.prototype.closeToggle = function(ctx, e) { + var $items, $target, additionalToggleElClass, additionalToogleClass, collapse, linkedElements, needClose; + $target = $(e.target); + collapse = false; + linkedElements = this.getAttribute('data-rd-navbar-toggle'); + if (ctx.options.stickUpClone && ctx.isStuck) { + additionalToogleClass = '.toggle-cloned'; + additionalToggleElClass = '.toggle-cloned-elements'; + needClose = !$target.hasClass('toggle-cloned'); + } else { + additionalToogleClass = '.toggle-original'; + additionalToggleElClass = '.toggle-original-elements'; + needClose = !$target.hasClass('toggle-original'); + } + if (e.target !== this && !$target.parents(additionalToogleClass + '[data-rd-navbar-toggle]').length && !$target.parents(additionalToggleElClass).length && linkedElements && needClose) { + $items = $(this).parents('body').find(linkedElements).add($(this).parents('.rd-navbar')[0]); + $items.each(function() { + if (!collapse) { + return collapse = (e.target === this || $.contains(this, e.target)) === true; + } + }); + if (!collapse) { + $items.add(this).removeClass('active'); + if (ctx.options.callbacks.onToggleClose) { + ctx.options.callbacks.onToggleClose.call(this, ctx); + } + } + } + return this; + }; + + + /** + * Switches toggle + * @protected + */ + + RDNavbar.prototype.switchToggle = function(ctx, e) { + var additionalToggleElClass, linkedElements, navbarClass; + e.preventDefault(); + if ($(this).hasClass('toggle-cloned')) { + navbarClass = '.rd-navbar--is-clone'; + additionalToggleElClass = '.toggle-cloned-elements'; + } else { + navbarClass = '.rd-navbar-original'; + additionalToggleElClass = '.toggle-original-elements'; + } + if (linkedElements = this.getAttribute('data-rd-navbar-toggle')) { + $(navbarClass + ' [data-rd-navbar-toggle]').not(this).each(function() { + var deactivateElements; + if (deactivateElements = this.getAttribute('data-rd-navbar-toggle')) { + return $(this).parents('body').find(navbarClass + ' ' + deactivateElements + additionalToggleElClass).add(this).add($.inArray('.rd-navbar', deactivateElements.split(/\s*,\s*/i)) > -1 ? $(this).parents('body')[0] : false).removeClass('active'); + } + }); + $(this).parents('body').find(navbarClass + ' ' + linkedElements + additionalToggleElClass).add(this).add($.inArray('.rd-navbar', linkedElements.split(/\s*,\s*/i)) > -1 ? $(this).parents('.rd-navbar')[0] : false).toggleClass('active'); + } + if (ctx.options.callbacks.onToggleSwitch) { + ctx.options.callbacks.onToggleSwitch.call(this, ctx); + } + return this; + }; + + + /** + * Triggers submenu popup to be shown on mouseover + * @protected + */ + + RDNavbar.prototype.dropdownOver = function(ctx, timer) { + var $this; + if (ctx.focusOnHover) { + $this = $(this); + clearTimeout(timer); + if (ctx.options.callbacks.onDropdownOver) { + if (!ctx.options.callbacks.onDropdownOver.call(this, ctx)){ + return this; + } + } + + $this.addClass('focus').siblings().removeClass('opened').each(ctx.dropdownUnfocus); + } + return this; + }; + + + /** + * Triggers submenu popup to be shown on mouseover + * @protected + */ + + RDNavbar.prototype.dropdownTouch = function(ctx, timer) { + var $this, hasFocus; + $this = $(this); + clearTimeout(timer); + if (ctx.focusOnHover) { + hasFocus = false; + if ($this.hasClass('focus')) { + hasFocus = true; + } + if (!hasFocus) { + $this.addClass('focus').siblings().removeClass('opened').each(ctx.dropdownUnfocus); + return false; + } + if (ctx.options.callbacks.onDropdownOver) { + ctx.options.callbacks.onDropdownOver.call(this, ctx); + } + } + return this; + }; + + + /** + * Triggers submenu popop to be hidden on mouseout + * @protected + */ + + RDNavbar.prototype.dropdownOut = function(ctx, timer) { + var $this; + if (ctx.focusOnHover) { + $this = $(this); + $this.one('mouseenter.navbar', function() { + return clearTimeout(timer); + }); + + if (ctx.options.callbacks.onDropdownOut) { + ctx.options.callbacks.onDropdownOut.call(this, ctx); + } + clearTimeout(timer); + + timer = setTimeout($.proxy(ctx.dropdownUnfocus, this, ctx), ctx.options.focusOnHoverTimeout); + } + return this; + }; + + + /** + * Removes a focus from submenu + * @protected + */ + + RDNavbar.prototype.dropdownUnfocus = function(ctx) { + var $this; + $this = $(this); + $this.find('li.focus').add(this).removeClass('focus'); + return this; + }; + + + /** + * Closes submenu + * @protected + */ + + RDNavbar.prototype.dropdownClose = function(ctx, e) { + var $this; + if (e.target !== this && !$(e.target).parents('.rd-navbar-submenu').length) { + $this = $(this); + $this.find('li.focus').add(this).removeClass('focus').removeClass('opened'); + if (ctx.options.callbacks.onDropdownClose) { + ctx.options.callbacks.onDropdownClose.call(this, ctx); + } + } + return this; + }; + + + /** + * Toggles submenu popup to be shown on trigger click + * @protected + */ + + RDNavbar.prototype.dropdownToggle = function(ctx) { + $(this).toggleClass('opened').siblings().removeClass('opened'); + if (ctx.options.callbacks.onDropdownToggle) { + ctx.options.callbacks.onDropdownToggle.call(this, ctx); + } + return this; + }; + + + /** + * Scrolls the page to triggered anchor + * @protected + */ + + RDNavbar.prototype.goToAnchor = function(ctx, e) { + var $anchor, hash; + hash = this.hash; + $anchor = $(hash); + + if (!ctx.getOption('anchorNav')){ + return false; + } + + if ($anchor.length) { + e.preventDefault(); + $('html, body').stop().animate({ + 'scrollTop': $anchor.offset().top + ctx.getOption('anchorNavOffset') + 1 + }, ctx.getOption('anchorNavSpeed'), ctx.getOption('anchorNavEasing'), function() { + return ctx.changeAnchor(hash); + }); + } + return this; + }; + + + /** + * Highlight an active anchor + * @protected + */ + + RDNavbar.prototype.activateAnchor = function(e) { + var $anchor, $item, $link, ctx, docHeight, hash, i, link, links, navOffset, scrollTop, winHeight; + ctx = this; + scrollTop = ctx.$doc.scrollTop(); + winHeight = ctx.$win.height(); + docHeight = ctx.$doc.height(); + navOffset = ctx.getOption('anchorNavOffset'); + + if (!ctx.options.anchorNav){ + return false; + } + + if (scrollTop + winHeight > docHeight - 50) { + $anchor = $('[data-type="anchor"]').last(); + if ($anchor.length) { + if ($anchor.offset().top >= scrollTop) { + hash = '#' + $anchor.attr("id"); + $item = $('.rd-navbar-nav a[href^="' + hash + '"]').parent(); + if (!$item.hasClass('active')) { + $item.addClass('active').siblings().removeClass('active'); + if (ctx.options.callbacks.onAnchorChange) { + ctx.options.callbacks.onAnchorChange.call($anchor[0], ctx); + } + } + } + } + return $anchor; + } else { + links = $('.rd-navbar-nav a[href^="#"]').get(); + for (i in links) { + link = links[i]; + $link = $(link); + hash = $link.attr('href'); + // @CHANGE LDR + if (hash != '#') $anchor = $(hash); + else $anchor = ''; + //$anchor = $(hash); + if ($anchor.length) { + if ($anchor.offset().top + navOffset <= scrollTop && $anchor.offset().top + $anchor.outerHeight() > scrollTop) { + $link.parent().addClass('active').siblings().removeClass('active'); + if (ctx.options.callbacks.onAnchorChange) { + ctx.options.callbacks.onAnchorChange.call($anchor[0], ctx); + } + } + } + } + } + return null; + }; + + + /** + * Returns current anchor + * @protected + */ + + RDNavbar.prototype.getAnchor = function() { + if (history) { + if (history.state) { + return history.state.id; + } + } + return null; + }; + + + /** + * Changes current page anchor + * @protected + */ + + RDNavbar.prototype.changeAnchor = function(hash) { + if (history) { + if (history.state) { + if (history.state.id !== hash) { + history.replaceState({ + 'anchorId': hash + }, null, hash); + } else { + history.pushState({ + 'anchorId': hash + }, null, hash); + } + } else { + history.pushState({ + 'anchorId': hash + }, null, hash); + } + } + return this; + }; + + + /** + * Applies all JS event handlers + * @protected + */ + + RDNavbar.prototype.applyHandlers = function(ctx) { + if (ctx.options.responsive != null) { + ctx.$win.on('resize.navbar', $.proxy(ctx.resize, ctx.$win[0], ctx)).on('resize.navbar', $.proxy(ctx.resizeWrap, ctx)).on('resize.navbar', $.proxy(ctx.stickUp, (ctx.$clone != null ? ctx.$clone : ctx.$element), ctx)).on('orientationchange.navbar', $.proxy(ctx.resize, ctx.$win[0], ctx)).trigger('resize.navbar'); + } + ctx.$doc.on('scroll.navbar', $.proxy(ctx.stickUp, (ctx.$clone != null ? ctx.$clone : ctx.$element), ctx)).on('scroll.navbar', $.proxy(ctx.activateAnchor, ctx)); + ctx.$element.add(ctx.$clone).find('[data-rd-navbar-toggle]').each(function() { + var $this; + $this = $(this); + $this.on('click', $.proxy(ctx.switchToggle, this, ctx)); + return $this.parents('body').on('click', $.proxy(ctx.closeToggle, this, ctx)); + }); + ctx.$element.add(ctx.$clone).find('.rd-navbar-submenu').each(function() { + var $this, timer; + $this = $(this); + timer = $this.parents(".rd-navbar--is-clone").length ? ctx.cloneTimer : ctx.focusTimer; + $this.on('mouseleave.navbar', $.proxy(ctx.dropdownOut, this, ctx, timer)); + $this.find('> a').on('mouseenter.navbar', $.proxy(ctx.dropdownOver, this, ctx, timer)); + $this.find('> a').on('touchstart.navbar', $.proxy(ctx.dropdownTouch, this, ctx, timer)); + $this.find('> .rd-navbar-submenu-toggle').on('click', $.proxy(ctx.dropdownToggle, this, ctx)); + return $this.parents('body').on('click', $.proxy(ctx.dropdownClose, this, ctx)); + }); + ctx.$element.add(ctx.$clone).find('.rd-navbar-nav a[href^="#"]').each(function() { + return $(this).on('click', $.proxy(ctx.goToAnchor, this, ctx)); + }); + + ctx.$element.find('.rd-navbar-dropdown, .rd-navbar-megamenu').each(function() { + var $this, rect; + $this = $(this); + rect = this.getBoundingClientRect(); + if ((rect.left + $this.outerWidth()) >= window.innerWidth - 10) { + this.className += ' rd-navbar-open-left'; + } else if ((rect.left - $this.outerWidth()) <= 10) { + this.className += ' rd-navbar-open-right'; + } + }); + + return ctx; + }; + + + /** + * Switches classes of elements without transition + * @protected + */ + + RDNavbar.prototype.switchClass = function(element, before, after) { + var obj; + obj = element instanceof jQuery ? element : $(element); + obj.addClass('rd-navbar--no-transition').removeClass(before).addClass(after); + obj[0].offsetHeight; + return obj.removeClass('rd-navbar--no-transition'); + }; + + + /** + * Gets specific option of plugin + * @protected + */ + + RDNavbar.prototype.getOption = function(key) { + var point, targetPoint; + for (point in this.options.responsive) { + if (point <= window.innerWidth) { + targetPoint = point; + } + } + if ((this.options.responsive != null) && (this.options.responsive[targetPoint][key] != null)) { + return this.options.responsive[targetPoint][key]; + } else { + return this.options[key]; + } + }; + + + /** + * Add additional class to navbar toggles to identify it when navbar is cloned + * @protected + */ + + RDNavbar.prototype.addAdditionalClassToToggles = function(navbarClass, toggleAdditionalClass, toggleElAdditionalClass) { + return $(navbarClass).find('[data-rd-navbar-toggle]').each(function() { + var toggleElement; + $(this).addClass(toggleAdditionalClass); + toggleElement = this.getAttribute('data-rd-navbar-toggle'); + return $(this).parents('body').find(navbarClass).find(toggleElement).addClass(toggleElAdditionalClass); + }); + }; + + return RDNavbar; + + })(); + + /** + * The jQuery Plugin for the RD Navbar + * @public + */ + $.fn.extend({ + RDNavbar: function(options) { + var $this; + $this = $(this); + if (!$this.data('RDNavbar')) { + return $this.data('RDNavbar', new RDNavbar(this, options)); + } + } + + /** + * RD Navbar window export + * @public + */ + }); + return window.RDNavbar = RDNavbar; + })(window.jQuery, document, window); + + + /** + * The Plugin AMD export + * @public + */ + + if (typeof module !== "undefined" && module !== null) { + module.exports = window.RDNavbar; + } else if (typeof define === 'function' && define.amd) { + define(["jquery"], function() { + 'use strict'; + return window.RDNavbar; + }); + } + +}).call(this); + + +/** + * @module Device.js + * @see https://github.com/matthewhudson/device.js + * @license MIT + */ +(function(){var n,e,o,t,i,r,d,a,c,l;e=window.device,n={},window.device=n,t=window.document.documentElement,l=window.navigator.userAgent.toLowerCase(),n.ios=function(){return n.iphone()||n.ipod()||n.ipad()},n.iphone=function(){return!n.windows()&&i("iphone")},n.ipod=function(){return i("ipod")},n.ipad=function(){return i("ipad")},n.android=function(){return!n.windows()&&i("android")},n.androidPhone=function(){return n.android()&&i("mobile")},n.androidTablet=function(){return n.android()&&!i("mobile")},n.blackberry=function(){return i("blackberry")||i("bb10")||i("rim")},n.blackberryPhone=function(){return n.blackberry()&&!i("tablet")},n.blackberryTablet=function(){return n.blackberry()&&i("tablet")},n.windows=function(){return i("windows")},n.windowsPhone=function(){return n.windows()&&i("phone")},n.windowsTablet=function(){return n.windows()&&i("touch")&&!n.windowsPhone()},n.fxos=function(){return(i("(mobile;")||i("(tablet;"))&&i("; rv:")},n.fxosPhone=function(){return n.fxos()&&i("mobile")},n.fxosTablet=function(){return n.fxos()&&i("tablet")},n.meego=function(){return i("meego")},n.cordova=function(){return window.cordova&&"file:"===location.protocol},n.nodeWebkit=function(){return"object"==typeof window.process},n.mobile=function(){return n.androidPhone()||n.iphone()||n.ipod()||n.windowsPhone()||n.blackberryPhone()||n.fxosPhone()||n.meego()},n.tablet=function(){return n.ipad()||n.androidTablet()||n.blackberryTablet()||n.windowsTablet()||n.fxosTablet()},n.desktop=function(){return!n.tablet()&&!n.mobile()},n.television=function(){var n,e=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html"];for(n=0;n1},n.landscape=function(){return window.innerHeight/window.innerWidth<1},n.noConflict=function(){return window.device=e,this},i=function(n){return-1!==l.indexOf(n)},d=function(n){var e;return e=new RegExp(n,"i"),t.className.match(e)},o=function(n){var e=null;d(n)||(e=t.className.replace(/^\s+|\s+$/g,""),t.className=e+" "+n)},c=function(n){d(n)&&(t.className=t.className.replace(" "+n,""))},n.ios()?n.ipad()?o("ios ipad tablet"):n.iphone()?o("ios iphone mobile"):n.ipod()&&o("ios ipod mobile"):n.android()?o(n.androidTablet()?"android tablet":"android mobile"):n.blackberry()?o(n.blackberryTablet()?"blackberry tablet":"blackberry mobile"):n.windows()?o(n.windowsTablet()?"windows tablet":n.windowsPhone()?"windows mobile":"desktop"):n.fxos()?o(n.fxosTablet()?"fxos tablet":"fxos mobile"):n.meego()?o("meego mobile"):n.nodeWebkit()?o("node-webkit"):n.television()?o("television"):n.desktop()&&o("desktop"),n.cordova()&&o("cordova"),r=function(){n.landscape()?(c("portrait"),o("landscape")):(c("landscape"),o("portrait"))},a=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(a,r,!1):window.attachEvent?window.attachEvent(a,r):window[a]=r,r(),"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return n}):"undefined"!=typeof module&&module.exports?module.exports=n:window.device=n}).call(this); + + +/** + * @module UIToTop + * @author Matt Varone + * @see http://www.mattvarone.com/web-design/uitotop-jquery-plugin/ + * @license MIT + */ +!function(o){o.fn.UItoTop=function(n){var e={text:"",min:500,scrollSpeed:800,containerID:"ui-to-top",containerClass:"ui-to-top fa fa-angle-up",easingType:"easeIn"},t=o.extend(e,n),i="#"+t.containerID;o("body").append(''+t.text+""),o(i).click(function(){return o("html, body").stop().animate({scrollTop:0},t.scrollSpeed,t.easingType),!1}),o(window).scroll(function(){var n=o(window).scrollTop();"undefined"==typeof document.body.style.maxHeight&&o(i).css({position:"absolute",top:o(window).scrollTop()+o(window).height()-50}),n>t.min?o(i).stop(!0,!0).addClass("active"):o(i).removeClass("active")})}}(jQuery); + + +/** + * @module Abstract base class for collection plugins v1.0.1. + * @author Keith Wood + * @see http://keith-wood.name/countdown.html + * @license MIT + */ +(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery); + + +/** + * @module Moment JS + * @authors Tim Wood, Iskren Chernev, Moment.js contributors + * @see https://ua.linkedin.com/in/rafael-shayvolodyan-3a297b96 + * @version 2.12.0 + * @license MIT + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return Xn.apply(null,arguments)}function e(t){Xn=t}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var n,i=[];for(n=0;n0)for(n in Kn)i=Kn[n],s=e[i],c(s)||(t[i]=s);return t}function m(e){f(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),ti===!1&&(ti=!0,t.updateOffset(this),ti=!1)}function _(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function y(t){return 0>t?Math.ceil(t):Math.floor(t)}function g(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=y(e)),n}function p(t,e,n){var i,s=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),a=0;for(i=0;s>i;i++)(n&&t[i]!==e[i]||!n&&g(t[i])!==g(e[i]))&&a++;return a+r}function v(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(t,e){var n=!0;return a(function(){return n&&(v(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function M(t,e){ei[t]||(v(e),ei[t]=!0)}function S(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function Y(t){return"[object Object]"===Object.prototype.toString.call(t)}function w(t){var e,n;for(n in t)e=t[n],S(e)?this[n]=e:this["_"+n]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function k(t,e){var n,i=a({},t);for(n in e)r(e,n)&&(Y(t[n])&&Y(e[n])?(i[n]={},a(i[n],t[n]),a(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);return i}function T(t){null!=t&&this.set(t)}function b(t){return t?t.toLowerCase().replace("_","-"):t}function O(t){for(var e,n,i,s,r=0;r0;){if(i=W(s.slice(0,e).join("-")))return i;if(n&&n.length>=e&&p(s,n,!0)>=e-1)break;e--}r++}return null}function W(t){var e=null;if(!ii[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=ni._abbr,require("./locale/"+t),x(e)}catch(n){}return ii[t]}function x(t,e){var n;return t&&(n=c(e)?P(t):U(t,e),n&&(ni=n)),ni._abbr}function U(t,e){return null!==e?(e.abbr=t,null!=ii[t]?(M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=k(ii[t]._config,e)):null!=e.parentLocale&&(null!=ii[e.parentLocale]?e=k(ii[e.parentLocale]._config,e):M("parentLocaleUndefined","specified parentLocale is not defined yet")),ii[t]=new T(e),x(t),ii[t]):(delete ii[t],null)}function G(t,e){if(null!=e){var n;null!=ii[t]&&(e=k(ii[t]._config,e)),n=new T(e),n.parentLocale=ii[t],ii[t]=n,x(t)}else null!=ii[t]&&(null!=ii[t].parentLocale?ii[t]=ii[t].parentLocale:null!=ii[t]&&delete ii[t]);return ii[t]}function P(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ni;if(!n(t)){if(e=W(t))return e;t=[t]}return O(t)}function C(){return Object.keys(ii)}function F(t,e){var n=t.toLowerCase();si[n]=si[n+"s"]=si[e]=t}function H(t){return"string"==typeof t?si[t]||si[t.toLowerCase()]:void 0}function L(t){var e,n,i={};for(n in t)r(t,n)&&(e=H(n),e&&(i[e]=t[n]));return i}function V(e,n){return function(i){return null!=i?(I(this,e,i),t.updateOffset(this,n),this):N(this,e)}}function N(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function I(t,e,n){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](n)}function A(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=H(t),S(this[t]))return this[t](e);return this}function R(t,e,n){var i=""+Math.abs(t),s=e-i.length,r=t>=0;return(r?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+i}function E(t,e,n,i){var s=i;"string"==typeof i&&(s=function(){return this[i]()}),t&&(ui[t]=s),e&&(ui[e[0]]=function(){return R(s.apply(this,arguments),e[1],e[2])}),n&&(ui[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function z(t){var e,n,i=t.match(ri);for(e=0,n=i.length;n>e;e++)ui[i[e]]?i[e]=ui[i[e]]:i[e]=j(i[e]);return function(s){var r="";for(e=0;n>e;e++)r+=i[e]instanceof Function?i[e].call(s,t):i[e];return r}}function Z(t,e){return t.isValid()?(e=$(e,t.localeData()),oi[e]=oi[e]||z(e),oi[e](t)):t.localeData().invalidDate()}function $(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(ai.lastIndex=0;i>=0&&ai.test(t);)t=t.replace(ai,n),ai.lastIndex=0,i-=1;return t}function q(t,e,n){Ti[t]=S(e)?e:function(t,i){return t&&n?n:e}}function J(t,e){return r(Ti,t)?Ti[t](e._strict,e._locale):new RegExp(B(t))}function B(t){return Q(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,s){return e||n||i||s}))}function Q(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(i=function(t,n){n[e]=g(t)}),n=0;ni;i++){if(s=o([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function rt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=g(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return n=Math.min(t.date(),et(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function at(e){return null!=e?(rt(this,e),t.updateOffset(this,!0),this):N(this,"Month")}function ot(){return et(this.year(),this.month())}function ut(t){return this._monthsParseExact?(r(this,"_monthsRegex")||lt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function dt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||lt.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function lt(){function t(t,e){return e.length-t.length}var e,n,i=[],s=[],r=[];for(e=0;12>e;e++)n=o([2e3,e]),i.push(this.monthsShort(n,"")),s.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),s.sort(t),r.sort(t),e=0;12>e;e++)i[e]=Q(i[e]),s[e]=Q(s[e]),r[e]=Q(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")$","i")}function ht(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[Wi]<0||n[Wi]>11?Wi:n[xi]<1||n[xi]>et(n[Oi],n[Wi])?xi:n[Ui]<0||n[Ui]>24||24===n[Ui]&&(0!==n[Gi]||0!==n[Pi]||0!==n[Ci])?Ui:n[Gi]<0||n[Gi]>59?Gi:n[Pi]<0||n[Pi]>59?Pi:n[Ci]<0||n[Ci]>999?Ci:-1,d(t)._overflowDayOfYear&&(Oi>e||e>xi)&&(e=xi),d(t)._overflowWeeks&&-1===e&&(e=Fi),d(t)._overflowWeekday&&-1===e&&(e=Hi),d(t).overflow=e),t}function ct(t){var e,n,i,s,r,a,o=t._i,u=Ri.exec(o)||Ei.exec(o);if(u){for(d(t).iso=!0,e=0,n=zi.length;n>e;e++)if(zi[e][1].exec(u[1])){s=zi[e][0],i=zi[e][2]!==!1;break}if(null==s)return void(t._isValid=!1);if(u[3]){for(e=0,n=Zi.length;n>e;e++)if(Zi[e][1].exec(u[3])){r=(u[2]||" ")+Zi[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(u[4]){if(!ji.exec(u[4]))return void(t._isValid=!1);a="Z"}t._f=s+(r||"")+(a||""),bt(t)}else t._isValid=!1}function ft(e){var n=$i.exec(e._i);return null!==n?void(e._d=new Date(+n[1])):(ct(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function mt(t,e,n,i,s,r,a){var o=new Date(t,e,n,i,s,r,a);return 100>t&&t>=0&&isFinite(o.getFullYear())&&o.setFullYear(t),o}function _t(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function yt(t){return gt(t)?366:365}function gt(t){return t%4===0&&t%100!==0||t%400===0}function pt(){return gt(this.year())}function vt(t,e,n){var i=7+e-n,s=(7+_t(t,0,i).getUTCDay()-e)%7;return-s+i-1}function Dt(t,e,n,i,s){var r,a,o=(7+n-i)%7,u=vt(t,i,s),d=1+7*(e-1)+o+u;return 0>=d?(r=t-1,a=yt(r)+d):d>yt(t)?(r=t+1,a=d-yt(t)):(r=t,a=d),{year:r,dayOfYear:a}}function Mt(t,e,n){var i,s,r=vt(t.year(),e,n),a=Math.floor((t.dayOfYear()-r-1)/7)+1;return 1>a?(s=t.year()-1,i=a+St(s,e,n)):a>St(t.year(),e,n)?(i=a-St(t.year(),e,n),s=t.year()+1):(s=t.year(),i=a),{week:i,year:s}}function St(t,e,n){var i=vt(t,e,n),s=vt(t+1,e,n);return(yt(t)-i+s)/7}function Yt(t,e,n){return null!=t?t:null!=e?e:n}function wt(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function kt(t){var e,n,i,s,r=[];if(!t._d){for(i=wt(t),t._w&&null==t._a[xi]&&null==t._a[Wi]&&Tt(t),t._dayOfYear&&(s=Yt(t._a[Oi],i[Oi]),t._dayOfYear>yt(s)&&(d(t)._overflowDayOfYear=!0),n=_t(s,0,t._dayOfYear),t._a[Wi]=n.getUTCMonth(),t._a[xi]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=r[e]=i[e];for(;7>e;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ui]&&0===t._a[Gi]&&0===t._a[Pi]&&0===t._a[Ci]&&(t._nextDay=!0,t._a[Ui]=0),t._d=(t._useUTC?_t:mt).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ui]=24)}}function Tt(t){var e,n,i,s,r,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(r=1,a=4,n=Yt(e.GG,t._a[Oi],Mt(Ft(),1,4).year),i=Yt(e.W,1),s=Yt(e.E,1),(1>s||s>7)&&(u=!0)):(r=t._locale._week.dow,a=t._locale._week.doy,n=Yt(e.gg,t._a[Oi],Mt(Ft(),r,a).year),i=Yt(e.w,1),null!=e.d?(s=e.d,(0>s||s>6)&&(u=!0)):null!=e.e?(s=e.e+r,(e.e<0||e.e>6)&&(u=!0)):s=r),1>i||i>St(n,r,a)?d(t)._overflowWeeks=!0:null!=u?d(t)._overflowWeekday=!0:(o=Dt(n,i,s,r,a),t._a[Oi]=o.year,t._dayOfYear=o.dayOfYear)}function bt(e){if(e._f===t.ISO_8601)return void ct(e);e._a=[],d(e).empty=!0;var n,i,s,r,a,o=""+e._i,u=o.length,l=0;for(s=$(e._f,e._locale).match(ri)||[],n=0;n0&&d(e).unusedInput.push(a),o=o.slice(o.indexOf(i)+i.length),l+=i.length),ui[r]?(i?d(e).empty=!1:d(e).unusedTokens.push(r),tt(r,i,e)):e._strict&&!i&&d(e).unusedTokens.push(r);d(e).charsLeftOver=u-l,o.length>0&&d(e).unusedInput.push(o),d(e).bigHour===!0&&e._a[Ui]<=12&&e._a[Ui]>0&&(d(e).bigHour=void 0),e._a[Ui]=Ot(e._locale,e._a[Ui],e._meridiem),kt(e),ht(e)}function Ot(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&12>e&&(e+=12),i||12!==e||(e=0),e):e}function Wt(t){var e,n,i,s,r;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(NaN));for(s=0;sr)&&(i=r,n=e));a(t,n||e)}function xt(t){if(!t._d){var e=L(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),kt(t)}}function Ut(t){var e=new m(ht(Gt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Gt(t){var e=t._i,s=t._f;return t._locale=t._locale||P(t._l),null===e||void 0===s&&""===e?h({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),_(e)?new m(ht(e)):(n(s)?Wt(t):s?bt(t):i(e)?t._d=e:Pt(t),l(t)||(t._d=null),t))}function Pt(e){var r=e._i;void 0===r?e._d=new Date(t.now()):i(r)?e._d=new Date(+r):"string"==typeof r?ft(e):n(r)?(e._a=s(r.slice(0),function(t){return parseInt(t,10)}),kt(e)):"object"==typeof r?xt(e):"number"==typeof r?e._d=new Date(r):t.createFromInputFallback(e)}function Ct(t,e,n,i,s){var r={};return"boolean"==typeof n&&(i=n,n=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=s,r._l=n,r._i=t,r._f=e,r._strict=i,Ut(r)}function Ft(t,e,n,i){return Ct(t,e,n,i,!1)}function Ht(t,e){var i,s;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return Ft();for(i=e[0],s=1;st&&(t=-t,n="-"),n+R(~~(t/60),2)+e+R(~~t%60,2)})}function Rt(t,e){var n=(e||"").match(t)||[],i=n[n.length-1]||[],s=(i+"").match(Xi)||["-",0,0],r=+(60*s[1])+g(s[2]);return"+"===s[0]?r:-r}function Et(e,n){var s,r;return n._isUTC?(s=n.clone(),r=(_(e)||i(e)?+e:+Ft(e))-+s,s._d.setTime(+s._d+r),t.updateOffset(s,!1),s):Ft(e).local()}function jt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function zt(e,n){var i,s=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=Rt(Yi,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(i=jt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!n||this._changeInProgress?ue(this,ne(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:jt(this):null!=e?this:NaN}function Zt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function $t(t){return this.utcOffset(0,t)}function qt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(jt(this),"m")),this}function Jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Rt(Si,this._i)),this}function Bt(t){return this.isValid()?(t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xt(){if(!c(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=Gt(t),t._a){var e=t._isUTC?o(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&p(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Kt(){return this.isValid()?!this._isUTC:!1}function te(){return this.isValid()?this._isUTC:!1}function ee(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ne(t,e){var n,i,s,a=t,o=null;return It(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=Ki.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:g(o[xi])*n,h:g(o[Ui])*n,m:g(o[Gi])*n,s:g(o[Pi])*n,ms:g(o[Ci])*n}):(o=ts.exec(t))?(n="-"===o[1]?-1:1,a={y:ie(o[2],n),M:ie(o[3],n),w:ie(o[4],n),d:ie(o[5],n),h:ie(o[6],n),m:ie(o[7],n),s:ie(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(s=re(Ft(a.from),Ft(a.to)),a={},a.ms=s.milliseconds,a.M=s.months),i=new Nt(a),It(t)&&r(t,"_locale")&&(i._locale=t._locale),i}function ie(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function se(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function re(t,e){var n;return t.isValid()&&e.isValid()?(e=Et(e,t),t.isBefore(e)?n=se(t,e):(n=se(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ae(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function oe(t,e){return function(n,i){var s,r;return null===i||isNaN(+i)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),r=n,n=i,i=r),n="string"==typeof n?+n:n,s=ne(n,i),ue(this,s,t),this}}function ue(e,n,i,s){var r=n._milliseconds,a=ae(n._days),o=ae(n._months);e.isValid()&&(s=null==s?!0:s,r&&e._d.setTime(+e._d+r*i),a&&I(e,"Date",N(e,"Date")+a*i),o&&rt(e,N(e,"Month")+o*i),s&&t.updateOffset(e,a||o))}function de(t,e){var n=t||Ft(),i=Et(n,this).startOf("day"),s=this.diff(i,"days",!0),r=-6>s?"sameElse":-1>s?"lastWeek":0>s?"lastDay":1>s?"sameDay":2>s?"nextDay":7>s?"nextWeek":"sameElse",a=e&&(S(e[r])?e[r]():e[r]);return this.format(a||this.localeData().calendar(r,this,Ft(n)))}function le(){return new m(this)}function he(t,e){var n=_(t)?t:Ft(t);return this.isValid()&&n.isValid()?(e=H(c(e)?"millisecond":e),"millisecond"===e?+this>+n:+n<+this.clone().startOf(e)):!1}function ce(t,e){var n=_(t)?t:Ft(t);return this.isValid()&&n.isValid()?(e=H(c(e)?"millisecond":e),"millisecond"===e?+n>+this:+this.clone().endOf(e)<+n):!1}function fe(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function me(t,e){var n,i=_(t)?t:Ft(t);return this.isValid()&&i.isValid()?(e=H(e||"millisecond"),"millisecond"===e?+this===+i:(n=+i,+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))):!1}function _e(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ye(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function ge(t,e,n){var i,s,r,a;return this.isValid()?(i=Et(t,this),i.isValid()?(s=6e4*(i.utcOffset()-this.utcOffset()),e=H(e),"year"===e||"month"===e||"quarter"===e?(a=pe(this,i),"quarter"===e?a/=3:"year"===e&&(a/=12)):(r=this-i,a="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-s)/864e5:"week"===e?(r-s)/6048e5:r),n?a:y(a)):NaN):NaN}function pe(t,e){var n,i,s=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(s,"months");return 0>e-r?(n=t.clone().add(s-1,"months"),i=(e-r)/(r-n)):(n=t.clone().add(s+1,"months"),i=(e-r)/(n-r)),-(s+i)}function ve(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function De(){var t=this.clone().utc();return 0r&&(e=r),Ze.call(this,t,e,n,i,s))}function Ze(t,e,n,i,s){var r=Dt(t,e,n,i,s),a=_t(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function $e(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function qe(t){return Mt(t,this._week.dow,this._week.doy).week}function Je(){return this._week.dow}function Be(){return this._week.doy}function Qe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Xe(t){var e=Mt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ke(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function tn(t,e){return n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function en(t){return this._weekdaysShort[t.day()]}function nn(t){return this._weekdaysMin[t.day()]}function sn(t,e,n){var i,s,r;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;7>i;i++){if(s=Ft([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(s,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(s,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(s,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function rn(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ke(t,this.localeData()),this.add(t-e,"d")):e}function an(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function on(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function un(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function dn(){return this.hours()%12||12}function ln(t,e){E(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function hn(t,e){return e._meridiemParse}function cn(t){return"p"===(t+"").toLowerCase().charAt(0)}function fn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function mn(t,e){e[Ci]=g(1e3*("0."+t))}function _n(){return this._isUTC?"UTC":""}function yn(){return this._isUTC?"Coordinated Universal Time":""}function gn(t){return Ft(1e3*t)}function pn(){return Ft.apply(null,arguments).parseZone()}function vn(t,e,n){var i=this._calendar[t];return S(i)?i.call(e,n):i}function Dn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Mn(){return this._invalidDate}function Sn(t){return this._ordinal.replace("%d",t)}function Yn(t){return t}function wn(t,e,n,i){var s=this._relativeTime[n];return S(s)?s(t,e,n,i):s.replace(/%d/i,t)}function kn(t,e){var n=this._relativeTime[t>0?"future":"past"];return S(n)?n(e):n.replace(/%s/i,e)}function Tn(t,e,n,i){var s=P(),r=o().set(i,e);return s[n](r,t)}function bn(t,e,n,i,s){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Tn(t,e,n,s);var r,a=[];for(r=0;i>r;r++)a[r]=Tn(t,r,n,s);return a}function On(t,e){return bn(t,e,"months",12,"month")}function Wn(t,e){return bn(t,e,"monthsShort",12,"month")}function xn(t,e){return bn(t,e,"weekdays",7,"day")}function Un(t,e){return bn(t,e,"weekdaysShort",7,"day")}function Gn(t,e){return bn(t,e,"weekdaysMin",7,"day")}function Pn(){var t=this._data;return this._milliseconds=ws(this._milliseconds),this._days=ws(this._days),this._months=ws(this._months),t.milliseconds=ws(t.milliseconds),t.seconds=ws(t.seconds),t.minutes=ws(t.minutes),t.hours=ws(t.hours),t.months=ws(t.months),t.years=ws(t.years),this}function Cn(t,e,n,i){var s=ne(e,n);return t._milliseconds+=i*s._milliseconds,t._days+=i*s._days,t._months+=i*s._months,t._bubble()}function Fn(t,e){return Cn(this,t,e,1)}function Hn(t,e){return Cn(this,t,e,-1)}function Ln(t){return 0>t?Math.floor(t):Math.ceil(t)}function Vn(){var t,e,n,i,s,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||0>=r&&0>=a&&0>=o||(r+=864e5*Ln(In(o)+a),a=0,o=0),u.milliseconds=r%1e3,t=y(r/1e3),u.seconds=t%60,e=y(t/60),u.minutes=e%60,n=y(e/60),u.hours=n%24,a+=y(n/24),s=y(Nn(a)),o+=s,a-=Ln(In(s)),i=y(o/12),o%=12,u.days=a,u.months=o,u.years=i,this}function Nn(t){return 4800*t/146097}function In(t){return 146097*t/4800}function An(t){var e,n,i=this._milliseconds;if(t=H(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+Nn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(In(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function Rn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12)}function En(t){return function(){return this.as(t)}}function jn(t){return t=H(t),this[t+"s"]()}function zn(t){return function(){return this._data[t]}}function Zn(){return y(this.days()/7)}function $n(t,e,n,i,s){return s.relativeTime(e||1,!!n,t,i)}function qn(t,e,n){var i=ne(t).abs(),s=Is(i.as("s")),r=Is(i.as("m")),a=Is(i.as("h")),o=Is(i.as("d")),u=Is(i.as("M")),d=Is(i.as("y")),l=s=r&&["m"]||r=a&&["h"]||a=o&&["d"]||o=u&&["M"]||u=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=n,$n.apply(null,l)}function Jn(t,e){return void 0===As[t]?!1:void 0===e?As[t]:(As[t]=e,!0)}function Bn(t){var e=this.localeData(),n=qn(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Qn(){var t,e,n,i=Rs(this._milliseconds)/1e3,s=Rs(this._days),r=Rs(this._months);t=y(i/60),e=y(t/60),i%=60,t%=60,n=y(r/12),r%=12;var a=n,o=r,u=s,d=e,l=t,h=i,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(a?a+"Y":"")+(o?o+"M":"")+(u?u+"D":"")+(d||l||h?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(h?h+"S":""):"P0D"}var Xn,Kn=t.momentProperties=[],ti=!1,ei={};t.suppressDeprecationWarnings=!1;var ni,ii={},si={},ri=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ai=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,oi={},ui={},di=/\d/,li=/\d\d/,hi=/\d{3}/,ci=/\d{4}/,fi=/[+-]?\d{6}/,mi=/\d\d?/,_i=/\d\d\d\d?/,yi=/\d\d\d\d\d\d?/,gi=/\d{1,3}/,pi=/\d{1,4}/,vi=/[+-]?\d{1,6}/,Di=/\d+/,Mi=/[+-]?\d+/,Si=/Z|[+-]\d\d:?\d\d/gi,Yi=/Z|[+-]\d\d(?::?\d\d)?/gi,wi=/[+-]?\d+(\.\d{1,3})?/,ki=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ti={},bi={},Oi=0,Wi=1,xi=2,Ui=3,Gi=4,Pi=5,Ci=6,Fi=7,Hi=8;E("M",["MM",2],"Mo",function(){return this.month()+1}),E("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),E("MMMM",0,0,function(t){return this.localeData().months(this,t)}),F("month","M"),q("M",mi),q("MM",mi,li),q("MMM",function(t,e){return e.monthsShortRegex(t)}),q("MMMM",function(t,e){return e.monthsRegex(t)}),X(["M","MM"],function(t,e){e[Wi]=g(t)-1}),X(["MMM","MMMM"],function(t,e,n,i){var s=n._locale.monthsParse(t,i,n._strict);null!=s?e[Wi]=s:d(n).invalidMonth=t});var Li=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Vi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ni="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ii=ki,Ai=ki,Ri=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ei=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ji=/Z|[+-]\d\d(?::?\d\d)?/,zi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Zi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],$i=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=D("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),E("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),E(0,["YY",2],0,function(){return this.year()%100}),E(0,["YYYY",4],0,"year"),E(0,["YYYYY",5],0,"year"),E(0,["YYYYYY",6,!0],0,"year"),F("year","y"),q("Y",Mi),q("YY",mi,li),q("YYYY",pi,ci),q("YYYYY",vi,fi),q("YYYYYY",vi,fi),X(["YYYYY","YYYYYY"],Oi),X("YYYY",function(e,n){n[Oi]=2===e.length?t.parseTwoDigitYear(e):g(e);}),X("YY",function(e,n){n[Oi]=t.parseTwoDigitYear(e)}),X("Y",function(t,e){e[Oi]=parseInt(t,10)}),t.parseTwoDigitYear=function(t){return g(t)+(g(t)>68?1900:2e3)};var qi=V("FullYear",!1);t.ISO_8601=function(){};var Ji=D("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:h()}),Bi=D("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:h()}),Qi=function(){return Date.now?Date.now():+new Date};At("Z",":"),At("ZZ",""),q("Z",Yi),q("ZZ",Yi),X(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Rt(Yi,t)});var Xi=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Ki=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,ts=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;ne.fn=Nt.prototype;var es=oe(1,"add"),ns=oe(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var is=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});E(0,["gg",2],0,function(){return this.weekYear()%100}),E(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ie("gggg","weekYear"),Ie("ggggg","weekYear"),Ie("GGGG","isoWeekYear"),Ie("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),q("G",Mi),q("g",Mi),q("GG",mi,li),q("gg",mi,li),q("GGGG",pi,ci),q("gggg",pi,ci),q("GGGGG",vi,fi),q("ggggg",vi,fi),K(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=g(t)}),K(["gg","GG"],function(e,n,i,s){n[s]=t.parseTwoDigitYear(e)}),E("Q",0,"Qo","quarter"),F("quarter","Q"),q("Q",di),X("Q",function(t,e){e[Wi]=3*(g(t)-1)}),E("w",["ww",2],"wo","week"),E("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),q("w",mi),q("ww",mi,li),q("W",mi),q("WW",mi,li),K(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=g(t)});var ss={dow:0,doy:6};E("D",["DD",2],"Do","date"),F("date","D"),q("D",mi),q("DD",mi,li),q("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),X(["D","DD"],xi),X("Do",function(t,e){e[xi]=g(t.match(mi)[0],10)});var rs=V("Date",!0);E("d",0,"do","day"),E("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),E("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),E("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),E("e",0,0,"weekday"),E("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),q("d",mi),q("e",mi),q("E",mi),q("dd",ki),q("ddd",ki),q("dddd",ki),K(["dd","ddd","dddd"],function(t,e,n,i){var s=n._locale.weekdaysParse(t,i,n._strict);null!=s?e.d=s:d(n).invalidWeekday=t}),K(["d","e","E"],function(t,e,n,i){e[i]=g(t)});var as="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),os="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),us="Su_Mo_Tu_We_Th_Fr_Sa".split("_");E("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),q("DDD",gi),q("DDDD",hi),X(["DDD","DDDD"],function(t,e,n){n._dayOfYear=g(t)}),E("H",["HH",2],0,"hour"),E("h",["hh",2],0,dn),E("hmm",0,0,function(){return""+dn.apply(this)+R(this.minutes(),2)}),E("hmmss",0,0,function(){return""+dn.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)}),E("Hmm",0,0,function(){return""+this.hours()+R(this.minutes(),2)}),E("Hmmss",0,0,function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)}),ln("a",!0),ln("A",!1),F("hour","h"),q("a",hn),q("A",hn),q("H",mi),q("h",mi),q("HH",mi,li),q("hh",mi,li),q("hmm",_i),q("hmmss",yi),q("Hmm",_i),q("Hmmss",yi),X(["H","HH"],Ui),X(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),X(["h","hh"],function(t,e,n){e[Ui]=g(t),d(n).bigHour=!0}),X("hmm",function(t,e,n){var i=t.length-2;e[Ui]=g(t.substr(0,i)),e[Gi]=g(t.substr(i)),d(n).bigHour=!0}),X("hmmss",function(t,e,n){var i=t.length-4,s=t.length-2;e[Ui]=g(t.substr(0,i)),e[Gi]=g(t.substr(i,2)),e[Pi]=g(t.substr(s)),d(n).bigHour=!0}),X("Hmm",function(t,e,n){var i=t.length-2;e[Ui]=g(t.substr(0,i)),e[Gi]=g(t.substr(i))}),X("Hmmss",function(t,e,n){var i=t.length-4,s=t.length-2;e[Ui]=g(t.substr(0,i)),e[Gi]=g(t.substr(i,2)),e[Pi]=g(t.substr(s))});var ds=/[ap]\.?m?\.?/i,ls=V("Hours",!0);E("m",["mm",2],0,"minute"),F("minute","m"),q("m",mi),q("mm",mi,li),X(["m","mm"],Gi);var hs=V("Minutes",!1);E("s",["ss",2],0,"second"),F("second","s"),q("s",mi),q("ss",mi,li),X(["s","ss"],Pi);var cs=V("Seconds",!1);E("S",0,0,function(){return~~(this.millisecond()/100)}),E(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),E(0,["SSS",3],0,"millisecond"),E(0,["SSSS",4],0,function(){return 10*this.millisecond()}),E(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),E(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),E(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),E(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),E(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),q("S",gi,di),q("SS",gi,li),q("SSS",gi,hi);var fs;for(fs="SSSS";fs.length<=9;fs+="S")q(fs,Di);for(fs="S";fs.length<=9;fs+="S")X(fs,mn);var ms=V("Milliseconds",!1);E("z",0,0,"zoneAbbr"),E("zz",0,0,"zoneName");var _s=m.prototype;_s.add=es,_s.calendar=de,_s.clone=le,_s.diff=ge,_s.endOf=We,_s.format=Me,_s.from=Se,_s.fromNow=Ye,_s.to=we,_s.toNow=ke,_s.get=A,_s.invalidAt=Ve,_s.isAfter=he,_s.isBefore=ce,_s.isBetween=fe,_s.isSame=me,_s.isSameOrAfter=_e,_s.isSameOrBefore=ye,_s.isValid=He,_s.lang=is,_s.locale=Te,_s.localeData=be,_s.max=Bi,_s.min=Ji,_s.parsingFlags=Le,_s.set=A,_s.startOf=Oe,_s.subtract=ns,_s.toArray=Pe,_s.toObject=Ce,_s.toDate=Ge,_s.toISOString=De,_s.toJSON=Fe,_s.toString=ve,_s.unix=Ue,_s.valueOf=xe,_s.creationData=Ne,_s.year=qi,_s.isLeapYear=pt,_s.weekYear=Ae,_s.isoWeekYear=Re,_s.quarter=_s.quarters=$e,_s.month=at,_s.daysInMonth=ot,_s.week=_s.weeks=Qe,_s.isoWeek=_s.isoWeeks=Xe,_s.weeksInYear=je,_s.isoWeeksInYear=Ee,_s.date=rs,_s.day=_s.days=rn,_s.weekday=an,_s.isoWeekday=on,_s.dayOfYear=un,_s.hour=_s.hours=ls,_s.minute=_s.minutes=hs,_s.second=_s.seconds=cs,_s.millisecond=_s.milliseconds=ms,_s.utcOffset=zt,_s.utc=$t,_s.local=qt,_s.parseZone=Jt,_s.hasAlignedHourOffset=Bt,_s.isDST=Qt,_s.isDSTShifted=Xt,_s.isLocal=Kt,_s.isUtcOffset=te,_s.isUtc=ee,_s.isUTC=ee,_s.zoneAbbr=_n,_s.zoneName=yn,_s.dates=D("dates accessor is deprecated. Use date instead.",rs),_s.months=D("months accessor is deprecated. Use month instead",at),_s.years=D("years accessor is deprecated. Use year instead",qi),_s.zone=D("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Zt);var ys=_s,gs={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ps={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},vs="Invalid date",Ds="%d",Ms=/\d{1,2}/,Ss={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ys=T.prototype;Ys._calendar=gs,Ys.calendar=vn,Ys._longDateFormat=ps,Ys.longDateFormat=Dn,Ys._invalidDate=vs,Ys.invalidDate=Mn,Ys._ordinal=Ds,Ys.ordinal=Sn,Ys._ordinalParse=Ms,Ys.preparse=Yn,Ys.postformat=Yn,Ys._relativeTime=Ss,Ys.relativeTime=wn,Ys.pastFuture=kn,Ys.set=w,Ys.months=nt,Ys._months=Vi,Ys.monthsShort=it,Ys._monthsShort=Ni,Ys.monthsParse=st,Ys._monthsRegex=Ai,Ys.monthsRegex=dt,Ys._monthsShortRegex=Ii,Ys.monthsShortRegex=ut,Ys.week=qe,Ys._week=ss,Ys.firstDayOfYear=Be,Ys.firstDayOfWeek=Je,Ys.weekdays=tn,Ys._weekdays=as,Ys.weekdaysMin=nn,Ys._weekdaysMin=us,Ys.weekdaysShort=en,Ys._weekdaysShort=os,Ys.weekdaysParse=sn,Ys.isPM=cn,Ys._meridiemParse=ds,Ys.meridiem=fn,x("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===g(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=D("moment.lang is deprecated. Use moment.locale instead.",x),t.langData=D("moment.langData is deprecated. Use moment.localeData instead.",P);var ws=Math.abs,ks=En("ms"),Ts=En("s"),bs=En("m"),Os=En("h"),Ws=En("d"),xs=En("w"),Us=En("M"),Gs=En("y"),Ps=zn("milliseconds"),Cs=zn("seconds"),Fs=zn("minutes"),Hs=zn("hours"),Ls=zn("days"),Vs=zn("months"),Ns=zn("years"),Is=Math.round,As={s:45,m:45,h:22,d:26,M:11},Rs=Math.abs,Es=Nt.prototype;Es.abs=Pn,Es.add=Fn,Es.subtract=Hn,Es.as=An,Es.asMilliseconds=ks,Es.asSeconds=Ts,Es.asMinutes=bs,Es.asHours=Os,Es.asDays=Ws,Es.asWeeks=xs,Es.asMonths=Us,Es.asYears=Gs,Es.valueOf=Rn,Es._bubble=Vn,Es.get=jn,Es.milliseconds=Ps,Es.seconds=Cs,Es.minutes=Fs,Es.hours=Hs,Es.days=Ls,Es.weeks=Zn,Es.months=Vs,Es.years=Ns,Es.humanize=Bn,Es.toISOString=Qn,Es.toString=Qn,Es.toJSON=Qn,Es.locale=Te,Es.localeData=be,Es.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),Es.lang=is,E("X",0,0,"unix"),E("x",0,0,"valueOf"),q("x",Mi),q("X",wi),X("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),X("x",function(t,e,n){n._d=new Date(g(t))}),t.version="2.12.0",e(Ft),t.fn=ys,t.min=Lt,t.max=Vt,t.now=Qi,t.utc=o,t.unix=gn,t.months=On,t.isDate=i,t.locale=x,t.invalid=h,t.duration=ne,t.isMoment=_,t.weekdays=xn,t.parseZone=pn,t.localeData=P,t.isDuration=It,t.monthsShort=Wn,t.weekdaysMin=Gn,t.defineLocale=U,t.updateLocale=G,t.locales=C,t.weekdaysShort=Un,t.normalizeUnits=H,t.relativeTimeThreshold=Jn,t.prototype=ys;var js=t;return js}); + + +/** + * @module Slick + * @author Ken Wheeler + * @see http://kenwheeler.github.io/slick + * @version 1.6.0 + */ +!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('__N__ logo_squarred ? $mysoc->logo_squarred : $mysoc->logo, \'_small\') ?>\" alt=\"\" height=\"34\">__N__
    __N__
    __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 189 -> 11__+MAX_llx_website_page__ - Aliases home --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(11__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'home', '', 'Home', 'Welcome', 'en', '', '', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N__ __N__ __N__ __N____N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Boost your business__N__
    __N__
    __N__

    We provide powerful solutions for all businesses

    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
     Best prices on the market __N__
    __N__
    __N__

    Our optimized processes allows us to provide you very competitive prices

    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N____N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    A competent team

    __N__
    __N__
    __N__
    __N__

    Our sales representative are also technicians.

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__

    Take a look at our offers...

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__

    Our customer-supplier relationship is very appreciated by our customers

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    After Sale service

    __N__
    __N__
    __N__
    __N__

    We continue to follow and assist you after the sale. Contact us at any time.

    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__ __N__
    __N__
    __N__

    Looking for

    __N__

    a high quality service?

    __N__

    With a lot of experience, hiring us is a security for your business!

    __N__
    __N__
    __N__
    11
    __N__
    Years of Experience
    __N__
    __N__
    __N__
    __N__ query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>__N__
    __N__
    Experts
    __N__
    __N__
    __N__
    __N__ query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>__N__
    __N__
    Trusted Clients
    __N__
    __N__
    __N__
    __N__
    Contact us__N__   or  __N__ See our pricing
    __N__
    __N__
    __N__
    __N____N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N__

    our plans

    __N____N__ __N__
    __N__ __N__
    __N__
    __N__
    __N__
    FREE
    __N__
    The best choice for personal use
    __N__
    The service 1 for free
    __N__
    __N__ 0/ month__N__
    __N__
    __N__ Available features are : __N__
      __N__
    • __N__ __N__ Service 1 __N__
    • __N__
    __N__
    __N__
    __N__ Subcribe__N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    STARTER
    __N__
    For small companiess
    __N__
    The service 1 and product 1 at low price
    __N__
    __N__ 29/ month__N__
    __N__
    __N__ Available features are : __N__
      __N__
    • __N__ __N__ Service 1__N__
    • __N__
    • __N__ __N__ Product 1__N__
    • __N__
    __N__
    __N__
    __N__ Subscribe__N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    PREMIUM
    __N__
    For large companies
    __N__
    The full option package for a one shot price__N__
    __N__
    __N__ 2499__N__
    __N__
    __N__ Available features are :__N__
      __N__
    • __N__ __N__ Service 1
    • __N__
    • __N__ __N__ Service 2
    • __N__
    • __N__ __N__ Product 1
    • __N__
    __N__
    __N__
    __N__ Buy__N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__

    our team

    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N____N____N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Request a callback

    __N__
    __N__
    __N__ __N__
    __N__
    __N__ __N__
    __N__
    __N__ __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    successful cases

    __N__
    __N__
    __N__
    __N__
    __N__
    \"\"__N__
    __N__
    __N__
    __N__
    \"\"__N__
    __N__
    __N__
    __N__
    \"\"__N__
    __N__
    __N__
    __N__
    \"\"__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ Albert Einstein__N__
    __N__
    Scientist, www.emc2.org
    __N__
    __N__
    __N__
    __N__
    __N__
    -20%
    __N__
    Expenses
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__ They did everything, with almost no time or effort for me. The best part was that I could trust their team to represent our company professionally with our clients.__N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ Pierre Curie__N__
    __N__
    CEO “Cyclonic”
    __N__
    __N__
    __N__
    __N__
    __N__
    -30%
    __N__
    Expenses
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__ Their course gave me the confidence to implement new techniques in my work. I learn “how” to write – “what” and “why” also became much clearer.__N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ Marie Curie__N__
    __N__
    CTO \"Cyclonic\"
    __N__
    __N__
    __N__
    __N__
    __N__
    +22%
    __N__
    Turnover
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__ We were skeptical to work with a consultant to optimize our sales emails, but they were highly recommended by many other startups we knew. They helped us to reach our objective of 20% turnover increase, in 4 monthes.__N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ John Doe__N__
    __N__
    Sale representative
    __N__
    __N__
    __N__
    __N__
    __N__
    +40%
    __N__
    Quotes
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__ Their work on our website and Internet marketing has made a significant different to our business. We’ve seen a +40% increase in quote requests from our website.__N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N____N__ __N__
    __N__
    __N__

    Latest News

    __N__ __N__
    __N__
    __N____N____N__ __N____N____N__
    __N__', '', 0); +UPDATE llx_website SET fk_default_home = 11__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 190 -> 12__+MAX_llx_website_page__ - Aliases our-team --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(12__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'our-team', '', 'Our team', 'Our team', 'en', '', 'team', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Our team__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__
    __N__

    __N__

    The crew...




    __N__ query($sql);__N__ if (! $resql) dol_print_error($db);__N__ while ($obj = $db->fetch_object($resql))__N__ {__N__ $arrayofusers[]=$obj->rowid;__N__ }__N__ __N__ print \'
    \';__N__ foreach($arrayofusers as $id)__N__ {__N__ $fuser->fetch($id);__N____N__ print \'
    \';__N__ print \'
    \';__N__ print \'
    \';__N__ if ($fuser->photo) print Form::showphoto(\'userphoto\', $fuser, 100, 0, 0, \'photowithmargin\', \'\', 0);__N__ //print \'photo.\'\" width=\"129\" height=\"129\" alt=\"\">\';__N__ else print \'\"\"\';__N__ print \'
    \';__N__ print \'
    \';__N__ print \'
    \'.$fuser->firstname.\'
    \';__N__ print \'
      \';__N__ //print \'
    • September 24, 2018
    • \';__N__ if ($fuser->job) print \'
    • \'.$fuser->job.\'
    • \';__N__ else print \'
    • \';__N__ print \'
    \';__N__ print \'
    \';__N__ print \'
    \';__N__ print \'
    \';__N__ }__N__ print \'
    \';__N____N__ ?>__N__
    __N__
    __N____N__

    __N____N__ __N____N__
    __N__ __N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 191 -> 13__+MAX_llx_website_page__ - Aliases partners --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(13__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'partners', '', 'Partners', 'Partners', 'en', '', 'partners', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Partners__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__
    __N__
    __N__

    Our partners...

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__

    __N____N__ __N____N__
    __N__ __N____N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 192 -> 14__+MAX_llx_website_page__ - Aliases pricing --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(14__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'pricing', '', 'Pricing', 'All the prices of our offers', 'en', '', 'pricing', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Our plans__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N____N____N__ __N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N____N__ __N__
    __N__ __N__
    __N__
    __N__
    __N__
    FREE
    __N__
    The best choice for personal use
    __N__
    The service 1 for free
    __N__
    __N__ 0/ month__N__
    __N__
    __N__ Available features are : __N__
      __N__
    • __N__ __N__ Service 1 __N__
    • __N__
    __N__
    __N__
    __N__ Subcribe__N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    STARTER
    __N__
    For small companiess
    __N__
    The service 1 and product 1 at low price
    __N__
    __N__ 29/ month__N__
    __N__
    __N__ Available features are : __N__
      __N__
    • __N__ __N__ Service 1__N__
    • __N__
    • __N__ __N__ Product 1__N__
    • __N__
    __N__
    __N__
    __N__ Subscribe__N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    PREMIUM
    __N__
    For large companies
    __N__
    The full option package for a one shot price__N__
    __N__
    __N__ 2499__N__
    __N__
    __N__ Available features are :__N__
      __N__
    • __N__ __N__ Service 1
    • __N__
    • __N__ __N__ Service 2
    • __N__
    • __N__ __N__ Product 1
    • __N__
    __N__
    __N__
    __N__ Buy__N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N__ __N__

    __N____N__ __N____N__
    __N__ __N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 193 -> 15__+MAX_llx_website_page__ - Aliases privacy-policies --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(15__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'privacy-policies', '', 'Privacy Policies', 'Privacy Policies', 'en', '', 'Privacy policies, GDPR', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N__ __N__ __N__ __N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Privacy Policy__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N__


    __N____N__
    __N__
    __N__

    Information collected and used


    __N__

    * Your customer information (email, phone, business name, first and last name of contact, address, postal code, country and VAT number) are stored when you become a customer. This information allows us to bill you. __N__

    * If you paid using our online service, we also store the last 4 digits of your card. The full details of your credit card is stored by our payment provider Stripe (the world leader in online payment).

    __N__

    * You have the option to request the deletion of your data and the above information at any time (except data required y fiscal tracking rules, like your invoices).

    __N__

    * The Privacy Policies and GDPR referral contact for our services is: global->MAIN_INFO_GDPR; ?>

    __N__


    __N__

    Data Storage and Backups


    __N__

    * The storage of collected data (see \'Information collected and used\') is done in a database.

    __N__

    * We made one backup every week. Only 4 weeks are kept.

    __N__


    __N__

    Subcontractor


    __N__

    * Our services relies on the following subcontractors and service:
    __N__** The host of computer servers, which is ABC company. These servers are hosted in US. No customer information is communicated to this subcontractor who only provides the hardware and network layer, the installation and operation being carried out by us directly.
    __N__** The online payment service Stripe, which is used, to ensure regular payment of subscription or your invoices paid online.

    __N__


    __N__

    Software Protection


    __N__

    * Our services runs on Linux Ubuntu systems and software. They benefit from regular security updates when the operating system editor (Ubuntu Canonical) publishes them.

    __N__

    * Our services are accessible in HTTPS (HTTP encrypted) only, encrypted with SHA256 certificates.

    __N__

    * Our technical platform are protected by various solutions.

    __N__


    __N__

    Data theft


    __N__

    * In case of suspicion of a theft of the data we have collected (see first point \'Information collected and used\'), customers will be informed by email, at email corresponding to their customer account

    __N__

     

    __N__
    __N__
    __N____N____N__ __N__ __N__ __N__
    __N__ __N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 194 -> 16__+MAX_llx_website_page__ - Aliases product-p --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(16__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'product-p', '', 'Product P', 'Product P', 'en', '', '', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Product P__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__This is a description page of our product P...
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__

    __N____N__ __N____N__
    __N__ __N____N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 195 -> 17__+MAX_llx_website_page__ - Aliases search --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(17__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'search', '', 'Search Page', 'Search Page', 'en', '', '', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Search__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N__


    __N____N__
    __N__ __N__
    __N__
    __N__ \" />__N__
    __N__ \">__N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__ load(\"main\");__N__ __N__ if (function_exists(\'getPagesFromSearchCriterias\'))__N__ {__N__ if (GETPOSTISSET(\'s\'))__N__ {__N__ $listofpages = getPagesFromSearchCriterias(\'page\', \'meta\', GETPOST(\'s\', \'alphanohtml\'));__N__ if ($listofpages[\'code\'] == \'OK\')__N__ {__N__ foreach($listofpages[\'list\'] as $websitepagefound)__N__ {__N__ print \'
    ref.\'.php\">\'.$websitepagefound->title.\' - \'.$websitepagefound->description.\'
    \';__N__ }__N__ }__N__ else__N__ {__N__ // If error, show message__N__ print $listofpages[\'message\'];__N__ }__N__ }__N__ }__N__ else__N__ {__N__ print $weblangs->trans(\"FeatureNotYetAvailable\");__N__ }__N__ ?>__N__ __N__





    __N__
    __N____N__ __N____N__
    __N__', '', 0); +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-08 18:23:16 UTC --; +-- Page ID 196 -> 18__+MAX_llx_website_page__ - Aliases service-s --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(18__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'service-s', '', 'Service S', 'Service S', 'en', '', '', '1', '2020-10-07 13:13:26', '2022-07-12 11:17:55', null, '', 'page', '', '
    __N____N__ __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    Service S__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__This is a description page of our service S...
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__

    __N____N__ __N____N__
    __N__', '', 0); + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu.jpg b/htdocs/install/doctemplates/websites/website_template-homesubmenu.jpg new file mode 100644 index 00000000000..1479f08b5d9 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-homesubmenu.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/LICENSE b/htdocs/install/doctemplates/websites/website_template-homesubmenu/LICENSE new file mode 100644 index 00000000000..871ef743662 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/LICENSE @@ -0,0 +1,4 @@ +LICENSE +------- + +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/README.md b/htdocs/install/doctemplates/websites/website_template-homesubmenu/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/LICENSE b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/LICENSE new file mode 100644 index 00000000000..6ee68185103 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/LICENSE @@ -0,0 +1 @@ +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/README.md b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/htmlheader.html new file mode 100644 index 00000000000..0de0b36283f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/htmlheader.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/index.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/index.php new file mode 100644 index 00000000000..967c5deb878 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/index.php @@ -0,0 +1,5 @@ +ref.'/page202.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/javascript.js.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/javascript.js.php new file mode 100644 index 00000000000..f58102cf00b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/javascript.js.php @@ -0,0 +1,13 @@ + +/* JS content (all pages) */ + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/manifest.json.php new file mode 100644 index 00000000000..8f844114e48 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/manifest.json.php @@ -0,0 +1,13 @@ + + + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/master.inc.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/master.inc.php new file mode 100644 index 00000000000..bd25ba5895d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/master.inc.php @@ -0,0 +1,7 @@ + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/page202.tpl.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/page202.tpl.php new file mode 100644 index 00000000000..f0c564c2d61 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/page202.tpl.php @@ -0,0 +1,315 @@ + + + +Home page + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +email; + $message = GETPOST('message', 'alpha'); + $cmail = new CMailFile('Contact from website', $to, $from, $message); + if ($cmail->sendfile()) { + ?> + + trans("ErrorFailedToSendMail", $from, $to).'. '.$cmail->error; + } +} +?> +
    + + +
    +
    +
    +
    +

    Get Productive

    +

    + Lorem ipsum dolor, sit amet consectetur adipisicing + elit. Ab fuga nobis omnis alias, aliquid iste cumque + tempora nam reprehenderit quia itaque debitis, + nostrum labore rerum reiciendis laboriosam unde, + tempore corporis. +

    + landing-img +
    + + Learn More + +
    +
    +
    +
    +
    +
    +
    +

    + LOREM IPSUM DOLOR SIT AMET EZAJB +

    + article +
    +
    +

    Our Company

    +

    + Lorem ipsum dolor, sit amet consectetur adipisicing + elit. Ab fuga nobis omnis alias, aliquid iste cumque + tempora nam reprehenderit quia itaque debitis, + nostrum labore rerum reiciendis laboriosam unde, + tempore corporis. +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    Founders

    +
      +
    • +

      Author One

      +
    • +
    • +

      Author Two

      +
    • +
    • +

      Author Three

      +
    • +
    • +

      Author Four

      +
    • +
    +
    +
    +

    About

    +

    + Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis accusantium earum sed odit velit laudantium ex libero quisquam consectetur, + dolorem vero ipsam perferendis quibusdam itaque omnis a consequatur error repellat. +

    +
    +
    +
    +
    + +
    +

    Contact us

    + +

    Do you have any questions? Please do not hesitate to contact us directly. Our team will come back to you within + a matter of hours to help you.

    + +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
      +
    • +

      getFullAddress() ?>

      +
    • + +
    • +

      phone ?>

      +
    • + +
    • +

      email ?>

      +
    • +
    +
    + +
    + + +
    +
    + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/styles.css.php new file mode 100644 index 00000000000..d194541d6ea --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/styles.css.php @@ -0,0 +1,12508 @@ + +@charset "UTF-8"; + +.bodywebsite :root { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg-rgb: 255, 255, 255; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #0d6efd; + --bs-link-hover-color: #0a58ca; + --bs-code-color: #d63384; + --bs-highlight-bg: #fff3cd; +} + +.bodywebsite *, + .bodywebsite *::before, + .bodywebsite *::after { + box-sizing: border-box; +} + +.bodywebsite .text-white{ + color: white; +} + +@media (prefers-reduced-motion: no-preference) { + .bodywebsite :root { + scroll-behavior: smooth; + } +} + +.bodywebsite body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} + +.bodywebsite hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} + +.bodywebsite h6, .bodywebsite .h6, .bodywebsite h5, .bodywebsite .h5, .bodywebsite h4, .bodywebsite .h4, .bodywebsite h3, .bodywebsite .h3, .bodywebsite h2, .bodywebsite .h2, .bodywebsite h1, .bodywebsite .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +.bodywebsite h1, .bodywebsite .h1 { + font-size: calc(1.375rem + 1.5vw); +} + +@media (min-width: 1200px) { + .bodywebsite h1, .bodywebsite .h1 { + font-size: 2.5rem; + } +} + +.bodywebsite h2, .bodywebsite .h2 { + font-size: calc(1.325rem + 0.9vw); +} + +@media (min-width: 1200px) { + .bodywebsite h2, .bodywebsite .h2 { + font-size: 2rem; + } +} + +.bodywebsite h3, .bodywebsite .h3 { + font-size: calc(1.3rem + 0.6vw); +} + +@media (min-width: 1200px) { + .bodywebsite h3, .bodywebsite .h3 { + font-size: 1.75rem; + } +} + +.bodywebsite h4, .bodywebsite .h4 { + font-size: calc(1.275rem + 0.3vw); +} + +@media (min-width: 1200px) { + .bodywebsite h4, .bodywebsite .h4 { + font-size: 1.5rem; + } +} + +.bodywebsite h5, .bodywebsite .h5 { + font-size: 1.25rem; +} + +.bodywebsite h6, .bodywebsite .h6 { + font-size: 1rem; +} + +.bodywebsite p { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +.bodywebsite address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +.bodywebsite ol, + .bodywebsite ul { + padding-left: 2rem; +} + +.bodywebsite ol, + .bodywebsite ul, + .bodywebsite dl { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite ol ol, + .bodywebsite ul ul, + .bodywebsite ol ul, + .bodywebsite ul ol { + margin-bottom: 0; +} + +.bodywebsite dt { + font-weight: 700; +} + +.bodywebsite dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +.bodywebsite blockquote { + margin: 0 0 1rem; +} + +.bodywebsite b, + .bodywebsite strong { + font-weight: bolder; +} + +.bodywebsite small, .bodywebsite .small { + font-size: 0.875em; +} + +.bodywebsite mark, .bodywebsite .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +.bodywebsite sub, + .bodywebsite sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +.bodywebsite sub { + bottom: -0.25em; +} + +.bodywebsite sup { + top: -0.5em; +} + +.bodywebsite a { + color: var(--bs-link-color); + text-decoration: underline; +} + +.bodywebsite a:hover { + color: var(--bs-link-hover-color); +} + +.bodywebsite a:not([href]):not([class]), .bodywebsite a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +.bodywebsite pre, + .bodywebsite code, + .bodywebsite kbd, + .bodywebsite samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +.bodywebsite pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} + +.bodywebsite pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +.bodywebsite code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} + +.bodywebsite a > code { + color: inherit; +} + +.bodywebsite kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} + +.bodywebsite kbd kbd { + padding: 0; + font-size: 1em; +} + +.bodywebsite figure { + margin: 0 0 1rem; +} + +.bodywebsite img, + .bodywebsite svg { + vertical-align: middle; +} + +.bodywebsite table { + caption-side: bottom; + border-collapse: collapse; +} + +.bodywebsite caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +.bodywebsite th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +.bodywebsite thead, + .bodywebsite tbody, + .bodywebsite tfoot, + .bodywebsite tr, + .bodywebsite td, + .bodywebsite th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +.bodywebsite label { + display: inline-block; +} + +.bodywebsite button { + border-radius: 0; +} + +.bodywebsite button:focus:not(:focus-visible) { + outline: 0; +} + +.bodywebsite input, + .bodywebsite button, + .bodywebsite select, + .bodywebsite optgroup, + .bodywebsite textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.bodywebsite button, + .bodywebsite select { + text-transform: none; +} + +.bodywebsite [role=button] { + cursor: pointer; +} + +.bodywebsite select { + word-wrap: normal; +} + +.bodywebsite select:disabled { + opacity: 1; +} + +.bodywebsite [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +.bodywebsite button, + .bodywebsite [type=button], + .bodywebsite [type=reset], + .bodywebsite [type=submit] { + -webkit-appearance: button; +} + +.bodywebsite button:not(:disabled), + .bodywebsite [type=button]:not(:disabled), + .bodywebsite [type=reset]:not(:disabled), + .bodywebsite [type=submit]:not(:disabled) { + cursor: pointer; +} + +.bodywebsite ::-moz-focus-inner { + padding: 0; + border-style: none; +} + +.bodywebsite textarea { + resize: vertical; +} + +.bodywebsite fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +.bodywebsite legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} + +@media (min-width: 1200px) { + .bodywebsite legend { + font-size: 1.5rem; + } +} + +.bodywebsite legend + * { + clear: left; +} + +.bodywebsite ::-webkit-datetime-edit-fields-wrapper, + .bodywebsite ::-webkit-datetime-edit-text, + .bodywebsite ::-webkit-datetime-edit-minute, + .bodywebsite ::-webkit-datetime-edit-hour-field, + .bodywebsite ::-webkit-datetime-edit-day-field, + .bodywebsite ::-webkit-datetime-edit-month-field, + .bodywebsite ::-webkit-datetime-edit-year-field { + padding: 0; +} + +.bodywebsite ::-webkit-inner-spin-button { + height: auto; +} + +.bodywebsite [type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +.bodywebsite ::-webkit-search-decoration { + -webkit-appearance: none; +} + +.bodywebsite ::-webkit-color-swatch-wrapper { + padding: 0; +} + +.bodywebsite ::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite ::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite output { + display: inline-block; +} + +.bodywebsite iframe { + border: 0; +} + +.bodywebsite summary { + display: list-item; + cursor: pointer; +} + +.bodywebsite progress { + vertical-align: baseline; +} + +.bodywebsite [hidden] { + display: none !important; +} + +.bodywebsite .lead { + font-size: 1.25rem; + font-weight: 300; +} + +.bodywebsite .display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-1 { + font-size: 5rem; + } +} + +.bodywebsite .display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-2 { + font-size: 4.5rem; + } +} + +.bodywebsite .display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-3 { + font-size: 4rem; + } +} + +.bodywebsite .display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-4 { + font-size: 3.5rem; + } +} + +.bodywebsite .display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-5 { + font-size: 3rem; + } +} + +.bodywebsite .display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-6 { + font-size: 2.5rem; + } +} + +.bodywebsite .list-unstyled { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline-item { + display: inline-block; +} + +.bodywebsite .list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.bodywebsite .initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.bodywebsite .blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} + +.bodywebsite .blockquote > :last-child { + margin-bottom: 0; +} + +.bodywebsite .blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .blockquote-footer::before { + content: "— "; +} + +.bodywebsite .img-fluid { + max-width: 100%; + height: auto; +} + +.bodywebsite .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} + +.bodywebsite .figure { + display: inline-block; +} + +.bodywebsite .figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.bodywebsite .figure-caption { + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .container, + .bodywebsite .container-fluid, + .bodywebsite .container-xxl, + .bodywebsite .container-xl, + .bodywebsite .container-lg, + .bodywebsite .container-md, + .bodywebsite .container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .container-sm, .bodywebsite .container { + max-width: 540px; + } +} + +@media (min-width: 768px) { + .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 720px; + } +} + +@media (min-width: 992px) { + .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 960px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1140px; + } +} + +@media (min-width: 1400px) { + .bodywebsite .container-xxl, .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1320px; + } +} + +.bodywebsite .row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} + +.bodywebsite .row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.bodywebsite .col { + flex: 1 0 0%; +} + +.bodywebsite .row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.bodywebsite .row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.bodywebsite .row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.bodywebsite .col-auto { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.bodywebsite .col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.bodywebsite .col-3 { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.bodywebsite .col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.bodywebsite .col-6 { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.bodywebsite .col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.bodywebsite .col-9 { + flex: 0 0 auto; + width: 75%; +} + +.bodywebsite .col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.bodywebsite .col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.bodywebsite .col-12 { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .offset-1 { + margin-left: 8.33333333%; +} + +.bodywebsite .offset-2 { + margin-left: 16.66666667%; +} + +.bodywebsite .offset-3 { + margin-left: 25%; +} + +.bodywebsite .offset-4 { + margin-left: 33.33333333%; +} + +.bodywebsite .offset-5 { + margin-left: 41.66666667%; +} + +.bodywebsite .offset-6 { + margin-left: 50%; +} + +.bodywebsite .offset-7 { + margin-left: 58.33333333%; +} + +.bodywebsite .offset-8 { + margin-left: 66.66666667%; +} + +.bodywebsite .offset-9 { + margin-left: 75%; +} + +.bodywebsite .offset-10 { + margin-left: 83.33333333%; +} + +.bodywebsite .offset-11 { + margin-left: 91.66666667%; +} + +.bodywebsite .g-0, + .bodywebsite .gx-0 { + --bs-gutter-x: 0; +} + +.bodywebsite .g-0, + .bodywebsite .gy-0 { + --bs-gutter-y: 0; +} + +.bodywebsite .g-1, + .bodywebsite .gx-1 { + --bs-gutter-x: 0.25rem; +} + +.bodywebsite .g-1, + .bodywebsite .gy-1 { + --bs-gutter-y: 0.25rem; +} + +.bodywebsite .g-2, + .bodywebsite .gx-2 { + --bs-gutter-x: 0.5rem; +} + +.bodywebsite .g-2, + .bodywebsite .gy-2 { + --bs-gutter-y: 0.5rem; +} + +.bodywebsite .g-3, + .bodywebsite .gx-3 { + --bs-gutter-x: 1rem; +} + +.bodywebsite .g-3, + .bodywebsite .gy-3 { + --bs-gutter-y: 1rem; +} + +.bodywebsite .g-4, + .bodywebsite .gx-4 { + --bs-gutter-x: 1.5rem; +} + +.bodywebsite .g-4, + .bodywebsite .gy-4 { + --bs-gutter-y: 1.5rem; +} + +.bodywebsite .g-5, + .bodywebsite .gx-5 { + --bs-gutter-x: 3rem; +} + +.bodywebsite .g-5, + .bodywebsite .gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .bodywebsite .col-sm { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-sm-0 { + margin-left: 0; + } + + .bodywebsite .offset-sm-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-sm-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-sm-3 { + margin-left: 25%; + } + + .bodywebsite .offset-sm-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-sm-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-sm-6 { + margin-left: 50%; + } + + .bodywebsite .offset-sm-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-sm-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-sm-9 { + margin-left: 75%; + } + + .bodywebsite .offset-sm-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-sm-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gx-sm-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gy-sm-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 768px) { + .bodywebsite .col-md { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-md-0 { + margin-left: 0; + } + + .bodywebsite .offset-md-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-md-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-md-3 { + margin-left: 25%; + } + + .bodywebsite .offset-md-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-md-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-md-6 { + margin-left: 50%; + } + + .bodywebsite .offset-md-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-md-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-md-9 { + margin-left: 75%; + } + + .bodywebsite .offset-md-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-md-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-md-0, + .bodywebsite .gx-md-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-md-0, + .bodywebsite .gy-md-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-md-1, + .bodywebsite .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-md-1, + .bodywebsite .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gx-md-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gy-md-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gx-md-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gy-md-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 992px) { + .bodywebsite .col-lg { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-lg-0 { + margin-left: 0; + } + + .bodywebsite .offset-lg-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-lg-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-lg-3 { + margin-left: 25%; + } + + .bodywebsite .offset-lg-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-lg-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-lg-6 { + margin-left: 50%; + } + + .bodywebsite .offset-lg-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-lg-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-lg-9 { + margin-left: 75%; + } + + .bodywebsite .offset-lg-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-lg-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gx-lg-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gy-lg-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1200px) { + .bodywebsite .col-xl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gx-xl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gy-xl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1400px) { + .bodywebsite .col-xxl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xxl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xxl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xxl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xxl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gx-xxl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gy-xxl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} + +.bodywebsite .table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} + +.bodywebsite .table > tbody { + vertical-align: inherit; +} + +.bodywebsite .table > thead { + vertical-align: bottom; +} + +.bodywebsite .table-group-divider { + border-top: 2px solid currentcolor; +} + +.bodywebsite .caption-top { + caption-side: top; +} + +.bodywebsite .table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} + +.bodywebsite .table-bordered > :not(caption) > * { + border-width: 1px 0; +} + +.bodywebsite .table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} + +.bodywebsite .table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} + +.bodywebsite .table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.bodywebsite .table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} + +.bodywebsite .table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} + +.bodywebsite .table-primary { + --bs-table-color: #000; + --bs-table-bg: #cfe2ff; + --bs-table-border-color: #bacbe6; + --bs-table-striped-bg: #c5d7f2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bacbe6; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfd1ec; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-secondary { + --bs-table-color: #000; + --bs-table-bg: #e2e3e5; + --bs-table-border-color: #cbccce; + --bs-table-striped-bg: #d7d8da; + --bs-table-striped-color: #000; + --bs-table-active-bg: #cbccce; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d1d2d4; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-success { + --bs-table-color: #000; + --bs-table-bg: #d1e7dd; + --bs-table-border-color: #bcd0c7; + --bs-table-striped-bg: #c7dbd2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bcd0c7; + --bs-table-active-color: #000; + --bs-table-hover-bg: #c1d6cc; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-info { + --bs-table-color: #000; + --bs-table-bg: #cff4fc; + --bs-table-border-color: #badce3; + --bs-table-striped-bg: #c5e8ef; + --bs-table-striped-color: #000; + --bs-table-active-bg: #badce3; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfe2e9; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-warning { + --bs-table-color: #000; + --bs-table-bg: #fff3cd; + --bs-table-border-color: #e6dbb9; + --bs-table-striped-bg: #f2e7c3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e6dbb9; + --bs-table-active-color: #000; + --bs-table-hover-bg: #ece1be; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-danger { + --bs-table-color: #000; + --bs-table-bg: #f8d7da; + --bs-table-border-color: #dfc2c4; + --bs-table-striped-bg: #eccccf; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfc2c4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5c7ca; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-light { + --bs-table-color: #000; + --bs-table-bg: #f8f9fa; + --bs-table-border-color: #dfe0e1; + --bs-table-striped-bg: #ecedee; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfe0e1; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5e6e7; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-dark { + --bs-table-color: #fff; + --bs-table-bg: #212529; + --bs-table-border-color: #373b3e; + --bs-table-striped-bg: #2c3034; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #373b3e; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #323539; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .bodywebsite .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +.bodywebsite .form-label { + margin-bottom: 0.5rem; +} + +.bodywebsite .col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.bodywebsite .col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} + +.bodywebsite .col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} + +.bodywebsite .form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control { + transition: none; + } +} + +.bodywebsite .form-control[type=file] { + overflow: hidden; +} + +.bodywebsite .form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-control::-webkit-date-and-time-value { + height: 1.5em; +} + +.bodywebsite .form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control::placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control:disabled { + background-color: #e9ecef; + opacity: 1; +} + +.bodywebsite .form-control::-webkit-file-upload-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +.bodywebsite .form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + + .bodywebsite .form-control::file-selector-button { + transition: none; + } +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} + +.bodywebsite .form-control-plaintext:focus { + outline: 0; +} + +.bodywebsite .form-control-plaintext.form-control-sm, .bodywebsite .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.bodywebsite .form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-control-lg::-webkit-file-upload-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite .form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} + +.bodywebsite textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} + +.bodywebsite .form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite .form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-select { + transition: none; + } +} + +.bodywebsite .form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-select[multiple], .bodywebsite .form-select[size]:not([size="1"]) { + padding-right: 0.75rem; + background-image: none; +} + +.bodywebsite .form-select:disabled { + background-color: #e9ecef; +} + +.bodywebsite .form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #212529; +} + +.bodywebsite .form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} + +.bodywebsite .form-check .form-check-input { + float: left; + margin-left: -1.5em; +} + +.bodywebsite .form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} + +.bodywebsite .form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} + +.bodywebsite .form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0, 0, 0, 0.25); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; + print-color-adjust: exact; +} + +.bodywebsite .form-check-input[type=checkbox] { + border-radius: 0.25em; +} + +.bodywebsite .form-check-input[type=radio] { + border-radius: 50%; +} + +.bodywebsite .form-check-input:active { + filter: brightness(90%); +} + +.bodywebsite .form-check-input:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-check-input:checked { + background-color: #0d6efd; + border-color: #0d6efd; +} + +.bodywebsite .form-check-input:checked[type=checkbox] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:checked[type=radio] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input[type=checkbox]:indeterminate { + background-color: #0d6efd; + border-color: #0d6efd; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} + +.bodywebsite .form-check-input[disabled] ~ .form-check-label, .bodywebsite .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.bodywebsite .form-switch { + padding-left: 2.5em; +} + +.bodywebsite .form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-switch .form-check-input { + transition: none; + } +} + +.bodywebsite .form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} + +.bodywebsite .form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.bodywebsite .form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.bodywebsite .btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} + +.bodywebsite .btn-check[disabled] + .btn, .bodywebsite .btn-check:disabled + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} + +.bodywebsite .form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.bodywebsite .form-range:focus { + outline: 0; +} + +.bodywebsite .form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range::-moz-focus-outer { + border: 0; +} + +.bodywebsite .form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-webkit-slider-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-moz-range-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range:disabled { + pointer-events: none; +} + +.bodywebsite .form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-floating { + position: relative; +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext, + .bodywebsite .form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} + +.bodywebsite .form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-floating > label { + transition: none; + } +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} + +.bodywebsite .form-floating > .form-control::-moz-placeholder, .bodywebsite .form-floating > .form-control-plaintext::-moz-placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control::placeholder, + .bodywebsite .form-floating > .form-control-plaintext::placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown), .bodywebsite .form-floating > .form-control-plaintext:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:focus, .bodywebsite .form-floating > .form-control:not(:placeholder-shown), + .bodywebsite .form-floating > .form-control-plaintext:focus, + .bodywebsite .form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill, + .bodywebsite .form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:focus ~ label, + .bodywebsite .form-floating > .form-control:not(:placeholder-shown) ~ label, + .bodywebsite .form-floating > .form-control-plaintext ~ label, + .bodywebsite .form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} + +.bodywebsite .input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} + +.bodywebsite .input-group > .form-control, + .bodywebsite .input-group > .form-select, + .bodywebsite .input-group > .form-floating { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} + +.bodywebsite .input-group > .form-control:focus, + .bodywebsite .input-group > .form-select:focus, + .bodywebsite .input-group > .form-floating:focus-within { + z-index: 5; +} + +.bodywebsite .input-group .btn { + position: relative; + z-index: 2; +} + +.bodywebsite .input-group .btn:focus { + z-index: 5; +} + +.bodywebsite .input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.375rem; +} + +.bodywebsite .input-group-lg > .form-control, + .bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-lg > .input-group-text, + .bodywebsite .input-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .input-group-sm > .form-control, + .bodywebsite .input-group-sm > .form-select, + .bodywebsite .input-group-sm > .input-group-text, + .bodywebsite .input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-sm > .form-select { + padding-right: 3rem; +} + +.bodywebsite .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .input-group > .form-floating:not(:first-child) > .form-control, + .bodywebsite .input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #198754; +} + +.bodywebsite .valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(25, 135, 84, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :valid ~ .valid-feedback, + .bodywebsite .was-validated :valid ~ .valid-tooltip, + .bodywebsite .is-valid ~ .valid-feedback, + .bodywebsite .is-valid ~ .valid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:valid, .bodywebsite .form-control.is-valid { + border-color: #198754; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:valid:focus, .bodywebsite .form-control.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:valid, .bodywebsite textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:valid, .bodywebsite .form-select.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-select:valid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:valid:not([multiple])[size="1"], .bodywebsite .form-select.is-valid:not([multiple]):not([size]), .bodywebsite .form-select.is-valid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:valid:focus, .bodywebsite .form-select.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-control-color:valid, .bodywebsite .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:valid, .bodywebsite .form-check-input.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:checked, .bodywebsite .form-check-input.is-valid:checked { + background-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:focus, .bodywebsite .form-check-input.is-valid:focus { + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-check-input:valid ~ .form-check-label, .bodywebsite .form-check-input.is-valid ~ .form-check-label { + color: #198754; +} + +.bodywebsite .form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):valid, .bodywebsite .input-group > .form-control:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):valid, + .bodywebsite .input-group > .form-select:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):valid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-valid { + z-index: 3; +} + +.bodywebsite .invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #dc3545; +} + +.bodywebsite .invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :invalid ~ .invalid-feedback, + .bodywebsite .was-validated :invalid ~ .invalid-tooltip, + .bodywebsite .is-invalid ~ .invalid-feedback, + .bodywebsite .is-invalid ~ .invalid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:invalid, .bodywebsite .form-control.is-invalid { + border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:invalid:focus, .bodywebsite .form-control.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:invalid, .bodywebsite textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:invalid, .bodywebsite .form-select.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-select:invalid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:invalid:not([multiple])[size="1"], .bodywebsite .form-select.is-invalid:not([multiple]):not([size]), .bodywebsite .form-select.is-invalid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:invalid:focus, .bodywebsite .form-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-control-color:invalid, .bodywebsite .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:invalid, .bodywebsite .form-check-input.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:checked, .bodywebsite .form-check-input.is-invalid:checked { + background-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:focus, .bodywebsite .form-check-input.is-invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-check-input:invalid ~ .form-check-label, .bodywebsite .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.bodywebsite .form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):invalid, .bodywebsite .input-group > .form-control:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):invalid, + .bodywebsite .input-group > .form-select:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):invalid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-invalid { + z-index: 4; +} + +.bodywebsite .btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #212529; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .btn { + transition: none; + } +} + +.bodywebsite :not(.btn-check) + .btn:hover, .bodywebsite .btn:first-child:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} + +.bodywebsite .btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:checked + .btn, .bodywebsite :not(.btn-check) + .btn:active, .bodywebsite .btn:first-child:active, .bodywebsite .btn.active, .bodywebsite .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} + +.bodywebsite .btn-check:checked + .btn:focus-visible, .bodywebsite :not(.btn-check) + .btn:active:focus-visible, .bodywebsite .btn:first-child:active:focus-visible, .bodywebsite .btn.active:focus-visible, .bodywebsite .btn.show:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn:disabled, .bodywebsite .btn.disabled, .bodywebsite fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} + +.bodywebsite .btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0b5ed7; + --bs-btn-hover-border-color: #0a58ca; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0a58ca; + --bs-btn-active-border-color: #0a53be; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #0d6efd; + --bs-btn-disabled-border-color: #0d6efd; +} + +.bodywebsite .btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #5c636a; + --bs-btn-hover-border-color: #565e64; + --bs-btn-focus-shadow-rgb: 130, 138, 145; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #565e64; + --bs-btn-active-border-color: #51585e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #6c757d; + --bs-btn-disabled-border-color: #6c757d; +} + +.bodywebsite .btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #157347; + --bs-btn-hover-border-color: #146c43; + --bs-btn-focus-shadow-rgb: 60, 153, 110; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #146c43; + --bs-btn-active-border-color: #13653f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #198754; + --bs-btn-disabled-border-color: #198754; +} + +.bodywebsite .btn-info { + --bs-btn-color: #000; + --bs-btn-bg: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #31d2f2; + --bs-btn-hover-border-color: #25cff2; + --bs-btn-focus-shadow-rgb: 11, 172, 204; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #3dd5f3; + --bs-btn-active-border-color: #25cff2; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #0dcaf0; + --bs-btn-disabled-border-color: #0dcaf0; +} + +.bodywebsite .btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffca2c; + --bs-btn-hover-border-color: #ffc720; + --bs-btn-focus-shadow-rgb: 217, 164, 6; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffcd39; + --bs-btn-active-border-color: #ffc720; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #ffc107; + --bs-btn-disabled-border-color: #ffc107; +} + +.bodywebsite .btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #bb2d3b; + --bs-btn-hover-border-color: #b02a37; + --bs-btn-focus-shadow-rgb: 225, 83, 97; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b02a37; + --bs-btn-active-border-color: #a52834; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #dc3545; + --bs-btn-disabled-border-color: #dc3545; +} + +.bodywebsite .btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #d3d4d5; + --bs-btn-hover-border-color: #c6c7c8; + --bs-btn-focus-shadow-rgb: 211, 212, 213; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #c6c7c8; + --bs-btn-active-border-color: #babbbc; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f8f9fa; + --bs-btn-disabled-border-color: #f8f9fa; +} + +.bodywebsite .btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #424649; + --bs-btn-hover-border-color: #373b3e; + --bs-btn-focus-shadow-rgb: 66, 70, 73; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #4d5154; + --bs-btn-active-border-color: #373b3e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #212529; + --bs-btn-disabled-border-color: #212529; +} + +.bodywebsite .btn-outline-primary { + --bs-btn-color: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0d6efd; + --bs-btn-hover-border-color: #0d6efd; + --bs-btn-focus-shadow-rgb: 13, 110, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0d6efd; + --bs-btn-active-border-color: #0d6efd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0d6efd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0d6efd; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-secondary { + --bs-btn-color: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #6c757d; + --bs-btn-hover-border-color: #6c757d; + --bs-btn-focus-shadow-rgb: 108, 117, 125; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6c757d; + --bs-btn-active-border-color: #6c757d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #6c757d; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-success { + --bs-btn-color: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #198754; + --bs-btn-hover-border-color: #198754; + --bs-btn-focus-shadow-rgb: 25, 135, 84; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #198754; + --bs-btn-active-border-color: #198754; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #198754; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #198754; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-info { + --bs-btn-color: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #0dcaf0; + --bs-btn-hover-border-color: #0dcaf0; + --bs-btn-focus-shadow-rgb: 13, 202, 240; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #0dcaf0; + --bs-btn-active-border-color: #0dcaf0; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0dcaf0; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0dcaf0; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-warning { + --bs-btn-color: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffc107; + --bs-btn-hover-border-color: #ffc107; + --bs-btn-focus-shadow-rgb: 255, 193, 7; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffc107; + --bs-btn-active-border-color: #ffc107; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #ffc107; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #ffc107; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-danger { + --bs-btn-color: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #dc3545; + --bs-btn-hover-border-color: #dc3545; + --bs-btn-focus-shadow-rgb: 220, 53, 69; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #dc3545; + --bs-btn-active-border-color: #dc3545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #dc3545; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #dc3545; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-light { + --bs-btn-color: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f8f9fa; + --bs-btn-hover-border-color: #f8f9fa; + --bs-btn-focus-shadow-rgb: 248, 249, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f8f9fa; + --bs-btn-active-border-color: #f8f9fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f8f9fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f8f9fa; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-dark { + --bs-btn-color: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #212529; + --bs-btn-hover-border-color: #212529; + --bs-btn-focus-shadow-rgb: 33, 37, 41; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #212529; + --bs-btn-active-border-color: #212529; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #212529; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #212529; + --bs-gradient: none; +} + +.bodywebsite .btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: underline; +} + +.bodywebsite .btn-link:focus-visible { + color: var(--bs-btn-color); +} + +.bodywebsite .btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.bodywebsite .btn-lg, .bodywebsite .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} + +.bodywebsite .btn-sm, .bodywebsite .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} + +.bodywebsite .fade { + transition: opacity 0.15s linear; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .fade { + transition: none; + } +} + +.bodywebsite .fade:not(.show) { + opacity: 0; +} + +.bodywebsite .collapse:not(.show) { + display: none; +} + +.bodywebsite .collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing { + transition: none; + } +} + +.bodywebsite .collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing.collapse-horizontal { + transition: none; + } +} + +.bodywebsite .dropup, + .bodywebsite .dropend, + .bodywebsite .dropdown, + .bodywebsite .dropstart, + .bodywebsite .dropup-center, + .bodywebsite .dropdown-center { + position: relative; +} + +.bodywebsite .dropdown-toggle { + white-space: nowrap; +} + +.bodywebsite .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #212529; + --bs-dropdown-bg: #fff; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #212529; + --bs-dropdown-link-hover-color: #1e2125; + --bs-dropdown-link-hover-bg: #e9ecef; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #6c757d; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} + +.bodywebsite .dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropdown-menu-start { + --bs-position: start; +} + +.bodywebsite .dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.bodywebsite .dropdown-menu-end { + --bs-position: end; +} + +.bodywebsite .dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .dropdown-menu-sm-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-sm-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 768px) { + .bodywebsite .dropdown-menu-md-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-md-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 992px) { + .bodywebsite .dropdown-menu-lg-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-lg-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1200px) { + .bodywebsite .dropdown-menu-xl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1400px) { + .bodywebsite .dropdown-menu-xxl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xxl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +.bodywebsite .dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} + +.bodywebsite .dropend .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.bodywebsite .dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: none; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} + +.bodywebsite .dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.bodywebsite .dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.bodywebsite .dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} + +.bodywebsite .dropdown-item:hover, .bodywebsite .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} + +.bodywebsite .dropdown-item.active, .bodywebsite .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} + +.bodywebsite .dropdown-item.disabled, .bodywebsite .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.bodywebsite .dropdown-menu.show { + display: block; +} + +.bodywebsite .dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.bodywebsite .dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.bodywebsite .dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.bodywebsite .btn-group, + .bodywebsite .btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} + +.bodywebsite .btn-group > .btn, + .bodywebsite .btn-group-vertical > .btn { + position: relative; + flex: 1 1 auto; +} + +.bodywebsite .btn-group > .btn-check:checked + .btn, + .bodywebsite .btn-group > .btn-check:focus + .btn, + .bodywebsite .btn-group > .btn:hover, + .bodywebsite .btn-group > .btn:focus, + .bodywebsite .btn-group > .btn:active, + .bodywebsite .btn-group > .btn.active, + .bodywebsite .btn-group-vertical > .btn-check:checked + .btn, + .bodywebsite .btn-group-vertical > .btn-check:focus + .btn, + .bodywebsite .btn-group-vertical > .btn:hover, + .bodywebsite .btn-group-vertical > .btn:focus, + .bodywebsite .btn-group-vertical > .btn:active, + .bodywebsite .btn-group-vertical > .btn.active { + z-index: 1; +} + +.bodywebsite .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} + +.bodywebsite .btn-toolbar .input-group { + width: auto; +} + +.bodywebsite .btn-group { + border-radius: 0.375rem; +} + +.bodywebsite .btn-group > :not(.btn-check:first-child) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) { + margin-left: -1px; +} + +.bodywebsite .btn-group > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group > .btn.dropdown-toggle-split:first-child, + .bodywebsite .btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .btn-group > .btn:nth-child(n+3), + .bodywebsite .btn-group > :not(.btn-check) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} + +.bodywebsite .dropdown-toggle-split::after, .bodywebsite .dropup .dropdown-toggle-split::after, .bodywebsite .dropend .dropdown-toggle-split::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.bodywebsite .btn-sm + .dropdown-toggle-split, .bodywebsite .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.bodywebsite .btn-lg + .dropdown-toggle-split, .bodywebsite .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.bodywebsite .btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} + +.bodywebsite .btn-group-vertical > .btn, + .bodywebsite .btn-group-vertical > .btn-group { + width: 100%; +} + +.bodywebsite .btn-group-vertical > .btn:not(:first-child), + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) { + margin-top: -1px; +} + +.bodywebsite .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .btn-group-vertical > .btn ~ .btn, + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .nav-link { + transition: none; + } +} + +.bodywebsite .nav-link:hover, .bodywebsite .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} + +.bodywebsite .nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.bodywebsite .nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #dee2e6; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6; + --bs-nav-tabs-link-active-color: #495057; + --bs-nav-tabs-link-active-bg: #fff; + --bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff; + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} + +.bodywebsite .nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + background: none; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} + +.bodywebsite .nav-tabs .nav-link:hover, .bodywebsite .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} + +.bodywebsite .nav-tabs .nav-link.disabled, .bodywebsite .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-tabs .nav-link.active, + .bodywebsite .nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} + +.bodywebsite .nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #0d6efd; +} + +.bodywebsite .nav-pills .nav-link { + background: none; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} + +.bodywebsite .nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-pills .nav-link.active, + .bodywebsite .nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.bodywebsite .nav-fill > .nav-link, + .bodywebsite .nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} + +.bodywebsite .nav-justified > .nav-link, + .bodywebsite .nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} + +.bodywebsite .nav-fill .nav-item .nav-link, + .bodywebsite .nav-justified .nav-item .nav-link { + width: 100%; +} + +.bodywebsite .tab-content > .tab-pane { + display: none; +} + +.bodywebsite .tab-content > .active { + display: block; +} + +.bodywebsite .navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: rgba(0, 0, 0, 0.55); + --bs-navbar-hover-color: rgba(0, 0, 0, 0.7); + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-hover-color: rgba(0, 0, 0, 0.9); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} + +.bodywebsite .navbar > .container, + .bodywebsite .navbar > .container-fluid, + .bodywebsite .navbar > .container-sm, + .bodywebsite .navbar > .container-md, + .bodywebsite .navbar > .container-lg, + .bodywebsite .navbar > .container-xl, + .bodywebsite .navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} + +.bodywebsite .navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} + +.bodywebsite .navbar-brand:hover, .bodywebsite .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.bodywebsite .navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .navbar-nav .show > .nav-link, + .bodywebsite .navbar-nav .nav-link.active { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-nav .dropdown-menu { + position: static; +} + +.bodywebsite .navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} + +.bodywebsite .navbar-text a, + .bodywebsite .navbar-text a:hover, + .bodywebsite .navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} + +.bodywebsite .navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .navbar-toggler { + transition: none; + } +} + +.bodywebsite .navbar-toggler:hover { + text-decoration: none; +} + +.bodywebsite .navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.bodywebsite .navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.bodywebsite .navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .bodywebsite .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-sm .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-md .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-md .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-lg .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xxl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +.bodywebsite .navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} + +.bodywebsite .navbar-expand .navbar-nav { + flex-direction: row; +} + +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} + +.bodywebsite .navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} + +.bodywebsite .navbar-expand .navbar-nav-scroll { + overflow: visible; +} + +.bodywebsite .navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} + +.bodywebsite .navbar-expand .navbar-toggler { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-header { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.bodywebsite .navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.55); + --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.bodywebsite .card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: rgba(0, 0, 0, 0.03); + --bs-card-bg: #fff; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} + +.bodywebsite .card > hr { + margin-right: 0; + margin-left: 0; +} + +.bodywebsite .card > .list-group { + border-top: inherit; + border-bottom: inherit; +} + +.bodywebsite .card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .card-header + .list-group, + .bodywebsite .card > .list-group + .card-footer { + border-top: 0; +} + +.bodywebsite .card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.bodywebsite .card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} + +.bodywebsite .card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} + +.bodywebsite .card-text:last-child { + margin-bottom: 0; +} + +.bodywebsite .card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.bodywebsite .card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.bodywebsite .card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} + +.bodywebsite .card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.bodywebsite .card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.bodywebsite .card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top, + .bodywebsite .card-img-bottom { + width: 100%; +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} + +@media (min-width: 576px) { + .bodywebsite .card-group { + display: flex; + flex-flow: row wrap; + } + + .bodywebsite .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + + .bodywebsite .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-top, + .bodywebsite .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-top, + .bodywebsite .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.bodywebsite .accordion { + --bs-accordion-color: var(--bs-body-color); + --bs-accordion-bg: #fff; + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #86b7fe; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #0c63e4; + --bs-accordion-active-bg: #e7f1ff; +} + +.bodywebsite .accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button { + transition: none; + } +} + +.bodywebsite .accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} + +.bodywebsite .accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button::after { + transition: none; + } +} + +.bodywebsite .accordion-button:hover { + z-index: 2; +} + +.bodywebsite .accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.bodywebsite .accordion-header { + margin-bottom: 0; +} + +.bodywebsite .accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:not(:first-of-type) { + border-top: 0; +} + +.bodywebsite .accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.bodywebsite .accordion-flush .accordion-collapse { + border-width: 0; +} + +.bodywebsite .accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} + +.bodywebsite .accordion-flush .accordion-item:first-child { + border-top: 0; +} + +.bodywebsite .accordion-flush .accordion-item:last-child { + border-bottom: 0; +} + +.bodywebsite .accordion-flush .accordion-item .accordion-button, .bodywebsite .accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} + +.bodywebsite .breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-divider-color: #6c757d; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/"); +} + +.bodywebsite .breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.bodywebsite .pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: #fff; + --bs-pagination-border-width: 1px; + --bs-pagination-border-color: #dee2e6; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: #e9ecef; + --bs-pagination-hover-border-color: #dee2e6; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #e9ecef; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #0d6efd; + --bs-pagination-active-border-color: #0d6efd; + --bs-pagination-disabled-color: #6c757d; + --bs-pagination-disabled-bg: #fff; + --bs-pagination-disabled-border-color: #dee2e6; + display: flex; + padding-left: 0; + list-style: none; +} + +.bodywebsite .page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .page-link { + transition: none; + } +} + +.bodywebsite .page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} + +.bodywebsite .page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} + +.bodywebsite .page-link.active, .bodywebsite .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} + +.bodywebsite .page-link.disabled, .bodywebsite .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.bodywebsite .page-item:not(:first-child) .page-link { + margin-left: -1px; +} + +.bodywebsite .page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} + +.bodywebsite .pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} + +.bodywebsite .badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} + +.bodywebsite .badge:empty { + display: none; +} + +.bodywebsite .btn .badge { + position: relative; + top: -1px; +} + +.bodywebsite .alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.bodywebsite .alert-heading { + color: inherit; +} + +.bodywebsite .alert-link { + font-weight: 700; +} + +.bodywebsite .alert-dismissible { + padding-right: 3rem; +} + +.bodywebsite .alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.bodywebsite .alert-primary { + --bs-alert-color: #084298; + --bs-alert-bg: #cfe2ff; + --bs-alert-border-color: #b6d4fe; +} + +.bodywebsite .alert-primary .alert-link { + color: #06357a; +} + +.bodywebsite .alert-secondary { + --bs-alert-color: #41464b; + --bs-alert-bg: #e2e3e5; + --bs-alert-border-color: #d3d6d8; +} + +.bodywebsite .alert-secondary .alert-link { + color: #34383c; +} + +.bodywebsite .alert-success { + --bs-alert-color: #0f5132; + --bs-alert-bg: #d1e7dd; + --bs-alert-border-color: #badbcc; +} + +.bodywebsite .alert-success .alert-link { + color: #0c4128; +} + +.bodywebsite .alert-info { + --bs-alert-color: #055160; + --bs-alert-bg: #cff4fc; + --bs-alert-border-color: #b6effb; +} + +.bodywebsite .alert-info .alert-link { + color: #04414d; +} + +.bodywebsite .alert-warning { + --bs-alert-color: #664d03; + --bs-alert-bg: #fff3cd; + --bs-alert-border-color: #ffecb5; +} + +.bodywebsite .alert-warning .alert-link { + color: #523e02; +} + +.bodywebsite .alert-danger { + --bs-alert-color: #842029; + --bs-alert-bg: #f8d7da; + --bs-alert-border-color: #f5c2c7; +} + +.bodywebsite .alert-danger .alert-link { + color: #6a1a21; +} + +.bodywebsite .alert-light { + --bs-alert-color: #636464; + --bs-alert-bg: #fefefe; + --bs-alert-border-color: #fdfdfe; +} + +.bodywebsite .alert-light .alert-link { + color: #4f5050; +} + +.bodywebsite .alert-dark { + --bs-alert-color: #141619; + --bs-alert-bg: #d3d3d4; + --bs-alert-border-color: #bcbebf; +} + +.bodywebsite .alert-dark .alert-link { + color: #101214; +} + +@-webkit-keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +.bodywebsite .progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #e9ecef; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #0d6efd; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} + +.bodywebsite .progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar { + transition: none; + } +} + +.bodywebsite .progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.bodywebsite .progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + +.bodywebsite .list-group { + --bs-list-group-color: #212529; + --bs-list-group-bg: #fff; + --bs-list-group-border-color: rgba(0, 0, 0, 0.125); + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #495057; + --bs-list-group-action-hover-color: #495057; + --bs-list-group-action-hover-bg: #f8f9fa; + --bs-list-group-action-active-color: #212529; + --bs-list-group-action-active-bg: #e9ecef; + --bs-list-group-disabled-color: #6c757d; + --bs-list-group-disabled-bg: #fff; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #0d6efd; + --bs-list-group-active-border-color: #0d6efd; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.bodywebsite .list-group-numbered { + list-style-type: none; + counter-reset: section; +} + +.bodywebsite .list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.bodywebsite .list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} + +.bodywebsite .list-group-item-action:hover, .bodywebsite .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} + +.bodywebsite .list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.bodywebsite .list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} + +.bodywebsite .list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} + +.bodywebsite .list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} + +.bodywebsite .list-group-item.disabled, .bodywebsite .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} + +.bodywebsite .list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} + +.bodywebsite .list-group-item + .list-group-item { + border-top-width: 0; +} + +.bodywebsite .list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-horizontal { + flex-direction: row; +} + +.bodywebsite .list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item.active { + margin-top: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .bodywebsite .list-group-horizontal-sm { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 768px) { + .bodywebsite .list-group-horizontal-md { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 992px) { + .bodywebsite .list-group-horizontal-lg { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1200px) { + .bodywebsite .list-group-horizontal-xl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1400px) { + .bodywebsite .list-group-horizontal-xxl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +.bodywebsite .list-group-flush { + border-radius: 0; +} + +.bodywebsite .list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.bodywebsite .list-group-item-primary { + color: #084298; + background-color: #cfe2ff; +} + +.bodywebsite .list-group-item-primary.list-group-item-action:hover, .bodywebsite .list-group-item-primary.list-group-item-action:focus { + color: #084298; + background-color: #bacbe6; +} + +.bodywebsite .list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #084298; + border-color: #084298; +} + +.bodywebsite .list-group-item-secondary { + color: #41464b; + background-color: #e2e3e5; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action:hover, .bodywebsite .list-group-item-secondary.list-group-item-action:focus { + color: #41464b; + background-color: #cbccce; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #41464b; + border-color: #41464b; +} + +.bodywebsite .list-group-item-success { + color: #0f5132; + background-color: #d1e7dd; +} + +.bodywebsite .list-group-item-success.list-group-item-action:hover, .bodywebsite .list-group-item-success.list-group-item-action:focus { + color: #0f5132; + background-color: #bcd0c7; +} + +.bodywebsite .list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #0f5132; + border-color: #0f5132; +} + +.bodywebsite .list-group-item-info { + color: #055160; + background-color: #cff4fc; +} + +.bodywebsite .list-group-item-info.list-group-item-action:hover, .bodywebsite .list-group-item-info.list-group-item-action:focus { + color: #055160; + background-color: #badce3; +} + +.bodywebsite .list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #055160; + border-color: #055160; +} + +.bodywebsite .list-group-item-warning { + color: #664d03; + background-color: #fff3cd; +} + +.bodywebsite .list-group-item-warning.list-group-item-action:hover, .bodywebsite .list-group-item-warning.list-group-item-action:focus { + color: #664d03; + background-color: #e6dbb9; +} + +.bodywebsite .list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #664d03; + border-color: #664d03; +} + +.bodywebsite .list-group-item-danger { + color: #842029; + background-color: #f8d7da; +} + +.bodywebsite .list-group-item-danger.list-group-item-action:hover, .bodywebsite .list-group-item-danger.list-group-item-action:focus { + color: #842029; + background-color: #dfc2c4; +} + +.bodywebsite .list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #842029; + border-color: #842029; +} + +.bodywebsite .list-group-item-light { + color: #636464; + background-color: #fefefe; +} + +.bodywebsite .list-group-item-light.list-group-item-action:hover, .bodywebsite .list-group-item-light.list-group-item-action:focus { + color: #636464; + background-color: #e5e5e5; +} + +.bodywebsite .list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #636464; + border-color: #636464; +} + +.bodywebsite .list-group-item-dark { + color: #141619; + background-color: #d3d3d4; +} + +.bodywebsite .list-group-item-dark.list-group-item-action:hover, .bodywebsite .list-group-item-dark.list-group-item-action:focus { + color: #141619; + background-color: #bebebf; +} + +.bodywebsite .list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #141619; + border-color: #141619; +} + +.bodywebsite .btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #000; + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.5; +} + +.bodywebsite .btn-close:hover { + color: #000; + text-decoration: none; + opacity: 0.75; +} + +.bodywebsite .btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + opacity: 1; +} + +.bodywebsite .btn-close:disabled, .bodywebsite .btn-close.disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + opacity: 0.25; +} + +.bodywebsite .btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} + +.bodywebsite .toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-bg: rgba(255, 255, 255, 0.85); + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #6c757d; + --bs-toast-header-bg: rgba(255, 255, 255, 0.85); + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} + +.bodywebsite .toast.showing { + opacity: 0; +} + +.bodywebsite .toast:not(.show) { + display: none; +} + +.bodywebsite .toast-container { + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} + +.bodywebsite .toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.bodywebsite .toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} + +.bodywebsite .toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} + +.bodywebsite .toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.bodywebsite .modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-bg: #fff; + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.bodywebsite .modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} + +.bodywebsite .modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .modal.fade .modal-dialog { + transition: none; + } +} + +.bodywebsite .modal.show .modal-dialog { + transform: none; +} + +.bodywebsite .modal.modal-static .modal-dialog { + transform: scale(1.02); +} + +.bodywebsite .modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} + +.bodywebsite .modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.bodywebsite .modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} + +.bodywebsite .modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} + +.bodywebsite .modal-backdrop.fade { + opacity: 0; +} + +.bodywebsite .modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.bodywebsite .modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} + +.bodywebsite .modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.bodywebsite .modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.bodywebsite .modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .bodywebsite .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + + .bodywebsite .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + + .bodywebsite .modal-sm { + --bs-modal-width: 300px; + } +} + +@media (min-width: 992px) { + .bodywebsite .modal-lg, + .bodywebsite .modal-xl { + --bs-modal-width: 800px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .modal-xl { + --bs-modal-width: 1140px; + } +} + +.bodywebsite .modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} + +.bodywebsite .modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-header, + .bodywebsite .modal-fullscreen .modal-footer { + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .bodywebsite .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-header, + .bodywebsite .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-header, + .bodywebsite .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-header, + .bodywebsite .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-header, + .bodywebsite .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-header, + .bodywebsite .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} + +.bodywebsite .tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} + +.bodywebsite .tooltip.show { + opacity: var(--bs-tooltip-opacity); +} + +.bodywebsite .tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} + +.bodywebsite .tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: 0; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: 0; +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +.bodywebsite .tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.bodywebsite .popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #fff; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-bg: #f0f0f0; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #212529; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} + +.bodywebsite .popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} + +.bodywebsite .popover .popover-arrow::before, .bodywebsite .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-end > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom .popover-header::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +.bodywebsite .bs-popover-start > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +.bodywebsite .popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} + +.bodywebsite .popover-header:empty { + display: none; +} + +.bodywebsite .popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.bodywebsite .carousel { + position: relative; +} + +.bodywebsite .carousel.pointer-event { + touch-action: pan-y; +} + +.bodywebsite .carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.bodywebsite .carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-item { + transition: none; + } +} + +.bodywebsite .carousel-item.active, + .bodywebsite .carousel-item-next, + .bodywebsite .carousel-item-prev { + display: block; +} + +.bodywebsite .carousel-item-next:not(.carousel-item-start), + .bodywebsite .active.carousel-item-end { + transform: translateX(100%); +} + +.bodywebsite .carousel-item-prev:not(.carousel-item-end), + .bodywebsite .active.carousel-item-start { + transform: translateX(-100%); +} + +.bodywebsite .carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} + +.bodywebsite .carousel-fade .carousel-item.active, + .bodywebsite .carousel-fade .carousel-item-next.carousel-item-start, + .bodywebsite .carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} + +.bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + transition: none; + } +} + +.bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + transition: none; + } +} + +.bodywebsite .carousel-control-prev:hover, .bodywebsite .carousel-control-prev:focus, + .bodywebsite .carousel-control-next:hover, + .bodywebsite .carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.bodywebsite .carousel-control-prev { + left: 0; +} + +.bodywebsite .carousel-control-next { + right: 0; +} + +.bodywebsite .carousel-control-prev-icon, + .bodywebsite .carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +.bodywebsite .carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} + +.bodywebsite .carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-indicators [data-bs-target] { + transition: none; + } +} + +.bodywebsite .carousel-indicators .active { + opacity: 1; +} + +.bodywebsite .carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.bodywebsite .carousel-dark .carousel-control-prev-icon, + .bodywebsite .carousel-dark .carousel-control-next-icon { + filter: invert(1) grayscale(100); +} + +.bodywebsite .carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} + +.bodywebsite .carousel-dark .carousel-caption { + color: #000; +} + +.bodywebsite .spinner-grow, + .bodywebsite .spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + -webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@-webkit-keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +.bodywebsite .spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.bodywebsite .spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +.bodywebsite .spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.bodywebsite .spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .spinner-border, + .bodywebsite .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} + +.bodywebsite .offcanvas, .bodywebsite .offcanvas-xxl, .bodywebsite .offcanvas-xl, .bodywebsite .offcanvas-lg, .bodywebsite .offcanvas-md, .bodywebsite .offcanvas-sm { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-bg: #fff; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-sm { + transition: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.hiding, .bodywebsite .offcanvas-sm.show { + visibility: visible; + } +} + +@media (min-width: 576px) { + .bodywebsite .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-sm .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-md { + transition: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.hiding, .bodywebsite .offcanvas-md.show { + visibility: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-md .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-lg { + transition: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.hiding, .bodywebsite .offcanvas-lg.show { + visibility: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-lg .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xl { + transition: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.hiding, .bodywebsite .offcanvas-xl.show { + visibility: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xxl { + transition: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.hiding, .bodywebsite .offcanvas-xxl.show { + visibility: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xxl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.bodywebsite .offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas { + transition: none; + } +} + +.bodywebsite .offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} + +.bodywebsite .offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); +} + +.bodywebsite .offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} + +.bodywebsite .offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.show:not(.hiding) { + transform: none; +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.hiding, .bodywebsite .offcanvas.show { + visibility: visible; +} + +.bodywebsite .offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} + +.bodywebsite .offcanvas-backdrop.fade { + opacity: 0; +} + +.bodywebsite .offcanvas-backdrop.show { + opacity: 0.5; +} + +.bodywebsite .offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} + +.bodywebsite .offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} + +.bodywebsite .offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} + +.bodywebsite .offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.bodywebsite .placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} + +.bodywebsite .placeholder.btn::before { + display: inline-block; + content: ""; +} + +.bodywebsite .placeholder-xs { + min-height: 0.6em; +} + +.bodywebsite .placeholder-sm { + min-height: 0.8em; +} + +.bodywebsite .placeholder-lg { + min-height: 1.2em; +} + +.bodywebsite .placeholder-glow .placeholder { + -webkit-animation: placeholder-glow 2s ease-in-out infinite; + animation: placeholder-glow 2s ease-in-out infinite; +} + +@-webkit-keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +.bodywebsite .placeholder-wave { + -webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + -webkit-animation: placeholder-wave 2s linear infinite; + animation: placeholder-wave 2s linear infinite; +} + +@-webkit-keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +.bodywebsite .clearfix::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .text-bg-primary { + color: #fff !important; + background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-secondary { + color: #fff !important; + background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-success { + color: #fff !important; + background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-info { + color: #000 !important; + background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-warning { + color: #000 !important; + background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-danger { + color: #fff !important; + background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-light { + color: #000 !important; + background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-dark { + color: #fff !important; + background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .link-primary { + color: #0d6efd !important; +} + +.bodywebsite .link-primary:hover, .bodywebsite .link-primary:focus { + color: #0a58ca !important; +} + +.bodywebsite .link-secondary { + color: #6c757d !important; +} + +.bodywebsite .link-secondary:hover, .bodywebsite .link-secondary:focus { + color: #565e64 !important; +} + +.bodywebsite .link-success { + color: #198754 !important; +} + +.bodywebsite .link-success:hover, .bodywebsite .link-success:focus { + color: #146c43 !important; +} + +.bodywebsite .link-info { + color: #0dcaf0 !important; +} + +.bodywebsite .link-info:hover, .bodywebsite .link-info:focus { + color: #3dd5f3 !important; +} + +.bodywebsite .link-warning { + color: #ffc107 !important; +} + +.bodywebsite .link-warning:hover, .bodywebsite .link-warning:focus { + color: #ffcd39 !important; +} + +.bodywebsite .link-danger { + color: #dc3545 !important; +} + +.bodywebsite .link-danger:hover, .bodywebsite .link-danger:focus { + color: #b02a37 !important; +} + +.bodywebsite .link-light { + color: #f8f9fa !important; +} + +.bodywebsite .link-light:hover, .bodywebsite .link-light:focus { + color: #f9fafb !important; +} + +.bodywebsite .link-dark { + color: #212529 !important; +} + +.bodywebsite .link-dark:hover, .bodywebsite .link-dark:focus { + color: #1a1e21 !important; +} + +.bodywebsite .ratio { + position: relative; + width: 100%; +} + +.bodywebsite .ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} + +.bodywebsite .ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.bodywebsite .ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.bodywebsite .ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.bodywebsite .ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.bodywebsite .ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.bodywebsite .fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; +} + +.bodywebsite .sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .bodywebsite .sticky-sm-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 768px) { + .bodywebsite .sticky-md-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 992px) { + .bodywebsite .sticky-lg-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1200px) { + .bodywebsite .sticky-xl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1400px) { + .bodywebsite .sticky-xxl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +.bodywebsite .hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} + +.bodywebsite .vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} + +.bodywebsite .visually-hidden, + .bodywebsite .visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.bodywebsite .stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.bodywebsite .text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bodywebsite .vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.bodywebsite .align-baseline { + vertical-align: baseline !important; +} + +.bodywebsite .align-top { + vertical-align: top !important; +} + +.bodywebsite .align-middle { + vertical-align: middle !important; +} + +.bodywebsite .align-bottom { + vertical-align: bottom !important; +} + +.bodywebsite .align-text-bottom { + vertical-align: text-bottom !important; +} + +.bodywebsite .align-text-top { + vertical-align: text-top !important; +} + +.bodywebsite .float-start { + float: left !important; +} + +.bodywebsite .float-end { + float: right !important; +} + +.bodywebsite .float-none { + float: none !important; +} + +.bodywebsite .opacity-0 { + opacity: 0 !important; +} + +.bodywebsite .opacity-25 { + opacity: 0.25 !important; +} + +.bodywebsite .opacity-50 { + opacity: 0.5 !important; +} + +.bodywebsite .opacity-75 { + opacity: 0.75 !important; +} + +.bodywebsite .opacity-100 { + opacity: 1 !important; +} + +.bodywebsite .overflow-auto { + overflow: auto !important; +} + +.bodywebsite .overflow-hidden { + overflow: hidden !important; +} + +.bodywebsite .overflow-visible { + overflow: visible !important; +} + +.bodywebsite .overflow-scroll { + overflow: scroll !important; +} + +.bodywebsite .d-inline { + display: inline !important; +} + +.bodywebsite .d-inline-block { + display: inline-block !important; +} + +.bodywebsite .d-block { + display: block !important; +} + +.bodywebsite .d-grid { + display: grid !important; +} + +.bodywebsite .d-table { + display: table !important; +} + +.bodywebsite .d-table-row { + display: table-row !important; +} + +.bodywebsite .d-table-cell { + display: table-cell !important; +} + +.bodywebsite .d-flex { + display: flex !important; +} + +.bodywebsite .d-inline-flex { + display: inline-flex !important; +} + +.bodywebsite .d-none { + display: none !important; +} + +.bodywebsite .shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.bodywebsite .shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.bodywebsite .shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.bodywebsite .shadow-none { + box-shadow: none !important; +} + +.bodywebsite .position-static { + position: static !important; +} + +.bodywebsite .position-relative { + position: relative !important; +} + +.bodywebsite .position-absolute { + position: absolute !important; +} + +.bodywebsite .position-fixed { + position: fixed !important; +} + +.bodywebsite .position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} + +.bodywebsite .top-0 { + top: 0 !important; +} + +.bodywebsite .top-50 { + top: 50% !important; +} + +.bodywebsite .top-100 { + top: 100% !important; +} + +.bodywebsite .bottom-0 { + bottom: 0 !important; +} + +.bodywebsite .bottom-50 { + bottom: 50% !important; +} + +.bodywebsite .bottom-100 { + bottom: 100% !important; +} + +.bodywebsite .start-0 { + left: 0 !important; +} + +.bodywebsite .start-50 { + left: 50% !important; +} + +.bodywebsite .start-100 { + left: 100% !important; +} + +.bodywebsite .end-0 { + right: 0 !important; +} + +.bodywebsite .end-50 { + right: 50% !important; +} + +.bodywebsite .end-100 { + right: 100% !important; +} + +.bodywebsite .translate-middle { + transform: translate(-50%, -50%) !important; +} + +.bodywebsite .translate-middle-x { + transform: translateX(-50%) !important; +} + +.bodywebsite .translate-middle-y { + transform: translateY(-50%) !important; +} + +.bodywebsite .border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-0 { + border: 0 !important; +} + +.bodywebsite .border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-top-0 { + border-top: 0 !important; +} + +.bodywebsite .border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-end-0 { + border-right: 0 !important; +} + +.bodywebsite .border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-bottom-0 { + border-bottom: 0 !important; +} + +.bodywebsite .border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-start-0 { + border-left: 0 !important; +} + +.bodywebsite .border-primary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-secondary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-success { + --bs-border-opacity: 1; +} + +.bodywebsite .border-info { + --bs-border-opacity: 1; +} + +.bodywebsite .border-warning { + --bs-border-opacity: 1; +} + +.bodywebsite .border-danger { + --bs-border-opacity: 1; +} + +.bodywebsite .border-light { + --bs-border-opacity: 1; +} + +.bodywebsite .border-dark { + --bs-border-opacity: 1; +} + +.bodywebsite .border-white { + --bs-border-opacity: 1; +} + +.bodywebsite .border-1 { + --bs-border-width: 1px; +} + +.bodywebsite .border-2 { + --bs-border-width: 2px; +} + +.bodywebsite .border-3 { + --bs-border-width: 3px; +} + +.bodywebsite .border-4 { + --bs-border-width: 4px; +} + +.bodywebsite .border-5 { + --bs-border-width: 5px; +} + +.bodywebsite .border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.bodywebsite .border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.bodywebsite .border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.bodywebsite .border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.bodywebsite .border-opacity-100 { + --bs-border-opacity: 1; +} + +.bodywebsite .w-25 { + width: 25% !important; +} + +.bodywebsite .w-50 { + width: 50% !important; +} + +.bodywebsite .w-75 { + width: 75% !important; +} + +.bodywebsite .w-100 { + width: 100% !important; +} + +.bodywebsite .w-auto { + width: auto !important; +} + +.bodywebsite .mw-100 { + max-width: 100% !important; +} + +.bodywebsite .vw-100 { + width: 100vw !important; +} + +.bodywebsite .min-vw-100 { + min-width: 100vw !important; +} + +.bodywebsite .h-25 { + height: 25% !important; +} + +.bodywebsite .h-50 { + height: 50% !important; +} + +.bodywebsite .h-75 { + height: 75% !important; +} + +.bodywebsite .h-100 { + height: 100% !important; +} + +.bodywebsite .h-auto { + height: auto !important; +} + +.bodywebsite .mh-100 { + max-height: 100% !important; +} + +.bodywebsite .vh-100 { + height: 100vh !important; +} + +.bodywebsite .min-vh-100 { + min-height: 100vh !important; +} + +.bodywebsite .flex-fill { + flex: 1 1 auto !important; +} + +.bodywebsite .flex-row { + flex-direction: row !important; +} + +.bodywebsite .flex-column { + flex-direction: column !important; +} + +.bodywebsite .flex-row-reverse { + flex-direction: row-reverse !important; +} + +.bodywebsite .flex-column-reverse { + flex-direction: column-reverse !important; +} + +.bodywebsite .flex-grow-0 { + flex-grow: 0 !important; +} + +.bodywebsite .flex-grow-1 { + flex-grow: 1 !important; +} + +.bodywebsite .flex-shrink-0 { + flex-shrink: 0 !important; +} + +.bodywebsite .flex-shrink-1 { + flex-shrink: 1 !important; +} + +.bodywebsite .flex-wrap { + flex-wrap: wrap !important; +} + +.bodywebsite .flex-nowrap { + flex-wrap: nowrap !important; +} + +.bodywebsite .flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.bodywebsite .justify-content-start { + justify-content: flex-start !important; +} + +.bodywebsite .justify-content-end { + justify-content: flex-end !important; +} + +.bodywebsite .justify-content-center { + justify-content: center !important; +} + +.bodywebsite .justify-content-between { + justify-content: space-between !important; +} + +.bodywebsite .justify-content-around { + justify-content: space-around !important; +} + +.bodywebsite .justify-content-evenly { + justify-content: space-evenly !important; +} + +.bodywebsite .align-items-start { + align-items: flex-start !important; +} + +.bodywebsite .align-items-end { + align-items: flex-end !important; +} + +.bodywebsite .align-items-center { + align-items: center !important; +} + +.bodywebsite .align-items-baseline { + align-items: baseline !important; +} + +.bodywebsite .align-items-stretch { + align-items: stretch !important; +} + +.bodywebsite .align-content-start { + align-content: flex-start !important; +} + +.bodywebsite .align-content-end { + align-content: flex-end !important; +} + +.bodywebsite .align-content-center { + align-content: center !important; +} + +.bodywebsite .align-content-between { + align-content: space-between !important; +} + +.bodywebsite .align-content-around { + align-content: space-around !important; +} + +.bodywebsite .align-content-stretch { + align-content: stretch !important; +} + +.bodywebsite .align-self-auto { + align-self: auto !important; +} + +.bodywebsite .align-self-start { + align-self: flex-start !important; +} + +.bodywebsite .align-self-end { + align-self: flex-end !important; +} + +.bodywebsite .align-self-center { + align-self: center !important; +} + +.bodywebsite .align-self-baseline { + align-self: baseline !important; +} + +.bodywebsite .align-self-stretch { + align-self: stretch !important; +} + +.bodywebsite .order-first { + order: -1 !important; +} + +.bodywebsite .order-0 { + order: 0 !important; +} + +.bodywebsite .order-1 { + order: 1 !important; +} + +.bodywebsite .order-2 { + order: 2 !important; +} + +.bodywebsite .order-3 { + order: 3 !important; +} + +.bodywebsite .order-4 { + order: 4 !important; +} + +.bodywebsite .order-5 { + order: 5 !important; +} + +.bodywebsite .order-last { + order: 6 !important; +} + +.bodywebsite .m-0 { + margin: 0 !important; +} + +.bodywebsite .m-1 { + margin: 0.25rem !important; +} + +.bodywebsite .m-2 { + margin: 0.5rem !important; +} + +.bodywebsite .m-3 { + margin: 1rem !important; +} + +.bodywebsite .m-4 { + margin: 1.5rem !important; +} + +.bodywebsite .m-5 { + margin: 3rem !important; +} + +.bodywebsite .m-auto { + margin: auto !important; +} + +.bodywebsite .mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.bodywebsite .mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.bodywebsite .mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.bodywebsite .mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.bodywebsite .mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.bodywebsite .mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.bodywebsite .mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.bodywebsite .my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.bodywebsite .my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.bodywebsite .my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.bodywebsite .my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.bodywebsite .my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.bodywebsite .my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.bodywebsite .my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.bodywebsite .mt-0 { + margin-top: 0 !important; +} + +.bodywebsite .mt-1 { + margin-top: 0.25rem !important; +} + +.bodywebsite .mt-2 { + margin-top: 0.5rem !important; +} + +.bodywebsite .mt-3 { + margin-top: 1rem !important; +} + +.bodywebsite .mt-4 { + margin-top: 1.5rem !important; +} + +.bodywebsite .mt-5 { + margin-top: 3rem !important; +} + +.bodywebsite .mt-auto { + margin-top: auto !important; +} + +.bodywebsite .me-0 { + margin-right: 0 !important; +} + +.bodywebsite .me-1 { + margin-right: 0.25rem !important; +} + +.bodywebsite .me-2 { + margin-right: 0.5rem !important; +} + +.bodywebsite .me-3 { + margin-right: 1rem !important; +} + +.bodywebsite .me-4 { + margin-right: 1.5rem !important; +} + +.bodywebsite .me-5 { + margin-right: 3rem !important; +} + +.bodywebsite .me-auto { + margin-right: auto !important; +} + +.bodywebsite .mb-0 { + margin-bottom: 0 !important; +} + +.bodywebsite .mb-1 { + margin-bottom: 0.25rem !important; +} + +.bodywebsite .mb-2 { + margin-bottom: 0.5rem !important; +} + +.bodywebsite .mb-3 { + margin-bottom: 1rem !important; +} + +.bodywebsite .mb-4 { + margin-bottom: 1.5rem !important; +} + +.bodywebsite .mb-5 { + margin-bottom: 3rem !important; +} + +.bodywebsite .mb-auto { + margin-bottom: auto !important; +} + +.bodywebsite .ms-0 { + margin-left: 0 !important; +} + +.bodywebsite .ms-1 { + margin-left: 0.25rem !important; +} + +.bodywebsite .ms-2 { + margin-left: 0.5rem !important; +} + +.bodywebsite .ms-3 { + margin-left: 1rem !important; +} + +.bodywebsite .ms-4 { + margin-left: 1.5rem !important; +} + +.bodywebsite .ms-5 { + margin-left: 3rem !important; +} + +.bodywebsite .ms-auto { + margin-left: auto !important; +} + +.bodywebsite .p-0 { + padding: 0 !important; +} + +.bodywebsite .p-1 { + padding: 0.25rem !important; +} + +.bodywebsite .p-2 { + padding: 0.5rem !important; +} + +.bodywebsite .p-3 { + padding: 1rem !important; +} + +.bodywebsite .p-4 { + padding: 1.5rem !important; +} + +.bodywebsite .p-5 { + padding: 3rem !important; +} + +.bodywebsite .px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.bodywebsite .px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.bodywebsite .px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.bodywebsite .px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.bodywebsite .px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.bodywebsite .px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.bodywebsite .py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.bodywebsite .py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.bodywebsite .py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.bodywebsite .py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.bodywebsite .py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.bodywebsite .py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.bodywebsite .pt-0 { + padding-top: 0 !important; +} + +.bodywebsite .pt-1 { + padding-top: 0.25rem !important; +} + +.bodywebsite .pt-2 { + padding-top: 0.5rem !important; +} + +.bodywebsite .pt-3 { + padding-top: 1rem !important; +} + +.bodywebsite .pt-4 { + padding-top: 1.5rem !important; +} + +.bodywebsite .pt-5 { + padding-top: 3rem !important; +} + +.bodywebsite .pe-0 { + padding-right: 0 !important; +} + +.bodywebsite .pe-1 { + padding-right: 0.25rem !important; +} + +.bodywebsite .pe-2 { + padding-right: 0.5rem !important; +} + +.bodywebsite .pe-3 { + padding-right: 1rem !important; +} + +.bodywebsite .pe-4 { + padding-right: 1.5rem !important; +} + +.bodywebsite .pe-5 { + padding-right: 3rem !important; +} + +.bodywebsite .pb-0 { + padding-bottom: 0 !important; +} + +.bodywebsite .pb-1 { + padding-bottom: 0.25rem !important; +} + +.bodywebsite .pb-2 { + padding-bottom: 0.5rem !important; +} + +.bodywebsite .pb-3 { + padding-bottom: 1rem !important; +} + +.bodywebsite .pb-4 { + padding-bottom: 1.5rem !important; +} + +.bodywebsite .pb-5 { + padding-bottom: 3rem !important; +} + +.bodywebsite .ps-0 { + padding-left: 0 !important; +} + +.bodywebsite .ps-1 { + padding-left: 0.25rem !important; +} + +.bodywebsite .ps-2 { + padding-left: 0.5rem !important; +} + +.bodywebsite .ps-3 { + padding-left: 1rem !important; +} + +.bodywebsite .ps-4 { + padding-left: 1.5rem !important; +} + +.bodywebsite .ps-5 { + padding-left: 3rem !important; +} + +.bodywebsite .gap-0 { + gap: 0 !important; +} + +.bodywebsite .gap-1 { + gap: 0.25rem !important; +} + +.bodywebsite .gap-2 { + gap: 0.5rem !important; +} + +.bodywebsite .gap-3 { + gap: 1rem !important; +} + +.bodywebsite .gap-4 { + gap: 1.5rem !important; +} + +.bodywebsite .gap-5 { + gap: 3rem !important; +} + +.bodywebsite .font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.bodywebsite .fs-1 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.bodywebsite .fs-2 { + font-size: calc(1.325rem + 0.9vw) !important; +} + +.bodywebsite .fs-3 { + font-size: calc(1.3rem + 0.6vw) !important; +} + +.bodywebsite .fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.bodywebsite .fs-5 { + font-size: 1.25rem !important; +} + +.bodywebsite .fs-6 { + font-size: 1rem !important; +} + +.bodywebsite .fst-italic { + font-style: italic !important; +} + +.bodywebsite .fst-normal { + font-style: normal !important; +} + +.bodywebsite .fw-light { + font-weight: 300 !important; +} + +.bodywebsite .fw-lighter { + font-weight: lighter !important; +} + +.bodywebsite .fw-normal { + font-weight: 400 !important; +} + +.bodywebsite .fw-bold { + font-weight: 700 !important; +} + +.bodywebsite .fw-semibold { + font-weight: 600 !important; +} + +.bodywebsite .fw-bolder { + font-weight: bolder !important; +} + +.bodywebsite .lh-1 { + line-height: 1 !important; +} + +.bodywebsite .lh-sm { + line-height: 1.25 !important; +} + +.bodywebsite .lh-base { + line-height: 1.5 !important; +} + +.bodywebsite .lh-lg { + line-height: 2 !important; +} + +.bodywebsite .text-start { + text-align: left !important; +} + +.bodywebsite .text-end { + text-align: right !important; +} + +.bodywebsite .text-center { + text-align: center !important; +} + +.bodywebsite .text-decoration-none { + text-decoration: none !important; +} + +.bodywebsite .text-decoration-underline { + text-decoration: underline !important; +} + +.bodywebsite .text-decoration-line-through { + text-decoration: line-through !important; +} + +.bodywebsite .text-lowercase { + text-transform: lowercase !important; +} + +.bodywebsite .text-uppercase { + text-transform: uppercase !important; +} + +.bodywebsite .text-capitalize { + text-transform: capitalize !important; +} + +.bodywebsite .text-wrap { + white-space: normal !important; +} + +.bodywebsite .text-nowrap { + white-space: nowrap !important; +} + +.bodywebsite .text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +.bodywebsite .text-primary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-secondary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-success { + --bs-text-opacity: 1; +} + +.bodywebsite .text-info { + --bs-text-opacity: 1; +} + +.bodywebsite .text-warning { + --bs-text-opacity: 1; +} + +.bodywebsite .text-danger { + --bs-text-opacity: 1; +} + +.bodywebsite .text-light { + --bs-text-opacity: 1; +} + +.bodywebsite .text-dark { + --bs-text-opacity: 1; +} + +.bodywebsite .text-black { + --bs-text-opacity: 1; +} + +.bodywebsite .text-white { + --bs-text-opacity: 1; +} + +.bodywebsite .text-body { + --bs-text-opacity: 1; +} + +.bodywebsite .text-muted { + --bs-text-opacity: 1; + color: #6c757d !important; +} + +.bodywebsite .text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.bodywebsite .text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.bodywebsite .text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.bodywebsite .text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.bodywebsite .text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.bodywebsite .text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.bodywebsite .text-opacity-100 { + --bs-text-opacity: 1; +} + +.bodywebsite .bg-primary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-secondary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-success { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-info { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-warning { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-danger { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-light { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-dark { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-black { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-white { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-body { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-transparent { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bodywebsite .bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bodywebsite .bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bodywebsite .bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bodywebsite .bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.bodywebsite .user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} + +.bodywebsite .user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + user-select: auto !important; +} + +.bodywebsite .user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + user-select: none !important; +} + +.bodywebsite .pe-none { + pointer-events: none !important; +} + +.bodywebsite .pe-auto { + pointer-events: auto !important; +} + +.bodywebsite .rounded { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-0 { + border-radius: 0 !important; +} + +.bodywebsite .rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.bodywebsite .rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.bodywebsite .rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.bodywebsite .rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} + +.bodywebsite .rounded-circle { + border-radius: 50% !important; +} + +.bodywebsite .rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.bodywebsite .rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .visible { + visibility: visible !important; +} + +.bodywebsite .invisible { + visibility: hidden !important; +} + +@media (min-width: 576px) { + .bodywebsite .float-sm-start { + float: left !important; + } + + .bodywebsite .float-sm-end { + float: right !important; + } + + .bodywebsite .float-sm-none { + float: none !important; + } + + .bodywebsite .d-sm-inline { + display: inline !important; + } + + .bodywebsite .d-sm-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-sm-block { + display: block !important; + } + + .bodywebsite .d-sm-grid { + display: grid !important; + } + + .bodywebsite .d-sm-table { + display: table !important; + } + + .bodywebsite .d-sm-table-row { + display: table-row !important; + } + + .bodywebsite .d-sm-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-sm-flex { + display: flex !important; + } + + .bodywebsite .d-sm-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-sm-none { + display: none !important; + } + + .bodywebsite .flex-sm-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-sm-row { + flex-direction: row !important; + } + + .bodywebsite .flex-sm-column { + flex-direction: column !important; + } + + .bodywebsite .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-sm-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-sm-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-sm-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-sm-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-sm-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-sm-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-sm-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-sm-center { + align-items: center !important; + } + + .bodywebsite .align-items-sm-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-sm-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-sm-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-sm-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-sm-center { + align-content: center !important; + } + + .bodywebsite .align-content-sm-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-sm-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-sm-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-sm-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-sm-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-sm-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-sm-center { + align-self: center !important; + } + + .bodywebsite .align-self-sm-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-sm-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-sm-first { + order: -1 !important; + } + + .bodywebsite .order-sm-0 { + order: 0 !important; + } + + .bodywebsite .order-sm-1 { + order: 1 !important; + } + + .bodywebsite .order-sm-2 { + order: 2 !important; + } + + .bodywebsite .order-sm-3 { + order: 3 !important; + } + + .bodywebsite .order-sm-4 { + order: 4 !important; + } + + .bodywebsite .order-sm-5 { + order: 5 !important; + } + + .bodywebsite .order-sm-last { + order: 6 !important; + } + + .bodywebsite .m-sm-0 { + margin: 0 !important; + } + + .bodywebsite .m-sm-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-sm-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-sm-3 { + margin: 1rem !important; + } + + .bodywebsite .m-sm-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-sm-5 { + margin: 3rem !important; + } + + .bodywebsite .m-sm-auto { + margin: auto !important; + } + + .bodywebsite .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-sm-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-sm-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-sm-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-sm-auto { + margin-top: auto !important; + } + + .bodywebsite .me-sm-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-sm-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-sm-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-sm-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-sm-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-sm-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-sm-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-sm-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-sm-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-sm-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-sm-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-sm-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-sm-auto { + margin-left: auto !important; + } + + .bodywebsite .p-sm-0 { + padding: 0 !important; + } + + .bodywebsite .p-sm-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-sm-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-sm-3 { + padding: 1rem !important; + } + + .bodywebsite .p-sm-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-sm-5 { + padding: 3rem !important; + } + + .bodywebsite .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-sm-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-sm-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-sm-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-sm-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-sm-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-sm-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-sm-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-sm-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-sm-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-sm-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-sm-0 { + gap: 0 !important; + } + + .bodywebsite .gap-sm-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-sm-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-sm-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-sm-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-sm-5 { + gap: 3rem !important; + } + + .bodywebsite .text-sm-start { + text-align: left !important; + } + + .bodywebsite .text-sm-end { + text-align: right !important; + } + + .bodywebsite .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .bodywebsite .float-md-start { + float: left !important; + } + + .bodywebsite .float-md-end { + float: right !important; + } + + .bodywebsite .float-md-none { + float: none !important; + } + + .bodywebsite .d-md-inline { + display: inline !important; + } + + .bodywebsite .d-md-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-md-block { + display: block !important; + } + + .bodywebsite .d-md-grid { + display: grid !important; + } + + .bodywebsite .d-md-table { + display: table !important; + } + + .bodywebsite .d-md-table-row { + display: table-row !important; + } + + .bodywebsite .d-md-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-md-flex { + display: flex !important; + } + + .bodywebsite .d-md-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-md-none { + display: none !important; + } + + .bodywebsite .flex-md-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-md-row { + flex-direction: row !important; + } + + .bodywebsite .flex-md-column { + flex-direction: column !important; + } + + .bodywebsite .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-md-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-md-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-md-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-md-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-md-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-md-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-md-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-md-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-md-center { + align-items: center !important; + } + + .bodywebsite .align-items-md-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-md-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-md-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-md-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-md-center { + align-content: center !important; + } + + .bodywebsite .align-content-md-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-md-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-md-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-md-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-md-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-md-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-md-center { + align-self: center !important; + } + + .bodywebsite .align-self-md-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-md-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-md-first { + order: -1 !important; + } + + .bodywebsite .order-md-0 { + order: 0 !important; + } + + .bodywebsite .order-md-1 { + order: 1 !important; + } + + .bodywebsite .order-md-2 { + order: 2 !important; + } + + .bodywebsite .order-md-3 { + order: 3 !important; + } + + .bodywebsite .order-md-4 { + order: 4 !important; + } + + .bodywebsite .order-md-5 { + order: 5 !important; + } + + .bodywebsite .order-md-last { + order: 6 !important; + } + + .bodywebsite .m-md-0 { + margin: 0 !important; + } + + .bodywebsite .m-md-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-md-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-md-3 { + margin: 1rem !important; + } + + .bodywebsite .m-md-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-md-5 { + margin: 3rem !important; + } + + .bodywebsite .m-md-auto { + margin: auto !important; + } + + .bodywebsite .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-md-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-md-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-md-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-md-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-md-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-md-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-md-auto { + margin-top: auto !important; + } + + .bodywebsite .me-md-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-md-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-md-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-md-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-md-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-md-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-md-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-md-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-md-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-md-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-md-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-md-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-md-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-md-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-md-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-md-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-md-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-md-auto { + margin-left: auto !important; + } + + .bodywebsite .p-md-0 { + padding: 0 !important; + } + + .bodywebsite .p-md-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-md-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-md-3 { + padding: 1rem !important; + } + + .bodywebsite .p-md-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-md-5 { + padding: 3rem !important; + } + + .bodywebsite .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-md-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-md-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-md-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-md-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-md-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-md-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-md-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-md-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-md-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-md-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-md-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-md-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-md-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-md-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-md-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-md-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-md-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-md-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-md-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-md-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-md-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-md-0 { + gap: 0 !important; + } + + .bodywebsite .gap-md-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-md-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-md-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-md-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-md-5 { + gap: 3rem !important; + } + + .bodywebsite .text-md-start { + text-align: left !important; + } + + .bodywebsite .text-md-end { + text-align: right !important; + } + + .bodywebsite .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .bodywebsite .float-lg-start { + float: left !important; + } + + .bodywebsite .float-lg-end { + float: right !important; + } + + .bodywebsite .float-lg-none { + float: none !important; + } + + .bodywebsite .d-lg-inline { + display: inline !important; + } + + .bodywebsite .d-lg-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-lg-block { + display: block !important; + } + + .bodywebsite .d-lg-grid { + display: grid !important; + } + + .bodywebsite .d-lg-table { + display: table !important; + } + + .bodywebsite .d-lg-table-row { + display: table-row !important; + } + + .bodywebsite .d-lg-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-lg-flex { + display: flex !important; + } + + .bodywebsite .d-lg-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-lg-none { + display: none !important; + } + + .bodywebsite .flex-lg-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-lg-row { + flex-direction: row !important; + } + + .bodywebsite .flex-lg-column { + flex-direction: column !important; + } + + .bodywebsite .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-lg-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-lg-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-lg-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-lg-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-lg-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-lg-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-lg-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-lg-center { + align-items: center !important; + } + + .bodywebsite .align-items-lg-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-lg-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-lg-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-lg-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-lg-center { + align-content: center !important; + } + + .bodywebsite .align-content-lg-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-lg-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-lg-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-lg-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-lg-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-lg-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-lg-center { + align-self: center !important; + } + + .bodywebsite .align-self-lg-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-lg-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-lg-first { + order: -1 !important; + } + + .bodywebsite .order-lg-0 { + order: 0 !important; + } + + .bodywebsite .order-lg-1 { + order: 1 !important; + } + + .bodywebsite .order-lg-2 { + order: 2 !important; + } + + .bodywebsite .order-lg-3 { + order: 3 !important; + } + + .bodywebsite .order-lg-4 { + order: 4 !important; + } + + .bodywebsite .order-lg-5 { + order: 5 !important; + } + + .bodywebsite .order-lg-last { + order: 6 !important; + } + + .bodywebsite .m-lg-0 { + margin: 0 !important; + } + + .bodywebsite .m-lg-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-lg-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-lg-3 { + margin: 1rem !important; + } + + .bodywebsite .m-lg-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-lg-5 { + margin: 3rem !important; + } + + .bodywebsite .m-lg-auto { + margin: auto !important; + } + + .bodywebsite .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-lg-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-lg-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-lg-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-lg-auto { + margin-top: auto !important; + } + + .bodywebsite .me-lg-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-lg-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-lg-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-lg-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-lg-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-lg-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-lg-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-lg-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-lg-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-lg-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-lg-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-lg-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-lg-auto { + margin-left: auto !important; + } + + .bodywebsite .p-lg-0 { + padding: 0 !important; + } + + .bodywebsite .p-lg-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-lg-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-lg-3 { + padding: 1rem !important; + } + + .bodywebsite .p-lg-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-lg-5 { + padding: 3rem !important; + } + + .bodywebsite .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-lg-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-lg-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-lg-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-lg-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-lg-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-lg-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-lg-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-lg-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-lg-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-lg-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-lg-0 { + gap: 0 !important; + } + + .bodywebsite .gap-lg-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-lg-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-lg-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-lg-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-lg-5 { + gap: 3rem !important; + } + + .bodywebsite .text-lg-start { + text-align: left !important; + } + + .bodywebsite .text-lg-end { + text-align: right !important; + } + + .bodywebsite .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .float-xl-start { + float: left !important; + } + + .bodywebsite .float-xl-end { + float: right !important; + } + + .bodywebsite .float-xl-none { + float: none !important; + } + + .bodywebsite .d-xl-inline { + display: inline !important; + } + + .bodywebsite .d-xl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xl-block { + display: block !important; + } + + .bodywebsite .d-xl-grid { + display: grid !important; + } + + .bodywebsite .d-xl-table { + display: table !important; + } + + .bodywebsite .d-xl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xl-flex { + display: flex !important; + } + + .bodywebsite .d-xl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xl-none { + display: none !important; + } + + .bodywebsite .flex-xl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xl-first { + order: -1 !important; + } + + .bodywebsite .order-xl-0 { + order: 0 !important; + } + + .bodywebsite .order-xl-1 { + order: 1 !important; + } + + .bodywebsite .order-xl-2 { + order: 2 !important; + } + + .bodywebsite .order-xl-3 { + order: 3 !important; + } + + .bodywebsite .order-xl-4 { + order: 4 !important; + } + + .bodywebsite .order-xl-5 { + order: 5 !important; + } + + .bodywebsite .order-xl-last { + order: 6 !important; + } + + .bodywebsite .m-xl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xl-start { + text-align: left !important; + } + + .bodywebsite .text-xl-end { + text-align: right !important; + } + + .bodywebsite .text-xl-center { + text-align: center !important; + } +} + +@media (min-width: 1400px) { + .bodywebsite .float-xxl-start { + float: left !important; + } + + .bodywebsite .float-xxl-end { + float: right !important; + } + + .bodywebsite .float-xxl-none { + float: none !important; + } + + .bodywebsite .d-xxl-inline { + display: inline !important; + } + + .bodywebsite .d-xxl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xxl-block { + display: block !important; + } + + .bodywebsite .d-xxl-grid { + display: grid !important; + } + + .bodywebsite .d-xxl-table { + display: table !important; + } + + .bodywebsite .d-xxl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xxl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xxl-flex { + display: flex !important; + } + + .bodywebsite .d-xxl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xxl-none { + display: none !important; + } + + .bodywebsite .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xxl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xxl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xxl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xxl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xxl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xxl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xxl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xxl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xxl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xxl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xxl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xxl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xxl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xxl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xxl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xxl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xxl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xxl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xxl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xxl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xxl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xxl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xxl-first { + order: -1 !important; + } + + .bodywebsite .order-xxl-0 { + order: 0 !important; + } + + .bodywebsite .order-xxl-1 { + order: 1 !important; + } + + .bodywebsite .order-xxl-2 { + order: 2 !important; + } + + .bodywebsite .order-xxl-3 { + order: 3 !important; + } + + .bodywebsite .order-xxl-4 { + order: 4 !important; + } + + .bodywebsite .order-xxl-5 { + order: 5 !important; + } + + .bodywebsite .order-xxl-last { + order: 6 !important; + } + + .bodywebsite .m-xxl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xxl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xxl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xxl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xxl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xxl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xxl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xxl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xxl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xxl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xxl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xxl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xxl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xxl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xxl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xxl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xxl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xxl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xxl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xxl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xxl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xxl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xxl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xxl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xxl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xxl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xxl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xxl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xxl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xxl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xxl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xxl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xxl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xxl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xxl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xxl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xxl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xxl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xxl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xxl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xxl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xxl-start { + text-align: left !important; + } + + .bodywebsite .text-xxl-end { + text-align: right !important; + } + + .bodywebsite .text-xxl-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .fs-1 { + font-size: 2.5rem !important; + } + + .bodywebsite .fs-2 { + font-size: 2rem !important; + } + + .bodywebsite .fs-3 { + font-size: 1.75rem !important; + } + + .bodywebsite .fs-4 { + font-size: 1.5rem !important; + } +} + +@media print { + .bodywebsite .d-print-inline { + display: inline !important; + } + + .bodywebsite .d-print-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-print-block { + display: block !important; + } + + .bodywebsite .d-print-grid { + display: grid !important; + } + + .bodywebsite .d-print-table { + display: table !important; + } + + .bodywebsite .d-print-table-row { + display: table-row !important; + } + + .bodywebsite .d-print-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-print-flex { + display: flex !important; + } + + .bodywebsite .d-print-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-print-none { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ + +.bodywebsite #mysection1 { + font-size: 1.2rem; + font-weight: bold; +} + +.bodywebsite .flex { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.bodywebsite h1 h2 h3 h4 { + font-family: Anton; + font-weight: 900; +} + +.bodywebsite .btn-perso { + background-color: #50759e; + padding-left: 20px; + padding-right: 20px; + text-align: center; + color: #fff; + font-weight: bold; +} + +.bodywebsite .btn-perso:hover { + background-color: #fff; + color: #bb393c; +} + +.bodywebsite #landing { + background-color: #C84F37; + color: #fff; + min-height: 100vh; +} + +.bodywebsite #desc { + background-color: #292727; +} + +.bodywebsite nav { + padding-left: 30px; + padding-right: 30px; + background-color: rgba(12, 12, 12, 0.5) !important; + width: 100%; +} + +.bodywebsite #title { + font-size: 80px; + z-index: 11; +} + +.bodywebsite .img-landing { + position: relative; + top: 0%; + z-index: 10; +} + +.bodywebsite .pointed { + cursor: pointer; + background-color: #292727; + color: #fff; +} + +.bodywebsite #contact { + background-color: #C84F37; + color: white; +} + +.bodywebsite .container { + padding-top: 5%; + padding-bottom: 5%; +} + diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/wrapper.php new file mode 100644 index 00000000000..26adb3ef220 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/wrapper.php @@ -0,0 +1,278 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) { + $original_file = 'blog.rss'; +} + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost', 'status'=>1); + if ($l) { + $filters['lang'] = $l; + } + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($l); + $outputlangs->loadLangs(array("main", "other")); + $title = $desc = $outputlangs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed']; + $sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) { + $db->close(); +} +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/article.png b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/article.png new file mode 100644 index 00000000000..4901fb27d6b Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/article.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/bg.png b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/bg.png new file mode 100644 index 00000000000..33393041017 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/bg.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/happy-man.png b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/happy-man.png new file mode 100644 index 00000000000..af36357a957 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-homesubmenu/medias/image/websitekey/happy-man.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-homesubmenu/website_pages.sql b/htdocs/install/doctemplates/websites/website_template-homesubmenu/website_pages.sql new file mode 100644 index 00000000000..bbcf00e3849 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-homesubmenu/website_pages.sql @@ -0,0 +1,9 @@ +-- File generated by Dolibarr 17.0.0-alpha -- 2022-10-09 10:36:48 UTC --; +-- Page ID 202 -> 1__+MAX_llx_website_page__ - Aliases index --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(1__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'index', '', 'Home page', '', '', '', '', '1', '2022-07-27 00:42:00', '2022-10-09 12:36:07', null, '', 'page', '', '__N__email;__N__ $message = GETPOST(\'message\', \'alpha\');__N__ $cmail = new CMailFile(\'Contact from website\', $to, $from, $message);__N__ if ($cmail->sendfile()) {__N__ ?>__N__ __N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N__
    __N__ __N__ __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    __N__ LOREM IPSUM DOLOR SIT AMET EZAJB__N__

    __N__ __N__
    __N__
    __N__

    Our Company

    __N__

    __N__ Lorem ipsum dolor, sit amet consectetur adipisicing__N__ elit. Ab fuga nobis omnis alias, aliquid iste cumque__N__ tempora nam reprehenderit quia itaque debitis,__N__ nostrum labore rerum reiciendis laboriosam unde,__N__ tempore corporis.__N__

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Founders

    __N__
      __N__
    • __N__

      Author One

      __N__
    • __N__
    • __N__

      Author Two

      __N__
    • __N__
    • __N__

      Author Three

      __N__
    • __N__
    • __N__

      Author Four

      __N__
    • __N__
    __N__
    __N__
    __N__

    About

    __N__

    __N__ Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis accusantium earum sed odit velit laudantium ex libero quisquam consectetur, __N__ dolorem vero ipsam perferendis quibusdam itaque omnis a consequatur error repellat.__N__

    __N__
    __N__
    __N__
    __N__
    __N____N__
    __N__

    Contact us

    __N__ __N__

    Do you have any questions? Please do not hesitate to contact us directly. Our team will come back to you within__N__ a matter of hours to help you.

    __N__ __N__
    __N__ __N__ __N__
    __N__
    __N__ \" />__N__ __N__
    __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N__
      __N__
    • __N__

      getFullAddress() ?>

      __N__
    • __N__ __N__
    • __N__

      phone ?>

      __N__
    • __N__ __N__
    • __N__

      email ?>

      __N__
    • __N__
    __N__
    __N____N__
    __N__ __N__ __N__
    __N__
    __N__ __N__
    __N__', '', 0); +UPDATE llx_website SET fk_default_home = 1__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/doctemplates/websites/website_template-noimg.jpg b/htdocs/install/doctemplates/websites/website_template-noimg.jpg new file mode 100644 index 00000000000..5464bf5dd5d Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-noimg.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/LICENSE b/htdocs/install/doctemplates/websites/website_template-noimg/LICENSE new file mode 100644 index 00000000000..871ef743662 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/LICENSE @@ -0,0 +1,4 @@ +LICENSE +------- + +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/README.md b/htdocs/install/doctemplates/websites/website_template-noimg/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-noimg/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-noimg/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/README.md b/htdocs/install/doctemplates/websites/website_template-noimg/containers/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-noimg/containers/htmlheader.html new file mode 100644 index 00000000000..a58ea695524 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/htmlheader.html @@ -0,0 +1,6 @@ + + + diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/index.php b/htdocs/install/doctemplates/websites/website_template-noimg/containers/index.php new file mode 100644 index 00000000000..64331a0ec08 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/index.php @@ -0,0 +1,4 @@ +ref.'/page80.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/javascript.js.php b/htdocs/install/doctemplates/websites/website_template-noimg/containers/javascript.js.php new file mode 100644 index 00000000000..f58102cf00b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/javascript.js.php @@ -0,0 +1,13 @@ + +/* JS content (all pages) */ + diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-noimg/containers/manifest.json.php new file mode 100644 index 00000000000..b61531d6c11 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/manifest.json.php @@ -0,0 +1,13 @@ + + + + + +index + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + + + + Template + + + + + +email; + $message = GETPOST('message', 'alpha'); + $cmail = new CMailFile('Contact from website', $to, $from, $message); + if ($cmail->sendfile()) { + ?> + + trans("ErrorFailedToSendMail", $from, $to).'. '.$cmail->error; + } +} +?> +
    +
    + + +
    +
    + +
    +
    +
    +

    + Brand + Name +

    +

    + Hello fellows, here is a description of the + brand +

    + + + +
    +
    +
    +
    + +
    +
    +
    +
    +

    Products

    +
    +
    +
    +
    +
    + +
    +

    Product 1

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    + +
    +

    Product 2

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    + +
    +

    Product 3

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    + +
    +

    Product 4

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    + +
    +

    Product 5

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    + +
    +

    Product 6

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Contact us

    +

    + Email: email ?> +

    +

    + Phone-number: phone ?> +

    +
    +
    +

    + Or complete the form +

    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-noimg/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-noimg/containers/styles.css.php new file mode 100644 index 00000000000..92936be1175 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/styles.css.php @@ -0,0 +1,12528 @@ + +@charset "UTF-8"; + +.bodywebsite { + /*! + * Bootstrap v5.2.1 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + /* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:options: { + "autoRename": true, + "stringMap":[ { + "name" : "prev-next", + "search" : "prev", + "replace" : "next" + } ] +} */ + /* rtl:begin:remove */ + /* rtl:end:remove */ + /*# sourceMappingURL=bootstrap.css.map */; +} + +.bodywebsite :root { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg-rgb: 255, 255, 255; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #0d6efd; + --bs-link-hover-color: #0a58ca; + --bs-code-color: #d63384; + --bs-highlight-bg: #fff3cd; +} + +.bodywebsite *, + .bodywebsite *::before, + .bodywebsite *::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + .bodywebsite :root { + scroll-behavior: smooth; + } +} + +.bodywebsite body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} + +.bodywebsite hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} + +.bodywebsite h6, .bodywebsite .h6, .bodywebsite h5, .bodywebsite .h5, .bodywebsite h4, .bodywebsite .h4, .bodywebsite h3, .bodywebsite .h3, .bodywebsite h2, .bodywebsite .h2, .bodywebsite h1, .bodywebsite .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +.bodywebsite .text-dark{ + color: black; +} + +.bodywebsite h1, .bodywebsite .h1 { + font-size: calc(1.375rem + 1.5vw); +} + +@media (min-width: 1200px) { + .bodywebsite h1, .bodywebsite .h1 { + font-size: 2.5rem; + } +} + +.bodywebsite h2, .bodywebsite .h2 { + font-size: calc(1.325rem + 0.9vw); +} + +@media (min-width: 1200px) { + .bodywebsite h2, .bodywebsite .h2 { + font-size: 2rem; + } +} + +.bodywebsite h3, .bodywebsite .h3 { + font-size: calc(1.3rem + 0.6vw); +} + +@media (min-width: 1200px) { + .bodywebsite h3, .bodywebsite .h3 { + font-size: 1.75rem; + } +} + +.bodywebsite h4, .bodywebsite .h4 { + font-size: calc(1.275rem + 0.3vw); +} + +@media (min-width: 1200px) { + .bodywebsite h4, .bodywebsite .h4 { + font-size: 1.5rem; + } +} + +.bodywebsite h5, .bodywebsite .h5 { + font-size: 1.25rem; +} + +.bodywebsite h6, .bodywebsite .h6 { + font-size: 1rem; +} + +.bodywebsite p { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +.bodywebsite address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +.bodywebsite ol, + .bodywebsite ul { + padding-left: 2rem; +} + +.bodywebsite ol, + .bodywebsite ul, + .bodywebsite dl { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite ol ol, + .bodywebsite ul ul, + .bodywebsite ol ul, + .bodywebsite ul ol { + margin-bottom: 0; +} + +.bodywebsite dt { + font-weight: 700; +} + +.bodywebsite dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +.bodywebsite blockquote { + margin: 0 0 1rem; +} + +.bodywebsite b, + .bodywebsite strong { + font-weight: bolder; +} + +.bodywebsite small, .bodywebsite .small { + font-size: 0.875em; +} + +.bodywebsite mark, .bodywebsite .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +.bodywebsite sub, + .bodywebsite sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +.bodywebsite sub { + bottom: -0.25em; +} + +.bodywebsite sup { + top: -0.5em; +} + +.bodywebsite a { + color: var(--bs-link-color); + text-decoration: underline; +} + +.bodywebsite a:hover { + color: var(--bs-link-hover-color); +} + +.bodywebsite a:not([href]):not([class]), .bodywebsite a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +.bodywebsite pre, + .bodywebsite code, + .bodywebsite kbd, + .bodywebsite samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +.bodywebsite pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} + +.bodywebsite pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +.bodywebsite code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} + +.bodywebsite a > code { + color: inherit; +} + +.bodywebsite kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} + +.bodywebsite kbd kbd { + padding: 0; + font-size: 1em; +} + +.bodywebsite figure { + margin: 0 0 1rem; +} + +.bodywebsite img, + .bodywebsite svg { + vertical-align: middle; +} + +.bodywebsite table { + caption-side: bottom; + border-collapse: collapse; +} + +.bodywebsite caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +.bodywebsite th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +.bodywebsite thead, + .bodywebsite tbody, + .bodywebsite tfoot, + .bodywebsite tr, + .bodywebsite td, + .bodywebsite th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +.bodywebsite label { + display: inline-block; +} + +.bodywebsite button { + border-radius: 0; +} + +.bodywebsite button:focus:not(:focus-visible) { + outline: 0; +} + +.bodywebsite input, + .bodywebsite button, + .bodywebsite select, + .bodywebsite optgroup, + .bodywebsite textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.bodywebsite button, + .bodywebsite select { + text-transform: none; +} + +.bodywebsite [role=button] { + cursor: pointer; +} + +.bodywebsite select { + word-wrap: normal; +} + +.bodywebsite select:disabled { + opacity: 1; +} + +.bodywebsite [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +.bodywebsite button, + .bodywebsite [type=button], + .bodywebsite [type=reset], + .bodywebsite [type=submit] { + -webkit-appearance: button; +} + +.bodywebsite button:not(:disabled), + .bodywebsite [type=button]:not(:disabled), + .bodywebsite [type=reset]:not(:disabled), + .bodywebsite [type=submit]:not(:disabled) { + cursor: pointer; +} + +.bodywebsite ::-moz-focus-inner { + padding: 0; + border-style: none; +} + +.bodywebsite textarea { + resize: vertical; +} + +.bodywebsite fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +.bodywebsite legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} + +@media (min-width: 1200px) { + .bodywebsite legend { + font-size: 1.5rem; + } +} + +.bodywebsite legend + * { + clear: left; +} + +.bodywebsite ::-webkit-datetime-edit-fields-wrapper, + .bodywebsite ::-webkit-datetime-edit-text, + .bodywebsite ::-webkit-datetime-edit-minute, + .bodywebsite ::-webkit-datetime-edit-hour-field, + .bodywebsite ::-webkit-datetime-edit-day-field, + .bodywebsite ::-webkit-datetime-edit-month-field, + .bodywebsite ::-webkit-datetime-edit-year-field { + padding: 0; +} + +.bodywebsite ::-webkit-inner-spin-button { + height: auto; +} + +.bodywebsite [type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +.bodywebsite ::-webkit-search-decoration { + -webkit-appearance: none; +} + +.bodywebsite ::-webkit-color-swatch-wrapper { + padding: 0; +} + +.bodywebsite ::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite ::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite output { + display: inline-block; +} + +.bodywebsite iframe { + border: 0; +} + +.bodywebsite summary { + display: list-item; + cursor: pointer; +} + +.bodywebsite progress { + vertical-align: baseline; +} + +.bodywebsite [hidden] { + display: none !important; +} + +.bodywebsite .lead { + font-size: 1.25rem; + font-weight: 300; +} + +.bodywebsite .display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-1 { + font-size: 5rem; + } +} + +.bodywebsite .display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-2 { + font-size: 4.5rem; + } +} + +.bodywebsite .display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-3 { + font-size: 4rem; + } +} + +.bodywebsite .display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-4 { + font-size: 3.5rem; + } +} + +.bodywebsite .display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-5 { + font-size: 3rem; + } +} + +.bodywebsite .display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-6 { + font-size: 2.5rem; + } +} + +.bodywebsite .list-unstyled { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline-item { + display: inline-block; +} + +.bodywebsite .list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.bodywebsite .initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.bodywebsite .blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} + +.bodywebsite .blockquote > :last-child { + margin-bottom: 0; +} + +.bodywebsite .blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .blockquote-footer::before { + content: "— "; +} + +.bodywebsite .img-fluid { + max-width: 100%; + height: auto; +} + +.bodywebsite .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} + +.bodywebsite .figure { + display: inline-block; +} + +.bodywebsite .figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.bodywebsite .figure-caption { + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .container, + .bodywebsite .container-fluid, + .bodywebsite .container-xxl, + .bodywebsite .container-xl, + .bodywebsite .container-lg, + .bodywebsite .container-md, + .bodywebsite .container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .container-sm, .bodywebsite .container { + max-width: 540px; + } +} + +@media (min-width: 768px) { + .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 720px; + } +} + +@media (min-width: 992px) { + .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 960px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1140px; + } +} + +@media (min-width: 1400px) { + .bodywebsite .container-xxl, .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1320px; + } +} + +.bodywebsite .row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} + +.bodywebsite .row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.bodywebsite .col { + flex: 1 0 0%; +} + +.bodywebsite .row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.bodywebsite .row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.bodywebsite .row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.bodywebsite .col-auto { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.bodywebsite .col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.bodywebsite .col-3 { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.bodywebsite .col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.bodywebsite .col-6 { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.bodywebsite .col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.bodywebsite .col-9 { + flex: 0 0 auto; + width: 75%; +} + +.bodywebsite .col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.bodywebsite .col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.bodywebsite .col-12 { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .offset-1 { + margin-left: 8.33333333%; +} + +.bodywebsite .offset-2 { + margin-left: 16.66666667%; +} + +.bodywebsite .offset-3 { + margin-left: 25%; +} + +.bodywebsite .offset-4 { + margin-left: 33.33333333%; +} + +.bodywebsite .offset-5 { + margin-left: 41.66666667%; +} + +.bodywebsite .offset-6 { + margin-left: 50%; +} + +.bodywebsite .offset-7 { + margin-left: 58.33333333%; +} + +.bodywebsite .offset-8 { + margin-left: 66.66666667%; +} + +.bodywebsite .offset-9 { + margin-left: 75%; +} + +.bodywebsite .offset-10 { + margin-left: 83.33333333%; +} + +.bodywebsite .offset-11 { + margin-left: 91.66666667%; +} + +.bodywebsite .g-0, + .bodywebsite .gx-0 { + --bs-gutter-x: 0; +} + +.bodywebsite .g-0, + .bodywebsite .gy-0 { + --bs-gutter-y: 0; +} + +.bodywebsite .g-1, + .bodywebsite .gx-1 { + --bs-gutter-x: 0.25rem; +} + +.bodywebsite .g-1, + .bodywebsite .gy-1 { + --bs-gutter-y: 0.25rem; +} + +.bodywebsite .g-2, + .bodywebsite .gx-2 { + --bs-gutter-x: 0.5rem; +} + +.bodywebsite .g-2, + .bodywebsite .gy-2 { + --bs-gutter-y: 0.5rem; +} + +.bodywebsite .g-3, + .bodywebsite .gx-3 { + --bs-gutter-x: 1rem; +} + +.bodywebsite .g-3, + .bodywebsite .gy-3 { + --bs-gutter-y: 1rem; +} + +.bodywebsite .g-4, + .bodywebsite .gx-4 { + --bs-gutter-x: 1.5rem; +} + +.bodywebsite .g-4, + .bodywebsite .gy-4 { + --bs-gutter-y: 1.5rem; +} + +.bodywebsite .g-5, + .bodywebsite .gx-5 { + --bs-gutter-x: 3rem; +} + +.bodywebsite .g-5, + .bodywebsite .gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .bodywebsite .col-sm { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-sm-0 { + margin-left: 0; + } + + .bodywebsite .offset-sm-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-sm-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-sm-3 { + margin-left: 25%; + } + + .bodywebsite .offset-sm-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-sm-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-sm-6 { + margin-left: 50%; + } + + .bodywebsite .offset-sm-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-sm-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-sm-9 { + margin-left: 75%; + } + + .bodywebsite .offset-sm-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-sm-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gx-sm-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gy-sm-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 768px) { + .bodywebsite .col-md { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-md-0 { + margin-left: 0; + } + + .bodywebsite .offset-md-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-md-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-md-3 { + margin-left: 25%; + } + + .bodywebsite .offset-md-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-md-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-md-6 { + margin-left: 50%; + } + + .bodywebsite .offset-md-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-md-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-md-9 { + margin-left: 75%; + } + + .bodywebsite .offset-md-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-md-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-md-0, + .bodywebsite .gx-md-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-md-0, + .bodywebsite .gy-md-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-md-1, + .bodywebsite .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-md-1, + .bodywebsite .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gx-md-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gy-md-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gx-md-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gy-md-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 992px) { + .bodywebsite .col-lg { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-lg-0 { + margin-left: 0; + } + + .bodywebsite .offset-lg-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-lg-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-lg-3 { + margin-left: 25%; + } + + .bodywebsite .offset-lg-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-lg-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-lg-6 { + margin-left: 50%; + } + + .bodywebsite .offset-lg-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-lg-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-lg-9 { + margin-left: 75%; + } + + .bodywebsite .offset-lg-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-lg-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gx-lg-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gy-lg-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1200px) { + .bodywebsite .col-xl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gx-xl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gy-xl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1400px) { + .bodywebsite .col-xxl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xxl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xxl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xxl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xxl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gx-xxl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gy-xxl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} + +.bodywebsite .table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} + +.bodywebsite .table > tbody { + vertical-align: inherit; +} + +.bodywebsite .table > thead { + vertical-align: bottom; +} + +.bodywebsite .table-group-divider { + border-top: 2px solid currentcolor; +} + +.bodywebsite .caption-top { + caption-side: top; +} + +.bodywebsite .table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} + +.bodywebsite .table-bordered > :not(caption) > * { + border-width: 1px 0; +} + +.bodywebsite .table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} + +.bodywebsite .table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} + +.bodywebsite .table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.bodywebsite .table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} + +.bodywebsite .table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} + +.bodywebsite .table-primary { + --bs-table-color: #000; + --bs-table-bg: #cfe2ff; + --bs-table-border-color: #bacbe6; + --bs-table-striped-bg: #c5d7f2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bacbe6; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfd1ec; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-secondary { + --bs-table-color: #000; + --bs-table-bg: #e2e3e5; + --bs-table-border-color: #cbccce; + --bs-table-striped-bg: #d7d8da; + --bs-table-striped-color: #000; + --bs-table-active-bg: #cbccce; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d1d2d4; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-success { + --bs-table-color: #000; + --bs-table-bg: #d1e7dd; + --bs-table-border-color: #bcd0c7; + --bs-table-striped-bg: #c7dbd2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bcd0c7; + --bs-table-active-color: #000; + --bs-table-hover-bg: #c1d6cc; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-info { + --bs-table-color: #000; + --bs-table-bg: #cff4fc; + --bs-table-border-color: #badce3; + --bs-table-striped-bg: #c5e8ef; + --bs-table-striped-color: #000; + --bs-table-active-bg: #badce3; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfe2e9; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-warning { + --bs-table-color: #000; + --bs-table-bg: #fff3cd; + --bs-table-border-color: #e6dbb9; + --bs-table-striped-bg: #f2e7c3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e6dbb9; + --bs-table-active-color: #000; + --bs-table-hover-bg: #ece1be; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-danger { + --bs-table-color: #000; + --bs-table-bg: #f8d7da; + --bs-table-border-color: #dfc2c4; + --bs-table-striped-bg: #eccccf; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfc2c4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5c7ca; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-light { + --bs-table-color: #000; + --bs-table-bg: #f8f9fa; + --bs-table-border-color: #dfe0e1; + --bs-table-striped-bg: #ecedee; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfe0e1; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5e6e7; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-dark { + --bs-table-color: #fff; + --bs-table-bg: #212529; + --bs-table-border-color: #373b3e; + --bs-table-striped-bg: #2c3034; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #373b3e; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #323539; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .bodywebsite .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +.bodywebsite .form-label { + margin-bottom: 0.5rem; +} + +.bodywebsite .col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.bodywebsite .col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} + +.bodywebsite .col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} + +.bodywebsite .form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control { + transition: none; + } +} + +.bodywebsite .form-control[type=file] { + overflow: hidden; +} + +.bodywebsite .form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-control::-webkit-date-and-time-value { + height: 1.5em; +} + +.bodywebsite .form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control::placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control:disabled { + background-color: #e9ecef; + opacity: 1; +} + +.bodywebsite .form-control::-webkit-file-upload-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +.bodywebsite .form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + + .bodywebsite .form-control::file-selector-button { + transition: none; + } +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} + +.bodywebsite .form-control-plaintext:focus { + outline: 0; +} + +.bodywebsite .form-control-plaintext.form-control-sm, .bodywebsite .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.bodywebsite .form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-control-lg::-webkit-file-upload-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite .form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} + +.bodywebsite textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} + +.bodywebsite .form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite .form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-select { + transition: none; + } +} + +.bodywebsite .form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-select[multiple], .bodywebsite .form-select[size]:not([size="1"]) { + padding-right: 0.75rem; + background-image: none; +} + +.bodywebsite .form-select:disabled { + background-color: #e9ecef; +} + +.bodywebsite .form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #212529; +} + +.bodywebsite .form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} + +.bodywebsite .form-check .form-check-input { + float: left; + margin-left: -1.5em; +} + +.bodywebsite .form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} + +.bodywebsite .form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} + +.bodywebsite .form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0, 0, 0, 0.25); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; + print-color-adjust: exact; +} + +.bodywebsite .form-check-input[type=checkbox] { + border-radius: 0.25em; +} + +.bodywebsite .form-check-input[type=radio] { + border-radius: 50%; +} + +.bodywebsite .form-check-input:active { + filter: brightness(90%); +} + +.bodywebsite .form-check-input:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-check-input:checked { + background-color: #0d6efd; + border-color: #0d6efd; +} + +.bodywebsite .form-check-input:checked[type=checkbox] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:checked[type=radio] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input[type=checkbox]:indeterminate { + background-color: #0d6efd; + border-color: #0d6efd; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} + +.bodywebsite .form-check-input[disabled] ~ .form-check-label, .bodywebsite .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.bodywebsite .form-switch { + padding-left: 2.5em; +} + +.bodywebsite .form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-switch .form-check-input { + transition: none; + } +} + +.bodywebsite .form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} + +.bodywebsite .form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.bodywebsite .form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.bodywebsite .btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} + +.bodywebsite .btn-check[disabled] + .btn, .bodywebsite .btn-check:disabled + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} + +.bodywebsite .form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.bodywebsite .form-range:focus { + outline: 0; +} + +.bodywebsite .form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range::-moz-focus-outer { + border: 0; +} + +.bodywebsite .form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-webkit-slider-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-moz-range-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range:disabled { + pointer-events: none; +} + +.bodywebsite .form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-floating { + position: relative; +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext, + .bodywebsite .form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} + +.bodywebsite .form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-floating > label { + transition: none; + } +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} + +.bodywebsite .form-floating > .form-control::-moz-placeholder, .bodywebsite .form-floating > .form-control-plaintext::-moz-placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control::placeholder, + .bodywebsite .form-floating > .form-control-plaintext::placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown), .bodywebsite .form-floating > .form-control-plaintext:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:focus, .bodywebsite .form-floating > .form-control:not(:placeholder-shown), + .bodywebsite .form-floating > .form-control-plaintext:focus, + .bodywebsite .form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill, + .bodywebsite .form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:focus ~ label, + .bodywebsite .form-floating > .form-control:not(:placeholder-shown) ~ label, + .bodywebsite .form-floating > .form-control-plaintext ~ label, + .bodywebsite .form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} + +.bodywebsite .input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} + +.bodywebsite .input-group > .form-control, + .bodywebsite .input-group > .form-select, + .bodywebsite .input-group > .form-floating { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} + +.bodywebsite .input-group > .form-control:focus, + .bodywebsite .input-group > .form-select:focus, + .bodywebsite .input-group > .form-floating:focus-within { + z-index: 5; +} + +.bodywebsite .input-group .btn { + position: relative; + z-index: 2; +} + +.bodywebsite .input-group .btn:focus { + z-index: 5; +} + +.bodywebsite .input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.375rem; +} + +.bodywebsite .input-group-lg > .form-control, + .bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-lg > .input-group-text, + .bodywebsite .input-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .input-group-sm > .form-control, + .bodywebsite .input-group-sm > .form-select, + .bodywebsite .input-group-sm > .input-group-text, + .bodywebsite .input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-sm > .form-select { + padding-right: 3rem; +} + +.bodywebsite .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .input-group > .form-floating:not(:first-child) > .form-control, + .bodywebsite .input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #198754; +} + +.bodywebsite .valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(25, 135, 84, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :valid ~ .valid-feedback, + .bodywebsite .was-validated :valid ~ .valid-tooltip, + .bodywebsite .is-valid ~ .valid-feedback, + .bodywebsite .is-valid ~ .valid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:valid, .bodywebsite .form-control.is-valid { + border-color: #198754; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:valid:focus, .bodywebsite .form-control.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:valid, .bodywebsite textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:valid, .bodywebsite .form-select.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-select:valid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:valid:not([multiple])[size="1"], .bodywebsite .form-select.is-valid:not([multiple]):not([size]), .bodywebsite .form-select.is-valid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:valid:focus, .bodywebsite .form-select.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-control-color:valid, .bodywebsite .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:valid, .bodywebsite .form-check-input.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:checked, .bodywebsite .form-check-input.is-valid:checked { + background-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:focus, .bodywebsite .form-check-input.is-valid:focus { + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-check-input:valid ~ .form-check-label, .bodywebsite .form-check-input.is-valid ~ .form-check-label { + color: #198754; +} + +.bodywebsite .form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):valid, .bodywebsite .input-group > .form-control:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):valid, + .bodywebsite .input-group > .form-select:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):valid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-valid { + z-index: 3; +} + +.bodywebsite .invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #dc3545; +} + +.bodywebsite .invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :invalid ~ .invalid-feedback, + .bodywebsite .was-validated :invalid ~ .invalid-tooltip, + .bodywebsite .is-invalid ~ .invalid-feedback, + .bodywebsite .is-invalid ~ .invalid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:invalid, .bodywebsite .form-control.is-invalid { + border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:invalid:focus, .bodywebsite .form-control.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:invalid, .bodywebsite textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:invalid, .bodywebsite .form-select.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-select:invalid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:invalid:not([multiple])[size="1"], .bodywebsite .form-select.is-invalid:not([multiple]):not([size]), .bodywebsite .form-select.is-invalid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:invalid:focus, .bodywebsite .form-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-control-color:invalid, .bodywebsite .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:invalid, .bodywebsite .form-check-input.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:checked, .bodywebsite .form-check-input.is-invalid:checked { + background-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:focus, .bodywebsite .form-check-input.is-invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-check-input:invalid ~ .form-check-label, .bodywebsite .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.bodywebsite .form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):invalid, .bodywebsite .input-group > .form-control:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):invalid, + .bodywebsite .input-group > .form-select:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):invalid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-invalid { + z-index: 4; +} + +.bodywebsite .btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #212529; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .btn { + transition: none; + } +} + +.bodywebsite :not(.btn-check) + .btn:hover, .bodywebsite .btn:first-child:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} + +.bodywebsite .btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:checked + .btn, .bodywebsite :not(.btn-check) + .btn:active, .bodywebsite .btn:first-child:active, .bodywebsite .btn.active, .bodywebsite .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} + +.bodywebsite .btn-check:checked + .btn:focus-visible, .bodywebsite :not(.btn-check) + .btn:active:focus-visible, .bodywebsite .btn:first-child:active:focus-visible, .bodywebsite .btn.active:focus-visible, .bodywebsite .btn.show:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn:disabled, .bodywebsite .btn.disabled, .bodywebsite fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} + +.bodywebsite .btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0b5ed7; + --bs-btn-hover-border-color: #0a58ca; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0a58ca; + --bs-btn-active-border-color: #0a53be; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #0d6efd; + --bs-btn-disabled-border-color: #0d6efd; +} + +.bodywebsite .btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #5c636a; + --bs-btn-hover-border-color: #565e64; + --bs-btn-focus-shadow-rgb: 130, 138, 145; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #565e64; + --bs-btn-active-border-color: #51585e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #6c757d; + --bs-btn-disabled-border-color: #6c757d; +} + +.bodywebsite .btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #157347; + --bs-btn-hover-border-color: #146c43; + --bs-btn-focus-shadow-rgb: 60, 153, 110; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #146c43; + --bs-btn-active-border-color: #13653f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #198754; + --bs-btn-disabled-border-color: #198754; +} + +.bodywebsite .btn-info { + --bs-btn-color: #000; + --bs-btn-bg: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #31d2f2; + --bs-btn-hover-border-color: #25cff2; + --bs-btn-focus-shadow-rgb: 11, 172, 204; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #3dd5f3; + --bs-btn-active-border-color: #25cff2; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #0dcaf0; + --bs-btn-disabled-border-color: #0dcaf0; +} + +.bodywebsite .btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffca2c; + --bs-btn-hover-border-color: #ffc720; + --bs-btn-focus-shadow-rgb: 217, 164, 6; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffcd39; + --bs-btn-active-border-color: #ffc720; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #ffc107; + --bs-btn-disabled-border-color: #ffc107; +} + +.bodywebsite .btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #bb2d3b; + --bs-btn-hover-border-color: #b02a37; + --bs-btn-focus-shadow-rgb: 225, 83, 97; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b02a37; + --bs-btn-active-border-color: #a52834; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #dc3545; + --bs-btn-disabled-border-color: #dc3545; +} + +.bodywebsite .btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #d3d4d5; + --bs-btn-hover-border-color: #c6c7c8; + --bs-btn-focus-shadow-rgb: 211, 212, 213; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #c6c7c8; + --bs-btn-active-border-color: #babbbc; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f8f9fa; + --bs-btn-disabled-border-color: #f8f9fa; +} + +.bodywebsite .btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #424649; + --bs-btn-hover-border-color: #373b3e; + --bs-btn-focus-shadow-rgb: 66, 70, 73; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #4d5154; + --bs-btn-active-border-color: #373b3e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #212529; + --bs-btn-disabled-border-color: #212529; +} + +.bodywebsite .btn-outline-primary { + --bs-btn-color: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0d6efd; + --bs-btn-hover-border-color: #0d6efd; + --bs-btn-focus-shadow-rgb: 13, 110, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0d6efd; + --bs-btn-active-border-color: #0d6efd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0d6efd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0d6efd; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-secondary { + --bs-btn-color: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #6c757d; + --bs-btn-hover-border-color: #6c757d; + --bs-btn-focus-shadow-rgb: 108, 117, 125; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6c757d; + --bs-btn-active-border-color: #6c757d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #6c757d; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-success { + --bs-btn-color: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #198754; + --bs-btn-hover-border-color: #198754; + --bs-btn-focus-shadow-rgb: 25, 135, 84; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #198754; + --bs-btn-active-border-color: #198754; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #198754; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #198754; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-info { + --bs-btn-color: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #0dcaf0; + --bs-btn-hover-border-color: #0dcaf0; + --bs-btn-focus-shadow-rgb: 13, 202, 240; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #0dcaf0; + --bs-btn-active-border-color: #0dcaf0; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0dcaf0; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0dcaf0; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-warning { + --bs-btn-color: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffc107; + --bs-btn-hover-border-color: #ffc107; + --bs-btn-focus-shadow-rgb: 255, 193, 7; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffc107; + --bs-btn-active-border-color: #ffc107; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #ffc107; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #ffc107; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-danger { + --bs-btn-color: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #dc3545; + --bs-btn-hover-border-color: #dc3545; + --bs-btn-focus-shadow-rgb: 220, 53, 69; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #dc3545; + --bs-btn-active-border-color: #dc3545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #dc3545; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #dc3545; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-light { + --bs-btn-color: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f8f9fa; + --bs-btn-hover-border-color: #f8f9fa; + --bs-btn-focus-shadow-rgb: 248, 249, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f8f9fa; + --bs-btn-active-border-color: #f8f9fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f8f9fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f8f9fa; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-dark { + --bs-btn-color: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #212529; + --bs-btn-hover-border-color: #212529; + --bs-btn-focus-shadow-rgb: 33, 37, 41; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #212529; + --bs-btn-active-border-color: #212529; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #212529; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #212529; + --bs-gradient: none; +} + +.bodywebsite .btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: underline; +} + +.bodywebsite .btn-link:focus-visible { + color: var(--bs-btn-color); +} + +.bodywebsite .btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.bodywebsite .btn-lg, .bodywebsite .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} + +.bodywebsite .btn-sm, .bodywebsite .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} + +.bodywebsite .fade { + transition: opacity 0.15s linear; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .fade { + transition: none; + } +} + +.bodywebsite .fade:not(.show) { + opacity: 0; +} + +.bodywebsite .collapse:not(.show) { + display: none; +} + +.bodywebsite .collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing { + transition: none; + } +} + +.bodywebsite .collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing.collapse-horizontal { + transition: none; + } +} + +.bodywebsite .dropup, + .bodywebsite .dropend, + .bodywebsite .dropdown, + .bodywebsite .dropstart, + .bodywebsite .dropup-center, + .bodywebsite .dropdown-center { + position: relative; +} + +.bodywebsite .dropdown-toggle { + white-space: nowrap; +} + +.bodywebsite .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #212529; + --bs-dropdown-bg: #fff; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #212529; + --bs-dropdown-link-hover-color: #1e2125; + --bs-dropdown-link-hover-bg: #e9ecef; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #6c757d; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} + +.bodywebsite .dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropdown-menu-start { + --bs-position: start; +} + +.bodywebsite .dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.bodywebsite .dropdown-menu-end { + --bs-position: end; +} + +.bodywebsite .dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .dropdown-menu-sm-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-sm-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 768px) { + .bodywebsite .dropdown-menu-md-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-md-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 992px) { + .bodywebsite .dropdown-menu-lg-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-lg-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1200px) { + .bodywebsite .dropdown-menu-xl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1400px) { + .bodywebsite .dropdown-menu-xxl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xxl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +.bodywebsite .dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} + +.bodywebsite .dropend .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.bodywebsite .dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: none; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} + +.bodywebsite .dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.bodywebsite .dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.bodywebsite .dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} + +.bodywebsite .dropdown-item:hover, .bodywebsite .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} + +.bodywebsite .dropdown-item.active, .bodywebsite .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} + +.bodywebsite .dropdown-item.disabled, .bodywebsite .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.bodywebsite .dropdown-menu.show { + display: block; +} + +.bodywebsite .dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.bodywebsite .dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.bodywebsite .dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.bodywebsite .btn-group, + .bodywebsite .btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} + +.bodywebsite .btn-group > .btn, + .bodywebsite .btn-group-vertical > .btn { + position: relative; + flex: 1 1 auto; +} + +.bodywebsite .btn-group > .btn-check:checked + .btn, + .bodywebsite .btn-group > .btn-check:focus + .btn, + .bodywebsite .btn-group > .btn:hover, + .bodywebsite .btn-group > .btn:focus, + .bodywebsite .btn-group > .btn:active, + .bodywebsite .btn-group > .btn.active, + .bodywebsite .btn-group-vertical > .btn-check:checked + .btn, + .bodywebsite .btn-group-vertical > .btn-check:focus + .btn, + .bodywebsite .btn-group-vertical > .btn:hover, + .bodywebsite .btn-group-vertical > .btn:focus, + .bodywebsite .btn-group-vertical > .btn:active, + .bodywebsite .btn-group-vertical > .btn.active { + z-index: 1; +} + +.bodywebsite .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} + +.bodywebsite .btn-toolbar .input-group { + width: auto; +} + +.bodywebsite .btn-group { + border-radius: 0.375rem; +} + +.bodywebsite .btn-group > :not(.btn-check:first-child) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) { + margin-left: -1px; +} + +.bodywebsite .btn-group > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group > .btn.dropdown-toggle-split:first-child, + .bodywebsite .btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .btn-group > .btn:nth-child(n+3), + .bodywebsite .btn-group > :not(.btn-check) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} + +.bodywebsite .dropdown-toggle-split::after, .bodywebsite .dropup .dropdown-toggle-split::after, .bodywebsite .dropend .dropdown-toggle-split::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.bodywebsite .btn-sm + .dropdown-toggle-split, .bodywebsite .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.bodywebsite .btn-lg + .dropdown-toggle-split, .bodywebsite .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.bodywebsite .btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} + +.bodywebsite .btn-group-vertical > .btn, + .bodywebsite .btn-group-vertical > .btn-group { + width: 100%; +} + +.bodywebsite .btn-group-vertical > .btn:not(:first-child), + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) { + margin-top: -1px; +} + +.bodywebsite .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .btn-group-vertical > .btn ~ .btn, + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .nav-link { + transition: none; + } +} + +.bodywebsite .nav-link:hover, .bodywebsite .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} + +.bodywebsite .nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.bodywebsite .nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #dee2e6; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6; + --bs-nav-tabs-link-active-color: #495057; + --bs-nav-tabs-link-active-bg: #fff; + --bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff; + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} + +.bodywebsite .nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + background: none; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} + +.bodywebsite .nav-tabs .nav-link:hover, .bodywebsite .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} + +.bodywebsite .nav-tabs .nav-link.disabled, .bodywebsite .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-tabs .nav-link.active, + .bodywebsite .nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} + +.bodywebsite .nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #0d6efd; +} + +.bodywebsite .nav-pills .nav-link { + background: none; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} + +.bodywebsite .nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-pills .nav-link.active, + .bodywebsite .nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.bodywebsite .nav-fill > .nav-link, + .bodywebsite .nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} + +.bodywebsite .nav-justified > .nav-link, + .bodywebsite .nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} + +.bodywebsite .nav-fill .nav-item .nav-link, + .bodywebsite .nav-justified .nav-item .nav-link { + width: 100%; +} + +.bodywebsite .tab-content > .tab-pane { + display: none; +} + +.bodywebsite .tab-content > .active { + display: block; +} + +.bodywebsite .navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: rgba(0, 0, 0, 0.55); + --bs-navbar-hover-color: rgba(0, 0, 0, 0.7); + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-hover-color: rgba(0, 0, 0, 0.9); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} + +.bodywebsite .navbar > .container, + .bodywebsite .navbar > .container-fluid, + .bodywebsite .navbar > .container-sm, + .bodywebsite .navbar > .container-md, + .bodywebsite .navbar > .container-lg, + .bodywebsite .navbar > .container-xl, + .bodywebsite .navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} + +.bodywebsite .navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} + +.bodywebsite .navbar-brand:hover, .bodywebsite .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.bodywebsite .navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .navbar-nav .show > .nav-link, + .bodywebsite .navbar-nav .nav-link.active { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-nav .dropdown-menu { + position: static; +} + +.bodywebsite .navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} + +.bodywebsite .navbar-text a, + .bodywebsite .navbar-text a:hover, + .bodywebsite .navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} + +.bodywebsite .navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .navbar-toggler { + transition: none; + } +} + +.bodywebsite .navbar-toggler:hover { + text-decoration: none; +} + +.bodywebsite .navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.bodywebsite .navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.bodywebsite .navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .bodywebsite .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-sm .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-md .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-md .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-lg .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xxl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +.bodywebsite .navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} + +.bodywebsite .navbar-expand .navbar-nav { + flex-direction: row; +} + +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} + +.bodywebsite .navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} + +.bodywebsite .navbar-expand .navbar-nav-scroll { + overflow: visible; +} + +.bodywebsite .navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} + +.bodywebsite .navbar-expand .navbar-toggler { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-header { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.bodywebsite .navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.55); + --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.bodywebsite .card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: rgba(0, 0, 0, 0.03); + --bs-card-bg: #fff; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} + +.bodywebsite .card > hr { + margin-right: 0; + margin-left: 0; +} + +.bodywebsite .card > .list-group { + border-top: inherit; + border-bottom: inherit; +} + +.bodywebsite .card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .card-header + .list-group, + .bodywebsite .card > .list-group + .card-footer { + border-top: 0; +} + +.bodywebsite .card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.bodywebsite .card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} + +.bodywebsite .card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} + +.bodywebsite .card-text:last-child { + margin-bottom: 0; +} + +.bodywebsite .card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.bodywebsite .card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.bodywebsite .card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} + +.bodywebsite .card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.bodywebsite .card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.bodywebsite .card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top, + .bodywebsite .card-img-bottom { + width: 100%; +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} + +@media (min-width: 576px) { + .bodywebsite .card-group { + display: flex; + flex-flow: row wrap; + } + + .bodywebsite .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + + .bodywebsite .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-top, + .bodywebsite .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-top, + .bodywebsite .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.bodywebsite .accordion { + --bs-accordion-color: var(--bs-body-color); + --bs-accordion-bg: #fff; + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #86b7fe; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #0c63e4; + --bs-accordion-active-bg: #e7f1ff; +} + +.bodywebsite .accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button { + transition: none; + } +} + +.bodywebsite .accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} + +.bodywebsite .accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button::after { + transition: none; + } +} + +.bodywebsite .accordion-button:hover { + z-index: 2; +} + +.bodywebsite .accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.bodywebsite .accordion-header { + margin-bottom: 0; +} + +.bodywebsite .accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:not(:first-of-type) { + border-top: 0; +} + +.bodywebsite .accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.bodywebsite .accordion-flush .accordion-collapse { + border-width: 0; +} + +.bodywebsite .accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} + +.bodywebsite .accordion-flush .accordion-item:first-child { + border-top: 0; +} + +.bodywebsite .accordion-flush .accordion-item:last-child { + border-bottom: 0; +} + +.bodywebsite .accordion-flush .accordion-item .accordion-button, .bodywebsite .accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} + +.bodywebsite .breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-divider-color: #6c757d; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/"); +} + +.bodywebsite .breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.bodywebsite .pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: #fff; + --bs-pagination-border-width: 1px; + --bs-pagination-border-color: #dee2e6; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: #e9ecef; + --bs-pagination-hover-border-color: #dee2e6; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #e9ecef; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #0d6efd; + --bs-pagination-active-border-color: #0d6efd; + --bs-pagination-disabled-color: #6c757d; + --bs-pagination-disabled-bg: #fff; + --bs-pagination-disabled-border-color: #dee2e6; + display: flex; + padding-left: 0; + list-style: none; +} + +.bodywebsite .page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .page-link { + transition: none; + } +} + +.bodywebsite .page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} + +.bodywebsite .page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} + +.bodywebsite .page-link.active, .bodywebsite .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} + +.bodywebsite .page-link.disabled, .bodywebsite .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.bodywebsite .page-item:not(:first-child) .page-link { + margin-left: -1px; +} + +.bodywebsite .page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} + +.bodywebsite .pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} + +.bodywebsite .badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} + +.bodywebsite .badge:empty { + display: none; +} + +.bodywebsite .btn .badge { + position: relative; + top: -1px; +} + +.bodywebsite .alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.bodywebsite .alert-heading { + color: inherit; +} + +.bodywebsite .alert-link { + font-weight: 700; +} + +.bodywebsite .alert-dismissible { + padding-right: 3rem; +} + +.bodywebsite .alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.bodywebsite .alert-primary { + --bs-alert-color: #084298; + --bs-alert-bg: #cfe2ff; + --bs-alert-border-color: #b6d4fe; +} + +.bodywebsite .alert-primary .alert-link { + color: #06357a; +} + +.bodywebsite .alert-secondary { + --bs-alert-color: #41464b; + --bs-alert-bg: #e2e3e5; + --bs-alert-border-color: #d3d6d8; +} + +.bodywebsite .alert-secondary .alert-link { + color: #34383c; +} + +.bodywebsite .alert-success { + --bs-alert-color: #0f5132; + --bs-alert-bg: #d1e7dd; + --bs-alert-border-color: #badbcc; +} + +.bodywebsite .alert-success .alert-link { + color: #0c4128; +} + +.bodywebsite .alert-info { + --bs-alert-color: #055160; + --bs-alert-bg: #cff4fc; + --bs-alert-border-color: #b6effb; +} + +.bodywebsite .alert-info .alert-link { + color: #04414d; +} + +.bodywebsite .alert-warning { + --bs-alert-color: #664d03; + --bs-alert-bg: #fff3cd; + --bs-alert-border-color: #ffecb5; +} + +.bodywebsite .alert-warning .alert-link { + color: #523e02; +} + +.bodywebsite .alert-danger { + --bs-alert-color: #842029; + --bs-alert-bg: #f8d7da; + --bs-alert-border-color: #f5c2c7; +} + +.bodywebsite .alert-danger .alert-link { + color: #6a1a21; +} + +.bodywebsite .alert-light { + --bs-alert-color: #636464; + --bs-alert-bg: #fefefe; + --bs-alert-border-color: #fdfdfe; +} + +.bodywebsite .alert-light .alert-link { + color: #4f5050; +} + +.bodywebsite .alert-dark { + --bs-alert-color: #141619; + --bs-alert-bg: #d3d3d4; + --bs-alert-border-color: #bcbebf; +} + +.bodywebsite .alert-dark .alert-link { + color: #101214; +} + +@-webkit-keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +.bodywebsite .progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #e9ecef; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #0d6efd; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} + +.bodywebsite .progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar { + transition: none; + } +} + +.bodywebsite .progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.bodywebsite .progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + +.bodywebsite .list-group { + --bs-list-group-color: #212529; + --bs-list-group-bg: #fff; + --bs-list-group-border-color: rgba(0, 0, 0, 0.125); + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #495057; + --bs-list-group-action-hover-color: #495057; + --bs-list-group-action-hover-bg: #f8f9fa; + --bs-list-group-action-active-color: #212529; + --bs-list-group-action-active-bg: #e9ecef; + --bs-list-group-disabled-color: #6c757d; + --bs-list-group-disabled-bg: #fff; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #0d6efd; + --bs-list-group-active-border-color: #0d6efd; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.bodywebsite .list-group-numbered { + list-style-type: none; + counter-reset: section; +} + +.bodywebsite .list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.bodywebsite .list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} + +.bodywebsite .list-group-item-action:hover, .bodywebsite .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} + +.bodywebsite .list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.bodywebsite .list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} + +.bodywebsite .list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} + +.bodywebsite .list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} + +.bodywebsite .list-group-item.disabled, .bodywebsite .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} + +.bodywebsite .list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} + +.bodywebsite .list-group-item + .list-group-item { + border-top-width: 0; +} + +.bodywebsite .list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-horizontal { + flex-direction: row; +} + +.bodywebsite .list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item.active { + margin-top: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .bodywebsite .list-group-horizontal-sm { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 768px) { + .bodywebsite .list-group-horizontal-md { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 992px) { + .bodywebsite .list-group-horizontal-lg { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1200px) { + .bodywebsite .list-group-horizontal-xl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1400px) { + .bodywebsite .list-group-horizontal-xxl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +.bodywebsite .list-group-flush { + border-radius: 0; +} + +.bodywebsite .list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.bodywebsite .list-group-item-primary { + color: #084298; + background-color: #cfe2ff; +} + +.bodywebsite .list-group-item-primary.list-group-item-action:hover, .bodywebsite .list-group-item-primary.list-group-item-action:focus { + color: #084298; + background-color: #bacbe6; +} + +.bodywebsite .list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #084298; + border-color: #084298; +} + +.bodywebsite .list-group-item-secondary { + color: #41464b; + background-color: #e2e3e5; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action:hover, .bodywebsite .list-group-item-secondary.list-group-item-action:focus { + color: #41464b; + background-color: #cbccce; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #41464b; + border-color: #41464b; +} + +.bodywebsite .list-group-item-success { + color: #0f5132; + background-color: #d1e7dd; +} + +.bodywebsite .list-group-item-success.list-group-item-action:hover, .bodywebsite .list-group-item-success.list-group-item-action:focus { + color: #0f5132; + background-color: #bcd0c7; +} + +.bodywebsite .list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #0f5132; + border-color: #0f5132; +} + +.bodywebsite .list-group-item-info { + color: #055160; + background-color: #cff4fc; +} + +.bodywebsite .list-group-item-info.list-group-item-action:hover, .bodywebsite .list-group-item-info.list-group-item-action:focus { + color: #055160; + background-color: #badce3; +} + +.bodywebsite .list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #055160; + border-color: #055160; +} + +.bodywebsite .list-group-item-warning { + color: #664d03; + background-color: #fff3cd; +} + +.bodywebsite .list-group-item-warning.list-group-item-action:hover, .bodywebsite .list-group-item-warning.list-group-item-action:focus { + color: #664d03; + background-color: #e6dbb9; +} + +.bodywebsite .list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #664d03; + border-color: #664d03; +} + +.bodywebsite .list-group-item-danger { + color: #842029; + background-color: #f8d7da; +} + +.bodywebsite .list-group-item-danger.list-group-item-action:hover, .bodywebsite .list-group-item-danger.list-group-item-action:focus { + color: #842029; + background-color: #dfc2c4; +} + +.bodywebsite .list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #842029; + border-color: #842029; +} + +.bodywebsite .list-group-item-light { + color: #636464; + background-color: #fefefe; +} + +.bodywebsite .list-group-item-light.list-group-item-action:hover, .bodywebsite .list-group-item-light.list-group-item-action:focus { + color: #636464; + background-color: #e5e5e5; +} + +.bodywebsite .list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #636464; + border-color: #636464; +} + +.bodywebsite .list-group-item-dark { + color: #141619; + background-color: #d3d3d4; +} + +.bodywebsite .list-group-item-dark.list-group-item-action:hover, .bodywebsite .list-group-item-dark.list-group-item-action:focus { + color: #141619; + background-color: #bebebf; +} + +.bodywebsite .list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #141619; + border-color: #141619; +} + +.bodywebsite .btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #000; + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.5; +} + +.bodywebsite .btn-close:hover { + color: #000; + text-decoration: none; + opacity: 0.75; +} + +.bodywebsite .btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + opacity: 1; +} + +.bodywebsite .btn-close:disabled, .bodywebsite .btn-close.disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + opacity: 0.25; +} + +.bodywebsite .btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} + +.bodywebsite .toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-bg: rgba(255, 255, 255, 0.85); + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #6c757d; + --bs-toast-header-bg: rgba(255, 255, 255, 0.85); + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} + +.bodywebsite .toast.showing { + opacity: 0; +} + +.bodywebsite .toast:not(.show) { + display: none; +} + +.bodywebsite .toast-container { + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} + +.bodywebsite .toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.bodywebsite .toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} + +.bodywebsite .toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} + +.bodywebsite .toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.bodywebsite .modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-bg: #fff; + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.bodywebsite .modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} + +.bodywebsite .modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .modal.fade .modal-dialog { + transition: none; + } +} + +.bodywebsite .modal.show .modal-dialog { + transform: none; +} + +.bodywebsite .modal.modal-static .modal-dialog { + transform: scale(1.02); +} + +.bodywebsite .modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} + +.bodywebsite .modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.bodywebsite .modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} + +.bodywebsite .modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} + +.bodywebsite .modal-backdrop.fade { + opacity: 0; +} + +.bodywebsite .modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.bodywebsite .modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} + +.bodywebsite .modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.bodywebsite .modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.bodywebsite .modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .bodywebsite .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + + .bodywebsite .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + + .bodywebsite .modal-sm { + --bs-modal-width: 300px; + } +} + +@media (min-width: 992px) { + .bodywebsite .modal-lg, + .bodywebsite .modal-xl { + --bs-modal-width: 800px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .modal-xl { + --bs-modal-width: 1140px; + } +} + +.bodywebsite .modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} + +.bodywebsite .modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-header, + .bodywebsite .modal-fullscreen .modal-footer { + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .bodywebsite .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-header, + .bodywebsite .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-header, + .bodywebsite .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-header, + .bodywebsite .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-header, + .bodywebsite .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-header, + .bodywebsite .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} + +.bodywebsite .tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} + +.bodywebsite .tooltip.show { + opacity: var(--bs-tooltip-opacity); +} + +.bodywebsite .tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} + +.bodywebsite .tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: 0; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: 0; +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +.bodywebsite .tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.bodywebsite .popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #fff; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-bg: #f0f0f0; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #212529; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} + +.bodywebsite .popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} + +.bodywebsite .popover .popover-arrow::before, .bodywebsite .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-end > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom .popover-header::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +.bodywebsite .bs-popover-start > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +.bodywebsite .popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} + +.bodywebsite .popover-header:empty { + display: none; +} + +.bodywebsite .popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.bodywebsite .carousel { + position: relative; +} + +.bodywebsite .carousel.pointer-event { + touch-action: pan-y; +} + +.bodywebsite .carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.bodywebsite .carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-item { + transition: none; + } +} + +.bodywebsite .carousel-item.active, + .bodywebsite .carousel-item-next, + .bodywebsite .carousel-item-prev { + display: block; +} + +.bodywebsite .carousel-item-next:not(.carousel-item-start), + .bodywebsite .active.carousel-item-end { + transform: translateX(100%); +} + +.bodywebsite .carousel-item-prev:not(.carousel-item-end), + .bodywebsite .active.carousel-item-start { + transform: translateX(-100%); +} + +.bodywebsite .carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} + +.bodywebsite .carousel-fade .carousel-item.active, + .bodywebsite .carousel-fade .carousel-item-next.carousel-item-start, + .bodywebsite .carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} + +.bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + transition: none; + } +} + +.bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + transition: none; + } +} + +.bodywebsite .carousel-control-prev:hover, .bodywebsite .carousel-control-prev:focus, + .bodywebsite .carousel-control-next:hover, + .bodywebsite .carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.bodywebsite .carousel-control-prev { + left: 0; +} + +.bodywebsite .carousel-control-next { + right: 0; +} + +.bodywebsite .carousel-control-prev-icon, + .bodywebsite .carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +.bodywebsite .carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} + +.bodywebsite .carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-indicators [data-bs-target] { + transition: none; + } +} + +.bodywebsite .carousel-indicators .active { + opacity: 1; +} + +.bodywebsite .carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.bodywebsite .carousel-dark .carousel-control-prev-icon, + .bodywebsite .carousel-dark .carousel-control-next-icon { + filter: invert(1) grayscale(100); +} + +.bodywebsite .carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} + +.bodywebsite .carousel-dark .carousel-caption { + color: #000; +} + +.bodywebsite .spinner-grow, + .bodywebsite .spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + -webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@-webkit-keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +.bodywebsite .spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.bodywebsite .spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +.bodywebsite .spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.bodywebsite .spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .spinner-border, + .bodywebsite .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} + +.bodywebsite .offcanvas, .bodywebsite .offcanvas-xxl, .bodywebsite .offcanvas-xl, .bodywebsite .offcanvas-lg, .bodywebsite .offcanvas-md, .bodywebsite .offcanvas-sm { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-bg: #fff; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-sm { + transition: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.hiding, .bodywebsite .offcanvas-sm.show { + visibility: visible; + } +} + +@media (min-width: 576px) { + .bodywebsite .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-sm .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-md { + transition: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.hiding, .bodywebsite .offcanvas-md.show { + visibility: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-md .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-lg { + transition: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.hiding, .bodywebsite .offcanvas-lg.show { + visibility: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-lg .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xl { + transition: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.hiding, .bodywebsite .offcanvas-xl.show { + visibility: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xxl { + transition: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.hiding, .bodywebsite .offcanvas-xxl.show { + visibility: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xxl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.bodywebsite .offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas { + transition: none; + } +} + +.bodywebsite .offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} + +.bodywebsite .offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); +} + +.bodywebsite .offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} + +.bodywebsite .offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.show:not(.hiding) { + transform: none; +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.hiding, .bodywebsite .offcanvas.show { + visibility: visible; +} + +.bodywebsite .offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} + +.bodywebsite .offcanvas-backdrop.fade { + opacity: 0; +} + +.bodywebsite .offcanvas-backdrop.show { + opacity: 0.5; +} + +.bodywebsite .offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} + +.bodywebsite .offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} + +.bodywebsite .offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} + +.bodywebsite .offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.bodywebsite .placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} + +.bodywebsite .placeholder.btn::before { + display: inline-block; + content: ""; +} + +.bodywebsite .placeholder-xs { + min-height: 0.6em; +} + +.bodywebsite .placeholder-sm { + min-height: 0.8em; +} + +.bodywebsite .placeholder-lg { + min-height: 1.2em; +} + +.bodywebsite .placeholder-glow .placeholder { + -webkit-animation: placeholder-glow 2s ease-in-out infinite; + animation: placeholder-glow 2s ease-in-out infinite; +} + +@-webkit-keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +.bodywebsite .placeholder-wave { + -webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + -webkit-animation: placeholder-wave 2s linear infinite; + animation: placeholder-wave 2s linear infinite; +} + +@-webkit-keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +.bodywebsite .clearfix::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .text-bg-primary { + color: #fff !important; + background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-secondary { + color: #fff !important; + background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-success { + color: #fff !important; + background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-info { + color: #000 !important; + background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-warning { + color: #000 !important; + background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-danger { + color: #fff !important; + background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-light { + color: #000 !important; + background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-dark { + color: #fff !important; + background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .link-primary { + color: #0d6efd !important; +} + +.bodywebsite .link-primary:hover, .bodywebsite .link-primary:focus { + color: #0a58ca !important; +} + +.bodywebsite .link-secondary { + color: #6c757d !important; +} + +.bodywebsite .link-secondary:hover, .bodywebsite .link-secondary:focus { + color: #565e64 !important; +} + +.bodywebsite .link-success { + color: #198754 !important; +} + +.bodywebsite .link-success:hover, .bodywebsite .link-success:focus { + color: #146c43 !important; +} + +.bodywebsite .link-info { + color: #0dcaf0 !important; +} + +.bodywebsite .link-info:hover, .bodywebsite .link-info:focus { + color: #3dd5f3 !important; +} + +.bodywebsite .link-warning { + color: #ffc107 !important; +} + +.bodywebsite .link-warning:hover, .bodywebsite .link-warning:focus { + color: #ffcd39 !important; +} + +.bodywebsite .link-danger { + color: #dc3545 !important; +} + +.bodywebsite .link-danger:hover, .bodywebsite .link-danger:focus { + color: #b02a37 !important; +} + +.bodywebsite .link-light { + color: #f8f9fa !important; +} + +.bodywebsite .link-light:hover, .bodywebsite .link-light:focus { + color: #f9fafb !important; +} + +.bodywebsite .link-dark { + color: #212529 !important; +} + +.bodywebsite .link-dark:hover, .bodywebsite .link-dark:focus { + color: #1a1e21 !important; +} + +.bodywebsite .ratio { + position: relative; + width: 100%; +} + +.bodywebsite .ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} + +.bodywebsite .ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.bodywebsite .ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.bodywebsite .ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.bodywebsite .ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.bodywebsite .ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.bodywebsite .fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; +} + +.bodywebsite .sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .bodywebsite .sticky-sm-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 768px) { + .bodywebsite .sticky-md-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 992px) { + .bodywebsite .sticky-lg-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1200px) { + .bodywebsite .sticky-xl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1400px) { + .bodywebsite .sticky-xxl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +.bodywebsite .hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} + +.bodywebsite .vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} + +.bodywebsite .visually-hidden, + .bodywebsite .visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.bodywebsite .stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.bodywebsite .text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bodywebsite .vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.bodywebsite .align-baseline { + vertical-align: baseline !important; +} + +.bodywebsite .align-top { + vertical-align: top !important; +} + +.bodywebsite .align-middle { + vertical-align: middle !important; +} + +.bodywebsite .align-bottom { + vertical-align: bottom !important; +} + +.bodywebsite .align-text-bottom { + vertical-align: text-bottom !important; +} + +.bodywebsite .align-text-top { + vertical-align: text-top !important; +} + +.bodywebsite .float-start { + float: left !important; +} + +.bodywebsite .float-end { + float: right !important; +} + +.bodywebsite .float-none { + float: none !important; +} + +.bodywebsite .opacity-0 { + opacity: 0 !important; +} + +.bodywebsite .opacity-25 { + opacity: 0.25 !important; +} + +.bodywebsite .opacity-50 { + opacity: 0.5 !important; +} + +.bodywebsite .opacity-75 { + opacity: 0.75 !important; +} + +.bodywebsite .opacity-100 { + opacity: 1 !important; +} + +.bodywebsite .overflow-auto { + overflow: auto !important; +} + +.bodywebsite .overflow-hidden { + overflow: hidden !important; +} + +.bodywebsite .overflow-visible { + overflow: visible !important; +} + +.bodywebsite .overflow-scroll { + overflow: scroll !important; +} + +.bodywebsite .d-inline { + display: inline !important; +} + +.bodywebsite .d-inline-block { + display: inline-block !important; +} + +.bodywebsite .d-block { + display: block !important; +} + +.bodywebsite .d-grid { + display: grid !important; +} + +.bodywebsite .d-table { + display: table !important; +} + +.bodywebsite .d-table-row { + display: table-row !important; +} + +.bodywebsite .d-table-cell { + display: table-cell !important; +} + +.bodywebsite .d-flex { + display: flex !important; +} + +.bodywebsite .d-inline-flex { + display: inline-flex !important; +} + +.bodywebsite .d-none { + display: none !important; +} + +.bodywebsite .shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.bodywebsite .shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.bodywebsite .shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.bodywebsite .shadow-none { + box-shadow: none !important; +} + +.bodywebsite .position-static { + position: static !important; +} + +.bodywebsite .position-relative { + position: relative !important; +} + +.bodywebsite .position-absolute { + position: absolute !important; +} + +.bodywebsite .position-fixed { + position: fixed !important; +} + +.bodywebsite .position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} + +.bodywebsite .top-0 { + top: 0 !important; +} + +.bodywebsite .top-50 { + top: 50% !important; +} + +.bodywebsite .top-100 { + top: 100% !important; +} + +.bodywebsite .bottom-0 { + bottom: 0 !important; +} + +.bodywebsite .bottom-50 { + bottom: 50% !important; +} + +.bodywebsite .bottom-100 { + bottom: 100% !important; +} + +.bodywebsite .start-0 { + left: 0 !important; +} + +.bodywebsite .start-50 { + left: 50% !important; +} + +.bodywebsite .start-100 { + left: 100% !important; +} + +.bodywebsite .end-0 { + right: 0 !important; +} + +.bodywebsite .end-50 { + right: 50% !important; +} + +.bodywebsite .end-100 { + right: 100% !important; +} + +.bodywebsite .translate-middle { + transform: translate(-50%, -50%) !important; +} + +.bodywebsite .translate-middle-x { + transform: translateX(-50%) !important; +} + +.bodywebsite .translate-middle-y { + transform: translateY(-50%) !important; +} + +.bodywebsite .border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-0 { + border: 0 !important; +} + +.bodywebsite .border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-top-0 { + border-top: 0 !important; +} + +.bodywebsite .border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-end-0 { + border-right: 0 !important; +} + +.bodywebsite .border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-bottom-0 { + border-bottom: 0 !important; +} + +.bodywebsite .border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-start-0 { + border-left: 0 !important; +} + +.bodywebsite .border-primary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-secondary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-success { + --bs-border-opacity: 1; +} + +.bodywebsite .border-info { + --bs-border-opacity: 1; +} + +.bodywebsite .border-warning { + --bs-border-opacity: 1; +} + +.bodywebsite .border-danger { + --bs-border-opacity: 1; +} + +.bodywebsite .border-light { + --bs-border-opacity: 1; +} + +.bodywebsite .border-dark { + --bs-border-opacity: 1; +} + +.bodywebsite .border-white { + --bs-border-opacity: 1; +} + +.bodywebsite .border-1 { + --bs-border-width: 1px; +} + +.bodywebsite .border-2 { + --bs-border-width: 2px; +} + +.bodywebsite .border-3 { + --bs-border-width: 3px; +} + +.bodywebsite .border-4 { + --bs-border-width: 4px; +} + +.bodywebsite .border-5 { + --bs-border-width: 5px; +} + +.bodywebsite .border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.bodywebsite .border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.bodywebsite .border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.bodywebsite .border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.bodywebsite .border-opacity-100 { + --bs-border-opacity: 1; +} + +.bodywebsite .w-25 { + width: 25% !important; +} + +.bodywebsite .w-50 { + width: 50% !important; +} + +.bodywebsite .w-75 { + width: 75% !important; +} + +.bodywebsite .w-100 { + width: 100% !important; +} + +.bodywebsite .w-auto { + width: auto !important; +} + +.bodywebsite .mw-100 { + max-width: 100% !important; +} + +.bodywebsite .vw-100 { + width: 100vw !important; +} + +.bodywebsite .min-vw-100 { + min-width: 100vw !important; +} + +.bodywebsite .h-25 { + height: 25% !important; +} + +.bodywebsite .h-50 { + height: 50% !important; +} + +.bodywebsite .h-75 { + height: 75% !important; +} + +.bodywebsite .h-100 { + height: 100% !important; +} + +.bodywebsite .h-auto { + height: auto !important; +} + +.bodywebsite .mh-100 { + max-height: 100% !important; +} + +.bodywebsite .vh-100 { + height: 100vh !important; +} + +.bodywebsite .min-vh-100 { + min-height: 100vh !important; +} + +.bodywebsite .flex-fill { + flex: 1 1 auto !important; +} + +.bodywebsite .flex-row { + flex-direction: row !important; +} + +.bodywebsite .flex-column { + flex-direction: column !important; +} + +.bodywebsite .flex-row-reverse { + flex-direction: row-reverse !important; +} + +.bodywebsite .flex-column-reverse { + flex-direction: column-reverse !important; +} + +.bodywebsite .flex-grow-0 { + flex-grow: 0 !important; +} + +.bodywebsite .flex-grow-1 { + flex-grow: 1 !important; +} + +.bodywebsite .flex-shrink-0 { + flex-shrink: 0 !important; +} + +.bodywebsite .flex-shrink-1 { + flex-shrink: 1 !important; +} + +.bodywebsite .flex-wrap { + flex-wrap: wrap !important; +} + +.bodywebsite .flex-nowrap { + flex-wrap: nowrap !important; +} + +.bodywebsite .flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.bodywebsite .justify-content-start { + justify-content: flex-start !important; +} + +.bodywebsite .justify-content-end { + justify-content: flex-end !important; +} + +.bodywebsite .justify-content-center { + justify-content: center !important; +} + +.bodywebsite .justify-content-between { + justify-content: space-between !important; +} + +.bodywebsite .justify-content-around { + justify-content: space-around !important; +} + +.bodywebsite .justify-content-evenly { + justify-content: space-evenly !important; +} + +.bodywebsite .align-items-start { + align-items: flex-start !important; +} + +.bodywebsite .align-items-end { + align-items: flex-end !important; +} + +.bodywebsite .align-items-center { + align-items: center !important; +} + +.bodywebsite .align-items-baseline { + align-items: baseline !important; +} + +.bodywebsite .align-items-stretch { + align-items: stretch !important; +} + +.bodywebsite .align-content-start { + align-content: flex-start !important; +} + +.bodywebsite .align-content-end { + align-content: flex-end !important; +} + +.bodywebsite .align-content-center { + align-content: center !important; +} + +.bodywebsite .align-content-between { + align-content: space-between !important; +} + +.bodywebsite .align-content-around { + align-content: space-around !important; +} + +.bodywebsite .align-content-stretch { + align-content: stretch !important; +} + +.bodywebsite .align-self-auto { + align-self: auto !important; +} + +.bodywebsite .align-self-start { + align-self: flex-start !important; +} + +.bodywebsite .align-self-end { + align-self: flex-end !important; +} + +.bodywebsite .align-self-center { + align-self: center !important; +} + +.bodywebsite .align-self-baseline { + align-self: baseline !important; +} + +.bodywebsite .align-self-stretch { + align-self: stretch !important; +} + +.bodywebsite .order-first { + order: -1 !important; +} + +.bodywebsite .order-0 { + order: 0 !important; +} + +.bodywebsite .order-1 { + order: 1 !important; +} + +.bodywebsite .order-2 { + order: 2 !important; +} + +.bodywebsite .order-3 { + order: 3 !important; +} + +.bodywebsite .order-4 { + order: 4 !important; +} + +.bodywebsite .order-5 { + order: 5 !important; +} + +.bodywebsite .order-last { + order: 6 !important; +} + +.bodywebsite .m-0 { + margin: 0 !important; +} + +.bodywebsite .m-1 { + margin: 0.25rem !important; +} + +.bodywebsite .m-2 { + margin: 0.5rem !important; +} + +.bodywebsite .m-3 { + margin: 1rem !important; +} + +.bodywebsite .m-4 { + margin: 1.5rem !important; +} + +.bodywebsite .m-5 { + margin: 3rem !important; +} + +.bodywebsite .m-auto { + margin: auto !important; +} + +.bodywebsite .mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.bodywebsite .mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.bodywebsite .mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.bodywebsite .mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.bodywebsite .mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.bodywebsite .mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.bodywebsite .mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.bodywebsite .my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.bodywebsite .my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.bodywebsite .my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.bodywebsite .my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.bodywebsite .my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.bodywebsite .my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.bodywebsite .my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.bodywebsite .mt-0 { + margin-top: 0 !important; +} + +.bodywebsite .mt-1 { + margin-top: 0.25rem !important; +} + +.bodywebsite .mt-2 { + margin-top: 0.5rem !important; +} + +.bodywebsite .mt-3 { + margin-top: 1rem !important; +} + +.bodywebsite .mt-4 { + margin-top: 1.5rem !important; +} + +.bodywebsite .mt-5 { + margin-top: 3rem !important; +} + +.bodywebsite .mt-auto { + margin-top: auto !important; +} + +.bodywebsite .me-0 { + margin-right: 0 !important; +} + +.bodywebsite .me-1 { + margin-right: 0.25rem !important; +} + +.bodywebsite .me-2 { + margin-right: 0.5rem !important; +} + +.bodywebsite .me-3 { + margin-right: 1rem !important; +} + +.bodywebsite .me-4 { + margin-right: 1.5rem !important; +} + +.bodywebsite .me-5 { + margin-right: 3rem !important; +} + +.bodywebsite .me-auto { + margin-right: auto !important; +} + +.bodywebsite .mb-0 { + margin-bottom: 0 !important; +} + +.bodywebsite .mb-1 { + margin-bottom: 0.25rem !important; +} + +.bodywebsite .mb-2 { + margin-bottom: 0.5rem !important; +} + +.bodywebsite .mb-3 { + margin-bottom: 1rem !important; +} + +.bodywebsite .mb-4 { + margin-bottom: 1.5rem !important; +} + +.bodywebsite .mb-5 { + margin-bottom: 3rem !important; +} + +.bodywebsite .mb-auto { + margin-bottom: auto !important; +} + +.bodywebsite .ms-0 { + margin-left: 0 !important; +} + +.bodywebsite .ms-1 { + margin-left: 0.25rem !important; +} + +.bodywebsite .ms-2 { + margin-left: 0.5rem !important; +} + +.bodywebsite .ms-3 { + margin-left: 1rem !important; +} + +.bodywebsite .ms-4 { + margin-left: 1.5rem !important; +} + +.bodywebsite .ms-5 { + margin-left: 3rem !important; +} + +.bodywebsite .ms-auto { + margin-left: auto !important; +} + +.bodywebsite .p-0 { + padding: 0 !important; +} + +.bodywebsite .p-1 { + padding: 0.25rem !important; +} + +.bodywebsite .p-2 { + padding: 0.5rem !important; +} + +.bodywebsite .p-3 { + padding: 1rem !important; +} + +.bodywebsite .p-4 { + padding: 1.5rem !important; +} + +.bodywebsite .p-5 { + padding: 3rem !important; +} + +.bodywebsite .px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.bodywebsite .px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.bodywebsite .px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.bodywebsite .px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.bodywebsite .px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.bodywebsite .px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.bodywebsite .py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.bodywebsite .py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.bodywebsite .py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.bodywebsite .py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.bodywebsite .py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.bodywebsite .py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.bodywebsite .pt-0 { + padding-top: 0 !important; +} + +.bodywebsite .pt-1 { + padding-top: 0.25rem !important; +} + +.bodywebsite .pt-2 { + padding-top: 0.5rem !important; +} + +.bodywebsite .pt-3 { + padding-top: 1rem !important; +} + +.bodywebsite .pt-4 { + padding-top: 1.5rem !important; +} + +.bodywebsite .pt-5 { + padding-top: 3rem !important; +} + +.bodywebsite .pe-0 { + padding-right: 0 !important; +} + +.bodywebsite .pe-1 { + padding-right: 0.25rem !important; +} + +.bodywebsite .pe-2 { + padding-right: 0.5rem !important; +} + +.bodywebsite .pe-3 { + padding-right: 1rem !important; +} + +.bodywebsite .pe-4 { + padding-right: 1.5rem !important; +} + +.bodywebsite .pe-5 { + padding-right: 3rem !important; +} + +.bodywebsite .pb-0 { + padding-bottom: 0 !important; +} + +.bodywebsite .pb-1 { + padding-bottom: 0.25rem !important; +} + +.bodywebsite .pb-2 { + padding-bottom: 0.5rem !important; +} + +.bodywebsite .pb-3 { + padding-bottom: 1rem !important; +} + +.bodywebsite .pb-4 { + padding-bottom: 1.5rem !important; +} + +.bodywebsite .pb-5 { + padding-bottom: 3rem !important; +} + +.bodywebsite .ps-0 { + padding-left: 0 !important; +} + +.bodywebsite .ps-1 { + padding-left: 0.25rem !important; +} + +.bodywebsite .ps-2 { + padding-left: 0.5rem !important; +} + +.bodywebsite .ps-3 { + padding-left: 1rem !important; +} + +.bodywebsite .ps-4 { + padding-left: 1.5rem !important; +} + +.bodywebsite .ps-5 { + padding-left: 3rem !important; +} + +.bodywebsite .gap-0 { + gap: 0 !important; +} + +.bodywebsite .gap-1 { + gap: 0.25rem !important; +} + +.bodywebsite .gap-2 { + gap: 0.5rem !important; +} + +.bodywebsite .gap-3 { + gap: 1rem !important; +} + +.bodywebsite .gap-4 { + gap: 1.5rem !important; +} + +.bodywebsite .gap-5 { + gap: 3rem !important; +} + +.bodywebsite .font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.bodywebsite .fs-1 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.bodywebsite .fs-2 { + font-size: calc(1.325rem + 0.9vw) !important; +} + +.bodywebsite .fs-3 { + font-size: calc(1.3rem + 0.6vw) !important; +} + +.bodywebsite .fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.bodywebsite .fs-5 { + font-size: 1.25rem !important; +} + +.bodywebsite .fs-6 { + font-size: 1rem !important; +} + +.bodywebsite .fst-italic { + font-style: italic !important; +} + +.bodywebsite .fst-normal { + font-style: normal !important; +} + +.bodywebsite .fw-light { + font-weight: 300 !important; +} + +.bodywebsite .fw-lighter { + font-weight: lighter !important; +} + +.bodywebsite .fw-normal { + font-weight: 400 !important; +} + +.bodywebsite .fw-bold { + font-weight: 700 !important; +} + +.bodywebsite .fw-semibold { + font-weight: 600 !important; +} + +.bodywebsite .fw-bolder { + font-weight: bolder !important; +} + +.bodywebsite .lh-1 { + line-height: 1 !important; +} + +.bodywebsite .lh-sm { + line-height: 1.25 !important; +} + +.bodywebsite .lh-base { + line-height: 1.5 !important; +} + +.bodywebsite .lh-lg { + line-height: 2 !important; +} + +.bodywebsite .text-start { + text-align: left !important; +} + +.bodywebsite .text-end { + text-align: right !important; +} + +.bodywebsite .text-center { + text-align: center !important; +} + +.bodywebsite .text-decoration-none { + text-decoration: none !important; +} + +.bodywebsite .text-decoration-underline { + text-decoration: underline !important; +} + +.bodywebsite .text-decoration-line-through { + text-decoration: line-through !important; +} + +.bodywebsite .text-lowercase { + text-transform: lowercase !important; +} + +.bodywebsite .text-uppercase { + text-transform: uppercase !important; +} + +.bodywebsite .text-capitalize { + text-transform: capitalize !important; +} + +.bodywebsite .text-wrap { + white-space: normal !important; +} + +.bodywebsite .text-nowrap { + white-space: nowrap !important; +} + +.bodywebsite .text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +.bodywebsite .text-primary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-secondary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-success { + --bs-text-opacity: 1; +} + +.bodywebsite .text-info { + --bs-text-opacity: 1; +} + +.bodywebsite .text-warning { + --bs-text-opacity: 1; +} + +.bodywebsite .text-danger { + --bs-text-opacity: 1; +} + +.bodywebsite .text-light { + --bs-text-opacity: 1; +} + +.bodywebsite .text-dark { + --bs-text-opacity: 1; +} + +.bodywebsite .text-black { + --bs-text-opacity: 1; +} + +.bodywebsite .text-white { + --bs-text-opacity: 1; +} + +.bodywebsite .text-body { + --bs-text-opacity: 1; +} + +.bodywebsite .text-muted { + --bs-text-opacity: 1; + color: #6c757d !important; +} + +.bodywebsite .text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.bodywebsite .text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.bodywebsite .text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.bodywebsite .text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.bodywebsite .text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.bodywebsite .text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.bodywebsite .text-opacity-100 { + --bs-text-opacity: 1; +} + +.bodywebsite .bg-primary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-secondary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-success { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-info { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-warning { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-danger { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-light { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-dark { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-black { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-white { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-body { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-transparent { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bodywebsite .bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bodywebsite .bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bodywebsite .bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bodywebsite .bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.bodywebsite .user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} + +.bodywebsite .user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + user-select: auto !important; +} + +.bodywebsite .user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + user-select: none !important; +} + +.bodywebsite .pe-none { + pointer-events: none !important; +} + +.bodywebsite .pe-auto { + pointer-events: auto !important; +} + +.bodywebsite .rounded { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-0 { + border-radius: 0 !important; +} + +.bodywebsite .rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.bodywebsite .rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.bodywebsite .rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.bodywebsite .rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} + +.bodywebsite .rounded-circle { + border-radius: 50% !important; +} + +.bodywebsite .rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.bodywebsite .rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .visible { + visibility: visible !important; +} + +.bodywebsite .invisible { + visibility: hidden !important; +} + +@media (min-width: 576px) { + .bodywebsite .float-sm-start { + float: left !important; + } + + .bodywebsite .float-sm-end { + float: right !important; + } + + .bodywebsite .float-sm-none { + float: none !important; + } + + .bodywebsite .d-sm-inline { + display: inline !important; + } + + .bodywebsite .d-sm-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-sm-block { + display: block !important; + } + + .bodywebsite .d-sm-grid { + display: grid !important; + } + + .bodywebsite .d-sm-table { + display: table !important; + } + + .bodywebsite .d-sm-table-row { + display: table-row !important; + } + + .bodywebsite .d-sm-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-sm-flex { + display: flex !important; + } + + .bodywebsite .d-sm-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-sm-none { + display: none !important; + } + + .bodywebsite .flex-sm-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-sm-row { + flex-direction: row !important; + } + + .bodywebsite .flex-sm-column { + flex-direction: column !important; + } + + .bodywebsite .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-sm-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-sm-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-sm-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-sm-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-sm-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-sm-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-sm-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-sm-center { + align-items: center !important; + } + + .bodywebsite .align-items-sm-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-sm-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-sm-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-sm-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-sm-center { + align-content: center !important; + } + + .bodywebsite .align-content-sm-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-sm-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-sm-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-sm-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-sm-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-sm-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-sm-center { + align-self: center !important; + } + + .bodywebsite .align-self-sm-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-sm-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-sm-first { + order: -1 !important; + } + + .bodywebsite .order-sm-0 { + order: 0 !important; + } + + .bodywebsite .order-sm-1 { + order: 1 !important; + } + + .bodywebsite .order-sm-2 { + order: 2 !important; + } + + .bodywebsite .order-sm-3 { + order: 3 !important; + } + + .bodywebsite .order-sm-4 { + order: 4 !important; + } + + .bodywebsite .order-sm-5 { + order: 5 !important; + } + + .bodywebsite .order-sm-last { + order: 6 !important; + } + + .bodywebsite .m-sm-0 { + margin: 0 !important; + } + + .bodywebsite .m-sm-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-sm-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-sm-3 { + margin: 1rem !important; + } + + .bodywebsite .m-sm-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-sm-5 { + margin: 3rem !important; + } + + .bodywebsite .m-sm-auto { + margin: auto !important; + } + + .bodywebsite .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-sm-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-sm-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-sm-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-sm-auto { + margin-top: auto !important; + } + + .bodywebsite .me-sm-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-sm-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-sm-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-sm-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-sm-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-sm-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-sm-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-sm-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-sm-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-sm-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-sm-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-sm-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-sm-auto { + margin-left: auto !important; + } + + .bodywebsite .p-sm-0 { + padding: 0 !important; + } + + .bodywebsite .p-sm-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-sm-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-sm-3 { + padding: 1rem !important; + } + + .bodywebsite .p-sm-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-sm-5 { + padding: 3rem !important; + } + + .bodywebsite .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-sm-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-sm-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-sm-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-sm-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-sm-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-sm-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-sm-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-sm-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-sm-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-sm-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-sm-0 { + gap: 0 !important; + } + + .bodywebsite .gap-sm-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-sm-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-sm-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-sm-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-sm-5 { + gap: 3rem !important; + } + + .bodywebsite .text-sm-start { + text-align: left !important; + } + + .bodywebsite .text-sm-end { + text-align: right !important; + } + + .bodywebsite .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .bodywebsite .float-md-start { + float: left !important; + } + + .bodywebsite .float-md-end { + float: right !important; + } + + .bodywebsite .float-md-none { + float: none !important; + } + + .bodywebsite .d-md-inline { + display: inline !important; + } + + .bodywebsite .d-md-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-md-block { + display: block !important; + } + + .bodywebsite .d-md-grid { + display: grid !important; + } + + .bodywebsite .d-md-table { + display: table !important; + } + + .bodywebsite .d-md-table-row { + display: table-row !important; + } + + .bodywebsite .d-md-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-md-flex { + display: flex !important; + } + + .bodywebsite .d-md-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-md-none { + display: none !important; + } + + .bodywebsite .flex-md-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-md-row { + flex-direction: row !important; + } + + .bodywebsite .flex-md-column { + flex-direction: column !important; + } + + .bodywebsite .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-md-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-md-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-md-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-md-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-md-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-md-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-md-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-md-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-md-center { + align-items: center !important; + } + + .bodywebsite .align-items-md-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-md-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-md-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-md-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-md-center { + align-content: center !important; + } + + .bodywebsite .align-content-md-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-md-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-md-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-md-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-md-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-md-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-md-center { + align-self: center !important; + } + + .bodywebsite .align-self-md-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-md-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-md-first { + order: -1 !important; + } + + .bodywebsite .order-md-0 { + order: 0 !important; + } + + .bodywebsite .order-md-1 { + order: 1 !important; + } + + .bodywebsite .order-md-2 { + order: 2 !important; + } + + .bodywebsite .order-md-3 { + order: 3 !important; + } + + .bodywebsite .order-md-4 { + order: 4 !important; + } + + .bodywebsite .order-md-5 { + order: 5 !important; + } + + .bodywebsite .order-md-last { + order: 6 !important; + } + + .bodywebsite .m-md-0 { + margin: 0 !important; + } + + .bodywebsite .m-md-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-md-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-md-3 { + margin: 1rem !important; + } + + .bodywebsite .m-md-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-md-5 { + margin: 3rem !important; + } + + .bodywebsite .m-md-auto { + margin: auto !important; + } + + .bodywebsite .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-md-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-md-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-md-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-md-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-md-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-md-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-md-auto { + margin-top: auto !important; + } + + .bodywebsite .me-md-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-md-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-md-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-md-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-md-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-md-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-md-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-md-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-md-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-md-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-md-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-md-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-md-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-md-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-md-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-md-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-md-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-md-auto { + margin-left: auto !important; + } + + .bodywebsite .p-md-0 { + padding: 0 !important; + } + + .bodywebsite .p-md-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-md-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-md-3 { + padding: 1rem !important; + } + + .bodywebsite .p-md-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-md-5 { + padding: 3rem !important; + } + + .bodywebsite .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-md-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-md-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-md-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-md-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-md-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-md-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-md-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-md-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-md-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-md-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-md-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-md-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-md-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-md-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-md-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-md-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-md-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-md-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-md-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-md-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-md-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-md-0 { + gap: 0 !important; + } + + .bodywebsite .gap-md-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-md-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-md-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-md-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-md-5 { + gap: 3rem !important; + } + + .bodywebsite .text-md-start { + text-align: left !important; + } + + .bodywebsite .text-md-end { + text-align: right !important; + } + + .bodywebsite .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .bodywebsite .float-lg-start { + float: left !important; + } + + .bodywebsite .float-lg-end { + float: right !important; + } + + .bodywebsite .float-lg-none { + float: none !important; + } + + .bodywebsite .d-lg-inline { + display: inline !important; + } + + .bodywebsite .d-lg-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-lg-block { + display: block !important; + } + + .bodywebsite .d-lg-grid { + display: grid !important; + } + + .bodywebsite .d-lg-table { + display: table !important; + } + + .bodywebsite .d-lg-table-row { + display: table-row !important; + } + + .bodywebsite .d-lg-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-lg-flex { + display: flex !important; + } + + .bodywebsite .d-lg-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-lg-none { + display: none !important; + } + + .bodywebsite .flex-lg-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-lg-row { + flex-direction: row !important; + } + + .bodywebsite .flex-lg-column { + flex-direction: column !important; + } + + .bodywebsite .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-lg-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-lg-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-lg-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-lg-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-lg-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-lg-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-lg-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-lg-center { + align-items: center !important; + } + + .bodywebsite .align-items-lg-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-lg-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-lg-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-lg-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-lg-center { + align-content: center !important; + } + + .bodywebsite .align-content-lg-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-lg-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-lg-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-lg-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-lg-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-lg-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-lg-center { + align-self: center !important; + } + + .bodywebsite .align-self-lg-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-lg-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-lg-first { + order: -1 !important; + } + + .bodywebsite .order-lg-0 { + order: 0 !important; + } + + .bodywebsite .order-lg-1 { + order: 1 !important; + } + + .bodywebsite .order-lg-2 { + order: 2 !important; + } + + .bodywebsite .order-lg-3 { + order: 3 !important; + } + + .bodywebsite .order-lg-4 { + order: 4 !important; + } + + .bodywebsite .order-lg-5 { + order: 5 !important; + } + + .bodywebsite .order-lg-last { + order: 6 !important; + } + + .bodywebsite .m-lg-0 { + margin: 0 !important; + } + + .bodywebsite .m-lg-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-lg-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-lg-3 { + margin: 1rem !important; + } + + .bodywebsite .m-lg-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-lg-5 { + margin: 3rem !important; + } + + .bodywebsite .m-lg-auto { + margin: auto !important; + } + + .bodywebsite .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-lg-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-lg-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-lg-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-lg-auto { + margin-top: auto !important; + } + + .bodywebsite .me-lg-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-lg-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-lg-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-lg-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-lg-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-lg-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-lg-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-lg-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-lg-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-lg-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-lg-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-lg-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-lg-auto { + margin-left: auto !important; + } + + .bodywebsite .p-lg-0 { + padding: 0 !important; + } + + .bodywebsite .p-lg-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-lg-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-lg-3 { + padding: 1rem !important; + } + + .bodywebsite .p-lg-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-lg-5 { + padding: 3rem !important; + } + + .bodywebsite .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-lg-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-lg-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-lg-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-lg-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-lg-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-lg-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-lg-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-lg-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-lg-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-lg-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-lg-0 { + gap: 0 !important; + } + + .bodywebsite .gap-lg-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-lg-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-lg-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-lg-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-lg-5 { + gap: 3rem !important; + } + + .bodywebsite .text-lg-start { + text-align: left !important; + } + + .bodywebsite .text-lg-end { + text-align: right !important; + } + + .bodywebsite .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .float-xl-start { + float: left !important; + } + + .bodywebsite .float-xl-end { + float: right !important; + } + + .bodywebsite .float-xl-none { + float: none !important; + } + + .bodywebsite .d-xl-inline { + display: inline !important; + } + + .bodywebsite .d-xl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xl-block { + display: block !important; + } + + .bodywebsite .d-xl-grid { + display: grid !important; + } + + .bodywebsite .d-xl-table { + display: table !important; + } + + .bodywebsite .d-xl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xl-flex { + display: flex !important; + } + + .bodywebsite .d-xl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xl-none { + display: none !important; + } + + .bodywebsite .flex-xl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xl-first { + order: -1 !important; + } + + .bodywebsite .order-xl-0 { + order: 0 !important; + } + + .bodywebsite .order-xl-1 { + order: 1 !important; + } + + .bodywebsite .order-xl-2 { + order: 2 !important; + } + + .bodywebsite .order-xl-3 { + order: 3 !important; + } + + .bodywebsite .order-xl-4 { + order: 4 !important; + } + + .bodywebsite .order-xl-5 { + order: 5 !important; + } + + .bodywebsite .order-xl-last { + order: 6 !important; + } + + .bodywebsite .m-xl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xl-start { + text-align: left !important; + } + + .bodywebsite .text-xl-end { + text-align: right !important; + } + + .bodywebsite .text-xl-center { + text-align: center !important; + } +} + +@media (min-width: 1400px) { + .bodywebsite .float-xxl-start { + float: left !important; + } + + .bodywebsite .float-xxl-end { + float: right !important; + } + + .bodywebsite .float-xxl-none { + float: none !important; + } + + .bodywebsite .d-xxl-inline { + display: inline !important; + } + + .bodywebsite .d-xxl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xxl-block { + display: block !important; + } + + .bodywebsite .d-xxl-grid { + display: grid !important; + } + + .bodywebsite .d-xxl-table { + display: table !important; + } + + .bodywebsite .d-xxl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xxl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xxl-flex { + display: flex !important; + } + + .bodywebsite .d-xxl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xxl-none { + display: none !important; + } + + .bodywebsite .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xxl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xxl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xxl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xxl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xxl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xxl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xxl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xxl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xxl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xxl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xxl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xxl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xxl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xxl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xxl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xxl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xxl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xxl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xxl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xxl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xxl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xxl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xxl-first { + order: -1 !important; + } + + .bodywebsite .order-xxl-0 { + order: 0 !important; + } + + .bodywebsite .order-xxl-1 { + order: 1 !important; + } + + .bodywebsite .order-xxl-2 { + order: 2 !important; + } + + .bodywebsite .order-xxl-3 { + order: 3 !important; + } + + .bodywebsite .order-xxl-4 { + order: 4 !important; + } + + .bodywebsite .order-xxl-5 { + order: 5 !important; + } + + .bodywebsite .order-xxl-last { + order: 6 !important; + } + + .bodywebsite .m-xxl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xxl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xxl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xxl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xxl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xxl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xxl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xxl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xxl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xxl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xxl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xxl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xxl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xxl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xxl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xxl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xxl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xxl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xxl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xxl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xxl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xxl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xxl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xxl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xxl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xxl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xxl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xxl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xxl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xxl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xxl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xxl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xxl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xxl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xxl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xxl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xxl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xxl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xxl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xxl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xxl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xxl-start { + text-align: left !important; + } + + .bodywebsite .text-xxl-end { + text-align: right !important; + } + + .bodywebsite .text-xxl-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .fs-1 { + font-size: 2.5rem !important; + } + + .bodywebsite .fs-2 { + font-size: 2rem !important; + } + + .bodywebsite .fs-3 { + font-size: 1.75rem !important; + } + + .bodywebsite .fs-4 { + font-size: 1.5rem !important; + } +} + +@media print { + .bodywebsite .d-print-inline { + display: inline !important; + } + + .bodywebsite .d-print-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-print-block { + display: block !important; + } + + .bodywebsite .d-print-grid { + display: grid !important; + } + + .bodywebsite .d-print-table { + display: table !important; + } + + .bodywebsite .d-print-table-row { + display: table-row !important; + } + + .bodywebsite .d-print-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-print-flex { + display: flex !important; + } + + .bodywebsite .d-print-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-print-none { + display: none !important; + } +} + +/* CSS content (all pages) */ +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + font-family: 'Hurricane', cursive; +} + +.bodywebsite #title { + font-size: 100px; +} +.bodywebsite #mysection1{ + font-family: 'Inconsolata', monospace; + color: white; + height: 80%; +} + +.bodywebsite .full-height { + height: 100vh; +} +.bodywebsite .color { + color: #aefeff; +} + +.bodywebsite .btn-color { + font-weight: bold; + color: #35858b; + border-color: #35858b; +} + +.bodywebsite .btn-color:hover { + background-color: #35858b; + color: #fff; +} + +.bodywebsite .btn-color-filled { + background-color: #35858b; + color: #072227; +} +.bodywebsite #products { + background-color: whitesmoke; +} + +.bodywebsite #home, .bodywebsite #contact{ + background-color: #072227; +} + +.bodywebsite footer { + position: fixed; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} + +/*# sourceMappingURL=bootstrap.css.map */ + diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-noimg/containers/wrapper.php new file mode 100644 index 00000000000..26adb3ef220 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/containers/wrapper.php @@ -0,0 +1,278 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) { + $original_file = 'blog.rss'; +} + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost', 'status'=>1); + if ($l) { + $filters['lang'] = $l; + } + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($l); + $outputlangs->loadLangs(array("main", "other")); + $title = $desc = $outputlangs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed']; + $sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) { + $db->close(); +} +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-noimg/website_pages.sql b/htdocs/install/doctemplates/websites/website_template-noimg/website_pages.sql new file mode 100644 index 00000000000..70d81b97f75 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-noimg/website_pages.sql @@ -0,0 +1,9 @@ +-- File generated by Dolibarr 17.0.0-alpha -- 2022-09-26 12:49:03 UTC --; +-- Page ID 80 -> 1__+MAX_llx_website_page__ - Aliases index --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(1__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'index', '', 'index', '', '', '', '', '1', '2022-07-04 15:13:49', '2022-09-26 14:48:51', null, '', 'page', '__N__ __N__ __N__ __N____N__ __N__ __N__ __N__ __N____N____N__ Template__N__ ', '__N__email;__N__ $message = GETPOST(\'message\', \'alpha\');__N__ $cmail = new CMailFile(\'Contact from website\', $to, $from, $message);__N__ if ($cmail->sendfile()) {__N__ ?>__N__ __N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N__
    __N__
    __N____N__
    __N__ __N__ __N__
    __N____N__
    __N__
    __N__
    __N__

    __N__ Brand__N__ Name__N__

    __N__

    __N__ Hello fellows, here is a description of the__N__ brand__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__

    Products

    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 1

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 2

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 3

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 4

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 5

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    Product 6

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N__
    __N__
    __N__
    __N__

    Contact us

    __N__

    __N__ Email: email ?>__N__

    __N__

    __N__ Phone-number: phone ?>__N__

    __N__
    __N__
    __N__

    __N__ Or complete the form__N__

    __N__
    __N__
    __N__ \" />__N__ __N__
    __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N____N__
    __N__', '', 0); +UPDATE llx_website SET fk_default_home = 1__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple.jpg b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple.jpg new file mode 100644 index 00000000000..63622f3b1cd Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/LICENSE b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/LICENSE new file mode 100644 index 00000000000..871ef743662 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/LICENSE @@ -0,0 +1,4 @@ +LICENSE +------- + +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/README.md b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/README.md b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/htmlheader.html new file mode 100644 index 00000000000..a58ea695524 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/htmlheader.html @@ -0,0 +1,6 @@ + + + diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/index.php b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/index.php new file mode 100644 index 00000000000..b4e33361f1b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/index.php @@ -0,0 +1,4 @@ +ref.'/page148.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/javascript.js.php b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/javascript.js.php new file mode 100644 index 00000000000..f58102cf00b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/javascript.js.php @@ -0,0 +1,13 @@ + +/* JS content (all pages) */ + diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/manifest.json.php new file mode 100644 index 00000000000..b61531d6c11 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/manifest.json.php @@ -0,0 +1,13 @@ + + + + + +index + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + + + + Template + + + + + +
    +
    +
    +
    +
    +
    +

    Our company

    +

    + Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum excepturi ipsa consequatur accusamus eveniet dignissimos necessitatibus provident dolore cupiditate. +

    +
    +

    + It uses utility classes for typography and spacing to space content out within the + larger container. +

    +

    + + + + + + +

    +
    +
    +
    + landingpage +
    +
    +
    +
    + +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    + ... +
    +

    LoremIpsum

    +

    + Some quick example text to build on the + card title and make up the bulk of the + card's content. +

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    UNLIMITED FOR ALL

    +

    Lorem, ipsum dolor sit amet consectetur adipisicing elit. Minus molestias voluptatibus voluptatem Lorem ipsum dolor, sit amet consectetur adipisicing elit. Veritatis officia voluptatem incidunt tempore esse porro sequi eveniet eum corrupti quo.

    +
    +
    +

    $79/month

    +
    +
    +

    WHAT YOU WILL GET

    +

    Lorem ipsum dolor sit, amet consectetur


    +

    Lorem ipsum dolor sit, amet consectetur


    +

    Lorem ipsum dolor sit, amet consectetur


    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Contact us

    +
    +
    + email ?>
    + getFullAddress() ?>
    +
    +
    + + +
    +
    + +
    + +


    + +
    +
    +
    +
    +
    +
    + +
    + +
    + socialnetworks as $key => $value) { + print ''; + } ?> + +
    + +
    + + + +
    + © 2022 Dolibarr: + Dolicloud.com +
    + +
    +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/styles.css.php new file mode 100644 index 00000000000..acc30d70bfe --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/styles.css.php @@ -0,0 +1,12536 @@ + +/* CSS content (all pages) +body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; } +.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;} +*/ + +@charset "UTF-8"; + +.bodywebsite { + /*! + * Bootstrap v5.2.1 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + /* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:begin:ignore */ + /* rtl:end:ignore */ + /* rtl:options: { + "autoRename": true, + "stringMap":[ { + "name" : "prev-next", + "search" : "prev", + "replace" : "next" + } ] +} */ + /* rtl:begin:remove */ + /* rtl:end:remove */ + /*# sourceMappingURL=bootstrap.css.map */; +} + +.bodywebsite :root { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg-rgb: 255, 255, 255; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #0d6efd; + --bs-link-hover-color: #0a58ca; + --bs-code-color: #d63384; + --bs-highlight-bg: #fff3cd; +} + +.bodywebsite *, + .bodywebsite *::before, + .bodywebsite *::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + .bodywebsite :root { + scroll-behavior: smooth; + } +} + +.bodywebsite .text-dark{ + color: black; +} + +.bodywebsite body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} + +.bodywebsite hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} + +.bodywebsite h6, .bodywebsite .h6, .bodywebsite h5, .bodywebsite .h5, .bodywebsite h4, .bodywebsite .h4, .bodywebsite h3, .bodywebsite .h3, .bodywebsite h2, .bodywebsite .h2, .bodywebsite h1, .bodywebsite .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +.bodywebsite h1, .bodywebsite .h1 { + font-size: calc(1.375rem + 1.5vw); +} + +@media (min-width: 1200px) { + .bodywebsite h1, .bodywebsite .h1 { + font-size: 2.5rem; + } +} + +.bodywebsite h2, .bodywebsite .h2 { + font-size: calc(1.325rem + 0.9vw); +} + +@media (min-width: 1200px) { + .bodywebsite h2, .bodywebsite .h2 { + font-size: 2rem; + } +} + +.bodywebsite h3, .bodywebsite .h3 { + font-size: calc(1.3rem + 0.6vw); +} + +@media (min-width: 1200px) { + .bodywebsite h3, .bodywebsite .h3 { + font-size: 1.75rem; + } +} + +.bodywebsite h4, .bodywebsite .h4 { + font-size: calc(1.275rem + 0.3vw); +} + +@media (min-width: 1200px) { + .bodywebsite h4, .bodywebsite .h4 { + font-size: 1.5rem; + } +} + +.bodywebsite h5, .bodywebsite .h5 { + font-size: 1.25rem; +} + +.bodywebsite h6, .bodywebsite .h6 { + font-size: 1rem; +} + +.bodywebsite p { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +.bodywebsite address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +.bodywebsite ol, + .bodywebsite ul { + padding-left: 2rem; +} + +.bodywebsite ol, + .bodywebsite ul, + .bodywebsite dl { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite ol ol, + .bodywebsite ul ul, + .bodywebsite ol ul, + .bodywebsite ul ol { + margin-bottom: 0; +} + +.bodywebsite dt { + font-weight: 700; +} + +.bodywebsite dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +.bodywebsite blockquote { + margin: 0 0 1rem; +} + +.bodywebsite b, + .bodywebsite strong { + font-weight: bolder; +} + +.bodywebsite small, .bodywebsite .small { + font-size: 0.875em; +} + +.bodywebsite mark, .bodywebsite .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +.bodywebsite sub, + .bodywebsite sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +.bodywebsite sub { + bottom: -0.25em; +} + +.bodywebsite sup { + top: -0.5em; +} + +.bodywebsite a { + color: var(--bs-link-color); + text-decoration: underline; +} + +.bodywebsite a:hover { + color: var(--bs-link-hover-color); +} + +.bodywebsite a:not([href]):not([class]), .bodywebsite a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +.bodywebsite pre, + .bodywebsite code, + .bodywebsite kbd, + .bodywebsite samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +.bodywebsite pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} + +.bodywebsite pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +.bodywebsite code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} + +.bodywebsite a > code { + color: inherit; +} + +.bodywebsite kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} + +.bodywebsite kbd kbd { + padding: 0; + font-size: 1em; +} + +.bodywebsite figure { + margin: 0 0 1rem; +} + +.bodywebsite img, + .bodywebsite svg { + vertical-align: middle; +} + +.bodywebsite table { + caption-side: bottom; + border-collapse: collapse; +} + +.bodywebsite caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +.bodywebsite th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +.bodywebsite thead, + .bodywebsite tbody, + .bodywebsite tfoot, + .bodywebsite tr, + .bodywebsite td, + .bodywebsite th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +.bodywebsite label { + display: inline-block; +} + +.bodywebsite button { + border-radius: 0; +} + +.bodywebsite button:focus:not(:focus-visible) { + outline: 0; +} + +.bodywebsite input, + .bodywebsite button, + .bodywebsite select, + .bodywebsite optgroup, + .bodywebsite textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.bodywebsite button, + .bodywebsite select { + text-transform: none; +} + +.bodywebsite [role=button] { + cursor: pointer; +} + +.bodywebsite select { + word-wrap: normal; +} + +.bodywebsite select:disabled { + opacity: 1; +} + +.bodywebsite [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +.bodywebsite button, + .bodywebsite [type=button], + .bodywebsite [type=reset], + .bodywebsite [type=submit] { + -webkit-appearance: button; +} + +.bodywebsite button:not(:disabled), + .bodywebsite [type=button]:not(:disabled), + .bodywebsite [type=reset]:not(:disabled), + .bodywebsite [type=submit]:not(:disabled) { + cursor: pointer; +} + +.bodywebsite ::-moz-focus-inner { + padding: 0; + border-style: none; +} + +.bodywebsite textarea { + resize: vertical; +} + +.bodywebsite fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +.bodywebsite legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} + +@media (min-width: 1200px) { + .bodywebsite legend { + font-size: 1.5rem; + } +} + +.bodywebsite legend + * { + clear: left; +} + +.bodywebsite ::-webkit-datetime-edit-fields-wrapper, + .bodywebsite ::-webkit-datetime-edit-text, + .bodywebsite ::-webkit-datetime-edit-minute, + .bodywebsite ::-webkit-datetime-edit-hour-field, + .bodywebsite ::-webkit-datetime-edit-day-field, + .bodywebsite ::-webkit-datetime-edit-month-field, + .bodywebsite ::-webkit-datetime-edit-year-field { + padding: 0; +} + +.bodywebsite ::-webkit-inner-spin-button { + height: auto; +} + +.bodywebsite [type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +.bodywebsite ::-webkit-search-decoration { + -webkit-appearance: none; +} + +.bodywebsite ::-webkit-color-swatch-wrapper { + padding: 0; +} + +.bodywebsite ::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite ::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite output { + display: inline-block; +} + +.bodywebsite iframe { + border: 0; +} + +.bodywebsite summary { + display: list-item; + cursor: pointer; +} + +.bodywebsite progress { + vertical-align: baseline; +} + +.bodywebsite [hidden] { + display: none !important; +} + +.bodywebsite .lead { + font-size: 1.25rem; + font-weight: 300; +} + +.bodywebsite .display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-1 { + font-size: 5rem; + } +} + +.bodywebsite .display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-2 { + font-size: 4.5rem; + } +} + +.bodywebsite .display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-3 { + font-size: 4rem; + } +} + +.bodywebsite .display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-4 { + font-size: 3.5rem; + } +} + +.bodywebsite .display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-5 { + font-size: 3rem; + } +} + +.bodywebsite .display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-6 { + font-size: 2.5rem; + } +} + +.bodywebsite .list-unstyled { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline-item { + display: inline-block; +} + +.bodywebsite .list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.bodywebsite .initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.bodywebsite .blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} + +.bodywebsite .blockquote > :last-child { + margin-bottom: 0; +} + +.bodywebsite .blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .blockquote-footer::before { + content: "— "; +} + +.bodywebsite .img-fluid { + max-width: 100%; + height: auto; +} + +.bodywebsite .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} + +.bodywebsite .figure { + display: inline-block; +} + +.bodywebsite .figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.bodywebsite .figure-caption { + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .container, + .bodywebsite .container-fluid, + .bodywebsite .container-xxl, + .bodywebsite .container-xl, + .bodywebsite .container-lg, + .bodywebsite .container-md, + .bodywebsite .container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .container-sm, .bodywebsite .container { + max-width: 540px; + } +} + +@media (min-width: 768px) { + .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 720px; + } +} + +@media (min-width: 992px) { + .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 960px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1140px; + } +} + +@media (min-width: 1400px) { + .bodywebsite .container-xxl, .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1320px; + } +} + +.bodywebsite .row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} + +.bodywebsite .row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.bodywebsite .col { + flex: 1 0 0%; +} + +.bodywebsite .row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.bodywebsite .row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.bodywebsite .row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.bodywebsite .col-auto { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.bodywebsite .col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.bodywebsite .col-3 { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.bodywebsite .col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.bodywebsite .col-6 { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.bodywebsite .col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.bodywebsite .col-9 { + flex: 0 0 auto; + width: 75%; +} + +.bodywebsite .col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.bodywebsite .col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.bodywebsite .col-12 { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .offset-1 { + margin-left: 8.33333333%; +} + +.bodywebsite .offset-2 { + margin-left: 16.66666667%; +} + +.bodywebsite .offset-3 { + margin-left: 25%; +} + +.bodywebsite .offset-4 { + margin-left: 33.33333333%; +} + +.bodywebsite .offset-5 { + margin-left: 41.66666667%; +} + +.bodywebsite .offset-6 { + margin-left: 50%; +} + +.bodywebsite .offset-7 { + margin-left: 58.33333333%; +} + +.bodywebsite .offset-8 { + margin-left: 66.66666667%; +} + +.bodywebsite .offset-9 { + margin-left: 75%; +} + +.bodywebsite .offset-10 { + margin-left: 83.33333333%; +} + +.bodywebsite .offset-11 { + margin-left: 91.66666667%; +} + +.bodywebsite .g-0, + .bodywebsite .gx-0 { + --bs-gutter-x: 0; +} + +.bodywebsite .g-0, + .bodywebsite .gy-0 { + --bs-gutter-y: 0; +} + +.bodywebsite .g-1, + .bodywebsite .gx-1 { + --bs-gutter-x: 0.25rem; +} + +.bodywebsite .g-1, + .bodywebsite .gy-1 { + --bs-gutter-y: 0.25rem; +} + +.bodywebsite .g-2, + .bodywebsite .gx-2 { + --bs-gutter-x: 0.5rem; +} + +.bodywebsite .g-2, + .bodywebsite .gy-2 { + --bs-gutter-y: 0.5rem; +} + +.bodywebsite .g-3, + .bodywebsite .gx-3 { + --bs-gutter-x: 1rem; +} + +.bodywebsite .g-3, + .bodywebsite .gy-3 { + --bs-gutter-y: 1rem; +} + +.bodywebsite .g-4, + .bodywebsite .gx-4 { + --bs-gutter-x: 1.5rem; +} + +.bodywebsite .g-4, + .bodywebsite .gy-4 { + --bs-gutter-y: 1.5rem; +} + +.bodywebsite .g-5, + .bodywebsite .gx-5 { + --bs-gutter-x: 3rem; +} + +.bodywebsite .g-5, + .bodywebsite .gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .bodywebsite .col-sm { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-sm-0 { + margin-left: 0; + } + + .bodywebsite .offset-sm-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-sm-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-sm-3 { + margin-left: 25%; + } + + .bodywebsite .offset-sm-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-sm-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-sm-6 { + margin-left: 50%; + } + + .bodywebsite .offset-sm-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-sm-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-sm-9 { + margin-left: 75%; + } + + .bodywebsite .offset-sm-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-sm-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gx-sm-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gy-sm-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 768px) { + .bodywebsite .col-md { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-md-0 { + margin-left: 0; + } + + .bodywebsite .offset-md-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-md-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-md-3 { + margin-left: 25%; + } + + .bodywebsite .offset-md-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-md-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-md-6 { + margin-left: 50%; + } + + .bodywebsite .offset-md-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-md-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-md-9 { + margin-left: 75%; + } + + .bodywebsite .offset-md-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-md-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-md-0, + .bodywebsite .gx-md-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-md-0, + .bodywebsite .gy-md-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-md-1, + .bodywebsite .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-md-1, + .bodywebsite .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gx-md-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gy-md-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gx-md-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gy-md-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 992px) { + .bodywebsite .col-lg { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-lg-0 { + margin-left: 0; + } + + .bodywebsite .offset-lg-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-lg-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-lg-3 { + margin-left: 25%; + } + + .bodywebsite .offset-lg-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-lg-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-lg-6 { + margin-left: 50%; + } + + .bodywebsite .offset-lg-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-lg-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-lg-9 { + margin-left: 75%; + } + + .bodywebsite .offset-lg-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-lg-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gx-lg-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gy-lg-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1200px) { + .bodywebsite .col-xl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gx-xl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gy-xl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1400px) { + .bodywebsite .col-xxl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xxl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xxl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xxl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xxl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gx-xxl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gy-xxl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} + +.bodywebsite .table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} + +.bodywebsite .table > tbody { + vertical-align: inherit; +} + +.bodywebsite .table > thead { + vertical-align: bottom; +} + +.bodywebsite .table-group-divider { + border-top: 2px solid currentcolor; +} + +.bodywebsite .caption-top { + caption-side: top; +} + +.bodywebsite .table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} + +.bodywebsite .table-bordered > :not(caption) > * { + border-width: 1px 0; +} + +.bodywebsite .table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} + +.bodywebsite .table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} + +.bodywebsite .table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.bodywebsite .table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} + +.bodywebsite .table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} + +.bodywebsite .table-primary { + --bs-table-color: #000; + --bs-table-bg: #cfe2ff; + --bs-table-border-color: #bacbe6; + --bs-table-striped-bg: #c5d7f2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bacbe6; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfd1ec; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-secondary { + --bs-table-color: #000; + --bs-table-bg: #e2e3e5; + --bs-table-border-color: #cbccce; + --bs-table-striped-bg: #d7d8da; + --bs-table-striped-color: #000; + --bs-table-active-bg: #cbccce; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d1d2d4; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-success { + --bs-table-color: #000; + --bs-table-bg: #d1e7dd; + --bs-table-border-color: #bcd0c7; + --bs-table-striped-bg: #c7dbd2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bcd0c7; + --bs-table-active-color: #000; + --bs-table-hover-bg: #c1d6cc; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-info { + --bs-table-color: #000; + --bs-table-bg: #cff4fc; + --bs-table-border-color: #badce3; + --bs-table-striped-bg: #c5e8ef; + --bs-table-striped-color: #000; + --bs-table-active-bg: #badce3; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfe2e9; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-warning { + --bs-table-color: #000; + --bs-table-bg: #fff3cd; + --bs-table-border-color: #e6dbb9; + --bs-table-striped-bg: #f2e7c3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e6dbb9; + --bs-table-active-color: #000; + --bs-table-hover-bg: #ece1be; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-danger { + --bs-table-color: #000; + --bs-table-bg: #f8d7da; + --bs-table-border-color: #dfc2c4; + --bs-table-striped-bg: #eccccf; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfc2c4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5c7ca; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-light { + --bs-table-color: #000; + --bs-table-bg: #f8f9fa; + --bs-table-border-color: #dfe0e1; + --bs-table-striped-bg: #ecedee; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfe0e1; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5e6e7; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-dark { + --bs-table-color: #fff; + --bs-table-bg: #212529; + --bs-table-border-color: #373b3e; + --bs-table-striped-bg: #2c3034; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #373b3e; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #323539; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .bodywebsite .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +.bodywebsite .form-label { + margin-bottom: 0.5rem; +} + +.bodywebsite .col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.bodywebsite .col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} + +.bodywebsite .col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} + +.bodywebsite .form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control { + transition: none; + } +} + +.bodywebsite .form-control[type=file] { + overflow: hidden; +} + +.bodywebsite .form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-control::-webkit-date-and-time-value { + height: 1.5em; +} + +.bodywebsite .form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control::placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control:disabled { + background-color: #e9ecef; + opacity: 1; +} + +.bodywebsite .form-control::-webkit-file-upload-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +.bodywebsite .form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + + .bodywebsite .form-control::file-selector-button { + transition: none; + } +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} + +.bodywebsite .form-control-plaintext:focus { + outline: 0; +} + +.bodywebsite .form-control-plaintext.form-control-sm, .bodywebsite .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.bodywebsite .form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-control-lg::-webkit-file-upload-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite .form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} + +.bodywebsite textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} + +.bodywebsite .form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite .form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-select { + transition: none; + } +} + +.bodywebsite .form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-select[multiple], .bodywebsite .form-select[size]:not([size="1"]) { + padding-right: 0.75rem; + background-image: none; +} + +.bodywebsite .form-select:disabled { + background-color: #e9ecef; +} + +.bodywebsite .form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #212529; +} + +.bodywebsite .form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} + +.bodywebsite .form-check .form-check-input { + float: left; + margin-left: -1.5em; +} + +.bodywebsite .form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} + +.bodywebsite .form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} + +.bodywebsite .form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0, 0, 0, 0.25); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; + print-color-adjust: exact; +} + +.bodywebsite .form-check-input[type=checkbox] { + border-radius: 0.25em; +} + +.bodywebsite .form-check-input[type=radio] { + border-radius: 50%; +} + +.bodywebsite .form-check-input:active { + filter: brightness(90%); +} + +.bodywebsite .form-check-input:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-check-input:checked { + background-color: #0d6efd; + border-color: #0d6efd; +} + +.bodywebsite .form-check-input:checked[type=checkbox] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:checked[type=radio] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input[type=checkbox]:indeterminate { + background-color: #0d6efd; + border-color: #0d6efd; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} + +.bodywebsite .form-check-input[disabled] ~ .form-check-label, .bodywebsite .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.bodywebsite .form-switch { + padding-left: 2.5em; +} + +.bodywebsite .form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-switch .form-check-input { + transition: none; + } +} + +.bodywebsite .form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} + +.bodywebsite .form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.bodywebsite .form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.bodywebsite .btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} + +.bodywebsite .btn-check[disabled] + .btn, .bodywebsite .btn-check:disabled + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} + +.bodywebsite .form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.bodywebsite .form-range:focus { + outline: 0; +} + +.bodywebsite .form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range::-moz-focus-outer { + border: 0; +} + +.bodywebsite .form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-webkit-slider-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-moz-range-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range:disabled { + pointer-events: none; +} + +.bodywebsite .form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-floating { + position: relative; +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext, + .bodywebsite .form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} + +.bodywebsite .form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-floating > label { + transition: none; + } +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} + +.bodywebsite .form-floating > .form-control::-moz-placeholder, .bodywebsite .form-floating > .form-control-plaintext::-moz-placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control::placeholder, + .bodywebsite .form-floating > .form-control-plaintext::placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown), .bodywebsite .form-floating > .form-control-plaintext:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:focus, .bodywebsite .form-floating > .form-control:not(:placeholder-shown), + .bodywebsite .form-floating > .form-control-plaintext:focus, + .bodywebsite .form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill, + .bodywebsite .form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:focus ~ label, + .bodywebsite .form-floating > .form-control:not(:placeholder-shown) ~ label, + .bodywebsite .form-floating > .form-control-plaintext ~ label, + .bodywebsite .form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} + +.bodywebsite .input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} + +.bodywebsite .input-group > .form-control, + .bodywebsite .input-group > .form-select, + .bodywebsite .input-group > .form-floating { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} + +.bodywebsite .input-group > .form-control:focus, + .bodywebsite .input-group > .form-select:focus, + .bodywebsite .input-group > .form-floating:focus-within { + z-index: 5; +} + +.bodywebsite .input-group .btn { + position: relative; + z-index: 2; +} + +.bodywebsite .input-group .btn:focus { + z-index: 5; +} + +.bodywebsite .input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.375rem; +} + +.bodywebsite .input-group-lg > .form-control, + .bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-lg > .input-group-text, + .bodywebsite .input-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .input-group-sm > .form-control, + .bodywebsite .input-group-sm > .form-select, + .bodywebsite .input-group-sm > .input-group-text, + .bodywebsite .input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-sm > .form-select { + padding-right: 3rem; +} + +.bodywebsite .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .input-group > .form-floating:not(:first-child) > .form-control, + .bodywebsite .input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #198754; +} + +.bodywebsite .valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(25, 135, 84, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :valid ~ .valid-feedback, + .bodywebsite .was-validated :valid ~ .valid-tooltip, + .bodywebsite .is-valid ~ .valid-feedback, + .bodywebsite .is-valid ~ .valid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:valid, .bodywebsite .form-control.is-valid { + border-color: #198754; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:valid:focus, .bodywebsite .form-control.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:valid, .bodywebsite textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:valid, .bodywebsite .form-select.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-select:valid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:valid:not([multiple])[size="1"], .bodywebsite .form-select.is-valid:not([multiple]):not([size]), .bodywebsite .form-select.is-valid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:valid:focus, .bodywebsite .form-select.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-control-color:valid, .bodywebsite .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:valid, .bodywebsite .form-check-input.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:checked, .bodywebsite .form-check-input.is-valid:checked { + background-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:focus, .bodywebsite .form-check-input.is-valid:focus { + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-check-input:valid ~ .form-check-label, .bodywebsite .form-check-input.is-valid ~ .form-check-label { + color: #198754; +} + +.bodywebsite .form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):valid, .bodywebsite .input-group > .form-control:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):valid, + .bodywebsite .input-group > .form-select:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):valid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-valid { + z-index: 3; +} + +.bodywebsite .invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #dc3545; +} + +.bodywebsite .invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :invalid ~ .invalid-feedback, + .bodywebsite .was-validated :invalid ~ .invalid-tooltip, + .bodywebsite .is-invalid ~ .invalid-feedback, + .bodywebsite .is-invalid ~ .invalid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:invalid, .bodywebsite .form-control.is-invalid { + border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:invalid:focus, .bodywebsite .form-control.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:invalid, .bodywebsite textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:invalid, .bodywebsite .form-select.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-select:invalid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:invalid:not([multiple])[size="1"], .bodywebsite .form-select.is-invalid:not([multiple]):not([size]), .bodywebsite .form-select.is-invalid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:invalid:focus, .bodywebsite .form-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-control-color:invalid, .bodywebsite .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:invalid, .bodywebsite .form-check-input.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:checked, .bodywebsite .form-check-input.is-invalid:checked { + background-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:focus, .bodywebsite .form-check-input.is-invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-check-input:invalid ~ .form-check-label, .bodywebsite .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.bodywebsite .form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):invalid, .bodywebsite .input-group > .form-control:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):invalid, + .bodywebsite .input-group > .form-select:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):invalid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-invalid { + z-index: 4; +} + +.bodywebsite .btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #212529; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .btn { + transition: none; + } +} + +.bodywebsite :not(.btn-check) + .btn:hover, .bodywebsite .btn:first-child:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} + +.bodywebsite .btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:checked + .btn, .bodywebsite :not(.btn-check) + .btn:active, .bodywebsite .btn:first-child:active, .bodywebsite .btn.active, .bodywebsite .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} + +.bodywebsite .btn-check:checked + .btn:focus-visible, .bodywebsite :not(.btn-check) + .btn:active:focus-visible, .bodywebsite .btn:first-child:active:focus-visible, .bodywebsite .btn.active:focus-visible, .bodywebsite .btn.show:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn:disabled, .bodywebsite .btn.disabled, .bodywebsite fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} + +.bodywebsite .btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0b5ed7; + --bs-btn-hover-border-color: #0a58ca; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0a58ca; + --bs-btn-active-border-color: #0a53be; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #0d6efd; + --bs-btn-disabled-border-color: #0d6efd; +} + +.bodywebsite .btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #5c636a; + --bs-btn-hover-border-color: #565e64; + --bs-btn-focus-shadow-rgb: 130, 138, 145; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #565e64; + --bs-btn-active-border-color: #51585e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #6c757d; + --bs-btn-disabled-border-color: #6c757d; +} + +.bodywebsite .btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #157347; + --bs-btn-hover-border-color: #146c43; + --bs-btn-focus-shadow-rgb: 60, 153, 110; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #146c43; + --bs-btn-active-border-color: #13653f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #198754; + --bs-btn-disabled-border-color: #198754; +} + +.bodywebsite .btn-info { + --bs-btn-color: #000; + --bs-btn-bg: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #31d2f2; + --bs-btn-hover-border-color: #25cff2; + --bs-btn-focus-shadow-rgb: 11, 172, 204; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #3dd5f3; + --bs-btn-active-border-color: #25cff2; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #0dcaf0; + --bs-btn-disabled-border-color: #0dcaf0; +} + +.bodywebsite .btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffca2c; + --bs-btn-hover-border-color: #ffc720; + --bs-btn-focus-shadow-rgb: 217, 164, 6; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffcd39; + --bs-btn-active-border-color: #ffc720; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #ffc107; + --bs-btn-disabled-border-color: #ffc107; +} + +.bodywebsite .btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #bb2d3b; + --bs-btn-hover-border-color: #b02a37; + --bs-btn-focus-shadow-rgb: 225, 83, 97; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b02a37; + --bs-btn-active-border-color: #a52834; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #dc3545; + --bs-btn-disabled-border-color: #dc3545; +} + +.bodywebsite .btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #d3d4d5; + --bs-btn-hover-border-color: #c6c7c8; + --bs-btn-focus-shadow-rgb: 211, 212, 213; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #c6c7c8; + --bs-btn-active-border-color: #babbbc; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f8f9fa; + --bs-btn-disabled-border-color: #f8f9fa; +} + +.bodywebsite .btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #424649; + --bs-btn-hover-border-color: #373b3e; + --bs-btn-focus-shadow-rgb: 66, 70, 73; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #4d5154; + --bs-btn-active-border-color: #373b3e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #212529; + --bs-btn-disabled-border-color: #212529; +} + +.bodywebsite .btn-outline-primary { + --bs-btn-color: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0d6efd; + --bs-btn-hover-border-color: #0d6efd; + --bs-btn-focus-shadow-rgb: 13, 110, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0d6efd; + --bs-btn-active-border-color: #0d6efd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0d6efd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0d6efd; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-secondary { + --bs-btn-color: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #6c757d; + --bs-btn-hover-border-color: #6c757d; + --bs-btn-focus-shadow-rgb: 108, 117, 125; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6c757d; + --bs-btn-active-border-color: #6c757d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #6c757d; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-success { + --bs-btn-color: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #198754; + --bs-btn-hover-border-color: #198754; + --bs-btn-focus-shadow-rgb: 25, 135, 84; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #198754; + --bs-btn-active-border-color: #198754; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #198754; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #198754; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-info { + --bs-btn-color: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #0dcaf0; + --bs-btn-hover-border-color: #0dcaf0; + --bs-btn-focus-shadow-rgb: 13, 202, 240; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #0dcaf0; + --bs-btn-active-border-color: #0dcaf0; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0dcaf0; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0dcaf0; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-warning { + --bs-btn-color: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffc107; + --bs-btn-hover-border-color: #ffc107; + --bs-btn-focus-shadow-rgb: 255, 193, 7; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffc107; + --bs-btn-active-border-color: #ffc107; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #ffc107; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #ffc107; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-danger { + --bs-btn-color: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #dc3545; + --bs-btn-hover-border-color: #dc3545; + --bs-btn-focus-shadow-rgb: 220, 53, 69; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #dc3545; + --bs-btn-active-border-color: #dc3545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #dc3545; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #dc3545; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-light { + --bs-btn-color: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f8f9fa; + --bs-btn-hover-border-color: #f8f9fa; + --bs-btn-focus-shadow-rgb: 248, 249, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f8f9fa; + --bs-btn-active-border-color: #f8f9fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f8f9fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f8f9fa; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-dark { + --bs-btn-color: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #212529; + --bs-btn-hover-border-color: #212529; + --bs-btn-focus-shadow-rgb: 33, 37, 41; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #212529; + --bs-btn-active-border-color: #212529; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #212529; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #212529; + --bs-gradient: none; +} + +.bodywebsite .btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: underline; +} + +.bodywebsite .btn-link:focus-visible { + color: var(--bs-btn-color); +} + +.bodywebsite .btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.bodywebsite .btn-lg, .bodywebsite .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} + +.bodywebsite .btn-sm, .bodywebsite .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} + +.bodywebsite .fade { + transition: opacity 0.15s linear; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .fade { + transition: none; + } +} + +.bodywebsite .fade:not(.show) { + opacity: 0; +} + +.bodywebsite .collapse:not(.show) { + display: none; +} + +.bodywebsite .collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing { + transition: none; + } +} + +.bodywebsite .collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing.collapse-horizontal { + transition: none; + } +} + +.bodywebsite .dropup, + .bodywebsite .dropend, + .bodywebsite .dropdown, + .bodywebsite .dropstart, + .bodywebsite .dropup-center, + .bodywebsite .dropdown-center { + position: relative; +} + +.bodywebsite .dropdown-toggle { + white-space: nowrap; +} + +.bodywebsite .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #212529; + --bs-dropdown-bg: #fff; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #212529; + --bs-dropdown-link-hover-color: #1e2125; + --bs-dropdown-link-hover-bg: #e9ecef; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #6c757d; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} + +.bodywebsite .dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropdown-menu-start { + --bs-position: start; +} + +.bodywebsite .dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.bodywebsite .dropdown-menu-end { + --bs-position: end; +} + +.bodywebsite .dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .dropdown-menu-sm-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-sm-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 768px) { + .bodywebsite .dropdown-menu-md-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-md-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 992px) { + .bodywebsite .dropdown-menu-lg-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-lg-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1200px) { + .bodywebsite .dropdown-menu-xl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1400px) { + .bodywebsite .dropdown-menu-xxl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xxl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +.bodywebsite .dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} + +.bodywebsite .dropend .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.bodywebsite .dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: none; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} + +.bodywebsite .dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.bodywebsite .dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.bodywebsite .dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} + +.bodywebsite .dropdown-item:hover, .bodywebsite .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} + +.bodywebsite .dropdown-item.active, .bodywebsite .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} + +.bodywebsite .dropdown-item.disabled, .bodywebsite .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.bodywebsite .dropdown-menu.show { + display: block; +} + +.bodywebsite .dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.bodywebsite .dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.bodywebsite .dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.bodywebsite .btn-group, + .bodywebsite .btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} + +.bodywebsite .btn-group > .btn, + .bodywebsite .btn-group-vertical > .btn { + position: relative; + flex: 1 1 auto; +} + +.bodywebsite .btn-group > .btn-check:checked + .btn, + .bodywebsite .btn-group > .btn-check:focus + .btn, + .bodywebsite .btn-group > .btn:hover, + .bodywebsite .btn-group > .btn:focus, + .bodywebsite .btn-group > .btn:active, + .bodywebsite .btn-group > .btn.active, + .bodywebsite .btn-group-vertical > .btn-check:checked + .btn, + .bodywebsite .btn-group-vertical > .btn-check:focus + .btn, + .bodywebsite .btn-group-vertical > .btn:hover, + .bodywebsite .btn-group-vertical > .btn:focus, + .bodywebsite .btn-group-vertical > .btn:active, + .bodywebsite .btn-group-vertical > .btn.active { + z-index: 1; +} + +.bodywebsite .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} + +.bodywebsite .btn-toolbar .input-group { + width: auto; +} + +.bodywebsite .btn-group { + border-radius: 0.375rem; +} + +.bodywebsite .btn-group > :not(.btn-check:first-child) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) { + margin-left: -1px; +} + +.bodywebsite .btn-group > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group > .btn.dropdown-toggle-split:first-child, + .bodywebsite .btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .btn-group > .btn:nth-child(n+3), + .bodywebsite .btn-group > :not(.btn-check) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} + +.bodywebsite .dropdown-toggle-split::after, .bodywebsite .dropup .dropdown-toggle-split::after, .bodywebsite .dropend .dropdown-toggle-split::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.bodywebsite .btn-sm + .dropdown-toggle-split, .bodywebsite .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.bodywebsite .btn-lg + .dropdown-toggle-split, .bodywebsite .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.bodywebsite .btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} + +.bodywebsite .btn-group-vertical > .btn, + .bodywebsite .btn-group-vertical > .btn-group { + width: 100%; +} + +.bodywebsite .btn-group-vertical > .btn:not(:first-child), + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) { + margin-top: -1px; +} + +.bodywebsite .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .btn-group-vertical > .btn ~ .btn, + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .nav-link { + transition: none; + } +} + +.bodywebsite .nav-link:hover, .bodywebsite .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} + +.bodywebsite .nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.bodywebsite .nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #dee2e6; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6; + --bs-nav-tabs-link-active-color: #495057; + --bs-nav-tabs-link-active-bg: #fff; + --bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff; + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} + +.bodywebsite .nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + background: none; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} + +.bodywebsite .nav-tabs .nav-link:hover, .bodywebsite .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} + +.bodywebsite .nav-tabs .nav-link.disabled, .bodywebsite .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-tabs .nav-link.active, + .bodywebsite .nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} + +.bodywebsite .nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #0d6efd; +} + +.bodywebsite .nav-pills .nav-link { + background: none; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} + +.bodywebsite .nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-pills .nav-link.active, + .bodywebsite .nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.bodywebsite .nav-fill > .nav-link, + .bodywebsite .nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} + +.bodywebsite .nav-justified > .nav-link, + .bodywebsite .nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} + +.bodywebsite .nav-fill .nav-item .nav-link, + .bodywebsite .nav-justified .nav-item .nav-link { + width: 100%; +} + +.bodywebsite .tab-content > .tab-pane { + display: none; +} + +.bodywebsite .tab-content > .active { + display: block; +} + +.bodywebsite .navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: rgba(0, 0, 0, 0.55); + --bs-navbar-hover-color: rgba(0, 0, 0, 0.7); + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-hover-color: rgba(0, 0, 0, 0.9); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} + +.bodywebsite .navbar > .container, + .bodywebsite .navbar > .container-fluid, + .bodywebsite .navbar > .container-sm, + .bodywebsite .navbar > .container-md, + .bodywebsite .navbar > .container-lg, + .bodywebsite .navbar > .container-xl, + .bodywebsite .navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} + +.bodywebsite .navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} + +.bodywebsite .navbar-brand:hover, .bodywebsite .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.bodywebsite .navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .navbar-nav .show > .nav-link, + .bodywebsite .navbar-nav .nav-link.active { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-nav .dropdown-menu { + position: static; +} + +.bodywebsite .navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} + +.bodywebsite .navbar-text a, + .bodywebsite .navbar-text a:hover, + .bodywebsite .navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} + +.bodywebsite .navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .navbar-toggler { + transition: none; + } +} + +.bodywebsite .navbar-toggler:hover { + text-decoration: none; +} + +.bodywebsite .navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.bodywebsite .navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.bodywebsite .navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .bodywebsite .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-sm .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-md .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-md .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-lg .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xxl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +.bodywebsite .navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} + +.bodywebsite .navbar-expand .navbar-nav { + flex-direction: row; +} + +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} + +.bodywebsite .navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} + +.bodywebsite .navbar-expand .navbar-nav-scroll { + overflow: visible; +} + +.bodywebsite .navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} + +.bodywebsite .navbar-expand .navbar-toggler { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-header { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.bodywebsite .navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.55); + --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.bodywebsite .card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: rgba(0, 0, 0, 0.03); + --bs-card-bg: #fff; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} + +.bodywebsite .card > hr { + margin-right: 0; + margin-left: 0; +} + +.bodywebsite .card > .list-group { + border-top: inherit; + border-bottom: inherit; +} + +.bodywebsite .card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .card-header + .list-group, + .bodywebsite .card > .list-group + .card-footer { + border-top: 0; +} + +.bodywebsite .card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.bodywebsite .card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} + +.bodywebsite .card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} + +.bodywebsite .card-text:last-child { + margin-bottom: 0; +} + +.bodywebsite .card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.bodywebsite .card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.bodywebsite .card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} + +.bodywebsite .card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.bodywebsite .card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.bodywebsite .card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top, + .bodywebsite .card-img-bottom { + width: 100%; +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} + +@media (min-width: 576px) { + .bodywebsite .card-group { + display: flex; + flex-flow: row wrap; + } + + .bodywebsite .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + + .bodywebsite .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-top, + .bodywebsite .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-top, + .bodywebsite .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.bodywebsite .accordion { + --bs-accordion-color: var(--bs-body-color); + --bs-accordion-bg: #fff; + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #86b7fe; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #0c63e4; + --bs-accordion-active-bg: #e7f1ff; +} + +.bodywebsite .accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button { + transition: none; + } +} + +.bodywebsite .accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} + +.bodywebsite .accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button::after { + transition: none; + } +} + +.bodywebsite .accordion-button:hover { + z-index: 2; +} + +.bodywebsite .accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.bodywebsite .accordion-header { + margin-bottom: 0; +} + +.bodywebsite .accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:not(:first-of-type) { + border-top: 0; +} + +.bodywebsite .accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.bodywebsite .accordion-flush .accordion-collapse { + border-width: 0; +} + +.bodywebsite .accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} + +.bodywebsite .accordion-flush .accordion-item:first-child { + border-top: 0; +} + +.bodywebsite .accordion-flush .accordion-item:last-child { + border-bottom: 0; +} + +.bodywebsite .accordion-flush .accordion-item .accordion-button, .bodywebsite .accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} + +.bodywebsite .breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-divider-color: #6c757d; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/"); +} + +.bodywebsite .breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.bodywebsite .pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: #fff; + --bs-pagination-border-width: 1px; + --bs-pagination-border-color: #dee2e6; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: #e9ecef; + --bs-pagination-hover-border-color: #dee2e6; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #e9ecef; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #0d6efd; + --bs-pagination-active-border-color: #0d6efd; + --bs-pagination-disabled-color: #6c757d; + --bs-pagination-disabled-bg: #fff; + --bs-pagination-disabled-border-color: #dee2e6; + display: flex; + padding-left: 0; + list-style: none; +} + +.bodywebsite .page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .page-link { + transition: none; + } +} + +.bodywebsite .page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} + +.bodywebsite .page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} + +.bodywebsite .page-link.active, .bodywebsite .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} + +.bodywebsite .page-link.disabled, .bodywebsite .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.bodywebsite .page-item:not(:first-child) .page-link { + margin-left: -1px; +} + +.bodywebsite .page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} + +.bodywebsite .pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} + +.bodywebsite .badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} + +.bodywebsite .badge:empty { + display: none; +} + +.bodywebsite .btn .badge { + position: relative; + top: -1px; +} + +.bodywebsite .alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.bodywebsite .alert-heading { + color: inherit; +} + +.bodywebsite .alert-link { + font-weight: 700; +} + +.bodywebsite .alert-dismissible { + padding-right: 3rem; +} + +.bodywebsite .alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.bodywebsite .alert-primary { + --bs-alert-color: #084298; + --bs-alert-bg: #cfe2ff; + --bs-alert-border-color: #b6d4fe; +} + +.bodywebsite .alert-primary .alert-link { + color: #06357a; +} + +.bodywebsite .alert-secondary { + --bs-alert-color: #41464b; + --bs-alert-bg: #e2e3e5; + --bs-alert-border-color: #d3d6d8; +} + +.bodywebsite .alert-secondary .alert-link { + color: #34383c; +} + +.bodywebsite .alert-success { + --bs-alert-color: #0f5132; + --bs-alert-bg: #d1e7dd; + --bs-alert-border-color: #badbcc; +} + +.bodywebsite .alert-success .alert-link { + color: #0c4128; +} + +.bodywebsite .alert-info { + --bs-alert-color: #055160; + --bs-alert-bg: #cff4fc; + --bs-alert-border-color: #b6effb; +} + +.bodywebsite .alert-info .alert-link { + color: #04414d; +} + +.bodywebsite .alert-warning { + --bs-alert-color: #664d03; + --bs-alert-bg: #fff3cd; + --bs-alert-border-color: #ffecb5; +} + +.bodywebsite .alert-warning .alert-link { + color: #523e02; +} + +.bodywebsite .alert-danger { + --bs-alert-color: #842029; + --bs-alert-bg: #f8d7da; + --bs-alert-border-color: #f5c2c7; +} + +.bodywebsite .alert-danger .alert-link { + color: #6a1a21; +} + +.bodywebsite .alert-light { + --bs-alert-color: #636464; + --bs-alert-bg: #fefefe; + --bs-alert-border-color: #fdfdfe; +} + +.bodywebsite .alert-light .alert-link { + color: #4f5050; +} + +.bodywebsite .alert-dark { + --bs-alert-color: #141619; + --bs-alert-bg: #d3d3d4; + --bs-alert-border-color: #bcbebf; +} + +.bodywebsite .alert-dark .alert-link { + color: #101214; +} + +@-webkit-keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +.bodywebsite .progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #e9ecef; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #0d6efd; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} + +.bodywebsite .progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar { + transition: none; + } +} + +.bodywebsite .progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.bodywebsite .progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + +.bodywebsite .list-group { + --bs-list-group-color: #212529; + --bs-list-group-bg: #fff; + --bs-list-group-border-color: rgba(0, 0, 0, 0.125); + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #495057; + --bs-list-group-action-hover-color: #495057; + --bs-list-group-action-hover-bg: #f8f9fa; + --bs-list-group-action-active-color: #212529; + --bs-list-group-action-active-bg: #e9ecef; + --bs-list-group-disabled-color: #6c757d; + --bs-list-group-disabled-bg: #fff; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #0d6efd; + --bs-list-group-active-border-color: #0d6efd; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.bodywebsite .list-group-numbered { + list-style-type: none; + counter-reset: section; +} + +.bodywebsite .list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.bodywebsite .list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} + +.bodywebsite .list-group-item-action:hover, .bodywebsite .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} + +.bodywebsite .list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.bodywebsite .list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} + +.bodywebsite .list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} + +.bodywebsite .list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} + +.bodywebsite .list-group-item.disabled, .bodywebsite .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} + +.bodywebsite .list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} + +.bodywebsite .list-group-item + .list-group-item { + border-top-width: 0; +} + +.bodywebsite .list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-horizontal { + flex-direction: row; +} + +.bodywebsite .list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item.active { + margin-top: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .bodywebsite .list-group-horizontal-sm { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 768px) { + .bodywebsite .list-group-horizontal-md { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 992px) { + .bodywebsite .list-group-horizontal-lg { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1200px) { + .bodywebsite .list-group-horizontal-xl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1400px) { + .bodywebsite .list-group-horizontal-xxl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +.bodywebsite .list-group-flush { + border-radius: 0; +} + +.bodywebsite .list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.bodywebsite .list-group-item-primary { + color: #084298; + background-color: #cfe2ff; +} + +.bodywebsite .list-group-item-primary.list-group-item-action:hover, .bodywebsite .list-group-item-primary.list-group-item-action:focus { + color: #084298; + background-color: #bacbe6; +} + +.bodywebsite .list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #084298; + border-color: #084298; +} + +.bodywebsite .list-group-item-secondary { + color: #41464b; + background-color: #e2e3e5; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action:hover, .bodywebsite .list-group-item-secondary.list-group-item-action:focus { + color: #41464b; + background-color: #cbccce; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #41464b; + border-color: #41464b; +} + +.bodywebsite .list-group-item-success { + color: #0f5132; + background-color: #d1e7dd; +} + +.bodywebsite .list-group-item-success.list-group-item-action:hover, .bodywebsite .list-group-item-success.list-group-item-action:focus { + color: #0f5132; + background-color: #bcd0c7; +} + +.bodywebsite .list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #0f5132; + border-color: #0f5132; +} + +.bodywebsite .list-group-item-info { + color: #055160; + background-color: #cff4fc; +} + +.bodywebsite .list-group-item-info.list-group-item-action:hover, .bodywebsite .list-group-item-info.list-group-item-action:focus { + color: #055160; + background-color: #badce3; +} + +.bodywebsite .list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #055160; + border-color: #055160; +} + +.bodywebsite .list-group-item-warning { + color: #664d03; + background-color: #fff3cd; +} + +.bodywebsite .list-group-item-warning.list-group-item-action:hover, .bodywebsite .list-group-item-warning.list-group-item-action:focus { + color: #664d03; + background-color: #e6dbb9; +} + +.bodywebsite .list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #664d03; + border-color: #664d03; +} + +.bodywebsite .list-group-item-danger { + color: #842029; + background-color: #f8d7da; +} + +.bodywebsite .list-group-item-danger.list-group-item-action:hover, .bodywebsite .list-group-item-danger.list-group-item-action:focus { + color: #842029; + background-color: #dfc2c4; +} + +.bodywebsite .list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #842029; + border-color: #842029; +} + +.bodywebsite .list-group-item-light { + color: #636464; + background-color: #fefefe; +} + +.bodywebsite .list-group-item-light.list-group-item-action:hover, .bodywebsite .list-group-item-light.list-group-item-action:focus { + color: #636464; + background-color: #e5e5e5; +} + +.bodywebsite .list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #636464; + border-color: #636464; +} + +.bodywebsite .list-group-item-dark { + color: #141619; + background-color: #d3d3d4; +} + +.bodywebsite .list-group-item-dark.list-group-item-action:hover, .bodywebsite .list-group-item-dark.list-group-item-action:focus { + color: #141619; + background-color: #bebebf; +} + +.bodywebsite .list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #141619; + border-color: #141619; +} + +.bodywebsite .btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #000; + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.5; +} + +.bodywebsite .btn-close:hover { + color: #000; + text-decoration: none; + opacity: 0.75; +} + +.bodywebsite .btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + opacity: 1; +} + +.bodywebsite .btn-close:disabled, .bodywebsite .btn-close.disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + opacity: 0.25; +} + +.bodywebsite .btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} + +.bodywebsite .toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-bg: rgba(255, 255, 255, 0.85); + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #6c757d; + --bs-toast-header-bg: rgba(255, 255, 255, 0.85); + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} + +.bodywebsite .toast.showing { + opacity: 0; +} + +.bodywebsite .toast:not(.show) { + display: none; +} + +.bodywebsite .toast-container { + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} + +.bodywebsite .toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.bodywebsite .toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} + +.bodywebsite .toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} + +.bodywebsite .toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.bodywebsite .modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-bg: #fff; + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.bodywebsite .modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} + +.bodywebsite .modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .modal.fade .modal-dialog { + transition: none; + } +} + +.bodywebsite .modal.show .modal-dialog { + transform: none; +} + +.bodywebsite .modal.modal-static .modal-dialog { + transform: scale(1.02); +} + +.bodywebsite .modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} + +.bodywebsite .modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.bodywebsite .modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} + +.bodywebsite .modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} + +.bodywebsite .modal-backdrop.fade { + opacity: 0; +} + +.bodywebsite .modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.bodywebsite .modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} + +.bodywebsite .modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.bodywebsite .modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.bodywebsite .modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .bodywebsite .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + + .bodywebsite .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + + .bodywebsite .modal-sm { + --bs-modal-width: 300px; + } +} + +@media (min-width: 992px) { + .bodywebsite .modal-lg, + .bodywebsite .modal-xl { + --bs-modal-width: 800px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .modal-xl { + --bs-modal-width: 1140px; + } +} + +.bodywebsite .modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} + +.bodywebsite .modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-header, + .bodywebsite .modal-fullscreen .modal-footer { + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .bodywebsite .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-header, + .bodywebsite .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-header, + .bodywebsite .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-header, + .bodywebsite .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-header, + .bodywebsite .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-header, + .bodywebsite .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} + +.bodywebsite .tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} + +.bodywebsite .tooltip.show { + opacity: var(--bs-tooltip-opacity); +} + +.bodywebsite .tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} + +.bodywebsite .tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: 0; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: 0; +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +.bodywebsite .tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.bodywebsite .popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #fff; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-bg: #f0f0f0; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #212529; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} + +.bodywebsite .popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} + +.bodywebsite .popover .popover-arrow::before, .bodywebsite .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-end > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom .popover-header::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +.bodywebsite .bs-popover-start > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +.bodywebsite .popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} + +.bodywebsite .popover-header:empty { + display: none; +} + +.bodywebsite .popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.bodywebsite .carousel { + position: relative; +} + +.bodywebsite .carousel.pointer-event { + touch-action: pan-y; +} + +.bodywebsite .carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.bodywebsite .carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-item { + transition: none; + } +} + +.bodywebsite .carousel-item.active, + .bodywebsite .carousel-item-next, + .bodywebsite .carousel-item-prev { + display: block; +} + +.bodywebsite .carousel-item-next:not(.carousel-item-start), + .bodywebsite .active.carousel-item-end { + transform: translateX(100%); +} + +.bodywebsite .carousel-item-prev:not(.carousel-item-end), + .bodywebsite .active.carousel-item-start { + transform: translateX(-100%); +} + +.bodywebsite .carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} + +.bodywebsite .carousel-fade .carousel-item.active, + .bodywebsite .carousel-fade .carousel-item-next.carousel-item-start, + .bodywebsite .carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} + +.bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + transition: none; + } +} + +.bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + transition: none; + } +} + +.bodywebsite .carousel-control-prev:hover, .bodywebsite .carousel-control-prev:focus, + .bodywebsite .carousel-control-next:hover, + .bodywebsite .carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.bodywebsite .carousel-control-prev { + left: 0; +} + +.bodywebsite .carousel-control-next { + right: 0; +} + +.bodywebsite .carousel-control-prev-icon, + .bodywebsite .carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +.bodywebsite .carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} + +.bodywebsite .carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-indicators [data-bs-target] { + transition: none; + } +} + +.bodywebsite .carousel-indicators .active { + opacity: 1; +} + +.bodywebsite .carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.bodywebsite .carousel-dark .carousel-control-prev-icon, + .bodywebsite .carousel-dark .carousel-control-next-icon { + filter: invert(1) grayscale(100); +} + +.bodywebsite .carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} + +.bodywebsite .carousel-dark .carousel-caption { + color: #000; +} + +.bodywebsite .spinner-grow, + .bodywebsite .spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + -webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@-webkit-keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +.bodywebsite .spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.bodywebsite .spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +.bodywebsite .spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.bodywebsite .spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .spinner-border, + .bodywebsite .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} + +.bodywebsite .offcanvas, .bodywebsite .offcanvas-xxl, .bodywebsite .offcanvas-xl, .bodywebsite .offcanvas-lg, .bodywebsite .offcanvas-md, .bodywebsite .offcanvas-sm { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-bg: #fff; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-sm { + transition: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.hiding, .bodywebsite .offcanvas-sm.show { + visibility: visible; + } +} + +@media (min-width: 576px) { + .bodywebsite .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-sm .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-md { + transition: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.hiding, .bodywebsite .offcanvas-md.show { + visibility: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-md .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-lg { + transition: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.hiding, .bodywebsite .offcanvas-lg.show { + visibility: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-lg .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xl { + transition: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.hiding, .bodywebsite .offcanvas-xl.show { + visibility: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xxl { + transition: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.hiding, .bodywebsite .offcanvas-xxl.show { + visibility: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xxl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.bodywebsite .offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas { + transition: none; + } +} + +.bodywebsite .offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} + +.bodywebsite .offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); +} + +.bodywebsite .offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} + +.bodywebsite .offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.show:not(.hiding) { + transform: none; +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.hiding, .bodywebsite .offcanvas.show { + visibility: visible; +} + +.bodywebsite .offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} + +.bodywebsite .offcanvas-backdrop.fade { + opacity: 0; +} + +.bodywebsite .offcanvas-backdrop.show { + opacity: 0.5; +} + +.bodywebsite .offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} + +.bodywebsite .offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} + +.bodywebsite .offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} + +.bodywebsite .offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.bodywebsite .placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} + +.bodywebsite .placeholder.btn::before { + display: inline-block; + content: ""; +} + +.bodywebsite .placeholder-xs { + min-height: 0.6em; +} + +.bodywebsite .placeholder-sm { + min-height: 0.8em; +} + +.bodywebsite .placeholder-lg { + min-height: 1.2em; +} + +.bodywebsite .placeholder-glow .placeholder { + -webkit-animation: placeholder-glow 2s ease-in-out infinite; + animation: placeholder-glow 2s ease-in-out infinite; +} + +@-webkit-keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +.bodywebsite .placeholder-wave { + -webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + -webkit-animation: placeholder-wave 2s linear infinite; + animation: placeholder-wave 2s linear infinite; +} + +@-webkit-keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +.bodywebsite .clearfix::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .text-bg-primary { + color: #fff !important; + background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-secondary { + color: #fff !important; + background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-success { + color: #fff !important; + background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-info { + color: #000 !important; + background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-warning { + color: #000 !important; + background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-danger { + color: #fff !important; + background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-light { + color: #000 !important; + background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-dark { + color: #fff !important; + background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .link-primary { + color: #0d6efd !important; +} + +.bodywebsite .link-primary:hover, .bodywebsite .link-primary:focus { + color: #0a58ca !important; +} + +.bodywebsite .link-secondary { + color: #6c757d !important; +} + +.bodywebsite .link-secondary:hover, .bodywebsite .link-secondary:focus { + color: #565e64 !important; +} + +.bodywebsite .link-success { + color: #198754 !important; +} + +.bodywebsite .link-success:hover, .bodywebsite .link-success:focus { + color: #146c43 !important; +} + +.bodywebsite .link-info { + color: #0dcaf0 !important; +} + +.bodywebsite .link-info:hover, .bodywebsite .link-info:focus { + color: #3dd5f3 !important; +} + +.bodywebsite .link-warning { + color: #ffc107 !important; +} + +.bodywebsite .link-warning:hover, .bodywebsite .link-warning:focus { + color: #ffcd39 !important; +} + +.bodywebsite .link-danger { + color: #dc3545 !important; +} + +.bodywebsite .link-danger:hover, .bodywebsite .link-danger:focus { + color: #b02a37 !important; +} + +.bodywebsite .link-light { + color: #f8f9fa !important; +} + +.bodywebsite .link-light:hover, .bodywebsite .link-light:focus { + color: #f9fafb !important; +} + +.bodywebsite .link-dark { + color: #212529 !important; +} + +.bodywebsite .link-dark:hover, .bodywebsite .link-dark:focus { + color: #1a1e21 !important; +} + +.bodywebsite .ratio { + position: relative; + width: 100%; +} + +.bodywebsite .ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} + +.bodywebsite .ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.bodywebsite .ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.bodywebsite .ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.bodywebsite .ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.bodywebsite .ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.bodywebsite .fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; +} + +.bodywebsite .sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .bodywebsite .sticky-sm-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 768px) { + .bodywebsite .sticky-md-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 992px) { + .bodywebsite .sticky-lg-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1200px) { + .bodywebsite .sticky-xl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1400px) { + .bodywebsite .sticky-xxl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +.bodywebsite .hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} + +.bodywebsite .vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} + +.bodywebsite .visually-hidden, + .bodywebsite .visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.bodywebsite .stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.bodywebsite .text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bodywebsite .vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.bodywebsite .align-baseline { + vertical-align: baseline !important; +} + +.bodywebsite .align-top { + vertical-align: top !important; +} + +.bodywebsite .align-middle { + vertical-align: middle !important; +} + +.bodywebsite .align-bottom { + vertical-align: bottom !important; +} + +.bodywebsite .align-text-bottom { + vertical-align: text-bottom !important; +} + +.bodywebsite .align-text-top { + vertical-align: text-top !important; +} + +.bodywebsite .float-start { + float: left !important; +} + +.bodywebsite .float-end { + float: right !important; +} + +.bodywebsite .float-none { + float: none !important; +} + +.bodywebsite .opacity-0 { + opacity: 0 !important; +} + +.bodywebsite .opacity-25 { + opacity: 0.25 !important; +} + +.bodywebsite .opacity-50 { + opacity: 0.5 !important; +} + +.bodywebsite .opacity-75 { + opacity: 0.75 !important; +} + +.bodywebsite .opacity-100 { + opacity: 1 !important; +} + +.bodywebsite .overflow-auto { + overflow: auto !important; +} + +.bodywebsite .overflow-hidden { + overflow: hidden !important; +} + +.bodywebsite .overflow-visible { + overflow: visible !important; +} + +.bodywebsite .overflow-scroll { + overflow: scroll !important; +} + +.bodywebsite .d-inline { + display: inline !important; +} + +.bodywebsite .d-inline-block { + display: inline-block !important; +} + +.bodywebsite .d-block { + display: block !important; +} + +.bodywebsite .d-grid { + display: grid !important; +} + +.bodywebsite .d-table { + display: table !important; +} + +.bodywebsite .d-table-row { + display: table-row !important; +} + +.bodywebsite .d-table-cell { + display: table-cell !important; +} + +.bodywebsite .d-flex { + display: flex !important; +} + +.bodywebsite .d-inline-flex { + display: inline-flex !important; +} + +.bodywebsite .d-none { + display: none !important; +} + +.bodywebsite .shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.bodywebsite .shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.bodywebsite .shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.bodywebsite .shadow-none { + box-shadow: none !important; +} + +.bodywebsite .position-static { + position: static !important; +} + +.bodywebsite .position-relative { + position: relative !important; +} + +.bodywebsite .position-absolute { + position: absolute !important; +} + +.bodywebsite .position-fixed { + position: fixed !important; +} + +.bodywebsite .position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} + +.bodywebsite .top-0 { + top: 0 !important; +} + +.bodywebsite .top-50 { + top: 50% !important; +} + +.bodywebsite .top-100 { + top: 100% !important; +} + +.bodywebsite .bottom-0 { + bottom: 0 !important; +} + +.bodywebsite .bottom-50 { + bottom: 50% !important; +} + +.bodywebsite .bottom-100 { + bottom: 100% !important; +} + +.bodywebsite .start-0 { + left: 0 !important; +} + +.bodywebsite .start-50 { + left: 50% !important; +} + +.bodywebsite .start-100 { + left: 100% !important; +} + +.bodywebsite .end-0 { + right: 0 !important; +} + +.bodywebsite .end-50 { + right: 50% !important; +} + +.bodywebsite .end-100 { + right: 100% !important; +} + +.bodywebsite .translate-middle { + transform: translate(-50%, -50%) !important; +} + +.bodywebsite .translate-middle-x { + transform: translateX(-50%) !important; +} + +.bodywebsite .translate-middle-y { + transform: translateY(-50%) !important; +} + +.bodywebsite .border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-0 { + border: 0 !important; +} + +.bodywebsite .border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-top-0 { + border-top: 0 !important; +} + +.bodywebsite .border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-end-0 { + border-right: 0 !important; +} + +.bodywebsite .border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-bottom-0 { + border-bottom: 0 !important; +} + +.bodywebsite .border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-start-0 { + border-left: 0 !important; +} + +.bodywebsite .border-primary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-secondary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-success { + --bs-border-opacity: 1; +} + +.bodywebsite .border-info { + --bs-border-opacity: 1; +} + +.bodywebsite .border-warning { + --bs-border-opacity: 1; +} + +.bodywebsite .border-danger { + --bs-border-opacity: 1; +} + +.bodywebsite .border-light { + --bs-border-opacity: 1; +} + +.bodywebsite .border-dark { + --bs-border-opacity: 1; +} + +.bodywebsite .border-white { + --bs-border-opacity: 1; +} + +.bodywebsite .border-1 { + --bs-border-width: 1px; +} + +.bodywebsite .border-2 { + --bs-border-width: 2px; +} + +.bodywebsite .border-3 { + --bs-border-width: 3px; +} + +.bodywebsite .border-4 { + --bs-border-width: 4px; +} + +.bodywebsite .border-5 { + --bs-border-width: 5px; +} + +.bodywebsite .border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.bodywebsite .border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.bodywebsite .border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.bodywebsite .border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.bodywebsite .border-opacity-100 { + --bs-border-opacity: 1; +} + +.bodywebsite .w-25 { + width: 25% !important; +} + +.bodywebsite .w-50 { + width: 50% !important; +} + +.bodywebsite .w-75 { + width: 75% !important; +} + +.bodywebsite .w-100 { + width: 100% !important; +} + +.bodywebsite .w-auto { + width: auto !important; +} + +.bodywebsite .mw-100 { + max-width: 100% !important; +} + +.bodywebsite .vw-100 { + width: 100vw !important; +} + +.bodywebsite .min-vw-100 { + min-width: 100vw !important; +} + +.bodywebsite .h-25 { + height: 25% !important; +} + +.bodywebsite .h-50 { + height: 50% !important; +} + +.bodywebsite .h-75 { + height: 75% !important; +} + +.bodywebsite .h-100 { + height: 100% !important; +} + +.bodywebsite .h-auto { + height: auto !important; +} + +.bodywebsite .mh-100 { + max-height: 100% !important; +} + +.bodywebsite .vh-100 { + height: 100vh !important; +} + +.bodywebsite .min-vh-100 { + min-height: 100vh !important; +} + +.bodywebsite .flex-fill { + flex: 1 1 auto !important; +} + +.bodywebsite .flex-row { + flex-direction: row !important; +} + +.bodywebsite .flex-column { + flex-direction: column !important; +} + +.bodywebsite .flex-row-reverse { + flex-direction: row-reverse !important; +} + +.bodywebsite .flex-column-reverse { + flex-direction: column-reverse !important; +} + +.bodywebsite .flex-grow-0 { + flex-grow: 0 !important; +} + +.bodywebsite .flex-grow-1 { + flex-grow: 1 !important; +} + +.bodywebsite .flex-shrink-0 { + flex-shrink: 0 !important; +} + +.bodywebsite .flex-shrink-1 { + flex-shrink: 1 !important; +} + +.bodywebsite .flex-wrap { + flex-wrap: wrap !important; +} + +.bodywebsite .flex-nowrap { + flex-wrap: nowrap !important; +} + +.bodywebsite .flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.bodywebsite .justify-content-start { + justify-content: flex-start !important; +} + +.bodywebsite .justify-content-end { + justify-content: flex-end !important; +} + +.bodywebsite .justify-content-center { + justify-content: center !important; +} + +.bodywebsite .justify-content-between { + justify-content: space-between !important; +} + +.bodywebsite .justify-content-around { + justify-content: space-around !important; +} + +.bodywebsite .justify-content-evenly { + justify-content: space-evenly !important; +} + +.bodywebsite .align-items-start { + align-items: flex-start !important; +} + +.bodywebsite .align-items-end { + align-items: flex-end !important; +} + +.bodywebsite .align-items-center { + align-items: center !important; +} + +.bodywebsite .align-items-baseline { + align-items: baseline !important; +} + +.bodywebsite .align-items-stretch { + align-items: stretch !important; +} + +.bodywebsite .align-content-start { + align-content: flex-start !important; +} + +.bodywebsite .align-content-end { + align-content: flex-end !important; +} + +.bodywebsite .align-content-center { + align-content: center !important; +} + +.bodywebsite .align-content-between { + align-content: space-between !important; +} + +.bodywebsite .align-content-around { + align-content: space-around !important; +} + +.bodywebsite .align-content-stretch { + align-content: stretch !important; +} + +.bodywebsite .align-self-auto { + align-self: auto !important; +} + +.bodywebsite .align-self-start { + align-self: flex-start !important; +} + +.bodywebsite .align-self-end { + align-self: flex-end !important; +} + +.bodywebsite .align-self-center { + align-self: center !important; +} + +.bodywebsite .align-self-baseline { + align-self: baseline !important; +} + +.bodywebsite .align-self-stretch { + align-self: stretch !important; +} + +.bodywebsite .order-first { + order: -1 !important; +} + +.bodywebsite .order-0 { + order: 0 !important; +} + +.bodywebsite .order-1 { + order: 1 !important; +} + +.bodywebsite .order-2 { + order: 2 !important; +} + +.bodywebsite .order-3 { + order: 3 !important; +} + +.bodywebsite .order-4 { + order: 4 !important; +} + +.bodywebsite .order-5 { + order: 5 !important; +} + +.bodywebsite .order-last { + order: 6 !important; +} + +.bodywebsite .m-0 { + margin: 0 !important; +} + +.bodywebsite .m-1 { + margin: 0.25rem !important; +} + +.bodywebsite .m-2 { + margin: 0.5rem !important; +} + +.bodywebsite .m-3 { + margin: 1rem !important; +} + +.bodywebsite .m-4 { + margin: 1.5rem !important; +} + +.bodywebsite .m-5 { + margin: 3rem !important; +} + +.bodywebsite .m-auto { + margin: auto !important; +} + +.bodywebsite .mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.bodywebsite .mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.bodywebsite .mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.bodywebsite .mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.bodywebsite .mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.bodywebsite .mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.bodywebsite .mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.bodywebsite .my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.bodywebsite .my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.bodywebsite .my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.bodywebsite .my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.bodywebsite .my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.bodywebsite .my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.bodywebsite .my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.bodywebsite .mt-0 { + margin-top: 0 !important; +} + +.bodywebsite .mt-1 { + margin-top: 0.25rem !important; +} + +.bodywebsite .mt-2 { + margin-top: 0.5rem !important; +} + +.bodywebsite .mt-3 { + margin-top: 1rem !important; +} + +.bodywebsite .mt-4 { + margin-top: 1.5rem !important; +} + +.bodywebsite .mt-5 { + margin-top: 3rem !important; +} + +.bodywebsite .mt-auto { + margin-top: auto !important; +} + +.bodywebsite .me-0 { + margin-right: 0 !important; +} + +.bodywebsite .me-1 { + margin-right: 0.25rem !important; +} + +.bodywebsite .me-2 { + margin-right: 0.5rem !important; +} + +.bodywebsite .me-3 { + margin-right: 1rem !important; +} + +.bodywebsite .me-4 { + margin-right: 1.5rem !important; +} + +.bodywebsite .me-5 { + margin-right: 3rem !important; +} + +.bodywebsite .me-auto { + margin-right: auto !important; +} + +.bodywebsite .mb-0 { + margin-bottom: 0 !important; +} + +.bodywebsite .mb-1 { + margin-bottom: 0.25rem !important; +} + +.bodywebsite .mb-2 { + margin-bottom: 0.5rem !important; +} + +.bodywebsite .mb-3 { + margin-bottom: 1rem !important; +} + +.bodywebsite .mb-4 { + margin-bottom: 1.5rem !important; +} + +.bodywebsite .mb-5 { + margin-bottom: 3rem !important; +} + +.bodywebsite .mb-auto { + margin-bottom: auto !important; +} + +.bodywebsite .ms-0 { + margin-left: 0 !important; +} + +.bodywebsite .ms-1 { + margin-left: 0.25rem !important; +} + +.bodywebsite .ms-2 { + margin-left: 0.5rem !important; +} + +.bodywebsite .ms-3 { + margin-left: 1rem !important; +} + +.bodywebsite .ms-4 { + margin-left: 1.5rem !important; +} + +.bodywebsite .ms-5 { + margin-left: 3rem !important; +} + +.bodywebsite .ms-auto { + margin-left: auto !important; +} + +.bodywebsite .p-0 { + padding: 0 !important; +} + +.bodywebsite .p-1 { + padding: 0.25rem !important; +} + +.bodywebsite .p-2 { + padding: 0.5rem !important; +} + +.bodywebsite .p-3 { + padding: 1rem !important; +} + +.bodywebsite .p-4 { + padding: 1.5rem !important; +} + +.bodywebsite .p-5 { + padding: 3rem !important; +} + +.bodywebsite .px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.bodywebsite .px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.bodywebsite .px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.bodywebsite .px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.bodywebsite .px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.bodywebsite .px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.bodywebsite .py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.bodywebsite .py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.bodywebsite .py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.bodywebsite .py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.bodywebsite .py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.bodywebsite .py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.bodywebsite .pt-0 { + padding-top: 0 !important; +} + +.bodywebsite .pt-1 { + padding-top: 0.25rem !important; +} + +.bodywebsite .pt-2 { + padding-top: 0.5rem !important; +} + +.bodywebsite .pt-3 { + padding-top: 1rem !important; +} + +.bodywebsite .pt-4 { + padding-top: 1.5rem !important; +} + +.bodywebsite .pt-5 { + padding-top: 3rem !important; +} + +.bodywebsite .pe-0 { + padding-right: 0 !important; +} + +.bodywebsite .pe-1 { + padding-right: 0.25rem !important; +} + +.bodywebsite .pe-2 { + padding-right: 0.5rem !important; +} + +.bodywebsite .pe-3 { + padding-right: 1rem !important; +} + +.bodywebsite .pe-4 { + padding-right: 1.5rem !important; +} + +.bodywebsite .pe-5 { + padding-right: 3rem !important; +} + +.bodywebsite .pb-0 { + padding-bottom: 0 !important; +} + +.bodywebsite .pb-1 { + padding-bottom: 0.25rem !important; +} + +.bodywebsite .pb-2 { + padding-bottom: 0.5rem !important; +} + +.bodywebsite .pb-3 { + padding-bottom: 1rem !important; +} + +.bodywebsite .pb-4 { + padding-bottom: 1.5rem !important; +} + +.bodywebsite .pb-5 { + padding-bottom: 3rem !important; +} + +.bodywebsite .ps-0 { + padding-left: 0 !important; +} + +.bodywebsite .ps-1 { + padding-left: 0.25rem !important; +} + +.bodywebsite .ps-2 { + padding-left: 0.5rem !important; +} + +.bodywebsite .ps-3 { + padding-left: 1rem !important; +} + +.bodywebsite .ps-4 { + padding-left: 1.5rem !important; +} + +.bodywebsite .ps-5 { + padding-left: 3rem !important; +} + +.bodywebsite .gap-0 { + gap: 0 !important; +} + +.bodywebsite .gap-1 { + gap: 0.25rem !important; +} + +.bodywebsite .gap-2 { + gap: 0.5rem !important; +} + +.bodywebsite .gap-3 { + gap: 1rem !important; +} + +.bodywebsite .gap-4 { + gap: 1.5rem !important; +} + +.bodywebsite .gap-5 { + gap: 3rem !important; +} + +.bodywebsite .font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.bodywebsite .fs-1 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.bodywebsite .fs-2 { + font-size: calc(1.325rem + 0.9vw) !important; +} + +.bodywebsite .fs-3 { + font-size: calc(1.3rem + 0.6vw) !important; +} + +.bodywebsite .fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.bodywebsite .fs-5 { + font-size: 1.25rem !important; +} + +.bodywebsite .fs-6 { + font-size: 1rem !important; +} + +.bodywebsite .fst-italic { + font-style: italic !important; +} + +.bodywebsite .fst-normal { + font-style: normal !important; +} + +.bodywebsite .fw-light { + font-weight: 300 !important; +} + +.bodywebsite .fw-lighter { + font-weight: lighter !important; +} + +.bodywebsite .fw-normal { + font-weight: 400 !important; +} + +.bodywebsite .fw-bold { + font-weight: 700 !important; +} + +.bodywebsite .fw-semibold { + font-weight: 600 !important; +} + +.bodywebsite .fw-bolder { + font-weight: bolder !important; +} + +.bodywebsite .lh-1 { + line-height: 1 !important; +} + +.bodywebsite .lh-sm { + line-height: 1.25 !important; +} + +.bodywebsite .lh-base { + line-height: 1.5 !important; +} + +.bodywebsite .lh-lg { + line-height: 2 !important; +} + +.bodywebsite .text-start { + text-align: left !important; +} + +.bodywebsite .text-end { + text-align: right !important; +} + +.bodywebsite .text-center { + text-align: center !important; +} + +.bodywebsite .text-decoration-none { + text-decoration: none !important; +} + +.bodywebsite .text-decoration-underline { + text-decoration: underline !important; +} + +.bodywebsite .text-decoration-line-through { + text-decoration: line-through !important; +} + +.bodywebsite .text-lowercase { + text-transform: lowercase !important; +} + +.bodywebsite .text-uppercase { + text-transform: uppercase !important; +} + +.bodywebsite .text-capitalize { + text-transform: capitalize !important; +} + +.bodywebsite .text-wrap { + white-space: normal !important; +} + +.bodywebsite .text-nowrap { + white-space: nowrap !important; +} + +.bodywebsite .text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +.bodywebsite .text-primary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-secondary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-success { + --bs-text-opacity: 1; +} + +.bodywebsite .text-info { + --bs-text-opacity: 1; +} + +.bodywebsite .text-warning { + --bs-text-opacity: 1; +} + +.bodywebsite .text-danger { + --bs-text-opacity: 1; +} + +.bodywebsite .text-light { + --bs-text-opacity: 1; +} + +.bodywebsite .text-dark { + --bs-text-opacity: 1; +} + +.bodywebsite .text-black { + --bs-text-opacity: 1; +} + +.bodywebsite .text-white { + --bs-text-opacity: 1; +} + +.bodywebsite .text-body { + --bs-text-opacity: 1; +} + +.bodywebsite .text-muted { + --bs-text-opacity: 1; + color: #6c757d !important; +} + +.bodywebsite .text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.bodywebsite .text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.bodywebsite .text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.bodywebsite .text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.bodywebsite .text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.bodywebsite .text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.bodywebsite .text-opacity-100 { + --bs-text-opacity: 1; +} + +.bodywebsite .bg-primary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-secondary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-success { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-info { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-warning { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-danger { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-light { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-dark { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-black { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-white { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-body { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-transparent { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bodywebsite .bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bodywebsite .bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bodywebsite .bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bodywebsite .bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.bodywebsite .user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} + +.bodywebsite .user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + user-select: auto !important; +} + +.bodywebsite .user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + user-select: none !important; +} + +.bodywebsite .pe-none { + pointer-events: none !important; +} + +.bodywebsite .pe-auto { + pointer-events: auto !important; +} + +.bodywebsite .rounded { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-0 { + border-radius: 0 !important; +} + +.bodywebsite .rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.bodywebsite .rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.bodywebsite .rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.bodywebsite .rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} + +.bodywebsite .rounded-circle { + border-radius: 50% !important; +} + +.bodywebsite .rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.bodywebsite .rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .visible { + visibility: visible !important; +} + +.bodywebsite .invisible { + visibility: hidden !important; +} + +@media (min-width: 576px) { + .bodywebsite .float-sm-start { + float: left !important; + } + + .bodywebsite .float-sm-end { + float: right !important; + } + + .bodywebsite .float-sm-none { + float: none !important; + } + + .bodywebsite .d-sm-inline { + display: inline !important; + } + + .bodywebsite .d-sm-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-sm-block { + display: block !important; + } + + .bodywebsite .d-sm-grid { + display: grid !important; + } + + .bodywebsite .d-sm-table { + display: table !important; + } + + .bodywebsite .d-sm-table-row { + display: table-row !important; + } + + .bodywebsite .d-sm-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-sm-flex { + display: flex !important; + } + + .bodywebsite .d-sm-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-sm-none { + display: none !important; + } + + .bodywebsite .flex-sm-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-sm-row { + flex-direction: row !important; + } + + .bodywebsite .flex-sm-column { + flex-direction: column !important; + } + + .bodywebsite .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-sm-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-sm-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-sm-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-sm-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-sm-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-sm-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-sm-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-sm-center { + align-items: center !important; + } + + .bodywebsite .align-items-sm-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-sm-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-sm-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-sm-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-sm-center { + align-content: center !important; + } + + .bodywebsite .align-content-sm-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-sm-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-sm-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-sm-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-sm-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-sm-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-sm-center { + align-self: center !important; + } + + .bodywebsite .align-self-sm-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-sm-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-sm-first { + order: -1 !important; + } + + .bodywebsite .order-sm-0 { + order: 0 !important; + } + + .bodywebsite .order-sm-1 { + order: 1 !important; + } + + .bodywebsite .order-sm-2 { + order: 2 !important; + } + + .bodywebsite .order-sm-3 { + order: 3 !important; + } + + .bodywebsite .order-sm-4 { + order: 4 !important; + } + + .bodywebsite .order-sm-5 { + order: 5 !important; + } + + .bodywebsite .order-sm-last { + order: 6 !important; + } + + .bodywebsite .m-sm-0 { + margin: 0 !important; + } + + .bodywebsite .m-sm-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-sm-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-sm-3 { + margin: 1rem !important; + } + + .bodywebsite .m-sm-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-sm-5 { + margin: 3rem !important; + } + + .bodywebsite .m-sm-auto { + margin: auto !important; + } + + .bodywebsite .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-sm-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-sm-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-sm-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-sm-auto { + margin-top: auto !important; + } + + .bodywebsite .me-sm-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-sm-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-sm-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-sm-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-sm-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-sm-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-sm-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-sm-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-sm-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-sm-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-sm-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-sm-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-sm-auto { + margin-left: auto !important; + } + + .bodywebsite .p-sm-0 { + padding: 0 !important; + } + + .bodywebsite .p-sm-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-sm-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-sm-3 { + padding: 1rem !important; + } + + .bodywebsite .p-sm-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-sm-5 { + padding: 3rem !important; + } + + .bodywebsite .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-sm-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-sm-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-sm-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-sm-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-sm-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-sm-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-sm-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-sm-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-sm-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-sm-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-sm-0 { + gap: 0 !important; + } + + .bodywebsite .gap-sm-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-sm-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-sm-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-sm-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-sm-5 { + gap: 3rem !important; + } + + .bodywebsite .text-sm-start { + text-align: left !important; + } + + .bodywebsite .text-sm-end { + text-align: right !important; + } + + .bodywebsite .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .bodywebsite .float-md-start { + float: left !important; + } + + .bodywebsite .float-md-end { + float: right !important; + } + + .bodywebsite .float-md-none { + float: none !important; + } + + .bodywebsite .d-md-inline { + display: inline !important; + } + + .bodywebsite .d-md-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-md-block { + display: block !important; + } + + .bodywebsite .d-md-grid { + display: grid !important; + } + + .bodywebsite .d-md-table { + display: table !important; + } + + .bodywebsite .d-md-table-row { + display: table-row !important; + } + + .bodywebsite .d-md-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-md-flex { + display: flex !important; + } + + .bodywebsite .d-md-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-md-none { + display: none !important; + } + + .bodywebsite .flex-md-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-md-row { + flex-direction: row !important; + } + + .bodywebsite .flex-md-column { + flex-direction: column !important; + } + + .bodywebsite .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-md-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-md-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-md-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-md-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-md-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-md-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-md-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-md-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-md-center { + align-items: center !important; + } + + .bodywebsite .align-items-md-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-md-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-md-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-md-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-md-center { + align-content: center !important; + } + + .bodywebsite .align-content-md-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-md-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-md-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-md-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-md-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-md-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-md-center { + align-self: center !important; + } + + .bodywebsite .align-self-md-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-md-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-md-first { + order: -1 !important; + } + + .bodywebsite .order-md-0 { + order: 0 !important; + } + + .bodywebsite .order-md-1 { + order: 1 !important; + } + + .bodywebsite .order-md-2 { + order: 2 !important; + } + + .bodywebsite .order-md-3 { + order: 3 !important; + } + + .bodywebsite .order-md-4 { + order: 4 !important; + } + + .bodywebsite .order-md-5 { + order: 5 !important; + } + + .bodywebsite .order-md-last { + order: 6 !important; + } + + .bodywebsite .m-md-0 { + margin: 0 !important; + } + + .bodywebsite .m-md-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-md-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-md-3 { + margin: 1rem !important; + } + + .bodywebsite .m-md-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-md-5 { + margin: 3rem !important; + } + + .bodywebsite .m-md-auto { + margin: auto !important; + } + + .bodywebsite .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-md-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-md-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-md-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-md-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-md-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-md-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-md-auto { + margin-top: auto !important; + } + + .bodywebsite .me-md-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-md-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-md-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-md-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-md-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-md-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-md-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-md-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-md-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-md-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-md-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-md-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-md-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-md-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-md-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-md-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-md-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-md-auto { + margin-left: auto !important; + } + + .bodywebsite .p-md-0 { + padding: 0 !important; + } + + .bodywebsite .p-md-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-md-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-md-3 { + padding: 1rem !important; + } + + .bodywebsite .p-md-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-md-5 { + padding: 3rem !important; + } + + .bodywebsite .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-md-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-md-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-md-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-md-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-md-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-md-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-md-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-md-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-md-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-md-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-md-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-md-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-md-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-md-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-md-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-md-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-md-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-md-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-md-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-md-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-md-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-md-0 { + gap: 0 !important; + } + + .bodywebsite .gap-md-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-md-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-md-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-md-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-md-5 { + gap: 3rem !important; + } + + .bodywebsite .text-md-start { + text-align: left !important; + } + + .bodywebsite .text-md-end { + text-align: right !important; + } + + .bodywebsite .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .bodywebsite .float-lg-start { + float: left !important; + } + + .bodywebsite .float-lg-end { + float: right !important; + } + + .bodywebsite .float-lg-none { + float: none !important; + } + + .bodywebsite .d-lg-inline { + display: inline !important; + } + + .bodywebsite .d-lg-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-lg-block { + display: block !important; + } + + .bodywebsite .d-lg-grid { + display: grid !important; + } + + .bodywebsite .d-lg-table { + display: table !important; + } + + .bodywebsite .d-lg-table-row { + display: table-row !important; + } + + .bodywebsite .d-lg-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-lg-flex { + display: flex !important; + } + + .bodywebsite .d-lg-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-lg-none { + display: none !important; + } + + .bodywebsite .flex-lg-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-lg-row { + flex-direction: row !important; + } + + .bodywebsite .flex-lg-column { + flex-direction: column !important; + } + + .bodywebsite .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-lg-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-lg-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-lg-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-lg-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-lg-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-lg-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-lg-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-lg-center { + align-items: center !important; + } + + .bodywebsite .align-items-lg-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-lg-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-lg-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-lg-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-lg-center { + align-content: center !important; + } + + .bodywebsite .align-content-lg-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-lg-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-lg-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-lg-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-lg-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-lg-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-lg-center { + align-self: center !important; + } + + .bodywebsite .align-self-lg-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-lg-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-lg-first { + order: -1 !important; + } + + .bodywebsite .order-lg-0 { + order: 0 !important; + } + + .bodywebsite .order-lg-1 { + order: 1 !important; + } + + .bodywebsite .order-lg-2 { + order: 2 !important; + } + + .bodywebsite .order-lg-3 { + order: 3 !important; + } + + .bodywebsite .order-lg-4 { + order: 4 !important; + } + + .bodywebsite .order-lg-5 { + order: 5 !important; + } + + .bodywebsite .order-lg-last { + order: 6 !important; + } + + .bodywebsite .m-lg-0 { + margin: 0 !important; + } + + .bodywebsite .m-lg-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-lg-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-lg-3 { + margin: 1rem !important; + } + + .bodywebsite .m-lg-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-lg-5 { + margin: 3rem !important; + } + + .bodywebsite .m-lg-auto { + margin: auto !important; + } + + .bodywebsite .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-lg-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-lg-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-lg-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-lg-auto { + margin-top: auto !important; + } + + .bodywebsite .me-lg-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-lg-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-lg-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-lg-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-lg-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-lg-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-lg-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-lg-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-lg-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-lg-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-lg-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-lg-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-lg-auto { + margin-left: auto !important; + } + + .bodywebsite .p-lg-0 { + padding: 0 !important; + } + + .bodywebsite .p-lg-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-lg-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-lg-3 { + padding: 1rem !important; + } + + .bodywebsite .p-lg-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-lg-5 { + padding: 3rem !important; + } + + .bodywebsite .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-lg-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-lg-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-lg-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-lg-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-lg-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-lg-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-lg-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-lg-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-lg-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-lg-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-lg-0 { + gap: 0 !important; + } + + .bodywebsite .gap-lg-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-lg-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-lg-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-lg-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-lg-5 { + gap: 3rem !important; + } + + .bodywebsite .text-lg-start { + text-align: left !important; + } + + .bodywebsite .text-lg-end { + text-align: right !important; + } + + .bodywebsite .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .float-xl-start { + float: left !important; + } + + .bodywebsite .float-xl-end { + float: right !important; + } + + .bodywebsite .float-xl-none { + float: none !important; + } + + .bodywebsite .d-xl-inline { + display: inline !important; + } + + .bodywebsite .d-xl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xl-block { + display: block !important; + } + + .bodywebsite .d-xl-grid { + display: grid !important; + } + + .bodywebsite .d-xl-table { + display: table !important; + } + + .bodywebsite .d-xl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xl-flex { + display: flex !important; + } + + .bodywebsite .d-xl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xl-none { + display: none !important; + } + + .bodywebsite .flex-xl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xl-first { + order: -1 !important; + } + + .bodywebsite .order-xl-0 { + order: 0 !important; + } + + .bodywebsite .order-xl-1 { + order: 1 !important; + } + + .bodywebsite .order-xl-2 { + order: 2 !important; + } + + .bodywebsite .order-xl-3 { + order: 3 !important; + } + + .bodywebsite .order-xl-4 { + order: 4 !important; + } + + .bodywebsite .order-xl-5 { + order: 5 !important; + } + + .bodywebsite .order-xl-last { + order: 6 !important; + } + + .bodywebsite .m-xl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xl-start { + text-align: left !important; + } + + .bodywebsite .text-xl-end { + text-align: right !important; + } + + .bodywebsite .text-xl-center { + text-align: center !important; + } +} + +@media (min-width: 1400px) { + .bodywebsite .float-xxl-start { + float: left !important; + } + + .bodywebsite .float-xxl-end { + float: right !important; + } + + .bodywebsite .float-xxl-none { + float: none !important; + } + + .bodywebsite .d-xxl-inline { + display: inline !important; + } + + .bodywebsite .d-xxl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xxl-block { + display: block !important; + } + + .bodywebsite .d-xxl-grid { + display: grid !important; + } + + .bodywebsite .d-xxl-table { + display: table !important; + } + + .bodywebsite .d-xxl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xxl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xxl-flex { + display: flex !important; + } + + .bodywebsite .d-xxl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xxl-none { + display: none !important; + } + + .bodywebsite .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xxl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xxl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xxl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xxl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xxl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xxl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xxl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xxl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xxl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xxl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xxl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xxl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xxl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xxl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xxl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xxl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xxl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xxl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xxl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xxl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xxl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xxl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xxl-first { + order: -1 !important; + } + + .bodywebsite .order-xxl-0 { + order: 0 !important; + } + + .bodywebsite .order-xxl-1 { + order: 1 !important; + } + + .bodywebsite .order-xxl-2 { + order: 2 !important; + } + + .bodywebsite .order-xxl-3 { + order: 3 !important; + } + + .bodywebsite .order-xxl-4 { + order: 4 !important; + } + + .bodywebsite .order-xxl-5 { + order: 5 !important; + } + + .bodywebsite .order-xxl-last { + order: 6 !important; + } + + .bodywebsite .m-xxl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xxl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xxl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xxl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xxl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xxl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xxl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xxl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xxl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xxl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xxl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xxl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xxl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xxl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xxl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xxl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xxl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xxl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xxl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xxl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xxl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xxl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xxl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xxl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xxl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xxl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xxl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xxl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xxl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xxl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xxl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xxl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xxl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xxl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xxl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xxl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xxl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xxl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xxl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xxl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xxl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xxl-start { + text-align: left !important; + } + + .bodywebsite .text-xxl-end { + text-align: right !important; + } + + .bodywebsite .text-xxl-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .fs-1 { + font-size: 2.5rem !important; + } + + .bodywebsite .fs-2 { + font-size: 2rem !important; + } + + .bodywebsite .fs-3 { + font-size: 1.75rem !important; + } + + .bodywebsite .fs-4 { + font-size: 1.5rem !important; + } +} + +@media print { + .bodywebsite .d-print-inline { + display: inline !important; + } + + .bodywebsite .d-print-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-print-block { + display: block !important; + } + + .bodywebsite .d-print-grid { + display: grid !important; + } + + .bodywebsite .d-print-table { + display: table !important; + } + + .bodywebsite .d-print-table-row { + display: table-row !important; + } + + .bodywebsite .d-print-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-print-flex { + display: flex !important; + } + + .bodywebsite .d-print-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-print-none { + display: none !important; + } +} + +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + font-family: Hurricane; +} + +.bodywebsite hr { + margin: 100px; +} + +.bodywebsite header { + align-items: center; + justify-content: center; +} +.bodywebsite .bg { + background-color: #010134; +} + +.bodywebsite #mysection1 { + color: white; + background-color: #010134; + font-family: Arial, Helvetica, sans-serif; + font-weight: bold; +} + +.bodywebsite #main { + padding-top: 15%; +} + +.bodywebsite .btn-perso { + margin: 20px 15px; + font-weight: bold; + background-color: #a600a9; +} +.bodywebsite .btn-perso:hover { + background-color: #79027b; + color: white; +} + +.bodywebsite .btn-perso2 { + font-weight: bold; + background-color: #7700ba; +} +.bodywebsite .btn-perso2:hover { + background-color: #3d0160; + color: white; +} + +.bodywebsite .product { + margin-bottom: 20px; +} + +.bodywebsite .flex { + display: flex; + flex-direction: column; + align-items: center; +} + diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/wrapper.php new file mode 100644 index 00000000000..26adb3ef220 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/wrapper.php @@ -0,0 +1,278 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) { + $original_file = 'blog.rss'; +} + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost', 'status'=>1); + if ($l) { + $filters['lang'] = $l; + } + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($l); + $outputlangs->loadLangs(array("main", "other")); + $title = $desc = $outputlangs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed']; + $sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) { + $db->close(); +} +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/bg.webp b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/bg.webp new file mode 100644 index 00000000000..bb1d49b7fb1 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/bg.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/icon.webp b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/icon.webp new file mode 100644 index 00000000000..76d28977fa3 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/medias/image/websitekey/icon.webp differ diff --git a/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/website_pages.sql b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/website_pages.sql new file mode 100644 index 00000000000..78e198a2223 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-onepageblackpurple/website_pages.sql @@ -0,0 +1,9 @@ +-- File generated by Dolibarr 17.0.0-alpha -- 2022-09-26 11:58:28 UTC --; +-- Page ID 148 -> 1__+MAX_llx_website_page__ - Aliases index --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(1__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'index', '', 'index', '', '', '', '', '1', '2022-07-21 14:41:41', '2022-09-26 13:57:58', null, '', 'page', '__N__ __N__ __N__ __N__ __N__ __N__ __N__ __N__ __N____N__ __N__ Template__N__ ', '__N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Our company

    __N__

    __N__ Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum excepturi ipsa consequatur accusamus eveniet dignissimos necessitatibus provident dolore cupiditate.__N__

    __N__
    __N__

    __N__ It uses utility classes for typography and spacing to space content out within the__N__ larger container.__N__

    __N__

    __N__ __N__ __N__ __N__ __N__ __N__ __N__

    __N__
    __N__
    __N__
    __N__ \"landingpage\"__N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__

    LoremIpsum

    __N__

    __N__ Some quick example text to build on the__N__ card title and make up the bulk of the__N__ card\'s content.__N__

    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    UNLIMITED FOR ALL

    __N__

    Lorem, ipsum dolor sit amet consectetur adipisicing elit. Minus molestias voluptatibus voluptatem Lorem ipsum dolor, sit amet consectetur adipisicing elit. Veritatis officia voluptatem incidunt tempore esse porro sequi eveniet eum corrupti quo.

    __N__
    __N__
    __N__

    $79/month

    __N__
    __N__
    __N__

    WHAT YOU WILL GET

    __N__

    Lorem ipsum dolor sit, amet consectetur


    __N__

    Lorem ipsum dolor sit, amet consectetur


    __N__

    Lorem ipsum dolor sit, amet consectetur


    __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Contact us

    __N__
    __N__
    __N__ email ?>
    __N__ getFullAddress() ?>
    __N__
    __N__
    __N__ __N__ __N__
    __N__
    __N__ __N__
    __N__ __N__


    __N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__ __N__
    __N__ __N__
    __N__ socialnetworks as $key => $value) {__N__ print \'\';__N__ } ?>__N____N__
    __N__ __N__
    __N__ __N__ __N__ __N__
    __N__ © 2022 Dolibarr:__N__ Dolicloud.com__N__
    __N__ __N__
    __N__
    __N__', '', 0); +UPDATE llx_website SET fk_default_home = 1__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant.jpg new file mode 100644 index 00000000000..226737e4434 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/LICENSE b/htdocs/install/doctemplates/websites/website_template-restaurant/LICENSE new file mode 100644 index 00000000000..1143fd7823a --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/LICENSE @@ -0,0 +1,8 @@ +LICENSE +------- + +Images are provided under the license: +Unsplash+ License + +Rest of templates (HTML and PHP code) content are under license +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/README.md b/htdocs/install/doctemplates/websites/website_template-restaurant/README.md new file mode 100644 index 00000000000..a5b5c5abba9 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/README.md @@ -0,0 +1,2 @@ +Website generated by Dolibarr ERP CRM +This website template is an example of website for a restaurant diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/LICENSE b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/LICENSE new file mode 100644 index 00000000000..1143fd7823a --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/LICENSE @@ -0,0 +1,8 @@ +LICENSE +------- + +Images are provided under the license: +Unsplash+ License + +Rest of templates (HTML and PHP code) content are under license +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/README.md b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/README.md new file mode 100644 index 00000000000..a5b5c5abba9 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/README.md @@ -0,0 +1,2 @@ +Website generated by Dolibarr ERP CRM +This website template is an example of website for a restaurant diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/about.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/about.php new file mode 100644 index 00000000000..560719a4fda --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/about.php @@ -0,0 +1,5 @@ +ref.'/page248.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/contact.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/contact.php new file mode 100644 index 00000000000..e3a18e3b92d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/contact.php @@ -0,0 +1,5 @@ +ref.'/page249.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/footer.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/footer.php new file mode 100644 index 00000000000..4052f2ff8e9 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/footer.php @@ -0,0 +1,5 @@ +ref.'/page252.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/header.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/header.php new file mode 100644 index 00000000000..530e4397e93 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/header.php @@ -0,0 +1,5 @@ +ref.'/page253.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/htmlheader.html new file mode 100644 index 00000000000..41e782b5934 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/htmlheader.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/index.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/index.php new file mode 100644 index 00000000000..08ce45517af --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/index.php @@ -0,0 +1,5 @@ +ref.'/page250.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/javascript.js.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/javascript.js.php new file mode 100644 index 00000000000..fe1f15266af --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/javascript.js.php @@ -0,0 +1,14 @@ + +/* JS content (all pages) */ +// test + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/manifest.json.php new file mode 100644 index 00000000000..8f844114e48 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/manifest.json.php @@ -0,0 +1,13 @@ + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/master.inc.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/master.inc.php new file mode 100644 index 00000000000..bd25ba5895d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/master.inc.php @@ -0,0 +1,7 @@ + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/menu.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/menu.php new file mode 100644 index 00000000000..57315e4da18 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/menu.php @@ -0,0 +1,5 @@ +ref.'/page251.tpl.php'; +?> diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page248.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page248.tpl.php new file mode 100644 index 00000000000..9acf79aaec9 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page248.tpl.php @@ -0,0 +1,113 @@ + + + +About us + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + +
    +

    Team Members

    +
    + +
    +
    + + +
    +

    Sophia

    + +

    CEO & Founder

    +
    +
    +
    + +
    +
    + + +

    Benjamin W.

    + +

    Restaurant Manager

    +
    +
    + +
    +
    + + +

    Muchen Jack

    + +

    Senior Chef

    +
    +
    + +
    +
    +
    + +
    + +
    + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php new file mode 100644 index 00000000000..8742e231c27 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php @@ -0,0 +1,368 @@ + + + +Contact us + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +email; + $message = GETPOST('message', 'alpha'); + $cmail = new CMailFile('Contact from website', $to, $from, $message); + if ($cmail->sendfile()) { + ?> + + trans("ErrorFailedToSendMail", $from, $to).'. '.$cmail->error; + } +} +?> + + + + +
    +
    + + +
    + +
    +
    +
    +
    +

    Leave a message

    +
    + +
    +
    + + + +
    + + + +
    + +
    + + + +
    + +
    + + + + + + + +
    + +
    + +
    + +
    + +
    +
    Weekdays
    + +
    + $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."

    "; + } + ?> +
    + +
    Weekends
    + +
    +

    Saturday and Sunday

    + +

    to be determined !

    +
    +
    + +
    +

    + +

    + getFullAddress() ?> +

    + + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + +
    + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page250.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page250.tpl.php new file mode 100644 index 00000000000..ed509115c54 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page250.tpl.php @@ -0,0 +1,475 @@ + + + +index + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +

    + Delicious Steaks +

    + +
    +
    +
    + + + + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    + +
    + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page251.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page251.tpl.php new file mode 100644 index 00000000000..50fb446dd2e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page251.tpl.php @@ -0,0 +1,273 @@ + + + +Our menus + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    + +
    + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page252.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page252.tpl.php new file mode 100644 index 00000000000..568a538488b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page252.tpl.php @@ -0,0 +1,93 @@ + + + +Footer + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page253.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page253.tpl.php new file mode 100644 index 00000000000..10896678ceb --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page253.tpl.php @@ -0,0 +1,98 @@ + + + +Header + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/styles.css.php new file mode 100644 index 00000000000..0c669a21a69 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/styles.css.php @@ -0,0 +1,13159 @@ + +@charset "UTF-8"; + +.bodywebsite :root { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg-rgb: 255, 255, 255; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #0d6efd; + --bs-link-hover-color: #0a58ca; + --bs-code-color: #d63384; + --bs-highlight-bg: #fff3cd; +} + +.bodywebsite *, + .bodywebsite *::before, + .bodywebsite *::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + .bodywebsite :root { + scroll-behavior: smooth; + } +} + +.bodywebsite body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} + +.bodywebsite .center { + text-align: center; +} + +.bodywebsite hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} + +.bodywebsite h6, .bodywebsite .h6, .bodywebsite h5, .bodywebsite .h5, .bodywebsite h4, .bodywebsite .h4, .bodywebsite h3, .bodywebsite .h3, .bodywebsite h2, .bodywebsite .h2, .bodywebsite h1, .bodywebsite .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +.bodywebsite h1, .bodywebsite .h1 { + font-size: calc(1.375rem + 1.5vw); +} + +@media (min-width: 1200px) { + .bodywebsite h1, .bodywebsite .h1 { + font-size: 2.5rem; + } +} + +.bodywebsite h2, .bodywebsite .h2 { + font-size: calc(1.325rem + 0.9vw); +} + +@media (min-width: 1200px) { + .bodywebsite h2, .bodywebsite .h2 { + font-size: 2rem; + } +} + +.bodywebsite h3, .bodywebsite .h3 { + font-size: calc(1.3rem + 0.6vw); +} + +@media (min-width: 1200px) { + .bodywebsite h3, .bodywebsite .h3 { + font-size: 1.75rem; + } +} + +.bodywebsite h4, .bodywebsite .h4 { + font-size: calc(1.275rem + 0.3vw); +} + +@media (min-width: 1200px) { + .bodywebsite h4, .bodywebsite .h4 { + font-size: 1.5rem; + } +} + +.bodywebsite h5, .bodywebsite .h5 { + font-size: 1.25rem; +} + +.bodywebsite h6, .bodywebsite .h6 { + font-size: 1rem; +} + +.bodywebsite p { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +.bodywebsite address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +.bodywebsite ol, + .bodywebsite ul { + padding-left: 2rem; +} + +.bodywebsite ol, + .bodywebsite ul, + .bodywebsite dl { + margin-top: 0; + margin-bottom: 1rem; +} + +.bodywebsite ol ol, + .bodywebsite ul ul, + .bodywebsite ol ul, + .bodywebsite ul ol { + margin-bottom: 0; +} + +.bodywebsite dt { + font-weight: 700; +} + +.bodywebsite dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +.bodywebsite blockquote { + margin: 0 0 1rem; +} + +.bodywebsite b, + .bodywebsite strong { + font-weight: bolder; +} + +.bodywebsite small, .bodywebsite .small { + font-size: 0.875em; +} + +.bodywebsite mark, .bodywebsite .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +.bodywebsite sub, + .bodywebsite sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +.bodywebsite sub { + bottom: -0.25em; +} + +.bodywebsite sup { + top: -0.5em; +} + +.bodywebsite a { + color: var(--bs-link-color); + text-decoration: underline; +} + +.bodywebsite a:hover { + color: var(--bs-link-hover-color); +} + +.bodywebsite a:not([href]):not([class]), .bodywebsite a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +.bodywebsite pre, + .bodywebsite code, + .bodywebsite kbd, + .bodywebsite samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +.bodywebsite pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} + +.bodywebsite pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +.bodywebsite code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} + +.bodywebsite a > code { + color: inherit; +} + +.bodywebsite kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} + +.bodywebsite kbd kbd { + padding: 0; + font-size: 1em; +} + +.bodywebsite figure { + margin: 0 0 1rem; +} + +.bodywebsite img, + .bodywebsite svg { + vertical-align: middle; +} + +.bodywebsite table { + caption-side: bottom; + border-collapse: collapse; +} + +.bodywebsite caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +.bodywebsite th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +.bodywebsite thead, + .bodywebsite tbody, + .bodywebsite tfoot, + .bodywebsite tr, + .bodywebsite td, + .bodywebsite th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +.bodywebsite label { + display: inline-block; +} + +.bodywebsite button { + border-radius: 0; +} + +.bodywebsite button:focus:not(:focus-visible) { + outline: 0; +} + +.bodywebsite input, + .bodywebsite button, + .bodywebsite select, + .bodywebsite optgroup, + .bodywebsite textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.bodywebsite button, + .bodywebsite select { + text-transform: none; +} + +.bodywebsite [role=button] { + cursor: pointer; +} + +.bodywebsite select { + word-wrap: normal; +} + +.bodywebsite select:disabled { + opacity: 1; +} + +.bodywebsite [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +.bodywebsite button, + .bodywebsite [type=button], + .bodywebsite [type=reset], + .bodywebsite [type=submit] { + -webkit-appearance: button; +} + +.bodywebsite button:not(:disabled), + .bodywebsite [type=button]:not(:disabled), + .bodywebsite [type=reset]:not(:disabled), + .bodywebsite [type=submit]:not(:disabled) { + cursor: pointer; +} + +.bodywebsite ::-moz-focus-inner { + padding: 0; + border-style: none; +} + +.bodywebsite textarea { + resize: vertical; +} + +.bodywebsite fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +.bodywebsite legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} + +@media (min-width: 1200px) { + .bodywebsite legend { + font-size: 1.5rem; + } +} + +.bodywebsite legend + * { + clear: left; +} + +.bodywebsite ::-webkit-datetime-edit-fields-wrapper, + .bodywebsite ::-webkit-datetime-edit-text, + .bodywebsite ::-webkit-datetime-edit-minute, + .bodywebsite ::-webkit-datetime-edit-hour-field, + .bodywebsite ::-webkit-datetime-edit-day-field, + .bodywebsite ::-webkit-datetime-edit-month-field, + .bodywebsite ::-webkit-datetime-edit-year-field { + padding: 0; +} + +.bodywebsite ::-webkit-inner-spin-button { + height: auto; +} + +.bodywebsite [type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +.bodywebsite ::-webkit-search-decoration { + -webkit-appearance: none; +} + +.bodywebsite ::-webkit-color-swatch-wrapper { + padding: 0; +} + +.bodywebsite ::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite ::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +.bodywebsite output { + display: inline-block; +} + +.bodywebsite iframe { + border: 0; +} + +.bodywebsite summary { + display: list-item; + cursor: pointer; +} + +.bodywebsite progress { + vertical-align: baseline; +} + +.bodywebsite [hidden] { + display: none !important; +} + +.bodywebsite .lead { + font-size: 1.25rem; + font-weight: 300; +} + +.bodywebsite .display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-1 { + font-size: 5rem; + } +} + +.bodywebsite .display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-2 { + font-size: 4.5rem; + } +} + +.bodywebsite .display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-3 { + font-size: 4rem; + } +} + +.bodywebsite .display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-4 { + font-size: 3.5rem; + } +} + +.bodywebsite .display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-5 { + font-size: 3rem; + } +} + +.bodywebsite .display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} + +@media (min-width: 1200px) { + .bodywebsite .display-6 { + font-size: 2.5rem; + } +} + +.bodywebsite .list-unstyled { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline { + padding-left: 0; + list-style: none; +} + +.bodywebsite .list-inline-item { + display: inline-block; +} + +.bodywebsite .list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.bodywebsite .initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.bodywebsite .blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} + +.bodywebsite .blockquote > :last-child { + margin-bottom: 0; +} + +.bodywebsite .blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .blockquote-footer::before { + content: "— "; +} + +.bodywebsite .img-fluid { + max-width: 100%; + height: auto; +} + +.bodywebsite .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} + +.bodywebsite .figure { + display: inline-block; +} + +.bodywebsite .figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.bodywebsite .figure-caption { + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .container, + .bodywebsite .container-fluid, + .bodywebsite .container-xxl, + .bodywebsite .container-xl, + .bodywebsite .container-lg, + .bodywebsite .container-md, + .bodywebsite .container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .container-sm, .bodywebsite .container { + max-width: 540px; + } +} + +@media (min-width: 768px) { + .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 720px; + } +} + +@media (min-width: 992px) { + .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 960px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1140px; + } +} + +@media (min-width: 1400px) { + .bodywebsite .container-xxl, .bodywebsite .container-xl, .bodywebsite .container-lg, .bodywebsite .container-md, .bodywebsite .container-sm, .bodywebsite .container { + max-width: 1320px; + } +} + +.bodywebsite .row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} + +.bodywebsite .row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.bodywebsite .col { + flex: 1 0 0%; +} + +.bodywebsite .row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.bodywebsite .row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.bodywebsite .row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.bodywebsite .col-auto { + flex: 0 0 auto; + width: auto; +} + +.bodywebsite .col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.bodywebsite .col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.bodywebsite .col-3 { + flex: 0 0 auto; + width: 25%; +} + +.bodywebsite .col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.bodywebsite .col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.bodywebsite .col-6 { + flex: 0 0 auto; + width: 50%; +} + +.bodywebsite .col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.bodywebsite .col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.bodywebsite .col-9 { + flex: 0 0 auto; + width: 75%; +} + +.bodywebsite .col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.bodywebsite .col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.bodywebsite .col-12 { + flex: 0 0 auto; + width: 100%; +} + +.bodywebsite .offset-1 { + margin-left: 8.33333333%; +} + +.bodywebsite .offset-2 { + margin-left: 16.66666667%; +} + +.bodywebsite .offset-3 { + margin-left: 25%; +} + +.bodywebsite .offset-4 { + margin-left: 33.33333333%; +} + +.bodywebsite .offset-5 { + margin-left: 41.66666667%; +} + +.bodywebsite .offset-6 { + margin-left: 50%; +} + +.bodywebsite .offset-7 { + margin-left: 58.33333333%; +} + +.bodywebsite .offset-8 { + margin-left: 66.66666667%; +} + +.bodywebsite .offset-9 { + margin-left: 75%; +} + +.bodywebsite .offset-10 { + margin-left: 83.33333333%; +} + +.bodywebsite .offset-11 { + margin-left: 91.66666667%; +} + +.bodywebsite .g-0, + .bodywebsite .gx-0 { + --bs-gutter-x: 0; +} + +.bodywebsite .g-0, + .bodywebsite .gy-0 { + --bs-gutter-y: 0; +} + +.bodywebsite .g-1, + .bodywebsite .gx-1 { + --bs-gutter-x: 0.25rem; +} + +.bodywebsite .g-1, + .bodywebsite .gy-1 { + --bs-gutter-y: 0.25rem; +} + +.bodywebsite .g-2, + .bodywebsite .gx-2 { + --bs-gutter-x: 0.5rem; +} + +.bodywebsite .g-2, + .bodywebsite .gy-2 { + --bs-gutter-y: 0.5rem; +} + +.bodywebsite .g-3, + .bodywebsite .gx-3 { + --bs-gutter-x: 1rem; +} + +.bodywebsite .g-3, + .bodywebsite .gy-3 { + --bs-gutter-y: 1rem; +} + +.bodywebsite .g-4, + .bodywebsite .gx-4 { + --bs-gutter-x: 1.5rem; +} + +.bodywebsite .g-4, + .bodywebsite .gy-4 { + --bs-gutter-y: 1.5rem; +} + +.bodywebsite .g-5, + .bodywebsite .gx-5 { + --bs-gutter-x: 3rem; +} + +.bodywebsite .g-5, + .bodywebsite .gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .bodywebsite .col-sm { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-sm-0 { + margin-left: 0; + } + + .bodywebsite .offset-sm-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-sm-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-sm-3 { + margin-left: 25%; + } + + .bodywebsite .offset-sm-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-sm-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-sm-6 { + margin-left: 50%; + } + + .bodywebsite .offset-sm-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-sm-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-sm-9 { + margin-left: 75%; + } + + .bodywebsite .offset-sm-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-sm-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gx-sm-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-sm-0, + .bodywebsite .gy-sm-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-sm-1, + .bodywebsite .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-sm-2, + .bodywebsite .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-sm-3, + .bodywebsite .gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-sm-4, + .bodywebsite .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-sm-5, + .bodywebsite .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 768px) { + .bodywebsite .col-md { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-md-0 { + margin-left: 0; + } + + .bodywebsite .offset-md-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-md-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-md-3 { + margin-left: 25%; + } + + .bodywebsite .offset-md-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-md-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-md-6 { + margin-left: 50%; + } + + .bodywebsite .offset-md-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-md-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-md-9 { + margin-left: 75%; + } + + .bodywebsite .offset-md-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-md-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-md-0, + .bodywebsite .gx-md-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-md-0, + .bodywebsite .gy-md-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-md-1, + .bodywebsite .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-md-1, + .bodywebsite .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-md-2, + .bodywebsite .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gx-md-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-md-3, + .bodywebsite .gy-md-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-md-4, + .bodywebsite .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gx-md-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-md-5, + .bodywebsite .gy-md-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 992px) { + .bodywebsite .col-lg { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-lg-0 { + margin-left: 0; + } + + .bodywebsite .offset-lg-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-lg-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-lg-3 { + margin-left: 25%; + } + + .bodywebsite .offset-lg-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-lg-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-lg-6 { + margin-left: 50%; + } + + .bodywebsite .offset-lg-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-lg-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-lg-9 { + margin-left: 75%; + } + + .bodywebsite .offset-lg-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-lg-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gx-lg-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-lg-0, + .bodywebsite .gy-lg-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-lg-1, + .bodywebsite .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-lg-2, + .bodywebsite .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-lg-3, + .bodywebsite .gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-lg-4, + .bodywebsite .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-lg-5, + .bodywebsite .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1200px) { + .bodywebsite .col-xl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gx-xl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xl-0, + .bodywebsite .gy-xl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xl-1, + .bodywebsite .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xl-2, + .bodywebsite .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xl-3, + .bodywebsite .gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xl-4, + .bodywebsite .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xl-5, + .bodywebsite .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} + +@media (min-width: 1400px) { + .bodywebsite .col-xxl { + flex: 1 0 0%; + } + + .bodywebsite .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .bodywebsite .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .bodywebsite .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .bodywebsite .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .bodywebsite .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .bodywebsite .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .bodywebsite .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .bodywebsite .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .bodywebsite .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .bodywebsite .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .bodywebsite .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .bodywebsite .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .bodywebsite .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .bodywebsite .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .bodywebsite .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .bodywebsite .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .bodywebsite .offset-xxl-0 { + margin-left: 0; + } + + .bodywebsite .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .bodywebsite .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .bodywebsite .offset-xxl-3 { + margin-left: 25%; + } + + .bodywebsite .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .bodywebsite .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .bodywebsite .offset-xxl-6 { + margin-left: 50%; + } + + .bodywebsite .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .bodywebsite .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .bodywebsite .offset-xxl-9 { + margin-left: 75%; + } + + .bodywebsite .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .bodywebsite .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gx-xxl-0 { + --bs-gutter-x: 0; + } + + .bodywebsite .g-xxl-0, + .bodywebsite .gy-xxl-0 { + --bs-gutter-y: 0; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .bodywebsite .g-xxl-1, + .bodywebsite .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .bodywebsite .g-xxl-2, + .bodywebsite .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .bodywebsite .g-xxl-3, + .bodywebsite .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .bodywebsite .g-xxl-4, + .bodywebsite .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .bodywebsite .g-xxl-5, + .bodywebsite .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} + +.bodywebsite .table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} + +.bodywebsite .table > tbody { + vertical-align: inherit; +} + +.bodywebsite .table > thead { + vertical-align: bottom; +} + +.bodywebsite .table-group-divider { + border-top: 2px solid currentcolor; +} + +.bodywebsite .caption-top { + caption-side: top; +} + +.bodywebsite .table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} + +.bodywebsite .table-bordered > :not(caption) > * { + border-width: 1px 0; +} + +.bodywebsite .table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} + +.bodywebsite .table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} + +.bodywebsite .table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.bodywebsite .table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.bodywebsite .table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} + +.bodywebsite .table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} + +.bodywebsite .table-primary { + --bs-table-color: #000; + --bs-table-bg: #cfe2ff; + --bs-table-border-color: #bacbe6; + --bs-table-striped-bg: #c5d7f2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bacbe6; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfd1ec; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-secondary { + --bs-table-color: #000; + --bs-table-bg: #e2e3e5; + --bs-table-border-color: #cbccce; + --bs-table-striped-bg: #d7d8da; + --bs-table-striped-color: #000; + --bs-table-active-bg: #cbccce; + --bs-table-active-color: #000; + --bs-table-hover-bg: #d1d2d4; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-success { + --bs-table-color: #000; + --bs-table-bg: #d1e7dd; + --bs-table-border-color: #bcd0c7; + --bs-table-striped-bg: #c7dbd2; + --bs-table-striped-color: #000; + --bs-table-active-bg: #bcd0c7; + --bs-table-active-color: #000; + --bs-table-hover-bg: #c1d6cc; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-info { + --bs-table-color: #000; + --bs-table-bg: #cff4fc; + --bs-table-border-color: #badce3; + --bs-table-striped-bg: #c5e8ef; + --bs-table-striped-color: #000; + --bs-table-active-bg: #badce3; + --bs-table-active-color: #000; + --bs-table-hover-bg: #bfe2e9; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-warning { + --bs-table-color: #000; + --bs-table-bg: #fff3cd; + --bs-table-border-color: #e6dbb9; + --bs-table-striped-bg: #f2e7c3; + --bs-table-striped-color: #000; + --bs-table-active-bg: #e6dbb9; + --bs-table-active-color: #000; + --bs-table-hover-bg: #ece1be; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-danger { + --bs-table-color: #000; + --bs-table-bg: #f8d7da; + --bs-table-border-color: #dfc2c4; + --bs-table-striped-bg: #eccccf; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfc2c4; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5c7ca; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-light { + --bs-table-color: #000; + --bs-table-bg: #f8f9fa; + --bs-table-border-color: #dfe0e1; + --bs-table-striped-bg: #ecedee; + --bs-table-striped-color: #000; + --bs-table-active-bg: #dfe0e1; + --bs-table-active-color: #000; + --bs-table-hover-bg: #e5e6e7; + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-dark { + --bs-table-color: #fff; + --bs-table-bg: #212529; + --bs-table-border-color: #373b3e; + --bs-table-striped-bg: #2c3034; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #373b3e; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #323539; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.bodywebsite .table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .bodywebsite .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} + +.bodywebsite .form-label { + margin-bottom: 0.5rem; +} + +.bodywebsite .col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.bodywebsite .col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} + +.bodywebsite .col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} + +.bodywebsite .form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #6c757d; +} + +.bodywebsite .form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control { + transition: none; + } +} + +.bodywebsite .form-control[type=file] { + overflow: hidden; +} + +.bodywebsite .form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-control::-webkit-date-and-time-value { + height: 1.5em; +} + +.bodywebsite .form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control::placeholder { + color: #6c757d; + opacity: 1; +} + +.bodywebsite .form-control:disabled { + background-color: #e9ecef; + opacity: 1; +} + +.bodywebsite .form-control::-webkit-file-upload-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +.bodywebsite .form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + + .bodywebsite .form-control::file-selector-button { + transition: none; + } +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #dde0e3; +} + +.bodywebsite .form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} + +.bodywebsite .form-control-plaintext:focus { + outline: 0; +} + +.bodywebsite .form-control-plaintext.form-control-sm, .bodywebsite .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.bodywebsite .form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} + +.bodywebsite .form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-control-lg::-webkit-file-upload-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite .form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +.bodywebsite textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} + +.bodywebsite textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} + +.bodywebsite .form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} + +.bodywebsite .form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} + +.bodywebsite .form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} + +.bodywebsite .form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} + +.bodywebsite .form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-select { + transition: none; + } +} + +.bodywebsite .form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-select[multiple], .bodywebsite .form-select[size]:not([size="1"]) { + padding-right: 0.75rem; + background-image: none; +} + +.bodywebsite .form-select:disabled { + background-color: #e9ecef; +} + +.bodywebsite .form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #212529; +} + +.bodywebsite .form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} + +.bodywebsite .form-check .form-check-input { + float: left; + margin-left: -1.5em; +} + +.bodywebsite .form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} + +.bodywebsite .form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} + +.bodywebsite .form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0, 0, 0, 0.25); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; + print-color-adjust: exact; +} + +.bodywebsite .form-check-input[type=checkbox] { + border-radius: 0.25em; +} + +.bodywebsite .form-check-input[type=radio] { + border-radius: 50%; +} + +.bodywebsite .form-check-input:active { + filter: brightness(90%); +} + +.bodywebsite .form-check-input:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-check-input:checked { + background-color: #0d6efd; + border-color: #0d6efd; +} + +.bodywebsite .form-check-input:checked[type=checkbox] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:checked[type=radio] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input[type=checkbox]:indeterminate { + background-color: #0d6efd; + border-color: #0d6efd; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} + +.bodywebsite .form-check-input[disabled] ~ .form-check-label, .bodywebsite .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.bodywebsite .form-switch { + padding-left: 2.5em; +} + +.bodywebsite .form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-switch .form-check-input { + transition: none; + } +} + +.bodywebsite .form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} + +.bodywebsite .form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} + +.bodywebsite .form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.bodywebsite .form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.bodywebsite .btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} + +.bodywebsite .btn-check[disabled] + .btn, .bodywebsite .btn-check:disabled + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} + +.bodywebsite .form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.bodywebsite .form-range:focus { + outline: 0; +} + +.bodywebsite .form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + +.bodywebsite .form-range::-moz-focus-outer { + border: 0; +} + +.bodywebsite .form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-webkit-slider-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} + +.bodywebsite .form-range::-moz-range-thumb:active { + background-color: #b6d4fe; +} + +.bodywebsite .form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.bodywebsite .form-range:disabled { + pointer-events: none; +} + +.bodywebsite .form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.bodywebsite .form-floating { + position: relative; +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext, + .bodywebsite .form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} + +.bodywebsite .form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .form-floating > label { + transition: none; + } +} + +.bodywebsite .form-floating > .form-control, + .bodywebsite .form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} + +.bodywebsite .form-floating > .form-control::-moz-placeholder, .bodywebsite .form-floating > .form-control-plaintext::-moz-placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control::placeholder, + .bodywebsite .form-floating > .form-control-plaintext::placeholder { + color: transparent; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown), .bodywebsite .form-floating > .form-control-plaintext:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:focus, .bodywebsite .form-floating > .form-control:not(:placeholder-shown), + .bodywebsite .form-floating > .form-control-plaintext:focus, + .bodywebsite .form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill, + .bodywebsite .form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} + +.bodywebsite .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:focus ~ label, + .bodywebsite .form-floating > .form-control:not(:placeholder-shown) ~ label, + .bodywebsite .form-floating > .form-control-plaintext ~ label, + .bodywebsite .form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} + +.bodywebsite .form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} + +.bodywebsite .input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} + +.bodywebsite .input-group > .form-control, + .bodywebsite .input-group > .form-select, + .bodywebsite .input-group > .form-floating { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} + +.bodywebsite .input-group > .form-control:focus, + .bodywebsite .input-group > .form-select:focus, + .bodywebsite .input-group > .form-floating:focus-within { + z-index: 5; +} + +.bodywebsite .input-group .btn { + position: relative; + z-index: 2; +} + +.bodywebsite .input-group .btn:focus { + z-index: 5; +} + +.bodywebsite .input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.375rem; +} + +.bodywebsite .input-group-lg > .form-control, + .bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-lg > .input-group-text, + .bodywebsite .input-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.bodywebsite .input-group-sm > .form-control, + .bodywebsite .input-group-sm > .form-select, + .bodywebsite .input-group-sm > .input-group-text, + .bodywebsite .input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.bodywebsite .input-group-lg > .form-select, + .bodywebsite .input-group-sm > .form-select { + padding-right: 3rem; +} + +.bodywebsite .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, + .bodywebsite .input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), + .bodywebsite .input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, + .bodywebsite .input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .input-group > .form-floating:not(:first-child) > .form-control, + .bodywebsite .input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #198754; +} + +.bodywebsite .valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(25, 135, 84, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :valid ~ .valid-feedback, + .bodywebsite .was-validated :valid ~ .valid-tooltip, + .bodywebsite .is-valid ~ .valid-feedback, + .bodywebsite .is-valid ~ .valid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:valid, .bodywebsite .form-control.is-valid { + border-color: #198754; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:valid:focus, .bodywebsite .form-control.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:valid, .bodywebsite textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:valid, .bodywebsite .form-select.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-select:valid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:valid:not([multiple])[size="1"], .bodywebsite .form-select.is-valid:not([multiple]):not([size]), .bodywebsite .form-select.is-valid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:valid:focus, .bodywebsite .form-select.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-control-color:valid, .bodywebsite .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:valid, .bodywebsite .form-check-input.is-valid { + border-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:checked, .bodywebsite .form-check-input.is-valid:checked { + background-color: #198754; +} + +.bodywebsite .was-validated .form-check-input:valid:focus, .bodywebsite .form-check-input.is-valid:focus { + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.bodywebsite .was-validated .form-check-input:valid ~ .form-check-label, .bodywebsite .form-check-input.is-valid ~ .form-check-label { + color: #198754; +} + +.bodywebsite .form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):valid, .bodywebsite .input-group > .form-control:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):valid, + .bodywebsite .input-group > .form-select:not(:focus).is-valid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):valid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-valid { + z-index: 3; +} + +.bodywebsite .invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #dc3545; +} + +.bodywebsite .invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.375rem; +} + +.bodywebsite .was-validated :invalid ~ .invalid-feedback, + .bodywebsite .was-validated :invalid ~ .invalid-tooltip, + .bodywebsite .is-invalid ~ .invalid-feedback, + .bodywebsite .is-invalid ~ .invalid-tooltip { + display: block; +} + +.bodywebsite .was-validated .form-control:invalid, .bodywebsite .form-control.is-invalid { + border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-control:invalid:focus, .bodywebsite .form-control.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated textarea.form-control:invalid, .bodywebsite textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.bodywebsite .was-validated .form-select:invalid, .bodywebsite .form-select.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-select:invalid:not([multiple]):not([size]), .bodywebsite .was-validated .form-select:invalid:not([multiple])[size="1"], .bodywebsite .form-select.is-invalid:not([multiple]):not([size]), .bodywebsite .form-select.is-invalid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.bodywebsite .was-validated .form-select:invalid:focus, .bodywebsite .form-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-control-color:invalid, .bodywebsite .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.bodywebsite .was-validated .form-check-input:invalid, .bodywebsite .form-check-input.is-invalid { + border-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:checked, .bodywebsite .form-check-input.is-invalid:checked { + background-color: #dc3545; +} + +.bodywebsite .was-validated .form-check-input:invalid:focus, .bodywebsite .form-check-input.is-invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.bodywebsite .was-validated .form-check-input:invalid ~ .form-check-label, .bodywebsite .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.bodywebsite .form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.bodywebsite .was-validated .input-group > .form-control:not(:focus):invalid, .bodywebsite .input-group > .form-control:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-select:not(:focus):invalid, + .bodywebsite .input-group > .form-select:not(:focus).is-invalid, + .bodywebsite .was-validated .input-group > .form-floating:not(:focus-within):invalid, + .bodywebsite .input-group > .form-floating:not(:focus-within).is-invalid { + z-index: 4; +} + +.bodywebsite .btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #212529; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .btn { + transition: none; + } +} + +.bodywebsite :not(.btn-check) + .btn:hover, .bodywebsite .btn:first-child:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} + +.bodywebsite .btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn-check:checked + .btn, .bodywebsite :not(.btn-check) + .btn:active, .bodywebsite .btn:first-child:active, .bodywebsite .btn.active, .bodywebsite .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} + +.bodywebsite .btn-check:checked + .btn:focus-visible, .bodywebsite :not(.btn-check) + .btn:active:focus-visible, .bodywebsite .btn:first-child:active:focus-visible, .bodywebsite .btn.active:focus-visible, .bodywebsite .btn.show:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); +} + +.bodywebsite .btn:disabled, .bodywebsite .btn.disabled, .bodywebsite fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} + +.bodywebsite .btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0b5ed7; + --bs-btn-hover-border-color: #0a58ca; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0a58ca; + --bs-btn-active-border-color: #0a53be; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #0d6efd; + --bs-btn-disabled-border-color: #0d6efd; +} + +.bodywebsite .btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #5c636a; + --bs-btn-hover-border-color: #565e64; + --bs-btn-focus-shadow-rgb: 130, 138, 145; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #565e64; + --bs-btn-active-border-color: #51585e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #6c757d; + --bs-btn-disabled-border-color: #6c757d; +} + +.bodywebsite .btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #157347; + --bs-btn-hover-border-color: #146c43; + --bs-btn-focus-shadow-rgb: 60, 153, 110; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #146c43; + --bs-btn-active-border-color: #13653f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #198754; + --bs-btn-disabled-border-color: #198754; +} + +.bodywebsite .btn-info { + --bs-btn-color: #000; + --bs-btn-bg: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #31d2f2; + --bs-btn-hover-border-color: #25cff2; + --bs-btn-focus-shadow-rgb: 11, 172, 204; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #3dd5f3; + --bs-btn-active-border-color: #25cff2; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #0dcaf0; + --bs-btn-disabled-border-color: #0dcaf0; +} + +.bodywebsite .btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffca2c; + --bs-btn-hover-border-color: #ffc720; + --bs-btn-focus-shadow-rgb: 217, 164, 6; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffcd39; + --bs-btn-active-border-color: #ffc720; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #ffc107; + --bs-btn-disabled-border-color: #ffc107; +} + +.bodywebsite .btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #bb2d3b; + --bs-btn-hover-border-color: #b02a37; + --bs-btn-focus-shadow-rgb: 225, 83, 97; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b02a37; + --bs-btn-active-border-color: #a52834; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #dc3545; + --bs-btn-disabled-border-color: #dc3545; +} + +.bodywebsite .btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #d3d4d5; + --bs-btn-hover-border-color: #c6c7c8; + --bs-btn-focus-shadow-rgb: 211, 212, 213; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #c6c7c8; + --bs-btn-active-border-color: #babbbc; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f8f9fa; + --bs-btn-disabled-border-color: #f8f9fa; +} + +.bodywebsite .btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #424649; + --bs-btn-hover-border-color: #373b3e; + --bs-btn-focus-shadow-rgb: 66, 70, 73; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #4d5154; + --bs-btn-active-border-color: #373b3e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #212529; + --bs-btn-disabled-border-color: #212529; +} + +.bodywebsite .btn-outline-primary { + --bs-btn-color: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0d6efd; + --bs-btn-hover-border-color: #0d6efd; + --bs-btn-focus-shadow-rgb: 13, 110, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0d6efd; + --bs-btn-active-border-color: #0d6efd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0d6efd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0d6efd; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-secondary { + --bs-btn-color: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #6c757d; + --bs-btn-hover-border-color: #6c757d; + --bs-btn-focus-shadow-rgb: 108, 117, 125; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6c757d; + --bs-btn-active-border-color: #6c757d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #6c757d; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-success { + --bs-btn-color: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #198754; + --bs-btn-hover-border-color: #198754; + --bs-btn-focus-shadow-rgb: 25, 135, 84; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #198754; + --bs-btn-active-border-color: #198754; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #198754; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #198754; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-info { + --bs-btn-color: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #0dcaf0; + --bs-btn-hover-border-color: #0dcaf0; + --bs-btn-focus-shadow-rgb: 13, 202, 240; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #0dcaf0; + --bs-btn-active-border-color: #0dcaf0; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0dcaf0; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0dcaf0; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-warning { + --bs-btn-color: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffc107; + --bs-btn-hover-border-color: #ffc107; + --bs-btn-focus-shadow-rgb: 255, 193, 7; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffc107; + --bs-btn-active-border-color: #ffc107; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #ffc107; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #ffc107; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-danger { + --bs-btn-color: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #dc3545; + --bs-btn-hover-border-color: #dc3545; + --bs-btn-focus-shadow-rgb: 220, 53, 69; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #dc3545; + --bs-btn-active-border-color: #dc3545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #dc3545; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #dc3545; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-light { + --bs-btn-color: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f8f9fa; + --bs-btn-hover-border-color: #f8f9fa; + --bs-btn-focus-shadow-rgb: 248, 249, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f8f9fa; + --bs-btn-active-border-color: #f8f9fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f8f9fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f8f9fa; + --bs-gradient: none; +} + +.bodywebsite .btn-outline-dark { + --bs-btn-color: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #212529; + --bs-btn-hover-border-color: #212529; + --bs-btn-focus-shadow-rgb: 33, 37, 41; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #212529; + --bs-btn-active-border-color: #212529; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #212529; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #212529; + --bs-gradient: none; +} + +.bodywebsite .btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: underline; +} + +.bodywebsite .btn-link:focus-visible { + color: var(--bs-btn-color); +} + +.bodywebsite .btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.bodywebsite .btn-lg, .bodywebsite .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} + +.bodywebsite .btn-sm, .bodywebsite .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} + +.bodywebsite .fade { + transition: opacity 0.15s linear; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .fade { + transition: none; + } +} + +.bodywebsite .fade:not(.show) { + opacity: 0; +} + +.bodywebsite .collapse:not(.show) { + display: none; +} + +.bodywebsite .collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing { + transition: none; + } +} + +.bodywebsite .collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .collapsing.collapse-horizontal { + transition: none; + } +} + +.bodywebsite .dropup, + .bodywebsite .dropend, + .bodywebsite .dropdown, + .bodywebsite .dropstart, + .bodywebsite .dropup-center, + .bodywebsite .dropdown-center { + position: relative; +} + +.bodywebsite .dropdown-toggle { + white-space: nowrap; +} + +.bodywebsite .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #212529; + --bs-dropdown-bg: #fff; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #212529; + --bs-dropdown-link-hover-color: #1e2125; + --bs-dropdown-link-hover-bg: #e9ecef; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #6c757d; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} + +.bodywebsite .dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropdown-menu-start { + --bs-position: start; +} + +.bodywebsite .dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.bodywebsite .dropdown-menu-end { + --bs-position: end; +} + +.bodywebsite .dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .bodywebsite .dropdown-menu-sm-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-sm-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 768px) { + .bodywebsite .dropdown-menu-md-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-md-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 992px) { + .bodywebsite .dropdown-menu-lg-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-lg-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1200px) { + .bodywebsite .dropdown-menu-xl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +@media (min-width: 1400px) { + .bodywebsite .dropdown-menu-xxl-start { + --bs-position: start; + } + + .bodywebsite .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + + .bodywebsite .dropdown-menu-xxl-end { + --bs-position: end; + } + + .bodywebsite .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} + +.bodywebsite .dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} + +.bodywebsite .dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} + +.bodywebsite .dropend .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.bodywebsite .dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} + +.bodywebsite .dropstart .dropdown-toggle::after { + display: none; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} + +.bodywebsite .dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.bodywebsite .dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.bodywebsite .dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} + +.bodywebsite .dropdown-item:hover, .bodywebsite .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} + +.bodywebsite .dropdown-item.active, .bodywebsite .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} + +.bodywebsite .dropdown-item.disabled, .bodywebsite .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.bodywebsite .dropdown-menu.show { + display: block; +} + +.bodywebsite .dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.bodywebsite .dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.bodywebsite .dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.bodywebsite .btn-group, + .bodywebsite .btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} + +.bodywebsite .btn-group > .btn, + .bodywebsite .btn-group-vertical > .btn { + position: relative; + flex: 1 1 auto; +} + +.bodywebsite .btn-group > .btn-check:checked + .btn, + .bodywebsite .btn-group > .btn-check:focus + .btn, + .bodywebsite .btn-group > .btn:hover, + .bodywebsite .btn-group > .btn:focus, + .bodywebsite .btn-group > .btn:active, + .bodywebsite .btn-group > .btn.active, + .bodywebsite .btn-group-vertical > .btn-check:checked + .btn, + .bodywebsite .btn-group-vertical > .btn-check:focus + .btn, + .bodywebsite .btn-group-vertical > .btn:hover, + .bodywebsite .btn-group-vertical > .btn:focus, + .bodywebsite .btn-group-vertical > .btn:active, + .bodywebsite .btn-group-vertical > .btn.active { + z-index: 1; +} + +.bodywebsite .btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} + +.bodywebsite .btn-toolbar .input-group { + width: auto; +} + +.bodywebsite .btn-group { + border-radius: 0.375rem; +} + +.bodywebsite .btn-group > :not(.btn-check:first-child) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) { + margin-left: -1px; +} + +.bodywebsite .btn-group > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group > .btn.dropdown-toggle-split:first-child, + .bodywebsite .btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.bodywebsite .btn-group > .btn:nth-child(n+3), + .bodywebsite .btn-group > :not(.btn-check) + .btn, + .bodywebsite .btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} + +.bodywebsite .dropdown-toggle-split::after, .bodywebsite .dropup .dropdown-toggle-split::after, .bodywebsite .dropend .dropdown-toggle-split::after { + margin-left: 0; +} + +.bodywebsite .dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.bodywebsite .btn-sm + .dropdown-toggle-split, .bodywebsite .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.bodywebsite .btn-lg + .dropdown-toggle-split, .bodywebsite .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.bodywebsite .btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} + +.bodywebsite .btn-group-vertical > .btn, + .bodywebsite .btn-group-vertical > .btn-group { + width: 100%; +} + +.bodywebsite .btn-group-vertical > .btn:not(:first-child), + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) { + margin-top: -1px; +} + +.bodywebsite .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), + .bodywebsite .btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.bodywebsite .btn-group-vertical > .btn ~ .btn, + .bodywebsite .btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .nav-link { + transition: none; + } +} + +.bodywebsite .nav-link:hover, .bodywebsite .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} + +.bodywebsite .nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.bodywebsite .nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #dee2e6; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6; + --bs-nav-tabs-link-active-color: #495057; + --bs-nav-tabs-link-active-bg: #fff; + --bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff; + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} + +.bodywebsite .nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + background: none; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} + +.bodywebsite .nav-tabs .nav-link:hover, .bodywebsite .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} + +.bodywebsite .nav-tabs .nav-link.disabled, .bodywebsite .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-tabs .nav-link.active, + .bodywebsite .nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} + +.bodywebsite .nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.bodywebsite .nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #0d6efd; +} + +.bodywebsite .nav-pills .nav-link { + background: none; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} + +.bodywebsite .nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} + +.bodywebsite .nav-pills .nav-link.active, + .bodywebsite .nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.bodywebsite .nav-fill > .nav-link, + .bodywebsite .nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} + +.bodywebsite .nav-justified > .nav-link, + .bodywebsite .nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} + +.bodywebsite .nav-fill .nav-item .nav-link, + .bodywebsite .nav-justified .nav-item .nav-link { + width: 100%; +} + +.bodywebsite .tab-content > .tab-pane { + display: none; +} + +.bodywebsite .tab-content > .active { + display: block; +} + +.bodywebsite .navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: rgba(0, 0, 0, 0.55); + --bs-navbar-hover-color: rgba(0, 0, 0, 0.7); + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-hover-color: rgba(0, 0, 0, 0.9); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} + +.bodywebsite .navbar > .container, + .bodywebsite .navbar > .container-fluid, + .bodywebsite .navbar > .container-sm, + .bodywebsite .navbar > .container-md, + .bodywebsite .navbar > .container-lg, + .bodywebsite .navbar > .container-xl, + .bodywebsite .navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} + +.bodywebsite .navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} + +.bodywebsite .navbar-brand:hover, .bodywebsite .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.bodywebsite .navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.bodywebsite .navbar-nav .show > .nav-link, + .bodywebsite .navbar-nav .nav-link.active { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-nav .dropdown-menu { + position: static; +} + +.bodywebsite .navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} + +.bodywebsite .navbar-text a, + .bodywebsite .navbar-text a:hover, + .bodywebsite .navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.bodywebsite .navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} + +.bodywebsite .navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .navbar-toggler { + transition: none; + } +} + +.bodywebsite .navbar-toggler:hover { + text-decoration: none; +} + +.bodywebsite .navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.bodywebsite .navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.bodywebsite .navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .bodywebsite .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-sm .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-md .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-md .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-lg .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + + .bodywebsite .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + + .bodywebsite .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + + .bodywebsite .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + + .bodywebsite .navbar-expand-xxl .navbar-toggler { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + + .bodywebsite .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} + +.bodywebsite .navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} + +.bodywebsite .navbar-expand .navbar-nav { + flex-direction: row; +} + +.bodywebsite .navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} + +.bodywebsite .navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} + +.bodywebsite .navbar-expand .navbar-nav-scroll { + overflow: visible; +} + +.bodywebsite .navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} + +.bodywebsite .navbar-expand .navbar-toggler { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-header { + display: none; +} + +.bodywebsite .navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.bodywebsite .navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.55); + --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.bodywebsite .card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: rgba(0, 0, 0, 0.03); + --bs-card-bg: #fff; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} + +.bodywebsite .card > hr { + margin-right: 0; + margin-left: 0; +} + +.bodywebsite .card > .list-group { + border-top: inherit; + border-bottom: inherit; +} + +.bodywebsite .card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card > .card-header + .list-group, + .bodywebsite .card > .list-group + .card-footer { + border-top: 0; +} + +.bodywebsite .card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.bodywebsite .card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} + +.bodywebsite .card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} + +.bodywebsite .card-text:last-child { + margin-bottom: 0; +} + +.bodywebsite .card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.bodywebsite .card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.bodywebsite .card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} + +.bodywebsite .card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} + +.bodywebsite .card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.bodywebsite .card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.bodywebsite .card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top, + .bodywebsite .card-img-bottom { + width: 100%; +} + +.bodywebsite .card-img, + .bodywebsite .card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-img, + .bodywebsite .card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.bodywebsite .card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} + +@media (min-width: 576px) { + .bodywebsite .card-group { + display: flex; + flex-flow: row wrap; + } + + .bodywebsite .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + + .bodywebsite .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-top, + .bodywebsite .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:last-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-top, + .bodywebsite .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + + .bodywebsite .card-group > .card:not(:first-child) .card-img-bottom, + .bodywebsite .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.bodywebsite .accordion { + --bs-accordion-color: var(--bs-body-color); + --bs-accordion-bg: #fff; + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #86b7fe; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #0c63e4; + --bs-accordion-active-bg: #e7f1ff; +} + +.bodywebsite .accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button { + transition: none; + } +} + +.bodywebsite .accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} + +.bodywebsite .accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .accordion-button::after { + transition: none; + } +} + +.bodywebsite .accordion-button:hover { + z-index: 2; +} + +.bodywebsite .accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.bodywebsite .accordion-header { + margin-bottom: 0; +} + +.bodywebsite .accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} + +.bodywebsite .accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:not(:first-of-type) { + border-top: 0; +} + +.bodywebsite .accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} + +.bodywebsite .accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.bodywebsite .accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.bodywebsite .accordion-flush .accordion-collapse { + border-width: 0; +} + +.bodywebsite .accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} + +.bodywebsite .accordion-flush .accordion-item:first-child { + border-top: 0; +} + +.bodywebsite .accordion-flush .accordion-item:last-child { + border-bottom: 0; +} + +.bodywebsite .accordion-flush .accordion-item .accordion-button, .bodywebsite .accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} + +.bodywebsite .breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-divider-color: #6c757d; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} + +.bodywebsite .breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/"); +} + +.bodywebsite .breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.bodywebsite .pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: #fff; + --bs-pagination-border-width: 1px; + --bs-pagination-border-color: #dee2e6; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: #e9ecef; + --bs-pagination-hover-border-color: #dee2e6; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #e9ecef; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #0d6efd; + --bs-pagination-active-border-color: #0d6efd; + --bs-pagination-disabled-color: #6c757d; + --bs-pagination-disabled-bg: #fff; + --bs-pagination-disabled-border-color: #dee2e6; + display: flex; + padding-left: 0; + list-style: none; +} + +.bodywebsite .page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .page-link { + transition: none; + } +} + +.bodywebsite .page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} + +.bodywebsite .page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} + +.bodywebsite .page-link.active, .bodywebsite .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} + +.bodywebsite .page-link.disabled, .bodywebsite .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.bodywebsite .page-item:not(:first-child) .page-link { + margin-left: -1px; +} + +.bodywebsite .page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.bodywebsite .pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} + +.bodywebsite .pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} + +.bodywebsite .badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} + +.bodywebsite .badge:empty { + display: none; +} + +.bodywebsite .btn .badge { + position: relative; + top: -1px; +} + +.bodywebsite .alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.bodywebsite .alert-heading { + color: inherit; +} + +.bodywebsite .alert-link { + font-weight: 700; +} + +.bodywebsite .alert-dismissible { + padding-right: 3rem; +} + +.bodywebsite .alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.bodywebsite .alert-primary { + --bs-alert-color: #084298; + --bs-alert-bg: #cfe2ff; + --bs-alert-border-color: #b6d4fe; +} + +.bodywebsite .alert-primary .alert-link { + color: #06357a; +} + +.bodywebsite .alert-secondary { + --bs-alert-color: #41464b; + --bs-alert-bg: #e2e3e5; + --bs-alert-border-color: #d3d6d8; +} + +.bodywebsite .alert-secondary .alert-link { + color: #34383c; +} + +.bodywebsite .alert-success { + --bs-alert-color: #0f5132; + --bs-alert-bg: #d1e7dd; + --bs-alert-border-color: #badbcc; +} + +.bodywebsite .alert-success .alert-link { + color: #0c4128; +} + +.bodywebsite .alert-info { + --bs-alert-color: #055160; + --bs-alert-bg: #cff4fc; + --bs-alert-border-color: #b6effb; +} + +.bodywebsite .alert-info .alert-link { + color: #04414d; +} + +.bodywebsite .alert-warning { + --bs-alert-color: #664d03; + --bs-alert-bg: #fff3cd; + --bs-alert-border-color: #ffecb5; +} + +.bodywebsite .alert-warning .alert-link { + color: #523e02; +} + +.bodywebsite .alert-danger { + --bs-alert-color: #842029; + --bs-alert-bg: #f8d7da; + --bs-alert-border-color: #f5c2c7; +} + +.bodywebsite .alert-danger .alert-link { + color: #6a1a21; +} + +.bodywebsite .alert-light { + --bs-alert-color: #636464; + --bs-alert-bg: #fefefe; + --bs-alert-border-color: #fdfdfe; +} + +.bodywebsite .alert-light .alert-link { + color: #4f5050; +} + +.bodywebsite .alert-dark { + --bs-alert-color: #141619; + --bs-alert-bg: #d3d3d4; + --bs-alert-border-color: #bcbebf; +} + +.bodywebsite .alert-dark .alert-link { + color: #101214; +} + +@-webkit-keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} + +.bodywebsite .progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #e9ecef; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #0d6efd; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} + +.bodywebsite .progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar { + transition: none; + } +} + +.bodywebsite .progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.bodywebsite .progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + +.bodywebsite .list-group { + --bs-list-group-color: #212529; + --bs-list-group-bg: #fff; + --bs-list-group-border-color: rgba(0, 0, 0, 0.125); + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #495057; + --bs-list-group-action-hover-color: #495057; + --bs-list-group-action-hover-bg: #f8f9fa; + --bs-list-group-action-active-color: #212529; + --bs-list-group-action-active-bg: #e9ecef; + --bs-list-group-disabled-color: #6c757d; + --bs-list-group-disabled-bg: #fff; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #0d6efd; + --bs-list-group-active-border-color: #0d6efd; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.bodywebsite .list-group-numbered { + list-style-type: none; + counter-reset: section; +} + +.bodywebsite .list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.bodywebsite .list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} + +.bodywebsite .list-group-item-action:hover, .bodywebsite .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} + +.bodywebsite .list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.bodywebsite .list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} + +.bodywebsite .list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} + +.bodywebsite .list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} + +.bodywebsite .list-group-item.disabled, .bodywebsite .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} + +.bodywebsite .list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} + +.bodywebsite .list-group-item + .list-group-item { + border-top-width: 0; +} + +.bodywebsite .list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-horizontal { + flex-direction: row; +} + +.bodywebsite .list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item.active { + margin-top: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} + +.bodywebsite .list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .bodywebsite .list-group-horizontal-sm { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 768px) { + .bodywebsite .list-group-horizontal-md { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 992px) { + .bodywebsite .list-group-horizontal-lg { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1200px) { + .bodywebsite .list-group-horizontal-xl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +@media (min-width: 1400px) { + .bodywebsite .list-group-horizontal-xxl { + flex-direction: row; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + + .bodywebsite .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} + +.bodywebsite .list-group-flush { + border-radius: 0; +} + +.bodywebsite .list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} + +.bodywebsite .list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.bodywebsite .list-group-item-primary { + color: #084298; + background-color: #cfe2ff; +} + +.bodywebsite .list-group-item-primary.list-group-item-action:hover, .bodywebsite .list-group-item-primary.list-group-item-action:focus { + color: #084298; + background-color: #bacbe6; +} + +.bodywebsite .list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #084298; + border-color: #084298; +} + +.bodywebsite .list-group-item-secondary { + color: #41464b; + background-color: #e2e3e5; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action:hover, .bodywebsite .list-group-item-secondary.list-group-item-action:focus { + color: #41464b; + background-color: #cbccce; +} + +.bodywebsite .list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #41464b; + border-color: #41464b; +} + +.bodywebsite .list-group-item-success { + color: #0f5132; + background-color: #d1e7dd; +} + +.bodywebsite .list-group-item-success.list-group-item-action:hover, .bodywebsite .list-group-item-success.list-group-item-action:focus { + color: #0f5132; + background-color: #bcd0c7; +} + +.bodywebsite .list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #0f5132; + border-color: #0f5132; +} + +.bodywebsite .list-group-item-info { + color: #055160; + background-color: #cff4fc; +} + +.bodywebsite .list-group-item-info.list-group-item-action:hover, .bodywebsite .list-group-item-info.list-group-item-action:focus { + color: #055160; + background-color: #badce3; +} + +.bodywebsite .list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #055160; + border-color: #055160; +} + +.bodywebsite .list-group-item-warning { + color: #664d03; + background-color: #fff3cd; +} + +.bodywebsite .list-group-item-warning.list-group-item-action:hover, .bodywebsite .list-group-item-warning.list-group-item-action:focus { + color: #664d03; + background-color: #e6dbb9; +} + +.bodywebsite .list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #664d03; + border-color: #664d03; +} + +.bodywebsite .list-group-item-danger { + color: #842029; + background-color: #f8d7da; +} + +.bodywebsite .list-group-item-danger.list-group-item-action:hover, .bodywebsite .list-group-item-danger.list-group-item-action:focus { + color: #842029; + background-color: #dfc2c4; +} + +.bodywebsite .list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #842029; + border-color: #842029; +} + +.bodywebsite .list-group-item-light { + color: #636464; + background-color: #fefefe; +} + +.bodywebsite .list-group-item-light.list-group-item-action:hover, .bodywebsite .list-group-item-light.list-group-item-action:focus { + color: #636464; + background-color: #e5e5e5; +} + +.bodywebsite .list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #636464; + border-color: #636464; +} + +.bodywebsite .list-group-item-dark { + color: #141619; + background-color: #d3d3d4; +} + +.bodywebsite .list-group-item-dark.list-group-item-action:hover, .bodywebsite .list-group-item-dark.list-group-item-action:focus { + color: #141619; + background-color: #bebebf; +} + +.bodywebsite .list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #141619; + border-color: #141619; +} + +.bodywebsite .btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #000; + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.5; +} + +.bodywebsite .btn-close:hover { + color: #000; + text-decoration: none; + opacity: 0.75; +} + +.bodywebsite .btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + opacity: 1; +} + +.bodywebsite .btn-close:disabled, .bodywebsite .btn-close.disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + opacity: 0.25; +} + +.bodywebsite .btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} + +.bodywebsite .toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-bg: rgba(255, 255, 255, 0.85); + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #6c757d; + --bs-toast-header-bg: rgba(255, 255, 255, 0.85); + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} + +.bodywebsite .toast.showing { + opacity: 0; +} + +.bodywebsite .toast:not(.show) { + display: none; +} + +.bodywebsite .toast-container { + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} + +.bodywebsite .toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.bodywebsite .toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} + +.bodywebsite .toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} + +.bodywebsite .toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.bodywebsite .modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-bg: #fff; + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.bodywebsite .modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} + +.bodywebsite .modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .modal.fade .modal-dialog { + transition: none; + } +} + +.bodywebsite .modal.show .modal-dialog { + transform: none; +} + +.bodywebsite .modal.modal-static .modal-dialog { + transform: scale(1.02); +} + +.bodywebsite .modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} + +.bodywebsite .modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.bodywebsite .modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.bodywebsite .modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} + +.bodywebsite .modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} + +.bodywebsite .modal-backdrop.fade { + opacity: 0; +} + +.bodywebsite .modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.bodywebsite .modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} + +.bodywebsite .modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.bodywebsite .modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.bodywebsite .modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} + +.bodywebsite .modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .bodywebsite .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + + .bodywebsite .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + + .bodywebsite .modal-sm { + --bs-modal-width: 300px; + } +} + +@media (min-width: 992px) { + .bodywebsite .modal-lg, + .bodywebsite .modal-xl { + --bs-modal-width: 800px; + } +} + +@media (min-width: 1200px) { + .bodywebsite .modal-xl { + --bs-modal-width: 1140px; + } +} + +.bodywebsite .modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} + +.bodywebsite .modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-header, + .bodywebsite .modal-fullscreen .modal-footer { + border-radius: 0; +} + +.bodywebsite .modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .bodywebsite .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-header, + .bodywebsite .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-header, + .bodywebsite .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-header, + .bodywebsite .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-header, + .bodywebsite .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-header, + .bodywebsite .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + + .bodywebsite .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} + +.bodywebsite .tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} + +.bodywebsite .tooltip.show { + opacity: var(--bs-tooltip-opacity); +} + +.bodywebsite .tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} + +.bodywebsite .tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: 0; +} + +.bodywebsite .bs-tooltip-top .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-end .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: 0; +} + +.bodywebsite .bs-tooltip-bottom .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} + +.bodywebsite .bs-tooltip-start .tooltip-arrow::before, .bodywebsite .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +.bodywebsite .tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.bodywebsite .popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #fff; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-bg: #f0f0f0; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #212529; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} + +.bodywebsite .popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} + +.bodywebsite .popover .popover-arrow::before, .bodywebsite .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-top > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-top > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-end > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} + +.bodywebsite .bs-popover-end > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-end > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-bottom > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} + +.bodywebsite .bs-popover-bottom .popover-header::before, .bodywebsite .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +.bodywebsite .bs-popover-start > .popover-arrow, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} + +.bodywebsite .bs-popover-start > .popover-arrow::before, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} + +.bodywebsite .bs-popover-start > .popover-arrow::after, .bodywebsite .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +.bodywebsite .popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} + +.bodywebsite .popover-header:empty { + display: none; +} + +.bodywebsite .popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.bodywebsite .carousel { + position: relative; +} + +.bodywebsite .carousel.pointer-event { + touch-action: pan-y; +} + +.bodywebsite .carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.bodywebsite .carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-item { + transition: none; + } +} + +.bodywebsite .carousel-item.active, + .bodywebsite .carousel-item-next, + .bodywebsite .carousel-item-prev { + display: block; +} + +.bodywebsite .carousel-item-next:not(.carousel-item-start), + .bodywebsite .active.carousel-item-end { + transform: translateX(100%); +} + +.bodywebsite .carousel-item-prev:not(.carousel-item-end), + .bodywebsite .active.carousel-item-start { + transform: translateX(-100%); +} + +.bodywebsite .carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} + +.bodywebsite .carousel-fade .carousel-item.active, + .bodywebsite .carousel-fade .carousel-item-next.carousel-item-start, + .bodywebsite .carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} + +.bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-fade .active.carousel-item-start, + .bodywebsite .carousel-fade .active.carousel-item-end { + transition: none; + } +} + +.bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-control-prev, + .bodywebsite .carousel-control-next { + transition: none; + } +} + +.bodywebsite .carousel-control-prev:hover, .bodywebsite .carousel-control-prev:focus, + .bodywebsite .carousel-control-next:hover, + .bodywebsite .carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.bodywebsite .carousel-control-prev { + left: 0; +} + +.bodywebsite .carousel-control-next { + right: 0; +} + +.bodywebsite .carousel-control-prev-icon, + .bodywebsite .carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +.bodywebsite .carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.bodywebsite .carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} + +.bodywebsite .carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .carousel-indicators [data-bs-target] { + transition: none; + } +} + +.bodywebsite .carousel-indicators .active { + opacity: 1; +} + +.bodywebsite .carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.bodywebsite .carousel-dark .carousel-control-prev-icon, + .bodywebsite .carousel-dark .carousel-control-next-icon { + filter: invert(1) grayscale(100); +} + +.bodywebsite .carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} + +.bodywebsite .carousel-dark .carousel-caption { + color: #000; +} + +.bodywebsite .spinner-grow, + .bodywebsite .spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + -webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@-webkit-keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + transform: rotate(360deg); + } +} + +.bodywebsite .spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.bodywebsite .spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + + 50% { + opacity: 1; + transform: none; + } +} + +.bodywebsite .spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.bodywebsite .spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .spinner-border, + .bodywebsite .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} + +.bodywebsite .offcanvas, .bodywebsite .offcanvas-xxl, .bodywebsite .offcanvas-xl, .bodywebsite .offcanvas-lg, .bodywebsite .offcanvas-md, .bodywebsite .offcanvas-sm { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-bg: #fff; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-sm { + transition: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 575.98px) { + .bodywebsite .offcanvas-sm.showing, .bodywebsite .offcanvas-sm.hiding, .bodywebsite .offcanvas-sm.show { + visibility: visible; + } +} + +@media (min-width: 576px) { + .bodywebsite .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-sm .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-md { + transition: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 767.98px) { + .bodywebsite .offcanvas-md.showing, .bodywebsite .offcanvas-md.hiding, .bodywebsite .offcanvas-md.show { + visibility: visible; + } +} + +@media (min-width: 768px) { + .bodywebsite .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-md .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-lg { + transition: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 991.98px) { + .bodywebsite .offcanvas-lg.showing, .bodywebsite .offcanvas-lg.hiding, .bodywebsite .offcanvas-lg.show { + visibility: visible; + } +} + +@media (min-width: 992px) { + .bodywebsite .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-lg .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xl { + transition: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1199.98px) { + .bodywebsite .offcanvas-xl.showing, .bodywebsite .offcanvas-xl.hiding, .bodywebsite .offcanvas-xl.show { + visibility: visible; + } +} + +@media (min-width: 1200px) { + .bodywebsite .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} + +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas-xxl { + transition: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.show:not(.hiding) { + transform: none; + } +} + +@media (max-width: 1399.98px) { + .bodywebsite .offcanvas-xxl.showing, .bodywebsite .offcanvas-xxl.hiding, .bodywebsite .offcanvas-xxl.show { + visibility: visible; + } +} + +@media (min-width: 1400px) { + .bodywebsite .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + + .bodywebsite .offcanvas-xxl .offcanvas-header { + display: none; + } + + .bodywebsite .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.bodywebsite .offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .bodywebsite .offcanvas { + transition: none; + } +} + +.bodywebsite .offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} + +.bodywebsite .offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); +} + +.bodywebsite .offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} + +.bodywebsite .offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.show:not(.hiding) { + transform: none; +} + +.bodywebsite .offcanvas.showing, .bodywebsite .offcanvas.hiding, .bodywebsite .offcanvas.show { + visibility: visible; +} + +.bodywebsite .offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} + +.bodywebsite .offcanvas-backdrop.fade { + opacity: 0; +} + +.bodywebsite .offcanvas-backdrop.show { + opacity: 0.5; +} + +.bodywebsite .offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} + +.bodywebsite .offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} + +.bodywebsite .offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} + +.bodywebsite .offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.bodywebsite .placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} + +.bodywebsite .placeholder.btn::before { + display: inline-block; + content: ""; +} + +.bodywebsite .placeholder-xs { + min-height: 0.6em; +} + +.bodywebsite .placeholder-sm { + min-height: 0.8em; +} + +.bodywebsite .placeholder-lg { + min-height: 1.2em; +} + +.bodywebsite .placeholder-glow .placeholder { + -webkit-animation: placeholder-glow 2s ease-in-out infinite; + animation: placeholder-glow 2s ease-in-out infinite; +} + +@-webkit-keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} + +.bodywebsite .placeholder-wave { + -webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + -webkit-animation: placeholder-wave 2s linear infinite; + animation: placeholder-wave 2s linear infinite; +} + +@-webkit-keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} + +.bodywebsite .clearfix::after { + display: block; + clear: both; + content: ""; +} + +.bodywebsite .text-bg-primary { + color: #fff !important; + background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-secondary { + color: #fff !important; + background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-success { + color: #fff !important; + background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-info { + color: #000 !important; + background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-warning { + color: #000 !important; + background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-danger { + color: #fff !important; + background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-light { + color: #000 !important; + background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .text-bg-dark { + color: #fff !important; + background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important; +} + +.bodywebsite .link-primary { + color: #0d6efd !important; +} + +.bodywebsite .link-primary:hover, .bodywebsite .link-primary:focus { + color: #0a58ca !important; +} + +.bodywebsite .link-secondary { + color: #6c757d !important; +} + +.bodywebsite .link-secondary:hover, .bodywebsite .link-secondary:focus { + color: #565e64 !important; +} + +.bodywebsite .link-success { + color: #198754 !important; +} + +.bodywebsite .link-success:hover, .bodywebsite .link-success:focus { + color: #146c43 !important; +} + +.bodywebsite .link-info { + color: #0dcaf0 !important; +} + +.bodywebsite .link-info:hover, .bodywebsite .link-info:focus { + color: #3dd5f3 !important; +} + +.bodywebsite .link-warning { + color: #ffc107 !important; +} + +.bodywebsite .link-warning:hover, .bodywebsite .link-warning:focus { + color: #ffcd39 !important; +} + +.bodywebsite .link-danger { + color: #dc3545 !important; +} + +.bodywebsite .link-danger:hover, .bodywebsite .link-danger:focus { + color: #b02a37 !important; +} + +.bodywebsite .link-light { + color: #f8f9fa !important; +} + +.bodywebsite .link-light:hover, .bodywebsite .link-light:focus { + color: #f9fafb !important; +} + +.bodywebsite .link-dark { + color: #212529 !important; +} + +.bodywebsite .link-dark:hover, .bodywebsite .link-dark:focus { + color: #1a1e21 !important; +} + +.bodywebsite .ratio { + position: relative; + width: 100%; +} + +.bodywebsite .ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} + +.bodywebsite .ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.bodywebsite .ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.bodywebsite .ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.bodywebsite .ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.bodywebsite .ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.bodywebsite .fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.bodywebsite .sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; +} + +.bodywebsite .sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .bodywebsite .sticky-sm-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 768px) { + .bodywebsite .sticky-md-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 992px) { + .bodywebsite .sticky-lg-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1200px) { + .bodywebsite .sticky-xl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +@media (min-width: 1400px) { + .bodywebsite .sticky-xxl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + + .bodywebsite .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} + +.bodywebsite .hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} + +.bodywebsite .vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} + +.bodywebsite .visually-hidden, + .bodywebsite .visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.bodywebsite .stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.bodywebsite .text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bodywebsite .vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.bodywebsite .align-baseline { + vertical-align: baseline !important; +} + +.bodywebsite .align-top { + vertical-align: top !important; +} + +.bodywebsite .align-middle { + vertical-align: middle !important; +} + +.bodywebsite .align-bottom { + vertical-align: bottom !important; +} + +.bodywebsite .align-text-bottom { + vertical-align: text-bottom !important; +} + +.bodywebsite .align-text-top { + vertical-align: text-top !important; +} + +.bodywebsite .float-start { + float: left !important; +} + +.bodywebsite .float-end { + float: right !important; +} + +.bodywebsite .float-none { + float: none !important; +} + +.bodywebsite .opacity-0 { + opacity: 0 !important; +} + +.bodywebsite .opacity-25 { + opacity: 0.25 !important; +} + +.bodywebsite .opacity-50 { + opacity: 0.5 !important; +} + +.bodywebsite .opacity-75 { + opacity: 0.75 !important; +} + +.bodywebsite .opacity-100 { + opacity: 1 !important; +} + +.bodywebsite .overflow-auto { + overflow: auto !important; +} + +.bodywebsite .overflow-hidden { + overflow: hidden !important; +} + +.bodywebsite .overflow-visible { + overflow: visible !important; +} + +.bodywebsite .overflow-scroll { + overflow: scroll !important; +} + +.bodywebsite .d-inline { + display: inline !important; +} + +.bodywebsite .d-inline-block { + display: inline-block !important; +} + +.bodywebsite .d-block { + display: block !important; +} + +.bodywebsite .d-grid { + display: grid !important; +} + +.bodywebsite .d-table { + display: table !important; +} + +.bodywebsite .d-table-row { + display: table-row !important; +} + +.bodywebsite .d-table-cell { + display: table-cell !important; +} + +.bodywebsite .d-flex { + display: flex !important; +} + +.bodywebsite .d-inline-flex { + display: inline-flex !important; +} + +.bodywebsite .d-none { + display: none !important; +} + +.bodywebsite .shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.bodywebsite .shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.bodywebsite .shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.bodywebsite .shadow-none { + box-shadow: none !important; +} + +.bodywebsite .position-static { + position: static !important; +} + +.bodywebsite .position-relative { + position: relative !important; +} + +.bodywebsite .position-absolute { + position: absolute !important; +} + +.bodywebsite .position-fixed { + position: fixed !important; +} + +.bodywebsite .position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} + +.bodywebsite .top-0 { + top: 0 !important; +} + +.bodywebsite .top-50 { + top: 50% !important; +} + +.bodywebsite .top-100 { + top: 100% !important; +} + +.bodywebsite .bottom-0 { + bottom: 0 !important; +} + +.bodywebsite .bottom-50 { + bottom: 50% !important; +} + +.bodywebsite .bottom-100 { + bottom: 100% !important; +} + +.bodywebsite .start-0 { + left: 0 !important; +} + +.bodywebsite .start-50 { + left: 50% !important; +} + +.bodywebsite .start-100 { + left: 100% !important; +} + +.bodywebsite .end-0 { + right: 0 !important; +} + +.bodywebsite .end-50 { + right: 50% !important; +} + +.bodywebsite .end-100 { + right: 100% !important; +} + +.bodywebsite .translate-middle { + transform: translate(-50%, -50%) !important; +} + +.bodywebsite .translate-middle-x { + transform: translateX(-50%) !important; +} + +.bodywebsite .translate-middle-y { + transform: translateY(-50%) !important; +} + +.bodywebsite .border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-0 { + border: 0 !important; +} + +.bodywebsite .border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-top-0 { + border-top: 0 !important; +} + +.bodywebsite .border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-end-0 { + border-right: 0 !important; +} + +.bodywebsite .border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-bottom-0 { + border-bottom: 0 !important; +} + +.bodywebsite .border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.bodywebsite .border-start-0 { + border-left: 0 !important; +} + +.bodywebsite .border-primary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-secondary { + --bs-border-opacity: 1; +} + +.bodywebsite .border-success { + --bs-border-opacity: 1; +} + +.bodywebsite .border-info { + --bs-border-opacity: 1; +} + +.bodywebsite .border-warning { + --bs-border-opacity: 1; +} + +.bodywebsite .border-danger { + --bs-border-opacity: 1; +} + +.bodywebsite .border-light { + --bs-border-opacity: 1; +} + +.bodywebsite .border-dark { + --bs-border-opacity: 1; +} + +.bodywebsite .border-white { + --bs-border-opacity: 1; +} + +.bodywebsite .border-1 { + --bs-border-width: 1px; +} + +.bodywebsite .border-2 { + --bs-border-width: 2px; +} + +.bodywebsite .border-3 { + --bs-border-width: 3px; +} + +.bodywebsite .border-4 { + --bs-border-width: 4px; +} + +.bodywebsite .border-5 { + --bs-border-width: 5px; +} + +.bodywebsite .border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.bodywebsite .border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.bodywebsite .border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.bodywebsite .border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.bodywebsite .border-opacity-100 { + --bs-border-opacity: 1; +} + +.bodywebsite .w-25 { + width: 25% !important; +} + +.bodywebsite .w-50 { + width: 50% !important; +} + +.bodywebsite .w-75 { + width: 75% !important; +} + +.bodywebsite .w-100 { + width: 100% !important; +} + +.bodywebsite .w-auto { + width: auto !important; +} + +.bodywebsite .mw-100 { + max-width: 100% !important; +} + +.bodywebsite .vw-100 { + width: 100vw !important; +} + +.bodywebsite .min-vw-100 { + min-width: 100vw !important; +} + +.bodywebsite .h-25 { + height: 25% !important; +} + +.bodywebsite .h-50 { + height: 50% !important; +} + +.bodywebsite .h-75 { + height: 75% !important; +} + +.bodywebsite .h-100 { + height: 100% !important; +} + +.bodywebsite .h-auto { + height: auto !important; +} + +.bodywebsite .mh-100 { + max-height: 100% !important; +} + +.bodywebsite .vh-100 { + height: 100vh !important; +} + +.bodywebsite .min-vh-100 { + min-height: 100vh !important; +} + +.bodywebsite .flex-fill { + flex: 1 1 auto !important; +} + +.bodywebsite .flex-row { + flex-direction: row !important; +} + +.bodywebsite .flex-column { + flex-direction: column !important; +} + +.bodywebsite .flex-row-reverse { + flex-direction: row-reverse !important; +} + +.bodywebsite .flex-column-reverse { + flex-direction: column-reverse !important; +} + +.bodywebsite .flex-grow-0 { + flex-grow: 0 !important; +} + +.bodywebsite .flex-grow-1 { + flex-grow: 1 !important; +} + +.bodywebsite .flex-shrink-0 { + flex-shrink: 0 !important; +} + +.bodywebsite .flex-shrink-1 { + flex-shrink: 1 !important; +} + +.bodywebsite .flex-wrap { + flex-wrap: wrap !important; +} + +.bodywebsite .flex-nowrap { + flex-wrap: nowrap !important; +} + +.bodywebsite .flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.bodywebsite .justify-content-start { + justify-content: flex-start !important; +} + +.bodywebsite .justify-content-end { + justify-content: flex-end !important; +} + +.bodywebsite .justify-content-center { + justify-content: center !important; +} + +.bodywebsite .justify-content-between { + justify-content: space-between !important; +} + +.bodywebsite .justify-content-around { + justify-content: space-around !important; +} + +.bodywebsite .justify-content-evenly { + justify-content: space-evenly !important; +} + +.bodywebsite .align-items-start { + align-items: flex-start !important; +} + +.bodywebsite .align-items-end { + align-items: flex-end !important; +} + +.bodywebsite .align-items-center { + align-items: center !important; +} + +.bodywebsite .align-items-baseline { + align-items: baseline !important; +} + +.bodywebsite .align-items-stretch { + align-items: stretch !important; +} + +.bodywebsite .align-content-start { + align-content: flex-start !important; +} + +.bodywebsite .align-content-end { + align-content: flex-end !important; +} + +.bodywebsite .align-content-center { + align-content: center !important; +} + +.bodywebsite .align-content-between { + align-content: space-between !important; +} + +.bodywebsite .align-content-around { + align-content: space-around !important; +} + +.bodywebsite .align-content-stretch { + align-content: stretch !important; +} + +.bodywebsite .align-self-auto { + align-self: auto !important; +} + +.bodywebsite .align-self-start { + align-self: flex-start !important; +} + +.bodywebsite .align-self-end { + align-self: flex-end !important; +} + +.bodywebsite .align-self-center { + align-self: center !important; +} + +.bodywebsite .align-self-baseline { + align-self: baseline !important; +} + +.bodywebsite .align-self-stretch { + align-self: stretch !important; +} + +.bodywebsite .order-first { + order: -1 !important; +} + +.bodywebsite .order-0 { + order: 0 !important; +} + +.bodywebsite .order-1 { + order: 1 !important; +} + +.bodywebsite .order-2 { + order: 2 !important; +} + +.bodywebsite .order-3 { + order: 3 !important; +} + +.bodywebsite .order-4 { + order: 4 !important; +} + +.bodywebsite .order-5 { + order: 5 !important; +} + +.bodywebsite .order-last { + order: 6 !important; +} + +.bodywebsite .m-0 { + margin: 0 !important; +} + +.bodywebsite .m-1 { + margin: 0.25rem !important; + padding-left: 0px !important; +} + +.bodywebsite .m-2 { + margin: 0.5rem !important; +} + +.bodywebsite .m-3 { + margin: 1rem !important; +} + +.bodywebsite .m-4 { + margin: 1.5rem !important; +} + +.bodywebsite .m-5 { + margin: 3rem !important; +} + +.bodywebsite .m-auto { + margin: auto !important; +} + +.bodywebsite .mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.bodywebsite .mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.bodywebsite .mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.bodywebsite .mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.bodywebsite .mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.bodywebsite .mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.bodywebsite .mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.bodywebsite .my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.bodywebsite .my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.bodywebsite .my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.bodywebsite .my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.bodywebsite .my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.bodywebsite .my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.bodywebsite .my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.bodywebsite .mt-0 { + margin-top: 0 !important; +} + +.bodywebsite .mt-1 { + margin-top: 0.25rem !important; +} + +.bodywebsite .mt-2 { + margin-top: 0.5rem !important; +} + +.bodywebsite .mt-3 { + margin-top: 1rem !important; +} + +.bodywebsite .mt-4 { + margin-top: 1.5rem !important; +} + +.bodywebsite .mt-5 { + margin-top: 3rem !important; +} + +.bodywebsite .mt-auto { + margin-top: auto !important; +} + +.bodywebsite .me-0 { + margin-right: 0 !important; +} + +.bodywebsite .me-1 { + margin-right: 0.25rem !important; +} + +.bodywebsite .me-2 { + margin-right: 0.5rem !important; +} + +.bodywebsite .me-3 { + margin-right: 1rem !important; +} + +.bodywebsite .me-4 { + margin-right: 1.5rem !important; +} + +.bodywebsite .me-5 { + margin-right: 3rem !important; +} + +.bodywebsite .me-auto { + margin-right: auto !important; +} + +.bodywebsite .mb-0 { + margin-bottom: 0 !important; +} + +.bodywebsite .mb-1 { + margin-bottom: 0.25rem !important; +} + +.bodywebsite .mb-2 { + margin-bottom: 0.5rem !important; +} + +.bodywebsite .mb-3 { + margin-bottom: 1rem !important; +} + +.bodywebsite .mb-4 { + margin-bottom: 1.5rem !important; +} + +.bodywebsite .mb-5 { + margin-bottom: 3rem !important; +} + +.bodywebsite .mb-auto { + margin-bottom: auto !important; +} + +.bodywebsite .ms-0 { + margin-left: 0 !important; +} + +.bodywebsite .ms-1 { + margin-left: 0.25rem !important; +} + +.bodywebsite .ms-2 { + margin-left: 0.5rem !important; +} + +.bodywebsite .ms-3 { + margin-left: 1rem !important; +} + +.bodywebsite .ms-4 { + margin-left: 1.5rem !important; +} + +.bodywebsite .ms-5 { + margin-left: 3rem !important; +} + +.bodywebsite .ms-auto { + margin-left: auto !important; +} + +.bodywebsite .p-0 { + padding: 0 !important; +} + +.bodywebsite .p-1 { + padding: 0.25rem !important; +} + +.bodywebsite .p-2 { + padding: 0.5rem !important; +} + +.bodywebsite .p-3 { + padding: 1rem !important; +} + +.bodywebsite .p-4 { + padding: 1.5rem !important; +} + +.bodywebsite .p-5 { + padding: 3rem !important; +} + +.bodywebsite .px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.bodywebsite .px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.bodywebsite .px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.bodywebsite .px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.bodywebsite .px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.bodywebsite .px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.bodywebsite .py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.bodywebsite .py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.bodywebsite .py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.bodywebsite .py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.bodywebsite .py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.bodywebsite .py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.bodywebsite .pt-0 { + padding-top: 0 !important; +} + +.bodywebsite .pt-1 { + padding-top: 0.25rem !important; +} + +.bodywebsite .pt-2 { + padding-top: 0.5rem !important; +} + +.bodywebsite .pt-3 { + padding-top: 1rem !important; +} + +.bodywebsite .pt-4 { + padding-top: 1.5rem !important; +} + +.bodywebsite .pt-5 { + padding-top: 3rem !important; +} + +.bodywebsite .pe-0 { + padding-right: 0 !important; +} + +.bodywebsite .pe-1 { + padding-right: 0.25rem !important; +} + +.bodywebsite .pe-2 { + padding-right: 0.5rem !important; +} + +.bodywebsite .pe-3 { + padding-right: 1rem !important; +} + +.bodywebsite .pe-4 { + padding-right: 1.5rem !important; +} + +.bodywebsite .pe-5 { + padding-right: 3rem !important; +} + +.bodywebsite .pb-0 { + padding-bottom: 0 !important; +} + +.bodywebsite .pb-1 { + padding-bottom: 0.25rem !important; +} + +.bodywebsite .pb-2 { + padding-bottom: 0.5rem !important; +} + +.bodywebsite .pb-3 { + padding-bottom: 1rem !important; +} + +.bodywebsite .pb-4 { + padding-bottom: 1.5rem !important; +} + +.bodywebsite .pb-5 { + padding-bottom: 3rem !important; +} + +.bodywebsite .ps-0 { + padding-left: 0 !important; +} + +.bodywebsite .ps-1 { + padding-left: 0.25rem !important; +} + +.bodywebsite .ps-2 { + padding-left: 0.5rem !important; +} + +.bodywebsite .ps-3 { + padding-left: 1rem !important; +} + +.bodywebsite .ps-4 { + padding-left: 1.5rem !important; +} + +.bodywebsite .ps-5 { + padding-left: 3rem !important; +} + +.bodywebsite .gap-0 { + gap: 0 !important; +} + +.bodywebsite .gap-1 { + gap: 0.25rem !important; +} + +.bodywebsite .gap-2 { + gap: 0.5rem !important; +} + +.bodywebsite .gap-3 { + gap: 1rem !important; +} + +.bodywebsite .gap-4 { + gap: 1.5rem !important; +} + +.bodywebsite .gap-5 { + gap: 3rem !important; +} + +.bodywebsite .font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.bodywebsite .fs-1 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.bodywebsite .fs-2 { + font-size: calc(1.325rem + 0.9vw) !important; +} + +.bodywebsite .fs-3 { + font-size: calc(1.3rem + 0.6vw) !important; +} + +.bodywebsite .fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.bodywebsite .fs-5 { + font-size: 1.25rem !important; +} + +.bodywebsite .fs-6 { + font-size: 1rem !important; +} + +.bodywebsite .fst-italic { + font-style: italic !important; +} + +.bodywebsite .fst-normal { + font-style: normal !important; +} + +.bodywebsite .fw-light { + font-weight: 300 !important; +} + +.bodywebsite .fw-lighter { + font-weight: lighter !important; +} + +.bodywebsite .fw-normal { + font-weight: 400 !important; +} + +.bodywebsite .fw-bold { + font-weight: 700 !important; +} + +.bodywebsite .fw-semibold { + font-weight: 600 !important; +} + +.bodywebsite .fw-bolder { + font-weight: bolder !important; +} + +.bodywebsite .lh-1 { + line-height: 1 !important; +} + +.bodywebsite .lh-sm { + line-height: 1.25 !important; +} + +.bodywebsite .lh-base { + line-height: 1.5 !important; +} + +.bodywebsite .lh-lg { + line-height: 2 !important; +} + +.bodywebsite .text-start { + text-align: left !important; +} + +.bodywebsite .text-end { + text-align: right !important; +} + +.bodywebsite .text-center { + text-align: center !important; +} + +.bodywebsite .text-decoration-none { + text-decoration: none !important; +} + +.bodywebsite .text-decoration-underline { + text-decoration: underline !important; +} + +.bodywebsite .text-decoration-line-through { + text-decoration: line-through !important; +} + +.bodywebsite .text-lowercase { + text-transform: lowercase !important; +} + +.bodywebsite .text-uppercase { + text-transform: uppercase !important; +} + +.bodywebsite .text-capitalize { + text-transform: capitalize !important; +} + +.bodywebsite .text-wrap { + white-space: normal !important; +} + +.bodywebsite .text-nowrap { + white-space: nowrap !important; +} + +.bodywebsite .text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +.bodywebsite .text-primary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-secondary { + --bs-text-opacity: 1; +} + +.bodywebsite .text-success { + --bs-text-opacity: 1; +} + +.bodywebsite .text-info { + --bs-text-opacity: 1; +} + +.bodywebsite .text-warning { + --bs-text-opacity: 1; +} + +.bodywebsite .text-danger { + --bs-text-opacity: 1; +} + +.bodywebsite .text-light { + --bs-text-opacity: 1; +} + +.bodywebsite .text-dark { + --bs-text-opacity: 1; +} + +.bodywebsite .text-black { + --bs-text-opacity: 1; +} + +.bodywebsite .text-white { + --bs-text-opacity: 1; + color: var(--text-white); +} + +.bodywebsite .text-body { + --bs-text-opacity: 1; +} + +.bodywebsite .text-muted { + --bs-text-opacity: 1; + color: #6c757d !important; +} + +.bodywebsite .text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.bodywebsite .text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.bodywebsite .text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.bodywebsite .text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.bodywebsite .text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.bodywebsite .text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.bodywebsite .text-opacity-100 { + --bs-text-opacity: 1; +} + +.bodywebsite .bg-primary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-secondary { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-success { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-info { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-warning { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-danger { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-light { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-dark { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-black { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-white { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-body { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-transparent { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bodywebsite .bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bodywebsite .bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bodywebsite .bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bodywebsite .bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bodywebsite .bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.bodywebsite .user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} + +.bodywebsite .user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + user-select: auto !important; +} + +.bodywebsite .user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + user-select: none !important; +} + +.bodywebsite .pe-none { + pointer-events: none !important; +} + +.bodywebsite .pe-auto { + pointer-events: auto !important; +} + +.bodywebsite .rounded { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-0 { + border-radius: 0 !important; +} + +.bodywebsite .rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.bodywebsite .rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.bodywebsite .rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.bodywebsite .rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} + +.bodywebsite .rounded-circle { + border-radius: 50% !important; +} + +.bodywebsite .rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.bodywebsite .rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.bodywebsite .visible { + visibility: visible !important; +} + +.bodywebsite .invisible { + visibility: hidden !important; +} + +@media (min-width: 576px) { + .bodywebsite .float-sm-start { + float: left !important; + } + + .bodywebsite .float-sm-end { + float: right !important; + } + + .bodywebsite .float-sm-none { + float: none !important; + } + + .bodywebsite .d-sm-inline { + display: inline !important; + } + + .bodywebsite .d-sm-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-sm-block { + display: block !important; + } + + .bodywebsite .d-sm-grid { + display: grid !important; + } + + .bodywebsite .d-sm-table { + display: table !important; + } + + .bodywebsite .d-sm-table-row { + display: table-row !important; + } + + .bodywebsite .d-sm-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-sm-flex { + display: flex !important; + } + + .bodywebsite .d-sm-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-sm-none { + display: none !important; + } + + .bodywebsite .flex-sm-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-sm-row { + flex-direction: row !important; + } + + .bodywebsite .flex-sm-column { + flex-direction: column !important; + } + + .bodywebsite .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-sm-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-sm-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-sm-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-sm-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-sm-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-sm-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-sm-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-sm-center { + align-items: center !important; + } + + .bodywebsite .align-items-sm-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-sm-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-sm-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-sm-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-sm-center { + align-content: center !important; + } + + .bodywebsite .align-content-sm-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-sm-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-sm-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-sm-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-sm-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-sm-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-sm-center { + align-self: center !important; + } + + .bodywebsite .align-self-sm-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-sm-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-sm-first { + order: -1 !important; + } + + .bodywebsite .order-sm-0 { + order: 0 !important; + } + + .bodywebsite .order-sm-1 { + order: 1 !important; + } + + .bodywebsite .order-sm-2 { + order: 2 !important; + } + + .bodywebsite .order-sm-3 { + order: 3 !important; + } + + .bodywebsite .order-sm-4 { + order: 4 !important; + } + + .bodywebsite .order-sm-5 { + order: 5 !important; + } + + .bodywebsite .order-sm-last { + order: 6 !important; + } + + .bodywebsite .m-sm-0 { + margin: 0 !important; + } + + .bodywebsite .m-sm-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-sm-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-sm-3 { + margin: 1rem !important; + } + + .bodywebsite .m-sm-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-sm-5 { + margin: 3rem !important; + } + + .bodywebsite .m-sm-auto { + margin: auto !important; + } + + .bodywebsite .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-sm-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-sm-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-sm-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-sm-auto { + margin-top: auto !important; + } + + .bodywebsite .me-sm-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-sm-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-sm-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-sm-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-sm-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-sm-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-sm-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-sm-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-sm-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-sm-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-sm-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-sm-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-sm-auto { + margin-left: auto !important; + } + + .bodywebsite .p-sm-0 { + padding: 0 !important; + } + + .bodywebsite .p-sm-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-sm-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-sm-3 { + padding: 1rem !important; + } + + .bodywebsite .p-sm-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-sm-5 { + padding: 3rem !important; + } + + .bodywebsite .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-sm-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-sm-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-sm-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-sm-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-sm-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-sm-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-sm-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-sm-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-sm-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-sm-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-sm-0 { + gap: 0 !important; + } + + .bodywebsite .gap-sm-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-sm-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-sm-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-sm-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-sm-5 { + gap: 3rem !important; + } + + .bodywebsite .text-sm-start { + text-align: left !important; + } + + .bodywebsite .text-sm-end { + text-align: right !important; + } + + .bodywebsite .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .bodywebsite .float-md-start { + float: left !important; + } + + .bodywebsite .float-md-end { + float: right !important; + } + + .bodywebsite .float-md-none { + float: none !important; + } + + .bodywebsite .d-md-inline { + display: inline !important; + } + + .bodywebsite .d-md-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-md-block { + display: block !important; + } + + .bodywebsite .d-md-grid { + display: grid !important; + } + + .bodywebsite .d-md-table { + display: table !important; + } + + .bodywebsite .d-md-table-row { + display: table-row !important; + } + + .bodywebsite .d-md-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-md-flex { + display: flex !important; + } + + .bodywebsite .d-md-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-md-none { + display: none !important; + } + + .bodywebsite .flex-md-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-md-row { + flex-direction: row !important; + } + + .bodywebsite .flex-md-column { + flex-direction: column !important; + } + + .bodywebsite .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-md-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-md-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-md-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-md-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-md-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-md-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-md-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-md-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-md-center { + align-items: center !important; + } + + .bodywebsite .align-items-md-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-md-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-md-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-md-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-md-center { + align-content: center !important; + } + + .bodywebsite .align-content-md-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-md-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-md-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-md-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-md-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-md-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-md-center { + align-self: center !important; + } + + .bodywebsite .align-self-md-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-md-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-md-first { + order: -1 !important; + } + + .bodywebsite .order-md-0 { + order: 0 !important; + } + + .bodywebsite .order-md-1 { + order: 1 !important; + } + + .bodywebsite .order-md-2 { + order: 2 !important; + } + + .bodywebsite .order-md-3 { + order: 3 !important; + } + + .bodywebsite .order-md-4 { + order: 4 !important; + } + + .bodywebsite .order-md-5 { + order: 5 !important; + } + + .bodywebsite .order-md-last { + order: 6 !important; + } + + .bodywebsite .m-md-0 { + margin: 0 !important; + } + + .bodywebsite .m-md-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-md-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-md-3 { + margin: 1rem !important; + } + + .bodywebsite .m-md-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-md-5 { + margin: 3rem !important; + } + + .bodywebsite .m-md-auto { + margin: auto !important; + } + + .bodywebsite .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-md-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-md-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-md-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-md-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-md-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-md-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-md-auto { + margin-top: auto !important; + } + + .bodywebsite .me-md-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-md-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-md-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-md-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-md-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-md-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-md-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-md-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-md-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-md-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-md-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-md-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-md-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-md-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-md-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-md-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-md-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-md-auto { + margin-left: auto !important; + } + + .bodywebsite .p-md-0 { + padding: 0 !important; + } + + .bodywebsite .p-md-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-md-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-md-3 { + padding: 1rem !important; + } + + .bodywebsite .p-md-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-md-5 { + padding: 3rem !important; + } + + .bodywebsite .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-md-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-md-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-md-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-md-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-md-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-md-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-md-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-md-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-md-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-md-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-md-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-md-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-md-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-md-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-md-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-md-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-md-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-md-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-md-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-md-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-md-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-md-0 { + gap: 0 !important; + } + + .bodywebsite .gap-md-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-md-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-md-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-md-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-md-5 { + gap: 3rem !important; + } + + .bodywebsite .text-md-start { + text-align: left !important; + } + + .bodywebsite .text-md-end { + text-align: right !important; + } + + .bodywebsite .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .bodywebsite .float-lg-start { + float: left !important; + } + + .bodywebsite .float-lg-end { + float: right !important; + } + + .bodywebsite .float-lg-none { + float: none !important; + } + + .bodywebsite .d-lg-inline { + display: inline !important; + } + + .bodywebsite .d-lg-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-lg-block { + display: block !important; + } + + .bodywebsite .d-lg-grid { + display: grid !important; + } + + .bodywebsite .d-lg-table { + display: table !important; + } + + .bodywebsite .d-lg-table-row { + display: table-row !important; + } + + .bodywebsite .d-lg-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-lg-flex { + display: flex !important; + } + + .bodywebsite .d-lg-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-lg-none { + display: none !important; + } + + .bodywebsite .flex-lg-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-lg-row { + flex-direction: row !important; + } + + .bodywebsite .flex-lg-column { + flex-direction: column !important; + } + + .bodywebsite .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-lg-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-lg-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-lg-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-lg-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-lg-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-lg-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-lg-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-lg-center { + align-items: center !important; + } + + .bodywebsite .align-items-lg-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-lg-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-lg-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-lg-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-lg-center { + align-content: center !important; + } + + .bodywebsite .align-content-lg-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-lg-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-lg-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-lg-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-lg-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-lg-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-lg-center { + align-self: center !important; + } + + .bodywebsite .align-self-lg-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-lg-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-lg-first { + order: -1 !important; + } + + .bodywebsite .order-lg-0 { + order: 0 !important; + } + + .bodywebsite .order-lg-1 { + order: 1 !important; + } + + .bodywebsite .order-lg-2 { + order: 2 !important; + } + + .bodywebsite .order-lg-3 { + order: 3 !important; + } + + .bodywebsite .order-lg-4 { + order: 4 !important; + } + + .bodywebsite .order-lg-5 { + order: 5 !important; + } + + .bodywebsite .order-lg-last { + order: 6 !important; + } + + .bodywebsite .m-lg-0 { + margin: 0 !important; + } + + .bodywebsite .m-lg-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-lg-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-lg-3 { + margin: 1rem !important; + } + + .bodywebsite .m-lg-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-lg-5 { + margin: 3rem !important; + } + + .bodywebsite .m-lg-auto { + margin: auto !important; + } + + .bodywebsite .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-lg-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-lg-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-lg-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-lg-auto { + margin-top: auto !important; + } + + .bodywebsite .me-lg-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-lg-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-lg-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-lg-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-lg-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-lg-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-lg-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-lg-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-lg-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-lg-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-lg-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-lg-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-lg-auto { + margin-left: auto !important; + } + + .bodywebsite .p-lg-0 { + padding: 0 !important; + } + + .bodywebsite .p-lg-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-lg-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-lg-3 { + padding: 1rem !important; + } + + .bodywebsite .p-lg-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-lg-5 { + padding: 3rem !important; + } + + .bodywebsite .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-lg-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-lg-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-lg-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-lg-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-lg-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-lg-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-lg-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-lg-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-lg-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-lg-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-lg-0 { + gap: 0 !important; + } + + .bodywebsite .gap-lg-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-lg-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-lg-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-lg-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-lg-5 { + gap: 3rem !important; + } + + .bodywebsite .text-lg-start { + text-align: left !important; + } + + .bodywebsite .text-lg-end { + text-align: right !important; + } + + .bodywebsite .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .float-xl-start { + float: left !important; + } + + .bodywebsite .float-xl-end { + float: right !important; + } + + .bodywebsite .float-xl-none { + float: none !important; + } + + .bodywebsite .d-xl-inline { + display: inline !important; + } + + .bodywebsite .d-xl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xl-block { + display: block !important; + } + + .bodywebsite .d-xl-grid { + display: grid !important; + } + + .bodywebsite .d-xl-table { + display: table !important; + } + + .bodywebsite .d-xl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xl-flex { + display: flex !important; + } + + .bodywebsite .d-xl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xl-none { + display: none !important; + } + + .bodywebsite .flex-xl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xl-first { + order: -1 !important; + } + + .bodywebsite .order-xl-0 { + order: 0 !important; + } + + .bodywebsite .order-xl-1 { + order: 1 !important; + } + + .bodywebsite .order-xl-2 { + order: 2 !important; + } + + .bodywebsite .order-xl-3 { + order: 3 !important; + } + + .bodywebsite .order-xl-4 { + order: 4 !important; + } + + .bodywebsite .order-xl-5 { + order: 5 !important; + } + + .bodywebsite .order-xl-last { + order: 6 !important; + } + + .bodywebsite .m-xl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xl-start { + text-align: left !important; + } + + .bodywebsite .text-xl-end { + text-align: right !important; + } + + .bodywebsite .text-xl-center { + text-align: center !important; + } +} + +@media (min-width: 1400px) { + .bodywebsite .float-xxl-start { + float: left !important; + } + + .bodywebsite .float-xxl-end { + float: right !important; + } + + .bodywebsite .float-xxl-none { + float: none !important; + } + + .bodywebsite .d-xxl-inline { + display: inline !important; + } + + .bodywebsite .d-xxl-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-xxl-block { + display: block !important; + } + + .bodywebsite .d-xxl-grid { + display: grid !important; + } + + .bodywebsite .d-xxl-table { + display: table !important; + } + + .bodywebsite .d-xxl-table-row { + display: table-row !important; + } + + .bodywebsite .d-xxl-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-xxl-flex { + display: flex !important; + } + + .bodywebsite .d-xxl-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-xxl-none { + display: none !important; + } + + .bodywebsite .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .bodywebsite .flex-xxl-row { + flex-direction: row !important; + } + + .bodywebsite .flex-xxl-column { + flex-direction: column !important; + } + + .bodywebsite .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .bodywebsite .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .bodywebsite .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .bodywebsite .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .bodywebsite .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .bodywebsite .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .bodywebsite .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .bodywebsite .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .bodywebsite .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .bodywebsite .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .bodywebsite .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .bodywebsite .justify-content-xxl-center { + justify-content: center !important; + } + + .bodywebsite .justify-content-xxl-between { + justify-content: space-between !important; + } + + .bodywebsite .justify-content-xxl-around { + justify-content: space-around !important; + } + + .bodywebsite .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .bodywebsite .align-items-xxl-start { + align-items: flex-start !important; + } + + .bodywebsite .align-items-xxl-end { + align-items: flex-end !important; + } + + .bodywebsite .align-items-xxl-center { + align-items: center !important; + } + + .bodywebsite .align-items-xxl-baseline { + align-items: baseline !important; + } + + .bodywebsite .align-items-xxl-stretch { + align-items: stretch !important; + } + + .bodywebsite .align-content-xxl-start { + align-content: flex-start !important; + } + + .bodywebsite .align-content-xxl-end { + align-content: flex-end !important; + } + + .bodywebsite .align-content-xxl-center { + align-content: center !important; + } + + .bodywebsite .align-content-xxl-between { + align-content: space-between !important; + } + + .bodywebsite .align-content-xxl-around { + align-content: space-around !important; + } + + .bodywebsite .align-content-xxl-stretch { + align-content: stretch !important; + } + + .bodywebsite .align-self-xxl-auto { + align-self: auto !important; + } + + .bodywebsite .align-self-xxl-start { + align-self: flex-start !important; + } + + .bodywebsite .align-self-xxl-end { + align-self: flex-end !important; + } + + .bodywebsite .align-self-xxl-center { + align-self: center !important; + } + + .bodywebsite .align-self-xxl-baseline { + align-self: baseline !important; + } + + .bodywebsite .align-self-xxl-stretch { + align-self: stretch !important; + } + + .bodywebsite .order-xxl-first { + order: -1 !important; + } + + .bodywebsite .order-xxl-0 { + order: 0 !important; + } + + .bodywebsite .order-xxl-1 { + order: 1 !important; + } + + .bodywebsite .order-xxl-2 { + order: 2 !important; + } + + .bodywebsite .order-xxl-3 { + order: 3 !important; + } + + .bodywebsite .order-xxl-4 { + order: 4 !important; + } + + .bodywebsite .order-xxl-5 { + order: 5 !important; + } + + .bodywebsite .order-xxl-last { + order: 6 !important; + } + + .bodywebsite .m-xxl-0 { + margin: 0 !important; + } + + .bodywebsite .m-xxl-1 { + margin: 0.25rem !important; + } + + .bodywebsite .m-xxl-2 { + margin: 0.5rem !important; + } + + .bodywebsite .m-xxl-3 { + margin: 1rem !important; + } + + .bodywebsite .m-xxl-4 { + margin: 1.5rem !important; + } + + .bodywebsite .m-xxl-5 { + margin: 3rem !important; + } + + .bodywebsite .m-xxl-auto { + margin: auto !important; + } + + .bodywebsite .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .bodywebsite .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .bodywebsite .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .bodywebsite .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .bodywebsite .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .bodywebsite .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .bodywebsite .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .bodywebsite .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .bodywebsite .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .bodywebsite .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .bodywebsite .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .bodywebsite .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .bodywebsite .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .bodywebsite .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .bodywebsite .mt-xxl-0 { + margin-top: 0 !important; + } + + .bodywebsite .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .bodywebsite .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .bodywebsite .mt-xxl-3 { + margin-top: 1rem !important; + } + + .bodywebsite .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .bodywebsite .mt-xxl-5 { + margin-top: 3rem !important; + } + + .bodywebsite .mt-xxl-auto { + margin-top: auto !important; + } + + .bodywebsite .me-xxl-0 { + margin-right: 0 !important; + } + + .bodywebsite .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .bodywebsite .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .bodywebsite .me-xxl-3 { + margin-right: 1rem !important; + } + + .bodywebsite .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .bodywebsite .me-xxl-5 { + margin-right: 3rem !important; + } + + .bodywebsite .me-xxl-auto { + margin-right: auto !important; + } + + .bodywebsite .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .bodywebsite .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .bodywebsite .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .bodywebsite .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .bodywebsite .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .bodywebsite .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .bodywebsite .mb-xxl-auto { + margin-bottom: auto !important; + } + + .bodywebsite .ms-xxl-0 { + margin-left: 0 !important; + } + + .bodywebsite .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .bodywebsite .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .bodywebsite .ms-xxl-3 { + margin-left: 1rem !important; + } + + .bodywebsite .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .bodywebsite .ms-xxl-5 { + margin-left: 3rem !important; + } + + .bodywebsite .ms-xxl-auto { + margin-left: auto !important; + } + + .bodywebsite .p-xxl-0 { + padding: 0 !important; + } + + .bodywebsite .p-xxl-1 { + padding: 0.25rem !important; + } + + .bodywebsite .p-xxl-2 { + padding: 0.5rem !important; + } + + .bodywebsite .p-xxl-3 { + padding: 1rem !important; + } + + .bodywebsite .p-xxl-4 { + padding: 1.5rem !important; + } + + .bodywebsite .p-xxl-5 { + padding: 3rem !important; + } + + .bodywebsite .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .bodywebsite .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .bodywebsite .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .bodywebsite .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .bodywebsite .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .bodywebsite .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .bodywebsite .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .bodywebsite .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .bodywebsite .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .bodywebsite .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .bodywebsite .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .bodywebsite .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .bodywebsite .pt-xxl-0 { + padding-top: 0 !important; + } + + .bodywebsite .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .bodywebsite .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .bodywebsite .pt-xxl-3 { + padding-top: 1rem !important; + } + + .bodywebsite .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .bodywebsite .pt-xxl-5 { + padding-top: 3rem !important; + } + + .bodywebsite .pe-xxl-0 { + padding-right: 0 !important; + } + + .bodywebsite .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .bodywebsite .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .bodywebsite .pe-xxl-3 { + padding-right: 1rem !important; + } + + .bodywebsite .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .bodywebsite .pe-xxl-5 { + padding-right: 3rem !important; + } + + .bodywebsite .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .bodywebsite .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .bodywebsite .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .bodywebsite .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .bodywebsite .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .bodywebsite .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .bodywebsite .ps-xxl-0 { + padding-left: 0 !important; + } + + .bodywebsite .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .bodywebsite .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .bodywebsite .ps-xxl-3 { + padding-left: 1rem !important; + } + + .bodywebsite .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .bodywebsite .ps-xxl-5 { + padding-left: 3rem !important; + } + + .bodywebsite .gap-xxl-0 { + gap: 0 !important; + } + + .bodywebsite .gap-xxl-1 { + gap: 0.25rem !important; + } + + .bodywebsite .gap-xxl-2 { + gap: 0.5rem !important; + } + + .bodywebsite .gap-xxl-3 { + gap: 1rem !important; + } + + .bodywebsite .gap-xxl-4 { + gap: 1.5rem !important; + } + + .bodywebsite .gap-xxl-5 { + gap: 3rem !important; + } + + .bodywebsite .text-xxl-start { + text-align: left !important; + } + + .bodywebsite .text-xxl-end { + text-align: right !important; + } + + .bodywebsite .text-xxl-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .bodywebsite .fs-1 { + font-size: 2.5rem !important; + } + + .bodywebsite .fs-2 { + font-size: 2rem !important; + } + + .bodywebsite .fs-3 { + font-size: 1.75rem !important; + } + + .bodywebsite .fs-4 { + font-size: 1.5rem !important; + } +} + +@media print { + .bodywebsite .d-print-inline { + display: inline !important; + } + + .bodywebsite .d-print-inline-block { + display: inline-block !important; + } + + .bodywebsite .d-print-block { + display: block !important; + } + + .bodywebsite .d-print-grid { + display: grid !important; + } + + .bodywebsite .d-print-table { + display: table !important; + } + + .bodywebsite .d-print-table-row { + display: table-row !important; + } + + .bodywebsite .d-print-table-cell { + display: table-cell !important; + } + + .bodywebsite .d-print-flex { + display: flex !important; + } + + .bodywebsite .d-print-inline-flex { + display: inline-flex !important; + } + + .bodywebsite .d-print-none { + display: none !important; + } +} + + +body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; } +.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;} + + +:root { + --text-white: #f0f0f0; + --white-color: #ffffff; + --primary-color: #d9534f; + --secondary-color: #f3af24; + --section-bg-color: #f9f9f9; + --dark-color: #000000; + --title-color: #565758; + --news-title-color: #292828; + --p-color: #717275; + --border-color: #eaeaea; + --border-radius-default: 0.25rem; + + --body-font-family: "Montserrat", sans-serif; + + --h1-font-size: 76px; + --h2-font-size: 56px; + --h3-font-size: 42px; + --h4-font-size: 28px; + --h5-font-size: 26px; + --h6-font-size: 22px; + + --p-font-size: 18px; + --menu-font-size: 18px; + --category-font-size: 14px; + + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-semibold: 600; + --font-weight-bold: 700; +} + +.bodywebsite body { + background: var(--white-color); + font-family: var(--body-font-family); + position: relative; +} + +/*--------------------------------------- + TYPOGRAPHY +-----------------------------------------*/ + +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + color: var(--dark-color); + line-height: inherit; +} + +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + font-weight: var(--font-weight-semibold); +} + +.bodywebsite h1, +.bodywebsite h2 { + font-weight: var(--font-weight-bold); +} + +.bodywebsite h1 { + font-size: var(--h1-font-size); + line-height: normal; +} + +.bodywebsite h2 { + font-size: var(--h2-font-size); +} + +.bodywebsite h3 { + font-size: var(--h3-font-size); +} + +.bodywebsite h4 { + font-size: var(--h4-font-size); +} + +.bodywebsite h5 { + font-size: var(--h5-font-size); +} + +.bodywebsite h6 { + font-size: var(--h6-font-size); +} + +.bodywebsite p, +.bodywebsite .list .list-item { + color: var(--p-color); + font-size: var(--p-font-size); + font-weight: var(--font-weight-light); +} + +.bodywebsite a, +.bodywebsite button { + touch-action: manipulation; + transition: all 0.3s; +} + +.bodywebsite .form-label { + color: var(--p-color); + font-weight: var(--font-weight-semibold); +} + +.bodywebsite a { + color: var(--secondary-color); + text-decoration: none; +} + +.bodywebsite a:hover { + color: var(--primary-color); +} + +.bodywebsite ::selection { + background: var(--primary-color); + color: var(--white-color); +} + +.bodywebsite ::-moz-selection { + background: var(--primary-color); + color: var(--white-color); +} + +.bodywebsite .section-padding { + padding-top: 6rem; + padding-bottom: 6rem; +} + +.bodywebsite b, +.bodywebsite strong { + font-weight: var(--font-weight-bold); +} + +/*--------------------------------------- + CUSTOM BUTTON +-----------------------------------------*/ +.bodywebsite .custom-btn { + border: 0; + color: var(--white-color); + font-size: var(--menu-font-size); + padding: 10px 35px; +} + +/*--------------------------------------- + NAVIGATION +-----------------------------------------*/ +.bodywebsite .navbar { + background: var(--white-color); + padding-top: 20px; + padding-bottom: 20px; +} + +.bodywebsite .navbar-brand { + color: var(--dark-color); + font-size: var(--h5-font-size); + font-weight: var(--font-weight-bold); + margin-right: 0; +} + +.bodywebsite .navbar-expand-lg .navbar-nav .nav-link { + padding-right: 1.5rem; + padding-left: 1.5rem; +} + +.bodywebsite .navbar-expand-lg .nav-link { + color: var(--p-color); + font-weight: var(--font-weight-normal); + font-size: var(--menu-font-size); + padding-top: 15px; + padding-bottom: 15px; +} + +.bodywebsite .navbar-nav .nav-link.active, +.bodywebsite .nav-link:focus, +.bodywebsite .nav-link:hover { + color: var(--primary-color); +} + +.bodywebsite .nav-link:focus { + color: var(--p-color); +} + +.bodywebsite .navbar-toggler { + border: 0; + padding: 0; + cursor: pointer; + margin: 0; + width: 30px; + height: 35px; + outline: none; +} + +.bodywebsite .navbar-toggler:focus { + outline: none; + box-shadow: none; +} + +.bodywebsite .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon { + background: transparent; +} + +.bodywebsite .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:before, +.bodywebsite .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:after { + transition: top 300ms 50ms ease, -webkit-transform 300ms 350ms ease; + transition: top 300ms 50ms ease, transform 300ms 350ms ease; + transition: top 300ms 50ms ease, transform 300ms 350ms ease, + -webkit-transform 300ms 350ms ease; + top: 0; +} + +.bodywebsite .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:before { + transform: rotate(45deg); +} + +.bodywebsite .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon:after { + transform: rotate(-45deg); +} + +.bodywebsite .navbar-toggler .navbar-toggler-icon { + background: var(--dark-color); + transition: background 10ms 300ms ease; + display: block; + width: 30px; + height: 2px; + position: relative; +} + +.bodywebsite .navbar-toggler .navbar-toggler-icon:before, +.bodywebsite .navbar-toggler .navbar-toggler-icon:after { + transition: top 300ms 350ms ease, -webkit-transform 300ms 50ms ease; + transition: top 300ms 350ms ease, transform 300ms 50ms ease; + transition: top 300ms 350ms ease, transform 300ms 50ms ease, + -webkit-transform 300ms 50ms ease; + position: absolute; + right: 0; + left: 0; + background: var(--dark-color); + width: 30px; + height: 2px; + content: ""; +} + +.bodywebsite .navbar-toggler .navbar-toggler-icon:before { + top: -8px; +} + +.bodywebsite .navbar-toggler .navbar-toggler-icon:after { + top: 8px; +} + +/*--------------------------------------- + SITE HEADER +-----------------------------------------*/ +.bodywebsite .site-header { + background-repeat: no-repeat; + background-position: center; + background-size: cover; + padding-top: 10rem; + padding-bottom: 10rem; + text-align: center; + position: relative; +} + +.bodywebsite .site-header .container { + position: relative; + z-index: 2; +} + +.bodywebsite .site-news-detail-header { + background: transparent; + text-align: left; + padding-top: 6rem; + padding-bottom: 6rem; +} + +.bodywebsite .site-about-header { + background-image: url("/viewimage.php?modulepart=medias&file=image/__WEBSITE_KEY__/header/briana-tozour-V_Nkf1E-vYA-unsplash.jpg"); +} + +.bodywebsite .site-menu-header { + background-image: url("/viewimage.php?modulepart=medias&file=image/__WEBSITE_KEY__/header/luisa-brimble-aFzg83dvnAI-unsplash.jpg"); +} + +.bodywebsite .site-news-header { + background-image: url("/viewimage.php?modulepart=medias&file=image/__WEBSITE_KEY__/header/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg"); +} + +.bodywebsite .site-contact-header { + background-image: url("/viewimage.php?modulepart=medias&file=image/__WEBSITE_KEY__/header/rod-long-I79Pgmhmy5M-unsplash.jpg"); +} + +.bodywebsite .overlay { + background: linear-gradient(to top, var(--dark-color), transparent 100%); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +/*--------------------------------------- + HERO +-----------------------------------------*/ +.bodywebsite .hero { + position: relative; + overflow: hidden; + padding-top: 20.542rem; + padding-bottom: 20.542rem; +} + +.bodywebsite .hero .container { + position: absolute; + z-index: 9; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; +} + +.bodywebsite .video-wrap { + z-index: -100; +} + +.bodywebsite .custom-video { + position: absolute; + top: 0; + left: 0; + object-fit: cover; + width: 100%; + height: 100%; +} + +/*--------------------------------------- + HERO SLIDE +-----------------------------------------*/ +.bodywebsite .carousel-image { + width: 100%; + height: 100%; + object-fit: cover; +} + +.bodywebsite .carousel-thumb { + position: relative; +} + +.bodywebsite .carousel-caption { + background: linear-gradient(to top, var(--dark-color), transparent 90%); + text-align: left; + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 60px 40px; +} + +.bodywebsite .hero-carousel .reviews-text, +.bodywebsite .hero-text { + color: var(--white-color); +} + +.bodywebsite .price-tag { + background: var(--white-color); + border-radius: 100px; + color: var(--secondary-color); + font-size: var(--menu-font-size); + font-weight: var(--font-weight-semibold); + display: inline-block; + width: 84px; + height: 64px; + line-height: 64px; + text-align: center; +} + +.bodywebsite .hero-carousel .carousel-control-prev, +.bodywebsite .hero-carousel .carousel-control-next { + position: absolute; + top: auto; + bottom: 0; + opacity: 1; +} + +.bodywebsite .hero-carousel .carousel-control-prev, +.bodywebsite .hero-carousel .carousel-control-next { + background: var(--secondary-color); + width: 60px; + height: 60px; + text-align: center; +} + +.bodywebsite .hero-carousel .carousel-control-prev { + left: auto; + right: 60px; +} + +.bodywebsite .hero-carousel .carousel-control-next { + background: var(--primary-color); + right: 0; +} + +.bodywebsite .hero-carousel .carousel-control-prev:hover, +.bodywebsite .hero-carousel .carousel-control-next:hover { + background: var(--dark-color); +} + +.bodywebsite .hero-carousel .carousel-control-prev-icon, +.bodywebsite .hero-carousel .carousel-control-next-icon { + background-image: none; + width: inherit; + height: inherit; + line-height: 60px; +} + +.bodywebsite .hero-carousel .carousel-control-prev-icon::before, +.bodywebsite .hero-carousel .carousel-control-next-icon::before { + font-family: bootstrap-icons; + display: block; + margin: auto; + font-size: var(--h5-font-size); + color: var(--white-color); +} + +.bodywebsite .hero-carousel .carousel-control-prev-icon::before { + content: "\f13f"; +} + +.bodywebsite .hero-carousel .carousel-control-next-icon::before { + content: "\f144"; +} + +.bodywebsite .reviews-icon { + color: var(--secondary-color); +} + +/*--------------------------------------- + MENU +-----------------------------------------*/ +.bodywebsite .menu, +.bodywebsite .about, +.bodywebsite .related-news, +.bodywebsite .newsletter, +.bodywebsite .comments { + background: var(--section-bg-color); +} + +.bodywebsite .menu-thumb { + position: relative; + overflow: hidden; +} + +.bodywebsite .menu-info { + padding: 20px 20px 30px 20px; +} + +.bodywebsite .menu-image { + display: block; +} + +.bodywebsite .menu-image-wrap { + position: relative; +} + +.bodywebsite .menu-tag { + position: absolute; + top: 0; + right: 0; + margin: 20px; +} + +.bodywebsite .newsletter-image { + border-radius: 100%; + object-fit: cover; + display: block; + margin: 0 auto; + max-width: 450px; + max-height: 450px; +} + +.bodywebsite .category-tag, +.bodywebsite .menu-tag { + background: var(--dark-color); + border-radius: var(--border-radius-default); + color: var(--white-color); + font-size: var(--category-font-size); + display: inline-block; + padding: 4px 12px; +} + +.bodywebsite .category-tag { + margin-bottom: 5px; +} + +/*--------------------------------------- + CUSTOM FORM +-----------------------------------------*/ +.bodywebsite .custom-form .form-control { + margin-bottom: 20px; + padding: 14px 10px; + transition: all 0.3s; +} + +.bodywebsite .custom-form button[type="submit"] { + background: var(--dark-color); + border: 0; + color: var(--white-color); + text-transform: uppercase; +} + +.bodywebsite .custom-form button[type="submit"]:hover { + background: var(--primary-color); +} + +/*--------------------------------------- + SUBSCRIBE FORM +-----------------------------------------*/ +.bodywebsite .subscribe-form .form-control { + margin-top: 20px; + margin-bottom: 10px; +} + +.bodywebsite .booking-form .form-control { + font-weight: var(--font-weight-normal); + padding-top: 12px; + padding-bottom: 12px; + margin-bottom: 25px; + transition: all 0.3s; +} + +.bodywebsite .booking-form button[type="submit"] { + background: var(--dark-color); + border: 0; + font-weight: var(--font-weight-semibold); + color: var(--white-color); + text-transform: uppercase; + margin-bottom: 0; +} + +.bodywebsite .booking-form button[type="submit"]:hover { + background: var(--primary-color); +} +/*--------------------------------------- + FOOTER +-----------------------------------------*/ +.bodywebsite .site-footer { + background-image: url("../images/daan-evers-tKN1WXrzQ3s-unsplash.jpg"); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + padding-top: 3rem; + padding-bottom: 3rem; + position: relative; +} + +.bodywebsite .site-footer::before { + content: ""; + background: linear-gradient(to top, var(--dark-color), transparent 200%); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.bodywebsite .site-footer .container { + position: relative; +} + +.bodywebsite .tooplate-mt30 { + margin-top: 30px; +} +.bodywebsite .tooplate-mt60 { + margin-top: 60px; +} + +.bodywebsite .copyright-text { + font-size: var(--menu-font-size); +} + +.bodywebsite .tel-link { + color: var(--p-color); +} + +.bodywebsite .site-footer a:hover { + color: var(--white-color); +} + +.bodywebsite .site-footer a { + color: #aaa; +} + +.bodywebsite .site-footer p { + color: #aaa; +} + +/*--------------------------------------- + SOCIAL ICON +-----------------------------------------*/ +.bodywebsite .social-icon { + margin: 0; + padding: 0; +} + +.bodywebsite .social-icon li { + list-style: none; + display: inline-block; + vertical-align: top; + transition: all 0.3s; +} + +.bodywebsite .social-icon:hover li:not(:hover) { + opacity: 0.65; +} + +.bodywebsite .social-icon-link { + color: var(--p-color); + font-size: var(--p-font-size); + display: inline-block; + vertical-align: top; + margin-top: 4px; + margin-bottom: 4px; + margin-right: 15px; +} + +.bodywebsite .social-icon-link:hover { + color: var(--primary-color); +} + +/*--------------------------------------- + RESPONSIVE STYLES +-----------------------------------------*/ +@media screen and (max-width: 1180px) { + h1 { + font-size: 62px; + } +} + +@media screen and (max-width: 1170px) { + h1 { + font-size: 56px; + } +} + +@media screen and (max-width: 991px) { + .bodywebsite h1 { + font-size: 38px; + } + + .bodywebsite h2 { + font-size: 32px; + } + + .bodywebsite h3 { + font-size: 26px; + } + + .bodywebsite h4 { + font-size: 24px; + } + + .bodywebsite h5 { + font-size: 20px; + } + + .bodywebsite h6 { + font-size: 18px; + } + + .bodywebsite .site-header, + .bodywebsite .section-padding { + padding-top: 5rem; + padding-bottom: 5rem; + } + + .bodywebsite .navbar { + padding-top: 10px; + padding-bottom: 10px; + } + + .bodywebsite .navbar-nav .nav-link { + padding-top: 5px; + padding-bottom: 10px; + } + + .bodywebsite #BookingModal .modal-content { + padding-bottom: 200px; + } + + .bodywebsite #BookingModal .modal-content::before { + background-image: url("../images/sincerely-media-HoEYgBL_Gcs-unsplash-mobile.jpg"); + background-position: bottom; + top: auto; + left: 0; + bottom: 0; + width: 100%; + height: 200px; + transform: rotate(180deg); + } + + .bodywebsite #BookingModal .modal-body { + padding-top: 18px; + padding-right: 32px; + } +} + +@media screen and (max-width: 480px) { + .bodywebsite .newsletter-image { + max-width: 310px; + max-height: 310px; + } + + .bodywebsite .hero-carousel .carousel-control-prev, + .bodywebsite .hero-carousel .carousel-control-next { + width: 50px; + height: 50px; + } +} + diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/wrapper.php new file mode 100644 index 00000000000..26adb3ef220 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/wrapper.php @@ -0,0 +1,278 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) { + $original_file = 'blog.rss'; +} + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost', 'status'=>1); + if ($l) { + $filters['lang'] = $l; + } + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($l); + $outputlangs->loadLangs(array("main", "other")); + $title = $desc = $outputlangs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = empty($check_access['accessallowed']) ? '' : $check_access['accessallowed']; + $sqlprotectagainstexternals = empty($check_access['sqlprotectagainstexternals']) ? '' : $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = empty($check_access['original_file']) ? '' : $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) { + $db->close(); +} +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/alex-haney-CAhjZmVk5H4-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/alex-haney-CAhjZmVk5H4-unsplash.jpg new file mode 100644 index 00000000000..b560348e307 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/alex-haney-CAhjZmVk5H4-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg new file mode 100644 index 00000000000..ad6b019c9db Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg new file mode 100644 index 00000000000..86554c885ff Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/lucas-swennen-1W_MyJSRLuQ-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/lucas-swennen-1W_MyJSRLuQ-unsplash.jpg new file mode 100644 index 00000000000..c666b35e4ff Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/lucas-swennen-1W_MyJSRLuQ-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/luisa-brimble-aFzg83dvnAI-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/luisa-brimble-aFzg83dvnAI-unsplash.jpg new file mode 100644 index 00000000000..4935dc39ab8 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/luisa-brimble-aFzg83dvnAI-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg new file mode 100644 index 00000000000..2bfea3596c4 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/rod-long-I79Pgmhmy5M-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/rod-long-I79Pgmhmy5M-unsplash.jpg new file mode 100644 index 00000000000..8cd3d3d1e4a Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/breakfast/rod-long-I79Pgmhmy5M-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/charles-deluvio-FdDkfYFHqe4-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/charles-deluvio-FdDkfYFHqe4-unsplash.jpg new file mode 100644 index 00000000000..f226187380f Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/charles-deluvio-FdDkfYFHqe4-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/daan-evers-tKN1WXrzQ3s-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/daan-evers-tKN1WXrzQ3s-unsplash.jpg new file mode 100644 index 00000000000..8c2def33f78 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/daan-evers-tKN1WXrzQ3s-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg new file mode 100644 index 00000000000..acd46fc663f Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-isHUj3N0194-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-isHUj3N0194-unsplash.jpg new file mode 100644 index 00000000000..04a4f0fff90 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/farhad-ibrahimzade-isHUj3N0194-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg new file mode 100644 index 00000000000..e011d4d1e5b Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/briana-tozour-V_Nkf1E-vYA-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/briana-tozour-V_Nkf1E-vYA-unsplash.jpg new file mode 100644 index 00000000000..f1d8eddf578 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/briana-tozour-V_Nkf1E-vYA-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/luisa-brimble-aFzg83dvnAI-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/luisa-brimble-aFzg83dvnAI-unsplash.jpg new file mode 100644 index 00000000000..5d151a7d3fa Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/luisa-brimble-aFzg83dvnAI-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg new file mode 100644 index 00000000000..0433e1e8cea Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/priscilla-du-preez-W3SEyZODn8U-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/rod-long-I79Pgmhmy5M-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/rod-long-I79Pgmhmy5M-unsplash.jpg new file mode 100644 index 00000000000..5c980d4764c Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/header/rod-long-I79Pgmhmy5M-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-D5c9ZciQy_I-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-D5c9ZciQy_I-unsplash.jpg new file mode 100644 index 00000000000..93f2861f4ed Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-D5c9ZciQy_I-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-MGKqxm6u2bc-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-MGKqxm6u2bc-unsplash.jpg new file mode 100644 index 00000000000..0995f0b2110 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/farhad-ibrahimzade-MGKqxm6u2bc-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-cH5IPjaAYyo-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-cH5IPjaAYyo-unsplash.jpg new file mode 100644 index 00000000000..6dcd9a26bf4 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-cH5IPjaAYyo-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-rheOvfxOlOA-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-rheOvfxOlOA-unsplash.jpg new file mode 100644 index 00000000000..df1868563d3 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/lunch/louis-hansel-rheOvfxOlOA-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/ivan-torres-MQUqbmszGGM-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/ivan-torres-MQUqbmszGGM-unsplash.jpg new file mode 100644 index 00000000000..bbf0fed93ea Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/ivan-torres-MQUqbmszGGM-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jason-leung-O67LZfeyYBk-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jason-leung-O67LZfeyYBk-unsplash.jpg new file mode 100644 index 00000000000..ea1ae5a96ab Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jason-leung-O67LZfeyYBk-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jay-wennington-N_Y88TWmGwA-unsplash.jpg b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jay-wennington-N_Y88TWmGwA-unsplash.jpg new file mode 100644 index 00000000000..1b81640a322 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-restaurant/medias/image/websitekey/slide/jay-wennington-N_Y88TWmGwA-unsplash.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/website_pages.sql b/htdocs/install/doctemplates/websites/website_template-restaurant/website_pages.sql new file mode 100644 index 00000000000..f088e50d33e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/website_pages.sql @@ -0,0 +1,24 @@ +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 248 -> 1__+MAX_llx_website_page__ - Aliases about --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(1__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'about', '', 'About us', '', '', '', '', '1', '2022-08-09 16:40:13', '2022-11-20 14:15:19', null, '', 'page', '', '__N____N____N__
    __N__
    __N____N__
    __N__
    __N__
    __N____N__
    __N__

    About Us

    __N____N__ Get to know us more__N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N__
    __N____N__
    __N__

    Team Members

    __N__
    __N____N__
    __N__
    __N__ \"\"__N__ __N__
    __N__

    Sophia

    __N____N__

    CEO & Founder

    __N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ \"\"__N____N__

    Benjamin W.

    __N____N__

    Restaurant Manager

    __N__
    __N__
    __N____N__
    __N__
    __N__ \"\"__N__ __N__

    Muchen Jack

    __N____N__

    Senior Chef

    __N__
    __N__
    __N____N__
    __N__
    __N__
    __N__ __N__
    __N____N__
    __N____N____N____N____N__', '', 0); +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 249 -> 2__+MAX_llx_website_page__ - Aliases contact --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(2__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'contact', '', 'Contact us', '', '', '', '', '1', '2022-08-16 14:40:51', '2022-11-20 14:50:10', null, '', 'page', '', '__N__email;__N__ $message = GETPOST(\'message\', \'alpha\');__N__ $cmail = new CMailFile(\'Contact from website\', $to, $from, $message);__N__ if ($cmail->sendfile()) {__N__ ?>__N__ __N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N____N____N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Say Hi

    __N____N__ We are happy to get in touch with you__N__
    __N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__

    Leave a message

    __N__
    __N____N__
    __N__ __N__ __N__ \">__N__ __N__
    __N__
    __N____N__
    __N__ trans(\"Phone\"); ?>__N____N__ __N__
    __N____N__
    __N__ trans(\"Email\"); ?>__N____N__ __N____N__ trans(\"Message\"); ?>__N____N__ __N__
    __N____N__
    __N__ __N__
    __N__ __N__
    __N____N__
    __N__
    Weekdays
    __N____N__
    __N__ $day : \" .getDolGlobalString(\"MAIN_INFO_OPENINGHOURS_$day\") .\"

    \"; __N__ }__N__ ?>__N__
    __N____N__
    Weekends
    __N____N__
    __N__

    Saturday and Sunday

    __N____N__

    to be determined !

    __N__
    __N__
    __N____N__
    __N__

    __N__ __N__

    __N__ getFullAddress() ?>__N__

    __N____N__ __N__
    __N__
    __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N____N____N__ __N__ __N__ __N__
    __N__
    __N__
    __N__

    Reserve a table

    __N____N__ __N__
    __N____N__ __N__
    __N__ __N__ \" />__N__ __N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__ __N__
    __N__ __N__
    __N__
    __N____N__
    __N__
    __N__ __N__ __N____N__
    __N____N____N____N____N__', '', 0); +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 252 -> 3__+MAX_llx_website_page__ - Aliases footer --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(3__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'footer', '', 'Footer', '', '', '', '', '1', '2022-11-20 12:51:50', '2022-11-20 14:07:39', null, '', 'other', '', '__N__
    __N__ __N__ __N__
    __N__', '', 0); +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 253 -> 4__+MAX_llx_website_page__ - Aliases header --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(4__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'header', '', 'Header', '', '', '', '', '1', '2022-11-20 13:12:33', '2022-11-20 14:21:25', null, '', 'menu', '', '
    __N__ __N__
    __N____N__', '', 0); +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 250 -> 5__+MAX_llx_website_page__ - Aliases index --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(5__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'index', '', 'index', '', '', '', '', '1', '2022-08-09 16:34:54', '2022-11-20 15:10:45', null, '', 'page', '', '__N____N____N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    __N__ Delicious Steaks__N__

    __N____N__
    __N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N____N__
    __N__ __N__
    __N__
    __N__
    __N__ __N__
    __N____N__
    __N__

    __N__ Fine Dining Restaurant__N__

    __N__
    __N__
    __N____N__
    __N__
    __N__ __N__
    __N____N__
    __N__ __N__

    Steak

    __N____N__ 26.50__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N__
    __N____N__
    __N__ __N__

    __N__ Sausage Pasta__N__

    __N____N__ 18.25__N__
    __N__
    __N__
    __N__
    __N____N__ __N__ __N__ Previous__N__ __N____N__ __N__ __N__ Next__N__ __N__ __N__ __N__ __N__ __N____N__
    __N__
    __N____N__
    __N__
    __N__
    __N__
    __N__

    __N__ Special Menus__N__

    __N__
    __N____N__
    __N__
    __N__
    __N__ __N____N__ Breakfast__N__
    __N____N__ __N__

    Morning Fresh

    __N____N__ 12.50__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__
    __N__
    __N____N__
    __N__
    __N__
    __N__ __N____N__ Lunch__N__
    __N____N__ __N__

    DoliCloud Soup

    __N____N__ 24.50__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N____N__
    __N__
    __N__
    __N__ __N____N__ Dinner__N__
    __N____N__ __N__

    Premium Steak

    __N____N__ 45__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N____N__
    __N__
    __N__
    __N__ __N____N__ Dinner__N__
    __N____N__ __N__

    Seafood Set

    __N____N__ 86__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N____N__
    __N__
    __N__
    __N__ __N____N__ Breakfast__N__
    __N____N__ __N__

    Burger Set

    __N____N__ 20.50__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N____N__
    __N__
    __N__
    __N__ __N____N__ Lunch__N__
    __N____N__ __N__

    Healthy Soup

    __N____N__ 34.20__N____N__ __N__
    __N__ __N__ __N__ __N__ __N__ __N__
    __N__
    __N__
    __N__ __N__ __N__ __N__ __N__
    __N__
    __N____N__
    __N____N____N____N__', '', 0); +UPDATE llx_website SET fk_default_home = 5__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; +-- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; +-- Page ID 251 -> 6__+MAX_llx_website_page__ - Aliases menu --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(6__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'menu', '', 'Our menus', '', '', '', '', '1', '2022-08-16 14:37:03', '2022-11-20 14:30:03', null, '', 'page', '', '__N____N____N____N____N__
    __N__
    __N__
    __N__
    __N__
    __N__
    __N__

    Our Menus

    __N____N__ Perfect for all Breakfast, Lunch and__N__ Dinner__N__
    __N__
    __N__
    __N____N__
    __N__
    __N____N__
    __N__
    __N__
    __N__
    __N__

    Breakfast Menu

    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Fresh Start

    __N____N__ $24.50__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Baked Creamy

    __N____N__ $16.50__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Burger Set

    __N____N__ $24.50__N____N__ $36.50__N__
    __N__
    __N__ __N__ __N__ __N__
    __N____N__
    __N__
    __N__
    __N__
    __N__

    Lunch Menu

    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Super Steak Set

    __N____N__ $32.75__N____N__ $55__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Bread & Steak Set

    __N____N__ $42.50__N__
    __N__
    __N__
    __N__ __N__ __N__
    __N____N__
    __N__
    __N__
    __N__
    __N__

    Dinner Menu

    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Seafood Set

    __N____N__ $65.50__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Premium Steak

    __N____N__ $74.25__N__
    __N__
    __N__
    __N____N__
    __N__
    __N__ __N____N__ __N__

    Salmon Set

    __N____N__ $60__N__
    __N__
    __N__ __N__ __N__ __N__
    __N__
    __N____N__
    __N____N____N____N__', '', 0); + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar.zip b/htdocs/install/doctemplates/websites/website_template-stellar.zip deleted file mode 100644 index 3c9643c8960..00000000000 Binary files a/htdocs/install/doctemplates/websites/website_template-stellar.zip and /dev/null differ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/LICENSE b/htdocs/install/doctemplates/websites/website_template-stellar/LICENSE new file mode 100644 index 00000000000..871ef743662 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/LICENSE @@ -0,0 +1,4 @@ +LICENSE +------- + +CC-BY-SA - https://creativecommons.org/licenses/by/4.0/ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/README.md b/htdocs/install/doctemplates/websites/website_template-stellar/README.md new file mode 100644 index 00000000000..3a656b8ddaf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/README.md @@ -0,0 +1 @@ +Website generated by Dolibarr ERP CRM diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/.dolibarr b/htdocs/install/doctemplates/websites/website_template-stellar/containers/.dolibarr new file mode 100644 index 00000000000..0ef9997b4ab --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/.dolibarr @@ -0,0 +1,2 @@ +# Some properties for Dolibarr web site CMS +param=value diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/.htaccess b/htdocs/install/doctemplates/websites/website_template-stellar/containers/.htaccess new file mode 100644 index 00000000000..ed27b33461f --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/.htaccess @@ -0,0 +1,2 @@ +# Order allow,deny +# Deny from all diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/README.md b/htdocs/install/doctemplates/websites/website_template-stellar/containers/README.md new file mode 100644 index 00000000000..06b47fbfb9d --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/README.md @@ -0,0 +1 @@ +Design provided by HTML5up unde CC license. See https://html5up.net/license. diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/credits.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/credits.php new file mode 100644 index 00000000000..9413220a642 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/credits.php @@ -0,0 +1,4 @@ +ref.'/page20.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/footer.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/footer.php new file mode 100644 index 00000000000..f49ea9820eb --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/footer.php @@ -0,0 +1,4 @@ +ref.'/page21.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/generic.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/generic.php new file mode 100644 index 00000000000..125a586cbbf --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/generic.php @@ -0,0 +1,4 @@ +ref.'/page22.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/home.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/home.php new file mode 100644 index 00000000000..17b2d2fcb5e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/home.php @@ -0,0 +1,4 @@ +ref.'/page23.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/htmlheader.html b/htdocs/install/doctemplates/websites/website_template-stellar/containers/htmlheader.html new file mode 100644 index 00000000000..7d92b6f479e --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/htmlheader.html @@ -0,0 +1,8 @@ + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/index.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/index.php new file mode 100644 index 00000000000..3f2d97e57ac --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/index.php @@ -0,0 +1,11 @@ + +/* JS content (all pages) */ + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/manifest.json.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/manifest.json.php new file mode 100644 index 00000000000..b61531d6c11 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/manifest.json.php @@ -0,0 +1,13 @@ + + +ref.'/page24.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page20.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page20.tpl.php new file mode 100644 index 00000000000..ace3135f312 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page20.tpl.php @@ -0,0 +1,75 @@ + + + +Credits + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + +
    + + + + + + + + +
    + + +
    + +

    + +This site is edited by name; ?> + + +

    + +
    + +
    + + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page21.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page21.tpl.php new file mode 100644 index 00000000000..9cbab5789c9 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page21.tpl.php @@ -0,0 +1,91 @@ + + + +Footer + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +
    +
    +

    Aliquam sed mauris

    +

    Sed lorem ipsum dolor sit amet et nullam consequat feugiat consequat magna adipiscing tempus etiam dolore veroeros. eget dapibus mauris. Cras aliquet, nisl ut viverra sollicitudin, ligula erat egestas velit, vitae tincidunt odio.

    + +
    +
    +

    Etiam feugiat

    +
    +
    Address
    +
    getFullAddress(1, '
    '); ?>
    +
    Phone
    +
    phone; ?>
    +
    Email
    +
    email; ?>
    +
    +
    + +
    + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page22.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page22.tpl.php new file mode 100644 index 00000000000..87bf7faf346 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page22.tpl.php @@ -0,0 +1,119 @@ + + + +Generic page + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + +
    + + + + + + + + +
    + + +
    + +

    Magna feugiat lorem

    +

    Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet. Pellentesque leo mauris, consectetur id ipsum sit amet, fergiat. Pellentesque in mi eu massa lacinia malesuada et a elit. Donec urna ex, lacinia in purus ac, pretium pulvinar mauris. Curabitur sapien risus, commodo eget turpis at, elementum convallis fames ac ante ipsum primis in faucibus.

    +

    Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet.

    +

    Tempus veroeros

    +

    Cep risus aliquam gravida cep ut lacus amet. Adipiscing faucibus nunc placerat. Tempus adipiscing turpis non blandit accumsan eget lacinia nunc integer interdum amet aliquam ut orci non col ut ut praesent.

    +
    + + +
    +

    Latest Blog posts

    +
    + loadLangs(array("main","website")); + $fuser = new User($db); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', 5, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang)); // , 'keywords'=>$keyword + if (is_numeric($arrayofblogs) && $arrayofblogs < 0) { + print '
    '.$weblangs->trans($websitepage->error).'
    '; + } elseif (is_array($arrayofblogs) && ! empty($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + print ''; + } + } else { + print '
    '; + print '
    '; + //print $weblangs->trans("NoArticlesFoundForTheKeyword", $keyword); + print $weblangs->trans("NoArticlesFound"); + print '
    '; + print '
    '; + } + ?> +
    +
    + +
    + + + + + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page23.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page23.tpl.php new file mode 100644 index 00000000000..43664b7984b --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page23.tpl.php @@ -0,0 +1,163 @@ + + + +My personal blog + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +
    + + + + + + + + +
    + + +
    +
    +
    +
    +

    Ipsum sed adipiscing

    +
    +

    Sed lorem ipsum dolor sit amet nullam consequat feugiat consequat magna + adipiscing magna etiam amet veroeros. Lorem ipsum dolor tempus sit cursus. + Tempus nisl et nullam lorem ipsum dolor sit amet aliquam.

    + +
    + +
    +
    + + +
    +
    +

    Magna veroeros

    +
    +
      +
    • + +

      Ipsum consequat

      +

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      +
    • +
    • + +

      Amed sed feugiat

      +

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      +
    • +
    • + +

      Dolor nullam

      +

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      +
    • +
    + +
    + + +
    +
    +

    Ipsum consequat

    +

    Donec imperdiet consequat consequat. Suspendisse feugiat congue
    + posuere. Nulla massa urna, fermentum eget quam aliquet.

    +
    +
      +
    • + + 5,120 Etiam +
    • +
    • + + 8,192 Magna +
    • +
    • + + 2,048 Tempus +
    • +
    • + + 4,096 Aliquam +
    • +
    • + + 1,024 Nullam +
    • +
    +

    Nam elementum nisl et mi a commodo porttitor. Morbi sit amet nisl eu arcu faucibus hendrerit vel a risus. Nam a orci mi, elementum ac arcu sit amet, fermentum pellentesque et purus. Integer maximus varius lorem, sed convallis diam accumsan sed. Etiam porttitor placerat sapien, sed eleifend a enim pulvinar faucibus semper quis ut arcu. Ut non nisl a mollis est efficitur vestibulum. Integer eget purus nec nulla mattis et accumsan ut magna libero. Morbi auctor iaculis porttitor. Sed ut magna ac risus et hendrerit scelerisque. Praesent eleifend lacus in lectus aliquam porta. Cras eu ornare dui curabitur lacinia.

    + +
    + + +
    +
    +

    Congue imperdiet

    +

    Donec imperdiet consequat consequat. Suspendisse feugiat congue
    + posuere. Nulla massa urna, fermentum eget quam aliquet.

    +
    + +
    + +
    + + + +
    + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page24.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page24.tpl.php new file mode 100644 index 00000000000..3ea7a55dbd5 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page24.tpl.php @@ -0,0 +1,48 @@ + + + +Menu + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/page25.tpl.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page25.tpl.php new file mode 100644 index 00000000000..ec9e02f4914 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/page25.tpl.php @@ -0,0 +1,44 @@ + + + +This is a Blog post + + + + + + + + + +use_manifest) { print ''."\n"; } ?> + + + + + + + + + + + + +
    + This is a blog post article... +
    + + + + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/robots.txt b/htdocs/install/doctemplates/websites/website_template-stellar/containers/robots.txt new file mode 100644 index 00000000000..2b844f479d6 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/robots.txt @@ -0,0 +1,4 @@ +# Robot file. Generated with Dolibarr +User-agent: * +Allow: /public/ +Disallow: /administrator/ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/styles.css.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/styles.css.php new file mode 100644 index 00000000000..80326972fd5 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/styles.css.php @@ -0,0 +1,2696 @@ + +/* CSS content (all pages) */ +div.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; } +.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;} + +html { + scroll-behavior: smooth +} + +.bodywebsite .centpercent { + width: 100%; +} +.bodywebsite .center { + text-align: center; +} + +.bodywebsite span.icon.alt { + font-size: 0.5em; +} +.bodywebsite .fab.alt:before { + font-family: "Font Awesome 5 Brands" !important; +} + +.bodywebsite .logowebsite { + width: 128px; + height: 128px; + border-radius: 50%; + background-size: contain; + background-size: contain; +} + +.bodywebsite .blog-box { + box-shadow: -1px -1px 12px 5px rgba(85, 85, 85, 0.1) !important; +} + +html.bodywebsite, +.bodywebsite, +.bodywebsite div, +.bodywebsite span, +.bodywebsite applet, +.bodywebsite object, +.bodywebsite iframe, +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6, +.bodywebsite p, +.bodywebsite blockquote, +.bodywebsite pre, +.bodywebsite a, +.bodywebsite abbr, +.bodywebsite acronym, +.bodywebsite address, +.bodywebsite big, +.bodywebsite cite, +.bodywebsite code, +.bodywebsite del, +.bodywebsite dfn, +.bodywebsite em, +.bodywebsite img, +.bodywebsite ins, +.bodywebsite kbd, +.bodywebsite q, +.bodywebsite s, +.bodywebsite samp, +.bodywebsite small, +.bodywebsite strike, +.bodywebsite strong, +.bodywebsite sub, +.bodywebsite sup, +.bodywebsite tt, +.bodywebsite var, +.bodywebsite b, +.bodywebsite u, +.bodywebsite i, +.bodywebsite center, +.bodywebsite dl, +.bodywebsite dt, +.bodywebsite dd, +.bodywebsite ol, +.bodywebsite ul, +.bodywebsite li, +.bodywebsite fieldset, +.bodywebsite form, +.bodywebsite label, +.bodywebsite legend, +.bodywebsite table, +.bodywebsite caption, +.bodywebsite tbody, +.bodywebsite tfoot, +.bodywebsite thead, +.bodywebsite tr, +.bodywebsite th, +.bodywebsite td, +.bodywebsite article, +.bodywebsite aside, +.bodywebsite canvas, +.bodywebsite details, +.bodywebsite embed, +.bodywebsite figure, +.bodywebsite figcaption, +.bodywebsite footer, +.bodywebsite header, +.bodywebsite hgroup, +.bodywebsite menu, +.bodywebsite nav, +.bodywebsite output, +.bodywebsite ruby, +.bodywebsite section, +.bodywebsite summary, +.bodywebsite time, +.bodywebsite mark, +.bodywebsite audio, +.bodywebsite video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +.bodywebsite article, +.bodywebsite aside, +.bodywebsite details, +.bodywebsite figcaption, +.bodywebsite figure, +.bodywebsite footer, +.bodywebsite header, +.bodywebsite hgroup, +.bodywebsite menu, +.bodywebsite nav, +.bodywebsite section { + display: block; +} +.bodywebsite { + line-height: 1; + background-image: -moz-linear-gradient(45deg, #4376e2 15%, #5f4d93 85%); + background-image: -webkit-linear-gradient(45deg, #4376e2 15%, #5f4d93 85%); + background-image: -ms-linear-gradient(45deg, #4376e2 15%, #5f4d93 85%); + background-image: linear-gradient(45deg, #4376e2 15%, #5f4d93 85%); +} +.bodywebsite ol, +.bodywebsite ul { + list-style: none; +} +.bodywebsite blockquote, +.bodywebsite q { + quotes: none; +} +.bodywebsite blockquote:before, +.bodywebsite blockquote:after, +.bodywebsite q:before, +.bodywebsite q:after { + content: ''; + content: none; +} +.bodywebsite table { + border-collapse: collapse; + border-spacing: 0; +} +.bodywebsite { + -webkit-text-size-adjust: none; +} +.bodywebsite mark { + background-color: transparent; + color: inherit; +} +.bodywebsite input::-moz-focus-inner { + border: 0; + padding: 0; +} +.bodywebsite input, +.bodywebsite select, +.bodywebsite textarea { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; +} +@-ms-viewport { + width: device-width; +} +.bodywebsite { + -ms-overflow-style: scrollbar; +} +@media screen and (max-width: 480px) { + .bodywebsite html, + .bodywebsite { + min-width: 320px; + } +} +.bodywebsite html { + box-sizing: border-box; +} +.bodywebsite *, +.bodywebsite *:before, +.bodywebsite *:after { + box-sizing: inherit; +} +.bodywebsite { + background-color: #935d8c; +} +.bodywebsite.is-preload *, +.bodywebsite.is-preload *:before, +.bodywebsite.is-preload *:after { + -moz-animation: none !important; + -webkit-animation: none !important; + -ms-animation: none !important; + animation: none !important; + -moz-transition: none !important; + -webkit-transition: none !important; + -ms-transition: none !important; + transition: none !important; +} +.bodywebsite { + background-color: #935d8c; + color: rgba(255, 255, 255, 0.65); +} +.bodywebsite { + font-family: "Source Sans", Helvetica, sans-serif; + font-weight: 300; + line-height: 1.65; +} +@media screen and (max-width: 1680px) { + .bodywebsite body, + .bodywebsite input, + .bodywebsite select, + .bodywebsite textarea { + font-size: 14pt; + } +} +@media screen and (max-width: 1280px) { + .bodywebsite body, + .bodywebsite input, + .bodywebsite select, + .bodywebsite textarea { + font-size: 12pt; + } +} +@media screen and (max-width: 360px) { + .bodywebsite body, + .bodywebsite input, + .bodywebsite select, + .bodywebsite textarea { + font-size: 11pt; + } +} +.bodywebsite a { + -moz-transition: color 0.2s ease, border-bottom 0.2s ease; + -webkit-transition: color 0.2s ease, border-bottom 0.2s ease; + -ms-transition: color 0.2s ease, border-bottom 0.2s ease; + transition: color 0.2s ease, border-bottom 0.2s ease; + text-decoration: none; + border-bottom: dotted 1px; + color: inherit; +} +.bodywebsite a:hover { + border-bottom-color: transparent; +} +.bodywebsite strong, +.bodywebsite b { + font-weight: 400; +} +.bodywebsite em, +.bodywebsite i { + font-style: italic; +} +.bodywebsite p { + margin: 0 0 2em 0; +} +.bodywebsite p.content { + -moz-columns: 20em 2; + -webkit-columns: 20em 2; + -ms-columns: 20em 2; + columns: 20em 2; + -moz-column-gap: 2em; + -webkit-column-gap: 2em; + -ms-column-gap: 2em; + column-gap: 2em; + text-align: justify; +} +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + font-weight: 300; + line-height: 1.5; + margin: 0 0 0.7em 0; + letter-spacing: -0.025em; +} +.bodywebsite h1 a, +.bodywebsite h2 a, +.bodywebsite h3 a, +.bodywebsite h4 a, +.bodywebsite h5 a, +.bodywebsite h6 a { + color: inherit; + text-decoration: none; +} +.bodywebsite h1 { + font-size: 2.5em; + line-height: 1.2; +} +.bodywebsite h2 { + font-size: 1.5em; +} +.bodywebsite h3 { + font-size: 1.25em; +} +.bodywebsite h4 { + font-size: 1.1em; +} +.bodywebsite h5 { + font-size: 0.9em; +} +.bodywebsite h6 { + font-size: 0.7em; +} +@media screen and (max-width: 736px) { + .bodywebsite h1 { + font-size: 2em; + } +} +.bodywebsite sub { + font-size: 0.8em; + position: relative; + top: 0.5em; +} +.bodywebsite sup { + font-size: 0.8em; + position: relative; + top: -0.5em; +} +.bodywebsite blockquote { + border-left: solid 4px; + font-style: italic; + margin: 0 0 2em 0; + padding: 0.5em 0 0.5em 2em; +} +.bodywebsite code { + border-radius: 8px; + border: solid 1px; + font-family: "Courier New", monospace; + font-size: 0.9em; + margin: 0 0.25em; + padding: 0.25em 0.65em; +} +.bodywebsite pre { + -webkit-overflow-scrolling: touch; + font-family: "Courier New", monospace; + font-size: 0.9em; + margin: 0 0 2em 0; +} +.bodywebsite pre code { + display: block; + line-height: 1.75; + padding: 1em 1.5em; + overflow-x: auto; +} +.bodywebsite hr { + border: 0; + border-bottom: solid 1px; + margin: 2em 0; +} +.bodywebsite hr.major { + margin: 3em 0; +} +.bodywebsite .align-left { + text-align: left; +} +.bodywebsite .align-center { + text-align: center; +} +.bodywebsite .align-right { + text-align: right; +} +.bodywebsite input, +.bodywebsite select, +.bodywebsite textarea { + color: #ffffff; +} +.bodywebsite a:hover { + color: #ffffff; +} +.bodywebsite strong, +.bodywebsite b { + color: #ffffff; +} +.bodywebsite h1, +.bodywebsite h2, +.bodywebsite h3, +.bodywebsite h4, +.bodywebsite h5, +.bodywebsite h6 { + color: #ffffff; +} +.bodywebsite blockquote { + border-left-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite code { + background: rgba(255, 255, 255, 0.075); + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite hr { + border-bottom-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; +} +.bodywebsite .row > * { + box-sizing: border-box; +} +.bodywebsite .row.aln-left { + justify-content: flex-start; +} +.bodywebsite .row.aln-center { + justify-content: center; +} +.bodywebsite .row.aln-right { + justify-content: flex-end; +} +.bodywebsite .row.aln-top { + align-items: flex-start; +} +.bodywebsite .row.aln-middle { + align-items: center; +} +.bodywebsite .row.aln-bottom { + align-items: flex-end; +} +.bodywebsite .row > .imp { + order: -1; +} +.bodywebsite .row > .col-1 { + width: 8.33333%; +} +.bodywebsite .row > .off-1 { + margin-left: 8.33333%; +} +.bodywebsite .row > .col-2 { + width: 16.66667%; +} +.bodywebsite .row > .off-2 { + margin-left: 16.66667%; +} +.bodywebsite .row > .col-3 { + width: 25%; +} +.bodywebsite .row > .off-3 { + margin-left: 25%; +} +.bodywebsite .row > .col-4 { + width: 33.33333%; +} +.bodywebsite .row > .off-4 { + margin-left: 33.33333%; +} +.bodywebsite .row > .col-5 { + width: 41.66667%; +} +.bodywebsite .row > .off-5 { + margin-left: 41.66667%; +} +.bodywebsite .row > .col-6 { + width: 50%; +} +.bodywebsite .row > .off-6 { + margin-left: 50%; +} +.bodywebsite .row > .col-7 { + width: 58.33333%; +} +.bodywebsite .row > .off-7 { + margin-left: 58.33333%; +} +.bodywebsite .row > .col-8 { + width: 66.66667%; +} +.bodywebsite .row > .off-8 { + margin-left: 66.66667%; +} +.bodywebsite .row > .col-9 { + width: 75%; +} +.bodywebsite .row > .off-9 { + margin-left: 75%; +} +.bodywebsite .row > .col-10 { + width: 83.33333%; +} +.bodywebsite .row > .off-10 { + margin-left: 83.33333%; +} +.bodywebsite .row > .col-11 { + width: 91.66667%; +} +.bodywebsite .row > .off-11 { + margin-left: 91.66667%; +} +.bodywebsite .row > .col-12 { + width: 100%; +} +.bodywebsite .row > .off-12 { + margin-left: 100%; +} +.bodywebsite .row { + margin-top: 0; +} +.bodywebsite .row > * { + padding: 0 0 0 0; +} +@media screen and (max-width: 1680px) { + .bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + } + .bodywebsite .row > * { + box-sizing: border-box; + } + .bodywebsite .row.aln-left { + justify-content: flex-start; + } + .bodywebsite .row.aln-center { + justify-content: center; + } + .bodywebsite .row.aln-right { + justify-content: flex-end; + } + .bodywebsite .row.aln-top { + align-items: flex-start; + } + .bodywebsite .row.aln-middle { + align-items: center; + } + .bodywebsite .row.aln-bottom { + align-items: flex-end; + } + .bodywebsite .row > .imp-xlarge { + order: -1; + } + .bodywebsite .row > .col-1-xlarge { + width: 8.33333%; + } + .bodywebsite .row > .off-1-xlarge { + margin-left: 8.33333%; + } + .bodywebsite .row > .col-2-xlarge { + width: 16.66667%; + } + .bodywebsite .row > .off-2-xlarge { + margin-left: 16.66667%; + } + .bodywebsite .row > .col-3-xlarge { + width: 25%; + } + .bodywebsite .row > .off-3-xlarge { + margin-left: 25%; + } + .bodywebsite .row > .col-4-xlarge { + width: 33.33333%; + } + .bodywebsite .row > .off-4-xlarge { + margin-left: 33.33333%; + } + .bodywebsite .row > .col-5-xlarge { + width: 41.66667%; + } + .bodywebsite .row > .off-5-xlarge { + margin-left: 41.66667%; + } + .bodywebsite .row > .col-6-xlarge { + width: 50%; + } + .bodywebsite .row > .off-6-xlarge { + margin-left: 50%; + } + .bodywebsite .row > .col-7-xlarge { + width: 58.33333%; + } + .bodywebsite .row > .off-7-xlarge { + margin-left: 58.33333%; + } + .bodywebsite .row > .col-8-xlarge { + width: 66.66667%; + } + .bodywebsite .row > .off-8-xlarge { + margin-left: 66.66667%; + } + .bodywebsite .row > .col-9-xlarge { + width: 75%; + } + .bodywebsite .row > .off-9-xlarge { + margin-left: 75%; + } + .bodywebsite .row > .col-10-xlarge { + width: 83.33333%; + } + .bodywebsite .row > .off-10-xlarge { + margin-left: 83.33333%; + } + .bodywebsite .row > .col-11-xlarge { + width: 91.66667%; + } + .bodywebsite .row > .off-11-xlarge { + margin-left: 91.66667%; + } + .bodywebsite .row > .col-12-xlarge { + width: 100%; + } + .bodywebsite .row > .off-12-xlarge { + margin-left: 100%; + } + .bodywebsite .row { + margin-top: 0; + margin-left: 0; + } + .bodywebsite .row > * { + padding: 0 0 0 0; + } +} +@media screen and (max-width: 1280px) { + .bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + } + .bodywebsite .row > * { + box-sizing: border-box; + } + .bodywebsite .row.aln-left { + justify-content: flex-start; + } + .bodywebsite .row.aln-center { + justify-content: center; + } + .bodywebsite .row.aln-right { + justify-content: flex-end; + } + .bodywebsite .row.aln-top { + align-items: flex-start; + } + .bodywebsite .row.aln-middle { + align-items: center; + } + .bodywebsite .row.aln-bottom { + align-items: flex-end; + } + .bodywebsite .row > .imp-large { + order: -1; + } + .bodywebsite .row > .col-1-large { + width: 8.33333%; + } + .bodywebsite .row > .off-1-large { + margin-left: 8.33333%; + } + .bodywebsite .row > .col-2-large { + width: 16.66667%; + } + .bodywebsite .row > .off-2-large { + margin-left: 16.66667%; + } + .bodywebsite .row > .col-3-large { + width: 25%; + } + .bodywebsite .row > .off-3-large { + margin-left: 25%; + } + .bodywebsite .row > .col-4-large { + width: 33.33333%; + } + .bodywebsite .row > .off-4-large { + margin-left: 33.33333%; + } + .bodywebsite .row > .col-5-large { + width: 41.66667%; + } + .bodywebsite .row > .off-5-large { + margin-left: 41.66667%; + } + .bodywebsite .row > .col-6-large { + width: 50%; + } + .bodywebsite .row > .off-6-large { + margin-left: 50%; + } + .bodywebsite .row > .col-7-large { + width: 58.33333%; + } + .bodywebsite .row > .off-7-large { + margin-left: 58.33333%; + } + .bodywebsite .row > .col-8-large { + width: 66.66667%; + } + .bodywebsite .row > .off-8-large { + margin-left: 66.66667%; + } + .bodywebsite .row > .col-9-large { + width: 75%; + } + .bodywebsite .row > .off-9-large { + margin-left: 75%; + } + .bodywebsite .row > .col-10-large { + width: 83.33333%; + } + .bodywebsite .row > .off-10-large { + margin-left: 83.33333%; + } + .bodywebsite .row > .col-11-large { + width: 91.66667%; + } + .bodywebsite .row > .off-11-large { + margin-left: 91.66667%; + } + .bodywebsite .row > .col-12-large { + width: 100%; + } + .bodywebsite .row > .off-12-large { + margin-left: 100%; + } + .bodywebsite .row { + margin-top: 0; + } + .bodywebsite .row > * { + padding: 0 0 0 1.5em; + } +} +@media screen and (max-width: 980px) { + .bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + } + .bodywebsite .row > * { + box-sizing: border-box; + } + .bodywebsite .row.aln-left { + justify-content: flex-start; + } + .bodywebsite .row.aln-center { + justify-content: center; + } + .bodywebsite .row.aln-right { + justify-content: flex-end; + } + .bodywebsite .row.aln-top { + align-items: flex-start; + } + .bodywebsite .row.aln-middle { + align-items: center; + } + .bodywebsite .row.aln-bottom { + align-items: flex-end; + } + .bodywebsite .row > .imp-medium { + order: -1; + } + .bodywebsite .row > .col-1-medium { + width: 8.33333%; + } + .bodywebsite .row > .off-1-medium { + margin-left: 8.33333%; + } + .bodywebsite .row > .col-2-medium { + width: 16.66667%; + } + .bodywebsite .row > .off-2-medium { + margin-left: 16.66667%; + } + .bodywebsite .row > .col-3-medium { + width: 25%; + } + .bodywebsite .row > .off-3-medium { + margin-left: 25%; + } + .bodywebsite .row > .col-4-medium { + width: 33.33333%; + } + .bodywebsite .row > .off-4-medium { + margin-left: 33.33333%; + } + .bodywebsite .row > .col-5-medium { + width: 41.66667%; + } + .bodywebsite .row > .off-5-medium { + margin-left: 41.66667%; + } + .bodywebsite .row > .col-6-medium { + width: 50%; + } + .bodywebsite .row > .off-6-medium { + margin-left: 50%; + } + .bodywebsite .row > .col-7-medium { + width: 58.33333%; + } + .bodywebsite .row > .off-7-medium { + margin-left: 58.33333%; + } + .bodywebsite .row > .col-8-medium { + width: 66.66667%; + } + .bodywebsite .row > .off-8-medium { + margin-left: 66.66667%; + } + .bodywebsite .row > .col-9-medium { + width: 75%; + } + .bodywebsite .row > .off-9-medium { + margin-left: 75%; + } + .bodywebsite .row > .col-10-medium { + width: 83.33333%; + } + .bodywebsite .row > .off-10-medium { + margin-left: 83.33333%; + } + .bodywebsite .row > .col-11-medium { + width: 91.66667%; + } + .bodywebsite .row > .off-11-medium { + margin-left: 91.66667%; + } + .bodywebsite .row > .col-12-medium { + width: 100%; + } + .bodywebsite .row > .off-12-medium { + margin-left: 100%; + } + .bodywebsite .row { + margin-top: 0; + } + .bodywebsite .row > * { + padding: 0 0 0 1.5em; + } +} +@media screen and (max-width: 736px) { + .bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + } + .bodywebsite .row > * { + box-sizing: border-box; + } + .bodywebsite .row.aln-left { + justify-content: flex-start; + } + .bodywebsite .row.aln-center { + justify-content: center; + } + .bodywebsite .row.aln-right { + justify-content: flex-end; + } + .bodywebsite .row.aln-top { + align-items: flex-start; + } + .bodywebsite .row.aln-middle { + align-items: center; + } + .bodywebsite .row.aln-bottom { + align-items: flex-end; + } + .bodywebsite .row > .imp-small { + order: -1; + } + .bodywebsite .row > .col-1-small { + width: 8.33333%; + } + .bodywebsite .row > .off-1-small { + margin-left: 8.33333%; + } + .bodywebsite .row > .col-2-small { + width: 16.66667%; + } + .bodywebsite .row > .off-2-small { + margin-left: 16.66667%; + } + .bodywebsite .row > .col-3-small { + width: 25%; + } + .bodywebsite .row > .off-3-small { + margin-left: 25%; + } + .bodywebsite .row > .col-4-small { + width: 33.33333%; + } + .bodywebsite .row > .off-4-small { + margin-left: 33.33333%; + } + .bodywebsite .row > .col-5-small { + width: 41.66667%; + } + .bodywebsite .row > .off-5-small { + margin-left: 41.66667%; + } + .bodywebsite .row > .col-6-small { + width: 50%; + } + .bodywebsite .row > .off-6-small { + margin-left: 50%; + } + .bodywebsite .row > .col-7-small { + width: 58.33333%; + } + .bodywebsite .row > .off-7-small { + margin-left: 58.33333%; + } + .bodywebsite .row > .col-8-small { + width: 66.66667%; + } + .bodywebsite .row > .off-8-small { + margin-left: 66.66667%; + } + .bodywebsite .row > .col-9-small { + width: 75%; + } + .bodywebsite .row > .off-9-small { + margin-left: 75%; + } + .bodywebsite .row > .col-10-small { + width: 83.33333%; + } + .bodywebsite .row > .off-10-small { + margin-left: 83.33333%; + } + .bodywebsite .row > .col-11-small { + width: 91.66667%; + } + .bodywebsite .row > .off-11-small { + margin-left: 91.66667%; + } + .bodywebsite .row > .col-12-small { + width: 100%; + } + .bodywebsite .row > .off-12-small { + margin-left: 100%; + } + .bodywebsite .row { + margin-top: 0; + } + .bodywebsite .row > * { + padding: 0 0 0 1em; + } +} +@media screen and (max-width: 480px) { + .bodywebsite .row { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + } + .bodywebsite .row > * { + box-sizing: border-box; + } + .bodywebsite .row.aln-left { + justify-content: flex-start; + } + .bodywebsite .row.aln-center { + justify-content: center; + } + .bodywebsite .row.aln-right { + justify-content: flex-end; + } + .bodywebsite .row.aln-top { + align-items: flex-start; + } + .bodywebsite .row.aln-middle { + align-items: center; + } + .bodywebsite .row.aln-bottom { + align-items: flex-end; + } + .bodywebsite .row > .imp-xsmall { + order: -1; + } + .bodywebsite .row > .col-1-xsmall { + width: 8.33333%; + } + .bodywebsite .row > .off-1-xsmall { + margin-left: 8.33333%; + } + .bodywebsite .row > .col-2-xsmall { + width: 16.66667%; + } + .bodywebsite .row > .off-2-xsmall { + margin-left: 16.66667%; + } + .bodywebsite .row > .col-3-xsmall { + width: 25%; + } + .bodywebsite .row > .off-3-xsmall { + margin-left: 25%; + } + .bodywebsite .row > .col-4-xsmall { + width: 33.33333%; + } + .bodywebsite .row > .off-4-xsmall { + margin-left: 33.33333%; + } + .bodywebsite .row > .col-5-xsmall { + width: 41.66667%; + } + .bodywebsite .row > .off-5-xsmall { + margin-left: 41.66667%; + } + .bodywebsite .row > .col-6-xsmall { + width: 50%; + } + .bodywebsite .row > .off-6-xsmall { + margin-left: 50%; + } + .bodywebsite .row > .col-7-xsmall { + width: 58.33333%; + } + .bodywebsite .row > .off-7-xsmall { + margin-left: 58.33333%; + } + .bodywebsite .row > .col-8-xsmall { + width: 66.66667%; + } + .bodywebsite .row > .off-8-xsmall { + margin-left: 66.66667%; + } + .bodywebsite .row > .col-9-xsmall { + width: 75%; + } + .bodywebsite .row > .off-9-xsmall { + margin-left: 75%; + } + .bodywebsite .row > .col-10-xsmall { + width: 83.33333%; + } + .bodywebsite .row > .off-10-xsmall { + margin-left: 83.33333%; + } + .bodywebsite .row > .col-11-xsmall { + width: 91.66667%; + } + .bodywebsite .row > .off-11-xsmall { + margin-left: 91.66667%; + } + .bodywebsite .row > .col-12-xsmall { + width: 100%; + } + .bodywebsite .row > .off-12-xsmall { + margin-left: 100%; + } + .bodywebsite .row { + margin-top: 0; + } + .bodywebsite .row > * { + padding: 0 0 0 1.25em; + } +} +.bodywebsite .box { + border-radius: 8px; + border: solid; + margin-bottom: 2em; + padding: 1.5em; +} +.bodywebsite .box > :last-child, +.bodywebsite .box > :last-child > :last-child, +.bodywebsite .box > :last-child > :last-child > :last-child { + margin-bottom: 0; +} +.bodywebsite .box.alt { + border: 0; + border-radius: 0; + padding: 0; +} +.bodywebsite .box { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite input[type="submit"], +.bodywebsite input[type="reset"], +.bodywebsite input[type="button"], +.bodywebsite button, +.bodywebsite .buttonwebsite { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + border-radius: 8px; + border: 0; + cursor: pointer; + display: inline-block; + font-weight: 300; + height: 2.75em; + line-height: 2.75em; + min-width: 9.25em; + padding: 0 1.5em; + text-align: center; + text-decoration: none; + white-space: nowrap; +} +.bodywebsite input[type="submit"].icon, +.bodywebsite input[type="reset"].icon, +.bodywebsite input[type="button"].icon, +.bodywebsite button.icon, +.bodywebsite .buttonwebsite.icon { + padding-left: 1.35em; +} +.bodywebsite input[type="submit"].icon:before, +.bodywebsite input[type="reset"].icon:before, +.bodywebsite input[type="button"].icon:before, +.bodywebsite button.icon:before, +.bodywebsite .buttonwebsite.icon:before { + margin-right: 0.5em; +} +.bodywebsite input[type="submit"].fit, +.bodywebsite input[type="reset"].fit, +.bodywebsite input[type="button"].fit, +.bodywebsite button.fit, +.bodywebsite .buttonwebsite.fit { + width: 100%; +} +.bodywebsite input[type="submit"].small, +.bodywebsite input[type="reset"].small, +.bodywebsite input[type="button"].small, +.bodywebsite button.small, +.bodywebsite .buttonwebsite.small { + font-size: 0.8em; +} +.bodywebsite input[type="submit"].large, +.bodywebsite input[type="reset"].large, +.bodywebsite input[type="button"].large, +.bodywebsite button.large, +.bodywebsite .buttonwebsite.large { + font-size: 1.35em; +} +.bodywebsite input[type="submit"].disabled, +.bodywebsite input[type="submit"]:disabled, +.bodywebsite input[type="reset"].disabled, +.bodywebsite input[type="reset"]:disabled, +.bodywebsite input[type="button"].disabled, +.bodywebsite input[type="button"]:disabled, +.bodywebsite button.disabled, +.bodywebsite button:disabled, +.bodywebsite .buttonwebsite.disabled, +.bodywebsite .buttonwebsite:disabled { + pointer-events: none; + opacity: 0.25; +} +@media screen and (max-width: 736px) { + .bodywebsite input[type="submit"], + .bodywebsite input[type="reset"], + .bodywebsite input[type="button"], + .bodywebsite button, + .bodywebsite .buttonwebsite { + min-width: 0; + } +} +.bodywebsite input[type="submit"], +.bodywebsite input[type="reset"], +.bodywebsite input[type="button"], +.bodywebsite button, +.bodywebsite .buttonwebsite { + background-color: transparent; + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); + color: #ffffff !important; +} +.bodywebsite input[type="submit"]:hover, +.bodywebsite input[type="reset"]:hover, +.bodywebsite input[type="button"]:hover, +.bodywebsite button:hover, +.bodywebsite .buttonwebsite:hover { + background-color: rgba(255, 255, 255, 0.075); +} +.bodywebsite input[type="submit"]:active, +.bodywebsite input[type="reset"]:active, +.bodywebsite input[type="button"]:active, +.bodywebsite button:active, +.bodywebsite .buttonwebsite:active { + background-color: rgba(255, 255, 255, 0.2); +} +.bodywebsite input[type="submit"].icon:before, +.bodywebsite input[type="reset"].icon:before, +.bodywebsite input[type="button"].icon:before, +.bodywebsite button.icon:before, +.bodywebsite .buttonwebsite.icon:before { + color: rgba(255, 255, 255, 0.5); +} +.bodywebsite input[type="submit"].primary, +.bodywebsite input[type="reset"].primary, +.bodywebsite input[type="button"].primary, +.bodywebsite button.primary, +.bodywebsite .buttonwebsite.primary { + background-color: #8cc9f0; + color: #ffffff !important; + box-shadow: none; +} +.bodywebsite input[type="submit"].primary:hover, +.bodywebsite input[type="reset"].primary:hover, +.bodywebsite input[type="button"].primary:hover, +.bodywebsite button.primary:hover, +.bodywebsite .buttonwebsite.primary:hover { + background-color: #9acff2; +} +.bodywebsite input[type="submit"].primary:active, +.bodywebsite input[type="reset"].primary:active, +.bodywebsite input[type="button"].primary:active, +.bodywebsite button.primary:active, +.bodywebsite .buttonwebsite.primary:active { + background-color: #7ec3ee; +} +.bodywebsite input[type="submit"].primary.icon:before, +.bodywebsite input[type="reset"].primary.icon:before, +.bodywebsite input[type="button"].primary.icon:before, +.bodywebsite button.primary.icon:before, +.bodywebsite .buttonwebsite.primary.icon:before { + color: #ffffff !important; +} +.bodywebsite form { + margin: 0 0 2em 0; +} +.bodywebsite label { + display: block; + font-size: 0.9em; + font-weight: 400; + margin: 0 0 1em 0; +} +.bodywebsite input[type="text"], +.bodywebsite input[type="password"], +.bodywebsite input[type="email"], +.bodywebsite select, +.bodywebsite textarea { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 8px; + border: solid 1px; + color: inherit; + display: block; + outline: 0; + padding: 0 1em; + text-decoration: none; + width: 100%; +} +.bodywebsite input[type="text"]:invalid, +.bodywebsite input[type="password"]:invalid, +.bodywebsite input[type="email"]:invalid, +.bodywebsite select:invalid, +.bodywebsite textarea:invalid { + box-shadow: none; +} +.bodywebsite select { + background-size: 1.25rem; + background-repeat: no-repeat; + background-position: calc(100% - 1rem) center; + height: 2.75em; + padding-right: 2.75em; + text-overflow: ellipsis; +} +.bodywebsite select:focus::-ms-value { + background-color: transparent; +} +.bodywebsite select::-ms-expand { + display: none; +} +.bodywebsite input[type="text"], +.bodywebsite input[type="password"], +.bodywebsite input[type="email"], +.bodywebsite select { + height: 2.75em; +} +.bodywebsite textarea { + padding: 0.75em 1em; +} +.bodywebsite input[type="checkbox"], +.bodywebsite input[type="radio"] { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + display: block; + float: left; + margin-right: -2em; + opacity: 0; + width: 1em; + z-index: -1; +} +.bodywebsite input[type="checkbox"] + label, +.bodywebsite input[type="radio"] + label { + text-decoration: none; + cursor: pointer; + display: inline-block; + font-size: 1em; + font-weight: 300; + padding-left: 2.4em; + padding-right: 0.75em; + position: relative; +} +.bodywebsite input[type="checkbox"] + label:before, +.bodywebsite input[type="radio"] + label:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; + text-transform: none !important; + font-family: 'Font Awesome 5 Free'; + font-weight: 900; +} +.bodywebsite input[type="checkbox"] + label:before, +.bodywebsite input[type="radio"] + label:before { + border-radius: 8px; + border: solid 1px; + content: ''; + display: inline-block; + font-size: 0.8em; + height: 2.0625em; + left: 0; + line-height: 2.0625em; + position: absolute; + text-align: center; + top: 0; + width: 2.0625em; +} +.bodywebsite input[type="checkbox"]:checked + label:before, +.bodywebsite input[type="radio"]:checked + label:before { + content: '\f00c'; +} +.bodywebsite input[type="checkbox"] + label:before { + border-radius: 8px; +} +.bodywebsite input[type="radio"] + label:before { + border-radius: 100%; +} +.bodywebsite ::-webkit-input-placeholder { + opacity: 1; +} +.bodywebsite :-moz-placeholder { + opacity: 1; +} +.bodywebsite ::-moz-placeholder { + opacity: 1; +} +.bodywebsite :-ms-input-placeholder { + opacity: 1; +} +.bodywebsite label { + color: #ffffff; +} +.bodywebsite input[type="text"], +.bodywebsite input[type="password"], +.bodywebsite input[type="email"], +.bodywebsite select, +.bodywebsite textarea { + background-color: rgba(255, 255, 255, 0.075); + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite input[type="text"]:focus, +.bodywebsite input[type="password"]:focus, +.bodywebsite input[type="email"]:focus, +.bodywebsite select:focus, +.bodywebsite textarea:focus { + border-color: #8cc9f0; + box-shadow: 0 0 0 1px #8cc9f0; +} +.bodywebsite select { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.35)' /%3E%3C/svg%3E"); +} +.bodywebsite select option { + color: #ffffff; + background: #935d8c; +} +.bodywebsite input[type="checkbox"] + label, +.bodywebsite input[type="radio"] + label { + color: rgba(255, 255, 255, 0.65); +} +.bodywebsite input[type="checkbox"] + label:before, +.bodywebsite input[type="radio"] + label:before { + background: rgba(255, 255, 255, 0.075); + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite input[type="checkbox"]:checked + label:before, +.bodywebsite input[type="radio"]:checked + label:before { + background-color: #ffffff; + border-color: #ffffff; + color: #935d8c; +} +.bodywebsite input[type="checkbox"]:focus + label:before, +.bodywebsite input[type="radio"]:focus + label:before { + border-color: #8cc9f0; + box-shadow: 0 0 0 1px #8cc9f0; +} +.bodywebsite ::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite :-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite ::-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite :-ms-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite .formerize-placeholder { + color: rgba(255, 255, 255, 0.5) !important; +} +.bodywebsite .icon { + text-decoration: none; + -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + border-bottom: none; + position: relative; +} +.bodywebsite .icon:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; + text-transform: none !important; + font-family: "Font Awesome 5 Free"; +} +.bodywebsite .icon > .label { + display: none; +} +.bodywebsite .icon:before { + line-height: solid; +} +.bodywebsite .icon.solid:before { + font-weight: 900; +} +.bodywebsite .icon.brands:before { + font-family: 'Font Awesome 5 Brands'; +} +.bodywebsite .icon.major { + border: solid 1px; + display: inline-block; + border-radius: 100%; + padding: 0.65em; + margin: 0 0 2em 0; + cursor: default; +} +.bodywebsite .icon.major:before { + display: inline-block; + font-size: 6.25rem; + font-weight: 600; + font-family: "Font Awesome 5 Free"; + width: 2.25em; + height: 2.25em; + line-height: 2.2em; + border-radius: 100%; + border: solid 1px; + text-align: center; +} +.bodywebsite .icon.alt { + display: inline-block; + border: solid 1px; + border-radius: 100%; +} +.bodywebsite .icon.alt:before { + display: block; + font-size: 1.25em; + font-family: "Font Awesome 5 Free"; + width: 2em; + height: 2em; + text-align: center; + line-height: 2em; +} +.bodywebsite .icon.style1 { + color: #efa8b0; +} +.bodywebsite .icon.style2 { + color: #c79cc8; +} +.bodywebsite .icon.style3 { + color: #a89cc8; +} +.bodywebsite .icon.style4 { + color: #9bb2e1; +} +.bodywebsite .icon.style5 { + color: #8cc9f0; +} +@media screen and (max-width: 1680px) { + .bodywebsite .icon.major:before { + font-size: 5.5rem; + } +} +@media screen and (max-width: 1280px) { + .bodywebsite .icon.major:before { + font-size: 4.75rem; + } +} +@media screen and (max-width: 736px) { + .bodywebsite .icon.major { + margin: 0 0 1.5em 0; + padding: 0.35em; + } + .bodywebsite .icon.major:before { + font-size: 3.5rem; + } +} +.bodywebsite .icon.major { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .icon.major:before { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .icon.alt { + border-color: rgba(255, 255, 255, 0.35); + color: #ffffff; +} +.bodywebsite .icon.alt:hover { + background-color: rgba(255, 255, 255, 0.075); +} +.bodywebsite .icon.alt:active { + background-color: rgba(255, 255, 255, 0.2); +} +.bodywebsite .image { + border-radius: 8px; + border: 0; + display: inline-block; + position: relative; +} +.bodywebsite .image img { + border-radius: 8px; + display: block; +} +.bodywebsite .image.left, +.bodywebsite .image.right { + max-width: 40%; +} +.bodywebsite .image.left img, +.bodywebsite .image.right img { + width: 100%; +} +.bodywebsite .image.left { + float: left; + margin: 0 1.5em 1em 0; + top: 0.25em; +} +.bodywebsite .image.right { + float: right; + margin: 0 0 1em 1.5em; + top: 0.25em; +} +.bodywebsite .image.fit { + display: block; + margin: 0 0 2em 0; + width: 100%; +} +.bodywebsite .image.fit img { + width: 100%; +} +.bodywebsite .image.main { + display: block; + margin: 0 0 3em 0; + width: 100%; +} +.bodywebsite .image.main img { + width: 100%; +} +.bodywebsite ol { + list-style: decimal; + margin: 0 0 2em 0; + padding-left: 1.25em; +} +.bodywebsite ol li { + padding-left: 0.25em; +} +.bodywebsite ul { + list-style: disc; + margin: 0 0 2em 0; + padding-left: 1em; +} +.bodywebsite ul li { + padding-left: 0.5em; +} +.bodywebsite ul.alt { + list-style: none; + padding-left: 0; +} +.bodywebsite ul.alt li { + border-top: solid 1px; + padding: 0.5em 0; +} +.bodywebsite ul.alt li:first-child { + border-top: 0; + padding-top: 0; +} +.bodywebsite dl { + margin: 0 0 2em 0; +} +.bodywebsite dl dt { + display: block; + font-weight: 400; + margin: 0 0 1em 0; +} +.bodywebsite dl dd { + margin-left: 2em; +} +.bodywebsite dl.alt dt { + display: block; + width: 3em; + margin: 0; + clear: left; + float: left; +} +.bodywebsite dl.alt dd { + margin: 0 0 0.85em 5.5em; +} +.bodywebsite dl.alt:after { + content: ''; + display: block; + clear: both; +} +.bodywebsite ul.alt li { + border-top-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite dl dt { + color: #ffffff; +} +.bodywebsite ul.actions { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + cursor: default; + list-style: none; + margin-left: -1em; + padding-left: 0; +} +.bodywebsite ul.actions li { + padding: 0 0 0 1em; + vertical-align: middle; +} +.bodywebsite ul.actions.special { + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + width: 100%; + margin-left: 0; +} +.bodywebsite ul.actions.special li:first-child { + padding-left: 0; +} +.bodywebsite ul.actions.stacked { + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + margin-left: 0; +} +.bodywebsite ul.actions.stacked li { + padding: 1.3em 0 0 0; +} +.bodywebsite ul.actions.stacked li:first-child { + padding-top: 0; +} +.bodywebsite ul.actions.fit { + width: calc(100% + 1em); +} +.bodywebsite ul.actions.fit li { + -moz-flex-grow: 1; + -webkit-flex-grow: 1; + -ms-flex-grow: 1; + flex-grow: 1; + -moz-flex-shrink: 1; + -webkit-flex-shrink: 1; + -ms-flex-shrink: 1; + flex-shrink: 1; + width: 100%; +} +.bodywebsite ul.actions.fit li > * { + width: 100%; +} +.bodywebsite ul.actions.fit.stacked { + width: 100%; +} +.bodywebsite .list-inline { + list-style: none; +} + +@media screen and (max-width: 480px) { + .bodywebsite ul.actions:not(.fixed) { + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + margin-left: 0; + } + .bodywebsite ul.actions:not(.fixed) li { + -moz-flex-grow: 1; + -webkit-flex-grow: 1; + -ms-flex-grow: 1; + flex-grow: 1; + -moz-flex-shrink: 1; + -webkit-flex-shrink: 1; + -ms-flex-shrink: 1; + flex-shrink: 1; + padding: 1em 0 0 0; + text-align: center; + } + .bodywebsite ul.actions:not(.fixed) li > * { + } + .bodywebsite ul.actions:not(.fixed) li:first-child { + padding-top: 0; + } + .bodywebsite ul.actions:not(.fixed) li input[type="submit"].icon:before, + .bodywebsite ul.actions:not(.fixed) li input[type="reset"].icon:before, + .bodywebsite ul.actions:not(.fixed) li input[type="button"].icon:before, + .bodywebsite ul.actions:not(.fixed) li button.icon:before, + .bodywebsite ul.actions:not(.fixed) li .buttonwebsite.icon:before { + margin-left: -0.5rem; + } +} +.bodywebsite ul.icons { + cursor: default; + list-style: none; + padding-left: 0; +} +.bodywebsite ul.icons li { + display: inline-block; + padding: 0 0.65em 0 0; +} +.bodywebsite ul.icons li:last-child { + padding-right: 0 !important; +} +.bodywebsite section.special, +.bodywebsite article.special { + text-align: center; +} +.bodywebsite header.major { + margin-bottom: 3em; +} +.bodywebsite header.major h2 { + font-size: 2em; +} +.bodywebsite header.major h2:after { + display: block; + content: ''; + width: 3.25em; + height: 2px; + margin: 0.7em 0 1em 0; + border-radius: 2px; +} +.bodywebsite section.special header.major h2:after, +.bodywebsite article.special header.major h2:after { + margin-left: auto; + margin-right: auto; +} +.bodywebsite header.major p { + font-size: 1.25em; + letter-spacing: -0.025em; +} +.bodywebsite header.major.special { + text-align: center; +} +.bodywebsite header.major.special h2:after { + margin-left: auto; + margin-right: auto; +} +.bodywebsite footer.major { + margin-top: 3em; +} +@media screen and (max-width: 736px) { + .bodywebsite header.major { + margin-bottom: 0; + } + .bodywebsite header.major h2 { + font-size: 1.5em; + } + .bodywebsite header.major p { + font-size: 1em; + letter-spacing: 0; + } + .bodywebsite header.major p br { + display: none; + } + .bodywebsite footer.major { + margin-top: 0; + } +} +.bodywebsite header.major h2:after { + background-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .table-wrapper { + -webkit-overflow-scrolling: touch; + overflow-x: auto; +} +.bodywebsite table { + margin: 0 0 2em 0; + width: 100%; +} +.bodywebsite table tbody tr { + border: solid 1px; + border-left: 0; + border-right: 0; +} +.bodywebsite table td { + padding: 0.75em 0.75em; +} +.bodywebsite table th { + font-size: 0.9em; + font-weight: 400; + padding: 0 0.75em 0.75em 0.75em; + text-align: left; +} +.bodywebsite table thead { + border-bottom: solid 2px; +} +.bodywebsite table tfoot { + border-top: solid 2px; +} +.bodywebsite table.alt { + border-collapse: separate; +} +.bodywebsite table.alt tbody tr td { + border: solid 1px; + border-left-width: 0; + border-top-width: 0; +} +.bodywebsite table.alt tbody tr td:first-child { + border-left-width: 1px; +} +.bodywebsite table.alt tbody tr:first-child td { + border-top-width: 1px; +} +.bodywebsite table.alt thead { + border-bottom: 0; +} +.bodywebsite table.alt tfoot { + border-top: 0; +} +.bodywebsite table tbody tr { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite table tbody tr:nth-child(2n + 1) { + background-color: rgba(255, 255, 255, 0.075); +} +.bodywebsite table th { + color: #ffffff; +} +.bodywebsite table thead { + border-bottom-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite table tfoot { + border-top-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite table.alt tbody tr td { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite .features { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + width: calc(100% + 2em); + margin: 0 0 3em -2em; + padding: 0; + list-style: none; +} +.bodywebsite .features li { + width: calc(33.33333% - 2em); + margin-left: 2em; + margin-top: 3em; + padding: 0; +} +.bodywebsite .features li:nth-child(1), +.bodywebsite .features li:nth-child(2), +.bodywebsite .features li:nth-child(3) { + margin-top: 0; +} +.bodywebsite .features li > :last-child { + margin-bottom: 0; +} +@media screen and (max-width: 980px) { + .bodywebsite .features li { + width: calc(50% - 2em); + } + .bodywebsite .features li:nth-child(3) { + margin-top: 3em; + } +} +@media screen and (max-width: 736px) { + .bodywebsite .features { + width: 100%; + margin: 0 0 2em 0; + } + .bodywebsite .features li { + width: 100%; + margin-left: 0; + margin-top: 2em; + } + .bodywebsite .features li:nth-child(2), + .bodywebsite .features li:nth-child(3) { + margin-top: 2em; + } +} +.bodywebsite .statistics { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + width: 100%; + margin: 0 0 3em 0; + padding: 0; + list-style: none; + cursor: default; +} +.bodywebsite .statistics li { + -moz-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 1.5em; + color: #ffffff; + text-align: center; +} +.bodywebsite .statistics li.style1 { + background-color: #efa8b0; +} +.bodywebsite .statistics li.style2 { + background-color: #c79cc8; +} +.bodywebsite .statistics li.style3 { + background-color: #a89cc8; +} +.bodywebsite .statistics li.style4 { + background-color: #9bb2e1; +} +.bodywebsite .statistics li.style5 { + background-color: #8cc9f0; +} +.bodywebsite .statistics li strong, +.bodywebsite .statistics li b { + display: block; + font-size: 2em; + line-height: 1.1; + color: inherit !important; + font-weight: 300; + letter-spacing: -0.025em; +} +.bodywebsite .statistics li:first-child { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; +} +.bodywebsite .statistics li:last-child { + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} +.bodywebsite .statistics li .icon { + display: inline-block; +} +.bodywebsite .statistics li .icon:before { + font-size: 2.75rem; + line-height: 1.3; +} +@media screen and (max-width: 980px) { + .bodywebsite .statistics li strong, + .bodywebsite .statistics li b { + font-size: 1.5em; + } +} +@media screen and (max-width: 736px) { + .bodywebsite .statistics { + display: block; + width: 20em; + max-width: 100%; + margin: 0 auto 2em auto; + } + .bodywebsite .statistics li:first-child { + border-bottom-left-radius: 0; + border-top-right-radius: 8px; + } + .bodywebsite .statistics li:last-child { + border-top-right-radius: 0; + border-bottom-left-radius: 8px; + } + .bodywebsite .statistics li .icon:before { + font-size: 3.75rem; + } + .bodywebsite .statistics li strong, + .bodywebsite .statistics li b { + font-size: 2.5em; + } +} +.bodywebsite .spotlight { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-align-items: center; + -webkit-align-items: center; + -ms-align-items: center; + align-items: center; + margin: 0 0 2em 0; +} +.bodywebsite .spotlight .content { + -moz-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.bodywebsite .spotlight .content > :last-child { + margin-bottom: 0; +} +.bodywebsite .spotlight .content header.major { + margin: 0 0 2em 0; +} +.bodywebsite .spotlight .image { + display: inline-block; + margin-left: 4em; + padding: 0.65em; + border-radius: 100%; + border: solid 1px; +} +.bodywebsite .spotlight .image img { + display: block; + border-radius: 100%; + width: 14em; + height: 14em; +} +@media screen and (max-width: 980px) { + .bodywebsite .spotlight { + -moz-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + -ms-flex-direction: column-reverse; + flex-direction: column-reverse; + text-align: center; + } + .bodywebsite .spotlight .content { + -moz-flex: 0 1 auto; + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 100%; + } + .bodywebsite .spotlight .content header.major h2:after { + margin-left: auto; + margin-right: auto; + } + .bodywebsite .spotlight .content .actions { + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + width: calc(100% + 1em); + } + .bodywebsite .spotlight .image { + -moz-flex: 0 1 auto; + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + margin-left: 0; + margin-bottom: 2em; + } +} +@media screen and (max-width: 736px) { + .bodywebsite .spotlight .image { + padding: 0.35em; + } + .bodywebsite .spotlight .image img { + width: 12em; + } +} +.bodywebsite .spotlight .image { + border-color: rgba(255, 255, 255, 0.35); +} +.bodywebsite #header { + padding: 5em 5em 1em 5em ; + text-align: center; +} +.bodywebsite #header h1 { + margin: 0 0 0.25em 0; +} +.bodywebsite #header p { + font-size: 1.25em; + letter-spacing: -0.025em; +} +.bodywebsite #header.alt { + padding: 7em 5em 4em 5em ; +} +.bodywebsite #header.alt h1 { + font-size: 3.25em; +} +.bodywebsite #header.alt > * { + -moz-transition: opacity 3s ease; + -webkit-transition: opacity 3s ease; + -ms-transition: opacity 3s ease; + transition: opacity 3s ease; + -moz-transition-delay: 0.5s; + -webkit-transition-delay: 0.5s; + -ms-transition-delay: 0.5s; + transition-delay: 0.5s; + opacity: 1; +} +.bodywebsite #header.alt .logo { + -moz-transition: opacity 1.25s ease, -moz-transform 0.5s ease; + -webkit-transition: opacity 1.25s ease, -webkit-transform 0.5s ease; + -ms-transition: opacity 1.25s ease, -ms-transform 0.5s ease; + transition: opacity 1.25s ease, transform 0.5s ease; + -moz-transition-delay: 0s; + -webkit-transition-delay: 0s; + -ms-transition-delay: 0s; + transition-delay: 0s; + display: block; + margin: 0 0 1.5em 0; +} +.bodywebsite #header.alt .logo img { + display: block; + margin: 0 auto; + max-width: 75%; +} +@media screen and (max-width: 1280px) { + .bodywebsite #header { + padding: 4em 4em 0.1em 4em; + } + .bodywebsite #header.alt { + padding: 6em 4em 3em 4em ; + } +} +@media screen and (max-width: 980px) { + .bodywebsite #header { + padding: 4em 3em 0.1em 3em; + } + .bodywebsite #header.alt { + padding: 5em 3em 2em 3em ; + } +} +@media screen and (max-width: 736px) { + .bodywebsite #header { + padding: 3em 2em 0.1em 2em; + } + .bodywebsite #header p { + font-size: 1em; + letter-spacing: 0; + } + .bodywebsite #header p br { + display: none; + } + .bodywebsite #header.alt { + padding: 4em 2em 1em 2em ; + } + .bodywebsite #header.alt h1 { + font-size: 2.5em; + } +} +@media screen and (max-width: 480px) { + .bodywebsite #header { + padding: 3em 1.5em 0.1em 1.5em; + } + .bodywebsite #header.alt { + padding: 4em 1.5em 1em 1.5em; + } +} +@media screen and (max-width: 360px) { + .bodywebsite #header { + padding: 2.5em 1em 0.1em 1em; + } + .bodywebsite #header.alt { + padding: 3.5em 1em 0.5em 1em; + } +} +div.bodywebsite .is-preload #header.alt > * { + opacity: 0; +} +div.bodywebsite .is-preload #header.alt .logo { + -moz-transform: scale(0.8) rotate(-30deg); + -webkit-transform: scale(0.8) rotate(-30deg); + -ms-transform: scale(0.8) rotate(-30deg); + transform: scale(0.8) rotate(-30deg); +} +.bodywebsite #nav { + -moz-transition: background-color 0.2s ease, border-top-left-radius 0.2s ease, border-top-right-radius 0.2s ease, padding 0.2s ease; + -webkit-transition: background-color 0.2s ease, border-top-left-radius 0.2s ease, border-top-right-radius 0.2s ease, padding 0.2s ease; + -ms-transition: background-color 0.2s ease, border-top-left-radius 0.2s ease, border-top-right-radius 0.2s ease, padding 0.2s ease; + transition: background-color 0.2s ease, border-top-left-radius 0.2s ease, border-top-right-radius 0.2s ease, padding 0.2s ease; + background-color: #ffffff; + color: #636363; + position: absolute; + width: 64em; + max-width: calc(100% - 4em); + padding-top: 1em; + padding-bottom: 1em; + background-color: #f7f7f7; + border-top-left-radius: 0.25em; + border-top-right-radius: 0.25em; + cursor: default; + text-align: center; +} +.bodywebsite #nav input, +.bodywebsite #nav select, +.bodywebsite #nav textarea { + color: #636363; +} +.bodywebsite #nav a:hover { + color: #636363; +} +.bodywebsite #nav strong, +.bodywebsite #nav b { + color: #636363; +} +.bodywebsite #nav h1, +.bodywebsite #nav h2, +.bodywebsite #nav h3, +.bodywebsite #nav h4, +.bodywebsite #nav h5, +.bodywebsite #nav h6 { + color: #636363; +} +.bodywebsite #nav blockquote { + border-left-color: #dddddd; +} +.bodywebsite #nav code { + background: rgba(222, 222, 222, 0.25); + border-color: #dddddd; +} +.bodywebsite #nav hr { + border-bottom-color: #dddddd; +} +.bodywebsite #nav + #main { + padding-top: 4.25em; +} +.bodywebsite #nav ul { + margin: 0; + padding: 0; + list-style: none; +} +.bodywebsite #nav ul li { + -moz-transition: margin 0.2s ease; + -webkit-transition: margin 0.2s ease; + -ms-transition: margin 0.2s ease; + transition: margin 0.2s ease; + display: inline-block; + margin: 0 0.35em; + padding: 0; + vertical-align: middle; +} +.bodywebsite #nav ul li a { + -moz-transition: font-size 0.2s ease; + -webkit-transition: font-size 0.2s ease; + -ms-transition: font-size 0.2s ease; + transition: font-size 0.2s ease; + display: inline-block; + height: 2.25em; + line-height: 2.25em; + padding: 0 1.25em; + border: 0; + border-radius: 8px; + box-shadow: inset 0 0 0 1px transparent; +} +.bodywebsite #nav ul li a:hover { + background-color: rgba(222, 222, 222, 0.25); +} +.bodywebsite #nav ul li a.active { + background-color: #ffffff; + box-shadow: none; +} +.bodywebsite #nav.alt { + position: fixed; + top: 0; + padding-top: 0.5em; + padding-bottom: 0.5em; + background-color: rgba(247, 247, 247, 0.95); + border-top-left-radius: 0; + border-top-right-radius: 0; + z-index: 10000; +} +.bodywebsite #nav.alt ul li { + margin: 0 0.175em; +} +.bodywebsite #nav.alt ul li a { + font-size: 0.9em; +} +@media screen and (max-width: 736px) { + .bodywebsite #nav { + display: none; + } + .bodywebsite #nav + #main { + padding-top: 0; + } +} +.bodywebsite #main { + background-color: #ffffff; + color: #636363; + border-radius: 0.25em; +} +.bodywebsite #main input, +.bodywebsite #main select, +.bodywebsite #main textarea { + color: #636363; +} +.bodywebsite #main a:hover { + color: #636363; +} +.bodywebsite #main strong, +.bodywebsite #main b { + color: #636363; +} +.bodywebsite #main h1, +.bodywebsite #main h2, +.bodywebsite #main h3, +.bodywebsite #main h4, +.bodywebsite #main h5, +.bodywebsite #main h6 { + color: #636363; +} +.bodywebsite #main blockquote { + border-left-color: #dddddd; +} +.bodywebsite #main code { + background: rgba(222, 222, 222, 0.25); + border-color: #dddddd; +} +.bodywebsite #main hr { + border-bottom-color: #dddddd; +} +.bodywebsite #main .box { + border-color: #dddddd; +} +.bodywebsite #main input[type="submit"], +.bodywebsite #main input[type="reset"], +.bodywebsite #main input[type="button"], +.bodywebsite #main button, +.bodywebsite #main .buttonwebsite { + background-color: transparent; + box-shadow: inset 0 0 0 1px #dddddd; + color: #636363 !important; +} +.bodywebsite #main input[type="submit"]:hover, +.bodywebsite #main input[type="reset"]:hover, +.bodywebsite #main input[type="button"]:hover, +.bodywebsite #main button:hover, +.bodywebsite #main .buttonwebsite:hover { + background-color: rgba(222, 222, 222, 0.25); +} +.bodywebsite #main input[type="submit"]:active, +.bodywebsite #main input[type="reset"]:active, +.bodywebsite #main input[type="button"]:active, +.bodywebsite #main button:active, +.bodywebsite #main .buttonwebsite:active { + background-color: rgba(222, 222, 222, 0.5); +} +.bodywebsite #main input[type="submit"].icon:before, +.bodywebsite #main input[type="reset"].icon:before, +.bodywebsite #main input[type="button"].icon:before, +.bodywebsite #main button.icon:before, +.bodywebsite #main .buttonwebsite.icon:before { + color: rgba(99, 99, 99, 0.25); +} +.bodywebsite #main input[type="submit"].primary, +.bodywebsite #main input[type="reset"].primary, +.bodywebsite #main input[type="button"].primary, +.bodywebsite #main button.primary, +.bodywebsite #main .buttonwebsite.primary { + background-color: #8cc9f0; + color: #ffffff !important; + box-shadow: none; +} +.bodywebsite #main input[type="submit"].primary:hover, +.bodywebsite #main input[type="reset"].primary:hover, +.bodywebsite #main input[type="button"].primary:hover, +.bodywebsite #main button.primary:hover, +.bodywebsite #main .buttonwebsite.primary:hover { + background-color: #9acff2; +} +.bodywebsite #main input[type="submit"].primary:active, +.bodywebsite #main input[type="reset"].primary:active, +.bodywebsite #main input[type="button"].primary:active, +.bodywebsite #main button.primary:active, +.bodywebsite #main .buttonwebsite.primary:active { + background-color: #7ec3ee; +} +.bodywebsite #main input[type="submit"].primary.icon:before, +.bodywebsite #main input[type="reset"].primary.icon:before, +.bodywebsite #main input[type="button"].primary.icon:before, +.bodywebsite #main button.primary.icon:before, +.bodywebsite #main .buttonwebsite.primary.icon:before { + color: #ffffff !important; +} +.bodywebsite #main label { + color: #636363; +} +.bodywebsite #main input[type="text"], +.bodywebsite #main input[type="password"], +.bodywebsite #main input[type="email"], +.bodywebsite #main select, +.bodywebsite #main textarea { + background-color: rgba(222, 222, 222, 0.25); + border-color: #dddddd; +} +.bodywebsite #main input[type="text"]:focus, +.bodywebsite #main input[type="password"]:focus, +.bodywebsite #main input[type="email"]:focus, +.bodywebsite #main select:focus, +.bodywebsite #main textarea:focus { + border-color: #8cc9f0; + box-shadow: 0 0 0 1px #8cc9f0; +} +.bodywebsite #main select { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='%23dddddd' /%3E%3C/svg%3E"); +} +.bodywebsite #main select option { + color: #636363; + background: #ffffff; +} +.bodywebsite #main input[type="checkbox"] + label, +.bodywebsite #main input[type="radio"] + label { + color: #636363; +} +.bodywebsite #main input[type="checkbox"] + label:before, +.bodywebsite #main input[type="radio"] + label:before { + background: rgba(222, 222, 222, 0.25); + border-color: #dddddd; +} +.bodywebsite #main input[type="checkbox"]:checked + label:before, +.bodywebsite #main input[type="radio"]:checked + label:before { + background-color: #636363; + border-color: #636363; + color: #ffffff; +} +.bodywebsite #main input[type="checkbox"]:focus + label:before, +.bodywebsite #main input[type="radio"]:focus + label:before { + border-color: #8cc9f0; + box-shadow: 0 0 0 1px #8cc9f0; +} +.bodywebsite #main ::-webkit-input-placeholder { + color: rgba(99, 99, 99, 0.25) !important; +} +.bodywebsite #main :-moz-placeholder { + color: rgba(99, 99, 99, 0.25) !important; +} +.bodywebsite #main ::-moz-placeholder { + color: rgba(99, 99, 99, 0.25) !important; +} +.bodywebsite #main :-ms-input-placeholder { + color: rgba(99, 99, 99, 0.25) !important; +} +.bodywebsite #main .formerize-placeholder { + color: rgba(99, 99, 99, 0.25) !important; +} +.bodywebsite #main .icon.major { + border-color: #dddddd; +} +.bodywebsite #main .icon.major:before { + border-color: #dddddd; +} +.bodywebsite #main .icon.alt { + border-color: #dddddd; + color: #636363; +} +.bodywebsite #main .icon.alt:hover { + background-color: rgba(222, 222, 222, 0.25); +} +.bodywebsite #main .icon.alt:active { + background-color: rgba(222, 222, 222, 0.5); +} +.bodywebsite #main ul.alt li { + border-top-color: #dddddd; +} +.bodywebsite #main dl dt { + color: #636363; +} +.bodywebsite #main header.major h2:after { + background-color: #dddddd; + background-image: -moz-linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); + background-image: -webkit-linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); + background-image: -ms-linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); + background-image: linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); +} +.bodywebsite #main table tbody tr { + border-color: #dddddd; +} +.bodywebsite #main table tbody tr:nth-child(2n + 1) { + background-color: rgba(222, 222, 222, 0.25); +} +.bodywebsite #main table th { + color: #636363; +} +.bodywebsite #main table thead { + border-bottom-color: #dddddd; +} +.bodywebsite #main table tfoot { + border-top-color: #dddddd; +} +.bodywebsite #main table.alt tbody tr td { + border-color: #dddddd; +} +.bodywebsite #main .spotlight .image { + border-color: #dddddd; +} +.bodywebsite #main > .main { + padding: 5em 5em 3em 5em ; + border-top: solid 1px #dddddd; +} +.bodywebsite #main > .main:first-child { + border-top: 0; +} +.bodywebsite #main > .main .image.main:first-child { + margin: -5em 0 5em -5em; + width: calc(100% + 10em); + border-top-right-radius: 0.25em; + border-top-left-radius: 0.25em; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.bodywebsite #main > .main .image.main:first-child img { + border-top-right-radius: 0.25em; + border-top-left-radius: 0.25em; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +@media screen and (max-width: 1280px) { + .bodywebsite #main > .main { + padding: 4em 4em 2em 4em ; + } + .bodywebsite #main > .main .image.main:first-child { + margin: -4em 0 4em -4em; + width: calc(100% + 8em); + } +} +@media screen and (max-width: 980px) { + .bodywebsite #main > .main { + padding: 4em 3em 2em 3em ; + } + .bodywebsite #main > .main .image.main:first-child { + margin: -4em 0 4em -3em; + width: calc(100% + 6em); + } +} +@media screen and (max-width: 736px) { + .bodywebsite #main > .main { + padding: 3em 2em 1em 2em ; + } + .bodywebsite #main > .main .image.main:first-child { + margin: -3em 0 2em -2em; + width: calc(100% + 4em); + } +} +@media screen and (max-width: 480px) { + .bodywebsite #main > .main { + padding: 3em 1.5em 1em 1.5em; + } + .bodywebsite #main > .main .image.main:first-child { + margin: -3em 0 1.5em -1.5em; + width: calc(100% + 3em); + } +} +@media screen and (max-width: 360px) { + .bodywebsite #main { + border-radius: 0; + } + .bodywebsite #main > .main { + padding: 2.5em 1em 0.5em 1em; + } + .bodywebsite #main > .main .image.main:first-child { + margin: -2.5em 0 1.5em -1em; + width: calc(100% + 2em); + border-radius: 0; + } + .bodywebsite #main > .main .image.main:first-child img { + border-radius: 0; + } +} +.bodywebsite #footer section { + width: calc(50% - 22px); + padding: 10px; +} +.bodywebsite #footer { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + padding: 5em 5em 3em 5em ; +} +.bodywebsite #footer .copyright { + font-size: 0.8em; + text-align: center; +} +@media screen and (max-width: 1280px) { + .bodywebsite #footer { + padding: 4em 4em 2em 4em ; + } +} +@media screen and (max-width: 980px) { + .bodywebsite #footer { + padding: 4em 3em 2em 3em ; + display: block; + } + .bodywebsite #footer .copyright { + text-align: left; + } +} +@media screen and (max-width: 736px) { + .bodywebsite #footer { + padding: 3em 2em 1em 2em ; + } +} +@media screen and (max-width: 480px) { + .bodywebsite #footer { + padding: 3em 1.5em 1em 1.5em; + } +} +@media screen and (max-width: 480px) { + .bodywebsite #footer { + padding: 2.5em 1em 0.5em 1em; + } +} +.bodywebsite #wrapper { + width: 64em; + max-width: calc(100% - 4em); + margin: 0 auto; +} +@media screen and (max-width: 480px) { + .bodywebsite #wrapper { + max-width: calc(100% - 2em); + } +} +@media screen and (max-width: 360px) { + .bodywebsite #wrapper { + max-width: 100%; + } +} + +/* CSS for ToTop button */ + +#myBtnToTop { + display: none; /* Hidden by default */ + position: fixed; /* Fixed/sticky position */ + bottom: 20px; /* Place the button at the bottom of the page */ + right: 30px; /* Place the button 30px from the right */ + z-index: 99; /* Make sure it does not overlap */ + border: none; /* Remove borders */ + outline: none; /* Remove outline */ + background-color: #868; /* Set a background color */ + color: white; /* Text color */ + cursor: pointer; /* Add a mouse pointer on hover */ + padding: 15px; /* Some padding */ + border-radius: 10px; /* Rounded corners */ + font-size: 18px; /* Increase font size */ + min-width: unset; + height: unset; + line-height: unset; +} + +#myBtnToTop:hover { + background-color: #555; /* Add a dark-grey background on hover */ +} + diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/this-is-a-blog-post.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/this-is-a-blog-post.php new file mode 100644 index 00000000000..0b70a249b2c --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/this-is-a-blog-post.php @@ -0,0 +1,4 @@ +ref.'/page25.tpl.php'; diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/containers/wrapper.php b/htdocs/install/doctemplates/websites/website_template-stellar/containers/wrapper.php new file mode 100644 index 00000000000..4f1c281ee93 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/containers/wrapper.php @@ -0,0 +1,239 @@ +entity; +$original_file = GETPOST("file", "alpha"); +$l = GETPOST('l', 'aZ09'); +$limit = GETPOST('limit', 'int'); + +// Parameters for RSS +$rss = GETPOST('rss', 'aZ09'); +if ($rss) $original_file = 'blog.rss'; + +// If we have a hash public (hashp), we guess the original_file. +if (!empty($hashp)) { + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($db); + $result = $ecmfile->fetch(0, '', '', '', $hashp); + if ($result > 0) { + $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory + // filepath can be 'users/X' or 'X/propale/PR11111' + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. + $tmp = explode('/', $tmp[1], 2); + } + $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path + + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { + // We remove first level of directory + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + //var_dump($original_file); exit; + } else { + print 'Bad link. File is from another module part.'; + } + } else { + $modulepart = $moduleparttocheck; + $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir + } + } else { + print "ErrorFileNotFoundWithSharedLink"; + exit; + } +} + +// Define attachment (attachment=true to force choice popup 'open'/'save as') +$attachment = true; +if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false; +if (isset($_GET["attachment"])) $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment = false; + +// Define mime type +$type = 'application/octet-stream'; +if (GETPOSTISSET('type')) $type = GETPOST('type', 'alpha'); +else $type = dol_mimetype($original_file); + +// Security: Delete string ../ into $original_file +$original_file = str_replace("../", "/", $original_file); + +// Cache or not +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { + // Important: Following code is to avoid page request by browser and PHP CPU at + // each Dolibarr page access. + header('Cache-Control: max-age=3600, public, must-revalidate'); + header('Pragma: cache'); // This is to avoid having Pragma: no-cache +} + +$refname = basename(dirname($original_file)."/"); + +// Get RSS news +if ($rss) { + $format = 'rss'; + $type = ''; + $cachedelay = 0; + $filename = $original_file; + $dir_temp = $conf->website->dir_temp; + + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; + $website = new Website($db); + $websitepage = new WebsitePage($db); + + $website->fetch('', $websitekey); + + $filters = array('type_container'=>'blogpost'); + if ($l) $filters['lang'] = $l; + + $MAXNEWS = ($limit ? $limit : 20); + $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); + $eventarray = array(); + if (is_array($arrayofblogs)) { + foreach ($arrayofblogs as $blog) { + $blog->fullpageurl = $website->virtualhost.'/'.$blog->pageurl.'.php'; + $eventarray[] = $blog; + } + } + + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + + dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + + // Clean parameters + if (!$filename) { + $extension = 'rss'; + $filename = $format.'.'.$extension; + } + + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($dir_temp); + $outputfile = $dir_temp.'/'.$filename; + + $result = 0; + + $buildfile = true; + + if ($cachedelay) { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { + dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } + + if ($buildfile) { + $langs->load("other"); + $title = $desc = $langs->transnoentities('LatestBlogPosts'); + + // Create temp file + $outputfiletmp = tempnam($dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + + // Write file + $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); + + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) $result = 1; + else { + $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog("build_exportfile ".$error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + print $error; + exit(-1); + } + } else { + dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + print $langs->trans("ErrorFailToCreateFile", $outputfile); + exit(-1); + } + } + + if ($result >= 0) { + $attachment = false; + if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; + //$attachment = false; + $contenttype = 'application/rss+xml'; + if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; + //$contenttype='text/plain'; + $outputencoding = 'UTF-8'; + + if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); + + // Ajout directives pour resoudre bug IE + //header('Cache-Control: Public, must-revalidate'); + //header('Pragma: public'); + if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + else header('Cache-Control: private, must-revalidate'); + + // Clean parameters + $outputfile = $dir_temp.'/'.$filename; + $result = readfile($outputfile); + if (!$result) print 'File '.$outputfile.' was empty.'; + + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + exit; + } +} +// Get logos +elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); +} else { + // Find the subdirectory name as the reference + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); + $accessallowed = $check_access['accessallowed']; + $sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals']; + $fullpath_original_file = $check_access['original_file']; // $fullpath_original_file is now a full path name + if ($hashp) { + $accessallowed = 1; // When using hashp, link is public so we force $accessallowed + $sqlprotectagainstexternals = ''; + } + + // Security: + // Limit access if permissions are wrong + if (!$accessallowed) { + print 'Access forbidden'; + exit; + } + + clearstatcache(); + + $filename = basename($fullpath_original_file); + + // Output file on browser + dol_syslog("wrapper.php download $fullpath_original_file filename=$filename content-type=$type"); + $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset + + // This test if file exists should be useless. We keep it to find bug more easily + if (!file_exists($fullpath_original_file_osencoded)) { + print "ErrorFileDoesNotExists: ".$original_file; + exit; + } + + // Permissions are ok and file found, so we return it + //top_httphead($type); + header('Content-Type: '.$type); + header('Content-Description: File Transfer'); + if ($encoding) header('Content-Encoding: '.$encoding); + // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) + if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); + else header('Content-Disposition: inline; filename="'.$filename.'"'); + header('Content-Length: '.dol_filesize($fullpath_original_file)); + + readfile($fullpath_original_file_osencoded); +} +if (is_object($db)) $db->close(); +// END PHP diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/daviddoe.png b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/daviddoe.png new file mode 100644 index 00000000000..ec1fe6eacb9 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/daviddoe.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/overlay.png b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/overlay.png new file mode 100644 index 00000000000..a5619432c61 Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/overlay.png differ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/pic01.jpg b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/pic01.jpg new file mode 100644 index 00000000000..b484c83143b Binary files /dev/null and b/htdocs/install/doctemplates/websites/website_template-stellar/medias/image/websitekey/pic01.jpg differ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar/website_pages.sql b/htdocs/install/doctemplates/websites/website_template-stellar/website_pages.sql new file mode 100644 index 00000000000..59ad32e4bf0 --- /dev/null +++ b/htdocs/install/doctemplates/websites/website_template-stellar/website_pages.sql @@ -0,0 +1,18 @@ +-- Page ID 20 -> 1__+MAX_llx_website_page__ - Aliases credits --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(1__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'credits', '', 'Credits', 'Credits and legal notices', 'en', '', '', '1', '2019-08-15 16:39:56', '2020-02-21 10:27:17', null, '', 'page', '', ' __N__ __N__
    __N____N__ __N__
    __N__

    Mentions légales

    __N__

    Curriculum Vitae

    __N__
    __N____N__ __N__ __N____N__ __N__
    __N____N__ __N__
    __N____N__

    __N__ __N__This site is edited by name; ?>__N____N__ __N__

    __N____N__
    __N____N__
    __N____N__ __N__ __N____N__
    __N____N__', '', '0'); +-- Page ID 21 -> 2__+MAX_llx_website_page__ - Aliases footer --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(2__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'footer', '', 'Footer', '', 'fr', '', '', '1', '2019-08-15 16:42:44', '2020-06-19 10:18:14', null, '', 'page', '', ' __N__
    __N__
    __N__

    Aliquam sed mauris

    __N__

    Sed lorem ipsum dolor sit amet et nullam consequat feugiat consequat magna adipiscing tempus etiam dolore veroeros. eget dapibus mauris. Cras aliquet, nisl ut viverra sollicitudin, ligula erat egestas velit, vitae tincidunt odio.

    __N__ __N__
    __N__
    __N__

    Etiam feugiat

    __N__
    __N__
    Address
    __N__
    getFullAddress(1, \'
    \'); ?>
    __N__
    Phone
    __N__
    phone; ?>
    __N__
    Email
    __N__
    email; ?>\">email; ?>
    __N__
    __N__
      __N__ __N__
    __N__
    © Untitled. Design: HTML5 UP adapted for Dolibarr by DoliCloud.
    __N__
    __N____N____N____N____N____N__', '', '0'); +-- Page ID 22 -> 3__+MAX_llx_website_page__ - Aliases generic --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(3__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'generic', '', 'Generic page', 'Generic page or my personal Blog', 'en', '', 'My generic page', '1', '2019-08-15 00:03:43', '2020-05-14 18:48:34', null, '', 'page', '', ' __N____N__
    __N____N__ __N__
    __N__

    Another page

    __N__

    Ipsum dolor sit amet nullam

    __N__
    __N____N__ __N__ __N____N__ __N__
    __N____N__ __N__
    __N__ \"\"__N__

    Magna feugiat lorem

    __N__

    Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet. Pellentesque leo mauris, consectetur id ipsum sit amet, fergiat. Pellentesque in mi eu massa lacinia malesuada et a elit. Donec urna ex, lacinia in purus ac, pretium pulvinar mauris. Curabitur sapien risus, commodo eget turpis at, elementum convallis fames ac ante ipsum primis in faucibus.

    __N__

    Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet.

    __N__

    Tempus veroeros

    __N__

    Cep risus aliquam gravida cep ut lacus amet. Adipiscing faucibus nunc placerat. Tempus adipiscing turpis non blandit accumsan eget lacinia nunc integer interdum amet aliquam ut orci non col ut ut praesent.

    __N__
    __N____N__ __N__
    __N__

    Latest Blog posts

    __N__
    __N__ loadLangs(array(\"main\",\"website\"));__N__ $fuser = new User($db);__N__ $arrayofblogs = $websitepage->fetchAll($website->id, \'DESC\', \'date_creation\', 5, 0, array(\'type_container\'=>\'blogpost\', \'status\'=>1, \'lang\'=>\'null,\'.$websitepage->lang)); // , \'keywords\'=>$keyword__N__ if (is_numeric($arrayofblogs) && $arrayofblogs < 0)__N__ {__N__ print \'
    \'.$weblangs->trans($websitepage->error).\'
    \';__N__ }__N__ elseif (is_array($arrayofblogs) && ! empty($arrayofblogs))__N__ {__N__ foreach($arrayofblogs as $blog)__N__ {__N__ print \'\';__N__ }__N__ }__N__ else__N__ {__N__ print \'
    \';__N__ print \'
    \';__N__ //print $weblangs->trans(\"NoArticlesFoundForTheKeyword\", $keyword);__N__ print $weblangs->trans(\"NoArticlesFound\");__N__ print \'
    \';__N__ print \'
    \';__N__ __N__ }__N__ ?>__N__
    __N__
    __N____N__
    __N____N____N____N__ __N__ __N__ __N__ __N__
    __N____N__', '', '0'); +-- Page ID 23 -> 4__+MAX_llx_website_page__ - Aliases home --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(4__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'home', '', 'My personal blog', 'Home page or my personal Blog', 'en', '', 'My personal blog', '1', '2019-08-15 00:03:43', '2022-07-06 23:50:25', null, '', 'page', '', '__N__
    __N____N__ __N__
    __N__
    __N__

    David Doe

    __N__

    Welcome on my website
    __N__

    __N__
    __N__
    __N____N__ __N__ __N____N__ __N__
    __N____N__ __N__
    __N__
    __N__
    __N__
    __N__

    Ipsum sed adipiscing

    __N__
    __N__

    Sed lorem ipsum dolor sit amet nullam consequat feugiat consequat magna__N__ adipiscing magna etiam amet veroeros. Lorem ipsum dolor tempus sit cursus.__N__ Tempus nisl et nullam lorem ipsum dolor sit amet aliquam.

    __N__ __N__
    __N__ \"\"__N__
    __N__
    __N____N__ __N__
    __N__
    __N__

    Magna veroeros

    __N__
    __N__
      __N__
    • __N__ __N__

      Ipsum consequat

      __N__

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      __N__
    • __N__
    • __N__ __N__

      Amed sed feugiat

      __N__

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      __N__
    • __N__
    • __N__ __N__

      Dolor nullam

      __N__

      Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

      __N__
    • __N__
    __N__ __N__
    __N____N__ __N__
    __N__
    __N__

    Ipsum consequat

    __N__

    Donec imperdiet consequat consequat. Suspendisse feugiat congue
    __N__ posuere. Nulla massa urna, fermentum eget quam aliquet.

    __N__
    __N__
      __N__
    • __N__ __N__ 5,120 Etiam__N__
    • __N__
    • __N__ __N__ 8,192 Magna__N__
    • __N__
    • __N__ __N__ 2,048 Tempus__N__
    • __N__
    • __N__ __N__ 4,096 Aliquam__N__
    • __N__
    • __N__ __N__ 1,024 Nullam__N__
    • __N__
    __N__

    Nam elementum nisl et mi a commodo porttitor. Morbi sit amet nisl eu arcu faucibus hendrerit vel a risus. Nam a orci mi, elementum ac arcu sit amet, fermentum pellentesque et purus. Integer maximus varius lorem, sed convallis diam accumsan sed. Etiam porttitor placerat sapien, sed eleifend a enim pulvinar faucibus semper quis ut arcu. Ut non nisl a mollis est efficitur vestibulum. Integer eget purus nec nulla mattis et accumsan ut magna libero. Morbi auctor iaculis porttitor. Sed ut magna ac risus et hendrerit scelerisque. Praesent eleifend lacus in lectus aliquam porta. Cras eu ornare dui curabitur lacinia.

    __N__ __N__
    __N____N__ __N__
    __N__
    __N__

    Congue imperdiet

    __N__

    Donec imperdiet consequat consequat. Suspendisse feugiat congue
    __N__ posuere. Nulla massa urna, fermentum eget quam aliquet.

    __N__
    __N__ __N__
    __N____N__
    __N____N__ __N____N__
    __N____N__', '', '0'); +UPDATE llx_website SET fk_default_home = 4__+MAX_llx_website_page__ WHERE rowid = __WEBSITE_ID__; +-- Page ID 24 -> 5__+MAX_llx_website_page__ - Aliases menu --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(5__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'menu', '', 'Menu', 'Menu common to all pages', 'fr', '', '', '1', '2019-08-15 00:03:43', '2020-02-21 10:27:17', null, '', 'menu', '', '__N__', '', '0'); +-- Page ID 25 -> 6__+MAX_llx_website_page__ - Aliases this-is-a-blog-post --; +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(6__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'this-is-a-blog-post', '', 'This is a Blog post', 'This is a full meta description of the article', '', '', 'blog', '1', '2019-08-17 17:18:45', '2022-07-06 23:50:25', null, '', 'blogpost', '', '__N__
    __N__ This is a blog post article...__N__
    __N__', 'webmaster', '0'); + +-- For Dolibarr v14+ --; +UPDATE llx_website SET lang = 'en' WHERE rowid = __WEBSITE_ID__; +UPDATE llx_website SET otherlang = '' WHERE rowid = __WEBSITE_ID__; + diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index f8dcdfe230b..24afafbb83c 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -448,6 +448,7 @@ if (!empty($force_install_noedit)) { diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 657e9841100..e68f0d70a96 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -35,24 +35,16 @@ require_once '../filefunc.inc.php'; -// Define DOL_DOCUMENT_ROOT and ADODB_PATH used for install/upgrade process +// Define DOL_DOCUMENT_ROOT used for install/upgrade process if (!defined('DOL_DOCUMENT_ROOT')) { define('DOL_DOCUMENT_ROOT', '..'); } -if (!defined('ADODB_PATH')) { - $foundpath = DOL_DOCUMENT_ROOT.'/includes/adodbtime/'; - if (!is_dir($foundpath)) { - $foundpath = '/usr/share/php/adodb/'; - } - define('ADODB_PATH', $foundpath); -} require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once ADODB_PATH.'adodb-time.inc.php'; $conf = new Conf(); @@ -319,7 +311,7 @@ function conf($dolibarr_main_document_root) $conf->db->port = trim($dolibarr_main_db_port); $conf->db->name = trim($dolibarr_main_db_name); $conf->db->user = trim($dolibarr_main_db_user); - $conf->db->pass = trim($dolibarr_main_db_pass); + $conf->db->pass = (empty($dolibarr_main_db_pass) ? '' : trim($dolibarr_main_db_pass)); // Mysql driver support has been removed in favor of mysqli if ($conf->db->type == 'mysql') { diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 61b3f346b39..6b32c245305 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -6,7 +6,7 @@ -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2014 Alexandre Spangaro --- Copyright (C) 2021 Udo Tamm +-- Copyright (C) 2021-2022 Udo Tamm -- -- 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,254 +28,254 @@ -- -- delete from llx_c_country; -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (0,'',NULL,'-',1,1); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (1,'FR','FRA','France',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (2,'BE','BEL','Belgium',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (3,'IT','ITA','Italy',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (4,'ES','ESP','Spain',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (5,'DE','DEU','Germany',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (6,'CH','CHE','Switzerland',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (7,'GB','GBR','United Kingdom',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (8,'IE','IRL','Ireland',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (9,'CN','CHN','China',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (10,'TN','TUN','Tunisia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (11,'US','USA','United States',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (12,'MA','MAR','Morocco',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (13,'DZ','DZA','Algeria',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (14,'CA','CAN','Canada',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (15,'TG','TGO','Togo',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (16,'GA','GAB','Gabon',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (17,'NL','NLD','Netherlands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (18,'HU','HUN','Hungary',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (19,'RU','RUS','Russia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (20,'SE','SWE','Sweden',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (21,'CI','CIV','Côte d''Ivoire',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (22,'SN','SEN','Senegal',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (23,'AR','ARG','Argentina',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (24,'CM','CMR','Cameroun',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (25,'PT','PRT','Portugal',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (26,'SA','SAU','Saudi Arabia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (27,'MC','MCO','Monaco',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (28,'AU','AUS','Australia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (29,'SG','SGP','Singapore',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (30,'AF','AFG','Afghanistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (31,'AX','ALA','Åland Island',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (32,'AL','ALB','Albania',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (33,'AS','ASM','American Samoa',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (34,'AD','AND','Andorra',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (35,'AO','AGO','Angola',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (36,'AI','AIA','Anguilla',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (37,'AQ','ATA','Antarctica',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (38,'AG','ATG','Antigua and Barbuda',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (39,'AM','ARM','Armenia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (41,'AT','AUT','Austria',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (42,'AZ','AZE','Azerbaijan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (43,'BS','BHS','Bahamas',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (44,'BH','BHR','Bahrain',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (45,'BD','BGD','Bangladesh',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (46,'BB','BRB','Barbados',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (47,'BY','BLR','Belarus',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (48,'BZ','BLZ','Belize',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (49,'BJ','BEN','Benin',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (50,'BM','BMU','Bermuda',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (51,'BT','BTN','Bhutan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (52,'BO','BOL','Bolivia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (53,'BA','BIH','Bosnia and Herzegovina',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (54,'BW','BWA','Botswana',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (55,'BV','BVT','Bouvet Island',0,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (56,'BR','BRA','Brazil',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (57,'IO','IOT','British Indian Ocean Territory',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (58,'BN','BRN','Brunei',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (59,'BG','BGR','Bulgaria',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (60,'BF','BFA','Burkina Faso',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (61,'BI','BDI','Burundi',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (62,'KH','KHM','Cambodge',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (63,'CV','CPV','Cap-Vert',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (64,'KY','CYM','Iles Cayman',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (65,'CF','CAF','République centrafricaine',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (66,'TD','TCD','Tchad',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (67,'CL','CHL','Chili',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (68,'CX','CXR','Ile Christmas',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (69,'CC','CCK','Iles des Cocos (Keeling)',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (70,'CO','COL','Colombie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (71,'KM','COM','Comores',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (72,'CG','COG','Congo',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (73,'CD','COD','République démocratique du Congo',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (74,'CK','COK','Iles Cook',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (75,'CR','CRI','Costa Rica',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (76,'HR','HRV','Croatie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (77,'CU','CUB','Cuba',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (78,'CY','CYP','Cyprus',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (79,'CZ','CZE','Czech Republic',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (80,'DK','DNK','Denmark',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (81,'DJ','DJI','Djibouti',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (82,'DM','DMA','Dominica',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (83,'DO','DOM','Dominican Republic',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (84,'EC','ECU','Republic of Ecuador',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (85,'EG','EGY','Egypt',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (86,'SV','SLV','El Salvador',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (87,'GQ','GNQ','Equatorial Guinea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (88,'ER','ERI','Eritrea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (89,'EE','EST','Estonia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (90,'ET','ETH','Ethiopia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (91,'FK','FLK','Falkland Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (92,'FO','FRO','Faroe Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (93,'FJ','FJI','Fidji Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (94,'FI','FIN','Finland',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (95,'GF','GUF','French Guiana',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (96,'PF','PYF','French Polynesia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (97,'TF','ATF','Terres australes françaises',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (98,'GM','GMB','Gambie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (99,'GE','GEO','Georgia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (100,'GH','GHA','Ghana',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (101,'GI','GIB','Gibraltar',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (102,'GR','GRC','Greece',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (103,'GL','GRL','Groenland',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (104,'GD','GRD','Grenade',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (106,'GU','GUM','Guam',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (107,'GT','GTM','Guatemala',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (108,'GN','GIN','Guinea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (109,'GW','GNB','Guinea-Bissao',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (111,'HT','HTI','Haiti',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (112,'HM','HMD','Iles Heard et McDonald',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (113,'VA','VAT','Saint-Siège (Vatican)',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (114,'HN','HND','Honduras',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (115,'HK','HKG','Hong Kong',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (116,'IS','ISL','Islande',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (117,'IN','IND','India',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (118,'ID','IDN','Indonésie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (119,'IR','IRN','Iran',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (120,'IQ','IRQ','Iraq',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (121,'IL','ISR','Israel',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (122,'JM','JAM','Jamaïque',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (123,'JP','JPN','Japon',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (124,'JO','JOR','Jordanie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (125,'KZ','KAZ','Kazakhstan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (126,'KE','KEN','Kenya',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (127,'KI','KIR','Kiribati',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (128,'KP','PRK','North Corea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (129,'KR','KOR','South Corea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (130,'KW','KWT','Koweït',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (131,'KG','KGZ','Kirghizistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (132,'LA','LAO','Laos',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (133,'LV','LVA','Lettonie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (134,'LB','LBN','Liban',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (135,'LS','LSO','Lesotho',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (136,'LR','LBR','Liberia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (137,'LY','LBY','Libye',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (138,'LI','LIE','Liechtenstein',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (139,'LT','LTU','Lituanie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (140,'LU','LUX','Luxembourg',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (141,'MO','MAC','Macao',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (142,'MK','MKD','ex-République yougoslave de Macédoine',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (143,'MG','MDG','Madagascar',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (144,'MW','MWI','Malawi',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (145,'MY','MYS','Malaisie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (146,'MV','MDV','Maldives',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (147,'ML','MLI','Mali',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (148,'MT','MLT','Malte',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (149,'MH','MHL','Iles Marshall',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (151,'MR','MRT','Mauritanie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (152,'MU','MUS','Maurice',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (153,'YT','MYT','Mayotte',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (154,'MX','MEX','Mexique',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (155,'FM','FSM','Micronésie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (156,'MD','MDA','Moldavie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (157,'MN','MNG','Mongolie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (158,'MS','MSR','Monserrat',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (159,'MZ','MOZ','Mozambique',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (160,'MM','MMR','Birmanie (Myanmar)',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (161,'NA','NAM','Namibie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (162,'NR','NRU','Nauru',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (163,'NP','NPL','Népal',1,0); ---INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (164,'AN','AWP','Antilles néerlandaises',1,0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (0, '', NULL, '-', 1, 1); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (1, 'FR', 'FRA', 'France', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (2, 'BE', 'BEL', 'Belgium', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (3, 'IT', 'ITA', 'Italy', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (4, 'ES', 'ESP', 'Spain', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (5, 'DE', 'DEU', 'Germany', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (6, 'CH', 'CHE', 'Switzerland', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (7, 'GB', 'GBR', 'United Kingdom', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (8, 'IE', 'IRL', 'Ireland', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (9, 'CN', 'CHN', 'China', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (10, 'TN', 'TUN', 'Tunisia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (11, 'US', 'USA', 'United States', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (12, 'MA', 'MAR', 'Morocco', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (13, 'DZ', 'DZA', 'Algeria', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (14, 'CA', 'CAN', 'Canada', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (15, 'TG', 'TGO', 'Togo', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (16, 'GA', 'GAB', 'Gabon', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (17, 'NL', 'NLD', 'Netherlands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (18, 'HU', 'HUN', 'Hungary', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (19, 'RU', 'RUS', 'Russia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (20, 'SE', 'SWE', 'Sweden', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (21, 'CI', 'CIV', 'Côte d''Ivoire', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (22, 'SN', 'SEN', 'Senegal', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (23, 'AR', 'ARG', 'Argentina', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (24, 'CM', 'CMR', 'Cameroun', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (25, 'PT', 'PRT', 'Portugal', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (26, 'SA', 'SAU', 'Saudi Arabia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (27, 'MC', 'MCO', 'Monaco', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (28, 'AU', 'AUS', 'Australia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (29, 'SG', 'SGP', 'Singapore', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (30, 'AF', 'AFG', 'Afghanistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (31, 'AX', 'ALA', 'Åland Island', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (32, 'AL', 'ALB', 'Albania', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (33, 'AS', 'ASM', 'American Samoa', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (34, 'AD', 'AND', 'Andorra', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (35, 'AO', 'AGO', 'Angola', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (36, 'AI', 'AIA', 'Anguilla', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (37, 'AQ', 'ATA', 'Antarctica', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (38, 'AG', 'ATG', 'Antigua and Barbuda', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (39, 'AM', 'ARM', 'Armenia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (41, 'AT', 'AUT', 'Austria', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (42, 'AZ', 'AZE', 'Azerbaijan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (43, 'BS', 'BHS', 'Bahamas', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (44, 'BH', 'BHR', 'Bahrain', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (45, 'BD', 'BGD', 'Bangladesh', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (46, 'BB', 'BRB', 'Barbados', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (47, 'BY', 'BLR', 'Belarus', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (48, 'BZ', 'BLZ', 'Belize', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (49, 'BJ', 'BEN', 'Benin', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (50, 'BM', 'BMU', 'Bermuda', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (51, 'BT', 'BTN', 'Bhutan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (52, 'BO', 'BOL', 'Bolivia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (53, 'BA', 'BIH', 'Bosnia and Herzegovina', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (54, 'BW', 'BWA', 'Botswana', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (55, 'BV', 'BVT', 'Bouvet Island',0,0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (56, 'BR', 'BRA', 'Brazil', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (57, 'IO', 'IOT', 'British Indian Ocean Territory', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (58, 'BN', 'BRN', 'Brunei', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (59, 'BG', 'BGR', 'Bulgaria', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (60, 'BF', 'BFA', 'Burkina Faso', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (61, 'BI', 'BDI', 'Burundi', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (62, 'KH', 'KHM', 'Cambodge / Cambodia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (63, 'CV', 'CPV', 'Cap-Vert', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (64, 'KY', 'CYM', 'Iles Cayman', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (65, 'CF', 'CAF', 'Central African Republic (CAR/RCA)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (66, 'TD', 'TCD', 'Tchad', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (67, 'CL', 'CHL', 'Chile', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (68, 'CX', 'CXR', 'Ile Christmas', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (69, 'CC', 'CCK', 'Iles des Cocos (Keeling)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (70, 'CO', 'COL', 'Colombie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (71, 'KM', 'COM', 'Comores', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (72, 'CG', 'COG', 'Congo', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (73, 'CD', 'COD', 'DR Congo (RDC)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (74, 'CK', 'COK', 'Iles Cook', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (75, 'CR', 'CRI', 'Costa Rica', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (76, 'HR', 'HRV', 'Croatia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (77, 'CU', 'CUB', 'Cuba', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (78, 'CY', 'CYP', 'Cyprus', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (79, 'CZ', 'CZE', 'Czech Republic', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (80, 'DK', 'DNK', 'Denmark', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (81, 'DJ', 'DJI', 'Djibouti', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (82, 'DM', 'DMA', 'Dominica', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (83, 'DO', 'DOM', 'Dominican Republic', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (84, 'EC', 'ECU', 'Republic of Ecuador', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (85, 'EG', 'EGY', 'Egypt', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (86, 'SV', 'SLV', 'El Salvador', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (87, 'GQ', 'GNQ', 'Equatorial Guinea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (88, 'ER', 'ERI', 'Eritrea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (89, 'EE', 'EST', 'Estonia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (90, 'ET', 'ETH', 'Ethiopia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (91, 'FK', 'FLK', 'Falkland Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (92, 'FO', 'FRO', 'Faroe Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (93, 'FJ', 'FJI', 'Fidji Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (94, 'FI', 'FIN', 'Finland', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (95, 'GF', 'GUF', 'French Guiana', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (96, 'PF', 'PYF', 'French Polynesia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (97, 'TF', 'ATF', 'Terres australes françaises', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (98, 'GM', 'GMB', 'Gambie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (99, 'GE', 'GEO', 'Georgia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (100, 'GH', 'GHA', 'Ghana', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (101, 'GI', 'GIB', 'Gibraltar', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (102, 'GR', 'GRC', 'Greece', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (103, 'GL', 'GRL', 'Groenland', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (104, 'GD', 'GRD', 'Grenade', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (106, 'GU', 'GUM', 'Guam', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (107, 'GT', 'GTM', 'Guatemala', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (108, 'GN', 'GIN', 'Guinea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (109, 'GW', 'GNB', 'Guinea-Bissao', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (111, 'HT', 'HTI', 'Haiti', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (112, 'HM', 'HMD', 'Iles Heard et McDonald', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (113, 'VA', 'VAT', 'Vatican City (Saint-Siège)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (114, 'HN', 'HND', 'Honduras', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (115, 'HK', 'HKG', 'Hong Kong', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (116, 'IS', 'ISL', 'Islande', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (117, 'IN', 'IND', 'India', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (118, 'ID', 'IDN', 'Indonesia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (119, 'IR', 'IRN', 'Iran', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (120, 'IQ', 'IRQ', 'Iraq', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (121, 'IL', 'ISR', 'Israel', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (122, 'JM', 'JAM', 'Jamaica', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (123, 'JP', 'JPN', 'Japan (Nippon)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (124, 'JO', 'JOR', 'Jordanie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (125, 'KZ', 'KAZ', 'Kazakhstan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (126, 'KE', 'KEN', 'Kenya', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (127, 'KI', 'KIR', 'Kiribati', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (128, 'KP', 'PRK', 'North Corea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (129, 'KR', 'KOR', 'South Corea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (130, 'KW', 'KWT', 'Koweït', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (131, 'KG', 'KGZ', 'Kirghizistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (132, 'LA', 'LAO', 'Laos', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (133, 'LV', 'LVA', 'Lettonie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (134, 'LB', 'LBN', 'Liban', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (135, 'LS', 'LSO', 'Lesotho', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (136, 'LR', 'LBR', 'Liberia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (137, 'LY', 'LBY', 'Libye', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (138, 'LI', 'LIE', 'Liechtenstein', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (139, 'LT', 'LTU', 'Lituanie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (140, 'LU', 'LUX', 'Luxembourg', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (141, 'MO', 'MAC', 'Macao', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (142, 'MK', 'MKD', 'North Macedonia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (143, 'MG', 'MDG', 'Madagascar', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (144, 'MW', 'MWI', 'Malawi', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (145, 'MY', 'MYS', 'Malaisie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (146, 'MV', 'MDV', 'Maldives', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (147, 'ML', 'MLI', 'Mali', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (148, 'MT', 'MLT', 'Malte', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (149, 'MH', 'MHL', 'Iles Marshall', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (151, 'MR', 'MRT', 'Mauritanie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (152, 'MU', 'MUS', 'Maurice', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (153, 'YT', 'MYT', 'Mayotte', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (154, 'MX', 'MEX', 'Mexique', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (155, 'FM', 'FSM', 'Micronésie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (156, 'MD', 'MDA', 'Moldavie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (157, 'MN', 'MNG', 'Mongolie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (158, 'MS', 'MSR', 'Monserrat', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (159, 'MZ', 'MOZ', 'Mozambique', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (160, 'MM', 'MMR', 'Birmanie (Myanmar)', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (161, 'NA', 'NAM', 'Namibie', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (162, 'NR', 'NRU', 'Nauru', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (163, 'NP', 'NPL', 'Népal', 1, 0); +--INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (164, 'AN', 'AWP', 'Antilles néerlandaises', 1, 0); --The Antilles nederland does not exist anymore as a seperate country since 2010. Aruba, Curaçao and Sint Maarten became seperate countries then: -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (40,'AW','ABW','Aruba',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (300,'CW','CUW','Curaçao',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (301,'SX','SXM','Sint Maarten',1,0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (40, 'AW', 'ABW', 'Aruba', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (300, 'CW', 'CUW', 'Curaçao', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (301, 'SX', 'SXM', 'Sint Maarten', 1, 0); --End of antilles nederland -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (165,'NC','NCL','New Caledonia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (166,'NZ','NZL','New Zealand',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (167,'NI','NIC','Nicaragua',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (168,'NE','NER','Niger',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (169,'NG','NGA','Nigeria',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (170,'NU','NIU','Niue',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (171,'NF','NFK','Norfolk Island',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (172,'MP','MNP','Northern Mariana Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (173,'NO','NOR','Norway',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (174,'OM','OMN','Oman',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (175,'PK','PAK','Pakistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (176,'PW','PLW','Palau',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (177,'PS','PSE','Palestinian territories',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (178,'PA','PAN','Panama',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (179,'PG','PNG','Papua New Guinea',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (180,'PY','PRY','Paraguay',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (181,'PE','PER','Peru',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (182,'PH','PHL','Philippines',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (183,'PN','PCN','Pitcairn Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (184,'PL','POL','Pologne',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (185,'PR','PRI','Puerto Rico',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (186,'QA','QAT','Qatar',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Romania',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (189,'RW','RWA','Rwanda',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Saint Helena',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint Kitts and Nevis',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Saint Lucia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint Pierre and Miquelon',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint Vincent and the Grenadines',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (195,'WS','WSM','Samoa',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','San Marino ',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Saint Thomas and Prince',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (199,'SC','SYC','Seychelles',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (200,'SL','SLE','Sierra Leone',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovakia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovenia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (203,'SB','SLB','Solomon Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (204,'SO','SOM','Somalia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (205,'ZA','ZAF','South Africa',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (206,'GS','SGS','South Georgia and the South Sandwich Islands ',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (207,'LK','LKA','Sri Lanka',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (208,'SD','SDN','Sudan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (209,'SR','SUR','Suriname',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (210,'SJ','SJM','Svalbard and Jan Mayen',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (211,'SZ','SWZ','Swaziland / Eswatini',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (212,'SY','SYR','Syria',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (213,'TW','TWN','Taiwan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (214,'TJ','TJK','Tajikistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (215,'TZ','TZA','Tanzania',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (216,'TH','THA','Thailand',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (217,'TL','TLS','Timor-Leste',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (218,'TK','TKL','Tokelau',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (219,'TO','TON','Tonga',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (220,'TT','TTO','Trinidad and Tobago',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (221,'TR','TUR','Turkey',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (222,'TM','TKM','Turkmenistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (223,'TC','TCA','Turks and Caicos Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (224,'TV','TUV','Tuvalu',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (225,'UG','UGA','Uganda',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (226,'UA','UKR','Ukraine',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (227,'AE','ARE','United Arab Emirates',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (228,'UM','UMI','United States Minor Outlying Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (229,'UY','URY','Uruguay',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (230,'UZ','UZB','Uzbekistan',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (231,'VU','VUT','Vanuatu',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (232,'VE','VEN','Venezuela',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (233,'VN','VNM','Vietnam',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (234,'VG','VGB','British Virgin Islands',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (235,'VI','VIR','Virgin Islands of the United States',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (236,'WF','WLF','Wallis and Futuna',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (237,'EH','ESH','Western Sahara',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (238,'YE','YEM','Yemen',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (239,'ZM','ZMB','Zambia',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (240,'ZW','ZWE','Zimbabwe',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (241,'GG','GGY','Guernsey',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (242,'IM','IMN','Isle of Man',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (243,'JE','JEY','Jersey',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (244,'ME','MNE','Montenegro',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (245,'BL','BLM','Saint-Barthélemy',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (246,'MF','MAF','Saint-Martin',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (247,'XK','XKX','Kosovo',1,0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (165, 'NC', 'NCL', 'New Caledonia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (166, 'NZ', 'NZL', 'New Zealand', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (167, 'NI', 'NIC', 'Nicaragua', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (168, 'NE', 'NER', 'Niger', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (169, 'NG', 'NGA', 'Nigeria', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (170, 'NU', 'NIU', 'Niue', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (171, 'NF', 'NFK', 'Norfolk Island', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (172, 'MP', 'MNP', 'Northern Mariana Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (173, 'NO', 'NOR', 'Norway', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (174, 'OM', 'OMN', 'Oman', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (175, 'PK', 'PAK', 'Pakistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (176, 'PW', 'PLW', 'Palau', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (177, 'PS', 'PSE', 'Palestinian territories', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (178, 'PA', 'PAN', 'Panama', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (179, 'PG', 'PNG', 'Papua New Guinea', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (180, 'PY', 'PRY', 'Paraguay', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (181, 'PE', 'PER', 'Peru', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (182, 'PH', 'PHL', 'Philippines', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (183, 'PN', 'PCN', 'Pitcairn Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (184, 'PL', 'POL', 'Pologne', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (185, 'PR', 'PRI', 'Puerto Rico', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (186, 'QA', 'QAT', 'Qatar', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (188, 'RO', 'ROU', 'Romania', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (189, 'RW', 'RWA', 'Rwanda', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (190, 'SH', 'SHN', 'Saint Helena', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (191, 'KN', 'KNA', 'Saint Kitts and Nevis', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (192, 'LC', 'LCA', 'Saint Lucia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (193, 'PM', 'SPM', 'Saint Pierre and Miquelon', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (194, 'VC', 'VCT', 'Saint Vincent and the Grenadines', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (195, 'WS', 'WSM', 'Samoa', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (196, 'SM', 'SMR', 'San Marino ', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (197, 'ST', 'STP', 'Saint Thomas and Prince', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (198, 'RS', 'SRB', 'Serbia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (199, 'SC', 'SYC', 'Seychelles', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (200, 'SL', 'SLE', 'Sierra Leone', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (201, 'SK', 'SVK', 'Slovakia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (202, 'SI', 'SVN', 'Slovenia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (203, 'SB', 'SLB', 'Solomon Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (204, 'SO', 'SOM', 'Somalia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (205, 'ZA', 'ZAF', 'South Africa', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (206, 'GS', 'SGS', 'South Georgia and the South Sandwich Islands ', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (207, 'LK', 'LKA', 'Sri Lanka', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (208, 'SD', 'SDN', 'Sudan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (209, 'SR', 'SUR', 'Suriname', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (210, 'SJ', 'SJM', 'Svalbard and Jan Mayen', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (211, 'SZ', 'SWZ', 'Swaziland / Eswatini', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (212, 'SY', 'SYR', 'Syria', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (213, 'TW', 'TWN', 'Taiwan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (214, 'TJ', 'TJK', 'Tajikistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (215, 'TZ', 'TZA', 'Tanzania', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (216, 'TH', 'THA', 'Thailand', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (217, 'TL', 'TLS', 'Timor-Leste', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (218, 'TK', 'TKL', 'Tokelau', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (219, 'TO', 'TON', 'Tonga', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (220, 'TT', 'TTO', 'Trinidad and Tobago', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (221, 'TR', 'TUR', 'Turkey', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (222, 'TM', 'TKM', 'Turkmenistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (223, 'TC', 'TCA', 'Turks and Caicos Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (224, 'TV', 'TUV', 'Tuvalu', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (225, 'UG', 'UGA', 'Uganda', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (226, 'UA', 'UKR', 'Ukraine', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (227, 'AE', 'ARE', 'United Arab Emirates', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (228, 'UM', 'UMI', 'United States Minor Outlying Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (229, 'UY', 'URY', 'Uruguay', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (230, 'UZ', 'UZB', 'Uzbekistan', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (231, 'VU', 'VUT', 'Vanuatu', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (232, 'VE', 'VEN', 'Venezuela', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (233, 'VN', 'VNM', 'Vietnam', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (234, 'VG', 'VGB', 'British Virgin Islands', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (235, 'VI', 'VIR', 'Virgin Islands of the United States', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (236, 'WF', 'WLF', 'Wallis and Futuna', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (237, 'EH', 'ESH', 'Western Sahara', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (238, 'YE', 'YEM', 'Yemen', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (239, 'ZM', 'ZMB', 'Zambia', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (240, 'ZW', 'ZWE', 'Zimbabwe', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (241, 'GG', 'GGY', 'Guernsey', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (242, 'IM', 'IMN', 'Isle of Man', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (243, 'JE', 'JEY', 'Jersey', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (244, 'ME', 'MNE', 'Montenegro', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (245, 'BL', 'BLM', 'Saint-Barthélemy', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (246, 'MF', 'MAF', 'Saint-Martin', 1, 0); +INSERT INTO llx_c_country (rowid, code, code_iso, label, active, favorite) VALUES (247, 'XK', 'XKX', 'Kosovo', 1, 0); -- Set field eec diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 752bc7de395..52a1a3bbbb6 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -4,12 +4,12 @@ -- Copyright (C) 2004 Benoit Mortier -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin --- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2007 Patrick Raguin -- Copyright (C) 2010-2016 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert --- Copyright (C) 2012 Ricardo Schluter --- Copyright (C) 2015 Ferran Marcet --- Copyright (C) 2019~ Lao Tian <281388879@qq.com> +-- Copyright (C) 2012 Ricardo Schluter +-- Copyright (C) 2015 Ferran Marcet +-- Copyright (C) 2019~ Lao Tian <281388879@qq.com> -- Copyright (C) 2020-2021 Udo Tamm -- Copyright (C) 2022 Miro Sertić -- @@ -52,11 +52,12 @@ -- Belgium -- Bolivia -- Brazil -> for Departmements +-- Burundi -- Canada -> for Departmements -- Chile -- China -- Colombie -> for Departmements --- Croatia -> for Departmements +-- Croatia -- Denmark -- France -- Germany -> for Departmements @@ -66,6 +67,7 @@ -- India -> for Departmements -- Indonesia -> for Departmements -- Italy +-- Japan -> only for Departmements -- Luxembourg -- Mauritius -- Mexique -> for Departmements @@ -332,6 +334,10 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3 insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 320, NULL, 1, 'Veneto'); +-- Japan Region (id country=123) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 123, 12301, '', 0,'日本'); + + -- Luxembourg Regions (districts) (id country=140) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14001, '', 0, 'Diekirch'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14002, '', 0, 'Grevenmacher'); diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 642bd69960b..04fea66c8ed 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -40,7 +40,9 @@ -- NOTES/CONTENT --------------------------------------------------------------- --- Departements/Cantons/Provinces/States +-- +-- Table of Content (TOC) +-- Departements/Cantons/Provinces/States: -- -- Algeria -- Andorra @@ -57,6 +59,7 @@ -- Croatia -- France -- Germany +-- Greece -- Honduras -- Hungary -- Italy @@ -81,7 +84,8 @@ -- TEMPLATE ------------------------------------------------------------------------------------------------------------- INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ( 0, '0', '0',0,'-','-'); --- active is always set as on = 1 +-- +-- field 'active' is not requiered - all lines are always set as active = on (1) by default -- Algeria Provinces (id country=13) @@ -423,102 +427,102 @@ insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4, '974','97411',3,'REUNION','Réunion'); insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6, '976','97601',3,'MAYOTTE','Mayotte'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'01','01053',5,'AIN','Ain'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (32,'02','02408',5,'AISNE','Aisne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'03','03190',5,'ALLIER','Allier'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'04','04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'05','05061',4,'HAUTES-ALPES','Hautes-Alpes'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'06','06088',4,'ALPES-MARITIMES','Alpes-Maritimes'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'07','07186',5,'ARDECHE','Ardèche'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'08','08105',4,'ARDENNES','Ardennes'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'09','09122',5,'ARIEGE','Ariège'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'10','10387',5,'AUBE','Aube'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'11','11069',5,'AUDE','Aude'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'12','12202',5,'AVEYRON','Aveyron'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'13','13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (28,'14','14118',2,'CALVADOS','Calvados'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'15','15014',2,'CANTAL','Cantal'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'16','16015',3,'CHARENTE','Charente'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'17','17300',3,'CHARENTE-MARITIME','Charente-Maritime'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'18','18033',2,'CHER','Cher'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'19','19272',3,'CORREZE','Corrèze'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (94,'2A','2A004',3,'CORSE-DU-SUD','Corse-du-Sud'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (94,'2B','2B033',3,'HAUTE-CORSE','Haute-Corse'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'21','21231',3,'COTE-D OR','Côte-d Or'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (53,'22','22278',4,'COTES-D ARMOR','Côtes-d Armor'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'23','23096',3,'CREUSE','Creuse'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'24','24322',3,'DORDOGNE','Dordogne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'25','25056',2,'DOUBS','Doubs'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'26','26362',3,'DROME','Drôme'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (28,'27','27229',5,'EURE','Eure'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'28','28085',1,'EURE-ET-LOIR','Eure-et-Loir'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (53,'29','29232',2,'FINISTERE','Finistère'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'30','30189',2,'GARD','Gard'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'31','31555',3,'HAUTE-GARONNE','Haute-Garonne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'32','32013',2,'GERS','Gers'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'33','33063',3,'GIRONDE','Gironde'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'34','34172',5,'HERAULT','Hérault'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (53,'35','35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'36','36044',5,'INDRE','Indre'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'37','37261',1,'INDRE-ET-LOIRE','Indre-et-Loire'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'38','38185',5,'ISERE','Isère'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'39','39300',2,'JURA','Jura'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'40','40192',4,'LANDES','Landes'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'41','41018',0,'LOIR-ET-CHER','Loir-et-Cher'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'42','42218',3,'LOIRE','Loire'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'43','43157',3,'HAUTE-LOIRE','Haute-Loire'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (52,'44','44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (24,'45','45234',2,'LOIRET','Loiret'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'46','46042',2,'LOT','Lot'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'47','47001',0,'LOT-ET-GARONNE','Lot-et-Garonne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'48','48095',3,'LOZERE','Lozère'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (52,'49','49007',0,'MAINE-ET-LOIRE','Maine-et-Loire'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (28,'50','50502',3,'MANCHE','Manche'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'51','51108',3,'MARNE','Marne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'52','52121',3,'HAUTE-MARNE','Haute-Marne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (52,'53','53130',3,'MAYENNE','Mayenne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'54','54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'55','55029',3,'MEUSE','Meuse'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (53,'56','56260',2,'MORBIHAN','Morbihan'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'57','57463',3,'MOSELLE','Moselle'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'58','58194',3,'NIEVRE','Nièvre'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (32,'59','59350',2,'NORD','Nord'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (32,'60','60057',5,'OISE','Oise'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (28,'61','61001',5,'ORNE','Orne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (32,'62','62041',2,'PAS-DE-CALAIS','Pas-de-Calais'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'63','63113',2,'PUY-DE-DOME','Puy-de-Dôme'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'64','64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'65','65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'66','66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'67','67482',2,'BAS-RHIN','Bas-Rhin'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'68','68066',2,'HAUT-RHIN','Haut-Rhin'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'69','69123',2,'RHONE','Rhône'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'70','70550',3,'HAUTE-SAONE','Haute-Saône'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'71','71270',0,'SAONE-ET-LOIRE','Saône-et-Loire'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (52,'72','72181',3,'SARTHE','Sarthe'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'73','73065',3,'SAVOIE','Savoie'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (84,'74','74010',3,'HAUTE-SAVOIE','Haute-Savoie'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'75','75056',0,'PARIS','Paris'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (28,'76','76540',3,'SEINE-MARITIME','Seine-Maritime'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'77','77288',0,'SEINE-ET-MARNE','Seine-et-Marne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'78','78646',4,'YVELINES','Yvelines'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'79','79191',4,'DEUX-SEVRES','Deux-Sèvres'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (32,'80','80021',3,'SOMME','Somme'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'81','81004',2,'TARN','Tarn'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (76,'82','82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'83','83137',2,'VAR','Var'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (93,'84','84007',0,'VAUCLUSE','Vaucluse'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (52,'85','85191',3,'VENDEE','Vendée'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'86','86194',3,'VIENNE','Vienne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (75,'87','87085',3,'HAUTE-VIENNE','Haute-Vienne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (44,'88','88160',4,'VOSGES','Vosges'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'89','89024',5,'YONNE','Yonne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (27,'90','90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'91','91228',5,'ESSONNE','Essonne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'92','92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'93','93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'94','94028',2,'VAL-DE-MARNE','Val-de-Marne'); -insert into llx_c_departements (fk_region, code_departement, cheflieu,tncc,ncc,nom) values (11,'95','95500',2,'VAL-D OISE','Val-d Oise'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '01', '01053',5, 'AIN', 'Ain'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '02', '02408',5, 'AISNE', 'Aisne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '03', '03190',5, 'ALLIER', 'Allier'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '04', '04070',4, 'ALPES-DE-HAUTE-PROVENCE', 'Alpes-de-Haute-Provence'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '05', '05061',4, 'HAUTES-ALPES', 'Hautes-Alpes'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '06', '06088',4, 'ALPES-MARITIMES', 'Alpes-Maritimes'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '07', '07186',5, 'ARDECHE', 'Ardèche'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '08', '08105',4, 'ARDENNES', 'Ardennes'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '09', '09122',5, 'ARIEGE', 'Ariège'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '10', '10387',5, 'AUBE', 'Aube'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '11', '11069',5, 'AUDE', 'Aude'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '12', '12202',5, 'AVEYRON', 'Aveyron'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '13', '13055',4, 'BOUCHES-DU-RHONE', 'Bouches-du-Rhône'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (28, '14', '14118',2, 'CALVADOS', 'Calvados'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '15', '15014',2, 'CANTAL', 'Cantal'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '16', '16015',3, 'CHARENTE', 'Charente'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '17', '17300',3, 'CHARENTE-MARITIME', 'Charente-Maritime'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '18', '18033',2, 'CHER', 'Cher'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '19', '19272',3, 'CORREZE', 'Corrèze'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (94, '2A', '2A004',3, 'CORSE-DU-SUD', 'Corse-du-Sud'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (94, '2B', '2B033',3, 'HAUTE-CORSE', 'Haute-Corse'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '21', '21231',3, 'COTE-D OR', 'Côte-d Or'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (53, '22', '22278',4, 'COTES-D ARMOR', 'Côtes-d Armor'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '23', '23096',3, 'CREUSE', 'Creuse'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '24', '24322',3, 'DORDOGNE', 'Dordogne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '25', '25056',2, 'DOUBS', 'Doubs'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '26', '26362',3, 'DROME', 'Drôme'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (28, '27', '27229',5, 'EURE', 'Eure'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '28', '28085',1, 'EURE-ET-LOIR', 'Eure-et-Loir'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (53, '29', '29232',2, 'FINISTERE', 'Finistère'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '30', '30189',2, 'GARD', 'Gard'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '31', '31555',3, 'HAUTE-GARONNE', 'Haute-Garonne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '32', '32013',2, 'GERS', 'Gers'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '33', '33063',3, 'GIRONDE', 'Gironde'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '34', '34172',5, 'HERAULT', 'Hérault'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (53, '35', '35238',1, 'ILLE-ET-VILAINE', 'Ille-et-Vilaine'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '36', '36044',5, 'INDRE', 'Indre'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '37', '37261',1, 'INDRE-ET-LOIRE', 'Indre-et-Loire'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '38', '38185',5, 'ISERE', 'Isère'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '39', '39300',2, 'JURA', 'Jura'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '40', '40192',4, 'LANDES', 'Landes'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '41', '41018',0, 'LOIR-ET-CHER', 'Loir-et-Cher'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '42', '42218',3, 'LOIRE', 'Loire'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '43', '43157',3, 'HAUTE-LOIRE', 'Haute-Loire'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (52, '44', '44109',3, 'LOIRE-ATLANTIQUE', 'Loire-Atlantique'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (24, '45', '45234',2, 'LOIRET', 'Loiret'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '46', '46042',2, 'LOT', 'Lot'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '47', '47001',0, 'LOT-ET-GARONNE', 'Lot-et-Garonne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '48', '48095',3, 'LOZERE', 'Lozère'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (52, '49', '49007',0, 'MAINE-ET-LOIRE', 'Maine-et-Loire'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (28, '50', '50502',3, 'MANCHE', 'Manche'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '51', '51108',3, 'MARNE', 'Marne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '52', '52121',3, 'HAUTE-MARNE', 'Haute-Marne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (52, '53', '53130',3, 'MAYENNE', 'Mayenne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '54', '54395',0, 'MEURTHE-ET-MOSELLE', 'Meurthe-et-Moselle'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '55', '55029',3, 'MEUSE', 'Meuse'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (53, '56', '56260',2, 'MORBIHAN', 'Morbihan'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '57', '57463',3, 'MOSELLE', 'Moselle'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '58', '58194',3, 'NIEVRE', 'Nièvre'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '59', '59350',2, 'NORD', 'Nord'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '60', '60057',5, 'OISE', 'Oise'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (28, '61', '61001',5, 'ORNE', 'Orne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '62', '62041',2, 'PAS-DE-CALAIS', 'Pas-de-Calais'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '63', '63113',2, 'PUY-DE-DOME', 'Puy-de-Dôme'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '64', '64445',4, 'PYRENEES-ATLANTIQUES', 'Pyrénées-Atlantiques'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '65', '65440',4, 'HAUTES-PYRENEES', 'Hautes-Pyrénées'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '66', '66136',4, 'PYRENEES-ORIENTALES', 'Pyrénées-Orientales'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '67', '67482',2, 'BAS-RHIN', 'Bas-Rhin'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '68', '68066',2, 'HAUT-RHIN', 'Haut-Rhin'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '69', '69123',2, 'RHONE', 'Rhône'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '70', '70550',3, 'HAUTE-SAONE', 'Haute-Saône'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '71', '71270',0, 'SAONE-ET-LOIRE', 'Saône-et-Loire'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (52, '72', '72181',3, 'SARTHE', 'Sarthe'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '73', '73065',3, 'SAVOIE', 'Savoie'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (84, '74', '74010',3, 'HAUTE-SAVOIE', 'Haute-Savoie'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '75', '75056',0, 'PARIS', 'Paris'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (28, '76', '76540',3, 'SEINE-MARITIME', 'Seine-Maritime'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '77', '77288',0, 'SEINE-ET-MARNE', 'Seine-et-Marne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '78', '78646',4, 'YVELINES', 'Yvelines'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '79', '79191',4, 'DEUX-SEVRES', 'Deux-Sèvres'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (32, '80', '80021',3, 'SOMME', 'Somme'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '81', '81004',2, 'TARN', 'Tarn'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (76, '82', '82121',0, 'TARN-ET-GARONNE', 'Tarn-et-Garonne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '83', '83137',2, 'VAR', 'Var'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (93, '84', '84007',0, 'VAUCLUSE', 'Vaucluse'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (52, '85', '85191',3, 'VENDEE', 'Vendée'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '86', '86194',3, 'VIENNE', 'Vienne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (75, '87', '87085',3, 'HAUTE-VIENNE', 'Haute-Vienne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (44, '88', '88160',4, 'VOSGES', 'Vosges'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '89', '89024',5, 'YONNE', 'Yonne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (27, '90', '90010',0, 'TERRITOIRE DE BELFORT', 'Territoire de Belfort'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '91', '91228',5, 'ESSONNE', 'Essonne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '92', '92050',4, 'HAUTS-DE-SEINE', 'Hauts-de-Seine'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '93', '93008',3, 'SEINE-SAINT-DENIS', 'Seine-Saint-Denis'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '94', '94028',2, 'VAL-DE-MARNE', 'Val-de-Marne'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (11, '95', '95500',2, 'VAL-D OISE', 'Val-d Oise'); -- Germany States / Bundesländer (id country=5) @@ -540,6 +544,76 @@ INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (5 INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'TH', 'THÜRINGEN', 'Thüringen'); +-- Greece Provinces (id country=102) +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('66', 10201, '', 0, '', 'Αθήνα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('67', 10205, '', 0, '', 'Δράμα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('01', 10205, '', 0, '', 'Έβρος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('02', 10205, '', 0, '', 'Θάσος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('03', 10205, '', 0, '', 'Καβάλα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('04', 10205, '', 0, '', 'Ξάνθη'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('05', 10205, '', 0, '', 'Ροδόπη'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('06', 10203, '', 0, '', 'Ημαθία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('07', 10203, '', 0, '', 'Θεσσαλονίκη'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('08', 10203, '', 0, '', 'Κιλκίς'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('09', 10203, '', 0, '', 'Πέλλα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('10', 10203, '', 0, '', 'Πιερία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('11', 10203, '', 0, '', 'Σέρρες'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('12', 10203, '', 0, '', 'Χαλκιδική'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('13', 10206, '', 0, '', 'Άρτα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('14', 10206, '', 0, '', 'Θεσπρωτία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('15', 10206, '', 0, '', 'Ιωάννινα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('16', 10206, '', 0, '', 'Πρέβεζα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('17', 10213, '', 0, '', 'Γρεβενά'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('18', 10213, '', 0, '', 'Καστοριά'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('19', 10213, '', 0, '', 'Κοζάνη'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('20', 10213, '', 0, '', 'Φλώρινα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('21', 10212, '', 0, '', 'Καρδίτσα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('22', 10212, '', 0, '', 'Λάρισα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('23', 10212, '', 0, '', 'Μαγνησία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('24', 10212, '', 0, '', 'Τρίκαλα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('25', 10212, '', 0, '', 'Σποράδες'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('26', 10212, '', 0, '', 'Βοιωτία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('27', 10202, '', 0, '', 'Εύβοια'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('28', 10202, '', 0, '', 'Ευρυτανία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('29', 10202, '', 0, '', 'Φθιώτιδα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('30', 10202, '', 0, '', 'Φωκίδα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('31', 10209, '', 0, '', 'Αργολίδα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('32', 10209, '', 0, '', 'Αρκαδία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('33', 10209, '', 0, '', 'Κορινθία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('34', 10209, '', 0, '', 'Λακωνία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('35', 10209, '', 0, '', 'Μεσσηνία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('36', 10211, '', 0, '', 'Αιτωλοακαρνανία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('37', 10211, '', 0, '', 'Αχαΐα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('38', 10211, '', 0, '', 'Ηλεία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('39', 10207, '', 0, '', 'Ζάκυνθος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('40', 10207, '', 0, '', 'Κέρκυρα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('41', 10207, '', 0, '', 'Κεφαλληνία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('42', 10207, '', 0, '', 'Ιθάκη'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('43', 10207, '', 0, '', 'Λευκάδα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('44', 10208, '', 0, '', 'Ικαρία'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('45', 10208, '', 0, '', 'Λέσβος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('46', 10208, '', 0, '', 'Λήμνος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('47', 10208, '', 0, '', 'Σάμος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('48', 10208, '', 0, '', 'Χίος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('49', 10210, '', 0, '', 'Άνδρος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('50', 10210, '', 0, '', 'Θήρα'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('51', 10210, '', 0, '', 'Κάλυμνος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('52', 10210, '', 0, '', 'Κάρπαθος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('53', 10210, '', 0, '', 'Κέα-Κύθνος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('54', 10210, '', 0, '', 'Κω'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('55', 10210, '', 0, '', 'Μήλος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('56', 10210, '', 0, '', 'Μύκονος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('57', 10210, '', 0, '', 'Νάξος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('58', 10210, '', 0, '', 'Πάρος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('59', 10210, '', 0, '', 'Ρόδος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('60', 10210, '', 0, '', 'Σύρος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('61', 10210, '', 0, '', 'Τήνος'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('62', 10204, '', 0, '', 'Ηράκλειο'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('63', 10204, '', 0, '', 'Λασίθι'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('64', 10204, '', 0, '', 'Ρέθυμνο'); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('65', 10204, '', 0, '', 'Χανιά'); + + -- Honduras Departamentos (id country=114) INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'AT', '', 0, 'AT', 'Atlántida'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CH', '', 0, 'CH', 'Choluteca'); @@ -1272,118 +1346,118 @@ insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc -- Provinces Bolivia (id country=52) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('003', 5201, '', 0, '', 'Jaime Zudáñez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('004', 5201, '', 0, '', 'Juana Azurduy de Padilla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('005', 5201, '', 0, '', 'Luis Calvo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('006', 5201, '', 0, '', 'Nor Cinti', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('007', 5201, '', 0, '', 'Oropeza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('008', 5201, '', 0, '', 'Sud Cinti', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('009', 5201, '', 0, '', 'Tomina', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('010', 5201, '', 0, '', 'Yamparáez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 5202, '', 0, '', 'Abel Iturralde', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('012', 5202, '', 0, '', 'Aroma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('013', 5202, '', 0, '', 'Bautista Saavedra', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 5202, '', 0, '', 'Caranavi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('015', 5202, '', 0, '', 'Eliodoro Camacho', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('016', 5202, '', 0, '', 'Franz Tamayo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('017', 5202, '', 0, '', 'Gualberto Villarroel', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('018', 5202, '', 0, '', 'Ingaví', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('019', 5202, '', 0, '', 'Inquisivi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('020', 5202, '', 0, '', 'José Ramón Loayza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 5202, '', 0, '', 'Larecaja', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 5202, '', 0, '', 'Los Andes (Bolivia)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 5202, '', 0, '', 'Manco Kapac', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('024', 5202, '', 0, '', 'Muñecas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('025', 5202, '', 0, '', 'Nor Yungas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('026', 5202, '', 0, '', 'Omasuyos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('027', 5202, '', 0, '', 'Pacajes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('028', 5202, '', 0, '', 'Pedro Domingo Murillo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('029', 5202, '', 0, '', 'Sud Yungas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('030', 5202, '', 0, '', 'General José Manuel Pando', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 5203, '', 0, '', 'Arani', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 5203, '', 0, '', 'Arque', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 5203, '', 0, '', 'Ayopaya', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('034', 5203, '', 0, '', 'Bolívar (Bolivia)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('035', 5203, '', 0, '', 'Campero', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('036', 5203, '', 0, '', 'Capinota', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('037', 5203, '', 0, '', 'Cercado (Cochabamba)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('038', 5203, '', 0, '', 'Esteban Arze', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('039', 5203, '', 0, '', 'Germán Jordán', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('040', 5203, '', 0, '', 'José Carrasco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 5203, '', 0, '', 'Mizque', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 5203, '', 0, '', 'Punata', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 5203, '', 0, '', 'Quillacollo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('044', 5203, '', 0, '', 'Tapacarí', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('045', 5203, '', 0, '', 'Tiraque', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('046', 5203, '', 0, '', 'Chapare', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('047', 5204, '', 0, '', 'Carangas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('048', 5204, '', 0, '', 'Cercado (Oruro)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('049', 5204, '', 0, '', 'Eduardo Avaroa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('050', 5204, '', 0, '', 'Ladislao Cabrera', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 5204, '', 0, '', 'Litoral de Atacama', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 5204, '', 0, '', 'Mejillones', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 5204, '', 0, '', 'Nor Carangas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 5204, '', 0, '', 'Pantaleón Dalence', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 5204, '', 0, '', 'Poopó', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 5204, '', 0, '', 'Sabaya', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 5204, '', 0, '', 'Sajama', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 5204, '', 0, '', 'San Pedro de Totora', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('059', 5204, '', 0, '', 'Saucarí', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('060', 5204, '', 0, '', 'Sebastián Pagador', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 5204, '', 0, '', 'Sud Carangas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 5204, '', 0, '', 'Tomás Barrón', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 5205, '', 0, '', 'Alonso de Ibáñez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('064', 5205, '', 0, '', 'Antonio Quijarro', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('065', 5205, '', 0, '', 'Bernardino Bilbao', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('066', 5205, '', 0, '', 'Charcas (Potosí)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('067', 5205, '', 0, '', 'Chayanta', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('068', 5205, '', 0, '', 'Cornelio Saavedra', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('069', 5205, '', 0, '', 'Daniel Campos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('070', 5205, '', 0, '', 'Enrique Baldivieso', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 5205, '', 0, '', 'José María Linares', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 5205, '', 0, '', 'Modesto Omiste', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 5205, '', 0, '', 'Nor Chichas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 5205, '', 0, '', 'Nor Lípez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('075', 5205, '', 0, '', 'Rafael Bustillo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('076', 5205, '', 0, '', 'Sud Chichas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('077', 5205, '', 0, '', 'Sud Lípez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('078', 5205, '', 0, '', 'Tomás Frías', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('079', 5206, '', 0, '', 'Aniceto Arce', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('080', 5206, '', 0, '', 'Burdet O''Connor', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 5206, '', 0, '', 'Cercado (Tarija)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 5206, '', 0, '', 'Eustaquio Méndez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 5206, '', 0, '', 'José María Avilés', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 5206, '', 0, '', 'Gran Chaco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('085', 5207, '', 0, '', 'Andrés Ibáñez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('086', 5207, '', 0, '', 'Caballero', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('087', 5207, '', 0, '', 'Chiquitos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('088', 5207, '', 0, '', 'Cordillera (Bolivia)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('089', 5207, '', 0, '', 'Florida', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('090', 5207, '', 0, '', 'Germán Busch', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 5207, '', 0, '', 'Guarayos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 5207, '', 0, '', 'Ichilo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('093', 5207, '', 0, '', 'Obispo Santistevan', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('094', 5207, '', 0, '', 'Sara', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('095', 5207, '', 0, '', 'Vallegrande', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('096', 5207, '', 0, '', 'Velasco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('097', 5207, '', 0, '', 'Warnes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('098', 5207, '', 0, '', 'Ángel Sandóval', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('099', 5207, '', 0, '', 'Ñuflo de Chaves', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('100', 5208, '', 0, '', 'Cercado (Beni)', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 5208, '', 0, '', 'Iténez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 5208, '', 0, '', 'Mamoré', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 5208, '', 0, '', 'Marbán', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 5208, '', 0, '', 'Moxos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('105', 5208, '', 0, '', 'Vaca Díez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('106', 5208, '', 0, '', 'Yacuma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('107', 5208, '', 0, '', 'General José Ballivián Segurola', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('108', 5209, '', 0, '', 'Abuná', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('109', 5209, '', 0, '', 'Madre de Dios', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('110', 5209, '', 0, '', 'Manuripi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('002', 5201, '', 0, '', 'Hernando Siles'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('003', 5201, '', 0, '', 'Jaime Zudáñez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('004', 5201, '', 0, '', 'Juana Azurduy de Padilla'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('005', 5201, '', 0, '', 'Luis Calvo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('006', 5201, '', 0, '', 'Nor Cinti'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('007', 5201, '', 0, '', 'Oropeza'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('008', 5201, '', 0, '', 'Sud Cinti'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('009', 5201, '', 0, '', 'Tomina'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('010', 5201, '', 0, '', 'Yamparáez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('011', 5202, '', 0, '', 'Abel Iturralde'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('012', 5202, '', 0, '', 'Aroma'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('013', 5202, '', 0, '', 'Bautista Saavedra'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('014', 5202, '', 0, '', 'Caranavi'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('015', 5202, '', 0, '', 'Eliodoro Camacho'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('016', 5202, '', 0, '', 'Franz Tamayo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('017', 5202, '', 0, '', 'Gualberto Villarroel'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('018', 5202, '', 0, '', 'Ingaví'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('019', 5202, '', 0, '', 'Inquisivi'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('020', 5202, '', 0, '', 'José Ramón Loayza'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('021', 5202, '', 0, '', 'Larecaja'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('022', 5202, '', 0, '', 'Los Andes (Bolivia)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('023', 5202, '', 0, '', 'Manco Kapac'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('024', 5202, '', 0, '', 'Muñecas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('025', 5202, '', 0, '', 'Nor Yungas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('026', 5202, '', 0, '', 'Omasuyos'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('027', 5202, '', 0, '', 'Pacajes'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('028', 5202, '', 0, '', 'Pedro Domingo Murillo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('029', 5202, '', 0, '', 'Sud Yungas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('030', 5202, '', 0, '', 'General José Manuel Pando'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('031', 5203, '', 0, '', 'Arani'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('032', 5203, '', 0, '', 'Arque'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('033', 5203, '', 0, '', 'Ayopaya'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('034', 5203, '', 0, '', 'Bolívar (Bolivia)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('035', 5203, '', 0, '', 'Campero'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('036', 5203, '', 0, '', 'Capinota'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('037', 5203, '', 0, '', 'Cercado (Cochabamba)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('038', 5203, '', 0, '', 'Esteban Arze'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('039', 5203, '', 0, '', 'Germán Jordán'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('040', 5203, '', 0, '', 'José Carrasco'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('041', 5203, '', 0, '', 'Mizque'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('042', 5203, '', 0, '', 'Punata'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('043', 5203, '', 0, '', 'Quillacollo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('044', 5203, '', 0, '', 'Tapacarí'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('045', 5203, '', 0, '', 'Tiraque'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('046', 5203, '', 0, '', 'Chapare'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('047', 5204, '', 0, '', 'Carangas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('048', 5204, '', 0, '', 'Cercado (Oruro)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('049', 5204, '', 0, '', 'Eduardo Avaroa'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('050', 5204, '', 0, '', 'Ladislao Cabrera'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('051', 5204, '', 0, '', 'Litoral de Atacama'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('052', 5204, '', 0, '', 'Mejillones'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('053', 5204, '', 0, '', 'Nor Carangas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('054', 5204, '', 0, '', 'Pantaleón Dalence'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('055', 5204, '', 0, '', 'Poopó'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('056', 5204, '', 0, '', 'Sabaya'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('057', 5204, '', 0, '', 'Sajama'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('058', 5204, '', 0, '', 'San Pedro de Totora'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('059', 5204, '', 0, '', 'Saucarí'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('060', 5204, '', 0, '', 'Sebastián Pagador'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('061', 5204, '', 0, '', 'Sud Carangas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('062', 5204, '', 0, '', 'Tomás Barrón'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('063', 5205, '', 0, '', 'Alonso de Ibáñez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('064', 5205, '', 0, '', 'Antonio Quijarro'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('065', 5205, '', 0, '', 'Bernardino Bilbao'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('066', 5205, '', 0, '', 'Charcas (Potosí)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('067', 5205, '', 0, '', 'Chayanta'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('068', 5205, '', 0, '', 'Cornelio Saavedra'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('069', 5205, '', 0, '', 'Daniel Campos'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('070', 5205, '', 0, '', 'Enrique Baldivieso'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('071', 5205, '', 0, '', 'José María Linares'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('072', 5205, '', 0, '', 'Modesto Omiste'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('073', 5205, '', 0, '', 'Nor Chichas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('074', 5205, '', 0, '', 'Nor Lípez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('075', 5205, '', 0, '', 'Rafael Bustillo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('076', 5205, '', 0, '', 'Sud Chichas'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('077', 5205, '', 0, '', 'Sud Lípez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('078', 5205, '', 0, '', 'Tomás Frías'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('079', 5206, '', 0, '', 'Aniceto Arce'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('080', 5206, '', 0, '', 'Burdet O''Connor'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('081', 5206, '', 0, '', 'Cercado (Tarija)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('082', 5206, '', 0, '', 'Eustaquio Méndez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('083', 5206, '', 0, '', 'José María Avilés'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('084', 5206, '', 0, '', 'Gran Chaco'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('085', 5207, '', 0, '', 'Andrés Ibáñez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('086', 5207, '', 0, '', 'Caballero'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('087', 5207, '', 0, '', 'Chiquitos'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('088', 5207, '', 0, '', 'Cordillera (Bolivia)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('089', 5207, '', 0, '', 'Florida'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('090', 5207, '', 0, '', 'Germán Busch'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('091', 5207, '', 0, '', 'Guarayos'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('092', 5207, '', 0, '', 'Ichilo'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('093', 5207, '', 0, '', 'Obispo Santistevan'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('094', 5207, '', 0, '', 'Sara'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('095', 5207, '', 0, '', 'Vallegrande'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('096', 5207, '', 0, '', 'Velasco'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('097', 5207, '', 0, '', 'Warnes'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('098', 5207, '', 0, '', 'Ángel Sandóval'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('099', 5207, '', 0, '', 'Ñuflo de Chaves'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('100', 5208, '', 0, '', 'Cercado (Beni)'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('101', 5208, '', 0, '', 'Iténez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('102', 5208, '', 0, '', 'Mamoré'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('103', 5208, '', 0, '', 'Marbán'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('104', 5208, '', 0, '', 'Moxos'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('105', 5208, '', 0, '', 'Vaca Díez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('106', 5208, '', 0, '', 'Yacuma'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('107', 5208, '', 0, '', 'General José Ballivián Segurola'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('108', 5209, '', 0, '', 'Abuná'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('109', 5209, '', 0, '', 'Madre de Dios'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('110', 5209, '', 0, '', 'Manuripi'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez'); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('112', 5209, '', 0, '', 'General Federico Román'); -- Provinces Spain (id country=4) in order of province (for logical pick list) @@ -1441,77 +1515,6 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('Z', '402', '50', 1, 'ZARAGOZA', 'Zaragoza'); --- Provinces Greece (id country=102) -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('66', 10201, '', 0, '', 'Αθήνα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('67', 10205, '', 0, '', 'Δράμα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('01', 10205, '', 0, '', 'Έβρος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('02', 10205, '', 0, '', 'Θάσος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('03', 10205, '', 0, '', 'Καβάλα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('04', 10205, '', 0, '', 'Ξάνθη', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('05', 10205, '', 0, '', 'Ροδόπη', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('06', 10203, '', 0, '', 'Ημαθία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('07', 10203, '', 0, '', 'Θεσσαλονίκη', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('08', 10203, '', 0, '', 'Κιλκίς', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('09', 10203, '', 0, '', 'Πέλλα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('10', 10203, '', 0, '', 'Πιερία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('11', 10203, '', 0, '', 'Σέρρες', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('12', 10203, '', 0, '', 'Χαλκιδική', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('13', 10206, '', 0, '', 'Άρτα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('14', 10206, '', 0, '', 'Θεσπρωτία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('15', 10206, '', 0, '', 'Ιωάννινα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('16', 10206, '', 0, '', 'Πρέβεζα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('17', 10213, '', 0, '', 'Γρεβενά', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('18', 10213, '', 0, '', 'Καστοριά', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('19', 10213, '', 0, '', 'Κοζάνη', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('20', 10213, '', 0, '', 'Φλώρινα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('21', 10212, '', 0, '', 'Καρδίτσα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('22', 10212, '', 0, '', 'Λάρισα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('23', 10212, '', 0, '', 'Μαγνησία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('24', 10212, '', 0, '', 'Τρίκαλα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('25', 10212, '', 0, '', 'Σποράδες', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('26', 10212, '', 0, '', 'Βοιωτία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('27', 10202, '', 0, '', 'Εύβοια', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('28', 10202, '', 0, '', 'Ευρυτανία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('29', 10202, '', 0, '', 'Φθιώτιδα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('30', 10202, '', 0, '', 'Φωκίδα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('31', 10209, '', 0, '', 'Αργολίδα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('32', 10209, '', 0, '', 'Αρκαδία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('33', 10209, '', 0, '', 'Κορινθία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('34', 10209, '', 0, '', 'Λακωνία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('35', 10209, '', 0, '', 'Μεσσηνία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('36', 10211, '', 0, '', 'Αιτωλοακαρνανία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('37', 10211, '', 0, '', 'Αχαΐα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('38', 10211, '', 0, '', 'Ηλεία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('39', 10207, '', 0, '', 'Ζάκυνθος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('40', 10207, '', 0, '', 'Κέρκυρα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('41', 10207, '', 0, '', 'Κεφαλληνία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('42', 10207, '', 0, '', 'Ιθάκη', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('43', 10207, '', 0, '', 'Λευκάδα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('44', 10208, '', 0, '', 'Ικαρία', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('45', 10208, '', 0, '', 'Λέσβος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('46', 10208, '', 0, '', 'Λήμνος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('47', 10208, '', 0, '', 'Σάμος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('48', 10208, '', 0, '', 'Χίος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('49', 10210, '', 0, '', 'Άνδρος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('50', 10210, '', 0, '', 'Θήρα', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('51', 10210, '', 0, '', 'Κάλυμνος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('52', 10210, '', 0, '', 'Κάρπαθος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('53', 10210, '', 0, '', 'Κέα-Κύθνος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('54', 10210, '', 0, '', 'Κω', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('55', 10210, '', 0, '', 'Μήλος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('56', 10210, '', 0, '', 'Μύκονος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('57', 10210, '', 0, '', 'Νάξος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('58', 10210, '', 0, '', 'Πάρος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('59', 10210, '', 0, '', 'Ρόδος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('60', 10210, '', 0, '', 'Σύρος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('61', 10210, '', 0, '', 'Τήνος', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('62', 10204, '', 0, '', 'Ηράκλειο', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('63', 10204, '', 0, '', 'Λασίθι', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('64', 10204, '', 0, '', 'Ρέθυμνο', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('65', 10204, '', 0, '', 'Χανιά', 1); - - - -- Provinces GB (id country=7) INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('701', 701, NULL, 0,NULL, 'Bedfordshire', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('702', 701, NULL, 0,NULL, 'Berkshire', 1); @@ -1899,3 +1902,52 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-5', 22701, '', 0, '', 'Ras al-Khaimah'); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah'); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain'); + +-- Japan 都道府県 (id country=123) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '01', '', 0, '北海', '北海道', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '02', '', 0, '青森', '青森県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '03', '', 0, '岩手', '岩手県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '04', '', 0, '宮城', '宮城県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '05', '', 0, '秋田', '秋田県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '06', '', 0, '山形', '山形県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '07', '', 0, '福島', '福島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '08', '', 0, '茨城', '茨城県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '09', '', 0, '栃木', '栃木県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '10', '', 0, '群馬', '群馬県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '11', '', 0, '埼玉', '埼玉県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '12', '', 0, '千葉', '千葉県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '13', '', 0, '東京', '東京都', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '14', '', 0, '神奈川', '神奈川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '15', '', 0, '新潟', '新潟県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '16', '', 0, '富山', '富山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '17', '', 0, '石川', '石川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '18', '', 0, '福井', '福井県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '19', '', 0, '山梨', '山梨県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '20', '', 0, '長野', '長野県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '21', '', 0, '岐阜', '岐阜県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '22', '', 0, '静岡', '静岡県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '23', '', 0, '愛知', '愛知県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '24', '', 0, '三重', '三重県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '25', '', 0, '滋賀', '滋賀県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '26', '', 0, '京都', '京都府', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '27', '', 0, '大阪', '大阪府', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '28', '', 0, '兵庫', '兵庫県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '29', '', 0, '奈良', '奈良県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '30', '', 0, '和歌山', '和歌山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '31', '', 0, '鳥取', '鳥取県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '32', '', 0, '島根', '島根県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '33', '', 0, '岡山', '岡山県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '34', '', 0, '広島', '広島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '35', '', 0, '山口', '山口県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '36', '', 0, '徳島', '徳島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '37', '', 0, '香川', '香川県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '38', '', 0, '愛媛', '愛媛県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '39', '', 0, '高知', '高知県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '40', '', 0, '福岡', '福岡県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '41', '', 0, '佐賀', '佐賀県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '42', '', 0, '長崎', '長崎県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '43', '', 0, '熊本', '熊本県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '44', '', 0, '大分', '大分県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '45', '', 0, '宮崎', '宮崎県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '46', '', 0, '鹿児島', '鹿児島県', 1); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) values (12301, '47', '', 0, '沖縄', '沖縄県', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql index 7c8deec073c..0d2dd657639 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -55,7 +55,6 @@ INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('INV', 'InventoryJournal', 8, 1, 1); - -- Accounting Charts / Plans (Templates) for Countries -- Description of chart of account FR PCG99-ABREGE @@ -183,3 +182,6 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE -- Description of chart of account Mexico SAT/24-2019 INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1); + +-- Description of chart of account Japan JPN-BASE +INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 123, 'JPN-BASE', '日本 勘定科目表 基本版', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_account_at.sql b/htdocs/install/mysql/data/llx_accounting_account_at.sql index 3e153dc88e7..08cf24ec51a 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_at.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_at.sql @@ -344,3 +344,211 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 319, 'AT-BASE','GROUP6','60000','0','kalk. Löhne u Gehälter', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 320, 'AT-BASE','GROUP6','64160','0','Veränderung Pensionsrückstellung (Angestellte)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 321, 'AT-BASE','GROUP6','66300','0','Leistungserfassung', 1); + +-- Different Base CoA for Austria + +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1001, 'AT-BASE-2', 'Anlagevermögen', '0010', '0', 'Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1002, 'AT-BASE-2', 'Anlagevermögen', '0090', '0', 'Kumulierte Abschreibungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1003, 'AT-BASE-2', 'Anlagevermögen', '0100', '0', 'Konzessionen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1004, 'AT-BASE-2', 'Anlagevermögen', '0110', '0', 'Patentrechte und Lizenzen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1005, 'AT-BASE-2', 'Anlagevermögen', '0120', '0', 'Datenverarbeitungsprogramme', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1006, 'AT-BASE-2', 'Anlagevermögen', '0121', '0', 'Geringwertige Datenverarbeitungsprogramme', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1007, 'AT-BASE-2', 'Anlagevermögen', '0130', '0', 'Marken, Warenzeichen und Musterschutzrechte, sonstige Urheberrechte', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1008, 'AT-BASE-2', 'Anlagevermögen', '0140', '0', 'Pacht- und Mietrechte', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1009, 'AT-BASE-2', 'Anlagevermögen', '0150', '0', 'Geschäfts(Firmen)wert', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1010, 'AT-BASE-2', 'Anlagevermögen', '0180', '0', 'Geleistete Anzahlungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1011, 'AT-BASE-2', 'Anlagevermögen', '0190', '0', 'Kumulierte Abschreibungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1012, 'AT-BASE-2', 'Sachanlagen', '0200', '0', 'Unbebaute Grundstücke', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1013, 'AT-BASE-2', 'Sachanlagen', '0210', '0', 'Bebaute Grundstücke (Grundwert)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1014, 'AT-BASE-2', 'Sachanlagen', '0220', '0', 'Grundstücksgleiche Rechte', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1015, 'AT-BASE-2', 'Sachanlagen', '0300', '0', 'Betriebs- und Geschäftsgebäude auf eigenem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1016, 'AT-BASE-2', 'Sachanlagen', '0310', '0', 'Wohn- und Sozialgebäude auf eigenem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1017, 'AT-BASE-2', 'Sachanlagen', '0320', '0', 'Betriebs- und Geschäftsgebäude auf fremdem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1018, 'AT-BASE-2', 'Sachanlagen', '0330', '0', 'Wohn- und Sozialgebäude auf fremdem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1019, 'AT-BASE-2', 'Sachanlagen', '0340', '0', 'Grundstückseinrichtungen auf eigenem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1020, 'AT-BASE-2', 'Sachanlagen', '0350', '0', 'Grundstückseinrichtungen auf fremdem Grund', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1021, 'AT-BASE-2', 'Sachanlagen', '0360', '0', 'Bauliche Investitionen in fremden (gepachteten) Betriebs- und Geschäftsgebäuden', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1022, 'AT-BASE-2', 'Sachanlagen', '0370', '0', 'Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgebäuden', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1023, 'AT-BASE-2', 'Sachanlagen', '0390', '0', 'Kumulierte Abschreibungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1024, 'AT-BASE-2', 'Sachanlagen', '0400', '0', 'Fertigungsmaschinen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1025, 'AT-BASE-2', 'Sachanlagen', '0410', '0', 'Antriebsmaschinen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1026, 'AT-BASE-2', 'Sachanlagen', '0420', '0', 'Energieversorgungsanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1027, 'AT-BASE-2', 'Sachanlagen', '0430', '0', 'Transportanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1028, 'AT-BASE-2', 'Sachanlagen', '0500', '0', 'Maschinenwerkzeuge', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1029, 'AT-BASE-2', 'Sachanlagen', '0510', '0', 'Allgemeine Werkzeuge und Handwerkzeuge', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1030, 'AT-BASE-2', 'Sachanlagen', '0520', '0', 'Vorrichtungen, Formen und Modelle', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1031, 'AT-BASE-2', 'Sachanlagen', '0530', '0', 'Andere Erzeugungshilfsmittel', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1032, 'AT-BASE-2', 'Sachanlagen', '0540', '0', 'Hebezeuge und Montageanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1033, 'AT-BASE-2', 'Sachanlagen', '0550', '0', 'Geringwertige Vermögensgegenstände, soweit im Erzeugungsprozeß verwendet', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1034, 'AT-BASE-2', 'Sachanlagen', '0600', '0', 'Beheizungs- und Beleuchtungsanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1035, 'AT-BASE-2', 'Sachanlagen', '0610', '0', 'Nachrichten- und Kontrollanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1036, 'AT-BASE-2', 'Sachanlagen', '0620', '0', 'Büromaschinen, EDV-Anlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1037, 'AT-BASE-2', 'Sachanlagen', '0630', '0', 'PKW', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1038, 'AT-BASE-2', 'Sachanlagen', '0640', '0', 'LKW', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1039, 'AT-BASE-2', 'Sachanlagen', '0650', '0', 'Andere Beförderungsmittel', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1040, 'AT-BASE-2', 'Sachanlagen', '0660', '0', 'Andere Betriebs- und Geschäftsausstattung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1041, 'AT-BASE-2', 'Sachanlagen', '0670', '0', 'Gebinde', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1042, 'AT-BASE-2', 'Sachanlagen', '0680', '0', 'Geringwertige Büromaschinen, EDV-Anlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1043, 'AT-BASE-2', 'Sachanlagen', '0681', '0', 'Geringwertige Betriebs- und Geschäftsausstattung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1044, 'AT-BASE-2', 'Sachanlagen', '0692', '0', 'Kumulierte Abschreibungen zu Büromaschinen, EDV-Anlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1045, 'AT-BASE-2', 'Sachanlagen', '0693', '0', 'Kumulierte Abschreibungen zu PKW und Kombis', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1046, 'AT-BASE-2', 'Sachanlagen', '0694', '0', 'Kumulierte Abschreibungen zu LKW', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1047, 'AT-BASE-2', 'Sachanlagen', '0696', '0', 'Kumulierte Abschreibungen zur Betriebs- und Geschäftsausstattung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1048, 'AT-BASE-2', 'Vorauszahlungen', '0700', '0', 'Geleistete Anzahlungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1049, 'AT-BASE-2', 'Sachanlagen', '0710', '0', 'Anlagen in Bau', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1050, 'AT-BASE-2', 'Sachanlagen', '0790', '0', 'Kumulierte Abschreibungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1051, 'AT-BASE-2', 'Anlagevermögen', '0800', '0', 'Anteile an verbundenen Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1052, 'AT-BASE-2', 'Anlagevermögen', '0810', '0', 'Beteiligungen an Gemeinschaftsunternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1053, 'AT-BASE-2', 'Anlagevermögen', '0820', '0', 'Beteiligungen an angeschlossenen (assoziierten) Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1054, 'AT-BASE-2', 'Anlagevermögen', '0830', '0', 'Sonstige Beteiligungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1055, 'AT-BASE-2', 'Anlagevermögen', '0840', '0', 'Ausleihungen an verbundene Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1056, 'AT-BASE-2', 'Anlagevermögen', '0850', '0', 'Ausleihungen an Unternehmen, mit denen ein Beteiligungsverhältnis besteht', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1057, 'AT-BASE-2', 'Anlagevermögen', '0860', '0', 'Sonstige Ausleihungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1058, 'AT-BASE-2', 'Anlagevermögen', '0870', '0', 'Anteile an Kapitalgesellschaften ohne Beteiligungscharakter', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1059, 'AT-BASE-2', 'Anlagevermögen', '0880', '0', 'Anteile an Personengesellschaften ohne Beteiligungscharakter', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1060, 'AT-BASE-2', 'Anlagevermögen', '0900', '0', 'Genossenschaftsanteile ohne Beteiligungscharakter', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1061, 'AT-BASE-2', 'Anlagevermögen', '0910', '0', 'Anteile an Investmentfonds', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1062, 'AT-BASE-2', 'Vorauszahlungen', '0980', '0', 'Geleistete Anzahlungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'AT-BASE-2', 'Anlagevermögen', '0990', '0', 'Kumulierte Abschreibungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'AT-BASE-2', 'Umlaufvermögen', '1600', '0', 'Handelswaren', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'AT-BASE-2', 'Vorauszahlungen', '1800', '0', 'Geleistete Anzahlungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'AT-BASE-2', 'Debitoren', '2000', '0', 'Forderungen von Partnern im Inland ohne eigenes Debitorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'AT-BASE-2', 'Umlaufvermögen', '2080', '0', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Inland', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'AT-BASE-2', 'Umlaufvermögen', '2090', '0', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Inland', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'AT-BASE-2', 'Debitoren', '2099', '0', 'Forderungen von Partnern (Point Of Sale)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'AT-BASE-2', 'Debitoren', '2100', '0', 'Forderungen von Partnern im EU Raum ohne eigenes Debitorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'AT-BASE-2', 'Umlaufvermögen', '2130', '0', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Währungsunion', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'AT-BASE-2', 'Umlaufvermögen', '2140', '0', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Währungsunion', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1073, 'AT-BASE-2', 'Debitoren', '2150', '0', 'Forderungen von Partnern in Drittstaaten ohne eigenes Debitorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1074, 'AT-BASE-2', 'Umlaufvermögen', '2180', '0', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen sonstiges Ausland', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1075, 'AT-BASE-2', 'Umlaufvermögen', '2190', '0', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen sonstiges Ausland', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1076, 'AT-BASE-2', 'Umlaufvermögen', '2230', '0', 'Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1077, 'AT-BASE-2', 'Umlaufvermögen', '2240', '0', 'Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1078, 'AT-BASE-2', 'Umlaufvermögen', '2280', '0', 'Einzelwertberichtigungen zu Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1079, 'AT-BASE-2', 'Umlaufvermögen', '2290', '0', 'Pauschalwertberichtigungen zu Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1080, 'AT-BASE-2', 'Umlaufvermögen', '2470', '0', 'Eingeforderte, aber noch nicht eingezahlte Einlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1081, 'AT-BASE-2', 'Umlaufvermögen', '2480', '0', 'Einzelwertberichtigungen zu sonstigen Forderungen und Vermögensgegenständen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1082, 'AT-BASE-2', 'Umlaufvermögen', '2490', '0', 'Pauschalwertberichtigungen zu sonstigen Forderungen und Vermögensgegenständen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1083, 'AT-BASE-2', 'Umlaufvermögen', '2500', '0', 'Vorsteuern 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1084, 'AT-BASE-2', 'Umlaufvermögen', '2501', '0', 'Vorsteuern 10%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1085, 'AT-BASE-2', 'Umlaufvermögen', '2502', '0', 'Vorsteuern 13%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1086, 'AT-BASE-2', 'Umlaufvermögen', '2505', '0', 'Sonstige Vorsteuern', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1087, 'AT-BASE-2', 'Umlaufvermögen', '2506', '0', 'Vorsteuern RC 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1088, 'AT-BASE-2', 'Umlaufvermögen', '2507', '0', 'Vorsteuern RC 10%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1089, 'AT-BASE-2', 'Umlaufvermögen', '2510', '0', 'Vorsteuern RC EU 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1090, 'AT-BASE-2', 'Umlaufvermögen', '2511', '0', 'Vorsteuern IGE 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1091, 'AT-BASE-2', 'Umlaufvermögen', '2512', '0', 'Vorsteuern IGE 10%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1092, 'AT-BASE-2', 'Umlaufvermögen', '2513', '0', 'Vorsteuern IGE 13%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1093, 'AT-BASE-2', 'Umlaufvermögen', '2515', '0', 'Vorsteuern 20% (aus EUSt.)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1094, 'AT-BASE-2', 'Umlaufvermögen', '2600', '0', 'Eigene Anteile', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1095, 'AT-BASE-2', 'Umlaufvermögen', '2610', '0', 'Anteile an verbundenen Unternehmen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1096, 'AT-BASE-2', 'Umlaufvermögen', '2620', '0', 'Sonstige Anteile', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1097, 'AT-BASE-2', 'Umlaufvermögen', '2680', '0', 'Besitzwechsel, soweit dem Unternehmen nicht die der Ausstellung zugrundeliegenden Forderungen zustehen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1098, 'AT-BASE-2', 'Umlaufvermögen', '2690', '0', 'Wertberichtigungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1099, 'AT-BASE-2', 'Liquide Mittel', '2701', '0', 'Kasse/Bank', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1100, 'AT-BASE-2', 'Umlaufvermögen', '2730', '0', 'Postwertzeichen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1101, 'AT-BASE-2', 'Umlaufvermögen', '2740', '0', 'Stempelmarken', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1102, 'AT-BASE-2', 'Umlaufvermögen', '2780', '0', 'Schecks in Inlandswährung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1103, 'AT-BASE-2', 'Umlaufvermögen', '2801', '0', 'Bankzwischenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1104, 'AT-BASE-2', 'Umlaufvermögen', '2802', '0', 'Ausstehende Quittungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1105, 'AT-BASE-2', 'Umlaufvermögen', '2803', '0', 'Ausstehende Zahlungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1106, 'AT-BASE-2', 'Liquide Mittel', '2804', '0', 'Bank', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1107, 'AT-BASE-2', 'Umlaufvermögen', '2880', '0', 'Schwebende Geldbewegungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1108, 'AT-BASE-2', 'Umlaufvermögen', '2881', '0', 'Liquiditätstransfer', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1109, 'AT-BASE-2', 'Umlaufvermögen', '2890', '0', 'Wertberichtigungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1110, 'AT-BASE-2', 'Umlaufvermögen', '2900', '0', 'Aktive Rechnungsabgrenzungsposten', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1111, 'AT-BASE-2', 'Umlaufvermögen', '2950', '0', 'Disagio', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1112, 'AT-BASE-2', 'Umlaufvermögen', '2960', '0', 'Unterschiedsbetrag zur gebotenen Pensionsrückstellung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1113, 'AT-BASE-2', 'Umlaufvermögen', '2970', '0', 'Unterschiedsbetrag gem. Abschnitt XII Pensionskassengesetz', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1114, 'AT-BASE-2', 'Umlaufvermögen', '2980', '0', 'Steuerabgrenzung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1115, 'AT-BASE-2', 'Langfristige Verbindlichkeiten', '3000', '0', 'Rückstellungen für Abfertigungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1116, 'AT-BASE-2', 'Langfristige Verbindlichkeiten', '3010', '0', 'Rückstellungen für Pensionen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1117, 'AT-BASE-2', 'Umlaufvermögen', '3100', '0', 'Anleihen (einschließlich konvertibler)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1118, 'AT-BASE-2', 'Umlaufvermögen', '3200', '0', 'Erhaltene Anzahlungen auf Bestellungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1119, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3210', '0', 'Umsatzsteuer-Evidenzkonto für erhaltene Anzahlungen auf Bestellungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1120, 'AT-BASE-2', 'Kreditoren', '3300', '0', 'Verbindlichkeiten bei Partnern im Inland ohne eigenes Kreditorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1121, 'AT-BASE-2', 'Kreditoren', '3360', '0', 'Verbindlichkeiten bei Partnern im EU Raum ohne eigenes Kreditorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1122, 'AT-BASE-2', 'Kreditoren', '3370', '0', 'Verbindlichkeiten bei Partnern in Drittstaaten ohne eigenes Kreditorenkonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1123, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3480', '0', 'Verbindlichkeiten gegenüber Gesellschaftern', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1124, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3500', '0', 'Umsatzsteuer 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1125, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3501', '0', 'Umsatzsteuer 10%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1126, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3502', '0', 'Umsatzsteuer 13%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1127, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3505', '0', 'Sonstige Umsatzsteuer', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1128, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3510', '0', 'Umsatzsteuer RC EU 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1129, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3511', '0', 'Umsatzsteuer IGE 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1130, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3512', '0', 'Umsatzsteuer IGE 10%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1131, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3513', '0', 'Umsatzsteuer IGE 13%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1132, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3515', '0', 'Einfuhrumsatzsteuer 20%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1133, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3520', '0', 'Ust. Zahllast', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1134, 'AT-BASE-2', 'Kreditoren', '3530', '0', 'Verrechnungskonto Finanzamt', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1135, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3540', '0', 'Verrechnung Lohnsteuer', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1136, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3541', '0', 'Verrechnung Dienstgeberbeitrag', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1137, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3542', '0', 'Verrechnung Dienstgeberzuschlag', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1138, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3550', '0', 'Verrechnung Kommunalsteuer', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1139, 'AT-BASE-2', 'Kurzfristige Verbindlichkeiten', '3551', '0', 'Verrechnung Wiener Dienstgeberabgabe', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1140, 'AT-BASE-2', 'Kreditoren', '3600', '0', 'Verrechungskonto Sozialversicherung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1141, 'AT-BASE-2', 'Kreditoren', '3610', '0', 'Verrechnungskonto Magistrat/Gemeinde (KoSt, U-Bahn, etc.)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1142, 'AT-BASE-2', 'Kreditoren', '3740', '0', 'WERE Verrechnungskonto', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1143, 'AT-BASE-2', 'Erlöse', '4000', '0', 'Brutto-Umsatzerlöse im Inland (20%)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1144, 'AT-BASE-2', 'Erlöse', '4001', '0', 'Brutto-Umsatzerlöse im Inland (10%)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1145, 'AT-BASE-2', 'Erlöse', '4100', '0', 'Brutto-Umsatzerlöse im EU Raum (RC 20%)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1146, 'AT-BASE-2', 'Erlöse', '4110', '0', 'Brutto-Umsatzerlöse im EU Raum (RC 10%)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1147, 'AT-BASE-2', 'Erlöse', '4200', '0', 'Brutto-Umsatzerlöse in Drittstaaten (0%)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1148, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '4860', '0', 'Kursgewinne aus Fremdwährungstransaktionen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1149, 'AT-BASE-2', 'Aufwand', '5000', '0', 'Wareneinkauf', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1150, 'AT-BASE-2', 'Aufwand', '5050', '0', 'Wareneinkauf EU', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1151, 'AT-BASE-2', 'Aufwand', '5090', '0', 'Wareneinkauf 0%', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1152, 'AT-BASE-2', 'Aufwand', '5800', '0', 'Skontoerträge auf Materialaufwand', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1153, 'AT-BASE-2', 'Aufwand', '5810', '0', 'Skontoerträge auf sonstige bezogene Herstellungsleistungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1154, 'AT-BASE-2', 'Aufwand', '5900', '0', 'Aufwandsstellenrechnung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1155, 'AT-BASE-2', 'Aufwand', '6200', '0', 'Gehälter (Angestellte)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1156, 'AT-BASE-2', 'Aufwand', '6205', '0', 'Geschäftsführerbezug', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1157, 'AT-BASE-2', 'Aufwand', '6242', '0', 'Urlaubsabfindung (Angestellte)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1158, 'AT-BASE-2', 'Aufwand', '6260', '0', 'Sonstige Bezüge (Angestellte)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1159, 'AT-BASE-2', 'Aufwand', '6270', '0', 'Sachbezug (Angestellte)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1160, 'AT-BASE-2', 'Aufwand', '6271', '0', 'Sachbezug (Geschäftsführer)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1161, 'AT-BASE-2', 'Aufwand', '6310', '0', 'Grundgehälter (Überstunden)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1162, 'AT-BASE-2', 'Aufwand', '6330', '0', 'Gehälter (Überstundenzuschläge)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1163, 'AT-BASE-2', 'Aufwand', '6340', '0', 'Veränderung noch nicht konsumierter Urlaub', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1164, 'AT-BASE-2', 'Aufwand', '6400', '0', 'Beiträge für betriebliche Mitarbeitervorsorgekasse', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1165, 'AT-BASE-2', 'Aufwand', '6560', '0', 'Gesetzlicher Sozialaufwand', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1166, 'AT-BASE-2', 'Aufwand', '6660', '0', 'Kommunalsteuer (KoSt)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1167, 'AT-BASE-2', 'Aufwand', '6661', '0', 'Dienstgeberbeitrag zum Familienlastenausgleichsfonds (DB)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1168, 'AT-BASE-2', 'Aufwand', '6662', '0', 'Zuschlag zum Dienstnehmerbeitrag (DZ)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1169, 'AT-BASE-2', 'Aufwand', '6663', '0', 'Dienstgeberabgabe der Gemeinde Wien (U-Bahn Steuer)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1170, 'AT-BASE-2', 'Aufwand', '6700', '0', 'Sonstiger freiwilliger Sozialaufwand', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1171, 'AT-BASE-2', 'Aufwand', '6900', '0', 'Aufwandsstellenrechnung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1172, 'AT-BASE-2', 'Abschreibungen', '7000', '0', 'Abschreibungen auf aktivierte Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1173, 'AT-BASE-2', 'Abschreibungen', '7090', '0', 'Abschreibungen vom Umlaufvermögen, soweit diese die im Unternehmen üblichen Abschreibungen übersteigen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1174, 'AT-BASE-2', 'Aufwand', '7600', '0', 'Büromaterial und Drucksorten', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1175, 'AT-BASE-2', 'Aufwand', '7630', '0', 'Fachliteratur und Zeitungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1176, 'AT-BASE-2', 'Aufwand', '7690', '0', 'Spenden und Trinkgelder', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1177, 'AT-BASE-2', 'Aufwand', '7770', '0', 'Aus- und Fortbildung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1178, 'AT-BASE-2', 'Aufwand', '7780', '0', 'Mitgliedsbeiträge', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1179, 'AT-BASE-2', 'Aufwand', '7790', '0', 'Spesen des Geldverkehrs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1180, 'AT-BASE-2', 'Aufwand', '7820', '0', 'Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1181, 'AT-BASE-2', 'Aufwand', '7830', '0', 'Verluste aus dem Abgang vom Anlagevermögen, ausgenommen Finanzanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1182, 'AT-BASE-2', 'Aufwand', '7860', '0', 'Kursverluste aus Fremdwährungstransaktionen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1183, 'AT-BASE-2', 'Aufwand', '7890', '0', 'Skontoerträge auf sonstige betriebliche Aufwendungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1184, 'AT-BASE-2', 'Aufwand', '7900', '0', 'Aufwandsstellenrechnung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1185, 'AT-BASE-2', 'Aufwand', '7960', '0', 'Herstellungskosten der zur Erzielung der Umsatzerlöse erbrachten Leistungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1186, 'AT-BASE-2', 'Aufwand', '7970', '0', 'Vertriebskosten', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1187, 'AT-BASE-2', 'Aufwand', '7980', '0', 'Verwaltungskosten', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1188, 'AT-BASE-2', 'Aufwand', '7990', '0', 'Sonstige betriebliche Aufwendungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1189, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8140', '0', 'Erlöse aus dem Abgang von Beteiligungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1190, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8150', '0', 'Erlöse aus dem Abgang von sonstigen Finanzanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1191, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8160', '0', 'Erlöse aus dem Abgang von Wertpapieren des Umlaufvermögens', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1192, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8170', '0', 'Buchwert abgegangener Beteiligungen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1193, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8180', '0', 'Buchwert abgegangener sonstiger Finanzanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1194, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8190', '0', 'Buchwert abgegangener Wertpapiere des Umlaufvermögens', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1195, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8200', '0', 'Erträge aus dem Abgang von und der Zuschreibung zu Finanzanlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1196, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8210', '0', 'Erträge aus dem Abgang von und der Zuschreibung zu Wertpapieren des Umlaufvermögens', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1197, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8350', '0', 'Nicht ausgenützte Lieferantenskonti', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1198, 'AT-BASE-2', 'Sonstige betriebliche Erträge', '8990', '0', 'Gewinnabfuhr bzw. Verlustüberrechnung aus Ergebnisabführungsverträgen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1199, 'AT-BASE-2', 'Eigenkapital', '9190', '0', 'Nicht eingeforderte ausstehende Einlagen', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1200, 'AT-BASE-2', 'Eigenkapital', '9390', '0', 'Bilanzgewinn (-verlust)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1201, 'AT-BASE-2', 'Eigenkapital', '9800', '0', 'Eröffnungsbilanz', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1202, 'AT-BASE-2', 'Eigenkapital', '9850', '0', 'Schlussbilanz', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1203, 'AT-BASE-2', 'Eigenkapital', '9890', '0', 'Gewinn- und Verlustrechnung', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1204, 'AT-BASE-2', 'Aufwand', '9991', '0', 'Bargelddifferenz Verlust', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1205, 'AT-BASE-2', 'Erlöse', '9992', '0', 'Bargelddifferenz Gewinn', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_account_de.sql b/htdocs/install/mysql/data/llx_accounting_account_de.sql index 0165c3ec06e..e8026e32de1 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_de.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_de.sql @@ -24,328 +24,327 @@ -- SKR03 -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1, 'SKR03', '0', '1', '0', 'Aufwendungen für die Ingangsetzung und Erweiterung des Geschäftsbetriebs'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2, 'SKR03', '0', '2', '0', 'Aufwendungen für die Währungsumstellung auf den Euro'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 10, 'SKR03', '0', '10', '0', 'Konzessionen gewerbliche Schutzrechte und ähnliche Rechte und Werte sowie Lizenzen an solchen Rechten und Werten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 15, 'SKR03', '0', '15', '10', 'Konzessionen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 20, 'SKR03', '0', '20', '10', 'Gewerbliche Schutzrechte'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 25, 'SKR03', '0', '25', '10', 'ähnliche Rechte und Werte'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 27, 'SKR03', '0', '27', '10', 'EDV-Software'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 30, 'SKR03', '0', '30', '10', 'Lizenzen an gewerblichen Schutzrechten und ähnlichen Rechten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 35, 'SKR03', '0', '35', '0', 'Geschäfts- oder Firmenwert'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 38, 'SKR03', '0', '38', '0', 'Anzahlungen auf Geschäfts- oder Firmenwert'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 39, 'SKR03', '0', '39', '0', 'Anzahlungen auf immaterielle Vermögensgegenstände'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 40, 'SKR03', '0', '40', '0', 'Verschmelzungsmehrwert'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 50, 'SKR03', '0', '50', '0', 'Grundstücke grundstücksgleiche Rechte und Bauten einschließlich der Bauten auf fremden Grundstücken'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 59, 'SKR03', '0', '59', '50', 'Grundstücksanteil des häuslichen Arbeitszimmers.'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 60, 'SKR03', '0', '60', '0', 'Grundstücke und grundstücksgleiche Rechte ohne Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 65, 'SKR03', '0', '65', '60', 'Unbebaute Grundstücke'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 70, 'SKR03', '0', '70', '60', 'Grundstücksgleiche Rechte - (erbbaurecht Daürwohnrecht)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 75, 'SKR03', '0', '75', '60', 'Grundstücke mit Substanzverzehr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 79, 'SKR03', '0', '79', '60', 'Anzahlungen auf Grundstücke und grundstücksgleiche Rechte ohne Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 80, 'SKR03', '0', '80', '0', 'Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 85, 'SKR03', '0', '85', '80', 'Grundstückswerte eigener bebauter Grundstücke'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 90, 'SKR03', '0', '90', '80', 'Geschäftsbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 100, 'SKR03', '0', '100', '80', 'Fabrikbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 110, 'SKR03', '0', '110', '80', 'Garagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1055, 'SKR03', '0', '111', '80', 'Außenanlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1056, 'SKR03', '0', '112', '80', 'Hof- und Wegebefestigungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1057, 'SKR03', '0', '113', '80', 'Einrichtung Fabrik- und Geschäftsbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1058, 'SKR03', '0', '115', '80', 'Andere Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1059, 'SKR03', '0', '120', '80', 'Geschäfts- Fabrik- und andere Bauten im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1060, 'SKR03', '0', '129', '80', 'Anzahlungen auf Geshäfts- Fabrik- und andere Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1061, 'SKR03', '0', '140', '80', 'Wohnbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1062, 'SKR03', '0', '145', '80', 'Garagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1063, 'SKR03', '0', '146', '80', 'Aussenanlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1064, 'SKR03', '0', '147', '80', 'Hof- und Wegebefestigungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1065, 'SKR03', '0', '148', '80', 'Einrichtungen für Wohnbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1066, 'SKR03', '0', '149', '80', 'Gebäudeteil des häuslichen Arbeitszimmers'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1067, 'SKR03', '0', '150', '80', 'Wohnbauten im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1068, 'SKR03', '0', '159', '80', 'Anzahlgen auf Wohnbauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1069, 'SKR03', '0', '160', '0', 'Bauten auf fremden Grundstücken'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1070, 'SKR03', '0', '165', '160', 'Geschäftsbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1071, 'SKR03', '0', '170', '160', 'Fabrikbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1072, 'SKR03', '0', '175', '160', 'Garagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1073, 'SKR03', '0', '176', '160', 'Aussenanlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1074, 'SKR03', '0', '177', '160', 'Hof- und Wegebefestigungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1075, 'SKR03', '0', '178', '160', 'Einrichtung für Fabrik- und Geschäftsbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1076, 'SKR03', '0', '179', '160', 'Andere Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1077, 'SKR03', '0', '180', '160', 'Geschäfts- Fabrik- und andere Bauten im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1078, 'SKR03', '0', '189', '160', 'Anzahlungen auf Geschäfts- Fabrik- und andere Bauten auf fremden Grundstücken'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1079, 'SKR03', '0', '190', '160', 'Wohnbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1080, 'SKR03', '0', '191', '160', 'Garagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1081, 'SKR03', '0', '192', '160', 'Aussenanlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1082, 'SKR03', '0', '193', '160', 'Hof- und Wegebefestigungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1083, 'SKR03', '0', '194', '160', 'Einrichtungen für Wohnbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1084, 'SKR03', '0', '195', '160', 'Wohnbauten im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1085, 'SKR03', '0', '199', '160', 'Anzahlungen a. Wohnbauten auf fremden Grundstücken'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1087, 'SKR03', '0', '200', '0', 'Technische Anlagen und Maschinen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1088, 'SKR03', '0', '210', '200', 'Maschinen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1089, 'SKR03', '0', '220', '200', 'Maschinengebundene Werkzeuge'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1090, 'SKR03', '0', '240', '200', 'Maschinelle Anlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1091, 'SKR03', '0', '260', '200', 'Transportanlagen und ähnliches'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1092, 'SKR03', '0', '280', '200', 'Betriebsvorrichtungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1093, 'SKR03', '0', '290', '200', 'Technische Anlagen und Maschinen im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1094, 'SKR03', '0', '299', '200', 'Anzahlungen auf technische Anlagen und Maschinen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1096, 'SKR03', '0', '300', '0', 'Andere Anlagen Betriebs- und Geschäftsausstattung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1097, 'SKR03', '0', '310', '300', 'Andere Anlagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1098, 'SKR03', '0', '320', '300', 'PKW'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1099, 'SKR03', '0', '350', '300', 'LKW'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1100, 'SKR03', '0', '380', '300', 'Sonstige Transportmittel'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1101, 'SKR03', '0', '400', '300', 'Betriebsausstattung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1102, 'SKR03', '0', '410', '300', 'Geschäftsausstattung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1103, 'SKR03', '0', '420', '300', 'Büroeinrichtung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1104, 'SKR03', '0', '430', '300', 'Ladeneinrichtung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1105, 'SKR03', '0', '440', '300', 'Werkzeuge'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1106, 'SKR03', '0', '450', '300', 'Einbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1107, 'SKR03', '0', '460', '300', 'Gerüst- und Schalungsmaterial'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1108, 'SKR03', '0', '480', '300', 'Geringwertige Wirtschaftsgüter bis 410 Euro'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1109, 'SKR03', '0', '490', '300', 'Sonstige Betriebs- und Geschäftsausstattung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1110, 'SKR03', '0', '498', '300', 'Andere Anlagen Betriebs- und Geschäftsausstattung im Bau'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1111, 'SKR03', '0', '499', '300', 'Anzahlungen auf andere Anlagen Betriebs- und Geschäftsausstattung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1114, 'SKR03', '0', '500', '0', 'Anteile an verbundenen Unternehmen (Anlagevermögen)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1115, 'SKR03', '0', '504', '500', 'Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1117, 'SKR03', '0', '505', '500', 'Ausleihungen an verbundene Unternehmen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1119, 'SKR03', '0', '510', '500', 'Beteiligungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1120, 'SKR03', '0', '513', '510', 'Typisch stille Beteiligungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1121, 'SKR03', '0', '516', '510', 'Atypisch stille Beteiligungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1122, 'SKR03', '0', '517', '510', 'Andere Beteiligungen an Kapitalgesellschaften'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1123, 'SKR03', '0', '518', '510', 'Andere Beteiligungen an Personengesellschaften'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1124, 'SKR03', '0', '519', '510', 'Beteiligung einer GmbH&Co.KG an einer Komplementär GmbH'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1126, 'SKR03', '0', '520', '0', 'Ausleihungen an Unternehmen mit denen ein Beteiligungsverhältnis besteht'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1128, 'SKR03', '0', '525', '520', 'Wertpapiere des Anlagevermögens'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1129, 'SKR03', '0', '530', '525', 'Wertpapiere mit Gewinnbeteiligungsansprüchen die dem Halbeinkünfteverfahren unterliegen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1130, 'SKR03', '0', '535', '525', 'Festverzinsliche Wertpapiere'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1132, 'SKR03', '0', '540', '0', 'Sonstige Ausleihungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1133, 'SKR03', '0', '550', '540', 'Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1135, 'SKR03', '0', '570', '0', 'Genossenschaftsanteile zum langfristigen Verbleib'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1136, 'SKR03', '0', '580', '570', 'Ausleihungen an Gesellschafter'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1137, 'SKR03', '0', '590', '570', 'Ausleihungen an nahe stehende Personen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1139, 'SKR03', '0', '595', '0', 'Rückdeckungsansprüche aus Lebensversicherungen zum langfristigen Verbleib'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1142, 'SKR03', '0', '600', '0', 'Anleihen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1143, 'SKR03', '0', '601', '600', 'Anleihen nicht konvertibel (bis 1 Jahr)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1144, 'SKR03', '0', '605', '600', 'Anleihen nicht konvertibel (1-5 Jahre)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1145, 'SKR03', '0', '610', '600', 'Anleihen nicht konvertibel (größer 5 Jahre)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1146, 'SKR03', '0', '615', '600', 'Anleihen konvertibel'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1147, 'SKR03', '0', '616', '600', 'Anleihen konvertibel(bis 1 Jahr)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1148, 'SKR03', '0', '620', '600', 'Anleihen konvertibel(1-5 Jahre)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1149, 'SKR03', '0', '625', '600', 'Anleihen konvertibel(größer 5 Jahre)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1151, 'SKR03', '0', '630', '0', 'Verbindlichkeiten gegenüber Kreditinstituten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1152, 'SKR03', '0', '631', '630', 'Verbindlichkeiten gegenüber Kreditinstitut ( bis 1Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1153, 'SKR03', '0', '640', '630', 'Verbindlichkeiten gegenüber Kreditinstitut (1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1154, 'SKR03', '0', '650', '630', 'Verbindlichkeiten gegenüber Kreditinstitut (größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1155, 'SKR03', '0', '660', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1156, 'SKR03', '0', '661', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen ( bis 1Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1157, 'SKR03', '0', '670', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen (1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1158, 'SKR03', '0', '680', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen (größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1159, 'SKR03', '0', '690', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1160, 'SKR03', '0', '691', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1161, 'SKR03', '0', '692', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1162, 'SKR03', '0', '693', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1163, 'SKR03', '0', '694', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1164, 'SKR03', '0', '695', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1165, 'SKR03', '0', '696', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1166, 'SKR03', '0', '697', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1167, 'SKR03', '0', '698', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1169, 'SKR03', '0', '699', '600', 'Gegenkonto 0630-0689 bei Aufteilung der Konten 0690-0698'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1171, 'SKR03', '0', '700', '600', 'Verbindlichkeiten gegenüber verbundenen Unternehmen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1172, 'SKR03', '0', '701', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( bis 1 Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1173, 'SKR03', '0', '705', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1174, 'SKR03', '0', '710', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1176, 'SKR03', '0', '715', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1177, 'SKR03', '0', '716', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( bis 1 Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1178, 'SKR03', '0', '720', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1179, 'SKR03', '0', '725', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( größer 5 Jahre)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1181, 'SKR03', '0', '730', '600', 'Verbindlichkeit gegenüber Gesellschaftern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1182, 'SKR03', '0', '731', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( bis 1 Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1183, 'SKR03', '0', '740', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1184, 'SKR03', '0', '750', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1185, 'SKR03', '0', '755', '730', 'Verbindlichkeit gegenüber Gesellschaftern für offene Ausschüttungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1186, 'SKR03', '0', '760', '730', 'Darlehen typisch stiller Gesellschafter'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1187, 'SKR03', '0', '761', '730', 'Darlehen typisch stiller Gesellschafter ( bis 1 Jahr)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1188, 'SKR03', '0', '764', '730', 'Darlehen typisch stiller Gesellschafter ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1189, 'SKR03', '0', '767', '730', 'Darlehen typisch stiller Gesellschafter ( größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1190, 'SKR03', '0', '770', '730', 'Darlehen atypisch stiller Gesellschafter'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1191, 'SKR03', '0', '771', '730', 'Darlehen atypisch stiller Gesellschafter ( bis 1 Jahr)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1192, 'SKR03', '0', '774', '730', 'Darlehen atypisch stiller Gesellschafter ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1193, 'SKR03', '0', '777', '730', 'Darlehen atypisch stiller Gesellschafter ( größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1194, 'SKR03', '0', '780', '730', 'Partiarische Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1195, 'SKR03', '0', '781', '730', 'Partiarische Darlehen ( bis 1 Jahr )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1196, 'SKR03', '0', '784', '730', 'Partiarische Darlehen ( 1 bis 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1197, 'SKR03', '0', '787', '730', 'Partiarische Darlehen ( größer 5 Jahre )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1198, 'SKR03', '0', '790', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1199, 'SKR03', '0', '791', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1200, 'SKR03', '0', '792', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1201, 'SKR03', '0', '793', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1202, 'SKR03', '0', '794', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1203, 'SKR03', '0', '795', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1204, 'SKR03', '0', '796', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1205, 'SKR03', '0', '797', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1206, 'SKR03', '0', '798', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1207, 'SKR03', '0', '799', '730', 'Gegenkonto 0730 - 0789 bei Aufteilung der Konten 0790 - 0798'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1210, 'SKR03', '0', '800', '0', 'Gezeichnetes Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1212, 'SKR03', '0', '801', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1213, 'SKR03', '0', '802', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1214, 'SKR03', '0', '803', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1215, 'SKR03', '0', '804', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1216, 'SKR03', '0', '805', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1217, 'SKR03', '0', '806', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1218, 'SKR03', '0', '807', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1219, 'SKR03', '0', '808', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1220, 'SKR03', '0', '809', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1221, 'SKR03', '0', '810', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1222, 'SKR03', '0', '811', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1223, 'SKR03', '0', '812', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1224, 'SKR03', '0', '813', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1225, 'SKR03', '0', '814', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1226, 'SKR03', '0', '815', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1227, 'SKR03', '0', '816', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1228, 'SKR03', '0', '817', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1229, 'SKR03', '0', '818', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1230, 'SKR03', '0', '819', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1232, 'SKR03', '0', '820', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1233, 'SKR03', '0', '821', '800', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1234, 'SKR03', '0', '822', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1235, 'SKR03', '0', '823', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1236, 'SKR03', '0', '824', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1237, 'SKR03', '0', '825', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1238, 'SKR03', '0', '826', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1239, 'SKR03', '0', '827', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1240, 'SKR03', '0', '828', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1241, 'SKR03', '0', '829', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1243, 'SKR03', '0', '830', '800', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1244, 'SKR03', '0', '831', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1245, 'SKR03', '0', '832', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1246, 'SKR03', '0', '833', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1247, 'SKR03', '0', '834', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1248, 'SKR03', '0', '835', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1249, 'SKR03', '0', '836', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1250, 'SKR03', '0', '837', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1251, 'SKR03', '0', '838', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1253, 'SKR03', '0', '839', '830', 'Eingeforderte Nachschüsse ( Forderungen Gegenkonto 0845 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1256, 'SKR03', '0', '840', '0', 'Kapitalrücklage'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1257, 'SKR03', '0', '841', '840', 'Kapitalrücklage durch Ausgabe von Anteilen über Nennbetrag'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1258, 'SKR03', '0', '842', '840', 'Kapitalrücklage durch Ausgabe von Schuldverschreibungen für Wandlungsrechte und Optionsrechte zum Erwerb von Anteilen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1259, 'SKR03', '0', '843', '840', 'Kapitalrücklage durch Zuzahlungen gegen Gewährung eines Vorzugs für Anteile'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1260, 'SKR03', '0', '844', '840', 'Kapitalrücklage durch andere Zuzahlungen in das Eigenkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1261, 'SKR03', '0', '845', '840', 'Eingefordertes Nachschusskapital ( Gegenkonto 0839 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1264, 'SKR03', '0', '846', '840', 'Gesetzliche Rücklage'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1266, 'SKR03', '0', '850', '840', 'Rücklage für eigene Anteile'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1268, 'SKR03', '0', '851', '840', 'Satzungsmässige Rücklagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1270, 'SKR03', '0', '855', '840', 'Andere Gewinnrücklagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1271, 'SKR03', '0', '856', '840', 'Eigenkapitalanteil von Wertaufholungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1273, 'SKR03', '0', '860', '0', 'Gewinnvortrag vor Verwendung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1274, 'SKR03', '0', '868', '860', 'Verlustvortrag vor Verwendung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1276, 'SKR03', '0', '869', '860', 'Vortrag auf neue Rechnung (Bilanz)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1278, 'SKR03', '0', '870', '0', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1279, 'SKR03', '0', '871', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1280, 'SKR03', '0', '872', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1281, 'SKR03', '0', '873', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1282, 'SKR03', '0', '874', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1283, 'SKR03', '0', '875', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1284, 'SKR03', '0', '876', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1285, 'SKR03', '0', '877', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1286, 'SKR03', '0', '878', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1287, 'SKR03', '0', '879', '870', 'Festkapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1288, 'SKR03', '0', '880', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1289, 'SKR03', '0', '881', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1290, 'SKR03', '0', '882', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1291, 'SKR03', '0', '883', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1292, 'SKR03', '0', '884', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1293, 'SKR03', '0', '885', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1294, 'SKR03', '0', '886', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1295, 'SKR03', '0', '887', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1296, 'SKR03', '0', '888', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1297, 'SKR03', '0', '889', '870', 'Variables Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1298, 'SKR03', '0', '890', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1299, 'SKR03', '0', '891', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1300, 'SKR03', '0', '892', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1301, 'SKR03', '0', '893', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1302, 'SKR03', '0', '894', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1303, 'SKR03', '0', '895', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1304, 'SKR03', '0', '896', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1305, 'SKR03', '0', '897', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1306, 'SKR03', '0', '898', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1307, 'SKR03', '0', '899', '870', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1309, 'SKR03', '0', '900', '0', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1310, 'SKR03', '0', '901', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1311, 'SKR03', '0', '902', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1312, 'SKR03', '0', '903', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1313, 'SKR03', '0', '904', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1314, 'SKR03', '0', '905', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1315, 'SKR03', '0', '906', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1316, 'SKR03', '0', '907', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1317, 'SKR03', '0', '908', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1318, 'SKR03', '0', '909', '1309', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1319, 'SKR03', '0', '910', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1320, 'SKR03', '0', '911', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1321, 'SKR03', '0', '912', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1322, 'SKR03', '0', '913', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1323, 'SKR03', '0', '914', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1324, 'SKR03', '0', '915', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1325, 'SKR03', '0', '916', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1326, 'SKR03', '0', '917', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1327, 'SKR03', '0', '918', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1328, 'SKR03', '0', '919', '1309', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1329, 'SKR03', '0', '920', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1330, 'SKR03', '0', '921', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1331, 'SKR03', '0', '922', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1332, 'SKR03', '0', '923', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1333, 'SKR03', '0', '924', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1334, 'SKR03', '0', '925', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1335, 'SKR03', '0', '926', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1336, 'SKR03', '0', '927', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1337, 'SKR03', '0', '928', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1338, 'SKR03', '0', '929', '1309', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1341, 'SKR03', '0', '930', '1309', 'Sonderposten mit Rücklageanteil steuerfreie Rücklagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1342, 'SKR03', '0', '931', '1341', 'Sonderposten mit Rücklageanteil nach § 6b EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1343, 'SKR03', '0', '932', '1341', 'Sonderposten mit Rücklageanteil nach Abschnitt 35 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1344, 'SKR03', '0', '933', '1341', 'Sonderposten mit Rücklageanteil nach § 6d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1345, 'SKR03', '0', '934', '1341', 'Sonderposten mit Rücklageanteil nach § 1 EntwLStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1347, 'SKR03', '0', '935', '1309', 'Sonderposten aus der Währungsumstellung auf den Euro'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1348, 'SKR03', '0', '936', '1341', 'Sonderposten mit Rücklageanteil nach § 7 d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1349, 'SKR03', '0', '937', '1341', 'Sonderposten mit Rücklageanteil nach § 79 EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1350, 'SKR03', '0', '938', '1341', 'Sonderposten mit Rücklageanteil nach § 80 EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1351, 'SKR03', '0', '939', '1341', 'Sonderposten mit Rücklageanteil nach § 52 Abs.16 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1352, 'SKR03', '0', '940', '1341', 'Sonderposten mit Rücklageanteil Sonderabschreibungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1353, 'SKR03', '0', '941', '1341', 'Sonderposten mit Rücklageanteil § 82 a EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1354, 'SKR03', '0', '942', '1341', 'Sonderposten mit Rücklageanteil § 82 d EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1355, 'SKR03', '0', '943', '1341', 'Sonderposten mit Rücklageanteil nach § 82 e EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1356, 'SKR03', '0', '944', '1341', 'Sonderposten mit Rücklageanteil nach § 14 BerlinFG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1357, 'SKR03', '0', '945', '1341', 'Sonderposten mit Rücklageanteil für Förderung nach § 3 Zonen-RFG/§ 4-6 FördergebietsG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1358, 'SKR03', '0', '946', '1341', 'Sonderposten mit Rücklageanteil nach § 4d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1359, 'SKR03', '0', '947', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.1 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1360, 'SKR03', '0', '948', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.3 u.7 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1362, 'SKR03', '0', '949', '1309', 'Sonderposten für Zuschüsse und Zulagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1365, 'SKR03', '0', '950', '1309', 'Rückstellungen für Pensionen und ähnliche Verpflichtungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1367, 'SKR03', '0', '955', '1309', 'Steuerrückstellungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1368, 'SKR03', '0', '957', '1367', 'Gewerbesteuerrückstellung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1369, 'SKR03', '0', '963', '1367', 'Körperschaftsteuerrückstellung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1371, 'SKR03', '0', '965', '1309', 'Rückstellungen für Personalkosten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1372, 'SKR03', '0', '966', '1309', 'Rückstellungen zur Erfüllung der Aufbewahrungspflichten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1373, 'SKR03', '0', '969', '1309', 'Rückstellung für latente Steuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1374, 'SKR03', '0', '970', '1309', 'Sonstige Rückstellungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1375, 'SKR03', '0', '971', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung in den ersten drei Monaten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1376, 'SKR03', '0', '972', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung innerhalb des 4. bis 12. Monats'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1377, 'SKR03', '0', '973', '1309', 'Rückstellungen für Abraum- und Abfallbeseitigung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1378, 'SKR03', '0', '974', '1309', 'Rückstellungen für Gewährleistungen ( Gegenkonto 4790 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1379, 'SKR03', '0', '976', '1309', 'Rückstellungen für drohende Verluste aus schwebenden Geschäften'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1380, 'SKR03', '0', '977', '1309', 'Rückstellungen für Abschluss- und Prüfungskosten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1381, 'SKR03', '0', '978', '1309', 'Aufwandsrückstellungen gemäß § 249 Abs. 2 HGB'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1382, 'SKR03', '0', '979', '1309', 'Rückstellungen für Umweltschutz'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1385, 'SKR03', '0', '980', '1309', 'Aktive Rechnungsabgrenzung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1387, 'SKR03', '0', '983', '1385', 'Abgrenzung aktive latente Steuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1388, 'SKR03', '0', '984', '1309', 'Als Aufwand berücksichtigte Zölle und Verbrauchsteuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1389, 'SKR03', '0', '985', '1309', 'Als Aufwand berücksichtigte Umsatzsteuer auf Anzahlungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1390, 'SKR03', '0', '986', '1309', 'Damnum / Disagio'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1393, 'SKR03', '0', '990', '1309', 'Passive Rechnungsabgrenzung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1395, 'SKR03', '0', '992', '1393', 'Abgenzungsposten zur unterjährigen Kostenverrechnung für BWA'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1396, 'SKR03', '0', '993', '1393', 'Forderungen aus Lieferungen und Leistungen H-Saldo'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1397, 'SKR03', '0', '996', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1398, 'SKR03', '0', '997', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1399, 'SKR03', '0', '998', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1400, 'SKR03', '0', '999', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); - +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1, 'SKR03', '0', '0001', '0', 'Aufwendungen für die Ingangsetzung und Erweiterung des Geschäftsbetriebs'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2, 'SKR03', '0', '0002', '0', 'Aufwendungen für die Währungsumstellung auf den Euro'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 10, 'SKR03', '0', '0010', '0', 'Konzessionen gewerbliche Schutzrechte und ähnliche Rechte und Werte sowie Lizenzen an solchen Rechten und Werten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 15, 'SKR03', '0', '0015', '10', 'Konzessionen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 20, 'SKR03', '0', '0020', '10', 'Gewerbliche Schutzrechte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 25, 'SKR03', '0', '0025', '10', 'ähnliche Rechte und Werte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 27, 'SKR03', '0', '0027', '10', 'EDV-Software'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 30, 'SKR03', '0', '0030', '10', 'Lizenzen an gewerblichen Schutzrechten und ähnlichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 35, 'SKR03', '0', '0035', '0', 'Geschäfts- oder Firmenwert'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 38, 'SKR03', '0', '0038', '0', 'Anzahlungen auf Geschäfts- oder Firmenwert'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 39, 'SKR03', '0', '0039', '0', 'Anzahlungen auf immaterielle Vermögensgegenstände'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 40, 'SKR03', '0', '0040', '0', 'Verschmelzungsmehrwert'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 50, 'SKR03', '0', '0050', '0', 'Grundstücke grundstücksgleiche Rechte und Bauten einschließlich der Bauten auf fremden Grundstücken'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 59, 'SKR03', '0', '0059', '50', 'Grundstücksanteil des häuslichen Arbeitszimmers.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 60, 'SKR03', '0', '0060', '0', 'Grundstücke und grundstücksgleiche Rechte ohne Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 65, 'SKR03', '0', '0065', '60', 'Unbebaute Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 70, 'SKR03', '0', '0070', '60', 'Grundstücksgleiche Rechte - (erbbaurecht Daürwohnrecht)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 75, 'SKR03', '0', '0075', '60', 'Grundstücke mit Substanzverzehr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 79, 'SKR03', '0', '0079', '60', 'Anzahlungen auf Grundstücke und grundstücksgleiche Rechte ohne Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 80, 'SKR03', '0', '0080', '0', 'Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 85, 'SKR03', '0', '0085', '80', 'Grundstückswerte eigener bebauter Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 90, 'SKR03', '0', '0090', '80', 'Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 100, 'SKR03', '0', '0100', '80', 'Fabrikbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 110, 'SKR03', '0', '0110', '80', 'Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1055, 'SKR03', '0', '0111', '80', 'Außenanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1056, 'SKR03', '0', '0112', '80', 'Hof- und Wegebefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1057, 'SKR03', '0', '0113', '80', 'Einrichtung Fabrik- und Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1058, 'SKR03', '0', '0115', '80', 'Andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1059, 'SKR03', '0', '0120', '80', 'Geschäfts- Fabrik- und andere Bauten im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1060, 'SKR03', '0', '0129', '80', 'Anzahlungen auf Geshäfts- Fabrik- und andere Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1061, 'SKR03', '0', '0140', '80', 'Wohnbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1062, 'SKR03', '0', '0145', '80', 'Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1063, 'SKR03', '0', '0146', '80', 'Aussenanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1064, 'SKR03', '0', '0147', '80', 'Hof- und Wegebefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1065, 'SKR03', '0', '0148', '80', 'Einrichtungen für Wohnbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1066, 'SKR03', '0', '0149', '80', 'Gebäudeteil des häuslichen Arbeitszimmers'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1067, 'SKR03', '0', '0150', '80', 'Wohnbauten im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1068, 'SKR03', '0', '0159', '80', 'Anzahlgen auf Wohnbauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1069, 'SKR03', '0', '0160', '0', 'Bauten auf fremden Grundstücken'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1070, 'SKR03', '0', '0165', '160', 'Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1071, 'SKR03', '0', '0170', '160', 'Fabrikbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1072, 'SKR03', '0', '0175', '160', 'Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1073, 'SKR03', '0', '0176', '160', 'Aussenanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1074, 'SKR03', '0', '0177', '160', 'Hof- und Wegebefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1075, 'SKR03', '0', '0178', '160', 'Einrichtung für Fabrik- und Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1076, 'SKR03', '0', '0179', '160', 'Andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1077, 'SKR03', '0', '0180', '160', 'Geschäfts- Fabrik- und andere Bauten im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1078, 'SKR03', '0', '0189', '160', 'Anzahlungen auf Geschäfts- Fabrik- und andere Bauten auf fremden Grundstücken'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1079, 'SKR03', '0', '0190', '160', 'Wohnbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1080, 'SKR03', '0', '0191', '160', 'Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1081, 'SKR03', '0', '0192', '160', 'Aussenanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1082, 'SKR03', '0', '0193', '160', 'Hof- und Wegebefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1083, 'SKR03', '0', '0194', '160', 'Einrichtungen für Wohnbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1084, 'SKR03', '0', '0195', '160', 'Wohnbauten im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1085, 'SKR03', '0', '0199', '160', 'Anzahlungen a. Wohnbauten auf fremden Grundstücken'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1087, 'SKR03', '0', '0200', '0', 'Technische Anlagen und Maschinen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1088, 'SKR03', '0', '0210', '200', 'Maschinen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1089, 'SKR03', '0', '0220', '200', 'Maschinengebundene Werkzeuge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1090, 'SKR03', '0', '0240', '200', 'Maschinelle Anlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1091, 'SKR03', '0', '0260', '200', 'Transportanlagen und ähnliches'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1092, 'SKR03', '0', '0280', '200', 'Betriebsvorrichtungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1093, 'SKR03', '0', '0290', '200', 'Technische Anlagen und Maschinen im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1094, 'SKR03', '0', '0299', '200', 'Anzahlungen auf technische Anlagen und Maschinen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1096, 'SKR03', '0', '0300', '0', 'Andere Anlagen Betriebs- und Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1097, 'SKR03', '0', '0310', '300', 'Andere Anlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1098, 'SKR03', '0', '0320', '300', 'PKW'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1099, 'SKR03', '0', '0350', '300', 'LKW'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1100, 'SKR03', '0', '0380', '300', 'Sonstige Transportmittel'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1101, 'SKR03', '0', '0400', '300', 'Betriebsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1102, 'SKR03', '0', '0410', '300', 'Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1103, 'SKR03', '0', '0420', '300', 'Büroeinrichtung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1104, 'SKR03', '0', '0430', '300', 'Ladeneinrichtung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1105, 'SKR03', '0', '0440', '300', 'Werkzeuge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1106, 'SKR03', '0', '0450', '300', 'Einbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1107, 'SKR03', '0', '0460', '300', 'Gerüst- und Schalungsmaterial'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1108, 'SKR03', '0', '0480', '300', 'Geringwertige Wirtschaftsgüter bis 410 Euro'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1109, 'SKR03', '0', '0490', '300', 'Sonstige Betriebs- und Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1110, 'SKR03', '0', '0498', '300', 'Andere Anlagen Betriebs- und Geschäftsausstattung im Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1111, 'SKR03', '0', '0499', '300', 'Anzahlungen auf andere Anlagen Betriebs- und Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1114, 'SKR03', '0', '0500', '0', 'Anteile an verbundenen Unternehmen (Anlagevermögen)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1115, 'SKR03', '0', '0504', '500', 'Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1117, 'SKR03', '0', '0505', '500', 'Ausleihungen an verbundene Unternehmen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1119, 'SKR03', '0', '0510', '500', 'Beteiligungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1120, 'SKR03', '0', '0513', '510', 'Typisch stille Beteiligungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1121, 'SKR03', '0', '0516', '510', 'Atypisch stille Beteiligungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1122, 'SKR03', '0', '0517', '510', 'Andere Beteiligungen an Kapitalgesellschaften'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1123, 'SKR03', '0', '0518', '510', 'Andere Beteiligungen an Personengesellschaften'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1124, 'SKR03', '0', '0519', '510', 'Beteiligung einer GmbH&Co.KG an einer Komplementär GmbH'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1126, 'SKR03', '0', '0520', '0', 'Ausleihungen an Unternehmen mit denen ein Beteiligungsverhältnis besteht'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1128, 'SKR03', '0', '0525', '520', 'Wertpapiere des Anlagevermögens'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1129, 'SKR03', '0', '0530', '525', 'Wertpapiere mit Gewinnbeteiligungsansprüchen die dem Halbeinkünfteverfahren unterliegen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1130, 'SKR03', '0', '0535', '525', 'Festverzinsliche Wertpapiere'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1132, 'SKR03', '0', '0540', '0', 'Sonstige Ausleihungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1133, 'SKR03', '0', '0550', '540', 'Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1135, 'SKR03', '0', '0570', '0', 'Genossenschaftsanteile zum langfristigen Verbleib'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1136, 'SKR03', '0', '0580', '570', 'Ausleihungen an Gesellschafter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1137, 'SKR03', '0', '0590', '570', 'Ausleihungen an nahe stehende Personen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1139, 'SKR03', '0', '0595', '0', 'Rückdeckungsansprüche aus Lebensversicherungen zum langfristigen Verbleib'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1142, 'SKR03', '0', '0600', '0', 'Anleihen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1143, 'SKR03', '0', '0601', '600', 'Anleihen nicht konvertibel (bis 1 Jahr)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1144, 'SKR03', '0', '0605', '600', 'Anleihen nicht konvertibel (1-5 Jahre)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1145, 'SKR03', '0', '0610', '600', 'Anleihen nicht konvertibel (größer 5 Jahre)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1146, 'SKR03', '0', '0615', '600', 'Anleihen konvertibel'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1147, 'SKR03', '0', '0616', '600', 'Anleihen konvertibel(bis 1 Jahr)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1148, 'SKR03', '0', '0620', '600', 'Anleihen konvertibel(1-5 Jahre)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1149, 'SKR03', '0', '0625', '600', 'Anleihen konvertibel(größer 5 Jahre)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1151, 'SKR03', '0', '0630', '0', 'Verbindlichkeiten gegenüber Kreditinstituten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1152, 'SKR03', '0', '0631', '630', 'Verbindlichkeiten gegenüber Kreditinstitut ( bis 1Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1153, 'SKR03', '0', '0640', '630', 'Verbindlichkeiten gegenüber Kreditinstitut (1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1154, 'SKR03', '0', '0650', '630', 'Verbindlichkeiten gegenüber Kreditinstitut (größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1155, 'SKR03', '0', '0660', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1156, 'SKR03', '0', '0661', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen ( bis 1Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1157, 'SKR03', '0', '0670', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen (1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1158, 'SKR03', '0', '0680', '630', 'Verbindlichkeit. gegenüber Kreditinstituten aus Teilzahlungsverträgen (größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1159, 'SKR03', '0', '0690', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1160, 'SKR03', '0', '0691', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1161, 'SKR03', '0', '0692', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1162, 'SKR03', '0', '0693', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1163, 'SKR03', '0', '0694', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1164, 'SKR03', '0', '0695', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1165, 'SKR03', '0', '0696', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1166, 'SKR03', '0', '0697', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1167, 'SKR03', '0', '0698', '630', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1169, 'SKR03', '0', '0699', '600', 'Gegenkonto 0630-0689 bei Aufteilung der Konten 0690-0698'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1171, 'SKR03', '0', '0700', '600', 'Verbindlichkeiten gegenüber verbundenen Unternehmen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1172, 'SKR03', '0', '0701', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( bis 1 Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1173, 'SKR03', '0', '0705', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1174, 'SKR03', '0', '0710', '700', 'Verbindlichkeiten gegenüber verbundenen Unternehmen ( größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1176, 'SKR03', '0', '0715', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1177, 'SKR03', '0', '0716', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( bis 1 Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1178, 'SKR03', '0', '0720', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1179, 'SKR03', '0', '0725', '600', 'Verbindlichkeit. gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( größer 5 Jahre)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1181, 'SKR03', '0', '0730', '600', 'Verbindlichkeit gegenüber Gesellschaftern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1182, 'SKR03', '0', '0731', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( bis 1 Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1183, 'SKR03', '0', '0740', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1184, 'SKR03', '0', '0750', '730', 'Verbindlichkeit gegenüber Gesellschaftern ( größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1185, 'SKR03', '0', '0755', '730', 'Verbindlichkeit gegenüber Gesellschaftern für offene Ausschüttungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1186, 'SKR03', '0', '0760', '730', 'Darlehen typisch stiller Gesellschafter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1187, 'SKR03', '0', '0761', '730', 'Darlehen typisch stiller Gesellschafter ( bis 1 Jahr)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1188, 'SKR03', '0', '0764', '730', 'Darlehen typisch stiller Gesellschafter ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1189, 'SKR03', '0', '0767', '730', 'Darlehen typisch stiller Gesellschafter ( größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1190, 'SKR03', '0', '0770', '730', 'Darlehen atypisch stiller Gesellschafter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1191, 'SKR03', '0', '0771', '730', 'Darlehen atypisch stiller Gesellschafter ( bis 1 Jahr)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1192, 'SKR03', '0', '0774', '730', 'Darlehen atypisch stiller Gesellschafter ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1193, 'SKR03', '0', '0777', '730', 'Darlehen atypisch stiller Gesellschafter ( größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1194, 'SKR03', '0', '0780', '730', 'Partiarische Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1195, 'SKR03', '0', '0781', '730', 'Partiarische Darlehen ( bis 1 Jahr )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1196, 'SKR03', '0', '0784', '730', 'Partiarische Darlehen ( 1 bis 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1197, 'SKR03', '0', '0787', '730', 'Partiarische Darlehen ( größer 5 Jahre )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1198, 'SKR03', '0', '0790', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1199, 'SKR03', '0', '0791', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1200, 'SKR03', '0', '0792', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1201, 'SKR03', '0', '0793', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1202, 'SKR03', '0', '0794', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1203, 'SKR03', '0', '0795', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1204, 'SKR03', '0', '0796', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1205, 'SKR03', '0', '0797', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1206, 'SKR03', '0', '0798', '730', '(frei in Bilanz kein Restlaufzeitvermerk)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1207, 'SKR03', '0', '0799', '730', 'Gegenkonto 0730 - 0789 bei Aufteilung der Konten 0790 - 0798'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1210, 'SKR03', '0', '0800', '0', 'Gezeichnetes Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1212, 'SKR03', '0', '0801', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1213, 'SKR03', '0', '0802', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1214, 'SKR03', '0', '0803', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1215, 'SKR03', '0', '0804', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1216, 'SKR03', '0', '0805', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1217, 'SKR03', '0', '0806', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1218, 'SKR03', '0', '0807', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1219, 'SKR03', '0', '0808', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1220, 'SKR03', '0', '0809', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1221, 'SKR03', '0', '0810', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1222, 'SKR03', '0', '0811', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1223, 'SKR03', '0', '0812', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1224, 'SKR03', '0', '0813', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1225, 'SKR03', '0', '0814', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1226, 'SKR03', '0', '0815', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1227, 'SKR03', '0', '0816', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1228, 'SKR03', '0', '0817', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1229, 'SKR03', '0', '0818', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1230, 'SKR03', '0', '0819', '801', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert (Aktivausweis)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1232, 'SKR03', '0', '0820', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1233, 'SKR03', '0', '0821', '800', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1234, 'SKR03', '0', '0822', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1235, 'SKR03', '0', '0823', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1236, 'SKR03', '0', '0824', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1237, 'SKR03', '0', '0825', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1238, 'SKR03', '0', '0826', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1239, 'SKR03', '0', '0827', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1240, 'SKR03', '0', '0828', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1241, 'SKR03', '0', '0829', '820', 'Ausstehende Einlagen auf das gezeichnete Kapital nicht eingefordert (Passivausweis von gezeichnetem Kapital offen abgesetzt eingeforderte ausstehende Einlagen s. Konten 0830 - 0838 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1243, 'SKR03', '0', '0830', '800', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1244, 'SKR03', '0', '0831', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1245, 'SKR03', '0', '0832', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1246, 'SKR03', '0', '0833', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1247, 'SKR03', '0', '0834', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1248, 'SKR03', '0', '0835', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1249, 'SKR03', '0', '0836', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1250, 'SKR03', '0', '0837', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1251, 'SKR03', '0', '0838', '830', 'Ausstehende Einlagen auf das gezeichnete Kapital eingefordert ( Forderungen nicht eingeforderte ausstehende Einlagen s. Konten 0820 - 0829 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1253, 'SKR03', '0', '0839', '830', 'Eingeforderte Nachschüsse ( Forderungen Gegenkonto 0845 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1256, 'SKR03', '0', '0840', '0', 'Kapitalrücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1257, 'SKR03', '0', '0841', '840', 'Kapitalrücklage durch Ausgabe von Anteilen über Nennbetrag'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1258, 'SKR03', '0', '0842', '840', 'Kapitalrücklage durch Ausgabe von Schuldverschreibungen für Wandlungsrechte und Optionsrechte zum Erwerb von Anteilen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1259, 'SKR03', '0', '0843', '840', 'Kapitalrücklage durch Zuzahlungen gegen Gewährung eines Vorzugs für Anteile'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1260, 'SKR03', '0', '0844', '840', 'Kapitalrücklage durch andere Zuzahlungen in das Eigenkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1261, 'SKR03', '0', '0845', '840', 'Eingefordertes Nachschusskapital ( Gegenkonto 0839 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1264, 'SKR03', '0', '0846', '840', 'Gesetzliche Rücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1266, 'SKR03', '0', '0850', '840', 'Rücklage für eigene Anteile'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1268, 'SKR03', '0', '0851', '840', 'Satzungsmässige Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1270, 'SKR03', '0', '0855', '840', 'Andere Gewinnrücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1271, 'SKR03', '0', '0856', '840', 'Eigenkapitalanteil von Wertaufholungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1273, 'SKR03', '0', '0860', '0', 'Gewinnvortrag vor Verwendung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1274, 'SKR03', '0', '0868', '860', 'Verlustvortrag vor Verwendung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1276, 'SKR03', '0', '0869', '860', 'Vortrag auf neue Rechnung (Bilanz)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1278, 'SKR03', '0', '0870', '0', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1279, 'SKR03', '0', '0871', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1280, 'SKR03', '0', '0872', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1281, 'SKR03', '0', '0873', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1282, 'SKR03', '0', '0874', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1283, 'SKR03', '0', '0875', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1284, 'SKR03', '0', '0876', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1285, 'SKR03', '0', '0877', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1286, 'SKR03', '0', '0878', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1287, 'SKR03', '0', '0879', '870', 'Festkapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1288, 'SKR03', '0', '0880', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1289, 'SKR03', '0', '0881', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1290, 'SKR03', '0', '0882', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1291, 'SKR03', '0', '0883', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1292, 'SKR03', '0', '0884', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1293, 'SKR03', '0', '0885', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1294, 'SKR03', '0', '0886', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1295, 'SKR03', '0', '0887', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1296, 'SKR03', '0', '0888', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1297, 'SKR03', '0', '0889', '870', 'Variables Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1298, 'SKR03', '0', '0890', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1299, 'SKR03', '0', '0891', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1300, 'SKR03', '0', '0892', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1301, 'SKR03', '0', '0893', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1302, 'SKR03', '0', '0894', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1303, 'SKR03', '0', '0895', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1304, 'SKR03', '0', '0896', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1305, 'SKR03', '0', '0897', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1306, 'SKR03', '0', '0898', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1307, 'SKR03', '0', '0899', '870', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1309, 'SKR03', '0', '0900', '0', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1310, 'SKR03', '0', '0901', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1311, 'SKR03', '0', '0902', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1312, 'SKR03', '0', '0903', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1313, 'SKR03', '0', '0904', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1314, 'SKR03', '0', '0905', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1315, 'SKR03', '0', '0906', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1316, 'SKR03', '0', '0907', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1317, 'SKR03', '0', '0908', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1318, 'SKR03', '0', '0909', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1319, 'SKR03', '0', '0910', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1320, 'SKR03', '0', '0911', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1321, 'SKR03', '0', '0912', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1322, 'SKR03', '0', '0913', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1323, 'SKR03', '0', '0914', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1324, 'SKR03', '0', '0915', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1325, 'SKR03', '0', '0916', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1326, 'SKR03', '0', '0917', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1327, 'SKR03', '0', '0918', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1328, 'SKR03', '0', '0919', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1329, 'SKR03', '0', '0920', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1330, 'SKR03', '0', '0921', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1331, 'SKR03', '0', '0922', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1332, 'SKR03', '0', '0923', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1333, 'SKR03', '0', '0924', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1334, 'SKR03', '0', '0925', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1335, 'SKR03', '0', '0926', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1336, 'SKR03', '0', '0927', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1337, 'SKR03', '0', '0928', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1338, 'SKR03', '0', '0929', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1341, 'SKR03', '0', '0930', '1309', 'Sonderposten mit Rücklageanteil steuerfreie Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1342, 'SKR03', '0', '0931', '1341', 'Sonderposten mit Rücklageanteil nach § 6b EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1343, 'SKR03', '0', '0932', '1341', 'Sonderposten mit Rücklageanteil nach Abschnitt 35 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1344, 'SKR03', '0', '0933', '1341', 'Sonderposten mit Rücklageanteil nach § 6d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1345, 'SKR03', '0', '0934', '1341', 'Sonderposten mit Rücklageanteil nach § 1 EntwLStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1347, 'SKR03', '0', '0935', '1309', 'Sonderposten aus der Währungsumstellung auf den Euro'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1348, 'SKR03', '0', '0936', '1341', 'Sonderposten mit Rücklageanteil nach § 7 d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1349, 'SKR03', '0', '0937', '1341', 'Sonderposten mit Rücklageanteil nach § 79 EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1350, 'SKR03', '0', '0938', '1341', 'Sonderposten mit Rücklageanteil nach § 80 EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1351, 'SKR03', '0', '0939', '1341', 'Sonderposten mit Rücklageanteil nach § 52 Abs.16 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1352, 'SKR03', '0', '0940', '1341', 'Sonderposten mit Rücklageanteil Sonderabschreibungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1353, 'SKR03', '0', '0941', '1341', 'Sonderposten mit Rücklageanteil § 82 a EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1354, 'SKR03', '0', '0942', '1341', 'Sonderposten mit Rücklageanteil § 82 d EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1355, 'SKR03', '0', '0943', '1341', 'Sonderposten mit Rücklageanteil nach § 82 e EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1356, 'SKR03', '0', '0944', '1341', 'Sonderposten mit Rücklageanteil nach § 14 BerlinFG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1357, 'SKR03', '0', '0945', '1341', 'Sonderposten mit Rücklageanteil für Förderung nach § 3 Zonen-RFG/§ 4-6 FördergebietsG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1358, 'SKR03', '0', '0946', '1341', 'Sonderposten mit Rücklageanteil nach § 4d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1359, 'SKR03', '0', '0947', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.1 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1360, 'SKR03', '0', '0948', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.3 u.7 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1362, 'SKR03', '0', '0949', '1309', 'Sonderposten für Zuschüsse und Zulagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1365, 'SKR03', '0', '0950', '1309', 'Rückstellungen für Pensionen und ähnliche Verpflichtungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1367, 'SKR03', '0', '0955', '1309', 'Steuerrückstellungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1368, 'SKR03', '0', '0957', '1367', 'Gewerbesteuerrückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1369, 'SKR03', '0', '0963', '1367', 'Körperschaftsteuerrückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1371, 'SKR03', '0', '0965', '1309', 'Rückstellungen für Personalkosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1372, 'SKR03', '0', '0966', '1309', 'Rückstellungen zur Erfüllung der Aufbewahrungspflichten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1373, 'SKR03', '0', '0969', '1309', 'Rückstellung für latente Steuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1374, 'SKR03', '0', '0970', '1309', 'Sonstige Rückstellungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1375, 'SKR03', '0', '0971', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung in den ersten drei Monaten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1376, 'SKR03', '0', '0972', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung innerhalb des 4. bis 12. Monats'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1377, 'SKR03', '0', '0973', '1309', 'Rückstellungen für Abraum- und Abfallbeseitigung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1378, 'SKR03', '0', '0974', '1309', 'Rückstellungen für Gewährleistungen ( Gegenkonto 4790 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1379, 'SKR03', '0', '0976', '1309', 'Rückstellungen für drohende Verluste aus schwebenden Geschäften'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1380, 'SKR03', '0', '0977', '1309', 'Rückstellungen für Abschluss- und Prüfungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1381, 'SKR03', '0', '0978', '1309', 'Aufwandsrückstellungen gemäß § 249 Abs. 2 HGB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1382, 'SKR03', '0', '0979', '1309', 'Rückstellungen für Umweltschutz'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1385, 'SKR03', '0', '0980', '1309', 'Aktive Rechnungsabgrenzung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1387, 'SKR03', '0', '0983', '1385', 'Abgrenzung aktive latente Steuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1388, 'SKR03', '0', '0984', '1309', 'Als Aufwand berücksichtigte Zölle und Verbrauchsteuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1389, 'SKR03', '0', '0985', '1309', 'Als Aufwand berücksichtigte Umsatzsteuer auf Anzahlungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1390, 'SKR03', '0', '0986', '1309', 'Damnum / Disagio'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1393, 'SKR03', '0', '0990', '1309', 'Passive Rechnungsabgrenzung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1395, 'SKR03', '0', '0992', '1393', 'Abgenzungsposten zur unterjährigen Kostenverrechnung für BWA'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1396, 'SKR03', '0', '0993', '1393', 'Forderungen aus Lieferungen und Leistungen H-Saldo'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1397, 'SKR03', '0', '0996', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1398, 'SKR03', '0', '0997', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1399, 'SKR03', '0', '0998', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1400, 'SKR03', '0', '0999', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1403, 'SKR03', '1', '1000', '0', 'Kasse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1404, 'SKR03', '1', '1010', '1403', 'Nebenkasse 1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1405, 'SKR03', '1', '1020', '1403', 'Nebenkasse 2'); @@ -385,7 +384,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1447, 'SKR03', '1', '1340', '1425', 'Anteile an verbundenen Unternehmen (Umlaufvermögen)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1448, 'SKR03', '1', '1344', '1425', 'Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1450, 'SKR03', '1', '1345', '1425', 'Eigene Anteile'); --- TODO Fix value for account_parent INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1456, 'SKR03', '1', '1350', '0', 'GmbH-Anteile zum kurzfristigen Verbleib'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1457, 'SKR03', '1', '1352', '0', 'Genossenschaftsanteile zum kurzfristigen Verbleib'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1458, 'SKR03', '1', '1355', '0', 'Ansprüche aus Rückdeckungsversicherung'); @@ -532,7 +530,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1608, 'SKR03', '1', '1590', '0', 'Durchlaufende Posten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1609, 'SKR03', '1', '1591', '0', 'Durchlaufende Posten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1610, 'SKR03', '1', '1592', '0', 'Fremdgeld'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1612, 'SKR03', '1', '1593', '0', 'Verrechnungskonto erhaltene Anzahlungen bei Buchung über Debitorenkonto'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1613, 'SKR03', '1', '1594', '0', 'Forderungen gegen verbundene Unternehmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1614, 'SKR03', '1', '1595', '0', 'Forderungen gegen verbundene Unternehmen ( bis 1 Jahr )'); @@ -540,7 +537,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1616, 'SKR03', '1', '1597', '0', 'Forderungen gegen Unternehmen mit denen ein Beteiligungsverhältnis besteht'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1617, 'SKR03', '1', '1598', '0', 'Forderungen gegen Unternehmen mit denen ein Beteiligungsverhältnis besteht ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1618, 'SKR03', '1', '1599', '0', 'Forderungen gegen Unternehmen mit denen ein Beteiligungsverhältnis besteht ( größer 1 Jahr )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1621, 'SKR03', '1', '1600', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1622, 'SKR03', '1', '1601', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1623, 'SKR03', '1', '1602', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen'); @@ -567,12 +563,10 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1644, 'SKR03', '1', '1625', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen ohne Kontokorrent ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1645, 'SKR03', '1', '1626', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen ohne Kontokorrent ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1646, 'SKR03', '1', '1628', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen ohne Kontokorrent ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1648, 'SKR03', '1', '1630', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber verbundenen Unternehmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1649, 'SKR03', '1', '1631', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber verbundenen Unternehmen ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1650, 'SKR03', '1', '1635', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber verbundenen Unternehmen ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1651, 'SKR03', '1', '1638', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber verbundenen Unternehmen ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1653, 'SKR03', '1', '1640', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1654, 'SKR03', '1', '1641', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1655, 'SKR03', '1', '1645', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Unternehmen mit denen ein Beteiligungsverhältnis besteht ( 1 bis 5 Jahre )'); @@ -581,14 +575,11 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1658, 'SKR03', '1', '1651', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Gesellschaftern ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1659, 'SKR03', '1', '1655', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Gesellschaftern ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1660, 'SKR03', '1', '1658', '0', 'Verbindlichkeiten aus Lieferungen und Leistungen gegenüber Gesellschaftern ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1662, 'SKR03', '1', '1659', '0', 'Gegenkonto 1625 - 1658 bei Aufteilung Kreditorenkonto'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1664, 'SKR03', '1', '1660', '0', 'Schuldwechsel'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1665, 'SKR03', '1', '1661', '0', 'Schuldwechsel ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1666, 'SKR03', '1', '1680', '0', 'Schuldwechsel ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1667, 'SKR03', '1', '1690', '0', 'Schuldwechsel ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1669, 'SKR03', '1', '1700', '0', 'Sonstige Verbindlichkeiten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1670, 'SKR03', '1', '1701', '0', 'Sonstige Verbindlichkeiten ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1671, 'SKR03', '1', '1702', '0', 'Sonstige Verbindlichkeiten ( 1 bis 5 Jahre )'); @@ -598,9 +589,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1675, 'SKR03', '1', '1706', '0', 'Darlehen ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1676, 'SKR03', '1', '1707', '0', 'Darlehen ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1677, 'SKR03', '1', '1708', '0', 'Darlehen ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1679, 'SKR03', '1', '1709', '0', 'Gewinnverfügungskonto stiller Gesellschafter'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1681, 'SKR03', '1', '1710', '0', 'Erhaltene Anzahlungen ( Verbindlichkeiten )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1682, 'SKR03', '1', '1711', '0', 'Erhaltene versteuerte Anzahlungen 7% USt ( Verbindlichkeiten )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1683, 'SKR03', '1', '1716', '0', 'Erhaltene versteuerte Anzahlungen 15% USt ( Verbindlichkeiten )'); @@ -609,7 +598,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1686, 'SKR03', '1', '1719', '0', 'Erhaltene Anzahlungen ( bis 1 Jahr )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1687, 'SKR03', '1', '1720', '0', 'Erhaltene Anzahlungen ( 1 bis 5 Jahre )'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1688, 'SKR03', '1', '1721', '0', 'Erhaltene Anzahlungen ( größer 5 Jahre )'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1690, 'SKR03', '1', '1722', '0', 'Erhaltene Anzahlungen (von Vorräten offen abgesetzt)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1691, 'SKR03', '1', '1730', '0', 'Kreditkartenabrechnung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1692, 'SKR03', '1', '1731', '0', 'Agenturwarenabrechnung'); @@ -639,7 +627,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1716, 'SKR03', '1', '1755', '0', 'Lohn- und Gehaltsverrechnungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1717, 'SKR03', '1', '1756', '0', 'Lohn- und Gehaltsverrechnung § 11 Abs. 2 EStG für § 4/3 EStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1718, 'SKR03', '1', '1759', '0', 'Voraussichtliche Beitragsschuld gegenüber den sozialversicherungsträgern'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1720, 'SKR03', '1', '1760', '0', 'Umsatzsteuer nicht fällig'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1721, 'SKR03', '1', '1761', '0', 'Umsatzsteuer nicht fällig 7%'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1722, 'SKR03', '1', '1762', '0', 'Umsatzsteuer nicht fällig aus im Inland steuerpflichtigen EG-Lieferant'); @@ -673,10 +660,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1750, 'SKR03', '1', '1790', '0', 'Umsatzsteuer Vorjahr'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1751, 'SKR03', '1', '1791', '0', 'Umsatzsteuer frühere Jahre'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1752, 'SKR03', '1', '1792', '0', 'Sonstige Verrechnungskonten (Interimskonten)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1754, 'SKR03', '1', '1793', '0', 'Verrechnungskonto geleistete Anzahlungen bei Buchung über Kreditkonto'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1755, 'SKR03', '1', '1795', '0', 'Verbindlichkeiten im Rahmen der sozialen Sicherheit (für § 4/3 EStG)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1757, 'SKR03', '1', '1800', '0', 'Privatentnahmen allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1758, 'SKR03', '1', '1801', '0', 'Privatentnahmen allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1759, 'SKR03', '1', '1802', '0', 'Privatentnahmen allgemein'); @@ -777,7 +762,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1854, 'SKR03', '1', '1897', '0', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1855, 'SKR03', '1', '1898', '0', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1856, 'SKR03', '1', '1899', '0', 'Privateinlagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1859, 'SKR03', '1', '1900', '0', 'Privatentnahmen allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1860, 'SKR03', '1', '1901', '0', 'Privatentnahmen allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1861, 'SKR03', '1', '1902', '0', 'Privatentnahmen allgemein'); @@ -878,14 +862,11 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1956, 'SKR03', '1', '1997', '0', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1957, 'SKR03', '1', '1998', '0', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1958, 'SKR03', '1', '1999', '0', 'Privateinlagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1961, 'SKR03', '2', '2000', '0', 'Außerordentliche Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1962, 'SKR03', '2', '2001', '0', 'Außerordentliche Aufwendungen finanzwirksam'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1963, 'SKR03', '2', '2005', '0', 'Außerordentliche Aufwendungen nicht finanzwirksam'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1966, 'SKR03', '2', '2010', '0', 'Betriebsfremde Aufwendungen (soweit nicht außerordentlich)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1967, 'SKR03', '2', '2020', '0', 'Periodenfremde Aufwendungen (soweit nicht außerordentlich)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1970, 'SKR03', '2', '2100', '0', 'Zinsen und ähnliche Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1971, 'SKR03', '2', '2103', '0', 'Steuerlich abzugsfähige andere Nebenleistungen zu steuern'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1972, 'SKR03', '2', '2104', '0', 'Steuerlich nicht abzugsfähige andere Nebenleistungen zu Steuern'); @@ -908,15 +889,12 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1989, 'SKR03', '2', '2139', '0', 'Diskontaufwendungen an verbundene Unternehmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1990, 'SKR03', '2', '2140', '0', 'Zinsähnliche Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1991, 'SKR03', '2', '2149', '0', 'Zinsähnliche Aufwendungen an verbundene Unternehmen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1993, 'SKR03', '2', '2150', '0', 'Aufwendungen aus Kursdifferenzen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1994, 'SKR03', '2', '2166', '0', 'Aufwendungen Bewertung Finanzmittelfonds'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1995, 'SKR03', '2', '2170', '0', 'Nicht abziehbare Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1996, 'SKR03', '2', '2171', '0', 'Nicht abziehbare Vorsteuer 7%'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1997, 'SKR03', '2', '2175', '0', 'Nicht abziehbare Vorsteuer 16%'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1998, 'SKR03', '2', '2176', '0', 'Nicht abziehbare Vorsteuer 19%'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2001, 'SKR03', '2', '2200', '0', 'Körperschaftsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2002, 'SKR03', '2', '2203', '0', 'Körperschaftsteuer für Vorjahre'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2003, 'SKR03', '2', '2204', '0', 'Körperschaftsteuererstattungen für Vorjahre'); @@ -933,11 +911,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2014, 'SKR03', '2', '2280', '0', 'Steuernachzahlungen Vorjahre für Steuern vom Einkommen und Ertrag'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2015, 'SKR03', '2', '2282', '0', 'Steuererstattungen Vorjahre für Steuern vom Einkommen und Ertrag'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2016, 'SKR03', '2', '2284', '0', 'Erträge aus der Auflösung von Rückstellungen für Steuern vom Einkommen und Ertrag'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2018, 'SKR03', '2', '2285', '0', 'Steuernachzahlungen Vorjahre für sonstige Steuern'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2019, 'SKR03', '2', '2287', '0', 'Steuererstattungen Vorjahre für sonstige Steuern'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2020, 'SKR03', '2', '2289', '0', 'Erträge aus der Auflösung von Rückstellungen für sonstige Steuern'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2023, 'SKR03', '2', '2300', '0', 'Sonstige Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2024, 'SKR03', '2', '2307', '0', 'Sonstige Aufwendungen betriebsfremde und regelmäßig'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2025, 'SKR03', '2', '2309', '0', 'Sonstige Aufwendungen unregelmässig'); @@ -945,7 +921,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2027, 'SKR03', '2', '2311', '0', 'Anlagenabgänge immaterielle Vermögensgegenstände (Restbuchwert bei Buchverlust)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2028, 'SKR03', '2', '2312', '0', 'Anlagenabgänge Finanzanlagen (Restbuchwert bei Buchverlust)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2029, 'SKR03', '2', '2313', '0', 'Anlagenabgänge Finanzanlagen 100% / 50% nicht abzugsfähig (inländische Kap. Ges.) (Restbuchwert bei Buchverlust)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2031, 'SKR03', '2', '2315', '0', 'Anlagenabgänge Sachanlagen (Restbuchwert bei Buchgewinn)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2032, 'SKR03', '2', '2316', '0', 'Anlagenabgänge immaterielle Vermögensgegenstände (Restbuchwert bei Buchgewinn)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2033, 'SKR03', '2', '2317', '0', 'Anlagenabgänge Finanzanlagen (Restbuchwert bei Buchgewinn)'); @@ -964,7 +939,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2046, 'SKR03', '2', '2348', '0', 'Aufwendungen aus der Zuschreibung von steuerlich niedriger bewerteten Verbindlichkeiten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2047, 'SKR03', '2', '2349', '0', 'Aufwendungen aus der Zuschreibung von steuerlich niedriger bewerteten Rückstellungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2048, 'SKR03', '2', '2350', '0', 'Grundstücksaufwendungen neutral'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2050, 'SKR03', '2', '2375', '0', 'Grundsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2051, 'SKR03', '2', '2380', '0', 'Zuwendungen Spenden steuerlich nicht abziehbar'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2052, 'SKR03', '2', '2381', '0', 'Zuwendungen Spenden für wissenschaftliche und kulturelle Zwecke'); @@ -987,28 +961,18 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2069, 'SKR03', '2', '2407', '0', 'Forderungsverluste 15% USt (übliche Höhe)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2070, 'SKR03', '2', '2408', '0', 'Forderungsverluste aus im Inland steuerpflichtigen EG-Lieferungen 19% USt (übliche Höhe)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2071, 'SKR03', '2', '2409', '0', 'Forderungsverluste aus im Inland steuerpflichtigen EG-Lieferungen 15% USt (übliche Höhe)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2073, 'SKR03', '2', '2430', '0', 'Forderungsverluste unüblich hoch'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2074, 'SKR03', '2', '2450', '0', 'Einstellung in die Pauschalwertberichtigung zu Forderungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2075, 'SKR03', '2', '2451', '0', 'Einstellung in die Einzelwertberichtigung zu Forderungen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2077, 'SKR03', '2', '2490', '0', 'Aufwendungen aus Verlustübernahme'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2079, 'SKR03', '2', '2492', '0', 'Abgeführte Gewinne auf Grund einer Gewinngemeinschaft'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2080, 'SKR03', '2', '2493', '0', 'Abgeführte Gewinnanteile an stille Gesellschafter § 8 GewStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2081, 'SKR03', '2', '2494', '0', 'Abgeführte Gewinne auf Grund eines Gewinn- oder Teilgewinnabführungsvetrags'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2083, 'SKR03', '2', '2495', '0', 'Einstellungen in die Kapitalrücklage nach den Vorschriften über die vereinfachte Kapitalherabsetzung'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2085, 'SKR03', '2', '2496', '0', 'Einstellung in die gesetzliche Rücklage'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2087, 'SKR03', '2', '2497', '0', 'Einstellungen in satzungsmäßige Rücklagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2089, 'SKR03', '2', '2498', '0', 'Einstellung in die Rücklage für eigene Anteile'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2091, 'SKR03', '2', '2499', '0', 'Einstellung in andere Gewinnrücklagen'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2094, 'SKR03', '2', '2500', '0', 'Außerordentliche Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2095, 'SKR03', '2', '2501', '0', 'Außerordentliche Erträge finanzwirksam'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2096, 'SKR03', '2', '2505', '0', 'Außerordentliche Erträge nicht finanzwirksam'); @@ -1020,19 +984,16 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2106, 'SKR03', '2', '2617', '0', 'Gewinne aus Anteilen an nicht steuerbefreiten inländischen Kapitalgesellschaften § 9 Nr. 2a GewStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2107, 'SKR03', '2', '2618', '0', 'Gewinnanteile aus Mitunternehmerschaften § 9 GewStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2108, 'SKR03', '2', '2619', '0', 'Erträge aus Beteiligungen an verbundenen Unternehmen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2110, 'SKR03', '2', '2620', '0', 'Erträge aus anderen Wertpapieren und Ausleihungen des Finanzanlagevermögen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2111, 'SKR03', '2', '2625', '0', 'laufende Erträge aus Anteilen an Kapitalgesellschaften (Finanzanlagevermögen) 100% / 50% steuerfrei (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2112, 'SKR03', '2', '2626', '0', 'Laufende Erträge aus Anteilen an Kapitalgesellschaften (verbundene Unternehmen) 100% / 50% steuerfrei (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2113, 'SKR03', '2', '2649', '0', 'Erträge aus anderen Wertpapieren und Ausleihungen des Finanzanlagevermögen aus verbundenen Unternehmen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2115, 'SKR03', '2', '2650', '0', 'Sonstige Zinsen und ähnliche Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2116, 'SKR03', '2', '2655', '0', 'laufende Erträge aus Anteilen an Kapitalgesellschaften (Umlaufvermögen) 100% / 50% steuerfrei (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2117, 'SKR03', '2', '2656', '0', 'laufende Erträge aus Anteilen an Kapitalgesellschaften (verbundene Unternehmen) 100% / 50% steuerfrei (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2118, 'SKR03', '2', '2657', '0', 'Zinserträge § 233a AO'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2119, 'SKR03', '2', '2658', '0', 'Zinserträge § 233a AO Sonderfall Anlage A KSt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2120, 'SKR03', '2', '2659', '0', 'Sonstige Zinsen und ähnliche Erträge aus verbundenen Unternehmen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2122, 'SKR03', '2', '2660', '0', 'Erträge aus Kursdifferenzen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2123, 'SKR03', '2', '2661', '0', 'Nicht realisierbare Währungsdifferenzen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2124, 'SKR03', '2', '2662', '0', 'Realisierte Währungsdifferenzen'); @@ -1043,7 +1004,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2129, 'SKR03', '2', '2667', '0', 'Bank Währungsverlust (Konto)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2130, 'SKR03', '2', '2668', '0', 'Währungsdifferenz zum Kontenausgleich'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2131, 'SKR03', '2', '2669', '0', 'Nicht realisierbare Währungsdifferenzen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2133, 'SKR03', '2', '2670', '0', 'Diskonterträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2134, 'SKR03', '2', '2671', '0', 'Bank Bewertungsertrag'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2135, 'SKR03', '2', '2672', '0', 'Rundungsdifferenzen'); @@ -1051,7 +1011,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2137, 'SKR03', '2', '2679', '0', 'Diskonterträge verbundene Unternehmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2138, 'SKR03', '2', '2680', '0', 'Zinsähnliche Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2139, 'SKR03', '2', '2689', '0', 'Zinsähnliche Erträge aus verbundenen Unternehmen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2142, 'SKR03', '2', '2700', '0', 'Sonstige Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2143, 'SKR03', '2', '2705', '0', 'Sonstige Erträge betrieblich und regelmäßig'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2144, 'SKR03', '2', '2707', '0', 'Sonstige Erträge betriebsfremd und regelmäßig'); @@ -1082,33 +1041,22 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2169, 'SKR03', '2', '2742', '0', 'Versicherungsentschädigungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2170, 'SKR03', '2', '2743', '0', 'Investitionszuschüsse (steuerpflichtig)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2171, 'SKR03', '2', '2744', '0', 'Investitionszulagen (steuerfrei)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2173, 'SKR03', '2', '2745', '0', 'Erträge aus Kapitalherabsetzung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2174, 'SKR03', '2', '2746', '0', 'Steuerfreie Erträge aus der Auflösung von Sonderposten mit Rücklageanteil'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2175, 'SKR03', '2', '2747', '0', 'Sonstige steuerfreie Betriebseinnahmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2176, 'SKR03', '2', '2749', '0', 'Erstattungen Aufwendungsausgleichsgesetz'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2177, 'SKR03', '2', '2750', '0', 'Grundstückserträge'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2179, 'SKR03', '2', '2790', '0', 'Erträge aus Verlustübernahme'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2181, 'SKR03', '2', '2792', '0', 'Erhaltene Gewinne auf Grund einer Gewinngemeinschaft'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2182, 'SKR03', '2', '2794', '0', 'Erhaltene Gewinne auf Grund eines Gewinn- oder Teilgewinnabführungsvetrags'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2184, 'SKR03', '2', '2795', '0', 'Entnahmen aus der Kapitalrücklage'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2186, 'SKR03', '2', '2796', '0', 'Entnahmen aus der gesetzlichen Rücklage'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2188, 'SKR03', '2', '2797', '0', 'Entnahmen aus satzungsmäßigen Rücklagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2190, 'SKR03', '2', '2798', '0', 'Entnahmen aus der Rücklage für eigene Anteile'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2192, 'SKR03', '2', '2799', '0', 'Entnahmen aus anderen Gewinnrücklagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2194, 'SKR03', '2', '2860', '0', 'Gewinnvortrag nach Verwendung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2195, 'SKR03', '2', '2868', '0', 'Verlustvortrag nach Verwendung'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2197, 'SKR03', '2', '2869', '0', 'Vortrag auf neue Rechnung (GuV)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2199, 'SKR03', '2', '2870', '0', 'Vorabausschüttung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2202, 'SKR03', '2', '2890', '0', 'Verrechneter kalkulatorischer Unternehmerlohn'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2203, 'SKR03', '2', '2891', '0', 'Verrechnete kalkulatorische Miete und Pacht'); @@ -1116,11 +1064,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2205, 'SKR03', '2', '2893', '0', 'Verrechnete kalkulatorische Abschreibungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2206, 'SKR03', '2', '2894', '0', 'Verrechnete kalkulatorische Wagnisse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2207, 'SKR03', '2', '2895', '0', 'Verrechneter kalkulatorische Lohn für unentgeltliche Mitarbeiter'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2209, 'SKR03', '2', '2990', '0', 'Aufwendungen/Erträge aus Umrechnungsdifferenzen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2212, 'SKR03', '3', '3000', '0', 'Roh- Hilfs- und Betriebsstoffe'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2213, 'SKR03', '3', '3090', '0', 'Energiestoffe (Fertigung'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2215, 'SKR03', '3', '3100', '0', 'Fremdleistungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2219, 'SKR03', '3', '3110', '2215', 'Bauleistungen eines im Inland ansässigen Unternehmens 7% Vorsteuer und 7% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2220, 'SKR03', '3', '3115', '2215', 'Leistungen eines im Ausland ansässigen Unternehmens 7% Vorsteuer und 7% Umsatzsteuer'); @@ -1142,7 +1088,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2236, 'SKR03', '3', '3151', '2215', 'Erhaltene Skonti aus Leistungen für die als Leistungsempfänger die Steuer nach § 13b UStG geschuldet wird 19% Vorsteuer und 19% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2237, 'SKR03', '3', '3152', '2215', 'Erhaltene Skonti aus Leistungen für die als Leistungsempfänger die Steuer nach § 13b UStG geschuldet wird 16% Vorsteuer und 16% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2238, 'SKR03', '3', '3153', '2215', 'Erhaltene Skonti aus Leistungen für die als Leistungsempfänger die Steuer nach § 13b UStG geschuldet wird ohne Vorsteuer aber mit Umsatzsteuer'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2240, 'SKR03', '3', '3200', '0', 'Wareneingang'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2241, 'SKR03', '3', '3300', '2240', 'Wareneingang 7% Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2242, 'SKR03', '3', '3301', '2240', 'Wareneingang 7% Vorsteuer'); @@ -1273,7 +1218,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2367, 'SKR03', '3', '3725', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2368, 'SKR03', '3', '3726', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2369, 'SKR03', '3', '3727', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 15% Vorsteuer und 15% Umsatzsteuer'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2372, 'SKR03', '3', '3730', '0', 'Erhaltene Skonti'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2373, 'SKR03', '3', '3731', '0', 'Erhaltene Skonti 7% Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2374, 'SKR03', '3', '3735', '0', 'Erhaltene Skonti 16% Vorsteuer'); @@ -1299,7 +1243,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2394, 'SKR03', '3', '3800', '0', 'Bezugsnebenkosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2395, 'SKR03', '3', '3830', '0', 'Leergut'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2396, 'SKR03', '3', '3850', '0', 'Zölle und Einfuhrabgaben'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2399, 'SKR03', '3', '3960', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2400, 'SKR03', '3', '3961', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2401, 'SKR03', '3', '3962', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); @@ -1310,7 +1253,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2406, 'SKR03', '3', '3967', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2407, 'SKR03', '3', '3968', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2408, 'SKR03', '3', '3969', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2411, 'SKR03', '3', '3970', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2412, 'SKR03', '3', '3971', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2413, 'SKR03', '3', '3972', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); @@ -1321,7 +1263,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2418, 'SKR03', '3', '3977', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2419, 'SKR03', '3', '3978', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2420, 'SKR03', '3', '3979', '0', 'Bestand Roh- Hilfs- und Betriebsstoffe'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2422, 'SKR03', '3', '3980', '0', 'Bestand Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2423, 'SKR03', '3', '3981', '0', 'Bestand Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2424, 'SKR03', '3', '3982', '0', 'Bestand Waren'); @@ -1332,7 +1273,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2429, 'SKR03', '3', '3987', '0', 'Lager Differenzkorrektur Marktwert'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2430, 'SKR03', '3', '3988', '0', 'Lager Bestand Zwischenkonto'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2431, 'SKR03', '3', '3989', '0', 'Bestand Waren'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2434, 'SKR03', '3', '3990', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2435, 'SKR03', '3', '3991', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2436, 'SKR03', '3', '3992', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); @@ -1343,7 +1283,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2441, 'SKR03', '3', '3997', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2442, 'SKR03', '3', '3998', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2443, 'SKR03', '3', '3999', '0', 'Verrechnete Stoffkosten (Gegenkonto zu 4000-99)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2446, 'SKR03', '4', '4000', '0', 'Material-und Stoffverbrauch'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2447, 'SKR03', '4', '4001', '2446', 'Material-und Stoffverbrauch'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2448, 'SKR03', '4', '4002', '2446', 'Material-und Stoffverbrauch'); @@ -1444,8 +1383,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2543, 'SKR03', '4', '4097', '2446', 'Material-und Stoffverbrauch'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2544, 'SKR03', '4', '4098', '2446', 'Material-und Stoffverbrauch'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2545, 'SKR03', '4', '4099', '2446', 'Material-und Stoffverbrauch'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2548, 'SKR03', '4', '4100', '0', 'Löhne und Gehälter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2549, 'SKR03', '4', '4110', '2548', 'Löhne'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2550, 'SKR03', '4', '4120', '2548', 'Gehälter'); @@ -1454,11 +1391,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2553, 'SKR03', '4', '4126', '2548', 'Tantiemen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2554, 'SKR03', '4', '4127', '2548', 'Geschäftsführergehälter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2555, 'SKR03', '4', '4128', '2548', 'Vergütungen an angestellte Mitunternehmer §15 EStG'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2557, 'SKR03', '4', '4130', '2548', 'Gesetzliche Soziale Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2558, 'SKR03', '4', '4137', '2548', 'Gesetzliche soziale Aufwendungen für Mitunternehmer §15 EStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2559, 'SKR03', '4', '4138', '2548', 'Beiträge zur Berufsgenossenschaft'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2561, 'SKR03', '4', '4139', '2548', 'Ausgleichsabgabe i. S. d. Schwerbehindertengesetz'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2562, 'SKR03', '4', '4140', '2548', 'Freiwillige soziale Aufwendungen lohnsteuerfrei'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2563, 'SKR03', '4', '4145', '2548', 'Freiwillige soziale Aufwendungen lohnsteuerpflichtig'); @@ -1475,8 +1410,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2574, 'SKR03', '4', '4180', '2548', 'Bedienungsgelder'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2575, 'SKR03', '4', '4190', '2548', 'Aushilfslöhne'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2576, 'SKR03', '4', '4199', '2548', 'Pauschale Steuer für Aushilfen'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2579, 'SKR03', '4', '4200', '0', 'Raumkosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2580, 'SKR03', '4', '4210', '2579', 'Miete'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2581, 'SKR03', '4', '4218', '2579', 'Gewerbesteuerlich zu berücksichtigende Miete §8 GewStG'); @@ -1497,9 +1430,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2596, 'SKR03', '4', '4301', '2579', 'Nicht abziehbare Vorsteuer 7%'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2597, 'SKR03', '4', '4305', '2579', 'Nicht abziehbare Vorsteuer 16%'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2598, 'SKR03', '4', '4306', '2579', 'Nicht abziehbare Vorsteuer 19%'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2600, 'SKR03', '4', '4320', '2579', 'Gewerbesteuer'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2602, 'SKR03', '4', '4340', '2579', 'Sonstige Betriebssteuern'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2603, 'SKR03', '4', '4350', '2579', 'Verbrauchsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2604, 'SKR03', '4', '4355', '2579', 'ökosteuer'); @@ -1659,7 +1590,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2758, 'SKR03', '4', '4809', '2579', 'Sonstige Reparaturen und Instandhaltungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2759, 'SKR03', '4', '4810', '2579', 'Mietleasing'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2760, 'SKR03', '4', '4814', '2579', 'Gewerbesteuerlich zu berücksichtigendes Mietleasing § 8 GewStG'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2762, 'SKR03', '4', '4815', '2579', 'Kaufleasing'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2763, 'SKR03', '4', '4820', '2579', 'Abschreibung auf Aufwendungen für die Ingangsetzung und Erweiterung des Geschäftsbetriebs'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2764, 'SKR03', '4', '4821', '2579', 'Abschreibung auf Aufwendungen für die Währungsumstellung auf den Euro'); @@ -1681,7 +1611,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2780, 'SKR03', '4', '4860', '2579', 'Abschreibungen auf aktivierte geringwertiger Wirtschaftsgüter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2781, 'SKR03', '4', '4862', '2579', 'Abschreibung auf Sammelposten WG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2782, 'SKR03', '4', '4865', '2579', 'Außerplanmäßige Abschreibungen auf aktivierte geringwertiger Wirtschaftsgüter'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2784, 'SKR03', '4', '4870', '2579', 'Abschreibungen auf Finanzanlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2785, 'SKR03', '4', '4871', '2579', 'Abschreibungen auf Finanzanlagen 100% / 50% nicht abzugsfähig (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2786, 'SKR03', '4', '4872', '2579', 'Abschreibungen auf Grund von Verlustanteilen an Mitunternehmerschaften § 8 GewStG'); @@ -1690,7 +1619,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2789, 'SKR03', '4', '4875', '2579', 'Abschreibungen auf Wertpapiere des Umlaufvermögens'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2790, 'SKR03', '4', '4876', '2579', 'Abschreibungen auf Wertpapiere des Umlaufvermögens 100% / 50% nicht abzugsfähig (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2791, 'SKR03', '4', '4879', '2579', 'Vorwegnahme künftiger Wertschwankungen bei Wertpapieren des Umlaufvermögens'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2793, 'SKR03', '4', '4880', '2579', 'Abschreibungen auf Umlaufvermögen ohne Wertpapiere (soweit unübliche Höhe)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2794, 'SKR03', '4', '4882', '2579', 'Abschreibungen auf Umlaufvermögen steuerrechtlich bedingt (soweit unübliche Höhe)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2795, 'SKR03', '4', '4885', '2579', 'Vorwegnahme künftiger Wertschwankungen im Umlaufvermögen außer Vorräte und Wertpapiere des Umlaufvermögens'); @@ -1711,7 +1639,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2810, 'SKR03', '4', '4949', '2579', 'Haftungsvergütung an Mitunternehmer § 15 EStG'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2811, 'SKR03', '4', '4950', '2579', 'Rechts- und Beratungskosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2812, 'SKR03', '4', '4955', '2579', 'Buchführungskosten'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2814, 'SKR03', '4', '4957', '2579', 'Abschluss- und Prüfungskosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2815, 'SKR03', '4', '4960', '2579', 'Mieten für Einrichtungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2816, 'SKR03', '4', '4964', '2579', 'Aufwendungen für die zeitlich befristetete Überlassung von Rechten (Lizenzen,Konzessionen)'); @@ -1724,32 +1651,24 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2823, 'SKR03', '4', '4976', '2579', 'Aufwendungen aus der Veräußerung von Anteilen an Kapitalgesellschaften 100% / 50% nicht abzugsfähig (inländische Kap. Ges.)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2824, 'SKR03', '4', '4980', '2579', 'Betriebsbedarf'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2825, 'SKR03', '4', '4985', '2579', 'Werkzeuge und Kleingeräte'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2828, 'SKR03', '4', '4990', '0', 'Kalkulatorischer Unternehmerlohn'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2829, 'SKR03', '4', '4991', '0', 'Kalkulatorische Miete und Pacht'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2830, 'SKR03', '4', '4992', '0', 'Kalkulatorische Zinsen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2831, 'SKR03', '4', '4993', '0', 'Kalkulatorische Abschreibungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2832, 'SKR03', '4', '4994', '0', 'Kalkulatorische Wagnisse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2833, 'SKR03', '4', '4995', '0', 'Kalkulatorischer Lohn für unentgeltliche Mitarbeiter'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2836, 'SKR03', '4', '4996', '0', 'Herstellungskosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2837, 'SKR03', '4', '4997', '0', 'Verwaltungskosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2838, 'SKR03', '4', '4998', '0', 'Vertriebskosten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2839, 'SKR03', '4', '4999', '0', 'Gegenkonto 4996 - 4998'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2841, 'SKR03', '7', '7000', '0', 'Unfertige Erzeugnisse und Leistungen (Bestand)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2842, 'SKR03', '7', '7050', '2841', 'Unfertige Erzeugnisse (Bestand)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2843, 'SKR03', '7', '7080', '2841', 'Unfertige Leistungen (Bestand)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2845, 'SKR03', '7', '7090', '2841', 'In Ausführung befindliche Bauaufträge'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2847, 'SKR03', '7', '7095', '2841', 'In Arbeit befindliche Aufträge'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2849, 'SKR03', '7', '7100', '0', 'Fertige Erzeugnisse und Waren (Bestand)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2850, 'SKR03', '7', '7110', '2849', 'Fertige Erzeugnisse (Bestand)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2851, 'SKR03', '7', '7140', '2849', 'Waren (Bestand)'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2854, 'SKR03', '8', '8000', '0', '(Zur freien Verfügung)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2855, 'SKR03', '8', '8001', '2854', '(Zur freien Verfügung)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2856, 'SKR03', '8', '8002', '2854', '(Zur freien Verfügung)'); @@ -1901,7 +1820,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3002, 'SKR03', '8', '8348', '2854', 'Erlöse 16% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3003, 'SKR03', '8', '8349', '2854', 'Erlöse 16% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3004, 'SKR03', '8', '8400', '2854', 'Erlöse 19% USt'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3006, 'SKR03', '8', '8401', '2854', 'Vorausberechnete Einnahmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3007, 'SKR03', '8', '8402', '2854', 'Sontige Einnahmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3008, 'SKR03', '8', '8403', '2854', 'Konto Kasse Ertrag'); @@ -1926,12 +1844,10 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3028, 'SKR03', '8', '8576', '2854', 'Provision sonstige Erträge 7 % USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3029, 'SKR03', '8', '8578', '2854', 'Provision sonstige Erträge 16 % USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3030, 'SKR03', '8', '8579', '2854', 'Provision sonstige Erträge 19 % USt'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3033, 'SKR03', '8', '8580', '2854', 'Statistisches Konto Erlöse zum Allgemeinen Umsatzsteuerersatz (EüR)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3034, 'SKR03', '8', '8581', '2854', 'Statistisches Konto Erlöse zum ermäßigten Umsatzsteuerersatz (EüR)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3035, 'SKR03', '8', '8582', '2854', 'Statistisches Konto Erlöse steuerfrei und nicht steuerbar (EüR)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3036, 'SKR03', '8', '8589', '2854', 'Gegenkonto 8580-8582 bei Aufteilung der Erlöse nach Steuersätzen (EüR)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3038, 'SKR03', '8', '8590', '2854', 'Verrechnete sonstige Sachbezüge (keine Waren)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3039, 'SKR03', '8', '8591', '2854', 'Sachbezüge 7% USt (Waren)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3040, 'SKR03', '8', '8595', '2854', 'Sachbezüge 19% USt (Waren)'); @@ -1960,11 +1876,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3063, 'SKR03', '8', '8644', '2854', 'Sonstige Erlöse betrieblich und regelmäßig 19% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3064, 'SKR03', '8', '8648', '2854', 'Sonstige Erlöse betrieblich und regelmäßig 16% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3065, 'SKR03', '8', '8649', '2854', 'Sonstige Erlöse betrieblich und regelmäßig 16% USt'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3067, 'SKR03', '8', '8650', '2854', 'Erlöse Zinsen und Diskontspesen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3068, 'SKR03', '8', '8660', '2854', 'Erlöse Zinsen und Diskontspesen aus verbundenen Unternehmen'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3071, 'SKR03', '8', '8700', '0', 'Erlösschmälerungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3072, 'SKR03', '8', '8701', '3071', 'Nicht abgerechnete Einnahmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3073, 'SKR03', '8', '8705', '3071', 'Erlösschmälerungen'); @@ -2002,7 +1915,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3105, 'SKR03', '8', '8791', '3071', 'Gewährte Rabatte 19% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3106, 'SKR03', '8', '8794', '3071', 'Gewährte Rabatte 16% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3107, 'SKR03', '8', '8795', '3071', 'Gewährte Rabatte 16% USt'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3109, 'SKR03', '8', '8800', '0', 'Erlöse aus Verkäufen Sachanlagevermögen (Bei Buchverlust)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3110, 'SKR03', '8', '8801', '3109', 'Erlöse aus Verkäufen Sachanlagevermögen 19% USt (Bei Buchverlust)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3111, 'SKR03', '8', '8802', '3109', 'Erlöse aus Verkäufen Sachanlagevermögen 19% USt (Bei Buchverlust)'); @@ -2078,17 +1990,12 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3181, 'SKR03', '8', '8949', '0', 'Unentgeltliche Zuwendung von Waren ohne USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3182, 'SKR03', '8', '8950', '0', 'Nicht steuerbare Umsätze (Innenumsätze)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3183, 'SKR03', '8', '8955', '0', 'Umsatzsteuervergütungen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3185, 'SKR03', '8', '8960', '0', 'Bestandsveränderungen- unfertige Erzeugnisse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3186, 'SKR03', '8', '8970', '0', 'Bestandsveränderungen- unfertige Leistungen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3188, 'SKR03', '8', '8975', '0', 'Bestandsveränderungen - in Ausführung befindliche Bauaufträge'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3190, 'SKR03', '8', '8977', '0', 'Bestandsveränderungen - in Arbeit befindliche Aufträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3191, 'SKR03', '8', '8980', '0', 'Bestandsveränderungen - fertige Erzeugnisse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3192, 'SKR03', '8', '8990', '0', 'Andere aktivierte Eigenleistungen'); - - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3195, 'SKR03', '9', '9000', '0', 'Saldenvorträge Sachkonten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3196, 'SKR03', '9', '9001', '3195', 'Saldenvorträge Sachkonten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3197, 'SKR03', '9', '9002', '3195', 'Saldenvorträge Sachkonten'); @@ -2118,7 +2025,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3221, 'SKR03', '9', '9096', '3215', 'Offene Posten aus 1996'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3222, 'SKR03', '9', '9097', '3215', 'Offene Posten aus 1997'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3223, 'SKR03', '9', '9098', '3215', 'Offene Posten aus 1998'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3225, 'SKR03', '9', '9101', '3195', 'Verkaufstage'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3226, 'SKR03', '9', '9102', '3195', 'Anzahl der Barkunden'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3227, 'SKR03', '9', '9103', '3195', 'Beschäftigte Personen'); @@ -2134,17 +2040,13 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3237, 'SKR03', '9', '9140', '3195', 'Auftragsbestand'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3238, 'SKR03', '9', '9190', '3195', 'Gegenkonto für statistischen Mengeneinheiten Konten 9101 - 9107 und Konten 9116 - 9118'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3239, 'SKR03', '9', '9199', '3195', 'Gegenkonto zu Konten 9120 9135 - 9140'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3241, 'SKR03', '9', '9200', '3195', 'Beschäftigte Personen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3242, 'SKR03', '9', '9209', '3195', 'Gegenkonto zu 9200'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3243, 'SKR03', '9', '9210', '3195', 'Produktive Löhne'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3244, 'SKR03', '9', '9219', '3195', 'Gegenkonto zu 9210'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3247, 'SKR03', '9', '9220', '3195', 'Gezeichnetes Kapital in DM (Art. 42 Abs. 3 S. 1 EGHGB)'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3249, 'SKR03', '9', '9221', '3195', 'Gezeichnetes Kapital in Euro (Art. 42 Abs. 3 S. 2 EGHGB)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3250, 'SKR03', '9', '9229', '3195', 'Gegenkonto zu Konten 9022 - 9221'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3252, 'SKR03', '9', '9230', '3195', 'Baukostenzuschüsse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3253, 'SKR03', '9', '9232', '3195', 'Investitionszulagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3254, 'SKR03', '9', '9234', '3195', 'Investitionszuschüsse'); @@ -2158,16 +2060,13 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3262, 'SKR03', '9', '9246', '3195', 'Forderungen aus Verkäufen immaterieller Vermögensgegenständen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3263, 'SKR03', '9', '9247', '3195', 'Forderungen aus Verkäufe von Finanzanlagen bei sonstigen Vermögensgegenständen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3264, 'SKR03', '9', '9249', '3195', 'Gegenkonto zu Konten 9245 - 9247'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3266, 'SKR03', '9', '9250', '3195', 'Eigenkapitalersetzende Gesellschafterdarlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3267, 'SKR03', '9', '9255', '3195', 'Ungesicherte Gesellschafterdarlehen mit Restlaufzeit größer 5 Jahre'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3268, 'SKR03', '9', '9259', '3195', 'Gegenkonto zu 9250 und 9255'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3270, 'SKR03', '9', '9260', '3195', 'Kurzfristige Rückstellungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3271, 'SKR03', '9', '9262', '3195', 'Mittelfristige Rückstellungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3272, 'SKR03', '9', '9264', '3195', 'Langfristige Rückstellungen außer Pensionen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3273, 'SKR03', '9', '9269', '3195', 'Gegenkonto zu Konten 9260 - 9268'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3275, 'SKR03', '9', '9270', '3195', 'Gegenkonto zu 9271 bis 9278 (soll-Buchung)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3276, 'SKR03', '9', '9271', '3195', 'Verbindlichkeiten aus der Begebung und übertragung von Wechsel'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3277, 'SKR03', '9', '9272', '3195', 'Verbindlichkeiten aus der Begebung und übertragung von Wechseln gegenüber verbundenen Unternehmen'); @@ -2178,7 +2077,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3282, 'SKR03', '9', '9277', '3195', 'Haftung aus der Bestellung von Sicherheiten für fremde Verbindlichkeiten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3283, 'SKR03', '9', '9278', '3195', 'Haftung aus der Bestellung von Sicherheiten für fremde Verbindlichkeiten gegenüber verbundenen Unternehmen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3284, 'SKR03', '9', '9279', '3195', 'Verpflichtungen aus Trendhandvermögen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3286, 'SKR03', '9', '9280', '3195', 'Gegenkonto zu Konten 9281 - 9284'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3287, 'SKR03', '9', '9281', '3195', 'Verpflichtungen aus Miet- und Leasingverträgen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3288, 'SKR03', '9', '9282', '3195', 'Verpflichtungen aus Miet- und Leasingverträgen gegenüber verbundenen Unternehmen'); @@ -2192,10 +2090,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3296, 'SKR03', '9', '9291', '3195', 'Gegenkonto zu 9290'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3297, 'SKR03', '9', '9292', '3195', 'Statistisches Konto Fremdgeld'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3298, 'SKR03', '9', '9293', '3195', 'Gegenkonto zu 9292'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3300, 'SKR03', '9', '9295', '3195', 'Einlagen stiller Gesellschafter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3302, 'SKR03', '9', '9297', '3195', 'Steuerrechtlicher Ausgleichsposten'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3304, 'SKR03', '9', '9400', '3195', 'Privatentnahmen Allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3305, 'SKR03', '9', '9401', '3195', 'Privatentnahmen Allgemein'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3306, 'SKR03', '9', '9402', '3195', 'Privatentnahmen Allgemein'); @@ -2296,7 +2192,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3401, 'SKR03', '9', '9497', '3195', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3402, 'SKR03', '9', '9498', '3195', 'Privateinlagen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3403, 'SKR03', '9', '9499', '3195', 'Privateinlagen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3405, 'SKR03', '9', '9500', '3195', 'Anteil für Konto 0900 Teilhafter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3406, 'SKR03', '9', '9501', '3195', 'Anteil für Konto 0901 Teilhafter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3407, 'SKR03', '9', '9502', '3195', 'Anteil für Konto 0902 Teilhafter'); @@ -2569,7 +2464,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3674, 'SKR03', '9', '9799', '3195', 'Restanteil Teilhafter'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3675, 'SKR03', '9', '9800', '3195', 'Lösch- und Korrekturschlüssel'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3676, 'SKR03', '9', '9801', '3195', 'Lösch- und Korrekturschlüssel'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3678, 'SKR03', '9', '9810', '3195', 'Gesellschafter Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3679, 'SKR03', '9', '9811', '3195', 'Gesellschafter Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3680, 'SKR03', '9', '9812', '3195', 'Gesellschafter Darlehen'); @@ -2600,7 +2494,6 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3705, 'SKR03', '9', '9837', '3195', 'Verrechnungskonto für Einzahlungsverpflichtungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3706, 'SKR03', '9', '9838', '3195', 'Verrechnungskonto für Einzahlungsverpflichtungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3707, 'SKR03', '9', '9839', '3195', 'Verrechnungskonto für Einzahlungsverpflichtungen'); - INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3709, 'SKR03', '9', '9840', '3195', 'Gesellschafter-Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3710, 'SKR03', '9', '9841', '3195', 'Gesellschafter-Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3711, 'SKR03', '9', '9842', '3195', 'Gesellschafter-Darlehen'); @@ -2705,6 +2598,11 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3820, 'SKR03', '9', '9959', '3195', 'Ausstehende Einlagen auf das Kommandit-Kapital eingefordert'); + + + + + -- SKR04 -- Some lines of SKR04 has been disabled because the field account_parent were wrong or there is a doubt, it must be the rowid of parent line and not the account_number of parent line diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index d49e509a5be..4520969f82b 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -136,7 +136,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 93,'PCG99-ABREGE','INCOME', '75', '1407', 'Autres produits de gestion courante', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 94,'PCG99-ABREGE','INCOME', '753', '93', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 95,'PCG99-ABREGE','INCOME', '754', '93', 'Ristournes perçues des coopératives', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 96,'PCG99-ABREGE','INCOME', '755', '93', 'Quotes-parts de résultat sur opérations faites en commun', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 96,'PCG99-ABREGE','INCOME', '755', '93', 'Quotes-parts de résultat sur opérations faites en commun', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 97,'PCG99-ABREGE','INCOME', '76', '1407', 'Produits financiers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 98,'PCG99-ABREGE','INCOME', '77', '1407', 'Produits exceptionnels', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 99,'PCG99-ABREGE','INCOME', '781', '1407', 'Reprises sur amortissements et provisions', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_account_gb.sql b/htdocs/install/mysql/data/llx_accounting_account_gb.sql index 35c245efa95..fc2acf12395 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_gb.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_gb.sql @@ -26,10 +26,10 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71501, 'ENG-BASE', 'CAPIT', '1', '0', 'Equity, provisions for liabilities and charges and liabilities at more than one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71502, 'ENG-BASE', 'IMMO', '2', '0', 'Administration fees.Fixed assets and receivables over one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71503, 'ENG-BASE', 'STOCK', '3', '0', 'Stock and orders running', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71504, 'ENG-BASE', 'TIERS', '4', '0', 'Amounts receivable and payable within one year', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71504, 'ENG-BASE', 'THIRDPARTY', '4', '0', 'Amounts receivable and payable within one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71505, 'ENG-BASE', 'FINAN', '5', '0', 'Placing of cash and cash equivalents', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71506, 'ENG-BASE', 'CHARGE','6', '0', 'Charges', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71507, 'ENG-BASE', 'PROD', '7', '0', 'Products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71506, 'ENG-BASE', 'EXPENSE','6', '0', 'Charges', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71507, 'ENG-BASE', 'INCOME', '7', '0', 'Products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70103, 'ENG-BASE', 'CAPIT', '10', '71501', 'Capital and reserves', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70104, 'ENG-BASE', 'CAPIT', '101', '70103', 'Capital', 1); @@ -158,70 +158,70 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70227, 'ENG-BASE', 'STOCK', '394', '70223', 'Provisions for depreciation of work in process', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70228, 'ENG-BASE', 'STOCK', '395', '70223', 'Provisions for depreciation of inventories of products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70229, 'ENG-BASE', 'STOCK', '397', '70223', 'Provisions for depreciation of inventories of goods', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70230, 'ENG-BASE', 'TIERS', '40', '71504', 'Accounts payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70231, 'ENG-BASE', 'TIERS', '400', '70230', 'Accounts payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70232, 'ENG-BASE', 'TIERS', '401', '70230', 'Suppliers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70233, 'ENG-BASE', 'TIERS', '403', '70230', 'Suppliers - Payables', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70234, 'ENG-BASE', 'TIERS', '404', '70230', 'Suppliers of fixed assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70235, 'ENG-BASE', 'TIERS', '405', '70230', 'Capital Suppliers - Payables', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70236, 'ENG-BASE', 'TIERS', '408', '70230', 'Supplier invoices not yet received', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70237, 'ENG-BASE', 'TIERS', '409', '70230', 'Debtors suppliers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70238, 'ENG-BASE', 'TIERS', '41', '71504', 'Accounts receivable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70239, 'ENG-BASE', 'TIERS', '410', '70238', 'Customers and Related Accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70240, 'ENG-BASE', 'TIERS', '411', '70238', 'Customers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70241, 'ENG-BASE', 'TIERS', '413', '70238', 'Accounts Receivable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70242, 'ENG-BASE', 'TIERS', '416', '70238', 'Doubtful or contentious customers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70243, 'ENG-BASE', 'TIERS', '418', '70238', 'Customers - Products not yet billed', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70244, 'ENG-BASE', 'TIERS', '419', '70238', 'Accounts payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70245, 'ENG-BASE', 'TIERS', '42', '71504', 'Personnel and related accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70246, 'ENG-BASE', 'TIERS', '421', '70245', 'Staff - Remuneration due', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70247, 'ENG-BASE', 'TIERS', '422', '70245', 'Works councils, establishment, ...', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70248, 'ENG-BASE', 'TIERS', '424', '70245', 'Employee participation in results', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70249, 'ENG-BASE', 'TIERS', '425', '70245', 'Staff - Advances and Advances', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70250, 'ENG-BASE', 'TIERS', '426', '70245', 'Staff - Deposits', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70251, 'ENG-BASE', 'TIERS', '427', '70245', 'Staff - Oppositions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70252, 'ENG-BASE', 'TIERS', '428', '70245', 'Personnel - Accrued expenses and accrued income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70253, 'ENG-BASE', 'TIERS', '43', '71504', 'Social security and other social organizations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70254, 'ENG-BASE', 'TIERS', '431', '70253', 'Social Security', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70255, 'ENG-BASE', 'TIERS', '437', '70253', 'Other social organizations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70256, 'ENG-BASE', 'TIERS', '438', '70253', 'Social organizations - Accrued expenses and accrued income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70257, 'ENG-BASE', 'TIERS', '44', '71504', 'State and other public authorities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70258, 'ENG-BASE', 'TIERS', '441', '70257', 'Status - Grants Receivable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70259, 'ENG-BASE', 'TIERS', '442', '70257', 'Statement - Taxes and taxes recoverable on third parties', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70260, 'ENG-BASE', 'TIERS', '443', '70257', 'Special operations with the State, public authorities, international organizations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70261, 'ENG-BASE', 'TIERS', '444', '70257', 'State - Income taxes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70262, 'ENG-BASE', 'TIERS', '445', '70257', 'State - Taxes on turnover', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70263, 'ENG-BASE', 'TIERS', '446', '70257', 'Bonded Bonds', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70264, 'ENG-BASE', 'TIERS', '447', '70257', 'Other taxes, duties and similar payments', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70265, 'ENG-BASE', 'TIERS', '448', '70257', 'Statement of Accounts Payable and Accrued Income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70266, 'ENG-BASE', 'TIERS', '449', '70257', 'Emission quotas to be returned to the State', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70267, 'ENG-BASE', 'TIERS', '45', '71504', 'Group and Associates', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70268, 'ENG-BASE', 'TIERS', '451', '70267', 'Group', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70269, 'ENG-BASE', 'TIERS', '455', '70267', 'Associates - Current Accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70270, 'ENG-BASE', 'TIERS', '456', '70267', 'Associates - Capital transactions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70271, 'ENG-BASE', 'TIERS', '457', '70267', 'Associates - Dividends payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70272, 'ENG-BASE', 'TIERS', '458', '70267', 'Associates- Joint and EIG Operations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70273, 'ENG-BASE', 'TIERS', '46', '71504', 'Miscellaneous receivables and creditors', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70274, 'ENG-BASE', 'TIERS', '462', '70273', 'Receivables on disposals of fixed assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70275, 'ENG-BASE', 'TIERS', '464', '70273', 'Debts on acquisitions of marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70276, 'ENG-BASE', 'TIERS', '465', '70273', 'Receivables on disposals of marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70277, 'ENG-BASE', 'TIERS', '467', '70273', 'Other accounts receivable or payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70278, 'ENG-BASE', 'TIERS', '468', '70273', 'Miscellaneous - Accrued expenses and accrued income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70279, 'ENG-BASE', 'TIERS', '47', '71504', 'Transition or suspense accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70280, 'ENG-BASE', 'TIERS', '471', '70279', 'Waiting Accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70281, 'ENG-BASE', 'TIERS', '476', '70279', 'Conversion Difference - Assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70282, 'ENG-BASE', 'TIERS', '477', '70279', 'Translation differences - Liabilities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70283, 'ENG-BASE', 'TIERS', '478', '70279', 'Other transitional accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70284, 'ENG-BASE', 'TIERS', '48', '71504', 'regularisation account', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70285, 'ENG-BASE', 'TIERS', '481', '70284', 'Expenses to be spread over several financial years', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70286, 'ENG-BASE', 'TIERS', '486', '70284', 'Prepaid expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70287, 'ENG-BASE', 'TIERS', '487', '70284', 'Deferred income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70288, 'ENG-BASE', 'TIERS', '488', '70284', 'Accounts for the periodic distribution of expenses and revenues', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70289, 'ENG-BASE', 'TIERS', '489', '70284', 'Emission allowances allocated by the State', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70290, 'ENG-BASE', 'TIERS', '49', '71504', 'Provisions for depreciation of third party accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70291, 'ENG-BASE', 'TIERS', '491', '70290', 'Provisions for depreciation of customer accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70292, 'ENG-BASE', 'TIERS', '495', '70290', 'Provisions for impairment of group and associate accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70293, 'ENG-BASE', 'TIERS', '496', '70290', 'Provisions for depreciation of accounts receivable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70230, 'ENG-BASE', 'THIRDPARTY', '40', '71504', 'Accounts payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70231, 'ENG-BASE', 'THIRDPARTY', '400', '70230', 'Accounts payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70232, 'ENG-BASE', 'THIRDPARTY', '401', '70230', 'Suppliers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70233, 'ENG-BASE', 'THIRDPARTY', '403', '70230', 'Suppliers - Payables', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70234, 'ENG-BASE', 'THIRDPARTY', '404', '70230', 'Suppliers of fixed assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70235, 'ENG-BASE', 'THIRDPARTY', '405', '70230', 'Capital Suppliers - Payables', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70236, 'ENG-BASE', 'THIRDPARTY', '408', '70230', 'Supplier invoices not yet received', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70237, 'ENG-BASE', 'THIRDPARTY', '409', '70230', 'Debtors suppliers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70238, 'ENG-BASE', 'THIRDPARTY', '41', '71504', 'Accounts receivable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70239, 'ENG-BASE', 'THIRDPARTY', '410', '70238', 'Customers and Related Accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70240, 'ENG-BASE', 'THIRDPARTY', '411', '70238', 'Customers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70241, 'ENG-BASE', 'THIRDPARTY', '413', '70238', 'Accounts Receivable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70242, 'ENG-BASE', 'THIRDPARTY', '416', '70238', 'Doubtful or contentious customers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70243, 'ENG-BASE', 'THIRDPARTY', '418', '70238', 'Customers - Products not yet billed', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70244, 'ENG-BASE', 'THIRDPARTY', '419', '70238', 'Accounts payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70245, 'ENG-BASE', 'THIRDPARTY', '42', '71504', 'Personnel and related accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70246, 'ENG-BASE', 'THIRDPARTY', '421', '70245', 'Staff - Remuneration due', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70247, 'ENG-BASE', 'THIRDPARTY', '422', '70245', 'Works councils, establishment, ...', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70248, 'ENG-BASE', 'THIRDPARTY', '424', '70245', 'Employee participation in results', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70249, 'ENG-BASE', 'THIRDPARTY', '425', '70245', 'Staff - Advances and Advances', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70250, 'ENG-BASE', 'THIRDPARTY', '426', '70245', 'Staff - Deposits', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70251, 'ENG-BASE', 'THIRDPARTY', '427', '70245', 'Staff - Oppositions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70252, 'ENG-BASE', 'THIRDPARTY', '428', '70245', 'Personnel - Accrued expenses and accrued income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70253, 'ENG-BASE', 'THIRDPARTY', '43', '71504', 'Social security and other social organizations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70254, 'ENG-BASE', 'THIRDPARTY', '431', '70253', 'Social Security', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70255, 'ENG-BASE', 'THIRDPARTY', '437', '70253', 'Other social organizations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70256, 'ENG-BASE', 'THIRDPARTY', '438', '70253', 'Social organizations - Accrued expenses and accrued income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70257, 'ENG-BASE', 'THIRDPARTY', '44', '71504', 'State and other public authorities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70258, 'ENG-BASE', 'THIRDPARTY', '441', '70257', 'Status - Grants Receivable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70259, 'ENG-BASE', 'THIRDPARTY', '442', '70257', 'Statement - Taxes and taxes recoverable on third parties', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70260, 'ENG-BASE', 'THIRDPARTY', '443', '70257', 'Special operations with the State, public authorities, international organizations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70261, 'ENG-BASE', 'THIRDPARTY', '444', '70257', 'State - Income taxes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70262, 'ENG-BASE', 'THIRDPARTY', '445', '70257', 'State - Taxes on turnover', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70263, 'ENG-BASE', 'THIRDPARTY', '446', '70257', 'Bonded Bonds', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70264, 'ENG-BASE', 'THIRDPARTY', '447', '70257', 'Other taxes, duties and similar payments', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70265, 'ENG-BASE', 'THIRDPARTY', '448', '70257', 'Statement of Accounts Payable and Accrued Income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70266, 'ENG-BASE', 'THIRDPARTY', '449', '70257', 'Emission quotas to be returned to the State', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70267, 'ENG-BASE', 'THIRDPARTY', '45', '71504', 'Group and Associates', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70268, 'ENG-BASE', 'THIRDPARTY', '451', '70267', 'Group', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70269, 'ENG-BASE', 'THIRDPARTY', '455', '70267', 'Associates - Current Accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70270, 'ENG-BASE', 'THIRDPARTY', '456', '70267', 'Associates - Capital transactions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70271, 'ENG-BASE', 'THIRDPARTY', '457', '70267', 'Associates - Dividends payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70272, 'ENG-BASE', 'THIRDPARTY', '458', '70267', 'Associates- Joint and EIG Operations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70273, 'ENG-BASE', 'THIRDPARTY', '46', '71504', 'Miscellaneous receivables and creditors', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70274, 'ENG-BASE', 'THIRDPARTY', '462', '70273', 'Receivables on disposals of fixed assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70275, 'ENG-BASE', 'THIRDPARTY', '464', '70273', 'Debts on acquisitions of marketable securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70276, 'ENG-BASE', 'THIRDPARTY', '465', '70273', 'Receivables on disposals of marketable securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70277, 'ENG-BASE', 'THIRDPARTY', '467', '70273', 'Other accounts receivable or payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70278, 'ENG-BASE', 'THIRDPARTY', '468', '70273', 'Miscellaneous - Accrued expenses and accrued income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70279, 'ENG-BASE', 'THIRDPARTY', '47', '71504', 'Transition or suspense accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70280, 'ENG-BASE', 'THIRDPARTY', '471', '70279', 'Waiting Accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70281, 'ENG-BASE', 'THIRDPARTY', '476', '70279', 'Conversion Difference - Assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70282, 'ENG-BASE', 'THIRDPARTY', '477', '70279', 'Translation differences - Liabilities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70283, 'ENG-BASE', 'THIRDPARTY', '478', '70279', 'Other transitional accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70284, 'ENG-BASE', 'THIRDPARTY', '48', '71504', 'regularisation account', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70285, 'ENG-BASE', 'THIRDPARTY', '481', '70284', 'Expenses to be spread over several financial years', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70286, 'ENG-BASE', 'THIRDPARTY', '486', '70284', 'Prepaid expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70287, 'ENG-BASE', 'THIRDPARTY', '487', '70284', 'Deferred income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70288, 'ENG-BASE', 'THIRDPARTY', '488', '70284', 'Accounts for the periodic distribution of expenses and revenues', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70289, 'ENG-BASE', 'THIRDPARTY', '489', '70284', 'Emission allowances allocated by the State', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70290, 'ENG-BASE', 'THIRDPARTY', '49', '71504', 'Provisions for depreciation of third party accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70291, 'ENG-BASE', 'THIRDPARTY', '491', '70290', 'Provisions for depreciation of customer accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70292, 'ENG-BASE', 'THIRDPARTY', '495', '70290', 'Provisions for impairment of group and associate accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70293, 'ENG-BASE', 'THIRDPARTY', '496', '70290', 'Provisions for depreciation of accounts receivable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70294, 'ENG-BASE', 'FINAN', '50', '71505', 'Marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70295, 'ENG-BASE', 'FINAN', '501', '70294', 'Shares in related companies', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70296, 'ENG-BASE', 'FINAN', '502', '70294', 'Treasury shares', 1); @@ -250,120 +250,120 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70319, 'ENG-BASE', 'FINAN', '58', '71505', 'Internal transfers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70320, 'ENG-BASE', 'FINAN', '59', '71505', 'Provisions for impairment of financial accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70321, 'ENG-BASE', 'FINAN', '590', '70320', 'Provisions for depreciation of marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70322, 'ENG-BASE', 'CHARGE', '60', '71506', 'Shopping', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70323, 'ENG-BASE', 'CHARGE', '601', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70324, 'ENG-BASE', 'CHARGE', '602', '70322', 'Stored Procurement - Other Supplies', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70325, 'ENG-BASE', 'CHARGE', '603', '70322', 'Inventory Changes (Supplies and Commodities)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70326, 'ENG-BASE', 'CHARGE', '604', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70327, 'ENG-BASE', 'CHARGE', '605', '70322', 'Purchase of equipment, works and equipment', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70328, 'ENG-BASE', 'CHARGE', '606', '70322', 'Non-stock purchases of materials and supplies', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70329, 'ENG-BASE', 'CHARGE', '607', '70322', 'Purchases of goods', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70330, 'ENG-BASE', 'CHARGE', '608', '70322', 'Reserved account, where applicable, to the recapitulation of incidental expenses included in purchases', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70331, 'ENG-BASE', 'CHARGE', '609', '70322', 'Discounts, rebates and rebates obtained on purchases', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70332, 'ENG-BASE', 'CHARGE', '61', '71506', 'Outside services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70333, 'ENG-BASE', 'CHARGE', '611', '70332', 'General subcontracting', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70334, 'ENG-BASE', 'CHARGE', '612', '70332', 'Lease payments', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70335, 'ENG-BASE', 'CHARGE', '613', '70332', 'Rentals', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70336, 'ENG-BASE', 'CHARGE', '614', '70332', 'Rental and condominium expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70337, 'ENG-BASE', 'CHARGE', '615', '70332', 'Maintenance and repairs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70338, 'ENG-BASE', 'CHARGE', '616', '70332', 'Insurance premiums', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70339, 'ENG-BASE', 'CHARGE', '617', '70332', 'Studies and research', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70340, 'ENG-BASE', 'CHARGE', '618', '70332', 'Various', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70341, 'ENG-BASE', 'CHARGE', '619', '70332', 'Discounts, rebates and rebates obtained on external services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70342, 'ENG-BASE', 'CHARGE', '62', '71506', 'Other services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70343, 'ENG-BASE', 'CHARGE', '621', '70342', 'Staff outside the company', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70344, 'ENG-BASE', 'CHARGE', '622', '70342', 'Remuneration of intermediaries and fees', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70345, 'ENG-BASE', 'CHARGE', '623', '70342', 'Advertising, publications, public relations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70346, 'ENG-BASE', 'CHARGE', '624', '70342', 'Transport of goods and public transport of personnel', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70347, 'ENG-BASE', 'CHARGE', '625', '70342', 'Travel, missions and receptions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70348, 'ENG-BASE', 'CHARGE', '626', '70342', 'Postal and telecommunications costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70349, 'ENG-BASE', 'CHARGE', '627', '70342', 'Banking and related services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70350, 'ENG-BASE', 'CHARGE', '628', '70342', 'Various', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70351, 'ENG-BASE', 'CHARGE', '629', '70342', 'Discounts, rebates and rebates obtained on other external services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70352, 'ENG-BASE', 'CHARGE', '63', '71506', 'Taxes other and payments', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70353, 'ENG-BASE', 'CHARGE', '631', '70352', 'Taxes and similar payments on remuneration (tax administrations)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70354, 'ENG-BASE', 'CHARGE', '633', '70352', 'Taxes and similar payments on remuneration (other bodies)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70355, 'ENG-BASE', 'CHARGE', '635', '70352', 'Other taxes, duties and similar payments (tax administrations)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70356, 'ENG-BASE', 'CHARGE', '637', '70352', 'Other taxes, duties and similar payments (other bodies)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70357, 'ENG-BASE', 'CHARGE', '64', '71506', 'Staff costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70358, 'ENG-BASE', 'CHARGE', '641', '70357', 'Remuneration of staff', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70359, 'ENG-BASE', 'CHARGE', '644', '70357', 'Remuneration of the operator''s work', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70360, 'ENG-BASE', 'CHARGE', '645', '70357', 'Social Security and Welfare Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70361, 'ENG-BASE', 'CHARGE', '646', '70357', 'Personal social contributions of the operator', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70362, 'ENG-BASE', 'CHARGE', '647', '70357', 'Other payroll taxes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70363, 'ENG-BASE', 'CHARGE', '648', '70357', 'Other staff costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70364, 'ENG-BASE', 'CHARGE', '65', '71506', 'Other current operating expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70365, 'ENG-BASE', 'CHARGE', '651', '70364', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70366, 'ENG-BASE', 'CHARGE', '653', '70364', 'Attendance fees', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70367, 'ENG-BASE', 'CHARGE', '654', '70364', 'Loss on bad debts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70368, 'ENG-BASE', 'CHARGE', '655', '70364', 'Share of profit or loss on transactions made jointly', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70369, 'ENG-BASE', 'CHARGE', '658', '70364', 'Miscellaneous operating expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70370, 'ENG-BASE', 'CHARGE', '66', '71506', 'Financial expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70371, 'ENG-BASE', 'CHARGE', '661', '70370', 'Interest charges', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70372, 'ENG-BASE', 'CHARGE', '664', '70370', 'Loss on receivables related to investments', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70373, 'ENG-BASE', 'CHARGE', '665', '70370', 'Discounts granted', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70374, 'ENG-BASE', 'CHARGE', '666', '70370', 'Exchange losses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70375, 'ENG-BASE', 'CHARGE', '667', '70370', 'Net expense on disposals of marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70376, 'ENG-BASE', 'CHARGE', '668', '70370', 'Other financial expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70377, 'ENG-BASE', 'CHARGE', '67', '71506', 'Extraordinary charges', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70378, 'ENG-BASE', 'CHARGE', '671', '70377', 'Exceptional charges on management operations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70379, 'ENG-BASE', 'CHARGE', '672', '70377', 'Account available to entities to record, in the course of the financial year, expenses over previous financial years', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70380, 'ENG-BASE', 'CHARGE', '675', '70377', 'Book value of assets sold', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70381, 'ENG-BASE', 'CHARGE', '678', '70377', 'Other extraordinary expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70382, 'ENG-BASE', 'CHARGE', '68', '71506', 'Depreciation, amortization and provisions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70383, 'ENG-BASE', 'CHARGE', '681', '70382', 'Depreciation, amortization and provisions - Operating expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70384, 'ENG-BASE', 'CHARGE', '686', '70382', 'Depreciation, amortization and provisions - Financial expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70385, 'ENG-BASE', 'CHARGE', '687', '70382', 'Depreciation, amortization and provisions - Extraordinary expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70386, 'ENG-BASE', 'CHARGE', '69', '71506', 'Employee participation - income tax and assimilated', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70387, 'ENG-BASE', 'CHARGE', '691', '70386', 'Employee participation in results', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70388, 'ENG-BASE', 'CHARGE', '695', '70386', 'Income taxes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70389, 'ENG-BASE', 'CHARGE', '696', '70386', 'Corporate income tax related to distributions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70390, 'ENG-BASE', 'CHARGE', '697', '70386', 'Annual corporation tax', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70391, 'ENG-BASE', 'CHARGE', '698', '70386', 'Tax integration', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70392, 'ENG-BASE', 'CHARGE', '699', '70386', 'Products - Reports back deficits', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70393, 'ENG-BASE', 'PROD', '70', '71507', 'Sales of manufactured goods, services, goods', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70394, 'ENG-BASE', 'PROD', '701', '70393', 'Sales of finished products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70395, 'ENG-BASE', 'PROD', '702', '70393', 'Sales of intermediate products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70396, 'ENG-BASE', 'PROD', '703', '70393', 'Sales of residual products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70397, 'ENG-BASE', 'PROD', '704', '70393', 'Works', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70398, 'ENG-BASE', 'PROD', '705', '70393', 'Studies', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70399, 'ENG-BASE', 'PROD', '706', '70393', 'Services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70400, 'ENG-BASE', 'PROD', '707', '70393', 'Sale of goods', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70401, 'ENG-BASE', 'PROD', '708', '70393', 'Income from ancillary activities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70402, 'ENG-BASE', 'PROD', '709', '70393', 'Discounts, rebates and rebates granted by the company', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70403, 'ENG-BASE', 'PROD', '71', '71507', 'Stored production (or destocking)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70404, 'ENG-BASE', 'PROD', '713', '70403', 'Change in stocks (in-process production, products)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70405, 'ENG-BASE', 'PROD', '72', '71507', 'Immobilised production', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70406, 'ENG-BASE', 'PROD', '721', '70405', 'Intangible assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70407, 'ENG-BASE', 'PROD', '722', '70405', 'Property, plant and equipment', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70408, 'ENG-BASE', 'PROD', '74', '71507', 'Operating grants', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70409, 'ENG-BASE', 'PROD', '75', '71507', 'Other management products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70410, 'ENG-BASE', 'PROD', '751', '70409', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70411, 'ENG-BASE', 'PROD', '752', '70409', 'Income from buildings not used for professional purposes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70412, 'ENG-BASE', 'PROD', '753', '70409', 'Directors'' fees and remuneration of directors, managers, ...', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70413, 'ENG-BASE', 'PROD', '754', '70409', 'Perceived refunds of cooperatives (from surplus)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70414, 'ENG-BASE', 'PROD', '755', '70409', 'Share of profits on transactions made jointly', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70415, 'ENG-BASE', 'PROD', '758', '70409', 'Miscellaneous current management products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70416, 'ENG-BASE', 'PROD', '76', '71507', 'Financial products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70417, 'ENG-BASE', 'PROD', '761', '70416', 'Income from participations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70418, 'ENG-BASE', 'PROD', '762', '70416', 'Income from other financial assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70419, 'ENG-BASE', 'PROD', '763', '70416', 'Revenue from other receivables', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70420, 'ENG-BASE', 'PROD', '764', '70416', 'Income from marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70421, 'ENG-BASE', 'PROD', '765', '70416', 'Discounts obtained', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70422, 'ENG-BASE', 'PROD', '766', '70416', 'Exchange gains', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70423, 'ENG-BASE', 'PROD', '767', '70416', 'Net proceeds on disposals of marketable securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70424, 'ENG-BASE', 'PROD', '768', '70416', 'Other financial income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70425, 'ENG-BASE', 'PROD', '77', '71507', 'Exceptional products', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70426, 'ENG-BASE', 'PROD', '771', '70425', 'Extraordinary income from management operations', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70427, 'ENG-BASE', 'PROD', '772', '70425', 'Account available to entities to record, during the financial year, the revenues over previous financial years', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70428, 'ENG-BASE', 'PROD', '775', '70425', 'Proceeds from disposals of assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70429, 'ENG-BASE', 'PROD', '777', '70425', 'Share of investment grants transferred to profit or loss for the year', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70430, 'ENG-BASE', 'PROD', '778', '70425', 'Other extraordinary income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70431, 'ENG-BASE', 'PROD', '78', '71507', 'Reversals of depreciation and provisions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70432, 'ENG-BASE', 'PROD', '781', '70431', 'Reversals of depreciation and provisions (to be included in revenue)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70433, 'ENG-BASE', 'PROD', '786', '70431', 'Reversals of provisions for risks (to be recorded in financial income)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70434, 'ENG-BASE', 'PROD', '787', '70431', 'Reversals of provisions (to be recorded in exceptional income)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70435, 'ENG-BASE', 'PROD', '79', '71507', 'Transfers of charges', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70436, 'ENG-BASE', 'PROD', '791', '70435', 'Transfers of operating expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70437, 'ENG-BASE', 'PROD', '796', '70435', 'Transfers of financial expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70438, 'ENG-BASE', 'PROD', '797', '70435', 'Transfers of Exceptional Charges', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70322, 'ENG-BASE', 'EXPENSE', '60', '71506', 'Shopping', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70323, 'ENG-BASE', 'EXPENSE', '601', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70324, 'ENG-BASE', 'EXPENSE', '602', '70322', 'Stored Procurement - Other Supplies', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70325, 'ENG-BASE', 'EXPENSE', '603', '70322', 'Inventory Changes (Supplies and Commodities)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70326, 'ENG-BASE', 'EXPENSE', '604', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70327, 'ENG-BASE', 'EXPENSE', '605', '70322', 'Purchase of equipment, works and equipment', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70328, 'ENG-BASE', 'EXPENSE', '606', '70322', 'Non-stock purchases of materials and supplies', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70329, 'ENG-BASE', 'EXPENSE', '607', '70322', 'Purchases of goods', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70330, 'ENG-BASE', 'EXPENSE', '608', '70322', 'Reserved account, where applicable, to the recapitulation of incidental expenses included in purchases', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70331, 'ENG-BASE', 'EXPENSE', '609', '70322', 'Discounts, rebates and rebates obtained on purchases', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70332, 'ENG-BASE', 'EXPENSE', '61', '71506', 'Outside services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70333, 'ENG-BASE', 'EXPENSE', '611', '70332', 'General subcontracting', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70334, 'ENG-BASE', 'EXPENSE', '612', '70332', 'Lease payments', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70335, 'ENG-BASE', 'EXPENSE', '613', '70332', 'Rentals', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70336, 'ENG-BASE', 'EXPENSE', '614', '70332', 'Rental and condominium expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70337, 'ENG-BASE', 'EXPENSE', '615', '70332', 'Maintenance and repairs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70338, 'ENG-BASE', 'EXPENSE', '616', '70332', 'Insurance premiums', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70339, 'ENG-BASE', 'EXPENSE', '617', '70332', 'Studies and research', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70340, 'ENG-BASE', 'EXPENSE', '618', '70332', 'Various', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70341, 'ENG-BASE', 'EXPENSE', '619', '70332', 'Discounts, rebates and rebates obtained on external services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70342, 'ENG-BASE', 'EXPENSE', '62', '71506', 'Other services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70343, 'ENG-BASE', 'EXPENSE', '621', '70342', 'Staff outside the company', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70344, 'ENG-BASE', 'EXPENSE', '622', '70342', 'Remuneration of intermediaries and fees', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70345, 'ENG-BASE', 'EXPENSE', '623', '70342', 'Advertising, publications, public relations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70346, 'ENG-BASE', 'EXPENSE', '624', '70342', 'Transport of goods and public transport of personnel', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70347, 'ENG-BASE', 'EXPENSE', '625', '70342', 'Travel, missions and receptions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70348, 'ENG-BASE', 'EXPENSE', '626', '70342', 'Postal and telecommunications costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70349, 'ENG-BASE', 'EXPENSE', '627', '70342', 'Banking and related services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70350, 'ENG-BASE', 'EXPENSE', '628', '70342', 'Various', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70351, 'ENG-BASE', 'EXPENSE', '629', '70342', 'Discounts, rebates and rebates obtained on other external services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70352, 'ENG-BASE', 'EXPENSE', '63', '71506', 'Taxes other and payments', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70353, 'ENG-BASE', 'EXPENSE', '631', '70352', 'Taxes and similar payments on remuneration (tax administrations)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70354, 'ENG-BASE', 'EXPENSE', '633', '70352', 'Taxes and similar payments on remuneration (other bodies)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70355, 'ENG-BASE', 'EXPENSE', '635', '70352', 'Other taxes, duties and similar payments (tax administrations)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70356, 'ENG-BASE', 'EXPENSE', '637', '70352', 'Other taxes, duties and similar payments (other bodies)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70357, 'ENG-BASE', 'EXPENSE', '64', '71506', 'Staff costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70358, 'ENG-BASE', 'EXPENSE', '641', '70357', 'Remuneration of staff', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70359, 'ENG-BASE', 'EXPENSE', '644', '70357', 'Remuneration of the operator''s work', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70360, 'ENG-BASE', 'EXPENSE', '645', '70357', 'Social Security and Welfare Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70361, 'ENG-BASE', 'EXPENSE', '646', '70357', 'Personal social contributions of the operator', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70362, 'ENG-BASE', 'EXPENSE', '647', '70357', 'Other payroll taxes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70363, 'ENG-BASE', 'EXPENSE', '648', '70357', 'Other staff costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70364, 'ENG-BASE', 'EXPENSE', '65', '71506', 'Other current operating expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70365, 'ENG-BASE', 'EXPENSE', '651', '70364', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70366, 'ENG-BASE', 'EXPENSE', '653', '70364', 'Attendance fees', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70367, 'ENG-BASE', 'EXPENSE', '654', '70364', 'Loss on bad debts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70368, 'ENG-BASE', 'EXPENSE', '655', '70364', 'Share of profit or loss on transactions made jointly', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70369, 'ENG-BASE', 'EXPENSE', '658', '70364', 'Miscellaneous operating expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70370, 'ENG-BASE', 'EXPENSE', '66', '71506', 'Financial expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70371, 'ENG-BASE', 'EXPENSE', '661', '70370', 'Interest charges', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70372, 'ENG-BASE', 'EXPENSE', '664', '70370', 'Loss on receivables related to investments', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70373, 'ENG-BASE', 'EXPENSE', '665', '70370', 'Discounts granted', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70374, 'ENG-BASE', 'EXPENSE', '666', '70370', 'Exchange losses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70375, 'ENG-BASE', 'EXPENSE', '667', '70370', 'Net expense on disposals of marketable securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70376, 'ENG-BASE', 'EXPENSE', '668', '70370', 'Other financial expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70377, 'ENG-BASE', 'EXPENSE', '67', '71506', 'Extraordinary charges', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70378, 'ENG-BASE', 'EXPENSE', '671', '70377', 'Exceptional charges on management operations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70379, 'ENG-BASE', 'EXPENSE', '672', '70377', 'Account available to entities to record, in the course of the financial year, expenses over previous financial years', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70380, 'ENG-BASE', 'EXPENSE', '675', '70377', 'Book value of assets sold', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70381, 'ENG-BASE', 'EXPENSE', '678', '70377', 'Other extraordinary expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70382, 'ENG-BASE', 'EXPENSE', '68', '71506', 'Depreciation, amortization and provisions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70383, 'ENG-BASE', 'EXPENSE', '681', '70382', 'Depreciation, amortization and provisions - Operating expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70384, 'ENG-BASE', 'EXPENSE', '686', '70382', 'Depreciation, amortization and provisions - Financial expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70385, 'ENG-BASE', 'EXPENSE', '687', '70382', 'Depreciation, amortization and provisions - Extraordinary expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70386, 'ENG-BASE', 'EXPENSE', '69', '71506', 'Employee participation - income tax and assimilated', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70387, 'ENG-BASE', 'EXPENSE', '691', '70386', 'Employee participation in results', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70388, 'ENG-BASE', 'EXPENSE', '695', '70386', 'Income taxes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70389, 'ENG-BASE', 'EXPENSE', '696', '70386', 'Corporate income tax related to distributions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70390, 'ENG-BASE', 'EXPENSE', '697', '70386', 'Annual corporation tax', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70391, 'ENG-BASE', 'EXPENSE', '698', '70386', 'Tax integration', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70392, 'ENG-BASE', 'EXPENSE', '699', '70386', 'Products - Reports back deficits', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70393, 'ENG-BASE', 'INCOME', '70', '71507', 'Sales of manufactured goods, services, goods', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70394, 'ENG-BASE', 'INCOME', '701', '70393', 'Sales of finished products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70395, 'ENG-BASE', 'INCOME', '702', '70393', 'Sales of intermediate products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70396, 'ENG-BASE', 'INCOME', '703', '70393', 'Sales of residual products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70397, 'ENG-BASE', 'INCOME', '704', '70393', 'Works', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70398, 'ENG-BASE', 'INCOME', '705', '70393', 'Studies', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70399, 'ENG-BASE', 'INCOME', '706', '70393', 'Services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70400, 'ENG-BASE', 'INCOME', '707', '70393', 'Sale of goods', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70401, 'ENG-BASE', 'INCOME', '708', '70393', 'Income from ancillary activities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70402, 'ENG-BASE', 'INCOME', '709', '70393', 'Discounts, rebates and rebates granted by the company', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70403, 'ENG-BASE', 'INCOME', '71', '71507', 'Stored production (or destocking)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70404, 'ENG-BASE', 'INCOME', '713', '70403', 'Change in stocks (in-process production, products)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70405, 'ENG-BASE', 'INCOME', '72', '71507', 'Immobilised production', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70406, 'ENG-BASE', 'INCOME', '721', '70405', 'Intangible assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70407, 'ENG-BASE', 'INCOME', '722', '70405', 'Property, plant and equipment', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70408, 'ENG-BASE', 'INCOME', '74', '71507', 'Operating grants', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70409, 'ENG-BASE', 'INCOME', '75', '71507', 'Other management products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70410, 'ENG-BASE', 'INCOME', '751', '70409', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70411, 'ENG-BASE', 'INCOME', '752', '70409', 'Income from buildings not used for professional purposes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70412, 'ENG-BASE', 'INCOME', '753', '70409', 'Directors'' fees and remuneration of directors, managers, ...', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70413, 'ENG-BASE', 'INCOME', '754', '70409', 'Perceived refunds of cooperatives (from surplus)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70414, 'ENG-BASE', 'INCOME', '755', '70409', 'Share of profits on transactions made jointly', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70415, 'ENG-BASE', 'INCOME', '758', '70409', 'Miscellaneous current management products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70416, 'ENG-BASE', 'INCOME', '76', '71507', 'Financial products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70417, 'ENG-BASE', 'INCOME', '761', '70416', 'Income from participations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70418, 'ENG-BASE', 'INCOME', '762', '70416', 'Income from other financial assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70419, 'ENG-BASE', 'INCOME', '763', '70416', 'Revenue from other receivables', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70420, 'ENG-BASE', 'INCOME', '764', '70416', 'Income from marketable securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70421, 'ENG-BASE', 'INCOME', '765', '70416', 'Discounts obtained', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70422, 'ENG-BASE', 'INCOME', '766', '70416', 'Exchange gains', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70423, 'ENG-BASE', 'INCOME', '767', '70416', 'Net proceeds on disposals of marketable securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70424, 'ENG-BASE', 'INCOME', '768', '70416', 'Other financial income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70425, 'ENG-BASE', 'INCOME', '77', '71507', 'Exceptional products', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70426, 'ENG-BASE', 'INCOME', '771', '70425', 'Extraordinary income from management operations', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70427, 'ENG-BASE', 'INCOME', '772', '70425', 'Account available to entities to record, during the financial year, the revenues over previous financial years', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70428, 'ENG-BASE', 'INCOME', '775', '70425', 'Proceeds from disposals of assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70429, 'ENG-BASE', 'INCOME', '777', '70425', 'Share of investment grants transferred to profit or loss for the year', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70430, 'ENG-BASE', 'INCOME', '778', '70425', 'Other extraordinary income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70431, 'ENG-BASE', 'INCOME', '78', '71507', 'Reversals of depreciation and provisions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70432, 'ENG-BASE', 'INCOME', '781', '70431', 'Reversals of depreciation and provisions (to be included in revenue)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70433, 'ENG-BASE', 'INCOME', '786', '70431', 'Reversals of provisions for risks (to be recorded in financial income)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70434, 'ENG-BASE', 'INCOME', '787', '70431', 'Reversals of provisions (to be recorded in exceptional income)', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70435, 'ENG-BASE', 'INCOME', '79', '71507', 'Transfers of charges', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70436, 'ENG-BASE', 'INCOME', '791', '70435', 'Transfers of operating expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70437, 'ENG-BASE', 'INCOME', '796', '70435', 'Transfers of financial expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70438, 'ENG-BASE', 'INCOME', '797', '70435', 'Transfers of Exceptional Charges', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_account_jp.sql b/htdocs/install/mysql/data/llx_accounting_account_jp.sql new file mode 100644 index 00000000000..2b852ae273f --- /dev/null +++ b/htdocs/install/mysql/data/llx_accounting_account_jp.sql @@ -0,0 +1,365 @@ +-- Copyright (C) 2001-2004 Rodolphe Quiedeville +-- Copyright (C) 2003 Jean-Louis Bergamo +-- Copyright (C) 2004-2009 Laurent Destailleur +-- Copyright (C) 2004 Benoit Mortier +-- Copyright (C) 2004 Guillaume Delecourt +-- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2011-2017 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 . +-- +-- Note (JPN-BASE): INCOME = REVENUE +-- Note (JPN-BASE): EXPENSE = EXPENSES +-- Note (JPN-BASE): CAPITAL = EQUITY +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l''install et tous les sigles '--' sont supprimés. +-- Note: To replace a string thas is '__, 0' into an increasing number, you can use vi with comment +-- :let @a=1 | %s/__, 0/\='__, '.(@a+setreg('a',@a+1))/g + +-- Descriptif des plans comptables Japan JPN-BASE +-- ID 10000 - 99999 +-- ADD 12300000 to rowid # Do no remove this comment -- + +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 10000, 'JPN-BASE', 'ASSETS', '10000000', '0', '資産合計', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11000, 'JPN-BASE', 'ASSETS', '11000000', '10000000', '流動資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11100, 'JPN-BASE', 'ASSETS', '11100000', '11000000', '当座資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11101, 'JPN-BASE', 'ASSETS', '11110000', '11100000', '現金及び預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11102, 'JPN-BASE', 'ASSETS', '11111000', '11110000', '現金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11103, 'JPN-BASE', 'ASSETS', '11111100', '11111000', '現金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11104, 'JPN-BASE', 'ASSETS', '11111200', '11111000', '小口現金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11105, 'JPN-BASE', 'ASSETS', '11111300', '11111000', '小切手', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11106, 'JPN-BASE', 'ASSETS', '11111400', '11111000', '転送中現金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11107, 'JPN-BASE', 'ASSETS', '11112000', '11110000', '流動性預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11108, 'JPN-BASE', 'ASSETS', '11112100', '11112000', '当座預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11109, 'JPN-BASE', 'ASSETS', '11112200', '11112000', '普通預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11110, 'JPN-BASE', 'ASSETS', '11112300', '11112000', '通知預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11111, 'JPN-BASE', 'ASSETS', '11112400', '11112000', 'その他流動性預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11112, 'JPN-BASE', 'ASSETS', '11112500', '11112000', '銀行通過中預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11113, 'JPN-BASE', 'ASSETS', '11112600', '11112000', '銀行未確認受領', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11114, 'JPN-BASE', 'ASSETS', '11112700', '11112000', '未配分受取預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11115, 'JPN-BASE', 'ASSETS', '11113000', '11110000', '固定性預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11116, 'JPN-BASE', 'ASSETS', '11113100', '11113000', '定期預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11117, 'JPN-BASE', 'ASSETS', '11113200', '11113000', '定期積金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11118, 'JPN-BASE', 'ASSETS', '11113300', '11113000', 'その他固定性預金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11119, 'JPN-BASE', 'ASSETS', '11120000', '11100000', 'その他当座資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11120, 'JPN-BASE', 'ASSETS', '11121000', '11120000', '受取手形', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11121, 'JPN-BASE', 'ASSETS', '11122000', '11120000', '売掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11122, 'JPN-BASE', 'ASSETS', '11123000', '11120000', 'サービス売掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11123, 'JPN-BASE', 'ASSETS', '11124000', '11120000', '有価証券', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11124, 'JPN-BASE', 'ASSETS', '11125000', '11120000', 'その他当座資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11125, 'JPN-BASE', 'ASSETS', '11126000', '11120000', '未請求売掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11200, 'JPN-BASE', 'ASSETS', '11200000', '11000000', '棚卸資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11201, 'JPN-BASE', 'ASSETS', '11201000', '11200000', '商品', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11202, 'JPN-BASE', 'ASSETS', '11202000', '11200000', '製品', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11203, 'JPN-BASE', 'ASSETS', '11203000', '11200000', '製品資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11204, 'JPN-BASE', 'ASSETS', '11204000', '11200000', '倉庫資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11205, 'JPN-BASE', 'ASSETS', '11205000', '11200000', '原材料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11206, 'JPN-BASE', 'ASSETS', '11206000', '11200000', '半製品・仕掛品', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11207, 'JPN-BASE', 'ASSETS', '11207000', '11200000', '貯蔵品', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11208, 'JPN-BASE', 'ASSETS', '11208000', '11200000', '補助材料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11209, 'JPN-BASE', 'ASSETS', '11209000', '11200000', 'その他棚卸資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11210, 'JPN-BASE', 'ASSETS', '11210000', '11200000', '仕掛品在庫', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11211, 'JPN-BASE', 'ASSETS', '11211000', '11200000', '検品中在庫', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11300, 'JPN-BASE', 'ASSETS', '11300000', '11000000', 'その他流動資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11301, 'JPN-BASE', 'ASSETS', '11301000', '11300000', '前渡金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11302, 'JPN-BASE', 'ASSETS', '11302000', '11300000', '短期貸付金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11303, 'JPN-BASE', 'ASSETS', '11303000', '11300000', '立替金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11304, 'JPN-BASE', 'ASSETS', '11304000', '11300000', '従業員立替', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11305, 'JPN-BASE', 'ASSETS', '11305000', '11300000', '未収入金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11306, 'JPN-BASE', 'ASSETS', '11306000', '11300000', '仮払金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11307, 'JPN-BASE', 'ASSETS', '11307000', '11300000', '前払金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11308, 'JPN-BASE', 'ASSETS', '11308000', '11300000', '仮払消費税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11309, 'JPN-BASE', 'ASSETS', '11309000', '11300000', '未収法人税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11310, 'JPN-BASE', 'ASSETS', '11310000', '11300000', '繰延税金資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11311, 'JPN-BASE', 'ASSETS', '11311000', '11300000', 'その他流動資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11312, 'JPN-BASE', 'ASSETS', '11312000', '11300000', '不渡手形', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11313, 'JPN-BASE', 'ASSETS', '11313000', '11300000', '債権償却特別勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 11314, 'JPN-BASE', 'ASSETS', '11314000', '11300000', '貸倒引当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12000, 'JPN-BASE', 'ASSETS', '12000000', '10000000', '固定資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12100, 'JPN-BASE', 'ASSETS', '12100000', '12000000', '有形固定資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12101, 'JPN-BASE', 'ASSETS', '12101000', '12100000', '建物', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12102, 'JPN-BASE', 'ASSETS', '12102000', '12100000', '建物付属設備', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12103, 'JPN-BASE', 'ASSETS', '12103000', '12100000', '構築物', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12104, 'JPN-BASE', 'ASSETS', '12104000', '12100000', '機械装置', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12105, 'JPN-BASE', 'ASSETS', '12105000', '12100000', '車両運搬具', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12106, 'JPN-BASE', 'ASSETS', '12106000', '12100000', '工具器具備品', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12107, 'JPN-BASE', 'ASSETS', '12107000', '12100000', '土地', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12108, 'JPN-BASE', 'ASSETS', '12108000', '12100000', '建設仮勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12109, 'JPN-BASE', 'ASSETS', '12109000', '12100000', 'その他有形固定資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12110, 'JPN-BASE', 'ASSETS', '12110000', '12100000', '減価償却累計額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12200, 'JPN-BASE', 'ASSETS', '12200000', '12000000', '無形固定資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12201, 'JPN-BASE', 'ASSETS', '12201000', '12200000', '電話加入権', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12202, 'JPN-BASE', 'ASSETS', '12202000', '12200000', 'その他無形固定資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12203, 'JPN-BASE', 'ASSETS', '12203000', '12200000', 'ソフトウェア資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12300, 'JPN-BASE', 'ASSETS', '12300000', '12000000', '投資その他の資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12301, 'JPN-BASE', 'ASSETS', '12301000', '12300000', '投資有価証券', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12302, 'JPN-BASE', 'ASSETS', '12302000', '12300000', '出資金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12303, 'JPN-BASE', 'ASSETS', '12303000', '12300000', '長期貸付金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12304, 'JPN-BASE', 'ASSETS', '12304000', '12300000', '長期前払費用', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12305, 'JPN-BASE', 'ASSETS', '12305000', '12300000', '保証金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12306, 'JPN-BASE', 'ASSETS', '12306000', '12300000', '事業保険積立金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12307, 'JPN-BASE', 'ASSETS', '12307000', '12300000', '長期繰延税金資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12308, 'JPN-BASE', 'ASSETS', '12308000', '12300000', 'その他投資', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12309, 'JPN-BASE', 'ASSETS', '12410000', '12000000', 'プロジェクト資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 12310, 'JPN-BASE', 'ASSETS', '12420000', '12000000', 'プロジェクト仕掛', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 13000, 'JPN-BASE', 'ASSETS', '13000000', '10000000', '繰延資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 13001, 'JPN-BASE', 'ASSETS', '13100000', '13000000', '創立費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 13002, 'JPN-BASE', 'ASSETS', '13200000', '13000000', '開発費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 13003, 'JPN-BASE', 'ASSETS', '13300000', '13000000', '試験研究費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 13004, 'JPN-BASE', 'ASSETS', '13400000', '13000000', 'その他繰延資産', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 14000, 'JPN-BASE', 'ASSETS', '14000000', '10000000', '関係会社取引元勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 20000, 'JPN-BASE', 'LIABILITIES_EQUITY', '20000000', '0', '負債・純資産合計', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21000, 'JPN-BASE', 'LIABILITIES', '21000000', '20000000', '負債合計', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21001, 'JPN-BASE', 'LIABILITIES', '21100000', '21000000', '流動負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21002, 'JPN-BASE', 'LIABILITIES', '21101000', '21100000', '支払手形', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21003, 'JPN-BASE', 'LIABILITIES', '21102000', '21100000', '買掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21004, 'JPN-BASE', 'LIABILITIES', '21103000', '21100000', 'サービス買掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21005, 'JPN-BASE', 'LIABILITIES', '21104000', '21100000', '短期借入金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21006, 'JPN-BASE', 'LIABILITIES', '21105000', '21100000', '1年内返済長期借入金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21007, 'JPN-BASE', 'LIABILITIES', '21106000', '21100000', '未払金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21008, 'JPN-BASE', 'LIABILITIES', '21107000', '21100000', '未払費用', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21009, 'JPN-BASE', 'LIABILITIES', '21108000', '21100000', '前受金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21010, 'JPN-BASE', 'LIABILITIES', '21109000', '21100000', '仮受金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21011, 'JPN-BASE', 'LIABILITIES', '21110000', '21100000', '預り金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21012, 'JPN-BASE', 'LIABILITIES', '21111000', '21100000', '従業員預り金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21013, 'JPN-BASE', 'LIABILITIES', '21112000', '21100000', '割引手形', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21014, 'JPN-BASE', 'LIABILITIES', '21113000', '21100000', '裏書手形', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21015, 'JPN-BASE', 'LIABILITIES', '21114000', '21100000', '未払法人税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21016, 'JPN-BASE', 'LIABILITIES', '21115000', '21100000', '賞与引当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21017, 'JPN-BASE', 'LIABILITIES', '21116000', '21100000', '仮受消費税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21018, 'JPN-BASE', 'LIABILITIES', '21117000', '21100000', '繰延税金負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21019, 'JPN-BASE', 'LIABILITIES', '21118000', '21100000', 'その他流動負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21020, 'JPN-BASE', 'LIABILITIES', '21119000', '21100000', '未請求受領書', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21021, 'JPN-BASE', 'LIABILITIES', '21200000', '21000000', '固定負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21022, 'JPN-BASE', 'LIABILITIES', '21201000', '21200000', '長期借入金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21023, 'JPN-BASE', 'LIABILITIES', '21202000', '21200000', '預り保証金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21024, 'JPN-BASE', 'LIABILITIES', '21203000', '21200000', '退職給与引当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21025, 'JPN-BASE', 'LIABILITIES', '21204000', '21200000', '長期繰延税金負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21026, 'JPN-BASE', 'LIABILITIES', '21205000', '21200000', 'その他固定負債', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21027, 'JPN-BASE', 'LIABILITIES', '21300000', '21000000', '引当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21028, 'JPN-BASE', 'LIABILITIES', '21301000', '21300000', '引当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21029, 'JPN-BASE', 'LIABILITIES', '21410000', '21000000', '関係会社取引先勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21030, 'JPN-BASE', 'LIABILITIES', '21420000', '21000000', '源泉所得税', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 21031, 'JPN-BASE', 'LIABILITIES', '21430000', '21000000', '支払中買掛金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22000, 'JPN-BASE', 'EQUITY', '22000000', '20000000', '純資産合計', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22001, 'JPN-BASE', 'EQUITY', '22100000', '22000000', '株主資本', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22002, 'JPN-BASE', 'EQUITY', '22110000', '22100000', '資本金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22003, 'JPN-BASE', 'EQUITY', '22111000', '22110000', '資本金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22004, 'JPN-BASE', 'EQUITY', '22120000', '22100000', '新株式申込証拠金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22005, 'JPN-BASE', 'EQUITY', '22121000', '22120000', '新株式申込証拠金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22006, 'JPN-BASE', 'EQUITY', '22130000', '22100000', '資本剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22007, 'JPN-BASE', 'EQUITY', '22131000', '22130000', '資本準備金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22008, 'JPN-BASE', 'EQUITY', '22131100', '22131000', 'その他資本剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22009, 'JPN-BASE', 'EQUITY', '22131110', '22131100', '資本・資本準備金減少差益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22010, 'JPN-BASE', 'EQUITY', '22131120', '22131100', '自己株式処分差益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22011, 'JPN-BASE', 'EQUITY', '22140000', '22100000', '利益剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22012, 'JPN-BASE', 'EQUITY', '22141000', '22140000', '利益準備金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22013, 'JPN-BASE', 'EQUITY', '22142000', '22140000', 'その他利益剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22014, 'JPN-BASE', 'EQUITY', '22142100', '22142000', '退職給与積立金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22015, 'JPN-BASE', 'EQUITY', '22142200', '22142000', '別途積立金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22016, 'JPN-BASE', 'EQUITY', '22142300', '22142000', 'その他任意積立金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22017, 'JPN-BASE', 'EQUITY', '22142400', '22142000', '繰越利益剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22018, 'JPN-BASE', 'EQUITY', '22142410', '22142400', '繰越利益剰余金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22019, 'JPN-BASE', 'EQUITY', '22150000', '22100000', '自己株式', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22020, 'JPN-BASE', 'EQUITY', '22151000', '22150000', '自己株式', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22021, 'JPN-BASE', 'EQUITY', '22160000', '22100000', '自己株式申込証拠金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22022, 'JPN-BASE', 'EQUITY', '22161000', '22160000', '自己株式申込証拠金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22023, 'JPN-BASE', 'EQUITY', '22200000', '22000000', '評価・換算差額等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22024, 'JPN-BASE', 'EQUITY', '22210000', '22200000', '他有価証券評価差額金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22025, 'JPN-BASE', 'EQUITY', '22211000', '22210000', '他有価証券評価差額金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22026, 'JPN-BASE', 'EQUITY', '22220000', '22200000', '繰越ヘッジ損益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22027, 'JPN-BASE', 'EQUITY', '22221000', '22220000', '繰越ヘッジ損益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22028, 'JPN-BASE', 'EQUITY', '22300000', '22000000', '新株予約権', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22029, 'JPN-BASE', 'EQUITY', '22310000', '22300000', '新株予約権', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 22030, 'JPN-BASE', 'EQUITY', '22320000', '22300000', '自己新株予約権', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30000, 'JPN-BASE', 'INCOME', '30000000', '0', '純売上高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30001, 'JPN-BASE', 'INCOME', '30001000', '30000000', '商品売上高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30002, 'JPN-BASE', 'INCOME', '30002000', '30000000', '製品売上高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30003, 'JPN-BASE', 'INCOME', '30003000', '30000000', 'サービス売上高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30004, 'JPN-BASE', 'INCOME', '30004000', '30000000', '売上値引高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30005, 'JPN-BASE', 'INCOME', '30005000', '30000000', '売上戻り高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30006, 'JPN-BASE', 'INCOME', '30006000', '30000000', '売上割戻し高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30007, 'JPN-BASE', 'INCOME', '30007000', '30000000', '前受収益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 30008, 'JPN-BASE', 'INCOME', '30008000', '30000000', '未請求売上', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31000, 'JPN-BASE', 'COGS', '31000000', '0', '売上原価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31001, 'JPN-BASE', 'COGS', '31100000', '31000000', '商品売上原価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31002, 'JPN-BASE', 'COGS', '31200000', '31000000', '製品売上原価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31003, 'JPN-BASE', 'COGS', '31201000', '31000000', '製品経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31004, 'JPN-BASE', 'COGS', '31202000', '31000000', '製品原価調整', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31005, 'JPN-BASE', 'COGS', '31203000', '31000000', '入庫請求仮勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31006, 'JPN-BASE', 'COGS', '31204000', '31000000', '請求価格差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31007, 'JPN-BASE', 'COGS', '31205000', '31000000', '標準価格差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31008, 'JPN-BASE', 'COGS', '31206000', '31000000', '平均原価差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31009, 'JPN-BASE', 'COGS', '31207000', '31000000', '倉庫差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31010, 'JPN-BASE', 'COGS', '31208000', '31000000', '在庫調整', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31011, 'JPN-BASE', 'COGS', '31209000', '31000000', '棚卸再評価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31012, 'JPN-BASE', 'COGS', '31300000', '31000000', '期首棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31400, 'JPN-BASE', 'COGS', '31400000', '31000000', '仕入高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31401, 'JPN-BASE', 'COGS', '31410000', '31400000', '商品仕入高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31402, 'JPN-BASE', 'COGS', '31420000', '31400000', 'サービス仕入高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31403, 'JPN-BASE', 'COGS', '31430000', '31400000', '仕入値引高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31404, 'JPN-BASE', 'COGS', '31440000', '31400000', '仕入戻り高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31405, 'JPN-BASE', 'COGS', '31450000', '31400000', '仕入割戻し高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31406, 'JPN-BASE', 'COGS', '31460000', '31400000', '仕入等配賦額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31500, 'JPN-BASE', 'COGS', '31500000', '31000000', '当期製品製造原価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31501, 'JPN-BASE', 'COGS', '31510000', '31500000', '当期総製造費用', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31502, 'JPN-BASE', 'COGS', '31511000', '31510000', '材料費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31503, 'JPN-BASE', 'COGS', '31511100', '31511000', '期首材料棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31504, 'JPN-BASE', 'COGS', '31511200', '31511000', '材料仕入高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31505, 'JPN-BASE', 'COGS', '31511300', '31511000', '期末材料棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31506, 'JPN-BASE', 'COGS', '31512000', '31510000', '労務費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31507, 'JPN-BASE', 'COGS', '31512100', '31512000', '賃金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31508, 'JPN-BASE', 'COGS', '31512200', '31512000', '賞与', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31509, 'JPN-BASE', 'COGS', '31512300', '31512000', '退職金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31510, 'JPN-BASE', 'COGS', '31512400', '31512000', '法定福利費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31511, 'JPN-BASE', 'COGS', '31512500', '31512000', '福利厚生費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31512, 'JPN-BASE', 'COGS', '31512600', '31512000', '賞与引当金繰入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31513, 'JPN-BASE', 'COGS', '31512700', '31512000', '退職給与引当金繰入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31514, 'JPN-BASE', 'COGS', '31512800', '31512000', 'その他労務費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31515, 'JPN-BASE', 'COGS', '31512900', '31512000', '雑給', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31516, 'JPN-BASE', 'COGS', '31513000', '31510000', '外注加工費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31517, 'JPN-BASE', 'COGS', '31513100', '31513000', '外注加工費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31518, 'JPN-BASE', 'COGS', '31514000', '31510000', '製造経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31519, 'JPN-BASE', 'COGS', '31514010', '31514000', '電力費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31520, 'JPN-BASE', 'COGS', '31514020', '31514000', '燃料費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31521, 'JPN-BASE', 'COGS', '31514030', '31514000', '水道光熱費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31522, 'JPN-BASE', 'COGS', '31514040', '31514000', '車両関連費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31523, 'JPN-BASE', 'COGS', '31514050', '31514000', '運賃', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31524, 'JPN-BASE', 'COGS', '31514060', '31514000', '工場消耗品費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31525, 'JPN-BASE', 'COGS', '31514070', '31514000', '賃借料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31526, 'JPN-BASE', 'COGS', '31514080', '31514000', '支払保険料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31527, 'JPN-BASE', 'COGS', '31514090', '31514000', '修繕費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31528, 'JPN-BASE', 'COGS', '31514100', '31514000', '租税公課', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31529, 'JPN-BASE', 'COGS', '31514110', '31514000', '減価償却費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31530, 'JPN-BASE', 'COGS', '31514120', '31514000', '旅費交通費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31531, 'JPN-BASE', 'COGS', '31514130', '31514000', '通信費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31532, 'JPN-BASE', 'COGS', '31514140', '31514000', '支払手数料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31533, 'JPN-BASE', 'COGS', '31514150', '31514000', '会議費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31534, 'JPN-BASE', 'COGS', '31514160', '31514000', '諸会費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31535, 'JPN-BASE', 'COGS', '31514170', '31514000', '図書教育費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31536, 'JPN-BASE', 'COGS', '31514180', '31514000', '試験研究費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31537, 'JPN-BASE', 'COGS', '31514190', '31514000', 'その他製造経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31538, 'JPN-BASE', 'COGS', '31514200', '31514000', '雑費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31539, 'JPN-BASE', 'COGS', '31515010', '31514000', '製造原価', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31540, 'JPN-BASE', 'COGS', '31515020', '31514000', 'スクラップ', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31541, 'JPN-BASE', 'COGS', '31515030', '31514000', '外注加工費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31542, 'JPN-BASE', 'COGS', '31515040', '31514000', '数量差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31543, 'JPN-BASE', 'COGS', '31515050', '31514000', '仕様変更差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31544, 'JPN-BASE', 'COGS', '31515060', '31514000', '賃率差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31545, 'JPN-BASE', 'COGS', '31515070', '31514000', '準変動費差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31546, 'JPN-BASE', 'COGS', '31515080', '31514000', '労務費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31547, 'JPN-BASE', 'COGS', '31515090', '31514000', '負担', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31548, 'JPN-BASE', 'COGS', '31515100', '31514000', '間接諸経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31549, 'JPN-BASE', 'COGS', '31520000', '31500000', '仕掛品棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31550, 'JPN-BASE', 'COGS', '31521000', '31520000', '製造原価配賦額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31551, 'JPN-BASE', 'COGS', '31522000', '31520000', '期首仕掛品棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31552, 'JPN-BASE', 'COGS', '31523000', '31520000', '期末仕掛品棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31553, 'JPN-BASE', 'COGS', '31524000', '31520000', '他勘定振替高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 31600, 'JPN-BASE', 'COGS', '31600000', '31000000', '期末棚卸高', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41000, 'JPN-BASE', 'EXPENSE', '41000000', '0', '販売費及び一般管理費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41100, 'JPN-BASE', 'EXPENSE', '41100000', '41000000', '人件費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41101, 'JPN-BASE', 'EXPENSE', '41101000', '41100000', '役員報酬', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41102, 'JPN-BASE', 'EXPENSE', '41102000', '41100000', '役員賞与', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41103, 'JPN-BASE', 'EXPENSE', '41103000', '41100000', '給料手当', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41104, 'JPN-BASE', 'EXPENSE', '41104000', '41100000', '賞与', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41105, 'JPN-BASE', 'EXPENSE', '41105000', '41100000', '退職金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41106, 'JPN-BASE', 'EXPENSE', '41106000', '41100000', '法定福利費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41107, 'JPN-BASE', 'EXPENSE', '41107000', '41100000', '福利厚生費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41108, 'JPN-BASE', 'EXPENSE', '41108000', '41100000', '賞与引当金繰入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41109, 'JPN-BASE', 'EXPENSE', '41109000', '41100000', '退職給与引当金繰入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41110, 'JPN-BASE', 'EXPENSE', '41110000', '41100000', 'その他人件費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41111, 'JPN-BASE', 'EXPENSE', '41111000', '41100000', '雑給', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41112, 'JPN-BASE', 'EXPENSE', '41112000', '41100000', '従業員経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41200, 'JPN-BASE', 'EXPENSE', '41200000', '41000000', '販売直接費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41201, 'JPN-BASE', 'EXPENSE', '41201000', '41200000', '広告宣伝費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41202, 'JPN-BASE', 'EXPENSE', '41202000', '41200000', '運賃', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41203, 'JPN-BASE', 'EXPENSE', '41203000', '41200000', '販売手数料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41204, 'JPN-BASE', 'EXPENSE', '41204000', '41200000', '容器包装費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41205, 'JPN-BASE', 'EXPENSE', '41205000', '41200000', 'その他販売直接費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41300, 'JPN-BASE', 'EXPENSE', '41300000', '41000000', '一般管理費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41301, 'JPN-BASE', 'EXPENSE', '41301000', '41300000', '水道光熱費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41302, 'JPN-BASE', 'EXPENSE', '41302000', '41300000', '車両関連費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41303, 'JPN-BASE', 'EXPENSE', '41303000', '41300000', '事務用消耗品費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41304, 'JPN-BASE', 'EXPENSE', '41304000', '41300000', '消耗品費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41305, 'JPN-BASE', 'EXPENSE', '41305000', '41300000', '賃借料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41306, 'JPN-BASE', 'EXPENSE', '41306000', '41300000', '支払保険料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41307, 'JPN-BASE', 'EXPENSE', '41307000', '41300000', '修繕費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41308, 'JPN-BASE', 'EXPENSE', '41308000', '41300000', '租税公課', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41309, 'JPN-BASE', 'EXPENSE', '41309000', '41300000', '減価償却費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41310, 'JPN-BASE', 'EXPENSE', '41310000', '41300000', '接待交際費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41311, 'JPN-BASE', 'EXPENSE', '41311000', '41300000', '旅費交通費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41312, 'JPN-BASE', 'EXPENSE', '41312000', '41300000', '通信費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41313, 'JPN-BASE', 'EXPENSE', '41313000', '41300000', '支払手数料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41314, 'JPN-BASE', 'EXPENSE', '41314000', '41300000', '会議費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41315, 'JPN-BASE', 'EXPENSE', '41315000', '41300000', '諸会費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41316, 'JPN-BASE', 'EXPENSE', '41316000', '41300000', '寄付金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41317, 'JPN-BASE', 'EXPENSE', '41317000', '41300000', '図書教育費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41318, 'JPN-BASE', 'EXPENSE', '41318000', '41300000', '試験研究費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41319, 'JPN-BASE', 'EXPENSE', '41319000', '41300000', 'その他管理費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41320, 'JPN-BASE', 'EXPENSE', '41320000', '41300000', '貸倒引当金繰入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41321, 'JPN-BASE', 'EXPENSE', '41321000', '41300000', '銀行手数料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41322, 'JPN-BASE', 'EXPENSE', '41322000', '41300000', '現金差異', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41323, 'JPN-BASE', 'EXPENSE', '41323000', '41300000', '雑費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 41400, 'JPN-BASE', 'EXPENSE', '41400000', '41000000', '販管費配賦額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51000, 'JPN-BASE', 'OTHER_REVENUE', '51000000', '0', '営業外収益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51001, 'JPN-BASE', 'OTHER_REVENUE', '51010000', '51000000', '受取利息', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51002, 'JPN-BASE', 'OTHER_REVENUE', '51020000', '51000000', '受取配当金', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51003, 'JPN-BASE', 'OTHER_REVENUE', '51030000', '51000000', '銀行再評価益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51004, 'JPN-BASE', 'OTHER_REVENUE', '51040000', '51000000', '銀行決済利益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51005, 'JPN-BASE', 'OTHER_REVENUE', '51050000', '51000000', '手数料収益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51006, 'JPN-BASE', 'OTHER_REVENUE', '51060000', '51000000', 'その他営業外収益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51007, 'JPN-BASE', 'OTHER_REVENUE', '51070000', '51000000', '支払割引費科目', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51008, 'JPN-BASE', 'OTHER_REVENUE', '51080000', '51000000', '許可割引料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51009, 'JPN-BASE', 'OTHER_REVENUE', '51090000', '51000000', '現金出納帳受取', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51010, 'JPN-BASE', 'OTHER_REVENUE', '51100000', '51000000', '未実現利益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51011, 'JPN-BASE', 'OTHER_REVENUE', '51110000', '51000000', '実現利益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 51012, 'JPN-BASE', 'OTHER_REVENUE', '51120000', '51000000', '雑収入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52000, 'JPN-BASE', 'OTHER_EXPENSES', '52000000', '0', '営業外費用', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52001, 'JPN-BASE', 'OTHER_EXPENSES', '52010000', '52000000', '支払利息', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52002, 'JPN-BASE', 'OTHER_EXPENSES', '52020000', '52000000', '銀行再評価損', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52003, 'JPN-BASE', 'OTHER_EXPENSES', '52030000', '52000000', '銀行決済損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52004, 'JPN-BASE', 'OTHER_EXPENSES', '52040000', '52000000', '手数料経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52005, 'JPN-BASE', 'OTHER_EXPENSES', '52050000', '52000000', '手形売却損', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52006, 'JPN-BASE', 'OTHER_EXPENSES', '52060000', '52000000', 'その他営業外費用', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52007, 'JPN-BASE', 'OTHER_EXPENSES', '52070000', '52000000', '支払割引売上科目', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52008, 'JPN-BASE', 'OTHER_EXPENSES', '52080000', '52000000', '受取割引料', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52009, 'JPN-BASE', 'OTHER_EXPENSES', '52090000', '52000000', '貸倒損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52010, 'JPN-BASE', 'OTHER_EXPENSES', '52100000', '52000000', '現金出納帳経費', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52011, 'JPN-BASE', 'OTHER_EXPENSES', '52110000', '52000000', '未実現損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52012, 'JPN-BASE', 'OTHER_EXPENSES', '52120000', '52000000', '実現損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52013, 'JPN-BASE', 'OTHER_EXPENSES', '52130000', '52000000', '雑損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 52014, 'JPN-BASE', 'OTHER_EXPENSES', '52140000', '52000000', '営業外配賦額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 61000, 'JPN-BASE', 'EXTRAORDINALY_REVENUE', '61000000', '0', '特別利益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 61001, 'JPN-BASE', 'EXTRAORDINALY_REVENUE', '61100000', '61000000', '固定資産売却益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 61002, 'JPN-BASE', 'EXTRAORDINALY_REVENUE', '61200000', '61000000', '貸倒引当金戻入', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 61003, 'JPN-BASE', 'EXTRAORDINALY_REVENUE', '61300000', '61000000', 'その他特別利益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 61004, 'JPN-BASE', 'EXTRAORDINALY_REVENUE', '61400000', '61000000', '前期損益修正益', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 62000, 'JPN-BASE', 'EXTRAORDINALY_EXPENSES', '62000000', '0', '特別損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 62001, 'JPN-BASE', 'EXTRAORDINALY_EXPENSES', '62100000', '62000000', '固定資産売却除却損', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 62002, 'JPN-BASE', 'EXTRAORDINALY_EXPENSES', '62200000', '62000000', 'その他特別損失', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 62003, 'JPN-BASE', 'EXTRAORDINALY_EXPENSES', '62300000', '62000000', '前期損益修正損', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71100, 'JPN-BASE', 'INCOME_TAXES', '71100000', '0', '法人税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71101, 'JPN-BASE', 'INCOME_TAXES', '71110000', '71100000', '法人税等', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71102, 'JPN-BASE', 'INCOME_TAXES', '71120000', '71100000', '法人税等調整額', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81101, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81101000', '0', 'デフォルト勘定科目', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81102, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81102000', '0', '貸借不一致仮勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81103, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81103000', '0', 'エラー仮勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81104, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81104000', '0', '通貨貸借不一致仮勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81105, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81105000', '0', '損益勘定', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 81106, 'JPN-BASE', 'OTHER_INCOME_EXPENSES', '81106000', '0', '購入価格差異相殺', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 82101, 'JPN-BASE', 'MEMO', '82100000', '0', 'コミッション相殺', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 82102, 'JPN-BASE', 'MEMO', '82200000', '0', '販売コミッション相殺', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 82103, 'JPN-BASE', 'MEMO', '99999999', '0', '諸口', 1); diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index 67770ec337d..9aa28c116c8 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -123,6 +123,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_VALIDATE','Project validation','Executed when a project is validated','project',141); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_MODIFY','Project modified','Executed when a project is modified','project',142); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',143); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_SENTBYMAIL','Project sent by mail','Executed when a project is sent by email','project',144); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is modified','ticket',164); diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql index 38f09ba23d0..c244bcae2bd 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -21,7 +21,6 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- --- -- -- Do not put a comment at the end of the line, this file is parsed during the @@ -37,14 +36,6 @@ delete from llx_c_actioncomm where id in (1,2,3,4,5,6,8,9,10,11,30,31,40,50); --- Code used from 3.3+ when type of event is used -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 1, 'AC_TEL', 'Phone call', 'system', NULL, 1, 2); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 2, 'AC_FAX', 'Send Fax', 'system', NULL, 1, 3); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 4, 'AC_EMAIL', 'Send Email', 'system', NULL, 1, 4); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 5, 'AC_RDV', 'Rendez-vous', 'system', NULL, 1, 1); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 6, 'AC_EMAIL_IN', 'reception Email', 'system', NULL, 1, 4); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 11, 'AC_INT', 'Intervention on site', 'system', NULL, 1, 4); - -- Code kept for backward compatibility < 3.3 --insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 3, 'AC_PROP', 'Send commercial proposal by email', 'systemauto', 'propal', 0, 10); --insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 8, 'AC_COM', 'Send customer order by email', 'systemauto', 'order', 0, 8); @@ -53,10 +44,18 @@ insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) --insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 30, 'AC_SUP_ORD', 'Send supplier order by email', 'systemauto', 'order_supplier', 0, 9); --insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 31, 'AC_SUP_INV', 'Send supplier invoice by email', 'systemauto', 'invoice_supplier', 0, 7); +-- Code used from 3.3+ when type of event is used +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 1, 'AC_TEL', 'Phone call', 'system', NULL, 1, 2); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 2, 'AC_FAX', 'Send Fax', 'system', NULL, 0, 3); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 4, 'AC_EMAIL', 'Send Email', 'system', NULL, 0, 4); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 5, 'AC_RDV', 'Rendez-vous', 'system', NULL, 1, 1); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 6, 'AC_EMAIL_IN', 'Reception Email', 'system', NULL, 0, 4); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 11, 'AC_INT', 'Intervention on site', 'system', NULL, 1, 4); + -- Code used from 3.3+ when type of event is not used insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 40, 'AC_OTH_AUTO', 'Other (automatically inserted events)', 'systemauto', NULL, 1, 20); -insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 50, 'AC_OTH', 'Other (manually inserted events)', 'systemauto', NULL, 1, 5); +insert into llx_c_actioncomm (id, code, libelle, type, module, active, position) values ( 50, 'AC_OTH', 'Other (manually inserted events)', 'system', NULL, 1, 5); INSERT INTO llx_c_actioncomm (id, code, libelle, type, module, active, position) VALUES ( 60, 'AC_EO_ONLINECONF', 'Online/Virtual conference', 'module', 'conference@eventorganization', 1, 60); INSERT INTO llx_c_actioncomm (id, code, libelle, type, module, active, position) VALUES ( 61, 'AC_EO_INDOORCONF', 'Indoor conference', 'module', 'conference@eventorganization', 1, 61); diff --git a/htdocs/install/mysql/data/llx_c_effectif.sql b/htdocs/install/mysql/data/llx_c_effectif.sql index cb67da5d73c..f3c5b0cd03f 100644 --- a/htdocs/install/mysql/data/llx_c_effectif.sql +++ b/htdocs/install/mysql/data/llx_c_effectif.sql @@ -36,5 +36,5 @@ insert into llx_c_effectif (id,code,libelle) values (1, 'EF1-5', '1 - 5'); insert into llx_c_effectif (id,code,libelle) values (2, 'EF6-10', '6 - 10'); insert into llx_c_effectif (id,code,libelle) values (3, 'EF11-50', '11 - 50'); insert into llx_c_effectif (id,code,libelle) values (4, 'EF51-100', '51 - 100'); -insert into llx_c_effectif (id,code,libelle) values (5, 'EF100-500', '100 - 500'); +insert into llx_c_effectif (id,code,libelle) values (5, 'EF101-500', '101 - 500'); insert into llx_c_effectif (id,code,libelle) values (6, 'EF500-', '> 500'); diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 7baa5007b3d..c35824fa235 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -403,3 +403,36 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (76, '7608', ' INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (76, '7609', 'Državno tijelo'); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (76, '7610', 'Kućna radinost'); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (76, '7611', 'Sporedno zanimanje'); + +-- Japan (id country=123) +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12301', '株式会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12302', '有限会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12303', '合資会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12304', '合名会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12305', '相互会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12306', '医療法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12307', '財団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12308', '社団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12309', '社会福祉法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12310', '学校法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12311', '特定非営利活動法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12312', 'NPO法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12313', '商工組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12314', '林業組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12315', '同業組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12316', '農業協同組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12317', '漁業協同組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12318', '農事組合法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12319', '生活互助会'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12320', '協業組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12321', '協同組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12322', '生活協同組合'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12323', '連合会'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12324', '組合連合会'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12325', '協同組合連合会'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12329', '一般社団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12330', '公益社団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12331', '一般財団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12332', '公益財団法人'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12333', '合同会社'); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (123, '12399', '個人又はその他の法人'); diff --git a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql index 80f59680df5..a8e9ac3be80 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql @@ -47,6 +47,16 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('FR-ASCENSION', 0, 1, 'ascension', 0, 0, 0, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('FR-PENTECOST', 0, 1, 'pentecost', 0, 0, 0, 1); +-- Belgium only (2) +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-VICTORYDAY', 0, 2, '', 0, 5, 8, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-NATIONALDAY', 0, 2, '', 0, 7, 21, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ASSOMPTION', 0, 2, '', 0, 8, 15, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-TOUSSAINT', 0, 2, '', 0, 11, 1, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ARMISTICE', 0, 2, '', 0, 11, 11, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-EASTER', 0, 2, 'eastermonday', 0, 0, 0, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ASCENSION', 0, 2, 'ascension', 0, 0, 0, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-PENTECOST', 0, 2, 'pentecost', 0, 0, 0, 1); + -- Italy (3) INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day, active) VALUES('IT-LIBEAZIONE', 0, 3, 0, 4, 25, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day, active) VALUES('IT-EPIPHANY', 0, 3, 0, 6, 1, 1); diff --git a/htdocs/install/mysql/data/llx_c_paiement.sql b/htdocs/install/mysql/data/llx_c_paiement.sql index a266070da2b..2e0bd71f389 100644 --- a/htdocs/install/mysql/data/llx_c_paiement.sql +++ b/htdocs/install/mysql/data/llx_c_paiement.sql @@ -45,7 +45,7 @@ insert into llx_c_paiement (id,code,libelle,type,active) values (53, 'FAC', 'Fac -- Payment services INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (100, 'KLA', 'Klarna', 1, 0); INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (101, 'SOF', 'Sofort', 1, 0); -INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (102, 'BAN', 'Bancontact', 1, 0); +INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (102, 'BANCON', 'Bancontact', 1, 0); INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (103, 'IDE', 'iDeal', 1, 0); INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (104, 'GIR', 'Giropay', 1, 0); INSERT INTO llx_c_paiement (id,code,libelle,type,active) values (105, 'PPL', 'PayPal', 1, 0); diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index 61c7336f48b..06463207069 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -35,7 +35,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show: -1=stable+deprecated, 0=stable only (default), 1=stable+experimental, 2=stable+experimental+development',1,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAILING_LIMIT_SENDBYWEB','25','chaine','Number of targets to defined packet size when sending mass email',1,0); -insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_LOG_TO_HTML','0','chaine','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. Module log must also be enabled.',1,0); +--insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_LOG_TO_HTML','0','chaine','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. Module log must also be enabled.',1,0); -- Hidden and common to all entities insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_HANDLERS','["mod_syslog_file"]','chaine','Which logger to use',0,0); diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index a632a32271b..4a48e8b97fd 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -568,6 +568,7 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64) DEFAULT NULL; ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging varchar(64) DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT; ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL; diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 44b1a6b5185..b335cf7f3f6 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -87,6 +87,7 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', ' ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL; -- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real; +-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT; -- For v14 diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index a945f078bbb..7eb3403e3ed 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -38,6 +38,7 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL; -- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real; +-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL; diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index 7c38fb59b6d..d5deec862d0 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -738,6 +738,8 @@ ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0; ALTER TABLE llx_loan_schedule ADD UNIQUE INDEX uk_loan_schedule_ref (fk_loan, datep); +-- We need when upgrade 15 to 16 with Dolibarr v17+ for upgrade2 function migrate_user_photospath2() +ALTER TABLE llx_user CHANGE COLUMN note note_private text; -- Bank Thirdparty diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql new file mode 100644 index 00000000000..228fde598bb --- /dev/null +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -0,0 +1,391 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 16.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table; +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex; +-- To make pk to be auto increment (mysql): +-- -- VMYSQL4.3 ALTER TABLE llx_table ADD PRIMARY KEY(rowid); +-- -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. +-- To rebuild sequence for postgresql after insert by forcing id autoincrement fields: +-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); + + +-- Missing in v16 or lower + +ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32) NOT NULL; + +ALTER TABLE llx_c_action_trigger MODIFY elementtype VARCHAR(64); + +ALTER TABLE llx_c_email_templates ADD COLUMN joinfiles text; +ALTER TABLE llx_c_email_templates ADD COLUMN email_from varchar(255); +ALTER TABLE llx_c_email_templates ADD COLUMN email_to varchar(255); +ALTER TABLE llx_c_email_templates ADD COLUMN email_tocc varchar(255); +ALTER TABLE llx_c_email_templates ADD COLUMN email_tobcc varchar(255); +ALTER TABLE llx_c_email_templates ADD COLUMN content_lines text; +ALTER TABLE llx_c_email_templates ADD COLUMN enabled varchar(255) DEFAULT '1'; + +ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0; + +ALTER TABLE llx_user DROP COLUMN idpers1; +ALTER TABLE llx_user DROP COLUMN idpers2; +ALTER TABLE llx_user DROP COLUMN idpers3; + +UPDATE llx_c_actioncomm SET type = 'system' WHERE code = 'AC_OTH'; + +ALTER TABLE llx_opensurvey_user_studs MODIFY reponses VARCHAR(200) NOT NULL; + +-- v17 + +ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_type varchar(32); + +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_percent (percent); + +UPDATE llx_c_paiement SET code = 'BANCON' WHERE code = 'BAN' AND libelle = 'Bancontact'; + +-- VMYSQL4.3 ALTER TABLE llx_partnership MODIFY COLUMN fk_user_creat integer NULL; +-- VPGSQL8.2 ALTER TABLE llx_partnership ALTER COLUMN fk_user_creat DROP NOT NULL; + +ALTER TABLE llx_partnership ADD COLUMN ip varchar(250); +ALTER TABLE llx_adherent ADD COLUMN ip varchar(250); +ALTER TABLE llx_projet ADD COLUMN ip varchar(250); +ALTER TABLE llx_actioncomm ADD COLUMN ip varchar(250); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN ip varchar(250); +ALTER TABLE llx_opensurvey_user_studs ADD COLUMN ip varchar(250); +ALTER TABLE llx_opensurvey_comments ADD COLUMN ip varchar(250); + +ALTER TABLE llx_fichinterdet_rec DROP COLUMN remise; +ALTER TABLE llx_fichinterdet_rec DROP COLUMN fk_export_commpta; + +UPDATE llx_const set name = 'ADHERENT_MAILMAN_ADMIN_PASSWORD' WHERE name = 'ADHERENT_MAILMAN_ADMINPW'; + +ALTER TABLE llx_oauth_token ADD COLUMN state text after tokenstring; + +ALTER TABLE llx_adherent ADD COLUMN default_lang VARCHAR(6) DEFAULT NULL AFTER datefin; + +ALTER TABLE llx_adherent_type ADD COLUMN caneditamount integer DEFAULT 0 AFTER amount; + +ALTER TABLE llx_holiday CHANGE COLUMN date_approve date_approval datetime; + +UPDATE llx_holiday SET date_approval = date_valid WHERE statut = 3 AND date_approval IS NULL; +UPDATE llx_holiday SET fk_user_approve = fk_user_valid WHERE statut = 3 AND fk_user_approve IS NULL; + +ALTER TABLE llx_inventory ADD COLUMN categories_product VARCHAR(255) DEFAULT NULL AFTER fk_product; + +ALTER TABLE llx_societe ADD last_main_doc VARCHAR(255) NULL AFTER model_pdf; + +ALTER TABLE llx_emailcollector_emailcollector MODIFY COLUMN lastresult text; +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN port varchar(10) DEFAULT '993'; +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN acces_type integer DEFAULT 0; +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN oauth_service varchar(128) DEFAULT NULL; + + +ALTER TABLE llx_bank ADD COLUMN position integer DEFAULT 0; + +ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product); + +INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT', 1, 1000, 'int', 0); + +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN port varchar(10) DEFAULT '993'; + +ALTER TABLE llx_facture ADD COLUMN close_missing_amount double(24, 8) after close_code; + +ALTER TABLE llx_facture_fourn ADD COLUMN close_missing_amount double(24, 8) after close_code; + +ALTER TABLE llx_inventory ADD COLUMN categories_product VARCHAR(255) DEFAULT NULL AFTER fk_product; + +ALTER TABLE llx_product ADD COLUMN sell_or_eat_by_mandatory tinyint DEFAULT 0 NOT NULL AFTER tobatch; + -- Make sell-by or eat-by date mandatory + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD email_date datetime after email_msgid; + +ALTER TABLE llx_ticket ADD COLUMN ip varchar(250); + +ALTER TABLE llx_ticket ADD email_date datetime after email_msgid; + +ALTER TABLE llx_ticket MODIFY COLUMN message mediumtext; + +ALTER TABLE llx_cronjob ADD COLUMN pid integer; + +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-VICTORYDAY', 0, 2, '', 0, 5, 8, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-NATIONALDAY', 0, 2, '', 0, 7, 21, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ASSOMPTION', 0, 2, '', 0, 8, 15, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-TOUSSAINT', 0, 2, '', 0, 11, 1, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ARMISTICE', 0, 2, '', 0, 11, 11, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-EASTER', 0, 2, 'eastermonday', 0, 0, 0, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-ASCENSION', 0, 2, 'ascension', 0, 0, 0, 1); +INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('BE-PENTECOST', 0, 2, 'pentecost', 0, 0, 0, 1); + +ALTER TABLE llx_societe_rib ADD COLUMN state_id integer AFTER default_rib; +ALTER TABLE llx_societe_rib ADD COLUMN fk_country integer AFTER state_id; +ALTER TABLE llx_societe_rib ADD COLUMN currency_code varchar(3) AFTER fk_country; + +ALTER TABLE llx_user_rib ADD COLUMN state_id integer AFTER owner_address; +ALTER TABLE llx_user_rib ADD COLUMN fk_country integer AFTER state_id; +ALTER TABLE llx_user_rib ADD COLUMN currency_code varchar(3) AFTER fk_country; + +CREATE TABLE llx_bank_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) +)ENGINE=innodb; + +ALTER TABLE llx_bank_extrafields ADD INDEX idx_bank_extrafields (fk_object); + +ALTER TABLE llx_product_lot ADD COLUMN note_public text DEFAULT NULL after batch; +ALTER TABLE llx_product_lot ADD COLUMN note_private text DEFAULT NULL after note_public; + +ALTER TABLE llx_user CHANGE COLUMN note note_private text; + +UPDATE llx_c_effectif SET code='EF101-500', libelle='101 - 500' WHERE code='EF100-500'; + + +ALTER TABLE llx_product ADD COLUMN fk_default_workstation integer DEFAULT NULL; +ALTER TABLE llx_bom_bomline ADD COLUMN fk_unit integer DEFAULT NULL; + +ALTER TABLE llx_rights_def ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +UPDATE llx_establishment SET name='' WHERE name IS NULL; +ALTER TABLE llx_establishment CHANGE name label varchar(255) NOT NULL; + +ALTER TABLE llx_don ADD UNIQUE INDEX idx_don_uk_ref (ref, entity); + +ALTER TABLE llx_don ADD INDEX idx_don_fk_soc (fk_soc); +ALTER TABLE llx_don ADD INDEX idx_don_fk_project (fk_projet); +ALTER TABLE llx_don ADD INDEX idx_don_fk_user_author (fk_user_author); +ALTER TABLE llx_don ADD INDEX idx_don_fk_user_valid (fk_user_valid); + +ALTER TABLE llx_commande ADD COLUMN revenuestamp double(24,8) DEFAULT 0 after localtax2; + +create table llx_element_categorie +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_categorie integer NOT NULL, + fk_element integer NOT NULL, + import_key varchar(14) +)ENGINE=innodb; + +ALTER TABLE llx_element_categorie ADD UNIQUE INDEX idx_element_categorie_idx (fk_element, fk_categorie); + +ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_categorie(rowid); + +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('PROJECT_SENTBYMAIL','Project sent by mail','Executed when a project is sent by email','project',144); + +ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_lastname (lastname); + +ALTER TABLE llx_societe ADD INDEX idx_societe_nom(nom); + +ALTER TABLE llx_extrafields MODIFY COLUMN fielddefault text; + +ALTER TABLE llx_bank_url ADD INDEX idx_bank_url_url_id (url_id); + +ALTER TABLE llx_societe_remise_except ADD COLUMN multicurrency_code varchar(3) NULL; +ALTER TABLE llx_societe_remise_except ADD COLUMN multicurrency_tx double(24,8) NULL; + +-- VMYSQL4.3 ALTER TABLE llx_hrm_evaluationdet CHANGE COLUMN `rank` rankorder integer; +-- VPGSQL8.2 ALTER TABLE llx_hrm_evaluationdet CHANGE COLUMN rank rankorder integer; + + +-- Rename const to hide public and private notes (fix allow notes const was used to hide) +UPDATE llx_const SET name = 'MAIN_LIST_HIDE_PUBLIC_NOTES' WHERE name = 'MAIN_LIST_ALLOW_PUBLIC_NOTES'; +UPDATE llx_const SET name = 'MAIN_LIST_HIDE_PRIVATE_NOTES' WHERE name = 'MAIN_LIST_ALLOW_PRIVATE_NOTES'; + + +ALTER TABLE llx_projet ADD COLUMN date_start_event datetime; +ALTER TABLE llx_projet ADD COLUMN date_end_event datetime; +ALTER TABLE llx_projet ADD COLUMN location varchar(255); + + +ALTER TABLE llx_c_action_trigger MODIFY COLUMN code varchar(128); + +ALTER TABLE llx_overwrite_trans DROP INDEX uk_overwrite_trans; +ALTER TABLE llx_overwrite_trans ADD UNIQUE INDEX uk_overwrite_trans(entity, lang, transkey); + +-- +-- List of all managed triggered events (used for trigger agenda automatic events and for notification) +-- + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_MODIFY','Customer proposal modified','Executed when a customer proposal is modified','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_DELETE','Customer proposal deleted','Executed when a customer proposal is deleted','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_CLOSE','Customer order classify delivered','Executed when a customer order is set delivered','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_MODIFY','Customer order modified','Executed when a customer order is set modified','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_CLASSIFY_BILLED','Customer order classify billed','Executed when a customer order is set to billed','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_CANCEL','Customer order canceled','Executed when a customer order is canceled','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_DELETE','Customer order deleted','Executed when a customer order is deleted','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_MODIFY','Customer invoice modified','Executed when a customer invoice is modified','facture',7); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',9); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_DELETE','Customer invoice deleted','Executed when a customer invoice is deleted','facture',9); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_VALIDATE','Price request validated','Executed when a commercial proposal is validated','proposal_supplier',10); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_MODIFY','Price request modified','Executed when a commercial proposal is modified','proposal_supplier',10); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_SENTBYMAIL','Price request sent by mail','Executed when a commercial proposal is sent by mail','proposal_supplier',10); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('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 (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10); +--insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CREATE','Supplier order created','Executed when a supplier order is created','order_supplier',11); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',12); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_MODIFY','Supplier order request modified','Executed when a supplier order is modified','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CANCEL','Supplier order request canceled','Executed when a supplier order is canceled','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_MODIFY','Supplier invoice modified','Executed when a supplier invoice is modified','invoice_supplier',15); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_DELETE','Supplier invoice deleted','Executed when a supplier invoice is deleted','invoice_supplier',17); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_MODIFY','Contract modified','Executed when a contract is modified','contrat',18); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_SENTBYMAIL','Contract sent by mail','Executed when a contract is sent by mail','contrat',18); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_DELETE','Contract deleted','Executed when a contract is deleted','contrat',18); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_MODIFY','Shipping modified','Executed when a shipping is modified','shipping',20); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_DELETE','Shipping sent is deleted','Executed when a shipping is deleted','shipping',21); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECEPTION_VALIDATE','Reception validated','Executed when a reception is validated','reception',22); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECEPTION_SENTBYMAIL','Reception sent by mail','Executed when a reception is sent by mail','reception',22); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_MODIFY','Member modified','Executed when a member is modified','member',23); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SUBSCRIPTION_CREATE','Member subscribtion recorded','Executed when a member subscribtion is deleted','member',24); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SUBSCRIPTION_MODIFY','Member subscribtion modified','Executed when a member subscribtion is modified','member',24); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SUBSCRIPTION_DELETE','Member subscribtion deleted','Executed when a member subscribtion is deleted','member',24); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',25); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',26); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_EXCLUDE','Member excluded','Executed when a member is excluded','member',27); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',30); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_MODIFY','Intervention modify','Executed when a intervention is modify','ficheinter',30); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_CLASSIFY_BILLED','Intervention set billed','Executed when a intervention is set to billed (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',32); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_CLASSIFY_UNBILLED','Intervention set unbilled','Executed when a intervention is set to unbilled (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',33); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',34); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',35); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_DELETE','Intervention is deleted','Executed when a intervention is deleted','ficheinter',35); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',40); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',41); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',42); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_MODIFY','Expense report modified','Executed when an expense report is modified','expensereport',202); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',211); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_MODIFY','Expense report modified','Executed when an expense report is modified','expensereport',212); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',212); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_CREATE','Project creation','Executed when a project is created','project',140); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_VALIDATE','Project validation','Executed when a project is validated','project',141); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_MODIFY','Project modified','Executed when a project is modified','project',142); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',143); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_SENTBYMAIL','Project sent by mail','Executed when a project is sent by email','project',144); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is modified','ticket',164); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_CLOSE','Ticket closed','Executed when a ticket is closed','ticket',165); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_SENTBYMAIL','Ticket message sent by email','Executed when a message is sent from the ticket record','ticket',166); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',167); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_CREATE','User created','Executed when a user is created','user',301); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_MODIFY','User update','Executed when a user is updated','user',302); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_DELETE','User update','Executed when a user is deleted','user',303); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_NEW_PASSWORD','User update','Executed when a user is change password','user',304); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_ENABLEDISABLE','User update','Executed when a user is enable or disable','user',305); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_MODIFY','Intervention modified','Executed when a intervention is modified','ficheinter',19); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',650); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',651); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','mrp',660); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','mrp',661); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','mrp',662); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','mrp',663); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact address record','contact',52); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',53); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516); + +-- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...) +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',150); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',152); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ACTION_CREATE','Action added','Executed when an action is added to the agenda','agenda',700); + +-- holiday +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CREATE','Holiday created','Executed when a holiday is created','holiday',800); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_MODIFY','Holiday modified','Executed when a holiday is modified','holiday',801); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Holiday validated','Executed when a holiday is validated','holiday',802); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Holiday aprouved','Executed when a holiday is aprouved','holiday',803); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CANCEL','Holiday canceled','Executed when a holiday is canceled','holiday',802); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_DELETE','Holiday deleted','Executed when a holiday is deleted','holiday',804); + +-- facture rec +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_CREATE','Template invoices created','Executed when a Template invoices is created','facturerec',900); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_MODIFY','Template invoices update','Executed when a Template invoices is updated','facturerec',901); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_DELETE','Template invoices deleted','Executed when a Template invoices is deleted','facturerec',902); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_AUTOCREATEBILL','Template invoices use to create invoices with auto batch','Executed when a Template invoices is use to create invoice with auto batch','facturerec',903); + + +ALTER TABLE llx_prelevement_facture RENAME TO llx_prelevement; +ALTER TABLE llx_prelevement_facture_demande RENAME TO llx_prelevement_demande; + +ALTER TABLE llx_prelevement ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn; +ALTER TABLE llx_prelevement_demande ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn; + +ALTER TABLE llx_user ADD COLUMN birth_place varchar(64); + +ALTER TABLE llx_opensurvey_user_studs ADD COLUMN date_creation datetime NULL; +ALTER TABLE llx_opensurvey_comments ADD COLUMN date_creation datetime NULL; + +ALTER TABLE llx_c_tva ADD COLUMN use_default tinyint DEFAULT 0; + diff --git a/htdocs/install/mysql/tables/llx_actioncomm.key.sql b/htdocs/install/mysql/tables/llx_actioncomm.key.sql index ee16386c7c4..944471620ae 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.key.sql @@ -27,5 +27,6 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep (datep); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep2 (datep2); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext); +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_percent (percent); ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity); diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index d4d0b65ef25..a64513d5d9e 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -80,6 +80,8 @@ create table llx_actioncomm fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...) elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...) + ip varchar(250), --ip used to create record (for public submission page) + import_key varchar(14), extraparams varchar(255) -- for other parameters with json format )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 01a87167411..a91de4c65df 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -71,6 +71,7 @@ create table llx_adherent statut smallint NOT NULL DEFAULT 0, public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? datefin datetime, -- end date of validity of the contribution / date de fin de validite de la cotisation + default_lang varchar(6) DEFAULT NULL, note_private text DEFAULT NULL, note_public text DEFAULT NULL, model_pdf varchar(255), @@ -81,5 +82,6 @@ create table llx_adherent fk_user_mod integer, fk_user_valid integer, canvas varchar(32), -- type of canvas if used (null by default) + ip varchar(250), -- ip used to create record (for public membership submission page) import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 4144d9b32b7..3473798a6ea 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -34,6 +34,7 @@ create table llx_adherent_type duration varchar(6) DEFAULT NULL, -- (minimal) duration of membership subscription varchar(3) NOT NULL DEFAULT '1', -- subscription with costs / fee or without / for free amount double(24,8) DEFAULT NULL, -- membership fee + caneditamount integer DEFAULT 0, -- can member edit the amount of subscription vote varchar(3) NOT NULL DEFAULT '1', -- entitled to vote note text, -- description / comment mail_valid text -- text for welcome email diff --git a/htdocs/install/mysql/tables/llx_bank.sql b/htdocs/install/mysql/tables/llx_bank.sql index d0a8e34790b..9a1b12d5754 100644 --- a/htdocs/install/mysql/tables/llx_bank.sql +++ b/htdocs/install/mysql/tables/llx_bank.sql @@ -37,6 +37,7 @@ create table llx_bank rappro tinyint default 0, note text, fk_bordereau integer DEFAULT 0, + position integer DEFAULT 0, banque varchar(255), -- banque pour les cheques emetteur varchar(255), -- emetteur du cheque author varchar(40), -- a supprimer apres migration diff --git a/htdocs/install/mysql/tables/llx_bank_extrafields.key.sql b/htdocs/install/mysql/tables/llx_bank_extrafields.key.sql new file mode 100644 index 00000000000..3d308e79684 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bank_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2022 Frédéric France +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +ALTER TABLE llx_bank_extrafields ADD INDEX idx_bank_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_bank_extrafields.sql b/htdocs/install/mysql/tables/llx_bank_extrafields.sql new file mode 100644 index 00000000000..3ca4f7a84d4 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bank_extrafields.sql @@ -0,0 +1,25 @@ +-- =================================================================== +-- Copyright (C) 2022 Frédéric France +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + +CREATE TABLE llx_bank_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bank_url.key.sql b/htdocs/install/mysql/tables/llx_bank_url.key.sql index ff8fc50b768..97e6cd2997f 100644 --- a/htdocs/install/mysql/tables/llx_bank_url.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_url.key.sql @@ -18,3 +18,6 @@ ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type); + +ALTER TABLE llx_bank_url ADD INDEX idx_bank_url_url_id (url_id); + diff --git a/htdocs/install/mysql/tables/llx_bom_bomline.sql b/htdocs/install/mysql/tables/llx_bom_bomline.sql index e7eae15fc15..eae1f6c6662 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline.sql @@ -25,6 +25,7 @@ CREATE TABLE llx_bom_bomline( qty_frozen smallint DEFAULT 0, disable_stock_change smallint DEFAULT 0, efficiency double(24,8) NOT NULL DEFAULT 1, + fk_unit integer NULL, position integer NOT NULL DEFAULT 0 -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.key.sql b/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.key.sql new file mode 100644 index 00000000000..3850933f5df --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.key.sql @@ -0,0 +1,28 @@ +-- Copyright (C) 2022 Alice Adminson +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_bookcal_availabilities ADD INDEX idx_bookcal_availabilities_rowid (rowid); +ALTER TABLE llx_bookcal_availabilities ADD INDEX idx_bookcal_availabilities_ref (ref); +ALTER TABLE llx_bookcal_availabilities ADD CONSTRAINT llx_bookcal_availabilities_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_bookcal_availabilities ADD INDEX idx_bookcal_availabilities_status (status); +ALTER TABLE llx_bookcal_availabilities ADD INDEX idx_bookcal_availabilities_type (type); +-- END MODULEBUILDER INDEXES + +--ALTER TABLE llx_bookcal_availabilities ADD UNIQUE INDEX uk_bookcal_availabilities_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_bookcal_availabilities ADD CONSTRAINT llx_bookcal_availabilities_fk_field FOREIGN KEY (fk_field) REFERENCES llx_bookcal_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.sql new file mode 100644 index 00000000000..8c8625e10cb --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal.sql @@ -0,0 +1,44 @@ +-- Copyright (C) 2022 Alice Adminson +-- +-- 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 https://www.gnu.org/licenses/. + + +CREATE TABLE llx_bookcal_availabilities( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) NOT NULL, + label varchar(255), + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer NOT NULL, + start date NOT NULL, + end date NOT NULL, + type integer NOT NULL, + duration integer DEFAULT 30 NOT NULL, + startHour integer NOT NULL, + endHour integer NOT NULL + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; + + +SELECT * FROM llx_bookcal_availabilities +WHERE rowid = 1; diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.key.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.key.sql new file mode 100644 index 00000000000..548307e4356 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.key.sql @@ -0,0 +1,29 @@ +-- Copyright (C) 2022 Alice Adminson +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_bookcal_booking ADD INDEX idx_bookcal_booking_rowid (rowid); +ALTER TABLE llx_bookcal_booking ADD INDEX idx_bookcal_booking_ref (ref); +ALTER TABLE llx_bookcal_booking ADD INDEX idx_bookcal_booking_fk_soc (fk_soc); +ALTER TABLE llx_bookcal_booking ADD INDEX idx_bookcal_booking_fk_project (fk_project); +ALTER TABLE llx_bookcal_booking ADD CONSTRAINT llx_bookcal_booking_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_bookcal_booking ADD INDEX idx_bookcal_booking_status (status); +-- END MODULEBUILDER INDEXES + +--ALTER TABLE llx_bookcal_booking ADD UNIQUE INDEX uk_bookcal_booking_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_bookcal_booking ADD CONSTRAINT llx_bookcal_booking_fk_field FOREIGN KEY (fk_field) REFERENCES llx_bookcal_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql new file mode 100644 index 00000000000..df3f6384d23 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql @@ -0,0 +1,40 @@ +-- Copyright (C) 2022 Alice Adminson +-- +-- 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 https://www.gnu.org/licenses/. + + +CREATE TABLE llx_bookcal_booking( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) NOT NULL, + fk_soc integer, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer NOT NULL, + firstname varchar(128) NOT NULL, + lastname varchar(128) NOT NULL, + email varchar(128) NOT NULL, + start datetime NOT NULL, + duration integer NOT NULL + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.sql index 8f7450d0fe9..be1c8580541 100644 --- a/htdocs/install/mysql/tables/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/tables/llx_c_action_trigger.sql @@ -23,7 +23,7 @@ create table llx_c_action_trigger ( rowid integer AUTO_INCREMENT PRIMARY KEY, elementtype varchar(64) NOT NULL, - code varchar(64) NOT NULL, + code varchar(128) NOT NULL, label varchar(128) NOT NULL, description varchar(255), rang integer DEFAULT 0 diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index b9a6cc4e12c..9bc77bb69ea 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -28,6 +28,7 @@ create table llx_c_tva localtax1_type varchar(10) NOT NULL DEFAULT '0', localtax2 varchar(20) NOT NULL DEFAULT '0', localtax2_type varchar(10) NOT NULL DEFAULT '0', + use_default tinyint DEFAULT 0, -- set to 1 to be the default vat when no vat defined on product recuperableonly integer NOT NULL DEFAULT 0, note varchar(128), active tinyint DEFAULT 1 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index 94b1f38227d..67712178bd3 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -26,7 +26,6 @@ create table llx_commande entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (deprecated) ref_client varchar(255), -- reference for customer fk_soc integer NOT NULL, @@ -47,11 +46,14 @@ create table llx_commande remise_percent real default 0, remise_absolue real default 0, remise real default 0, + total_tva double(24,8) default 0, - localtax1 double(24,8) default 0, -- total localtax1 - localtax2 double(24,8) default 0, -- total localtax2 + localtax1 double(24,8) default 0, -- total localtax1 + localtax2 double(24,8) default 0, -- total localtax2 + revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp (usefull for proforma that must match invoice) total_ht double(24,8) default 0, total_ttc double(24,8) default 0, + note_private text, note_public text, model_pdf varchar(255), diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql index 9049cf57065..62d62a2ec38 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql @@ -19,3 +19,4 @@ ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande); ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_reception (fk_reception); ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid); +ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product); diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql index 974e10c09ff..058a74eea19 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql @@ -17,6 +17,10 @@ -- This table is just an history table to track all receiving done for a -- particular supplier order. A movement with same information is also done -- into stock_movement so this table may be useless. +-- +-- Detail of each lines of a reception (qty, batch and into wich warehouse is +-- received a purchase order line). +-- This table should be also name llx_receptiondet. -- =================================================================== create table llx_commande_fournisseur_dispatch diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index 27e8a31cc9a..012801c28bb 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -47,6 +47,7 @@ CREATE TABLE llx_cronjob autodelete integer DEFAULT 0, -- 0=Job is kept unchanged once nbrun > maxrun or date > dateend, 2=Job must be archived (archive = status 2) once nbrun > maxrun or date > dateend status integer NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled, 2=archived processing integer NOT NULL DEFAULT 0, -- 1=process currently running + pid integer, -- The cronjob PID, NULL if not in processing test varchar(255) DEFAULT '1', fk_user_author integer DEFAULT NULL, fk_user_mod integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_delivery.sql b/htdocs/install/mysql/tables/llx_delivery.sql index 8216b5cf145..d1e7f4b42c2 100644 --- a/htdocs/install/mysql/tables/llx_delivery.sql +++ b/htdocs/install/mysql/tables/llx_delivery.sql @@ -26,7 +26,6 @@ create table llx_delivery fk_soc integer NOT NULL, ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_customer varchar(255), -- customer number date_creation datetime, -- date de creation diff --git a/htdocs/install/mysql/tables/llx_don-don.key.sql b/htdocs/install/mysql/tables/llx_don-don.key.sql new file mode 100644 index 00000000000..2aef1dbd5be --- /dev/null +++ b/htdocs/install/mysql/tables/llx_don-don.key.sql @@ -0,0 +1,29 @@ +-- =================================================================== +-- Copyright (C) 2022 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +ALTER TABLE llx_don ADD UNIQUE INDEX idx_don_uk_ref (ref, entity); + +ALTER TABLE llx_don ADD INDEX idx_don_fk_soc (fk_soc); +ALTER TABLE llx_don ADD INDEX idx_don_fk_project (fk_project); +ALTER TABLE llx_don ADD INDEX idx_don_fk_user_author (fk_user_author); +ALTER TABLE llx_don ADD INDEX idx_don_fk_user_valid (fk_user_valid); + +--ALTER TABLE llx_don ADD CONSTRAINT fk_don_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +--ALTER TABLE llx_don ADD CONSTRAINT fk_don_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); +--ALTER TABLE llx_don ADD CONSTRAINT fk_don_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid); diff --git a/htdocs/install/mysql/tables/llx_element_tag.key.sql b/htdocs/install/mysql/tables/llx_element_categorie.key.sql similarity index 72% rename from htdocs/install/mysql/tables/llx_element_tag.key.sql rename to htdocs/install/mysql/tables/llx_element_categorie.key.sql index d3a0b38afa9..9bc70cf0863 100644 --- a/htdocs/install/mysql/tables/llx_element_tag.key.sql +++ b/htdocs/install/mysql/tables/llx_element_categorie.key.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2021 Maxime Kohlhaas +-- Copyright (C) 2022 Charlene 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 @@ -16,6 +16,7 @@ -- -- ============================================================================ -ALTER TABLE llx_element_tag ADD UNIQUE INDEX idx_element_tag_uk (fk_categorie, fk_element); -ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); +ALTER TABLE llx_element_categorie ADD UNIQUE INDEX idx_element_categorie_idx (fk_element, fk_categorie); + +ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_categorie(rowid); diff --git a/htdocs/install/mysql/tables/llx_element_tag.sql b/htdocs/install/mysql/tables/llx_element_categorie.sql similarity index 90% rename from htdocs/install/mysql/tables/llx_element_tag.sql rename to htdocs/install/mysql/tables/llx_element_categorie.sql index d43ced98130..a1c7fddb0eb 100644 --- a/htdocs/install/mysql/tables/llx_element_tag.sql +++ b/htdocs/install/mysql/tables/llx_element_categorie.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2021 Maxime Kohlhaas +-- Copyright (C) 2022 charlene 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 @@ -16,7 +16,7 @@ -- -- ============================================================================ -create table llx_element_tag +create table llx_element_categorie ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_categorie integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index b62a9b6ba7f..4119e7aac08 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -16,30 +16,33 @@ CREATE TABLE llx_emailcollector_emailcollector( -- BEGIN MODULEBUILDER FIELDS - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - entity integer DEFAULT 1 NOT NULL, + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + entity integer DEFAULT 1 NOT NULL, ref varchar(128) NOT NULL, - label varchar(255), + label varchar(255), description text, host varchar(255), + port varchar(10) DEFAULT '993', hostcharset varchar(16) DEFAULT 'UTF-8', - login varchar(128), + login varchar(128), + acces_type integer DEFAULT 0, + oauth_service varchar(128), password varchar(128), - source_directory varchar(255) NOT NULL, + source_directory varchar(255) DEFAULT 'Inbox' NOT NULL, target_directory varchar(255), maxemailpercollect integer DEFAULT 100, - datelastresult datetime, - codelastresult varchar(16), - lastresult varchar(255), + datelastresult datetime, + codelastresult varchar(16), + lastresult text, datelastok datetime, - note_public text, - note_private text, - date_creation datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, - fk_user_modif integer, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, position INTEGER NOT NULL DEFAULT 0, - import_key varchar(14), + import_key varchar(14), status integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index 0e951e93c5a..a3542f6d9d6 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -22,8 +22,8 @@ CREATE TABLE llx_establishment ( rowid integer NOT NULL auto_increment PRIMARY KEY, entity integer NOT NULL DEFAULT 1, - label varchar(255), ref varchar(30), + label varchar(255) NOT NULL, name varchar(128), address varchar(255), zip varchar(25), diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql index 973c738a076..0b5654ff3de 100644 --- a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql @@ -35,6 +35,7 @@ CREATE TABLE llx_eventorganization_conferenceorboothattendee( fk_user_creat integer, fk_user_modif integer, last_main_doc varchar(255), + ip varchar(250), --ip used to create record (for public submission page) import_key varchar(14), model_pdf varchar(255), status smallint NOT NULL diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 4214fef7f44..f61ab8224f0 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -29,7 +29,6 @@ create table llx_expedition fk_projet integer DEFAULT NULL, ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_customer varchar(255), -- customer number date_creation datetime, -- date de creation diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 33a317d4abd..37deb0a227a 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -27,7 +27,7 @@ create table llx_extrafields type varchar(8), size varchar(8) DEFAULT NULL, fieldcomputed text, - fielddefault varchar(255), + fielddefault text, fieldunique integer DEFAULT 0, fieldrequired integer DEFAULT 0, perms varchar(255), -- not used yet diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 3e8ac2b7a50..7377d7803a7 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -30,7 +30,6 @@ create table llx_facture entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_client varchar(255), -- reference for customer type smallint DEFAULT 0 NOT NULL, -- type of invoice diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql b/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql index ef799ea379a..bdef744df49 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql @@ -41,7 +41,6 @@ create table llx_fichinterdet_rec localtax2_type VARCHAR(1) NULL DEFAULT NULL, qty double NULL DEFAULT NULL, remise_percent double NULL DEFAULT 0, - remise double NULL DEFAULT 0, fk_remise_except integer NULL DEFAULT NULL, price DOUBLE(24, 8) NULL DEFAULT NULL, total_tva DOUBLE(24, 8) NULL DEFAULT NULL, @@ -55,7 +54,6 @@ create table llx_fichinterdet_rec buy_price_ht DOUBLE(24, 8) NULL DEFAULT 0, fk_product_fournisseur_price integer NULL DEFAULT NULL, fk_code_ventilation integer NOT NULL DEFAULT 0, - fk_export_commpta integer NOT NULL DEFAULT 0, special_code integer UNSIGNED NULL DEFAULT 0, fk_unit integer NULL DEFAULT NULL, import_key varchar(14) NULL DEFAULT NULL diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index be468bd32a5..c6af12d453c 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -34,10 +34,10 @@ halfday integer DEFAULT 0, -- 0=start morning and end afternoon, -1=st nb_open_day double(24,8) DEFAULT NULL, -- denormalized number of open days of holiday. Not always set. More reliable when re-calculated with num_open_days(date_debut, date_fin, halfday). statut integer NOT NULL DEFAULT 1, -- status of leave request fk_validator integer NOT NULL, -- who should approve the leave -date_valid DATETIME DEFAULT NULL, -- date approval (currently both date valid and date_approval) -fk_user_valid integer DEFAULT NULL, -- user approval (currently both user valid and user that approved) -date_approve DATETIME DEFAULT NULL, -- date approval (not used yet) -fk_user_approve integer DEFAULT NULL, -- user approval (not used yet) +date_valid DATETIME DEFAULT NULL, -- date validation +fk_user_valid integer DEFAULT NULL, -- user validation +date_approval DATETIME DEFAULT NULL, -- date approval +fk_user_approve integer DEFAULT NULL, -- user approval date_refuse DATETIME DEFAULT NULL, fk_user_refuse integer DEFAULT NULL, date_cancel DATETIME DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_inventory-stock.sql b/htdocs/install/mysql/tables/llx_inventory-stock.sql index c25ccb9767b..0c7a6d2eb49 100644 --- a/htdocs/install/mysql/tables/llx_inventory-stock.sql +++ b/htdocs/install/mysql/tables/llx_inventory-stock.sql @@ -28,8 +28,9 @@ CREATE TABLE llx_inventory fk_user_modif integer, -- user making last change fk_user_valid integer, -- valideur de la fiche fk_warehouse integer DEFAULT NULL, - fk_product integer DEFAULT NULL, - status integer DEFAULT 0, + fk_product integer DEFAULT NULL, + categories_product varchar(255) DEFAULT NULL, -- product categories id separated by comma + status integer DEFAULT 0, title varchar(255) NOT NULL, date_inventory datetime DEFAULT NULL, date_validation datetime DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles-mailing.sql b/htdocs/install/mysql/tables/llx_mailing_cibles-mailing.sql index da0b6c1683a..3c38eedaaaf 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles-mailing.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles-mailing.sql @@ -32,7 +32,7 @@ create table llx_mailing_cibles statut smallint NOT NULL DEFAULT 0, -- -1 = error, 0 = not sent, ... source_url varchar(255), source_id integer, - source_type varchar(16), + source_type varchar(32), date_envoi datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, error_text varchar(255) -- text with error if statut is -1 diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql index 62542d13401..7d33b0ea8cb 100644 --- a/htdocs/install/mysql/tables/llx_oauth_token.sql +++ b/htdocs/install/mysql/tables/llx_oauth_token.sql @@ -20,6 +20,7 @@ CREATE TABLE llx_oauth_token ( service varchar(36), -- What king of key or token: 'Google', 'Stripe', 'auth-public-key', ... token text, -- token in serialize format, of an object StdOAuth2Token of library phpoauth2. Deprecated, use tokenstring instead. tokenstring text, -- token in json or text format. Value depends on 'service'. For example for an OAUTH service: '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"} + state text, -- the state (list of permission) the token was obtained for fk_soc integer, -- Id of thirdparty in llx_societe fk_user integer, -- Id of user in llx_user fk_adherent integer, -- Id of member in llx_adherent diff --git a/htdocs/install/mysql/tables/llx_opensurvey_comments-opensurvey.sql b/htdocs/install/mysql/tables/llx_opensurvey_comments-opensurvey.sql index 52d938b7c47..b447431cca5 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_comments-opensurvey.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_comments-opensurvey.sql @@ -21,5 +21,7 @@ CREATE TABLE llx_opensurvey_comments ( comment text NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, usercomment text + date_creation datetime NOT NULL, + ip varchar(250), --ip used to create record (for public submission page) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs-opensurvey.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs-opensurvey.sql index 03ad9b35ec5..26de6ff8a21 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs-opensurvey.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs-opensurvey.sql @@ -19,6 +19,8 @@ CREATE TABLE llx_opensurvey_user_studs ( id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, nom VARCHAR(64) NOT NULL, id_sondage VARCHAR(16) NOT NULL, - reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys + reponses VARCHAR(200) NOT NULL, -- Not used for 'F' surveys tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP + date_creation datetime NOT NULL, + ip varchar(250), --ip used to create record (for public submission page) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql b/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql index 617036e66ee..7dd3156d2e5 100644 --- a/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql +++ b/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql @@ -17,5 +17,4 @@ -- =========================================================================== -ALTER TABLE llx_overwrite_trans ADD UNIQUE INDEX uk_overwrite_trans(lang, transkey); - +ALTER TABLE llx_overwrite_trans ADD UNIQUE INDEX uk_overwrite_trans(entity, lang, transkey); diff --git a/htdocs/install/mysql/tables/llx_partnership-partnership.sql b/htdocs/install/mysql/tables/llx_partnership-partnership.sql index 0be59af5ebf..8c616f8f62b 100644 --- a/htdocs/install/mysql/tables/llx_partnership-partnership.sql +++ b/htdocs/install/mysql/tables/llx_partnership-partnership.sql @@ -28,7 +28,7 @@ CREATE TABLE llx_partnership( entity integer DEFAULT 1 NOT NULL, -- multi company id, 0 = all reason_decline_or_cancel text NULL, date_creation datetime NOT NULL, - fk_user_creat integer NOT NULL, + fk_user_creat integer NULL, -- can be null if created from public page tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_modif integer, note_private text, @@ -37,6 +37,7 @@ CREATE TABLE llx_partnership( url_to_check varchar(255), -- url to check to find a specific keyword (defined into llx_c_partnership) to keep status of partnership valid count_last_url_check_error integer DEFAULT '0', -- last result of check of keyword into url last_check_backlink datetime NULL, -- date of last check of keyword into url + ip varchar(250), import_key varchar(14), model_pdf varchar(255) ) ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql b/htdocs/install/mysql/tables/llx_prelevement.key.sql similarity index 76% rename from htdocs/install/mysql/tables/llx_prelevement_facture.key.sql rename to htdocs/install/mysql/tables/llx_prelevement.key.sql index bc8b1bd8386..c0178995895 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql +++ b/htdocs/install/mysql/tables/llx_prelevement.key.sql @@ -18,8 +18,8 @@ -- ============================================================================ -ALTER TABLE llx_prelevement_facture ADD INDEX idx_prelevement_facture_fk_prelevement_lignes (fk_prelevement_lignes); +ALTER TABLE llx_prelevement ADD INDEX idx_prelevement_fk_prelevement_lignes (fk_prelevement_lignes); -ALTER TABLE llx_prelevement_facture ADD CONSTRAINT fk_prelevement_facture_fk_prelevement_lignes FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid); +ALTER TABLE llx_prelevement ADD CONSTRAINT fk_prelevement_fk_prelevement_lignes FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid); diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture.sql b/htdocs/install/mysql/tables/llx_prelevement.sql similarity index 90% rename from htdocs/install/mysql/tables/llx_prelevement_facture.sql rename to htdocs/install/mysql/tables/llx_prelevement.sql index 53a329f4376..597cdb4a79f 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture.sql +++ b/htdocs/install/mysql/tables/llx_prelevement.sql @@ -16,11 +16,11 @@ -- -- =================================================================== -create table llx_prelevement_facture +create table llx_prelevement ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_facture integer NULL, - fk_facture_fourn integer NULL, + fk_facture_fourn integer NULL, + fk_salary integer NULL, fk_prelevement_lignes integer NOT NULL - )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.key.sql b/htdocs/install/mysql/tables/llx_prelevement_demande.key.sql similarity index 78% rename from htdocs/install/mysql/tables/llx_prelevement_facture_demande.key.sql rename to htdocs/install/mysql/tables/llx_prelevement_demande.key.sql index 4f9aedb9cdf..5e047323189 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.key.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_demande.key.sql @@ -17,6 +17,6 @@ -- =================================================================== -ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture); -ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn); +ALTER TABLE llx_prelevement_demande ADD INDEX idx_prelevement_demande_fk_facture (fk_facture); +ALTER TABLE llx_prelevement_demande ADD INDEX idx_prelevement_demande_fk_facture_fourn (fk_facture_fourn); diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql b/htdocs/install/mysql/tables/llx_prelevement_demande.sql similarity index 95% rename from htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql rename to htdocs/install/mysql/tables/llx_prelevement_demande.sql index 9837f709777..b0b1b87f77f 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_demande.sql @@ -17,12 +17,13 @@ -- =================================================================== -create table llx_prelevement_facture_demande +create table llx_prelevement_demande ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, fk_facture integer NULL, fk_facture_fourn integer NULL, + fk_salary integer NULL, sourcetype varchar(32), amount double(24,8) NOT NULL, date_demande datetime NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 83e8882caa7..2267113e987 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -57,8 +57,9 @@ create table llx_product fk_user_modif integer, -- user making last change tosell tinyint DEFAULT 1, -- Product you sell tobuy tinyint DEFAULT 1, -- Product you buy - onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on) + onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it from internal portal (module 'portal') tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) + sell_or_eat_by_mandatory tinyint DEFAULT 0 NOT NULL, -- Make sell-by or eat-by date mandatory batch_mask varchar(32) DEFAULT NULL, -- If the product has batch feature, you may want to use a batch mask per product fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module) duration varchar(6), @@ -106,5 +107,6 @@ create table llx_product fk_project integer DEFAULT NULL, -- Used when product was generated by a project or is specifif to a project mandatory_period tinyint DEFAULT 0, -- is used to signal to the user that the start and end dates are mandatory for this type of product the fk_product_type == 1 (service) (non-blocking action) - fk_default_bom integer DEFAULT NULL + fk_default_bom integer DEFAULT NULL, + fk_default_workstation integer DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 162f1c6c122..4e6914884ac 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -22,6 +22,8 @@ CREATE TABLE llx_product_lot ( entity integer DEFAULT 1, fk_product integer NOT NULL, -- Id of product batch varchar(128) DEFAULT NULL, -- Lot or serial number + note_public text DEFAULT NULL, + note_private text DEFAULT NULL, eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date eol_date datetime NULL, diff --git a/htdocs/install/mysql/tables/llx_product_stock.sql b/htdocs/install/mysql/tables/llx_product_stock.sql index c5a2f4ad005..8132a71cdd3 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.sql @@ -16,6 +16,7 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- +-- See also its child table llx_product_batch that contains details per lot -- ============================================================================ create table llx_product_stock diff --git a/htdocs/install/mysql/tables/llx_projet.sql b/htdocs/install/mysql/tables/llx_projet.sql index 197a92ac2be..3b8bf1be05b 100644 --- a/htdocs/install/mysql/tables/llx_projet.sql +++ b/htdocs/install/mysql/tables/llx_projet.sql @@ -47,13 +47,17 @@ create table llx_projet usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices - usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event or receive attendees registration + usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event or receive attendees registration + date_start_event datetime, -- date start event + date_end_event datetime, -- date end event + location varchar(255), -- location accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth max_attendees integer DEFAULT 0, price_registration double(24,8), price_booth double(24,8), model_pdf varchar(255), + ip varchar(250), --ip used to create record (for public submission page) last_main_doc varchar(255), -- relative filepath+filename of last main generated document import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index a8f0aa3e2c9..33df27f8fe4 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -26,7 +26,6 @@ create table llx_propal entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_client varchar(255), -- customer proposal number fk_soc integer, diff --git a/htdocs/install/mysql/tables/llx_reception.sql b/htdocs/install/mysql/tables/llx_reception.sql index 8de59edcb77..9256aaf6abe 100644 --- a/htdocs/install/mysql/tables/llx_reception.sql +++ b/htdocs/install/mysql/tables/llx_reception.sql @@ -29,7 +29,6 @@ create table llx_reception fk_projet integer DEFAULT NULL, ref_ext varchar(30), -- reference into an external system (not used by dolibarr) - ref_int varchar(30), -- reference into an internal system (deprecated) ref_supplier varchar(128), -- supplier number date_creation datetime, -- date de creation diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql index 5749acd93d8..8d5dd3bd14f 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql @@ -38,6 +38,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( remuneration_requested integer, remuneration_proposed integer, email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index + email_date datetime, fk_recruitment_origin INTEGER NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe.key.sql b/htdocs/install/mysql/tables/llx_societe.key.sql index 3a2c9540229..58701e4a7f9 100644 --- a/htdocs/install/mysql/tables/llx_societe.key.sql +++ b/htdocs/install/mysql/tables/llx_societe.key.sql @@ -23,6 +23,8 @@ ALTER TABLE llx_societe ADD UNIQUE INDEX uk_societe_code_fournisseur(code_fourni ALTER TABLE llx_societe ADD UNIQUE INDEX uk_societe_barcode (barcode, fk_barcode_type, entity); +ALTER TABLE llx_societe ADD INDEX idx_societe_nom(nom); + ALTER TABLE llx_societe ADD INDEX idx_societe_user_creat(fk_user_creat); ALTER TABLE llx_societe ADD INDEX idx_societe_user_modif(fk_user_modif); diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 3c2f8a67be1..47671f4e7c3 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -29,7 +29,6 @@ create table llx_societe entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (deprecated) statut tinyint DEFAULT 0, -- statut parent integer, @@ -45,7 +44,7 @@ create table llx_societe town varchar(50), -- town fk_departement integer DEFAULT 0, -- fk_pays integer DEFAULT 0, -- - fk_account integer DEFAULT 0, -- + fk_account integer DEFAULT 0, -- default bank account phone varchar(20), -- phone number fax varchar(20), -- fax number url varchar(255), -- diff --git a/htdocs/install/mysql/tables/llx_societe_remise_except.sql b/htdocs/install/mysql/tables/llx_societe_remise_except.sql index 8fed65fe5f0..8ae8b69e83c 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_except.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_except.sql @@ -39,6 +39,8 @@ create table llx_societe_remise_except fk_invoice_supplier integer, fk_invoice_supplier_source integer, description text NOT NULL, + multicurrency_code varchar(3) NULL, + multicurrency_tx double(24,8) NULL, multicurrency_amount_ht double(24,8) DEFAULT 0 NOT NULL, multicurrency_amount_tva double(24,8) DEFAULT 0 NOT NULL, multicurrency_amount_ttc double(24,8) DEFAULT 0 NOT NULL diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index 9ea6ccf9188..a798f6ac594 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -43,20 +43,23 @@ create table llx_societe_rib proprio varchar(60), owner_address varchar(255), default_rib smallint NOT NULL DEFAULT 0, - - -- For BAN direct debit feature + state_id integer, + fk_country integer, + currency_code varchar(3), + + -- For BAN direct debit feature rum varchar(32), -- RUM value to use for SEPA generation date_rum date, -- Date of mandate frstrecur varchar(16) default 'FRST', -- 'FRST' or 'RECUR' - + --For credit card last_four varchar(4), -- last 4 card_type varchar(255), -- card type 'VISA', 'MC' , ... - cvn varchar(255), + cvn varchar(255), exp_date_month INTEGER, exp_date_year INTEGER, country_code varchar(10), - + --For Paypal approved INTEGER DEFAULT 0, email varchar(255), @@ -65,7 +68,7 @@ create table llx_societe_rib preapproval_key varchar(255), starting_date date, total_amount_of_all_payments double(24,8), - + --For Stripe stripe_card_ref varchar(128), -- 'card_...' stripe_account varchar(128), -- 'pk_live_...' diff --git a/htdocs/install/mysql/tables/llx_socpeople.key.sql b/htdocs/install/mysql/tables/llx_socpeople.key.sql index 4d2a453e0fa..36e2b7b7d1c 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.key.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.key.sql @@ -20,5 +20,7 @@ ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_soc (fk_soc); ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_user_creat (fk_user_creat); +ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_lastname (lastname); + ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_user_creat_user_rowid FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal.sql b/htdocs/install/mysql/tables/llx_supplier_proposal.sql index 0008f08642f..3be54f8e143 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal.sql @@ -20,7 +20,6 @@ CREATE TABLE llx_supplier_proposal ( ref varchar(30) NOT NULL, entity integer NOT NULL DEFAULT 1, ref_ext varchar(255) DEFAULT NULL, - ref_int varchar(255) DEFAULT NULL, fk_soc integer DEFAULT NULL, fk_projet integer DEFAULT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, diff --git a/htdocs/install/mysql/tables/llx_ticket-ticket.sql b/htdocs/install/mysql/tables/llx_ticket-ticket.sql index d079fdf3964..c651eaccca2 100644 --- a/htdocs/install/mysql/tables/llx_ticket-ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket-ticket.sql @@ -26,7 +26,7 @@ CREATE TABLE llx_ticket fk_user_create integer, fk_user_assign integer, subject varchar(255), - message text, + message mediumtext, fk_statut integer, resolution integer, progress integer DEFAULT 0, -- progression 0 - 100 or null @@ -34,12 +34,14 @@ CREATE TABLE llx_ticket type_code varchar(32), category_code varchar(32), severity_code varchar(32), - datec datetime, + datec datetime, -- date of creation of record date_read datetime, date_last_msg_sent datetime, date_close datetime, notify_tiers_at_create tinyint, email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID + email_date datetime, -- if ticket is created by email collector, we store here Date of message + ip varchar(250), tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index ae3715eb028..ca0c7bc818d 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -19,95 +19,96 @@ create table llx_user ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, -- multi company id + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, -- multi company id - ref_employee varchar(50), - ref_ext varchar(50), -- reference into an external system (not used by dolibarr) + ref_employee varchar(50), + ref_ext varchar(50), -- reference into an external system (not used by dolibarr) - admin smallint DEFAULT 0, -- user has admin profile + admin smallint DEFAULT 0, -- user has admin profile - employee tinyint DEFAULT 1, -- 1 if user is an employee - fk_establishment integer DEFAULT 0, + employee tinyint DEFAULT 1, -- 1 if user is an employee + fk_establishment integer DEFAULT 0, - datec datetime, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer, - fk_user_modif integer, - login varchar(50) NOT NULL, - pass_encoding varchar(24), - pass varchar(128), - pass_crypted varchar(128), - pass_temp varchar(128), -- temporary password when asked for forget password or 'hashtoallowreset:YYYMMDDHHMMSS' (where date is max date of validity) - api_key varchar(128), -- key to use REST API by this user - gender varchar(10), - civility varchar(6), - lastname varchar(50), - firstname varchar(50), - address varchar(255), -- user personal address - zip varchar(25), -- zipcode - town varchar(50), -- town - fk_state integer DEFAULT 0, - fk_country integer DEFAULT 0, - birth date, -- birthday - job varchar(128), - office_phone varchar(20), - office_fax varchar(20), - user_mobile varchar(20), - personal_mobile varchar(20), - email varchar(255), - personal_email varchar(255), - signature text DEFAULT NULL, + datec datetime, -- date/time of creation + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer, -- user who created dataset + fk_user_modif integer, -- user who modified dataset + login varchar(50) NOT NULL, + pass_encoding varchar(24), + pass varchar(128), + pass_crypted varchar(128), + pass_temp varchar(128), -- temporary password when asked for forget password or 'hashtoallowreset:YYYMMDDHHMMSS' (where date is max date of validity) + api_key varchar(128), -- key to use REST API by this user + gender varchar(10), + civility varchar(6), + lastname varchar(50), + firstname varchar(50), + address varchar(255), -- user personal address + zip varchar(25), -- zipcode + town varchar(50), -- town + fk_state integer DEFAULT 0, + fk_country integer DEFAULT 0, + birth date, -- birthday + birth_place varchar(64), -- birth place (town) + job varchar(128), + office_phone varchar(20), + office_fax varchar(20), + user_mobile varchar(20), + personal_mobile varchar(20), + email varchar(255), + personal_email varchar(255), + signature text DEFAULT NULL, - socialnetworks text DEFAULT NULL, -- json with socialnetworks + socialnetworks text DEFAULT NULL, -- json with socialnetworks --module_comm smallint DEFAULT 1, --module_compta smallint DEFAULT 1, - fk_soc integer NULL, -- id thirdparty if user linked to a company (external user) - fk_socpeople integer NULL, -- id contact origin if user linked to a contact - fk_member integer NULL, -- if member if suer linked to a member - fk_user integer NULL, -- Supervisor, hierarchic parent - fk_user_expense_validator integer NULL, - fk_user_holiday_validator integer NULL, + fk_soc integer NULL, -- id thirdparty if user linked to a company (external user) + fk_socpeople integer NULL, -- id contact origin if user linked to a contact + fk_member integer NULL, -- if member if user linked to a member + fk_user integer NULL, -- Supervisor, hierarchic parent + fk_user_expense_validator integer NULL, + fk_user_holiday_validator integer NULL, - idpers1 varchar(128), - idpers2 varchar(128), - idpers3 varchar(128), + idpers1 varchar(128), + idpers2 varchar(128), + idpers3 varchar(128), - note_public text, - note text DEFAULT NULL, - model_pdf varchar(255) DEFAULT NULL, - datelastlogin datetime, - datepreviouslogin datetime, - datelastpassvalidation datetime, -- last date we change password or we made a disconnect all - datestartvalidity datetime, - dateendvalidity datetime, - iplastlogin varchar(250), - ippreviouslogin varchar(250), - egroupware_id integer, - ldap_sid varchar(255) DEFAULT NULL, - openid varchar(255), - statut tinyint DEFAULT 1, - photo varchar(255), -- filename or url of photo - lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. - color varchar(6), - barcode varchar(255) DEFAULT NULL, - fk_barcode_type integer DEFAULT 0, - accountancy_code varchar(32) NULL, - nb_holiday integer DEFAULT 0, - thm double(24,8), - tjm double(24,8), + note_public text, + note_private text DEFAULT NULL, + model_pdf varchar(255) DEFAULT NULL, + datelastlogin datetime, + datepreviouslogin datetime, + datelastpassvalidation datetime, -- last date we change password or we made a disconnect all + datestartvalidity datetime, + dateendvalidity datetime, + iplastlogin varchar(250), + ippreviouslogin varchar(250), + egroupware_id integer, + ldap_sid varchar(255) DEFAULT NULL, + openid varchar(255), + statut tinyint DEFAULT 1, + photo varchar(255), -- filename or url of photo + lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. + color varchar(6), + barcode varchar(255) DEFAULT NULL, + fk_barcode_type integer DEFAULT 0, + accountancy_code varchar(32) NULL, + nb_holiday integer DEFAULT 0, + thm double(24,8), + tjm double(24,8), - salary double(24,8), -- denormalized value coming from llx_user_employment - salaryextra double(24,8), -- denormalized value coming from llx_user_employment - dateemployment date, -- denormalized value coming from llx_user_employment - dateemploymentend date, -- denormalized value coming from llx_user_employment - weeklyhours double(16,8), -- denormalized value coming from llx_user_employment + salary double(24,8), -- denormalized value coming from llx_user_employment + salaryextra double(24,8), -- denormalized value coming from llx_user_employment + dateemployment date, -- denormalized value coming from llx_user_employment + dateemploymentend date, -- denormalized value coming from llx_user_employment + weeklyhours double(16,8), -- denormalized value coming from llx_user_employment - import_key varchar(14), -- import key - default_range integer, - default_c_exp_tax_cat integer, + import_key varchar(14), -- import key + default_range integer, + default_c_exp_tax_cat integer, national_registration_number varchar(50), - fk_warehouse integer -- default warehouse os user + fk_warehouse integer -- default warehouse of user )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 4463a1f6f2b..c98e447a75e 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -33,5 +33,8 @@ create table llx_user_rib iban_prefix varchar(34), -- full iban. 34 according to ISO 13616 domiciliation varchar(255), proprio varchar(60), - owner_address varchar(255) + owner_address varchar(255), + state_id integer, + fk_country integer, + currency_code varchar(3) )ENGINE=innodb; diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 24b5dba4d01..7958012b0a1 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -825,7 +825,7 @@ function write_conf_file($conffile) global $dolibarr_main_distrib; global $db_host, $db_port, $db_name, $db_user, $db_pass, $db_type, $db_character_set, $db_collation; global $conffile, $conffiletoshow, $conffiletoshowshort; - global $force_dolibarr_lib_ADODB_PATH, $force_dolibarr_lib_NUSOAP_PATH; + global $force_dolibarr_lib_NUSOAP_PATH; global $force_dolibarr_lib_TCPDF_PATH, $force_dolibarr_lib_FPDI_PATH; global $force_dolibarr_lib_GEOIP_PATH; global $force_dolibarr_lib_ODTPHP_PATH, $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP; @@ -944,11 +944,6 @@ function write_conf_file($conffile) } fputs($fp, '$dolibarr_lib_TCPDI_PATH=\''.$force_dolibarr_lib_TCPDI_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_ADODB_PATH)) { - fputs($fp, '//'); $force_dolibarr_lib_ADODB_PATH = ''; - } - fputs($fp, '$dolibarr_lib_ADODB_PATH=\''.$force_dolibarr_lib_ADODB_PATH.'\';'); - fputs($fp, "\n"); if (empty($force_dolibarr_lib_GEOIP_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_GEOIP_PATH = ''; } diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 90ab596eac3..4fc30772f78 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -128,9 +128,9 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { $error = 0; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { + if ((!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) || !empty($dolibarr_main_db_encrypted_pass)) { require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; - if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { + if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted @@ -297,7 +297,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { } dolibarr_install_syslog('step5: remove MAIN_NOT_INSTALLED const'); - $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_NOT_INSTALLED'"); + $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')." = 'MAIN_NOT_INSTALLED'"); if (!$resql) { dol_print_error($db, 'Error in setup program'); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 25dd1ee84fd..22ef26295aa 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -117,9 +117,9 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $error = 0; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { + if ((!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) || !empty($dolibarr_main_db_encrypted_pass)) { require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; - if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { + if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 30e7b45d198..bbb12e8693e 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -123,9 +123,9 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print '
    '; print $langs->trans('IncotermLabel'); @@ -2031,7 +2048,7 @@ if ($action == 'create') { } if ($action == 'editline') { $editColspan = 3; - if (empty($conf->stock->enabled)) { + if (!isModEnabled('stock')) { $editColspan--; } if (empty($conf->productbatch->enabled)) { @@ -2043,10 +2060,10 @@ if ($action == 'create') { } else { print $langs->trans("QtyShipped").' - '; } - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print $langs->trans("WarehouseSource").' - '; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print $langs->trans("Batch"); } print ''.$langs->trans("QtyShipped").''.$langs->trans("WarehouseSource").''.$langs->trans("Batch").''.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'
    '.$lines[$i]->qty_shipped.' '.$unit_order.''; if ($lines[$i]->entrepot_id > 0) { $entrepot = new Entrepot($db); @@ -2356,7 +2373,7 @@ if ($action == 'create') { } // Batch number managment - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { if (isset($lines[$i]->detail_batch)) { print ''; print ''; @@ -2435,10 +2452,10 @@ if ($action == 'create') { if ($origin && $origin_id > 0) { $colspan++; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { $colspan++; } - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { $colspan++; } @@ -2513,7 +2530,7 @@ if ($action == 'create') { // Create bill if (isModEnabled('facture') && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED)) { if ($user->rights->facture->creer) { - // TODO show button only if (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) + // TODO show button only if (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) // If we do that, we must also make this option official. print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); } @@ -2573,8 +2590,8 @@ if ($action == 'create') { // Show links to link elements - //$linktoelem = $form->showLinkToObjectBlock($object, null, array('order')); - $somethingshown = $form->showLinkedObjectBlock($object, ''); + $linktoelem = $form->showLinkToObjectBlock($object, null, array('shipping')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); print '
    '; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 5e220995cc7..0b8668a6c1a 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -37,10 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT."/core/class/commonobjectline.class.php"; require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionlinebatch.class.php'; @@ -84,6 +84,13 @@ class Expedition extends CommonObject */ public $picto = 'dolly'; + + /** + * @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(); + + public $socid; /** @@ -98,12 +105,6 @@ class Expedition extends CommonObject */ public $ref_customer; - /** - * @var string internal ref - * @deprecated - */ - public $ref_int; - public $brouillon; /** @@ -217,11 +218,11 @@ class Expedition extends CommonObject $this->statuts[2] = 'StatusSendingProcessed'; // List of short language codes for status - $this->statutshorts = array(); - $this->statutshorts[-1] = 'StatusSendingCanceledShort'; - $this->statutshorts[0] = 'StatusSendingDraftShort'; - $this->statutshorts[1] = 'StatusSendingValidatedShort'; - $this->statutshorts[2] = 'StatusSendingProcessedShort'; + $this->statuts_short = array(); + $this->statuts_short[-1] = 'StatusSendingCanceledShort'; + $this->statuts_short[0] = 'StatusSendingDraftShort'; + $this->statuts_short[1] = 'StatusSendingValidatedShort'; + $this->statuts_short[2] = 'StatusSendingProcessedShort'; } /** @@ -304,7 +305,6 @@ class Expedition extends CommonObject $sql .= "ref"; $sql .= ", entity"; $sql .= ", ref_customer"; - $sql .= ", ref_int"; $sql .= ", ref_ext"; $sql .= ", date_creation"; $sql .= ", fk_user_author"; @@ -329,7 +329,6 @@ class Expedition extends CommonObject $sql .= "'(PROV)'"; $sql .= ", ".((int) $conf->entity); $sql .= ", ".($this->ref_customer ? "'".$this->db->escape($this->ref_customer)."'" : "null"); - $sql .= ", ".($this->ref_int ? "'".$this->db->escape($this->ref_int)."'" : "null"); $sql .= ", ".($this->ref_ext ? "'".$this->db->escape($this->ref_ext)."'" : "null"); $sql .= ", '".$this->db->idate($now)."'"; $sql .= ", ".((int) $user->id); @@ -527,7 +526,7 @@ class Expedition extends CommonObject return -1; } - $sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; + $sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; $sql .= ", e.date_valid"; $sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; $sql .= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; @@ -551,9 +550,6 @@ class Expedition extends CommonObject if ($ref_ext) { $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; } - if ($notused) { - $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; - } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -567,7 +563,6 @@ class Expedition extends CommonObject $this->socid = $obj->socid; $this->ref_customer = $obj->ref_customer; $this->ref_ext = $obj->ref_ext; - $this->ref_int = $obj->ref_int; $this->statut = $obj->fk_statut; $this->user_author_id = $obj->fk_user_author; $this->date_creation = $this->db->jdate($obj->date_creation); @@ -625,7 +620,7 @@ class Expedition extends CommonObject $this->fetch_optionals(); // Fix Get multicurrency param for transmited - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled('multicurrency')) { if (!empty($this->multicurrency_code)) { $this->multicurrency_code = $this->thirdparty->multicurrency_code; } @@ -719,7 +714,7 @@ class Expedition extends CommonObject } // If stock increment is done on sending (recommanded choice) - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -745,14 +740,15 @@ class Expedition extends CommonObject } else { $qty = $obj->edbqty; } - if ($qty <= 0) { + + if ($qty == 0 || ($qty < 0 && !getDolGlobalInt('SHIPMENT_ALLOW_NEGATIVE_QTY'))) { continue; } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); //var_dump($this->lines[$i]); $mouvS = new MouvementStock($this->db); - //$mouvS->origin = dol_clone($this, 1); + $mouvS->setOrigin($this->element, $this->id); if (empty($obj->edbrowid)) { @@ -771,7 +767,7 @@ class Expedition extends CommonObject // line with batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. - // Note: ->fk_origin_stock = id into table llx_product_batch (may be rename into llx_product_stock_batch in another version) + // Note: ->fk_origin_stock = id into table llx_product_batch (may be renamed into llx_product_stock_batch in another version) $result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref), '', $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock, '', 1); if ($result < 0) { $error++; @@ -925,7 +921,7 @@ class Expedition extends CommonObject $line->rang = $orderline->rang; $line->product_type = $orderline->product_type; - if (!empty($conf->stock->enabled) && !empty($orderline->fk_product)) { + if (isModEnabled('stock') && !empty($orderline->fk_product)) { $fk_product = $orderline->fk_product; if (!($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS)) { @@ -965,8 +961,9 @@ class Expedition extends CommonObject } // If product need a batch number, we should not have called this function but addline_batch instead. - if (!empty($conf->productbatch->enabled) && !empty($orderline->fk_product) && !empty($orderline->product_tobatch)) { - $this->error = 'ADDLINE_WAS_CALLED_INSTEAD_OF_ADDLINEBATCH'; + // If this happen, we may have a bug in card.php page + if (isModEnabled('productbatch') && !empty($orderline->fk_product) && !empty($orderline->product_tobatch)) { + $this->error = 'ADDLINE_WAS_CALLED_INSTEAD_OF_ADDLINEBATCH '.$orderline->id.' '.$orderline->fk_product; // return -4; } @@ -1221,7 +1218,7 @@ class Expedition extends CommonObject } // Stock control - if (!$error && $conf->stock->enabled && + if (!$error && isModEnabled('stock') && (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) { require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; @@ -1291,7 +1288,7 @@ class Expedition extends CommonObject } // delete batch expedition line - if (!$error && $conf->productbatch->enabled) { + if (!$error && isModEnabled('productbatch')) { $shipmentlinebatch = new ExpeditionLineBatch($this->db); if ($shipmentlinebatch->deleteFromShipment($this->id) < 0) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); @@ -1412,7 +1409,7 @@ class Expedition extends CommonObject } // Stock control - if (!$error && $conf->stock->enabled && + if (!$error && isModEnabled('stock') && (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) { require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; @@ -1716,7 +1713,7 @@ class Expedition extends CommonObject } // Detail of batch - if (!empty($conf->productbatch->enabled) && $obj->line_id > 0 && $obj->product_tobatch > 0) { + if (isModEnabled('productbatch') && $obj->line_id > 0 && $obj->product_tobatch > 0) { $newdetailbatch = $shipmentlinebatch->fetchAll($obj->line_id, $obj->fk_product); if (is_array($newdetailbatch)) { @@ -1883,7 +1880,7 @@ class Expedition extends CommonObject global $langs; $labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]); - $labelStatusShort = $langs->transnoentitiesnoconv($this->statutshorts[$status]); + $labelStatusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]); $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) { @@ -2162,7 +2159,7 @@ class Expedition extends CommonObject $this->status = self::STATUS_CLOSED; // Will be revert to STATUS_VALIDATED at end if there is a rollback // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2254,21 +2251,6 @@ class Expedition extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Classify the shipping as invoiced (used when WORKFLOW_BILL_ON_SHIPMENT is on) - * - * @deprecated - * @see setBilled() - * @return int <0 if ko, >0 if ok - */ - public function set_billed() - { - // phpcs:enable - dol_syslog(get_class($this)."::set_billed is deprecated, use setBilled instead", LOG_NOTICE); - return $this->setBilled(); - } - /** * Classify the shipping as invoiced (used when WORKFLOW_BILL_ON_SHIPMENT is on) * @@ -2339,7 +2321,7 @@ class Expedition extends CommonObject $this->billed = 0; // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2499,12 +2481,28 @@ class ExpeditionLigne extends CommonObjectLine */ public $table_element = 'expeditiondet'; + + /** + * Id of the line. Duplicate of $id. + * + * @var int + * @deprecated + */ + public $line_id; // deprecated + /** * @deprecated * @see $fk_origin_line */ public $origin_line_id; + /** + * Code of object line that is origin of the shipment line. + * + * @var string + */ + public $fk_origin; // Example: 'orderline' + /** * @var int ID */ @@ -2534,8 +2532,16 @@ class ExpeditionLigne extends CommonObjectLine * @var int Id of product */ public $fk_product; + + // detail of lot and qty = array(id in llx_expeditiondet_batch, fk_expeditiondet, batch, qty, fk_origin_stock) + // We can use this to know warehouse planned to be used for each lot. public $detail_batch; + // detail of warehouses and qty + // We can use this to know warehouse when there is no lot. + public $details_entrepot; + + /** * @var int Id of warehouse */ @@ -2902,7 +2908,7 @@ class ExpeditionLigne extends CommonObjectLine // update lot - if (!empty($batch) && $conf->productbatch->enabled) { + if (!empty($batch) && isModEnabled('productbatch')) { dol_syslog(get_class($this)."::update expedition batch id=$expedition_batch_id, batch_id=$batch_id, batch=$batch"); if (empty($batch_id) || empty($this->fk_product)) { diff --git a/htdocs/expedition/class/expeditionlinebatch.class.php b/htdocs/expedition/class/expeditionlinebatch.class.php index b2562734447..5d99d1c7a74 100644 --- a/htdocs/expedition/class/expeditionlinebatch.class.php +++ b/htdocs/expedition/class/expeditionlinebatch.class.php @@ -44,7 +44,7 @@ class ExpeditionLineBatch extends CommonObject public $qty; public $dluo_qty; // deprecated, use qty public $entrepot_id; - public $fk_origin_stock; + public $fk_origin_stock; // rowid in llx_product_batch table public $fk_expeditiondet; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 669c6f8e56d..48822121fa3 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -23,13 +23,14 @@ * \brief Onglet de gestion des contacts de expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -53,11 +54,11 @@ if ($id > 0 || !empty($ref)) { } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } @@ -147,39 +148,25 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if (0) { // Do not change on shipment + $morehtmlref .= '
    '; + if (0) { // Do not change on shipment + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on shipment, so we will use the project or source object instead - // TODO Add project on shipment - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -196,7 +183,7 @@ if ($id > 0 || !empty($ref)) { print ''; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { print ''; @@ -814,8 +816,7 @@ if ($action != "create" && $action != "edit") { print ''; } - - $db->free($resql); + if (!empty($resql)) $db->free($resql); $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $objectline); // Note that $action and $objectline may have been modified by hook diff --git a/htdocs/hrm/skill_contact.php b/htdocs/hrm/skill_contact.php index 5f284c4e72c..562421a5272 100644 --- a/htdocs/hrm/skill_contact.php +++ b/htdocs/hrm/skill_contact.php @@ -20,22 +20,25 @@ */ /** - * \file skill_contact.php - * \ingroup hrm - * \brief Tab for contacts linked to Skill + * \file htdocs/hrm/skill_contact.php + * \ingroup hrm + * \brief Tab for contacts linked to Skill */ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; -// Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); +// Load translation files required by the page +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); + + +// Get Parameters $id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -53,6 +56,7 @@ $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 +// Permissions $permission = $user->rights->hrm->skill->write; // Security check (enable the most restrictive one) @@ -65,9 +69,11 @@ $permission = $user->rights->hrm->skill->write; /* - * Add a new contact + * Action */ +// Add a new contact + if ($action == 'addcontact' && $permission) { $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); @@ -139,7 +145,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -160,7 +166,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/hrm/skill_document.php b/htdocs/hrm/skill_document.php index c0fe492be06..2f9f8e0db81 100644 --- a/htdocs/hrm/skill_document.php +++ b/htdocs/hrm/skill_document.php @@ -20,9 +20,9 @@ */ /** - * \file skill_document.php - * \ingroup hrm - * \brief Tab for documents linked to skill + * \file htdocs/hrm/skill_document.php + * \ingroup hrm + * \brief Tab for documents linked to skill */ @@ -37,15 +37,15 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); - +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); +// Get Parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); -// Get parameters +// Get Parameters for Pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -79,8 +79,9 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->hrm->multidir_output[$object->entity ? $object->entity : $conf->entity]."/skill/".get_exdir(0, 0, 0, 1, $object); } +// Permissions $permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php // Security check (enable the most restrictive one) //if ($user->socid > 0) accessforbidden(); diff --git a/htdocs/hrm/skill_list.php b/htdocs/hrm/skill_list.php index 65a3cac0ecf..ddf385b170e 100644 --- a/htdocs/hrm/skill_list.php +++ b/htdocs/hrm/skill_list.php @@ -20,9 +20,9 @@ */ /** - * \file skill_list.php - * \ingroup hrm - * \brief List page for skill + * \file htdocs/hrm/skill_list.php + * \ingroup hrm + * \brief List page for skill */ @@ -40,8 +40,11 @@ require_once __DIR__.'/class/skill.class.php'; //dol_include_once('/othermodule/class/otherobject.class.php'); // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); + +// Get Parameters +$id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -49,10 +52,8 @@ $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') : 'skilllist'; // 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'); +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -130,8 +131,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -$permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; +// Permissions +$permissiontoread = $user->rights->hrm->all->read; +$permissiontoadd = $user->rights->hrm->all->write; $permissiontodelete = $user->rights->hrm->all->delete; // Security check @@ -342,21 +344,6 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', ''); -// Example : Adding jquery code -// print ''; - $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; diff --git a/htdocs/hrm/skill_note.php b/htdocs/hrm/skill_note.php index 45a0690f176..287861300d7 100644 --- a/htdocs/hrm/skill_note.php +++ b/htdocs/hrm/skill_note.php @@ -20,9 +20,9 @@ */ /** - * \file skill_note.php - * \ingroup hrm - * \brief Tab for notes on skill + * \file htdocs/hrm/skill_note.php + * \ingroup hrm + * \brief Tab for notes on skill */ @@ -33,12 +33,12 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies")); +$langs->loadLangs(array('hrm', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -53,10 +53,11 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } -$permissionnote = $user->rights->hrm->all->write; +// Permissions +$permissionnote = $user->rights->hrm->all->write; $permissiontoread = $user->rights->hrm->all->read; // Used by the include of actions_addupdatedelete.inc.php // Security check (enable the most restrictive one) diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 52c45c72848..83482d53ee3 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -20,13 +20,12 @@ */ /** - * \file skill_tab.php - * \ingroup hrm - * \brief Page to add/delete/view skill to jobs/users + * \file htdocs/hrm/skill_tab.php + * \ingroup hrm + * \brief Page to add/delete/view skill to jobs/users */ - // Load Dolibarr environment require '../main.inc.php'; @@ -39,8 +38,9 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); +// Get Parameters $id = GETPOST('id', 'int'); $TSkillsToAdd = GETPOST('fk_skill', 'array'); $objecttype = GETPOST('objecttype', 'alpha'); @@ -64,15 +64,18 @@ if (in_array($objecttype, $TAuthorizedObjects)) { } elseif ($objecttype == "user") { $object = new User($db); } -} else accessforbidden($langs->trans('ErrorBadObjectType')); +} else { + accessforbidden('ErrorBadObjectType'); +} $hookmanager->initHooks(array('skilltab', 'globalcard')); // Note that conf->hooks_modules contains array // Load object include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. -$permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +// Permissions +$permissiontoread = $user->hasRight('hrm', 'all', 'read'); +$permissiontoadd = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php // Security check (enable the most restrictive one) if ($user->socid > 0) accessforbidden(); @@ -259,13 +262,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; } print ''."\n"; @@ -278,14 +281,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Ref employee print ''; print ''; print ''."\n"; // National Registration Number print ''; print ''; print ''."\n"; diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index 6435f91241c..6d8b3f2d647 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -48,6 +48,7 @@ function llxFooter() print ''; } +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/imports/class/import.class.php'; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index dfe2d0b9d49..9a33bd25c05 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -198,15 +198,15 @@ if ($action=='downfield' || $action=='upfield') } } */ -if ($action == 'builddoc') { - // Build import file - $result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database); - if ($result < 0) { - setEventMessages($objimport->error, $objimport->errors, 'errors'); - } else { - setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs'); - } -} +// if ($action == 'builddoc') { +// // Build import file +// $result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database); +// if ($result < 0) { +// setEventMessages($objimport->error, $objimport->errors, 'errors'); +// } else { +// setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs'); +// } +// } if ($action == 'deleteprof') { if (GETPOST("id", 'int')) { @@ -492,7 +492,8 @@ if ($step == 2 && $datatoimport) { $text = $objmodelimport->getDriverDescForKey($key); print ''; print ''; - print ''; + print ''; print ''; - print '",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0").parent().append("")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0e.max?e.max:null!==e.min&&t"},_buttonHtml:function(){return""}});var ct;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ct=/#.*$/,function(t){var e=t.href.replace(ct,""),i=location.href.replace(ct,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("
    ").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("
    ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("
    ").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("
    ").attr("role","tooltip"),i=V("
    ").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip}); \ No newline at end of file +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.2";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n
    "),i=e.children()[0];return V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0")[0],w=d.each;function P(t){return null==t?t+"":"object"==typeof t?p[e.call(t)]||"object":typeof t}function M(t,e,i){var s=v[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function S(s){var n=m(),o=n._rgba=[];return s=s.toLowerCase(),w(g,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[_[e].cache]=i[_[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&d.extend(o,B.transparent),n):B[s]}function H(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}y.style.cssText="background-color:rgba(1,1,1,.5)",b.rgba=-1o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=M((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=m(t)._rgba;return m(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null!=t?t:2
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.2",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(j+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=j+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0
    ");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=G(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},Y={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){Y[t]=function(t){return Math.pow(t,e+2)}}),V.extend(Y,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(Y,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});y=V.effects,V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,r="show"===o,l=t.direction||"up",h=t.distance,c=t.times||5,o=2*c+(r||a?1:0),u=t.duration/o,d=t.easing,p="up"===l||"down"===l?"top":"left",f="up"===l||"left"===l,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),l=n.css(p),h=h||n["top"==p?"outerHeight":"outerWidth"]()/3,r&&((s={opacity:1})[p]=l,n.css("opacity",0).css(p,f?2*-h:2*h).animate(s,u,d)),a&&(h/=Math.pow(2,c-1)),(s={})[p]=l;g
    ").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,o="hide"===s,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],h=e.duration/2,c=V.effects.createPlaceholder(i),u=i.cssClip(),d={clip:V.extend({},u)},p={clip:V.extend({},u)},f=[u[l[0]],u[l[1]]],s=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,n&&(i.cssClip(p.clip),c&&c.css(V.effects.clipToBox(p)),p.clip=u),i.queue(function(t){c&&c.animate(V.effects.clipToBox(d),h,e.easing).animate(V.effects.clipToBox(p),h,e.easing),t()}).animate(d,h,e.easing).animate(p,h,e.easing).queue(t),V.effects.unshift(i,s,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(c=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*c.y+d.top,f.left=(p.outerWidth-f.outerWidth)*c.x+d.left,g.top=(p.outerHeight-g.outerHeight)*c.y+d.top,g.left=(p.outerWidth-g.outerWidth)*c.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),s=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),V.effects.effect.size.call(this,s,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!i.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("
    '; $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); @@ -206,7 +193,7 @@ if ($id > 0 || !empty($ref)) { print "
    '; $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index d0729879017..517c1cea8d2 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -26,6 +26,7 @@ * \brief Management page of documents attached to an expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -33,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -65,8 +66,26 @@ if (!$sortfield) { $object = new Expedition($db); -if ($object->fetch($id, $ref)) { +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); $object->fetch_thirdparty(); + + if (!empty($object->origin)) { + $typeobject = $object->origin; + $origin = $object->origin; + $object->fetch_origin(); + } + + // Linked documents + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { + $objectsrc = new Commande($db); + $objectsrc->fetch($object->$typeobject->id); + } + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { + $objectsrc = new Propal($db); + $objectsrc->fetch($object->$typeobject->id); + } + $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); } @@ -117,43 +136,29 @@ if ($id > 0 || !empty($ref)) { $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); + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if (0) { // Do not change on shipment + $morehtmlref .= '
    '; + if (0) { // Do not change on shipment + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on shipment, so we will use the project or source object instead - // TODO Add project on shipment - $morehtmlref .= ' : '; if (!empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 8a992e0c7ec..a644aeedbad 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -25,6 +25,7 @@ * \brief Home page of shipping area. */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index dedaa7efa89..14544087647 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -26,6 +26,7 @@ * \brief Page to list all shipments */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -257,11 +258,14 @@ $helpurl = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Ex llxHeader('', $langs->trans('ListOfSendings'), $helpurl); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) { +if ($sall || $search_user > 0) { $sql = 'SELECT DISTINCT'; } $sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as delivery_date, e.fk_statut, e.billed, e.tracking_number, e.fk_shipping_method,"; -$sql .= " l.date_delivery as date_reception,"; +if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) { + // Link for delivery fields ref and date. Does not duplicate the line because we should always have ony 1 link or 0 per shipment + $sql .= " l.date_delivery as date_reception,"; +} $sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, "; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -280,17 +284,17 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; } -if ($sall || $search_product_category > 0) { +if ($sall) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expeditiondet as ed ON e.rowid=ed.fk_expedition'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON pd.rowid=ed.fk_origin_line'; } -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."societe as s ON s.rowid = e.fk_soc"; if (($search_categ_cus > 0) || ($search_categ_cus == -2)) { $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 @@ -298,8 +302,11 @@ if (($search_categ_cus > 0) || ($search_categ_cus == -2)) { $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)"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'shipping' AND ee.targettype = 'delivery'"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; +if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) { + // Link for delivery fields ref and date. Does not duplicate the line because we should always have ony 1 link or 0 per shipment + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'shipping' AND ee.targettype = 'delivery'"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; +} $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON e.fk_user_author = u.rowid'; if ($search_user > 0) { // Get link to order to get the order id in eesource.fk_source $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as eesource ON eesource.fk_target = e.rowid AND eesource.targettype = 'shipping' AND eesource.sourcetype = 'commande'"; @@ -319,9 +326,7 @@ $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object $sql .= $hookmanager->resPrint; $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; -if ($search_product_category > 0) { - $sql .= " AND cp.fk_categorie = ".((int) $search_product_category); -} + if ($socid > 0) { $sql .= " AND s.rowid = ".((int) $socid); } @@ -369,26 +374,28 @@ if ($search_user > 0) { // The contact on a shipment is also the contact of the order. $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = eesource.fk_source AND ec.fk_socpeople = ".((int) $search_user); } -if ($search_ref_exp) { - $sql .= natural_search('e.ref', $search_ref_exp); -} -if ($search_ref_liv) { - $sql .= natural_search('l.ref', $search_ref_liv); -} if ($search_company) { $sql .= natural_search('s.nom', $search_company); } +if ($search_ref_exp) { + $sql .= natural_search('e.ref', $search_ref_exp); +} if ($search_datedelivery_start) { $sql .= " AND e.date_delivery >= '".$db->idate($search_datedelivery_start)."'"; } if ($search_datedelivery_end) { $sql .= " AND e.date_delivery <= '".$db->idate($search_datedelivery_end)."'"; } -if ($search_datereceipt_start) { - $sql .= " AND l.date_delivery >= '".$db->idate($search_datereceipt_start)."'"; -} -if ($search_datereceipt_end) { - $sql .= " AND l.date_delivery <= '".$db->idate($search_datereceipt_end)."'"; +if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) { + if ($search_ref_liv) { + $sql .= natural_search('l.ref', $search_ref_liv); + } + if ($search_datereceipt_start) { + $sql .= " AND l.date_delivery >= '".$db->idate($search_datereceipt_start)."'"; + } + if ($search_datereceipt_end) { + $sql .= " AND l.date_delivery <= '".$db->idate($search_datereceipt_end)."'"; + } } if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); @@ -399,7 +406,36 @@ if ($search_categ_cus > 0) { if ($search_categ_cus == -2) { $sql .= " AND cc.fk_categorie IS NULL"; } - +// Search for tag/category ($searchCategoryProductList is an array of ID) +$searchCategoryProductOperator = -1; +$searchCategoryProductList = array($search_product_category); +if (!empty($searchCategoryProductList)) { + $searchCategoryProductSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProductList as $searchCategoryProduct) { + if (intval($searchCategoryProduct) == -2) { + $searchCategoryProductSqlList[] = "NOT EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_origin_line = cd.rowid AND cd.fk_product = ck.fk_product)"; + } elseif (intval($searchCategoryProduct) > 0) { + if ($searchCategoryProductOperator == 0) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_origin_line = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); + } + } + } + if ($listofcategoryid) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_origin_line = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProductOperator == 1) { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProductSqlList).")"; + } + } else { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProductSqlList).")"; + } + } +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -413,19 +449,31 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPrint; -$sql .= $db->order($sortfield, $sortorder); - $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} //print $sql; $resql = $db->query($sql); @@ -517,7 +565,7 @@ $param .= $hookmanager->resPrint; $arrayofmassactions = array( 'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), - 'classifyclose'=>$langs->trans("Close"), + 'classifyclose' => img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("Close"), 'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if (in_array($massaction, array('presend'))) { @@ -577,18 +625,18 @@ if ($user->rights->user->user->lire) { $moreforfilter .= '
    '; } // If the user can view prospects other than his' -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { +if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('IncludingProductWithTag'); $moreforfilter .= img_picto($tmptitle, 'category'); //$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 .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'parent', 1, $tmptitle); + $moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'search_product_category', 1, $tmptitle); $moreforfilter .= '
    '; } -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); @@ -611,7 +659,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); if ($massactionbutton) { $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields } @@ -621,6 +669,13 @@ print ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} // Ref if (!empty($arrayfields['e.ref']['checked'])) { print ''; } // Status billed @@ -742,13 +797,18 @@ if (!empty($arrayfields['e.billed']['checked'])) { print ''; } // Action column -print ''; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} print "\n"; print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['e.ref']['checked'])) { print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); } @@ -809,7 +869,9 @@ if (!empty($arrayfields['e.fk_statut']['checked'])) { if (!empty($arrayfields['e.billed']['checked'])) { print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; $typenArray = $formcompany->typent_array(1); @@ -832,6 +894,18 @@ while ($i < min($num, $limit)) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } // Ref if (!empty($arrayfields['e.ref']['checked'])) { print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index e391d5be180..4401af0b20c 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -24,10 +24,11 @@ * \brief Note card expedition */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -51,11 +52,11 @@ if ($id > 0 || !empty($ref)) { } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } @@ -108,39 +109,25 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if (0) { // Do not change on shipment + $morehtmlref .= '
    '; + if (0) { // Do not change on shipment + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on shipment, so we will use the project or source object instead - // TODO Add project on shipment - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 775d5946f50..9394269a03a 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2015 Juanjo Menent * Copyright (C) 2018-2021 Frédéric France - * Copyright (C) 2018 Philippe Grand + * Copyright (C) 2018-2022 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 @@ -26,6 +26,7 @@ * \brief Tab shipments/delivery receipts on the order */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; @@ -33,17 +34,17 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (!empty($conf->stock->enabled)) { +if (isModEnabled('stock')) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; } -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { +if (isModEnabled("product") || isModEnabled("service")) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; } @@ -160,7 +161,7 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + } elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) { // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); if ($result < 0) { @@ -227,11 +228,11 @@ if (empty($reshook)) { $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } -$title = $langs->trans('Order')." - ".$langs->trans('Shipments'); +$title = $object->ref." - ".$langs->trans('Shipments'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); @@ -282,39 +283,28 @@ if ($id > 0 || !empty($ref)) { $morehtmlref = '
    '; // Ref customer - $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1); + $morehtmlref .= '
    '.$soc->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) { + $morehtmlref .= '
    '; + if (0) { // Do not change on shipment + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - if (!empty($object->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $proj->fetch($objectsrc->fk_project); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -430,7 +420,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; // Warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (isModEnabled('stock') && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; @@ -732,7 +787,7 @@ if (!empty($arrayfields['e.tms']['checked'])) { // Status if (!empty($arrayfields['e.fk_statut']['checked'])) { print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1); + print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'onrightofpage'); print ''; -$searchpicto = $form->showFilterAndCheckAddButtons(0); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + 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 ''; @@ -1008,15 +1082,17 @@ while ($i < min($num, $limit)) { } // Action column - 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; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + 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 ''; + print '
    '; @@ -522,7 +512,7 @@ if ($id > 0 || !empty($ref)) { // TODO How record was recorded OrderMode (llx_c_input_method) // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '
    '; print ''; print ''; - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { print ''; print ''; print ''; @@ -387,7 +417,7 @@ if ($object->id > 0) { $boxstat .= '
    '; print $langs->trans('IncotermLabel'); @@ -558,7 +548,7 @@ if ($id > 0 || !empty($ref)) { print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { + if (isModEnabled("multicurrency") && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -641,7 +631,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } else { print ''; @@ -678,7 +668,7 @@ if ($id > 0 || !empty($ref)) { // Product label if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $prod = new Product($db); @@ -732,7 +722,7 @@ if ($id > 0 || !empty($ref)) { $text = $product_static->getNomUrl(1); $text .= ' - '.$label; - $description = ($conf->global->PRODUIT_DESC_IN_FORM ? '' : dol_htmlentitiesbr($objp->description)).'
    '; + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($objp->description)).'
    '; $description .= $product_static->show_photos('product', $conf->product->multidir_output[$product_static->entity], 1, 1, 0, 0, 0, 80); print $form->textwithtooltip($text, $description, 3, '', '', $i); @@ -740,7 +730,7 @@ if ($id > 0 || !empty($ref)) { print_date_range($db->jdate($objp->date_start), $db->jdate($objp->date_end)); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print ($objp->description && $objp->description != $objp->product_label) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } @@ -793,7 +783,7 @@ if ($id > 0 || !empty($ref)) { $product->load_stock('warehouseopen'); } - if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && !empty($conf->stock->enabled)) { + if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && isModEnabled('stock')) { print ''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { //print ''; diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index b97af33cb6e..3e8cba9def2 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -23,6 +23,7 @@ * \brief Page with shipment statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionstats.class.php'; diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 254fd9aad90..398bc381715 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -22,6 +22,7 @@ * \brief Page des stats expeditions par mois */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionstats.class.php'; @@ -46,11 +47,12 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mesg = ''; +$mode = ''; print load_fiche_titre($langs->trans("StatisticsOfSendings").' '.$year, $mesg); -$stats = new ExpeditionStats($db); -$data = $stats->getNbExpeditionByMonth($year); +$stats = new ExpeditionStats($db, $socid, $mode); +$data = $stats->getNbByMonth($year); dol_mkdir($conf->expedition->dir_temp); diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 2305b0d4fac..8825cde4b67 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -60,8 +60,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { // For now, shipments must stay linked to order, so link is not deletable if ($object->element != 'commande') { ?> - ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> - id.'&token='.newToken().'&action=dellink&dellinkid='.$key; ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> diff --git a/htdocs/expensereport/ajax/ajaxik.php b/htdocs/expensereport/ajax/ajaxik.php index 9abd767e1f9..209eb3cdde7 100644 --- a/htdocs/expensereport/ajax/ajaxik.php +++ b/htdocs/expensereport/ajax/ajaxik.php @@ -37,9 +37,6 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} $res = 0; require '../../main.inc.php'; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index beb9c501b3e..f6aa14865ec 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -26,6 +26,7 @@ * \brief Page for trip and expense report card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -44,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -68,7 +69,7 @@ $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('socid_id', $childids = $user->getAllChildIds(1); -if (! empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) { +if (!empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) { if (empty($date_start)) { $date_start = dol_mktime(0, 0, 0, (int) dol_print_date(dol_now(), '%m'), 1, (int) dol_print_date(dol_now(), '%Y')); } @@ -83,7 +84,7 @@ if (! empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) { $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data -if (!empty($conf->multicompany->enabled) && !empty($conf->entity) && $conf->entity > 1) { +if (isModEnabled('multicompany') && !empty($conf->entity) && $conf->entity > 1) { $rootfordata .= '/'.$conf->entity; } $conf->expensereport->dir_output = $rootfordata.'/expensereport'; @@ -117,7 +118,7 @@ $permissiontoadd = $user->rights->expensereport->creer; // Used by the include o $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref); -$projectRequired = $conf->project->enabled && ! empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED); +$projectRequired = isModEnabled('project') && !empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED); $fileRequired = !empty($conf->global->EXPENSEREPORT_FILE_IS_REQUIRED); if ($object->id > 0) { @@ -154,6 +155,9 @@ $permissiontoadd = $user->rights->expensereport->creer; // Used by the include o /* * Actions */ +$value_unit_ht = price2num(GETPOST('value_unit_ht', 'alpha'), 'MU'); +$value_unit = price2num(GETPOST('value_unit', 'alpha'), 'MU'); +$qty = price2num(GETPOST('qty', 'alpha')); $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -383,10 +387,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -493,10 +497,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -603,10 +607,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -717,10 +721,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -831,10 +835,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -943,10 +947,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -982,10 +986,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1011,10 +1015,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1185,7 +1189,7 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1229,10 +1233,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1321,10 +1325,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1624,7 +1628,7 @@ if ($action == 'create') { print ''; } else { - $taxlessUnitPriceDisabled = ! empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? ' disabled' : ''; + $taxlessUnitPriceDisabled = !empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? ' disabled' : ''; print dol_get_fiche_head($head, 'card', $langs->trans("ExpenseReport"), -1, 'trip'); @@ -1690,44 +1694,6 @@ if ($action == 'create') { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - /* - // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); - // Project - if (! empty($conf->project->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($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); - } - } 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); @@ -1930,7 +1896,7 @@ if ($action == 'create') { // List of payments already done $nbcols = 3; $nbrows = 0; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $nbrows++; $nbcols++; } @@ -1941,7 +1907,7 @@ if ($action == 'create') { print ''; print ''; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { print ''; } print ''; @@ -1983,13 +1949,13 @@ if ($action == 'create') { $labeltype = $langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_type; print "\n"; // Bank account - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref; $bankaccountstatic->number = $objp->banumber; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $bankaccountstatic->account_number = $objp->account_number; $accountingjournal = new AccountingJournal($db); @@ -2064,7 +2030,7 @@ if ($action == 'create') { print ''; //print ''; print ''; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; } print ''; @@ -2109,7 +2075,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; // Select project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; @@ -2369,14 +2335,14 @@ if ($action == 'create') { print ''; // VAT - $selectedvat = price2num($line->vatrate).($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''); + $selectedvat = price2num($line->vatrate).(!empty($line->vat_src_code) ? ' ('.$line->vat_src_code.')' : ''); print ''; // Unit price print ''; // Unit price with tax @@ -2418,7 +2384,7 @@ if ($action == 'create') { if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { $colspan++; } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $colspan++; } if ($action != 'editline') { @@ -2489,13 +2455,14 @@ if ($action == 'create') { print ''."\n"; print ''; + $tredited = ''; // Case the addfile and linkto file is used for edit (used by following tpl) include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; print ''; print ''; print ''; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; } print ''; @@ -2520,19 +2487,19 @@ if ($action == 'create') { // Select date print ''; // Select project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; } // Select type print ''; if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { @@ -2544,31 +2511,32 @@ if ($action == 'create') { // Add comments print ''; // Select VAT print ''; // Unit price net print ''; // Unit price with tax print ''; // Quantity print ''; // Picture @@ -2767,7 +2735,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'editline') { } // If bank module is used - if ($user->rights->expensereport->to_paid && !empty($conf->banque->enabled) && $object->status == ExpenseReport::STATUS_APPROVED) { + if ($user->rights->expensereport->to_paid && isModEnabled("banque") && $object->status == ExpenseReport::STATUS_APPROVED) { // Pay if ($remaintopay == 0) { print '
    '.$langs->trans('DoPayment').'
    '; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index e0799a46f73..ecb1cf3d65b 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -367,7 +367,7 @@ class ExpenseReport extends CommonObject } if (!$error) { - $result = $this->update_price(); + $result = $this->update_price(1); if ($result > 0) { if (!$notrigger) { // Call trigger @@ -771,6 +771,7 @@ class ExpenseReport extends CommonObject $sql .= " f.date_valid as datev,"; $sql .= " f.date_approve as datea,"; $sql .= " f.fk_user_creat as fk_user_creation,"; + $sql .= " f.fk_user_author as fk_user_author,"; $sql .= " f.fk_user_modif as fk_user_modification,"; $sql .= " f.fk_user_valid,"; $sql .= " f.fk_user_approve"; @@ -1857,7 +1858,7 @@ class ExpenseReport extends CommonObject $result = $this->line->insert(0, true); if ($result > 0) { - $result = $this->update_price(); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. + $result = $this->update_price(1); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. if ($result > 0) { $this->db->commit(); return $this->line->id; @@ -2216,7 +2217,7 @@ class ExpenseReport extends CommonObject return -1; } - $this->update_price(); + $this->update_price(1); $this->db->commit(); @@ -2895,7 +2896,7 @@ class ExpenseReportLine extends CommonObjectLine if (!$fromaddline) { $tmpparent = new ExpenseReport($this->db); $tmpparent->fetch($this->fk_expensereport); - $result = $tmpparent->update_price(); + $result = $tmpparent->update_price(1); if ($result < 0) { $error++; $this->error = $tmpparent->error; @@ -3022,7 +3023,7 @@ class ExpenseReportLine extends CommonObjectLine $tmpparent = new ExpenseReport($this->db); $result = $tmpparent->fetch($this->fk_expensereport); if ($result > 0) { - $result = $tmpparent->update_price(); + $result = $tmpparent->update_price(1); if ($result < 0) { $error++; $this->error = $tmpparent->error; diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 0d374f1c722..503fa92b108 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -120,13 +120,12 @@ class ExpenseReportIk extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) { - $this->fetchLines(); - } + return $result; } + /** * Update object into database * diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 02bf8b8ce5c..d695359229d 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -171,6 +171,19 @@ class ExpenseReportRule extends CommonObject } + /** + * 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(); + + $result = $this->fetchLinesCommon(); + return $result; + } + /** * Update object into database * diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index f7ff6cf7e9c..e871cba86b3 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -516,7 +516,7 @@ class PaymentExpenseReport extends CommonObject $error = 0; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index 8c3b5f56549..a4572c9a169 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -28,6 +28,7 @@ * \brief Page of linked files onto trip and expens reports */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 504101a1720..fced8a58e14 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -28,6 +28,7 @@ * \brief Page list of expenses */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index 605197d14ac..c2216185b5c 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -23,6 +23,7 @@ * \brief Page to show a trip information */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 38f85c6c006..bded18fa597 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -29,6 +29,7 @@ * \brief list of expense reports */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -284,6 +285,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as d"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; @@ -339,20 +343,32 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} //print $sql; $resql = $db->query($sql); @@ -531,7 +547,7 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
    '; @@ -539,6 +555,13 @@ if ($resql) { // Filters print '
    '; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['d.ref']['checked'])) { print ''; } // Action column - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print "\n"; print ''; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + } if (!empty($arrayfields['d.ref']['checked'])) { print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "d.ref", "", $param, '', $sortfield, $sortorder); } @@ -675,7 +703,9 @@ if ($resql) { if (!empty($arrayfields['d.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['d.fk_statut']['label'], $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + } print "\n"; $total_total_ht = 0; @@ -711,6 +741,18 @@ if ($resql) { print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Ref if (!empty($arrayfields['d.ref']['checked'])) { print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index 5649f2144e4..18c99dfd229 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -24,6 +24,7 @@ * \brief Tab for notes on expense reports */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 847c059a9c6..db6c21e202f 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -21,12 +21,13 @@ * \brief Tab payment of an expense report */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/expensereport/modules_expensereport.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } @@ -120,7 +121,7 @@ print '\n"; print ''; - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { print ''; print ''; print ''; } else { - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; + if (!empty($tredited)) { + print ''; + } + print ''; } diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 883ba7ea11e..4b8be1dc74d 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -175,21 +175,21 @@ class Export $this->array_export_perms[$i] = $bool; // Icon $this->array_export_icon[$i] = (isset($module->export_icon[$r]) ? $module->export_icon[$r] : $module->picto); - // Code du dataset export + // Code of the export dataset / Code du dataset export $this->array_export_code[$i] = $module->export_code[$r]; // Define a key for sort $this->array_export_code_for_sort[$i] = $module->module_position.'_'.$module->export_code[$r]; // Add a key into the module - // Libelle du dataset export + // Export Dataset Label / Libelle du dataset export $this->array_export_label[$i] = $module->getExportDatasetLabel($r); - // Tableau des champ a exporter (cle=champ, valeur=libelle) + // Table of fields to export / Tableau des champ a exporter (cle=champ, valeur=libelle) $this->array_export_fields[$i] = $module->export_fields_array[$r]; - // Tableau des champs a filtrer (cle=champ, valeur1=type de donnees) on verifie que le module a des filtres + // Table of fields to be filtered / Tableau des champs a filtrer (cle=champ, valeur1=type de donnees) on verifie que le module a des filtres $this->array_export_TypeFields[$i] = (isset($module->export_TypeFields_array[$r]) ? $module->export_TypeFields_array[$r] : ''); - // Tableau des entites a exporter (cle=champ, valeur=entite) + // Table of entities for export / Tableau des entites a exporter (cle=champ, valeur=entite) $this->array_export_entities[$i] = $module->export_entities_array[$r]; // Tableau des entites qui requiert abandon du DISTINCT (cle=entite, valeur=champ id child records) $this->array_export_dependencies[$i] = (!empty($module->export_dependencies_array[$r]) ? $module->export_dependencies_array[$r] : ''); - // Tableau des operations speciales sur champ + // Table of special field operations / Tableau des operations speciales sur champ $this->array_export_special[$i] = (!empty($module->export_special_array[$r]) ? $module->export_special_array[$r] : ''); // Array of examples $this->array_export_examplevalues[$i] = (!empty($module->export_examplevalues_array[$r]) ? $module->export_examplevalues_array[$r] : null); @@ -461,9 +461,9 @@ class Export } break; case 'List': - // 0 : Type du champ - // 1 : Nom de la table - // 2 : Nom du champ contenant le libelle + // 0 : Type of the field / Type du champ + // 1 : Name of the table / Nom de la table + // 2 : Name of the field containing the label / Nom du champ contenant le libelle // 3 : Name of field with key (if it is not "rowid"). Used this field as key for combo list. // 4 : Name of element for getEntity(). @@ -700,7 +700,7 @@ class Export // Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field // Also the formula may contains objects of class that are not loaded. $computestring = $this->array_export_special[$indice][$key]; - //$tmp = dol_eval($computestring, 1, 0); + //$tmp = dol_eval($computestring, 1, 0, '1'); //$obj->$alias = $tmp; $this->error = "ERROPNOTSUPPORTED. Operation ".$computestring." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 3ba5e0a3591..41d6cd18ed0 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -41,7 +41,7 @@ $result = restrictedArea($user, 'export'); $form = new Form($db); -$help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'; +$help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones|DE:Modul_DatenExporte'; llxHeader('', $langs->trans("ExportsArea"), $help_url); diff --git a/htdocs/externalsite/admin/index.php b/htdocs/externalsite/admin/index.php index 0b55a297be9..deb05ade024 100644 --- a/htdocs/externalsite/admin/index.php +++ b/htdocs/externalsite/admin/index.php @@ -30,6 +30,7 @@ if (!defined('NOSCANPOSTFORINJECTION')) { define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti CSRF attack test } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index 6deb6e9cf72..6b958a15a67 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -26,6 +26,7 @@ * /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_URL_abc to show URL defined into $conf->global->EXTERNAL_SITE_URL_abc */ +// Load Dolibarr environment require '../main.inc.php'; // Load translation files required by the page diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 31459b22b5d..2a6a8d603d1 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -26,6 +26,7 @@ */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,13 +81,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index 5fb1567efe4..ddc34952dc0 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -26,6 +26,7 @@ */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,13 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 3f644b074bd..45779950ea6 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -30,6 +30,7 @@ * \brief Page to show predefined fichinter */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinterrec.class.php'; @@ -37,11 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcontract.class.php'; } @@ -51,7 +52,12 @@ $langs->loadLangs(array("interventions", "admin", "compta", "bills")); // Security check $id = (GETPOST('fichinterid', 'int') ?GETPOST('fichinterid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); +$date_next_execution = GETPOST('date_next_execution', 'alpha'); $action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); +$socid = GETPOST('socid', 'int'); if ($user->socid) { $socid = $user->socid; } @@ -61,12 +67,19 @@ if ($action == "create" || $action == "add") { } $result = restrictedArea($user, 'ficheinter', $id, $objecttype); -if ($page == -1) { +// Load variable for pagination +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; } - -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + $sortorder = GETPOST('sortorder', 'aZ09comma'); $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -101,6 +114,17 @@ $arrayfields = array( * Actions */ +if ($cancel) { + /*var_dump($cancel);var_dump($backtopage);var_dump($backtopageforcancel);exit;*/ + if (!empty($backtopageforcancel)) { + header("Location: ".$backtopageforcancel); + exit; + } elseif (!empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + $action = ''; +} // Create predefined intervention if ($action == 'add') { @@ -129,6 +153,8 @@ if ($action == 'add') { setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Date")), null, 'errors'); $action = "create"; $error++; + } else { + $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); } if ($nb_gen_max === '') { setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("MaxPeriodNumber")), null, 'errors'); @@ -150,7 +176,6 @@ if ($action == 'add') { $object->nb_gen_max = $nb_gen_max; $object->auto_validate = GETPOST('auto_validate', 'int'); - $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); $object->date_when = $date_next_execution; if ($object->create($user) > 0) { @@ -241,10 +266,10 @@ llxHeader('', $langs->trans("RepeatableIntervention"), $help_url); $form = new Form($db); $companystatic = new Societe($db); -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $contratstatic = new Contrat($db); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $projectstatic = new Project($db); } @@ -267,15 +292,16 @@ if ($action == 'create') { print ''; print ''; print ''; + print ''; print ''; print dol_get_fiche_head(); $rowspan = 4; - if (!empty($conf->project->enabled) && $object->fk_project > 0) { + if (isModEnabled('project') && $object->fk_project > 0) { $rowspan++; } - if (!empty($conf->contrat->enabled) && $object->fk_contrat > 0) { + if (isModEnabled('contrat') && $object->fk_contrat > 0) { $rowspan++; } @@ -314,7 +340,7 @@ if ($action == 'create') { } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); print ""; } @@ -356,7 +382,7 @@ if ($action == 'create') { // First date of execution for cron print ""; // Contract - if (!empty($conf->contrat->enabled)) { + if (isModEnabled('contrat')) { $langs->load('contracts'); print ''; print ''; print_liste_field_titre("Ref", $_SERVER['PHP_SELF'], "f.titre", "", "", 'width="200px"', $sortfield, $sortorder, 'left '); print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "s.nom", "", "", 'width="200px"', $sortfield, $sortorder, 'left '); - if (!empty($conf->contrat->enabled)) { + if (isModEnabled('contrat')) { print_liste_field_titre("Contract", $_SERVER['PHP_SELF'], "f.fk_contrat", "", "", 'width="100px"', $sortfield, $sortorder, 'left '); } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print_liste_field_titre("Project", $_SERVER['PHP_SELF'], "f.fk_project", "", "", 'width="100px"', $sortfield, $sortorder, 'left '); } print_liste_field_titre("Duration", $_SERVER['PHP_SELF'], 'f.duree', '', '', 'width="50px"', $sortfield, $sortorder, 'right '); @@ -834,7 +858,7 @@ if ($action == 'create') { print ''; } - if (!empty($conf->contrat->enabled)) { + if (isModEnabled('contrat')) { print ''; } - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); $langs->load("project"); @@ -998,7 +1000,7 @@ if ($action == 'create') { print '"; - if (!empty($conf->multicurrency->enabled)) + if (isModEnabled("multicurrency")) { print ''; print '"; @@ -1157,9 +1159,9 @@ if ($action == 'create') { $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->ficheinter->creer) { @@ -1233,7 +1235,7 @@ if ($action == 'create') { print ''; // Contract - if (!empty($conf->contrat->enabled)) { + if (isModEnabled('contrat')) { $langs->load('contracts'); print ''; print '"; print ''; - // Mode de reglement par defaut + // Default payment mode print '"; print ''; + if (isModEnabled("banque")) { + // Default bank account for payments + print '"; + print ''; + } + // Relative discounts (Discounts-Drawbacks-Rebates) print '
    '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").''.$langs->trans("RealStock").' '; print $product->stock_reel; if ($product->stock_reel < $toBeShipped[$objp->fk_product]) { @@ -857,7 +847,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; // Bouton expedier sans gestion des stocks - if (empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { + if (!isModEnabled('stock') && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { if ($user->rights->expedition->creer) { print ''.$langs->trans("CreateShipment").''; if ($toBeShippedTotal <= 0) { @@ -873,11 +863,11 @@ if ($id > 0 || !empty($ref)) { // Bouton expedier avec gestion des stocks - if (!empty($conf->stock->enabled) && $object->statut == Commande::STATUS_DRAFT) { + if (isModEnabled('stock') && $object->statut == Commande::STATUS_DRAFT) { print $langs->trans("ValidateOrderFirstBeforeShipment"); } - if (!empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { + if (isModEnabled('stock') && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { if ($user->rights->expedition->creer) { //print load_fiche_titre($langs->trans("CreateShipment")); print '
    '; @@ -895,7 +885,7 @@ if ($id > 0 || !empty($ref)) { //print '
    '; print $langs->trans("WarehouseSource"); //print '
    '.$langs->trans('Payments').''.$langs->trans('Date').''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').'".$labeltype.' '.$objp->num_payment."'.$langs->trans('LineNb').''.$langs->trans('Piece').''.$langs->trans('Date').''.$langs->trans('Project').''.$langs->trans('Type').''.dol_print_date($db->jdate($line->date), 'day').''; if ($line->fk_project > 0) { $projecttmp->id = $line->fk_project; @@ -2121,7 +2087,7 @@ if ($action == 'create') { } $titlealt = ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; $accountingaccount = new AccountingAccount($db); $resaccountingaccount = $accountingaccount->fetch(0, $line->type_fees_accountancy_code, 1); @@ -2270,7 +2236,7 @@ if ($action == 'create') { if ($action == 'editline' && $line->rowid == GETPOST('rowid', 'int')) { // Add line with link to add new file or attach line to an existing file $colspan = 11; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $colspan++; } if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { @@ -2331,7 +2297,7 @@ if ($action == 'create') { } } - $tredited = 'tredited'; + $tredited = 'tredited'; // Case the addfile and linkto file is used for edit (used by following tpl) include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; @@ -2345,7 +2311,7 @@ if ($action == 'create') { print ''; $formproject->select_projects(-1, $line->fk_project, 'fk_project', 0, 0, $projectRequired ? 0 : 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print ''; print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $selectedvat), $mysoc, '', 0, 0, '', false, 1); print ''; - print ''; + print ''; print '
    '.$langs->trans('Date').''.$form->textwithpicto($langs->trans('Project'), $langs->trans("ClosedProjectsAreHidden")).''.$langs->trans('Type').''; - print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1); + print $form->selectDate(!empty($date) ? $date : -1, 'date', 0, 0, 0, '', 1, 1); print ''; - $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); + $formproject->select_projects(-1, !empty($fk_project) ? $fk_project : 0, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print ''; - print $formexpensereport->selectTypeExpenseReport($fk_c_type_fees, 'fk_c_type_fees', 1); + print $formexpensereport->selectTypeExpenseReport(!empty($fk_c_type_fees) ? $fk_c_type_fees : "", 'fk_c_type_fees', 1); print ''; - print ''; + print ''; print ''; $defaultvat = -1; if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) { + // If option to have no default VAT on expense report is on, we force MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none'; } - print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1); + print $form->load_tva('vatrate', (!empty($vatrate) ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1); print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; // We must be able to enter decimal qty + print ''; // We must be able to enter decimal qty print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; print ''; @@ -625,14 +648,19 @@ if ($resql) { print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - 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 ''; @@ -855,15 +897,17 @@ if ($resql) { } } // Action column - 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; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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 ''; + print '
    '.$langs->trans('Note').''.nl2 $disable_delete = 0; // Bank account -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); @@ -237,12 +238,13 @@ if ($resql) { */ print '
    '; +// Delete if ($action == '') { if ($user->rights->expensereport->supprimer) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1); } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($title_button, $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0); } } } diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php index a654c77b6cd..b5d87b81a51 100644 --- a/htdocs/expensereport/payment/info.php +++ b/htdocs/expensereport/payment/info.php @@ -24,6 +24,7 @@ * \brief Tab payment info */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; diff --git a/htdocs/expensereport/payment/list.php b/htdocs/expensereport/payment/list.php index 3f3e017612d..cb93aae4ff0 100644 --- a/htdocs/expensereport/payment/list.php +++ b/htdocs/expensereport/payment/list.php @@ -33,6 +33,7 @@ * \brief Payment list for expense reports */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -103,7 +104,7 @@ $arrayfields = array( 'u.login' =>array('label'=>"User", 'checked'=>1, 'position'=>30), 'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40), 'pndf.num_payment' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"), - 'ba.label' =>array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->banque->enabled))), + 'ba.label' =>array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enable'=>(isModEnabled("banque"))), 'pndf.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70), ); $arrayfields = dol_sort_array($arrayfields, 'position'); diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 3676f663ce8..6456bf80d7f 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -23,6 +23,7 @@ * \brief Page to add payment of an expense report */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; @@ -76,7 +77,7 @@ if ($action == 'add_payment') { $error++; } - if (!empty($conf->banque->enabled) && !($accountid > 0)) { + if (isModEnabled("banque") && !($accountid > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; } @@ -245,7 +246,7 @@ if ($action == 'create' || empty($action)) { print "
    '.$langs->trans('AccountToDebit').''; diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index ded5a7a3805..e9fdd03a2be 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -24,6 +24,7 @@ * \brief Page for statistics of module trips and expenses */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereportstats.class.php'; @@ -53,7 +54,7 @@ if ($user->socid) { } $result = restrictedArea($user, 'expensereport', $id, ''); -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index 3835740dd40..fd25a1fff4b 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -136,8 +136,18 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print '
    '; + if (empty($tredited)) { + $css = 'oddeven nohover trattachnewfilenow'; + $newcolspan = $colspan; + } else { + $css = 'trattachnewfilenow tredited'; + $newcolspan = $colspan - 1; + } + print '
    '; print ''.$langs->trans("NoFilesUploadedYet").''; print '
    ".$langs->trans("Project").""; $projectid = GETPOST('projectid') ?GETPOST('projectid') : $object->fk_project; @@ -328,10 +354,10 @@ if ($action == 'create') { } // Contrat - if (!empty($conf->contrat->enabled)) { + if (isModEnabled('contrat')) { $formcontract = new FormContract($db); print "
    ".$langs->trans("Contract").""; - $contractid = GETPOST('contractid') ?GETPOST('contractid') : $object->fk_contract; + $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0) ; $numcontract = $formcontract->select_contract($object->thirdparty->id, $contractid, 'contracttid'); print "
    ".$langs->trans('NextDateToExecution').""; - if ($date_next_execution != "") { + if (empty($date_next_execution)) { $date_next_execution = (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); } print $form->selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1); @@ -484,7 +510,7 @@ if ($action == 'create') { $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $formproject = new FormProjets($db); $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; @@ -539,7 +565,7 @@ if ($action == 'create') { print '
    '.$langs->trans("Description").''.nl2br($object->description)."
    '; @@ -740,11 +766,9 @@ if ($action == 'create') { print $langs->trans("AddIntervention").''; } - if ($user->rights->ficheinter->supprimer) { - print ''; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->rights->ficheinter->supprimer); + print ''; } else { print $langs->trans("ErrorRecordNotFound"); @@ -764,22 +788,22 @@ if ($action == 'create') { } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.entity = ".$conf->entity; - if ($socid) { + if (!empty($socid)) { $sql .= " AND s.rowid = ".((int) $socid); } if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } - if ($search_ref) { + if (!empty($search_ref)) { $sql .= natural_search('f.titre', $search_ref); } - if ($search_societe) { + if (!empty($search_societe)) { $sql .= natural_search('s.nom', $search_societe); } - if ($search_frequency == '1') { + if (!empty($search_frequency) && $search_frequency == '1') { $sql .= ' AND f.frequency > 0'; } - if ($search_frequency == '0') { + if (isset($search_frequency) && (string) $search_frequency == '0') { $sql .= ' AND (f.frequency IS NULL or f.frequency = 0)'; } @@ -800,10 +824,10 @@ if ($action == 'create') { print '
    '.$langs->trans("None").''; if ($objp->fk_contrat > 0) { $contratstatic->fetch($objp->fk_contrat); @@ -842,7 +866,7 @@ if ($action == 'create') { } print ''; if ($objp->fk_project > 0) { $projectstatic->fetch($objp->fk_project); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index d03cb11a7e0..aff1076eda5 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -7,7 +7,7 @@ * Copyright (C) 2014-2018 Ferran Marcet * Copyright (C) 2014-2022 Charlene Benke * Copyright (C) 2015-2016 Abbes Bahfir - * Copyright (C) 2018 Philippe Grand + * Copyright (C) 2018-2022 Philippe Grand * Copyright (C) 2020 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -30,13 +30,14 @@ * \ingroup ficheinter */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -103,6 +104,7 @@ $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $permissionnote = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->ficheinter->creer; // Used by the include of actions_dellink.inc.php +$permissiontodelete = (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer); /* @@ -173,10 +175,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -198,10 +200,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -310,7 +312,7 @@ if (empty($reshook)) { $prod->id = $lines[$i]->fk_product; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod->getMultiLangs(); // We show if duration is present on service (so we get it) $prod->fetch($lines[$i]->fk_product); @@ -516,10 +518,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -612,10 +614,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -645,10 +647,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -665,10 +667,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -687,10 +689,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -784,10 +786,10 @@ if (empty($reshook)) { $form = new Form($db); $formfile = new FormFile($db); -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $formcontract = new FormContract($db); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -908,7 +910,7 @@ if ($action == 'create') { print '
    ' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . "
    ' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . '
    ' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . "
    '; @@ -1640,12 +1642,12 @@ if ($action == 'create') { // Create intervention model if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { print ''; } // Proposal - if ($conf->service->enabled && !empty($conf->propal->enabled) && $object->statut > Fichinter::STATUS_DRAFT) { + if ($conf->service->enabled && isModEnabled("propal") && $object->statut > Fichinter::STATUS_DRAFT) { $langs->load("propal"); if ($object->statut < Fichinter::STATUS_BILLED) { if ($user->rights->propal->creer) { @@ -1687,10 +1689,7 @@ if ($action == 'create') { } // Delete - if (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) { - print ''; - } + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } } } @@ -1714,6 +1713,19 @@ if ($action == 'create') { $linktoelem = $form->showLinkToObjectBlock($object, null, array('fichinter')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + // Show direct download link + if ($object->statut != Fichinter::STATUS_DRAFT && !empty($conf->global->FICHINTER_ALLOW_EXTERNAL_DOWNLOAD)) { + print '
    '."\n"; + print showDirectDownloadLink($object).'
    '; + } + + // Show online signature link + if ($object->statut != Fichinter::STATUS_DRAFT && !empty($conf->global->FICHINTER_ALLOW_ONLINE_SIGN)) { + print '
    '; + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; + + print showOnlineSignatureUrl('fichinter', $object->ref).'
    '; + } print '
    '; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index b1f99d40456..e36598d04bc 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -36,36 +36,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; */ class Fichinter extends CommonObject { - public $fields = array( - 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), - 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'notnull'=>1, 'position'=>15), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>20), - 'fk_contrat' =>array('type'=>'integer', 'label'=>'Fk contrat', 'enabled'=>'$conf->contrat->enabled', 'visible'=>-1, 'position'=>25), - 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30), - 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), - 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>36), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>40, 'index'=>1), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>45), - 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>50), - 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55), - 'datei' =>array('type'=>'date', 'label'=>'Datei', 'enabled'=>1, 'visible'=>-1, 'position'=>60), - 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>65), - 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>70), - 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>75), - 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500), - 'dateo' =>array('type'=>'date', 'label'=>'Dateo', 'enabled'=>1, 'visible'=>-1, 'position'=>85), - 'datee' =>array('type'=>'date', 'label'=>'Datee', 'enabled'=>1, 'visible'=>-1, 'position'=>90), - 'datet' =>array('type'=>'date', 'label'=>'Datet', 'enabled'=>1, 'visible'=>-1, 'position'=>95), - 'duree' =>array('type'=>'double', 'label'=>'Duree', 'enabled'=>1, 'visible'=>-1, 'position'=>100), - 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>105, 'showoncombobox'=>2), - 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>110), - 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>115), - 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>120), - 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>125), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>130), - 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>135), + 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'notnull'=>1, 'position'=>15), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'isModEnabled("project")', 'visible'=>-1, 'position'=>20), + 'fk_contrat' =>array('type'=>'integer', 'label'=>'Fk contrat', 'enabled'=>'$conf->contrat->enabled', 'visible'=>-1, 'position'=>25), + 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30), + 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), + 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>36), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>40, 'index'=>1), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>45), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>50), + 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55), + 'datei' =>array('type'=>'date', 'label'=>'Datei', 'enabled'=>1, 'visible'=>-1, 'position'=>60), + 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>65), + 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>70), + 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>75), + 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500), + 'dateo' =>array('type'=>'date', 'label'=>'Dateo', 'enabled'=>1, 'visible'=>-1, 'position'=>85), + 'datee' =>array('type'=>'date', 'label'=>'Datee', 'enabled'=>1, 'visible'=>-1, 'position'=>90), + 'datet' =>array('type'=>'date', 'label'=>'Datet', 'enabled'=>1, 'visible'=>-1, 'position'=>95), + 'duree' =>array('type'=>'double', 'label'=>'Duree', 'enabled'=>1, 'visible'=>-1, 'position'=>100), + 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>105, 'showoncombobox'=>2), + 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>110), + 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>115), + 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>120), + 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>125), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>130), + 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>135), ); + /** * @var string ID to identify managed object */ @@ -442,7 +442,7 @@ class Fichinter extends CommonObject $sql .= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; $sql .= " f.date_valid as datev,"; $sql .= " f.tms as datem,"; - $sql .= " f.duree, f.fk_projet as fk_project, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat, f.entity as entity"; + $sql .= " f.duree, f.fk_projet as fk_project, f.note_public, f.note_private, f.model_pdf, f.last_main_doc, f.extraparams, fk_contrat, f.entity as entity"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; if ($ref) { $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -482,6 +482,8 @@ class Fichinter extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); + $this->last_main_doc = $obj->last_main_doc; + if ($this->statut == 0) { $this->brouillon = 1; } @@ -524,6 +526,8 @@ class Fichinter extends CommonObject dol_syslog(get_class($this)."::setDraft", LOG_DEBUG); + $this->oldcopy = dol_clone($this); + $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter"; @@ -532,10 +536,6 @@ class Fichinter extends CommonObject $resql = $this->db->query($sql); if ($resql) { - if (!$error) { - $this->oldcopy = clone $this; - } - if (!$error) { // Call trigger $result = $this->call_trigger('FICHINTER_UNVALIDATE', $user); @@ -1189,8 +1189,8 @@ class Fichinter extends CommonObject if ($objsoc->fetch($socid) > 0) { $this->socid = $objsoc->id; - //$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - //$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + //$this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + //$this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); $this->fk_project = ''; $this->fk_delivery_address = ''; } @@ -1269,7 +1269,8 @@ class Fichinter extends CommonObject $line->fk_fichinter = $fichinterid; $line->desc = $desc; - $line->datei = $date_intervention; + $line->date = $date_intervention; + $line->datei = $date_intervention; // For backward compatibility $line->duration = $duration; if (is_array($array_options) && count($array_options) > 0) { @@ -1318,7 +1319,8 @@ class Fichinter extends CommonObject while ($xnbp < $nbp) { $line = new FichinterLigne($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; - $line->datei = ($now - 3600 * (1 + $xnbp)); + $line->date = ($now - 3600 * (1 + $xnbp)); + $line->datei = ($now - 3600 * (1 + $xnbp)); // For backward compatibility $line->duration = 600; $line->fk_fichinter = 0; $this->lines[$xnbp] = $line; @@ -1361,7 +1363,7 @@ class Fichinter extends CommonObject //For invoicing we calculing hours $line->qty = round($objp->duree / 3600, 2); $line->date = $this->db->jdate($objp->date); - $line->datei = $this->db->jdate($objp->date); + $line->datei = $this->db->jdate($objp->date); // For backward compatibility $line->rang = $objp->rang; $line->product_type = 1; $line->fetch_optionals(); @@ -1411,6 +1413,8 @@ class Fichinter extends CommonObject $this->db->begin(); + $this->oldcopy = dol_clone($this); + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref_client = ".(empty($ref_client) ? 'NULL' : "'".$this->db->escape($ref_client)."'"); $sql .= " WHERE rowid = ".((int) $this->id); @@ -1422,7 +1426,6 @@ class Fichinter extends CommonObject } if (!$error) { - $this->oldcopy = clone $this; $this->ref_client = $ref_client; } @@ -1487,6 +1490,8 @@ class FichinterLigne extends CommonObjectLine public $duration; // Duration of intervention public $rang = 0; + public $tva_tx; + public $subprice; /** * @var string ID to identify managed object @@ -1523,8 +1528,7 @@ class FichinterLigne extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT ft.rowid, ft.fk_fichinter, ft.description, ft.duree, ft.rang,'; - $sql .= ' ft.date as datei'; + $sql = 'SELECT ft.rowid, ft.fk_fichinter, ft.description, ft.duree, ft.rang, ft.date'; $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; $sql .= ' WHERE ft.rowid = '.((int) $rowid); @@ -1535,7 +1539,8 @@ class FichinterLigne extends CommonObjectLine $this->rowid = $objp->rowid; $this->id = $objp->rowid; $this->fk_fichinter = $objp->fk_fichinter; - $this->datei = $this->db->jdate($objp->datei); + $this->date = $this->db->jdate($objp->date); + $this->datei = $this->db->jdate($objp->date); // For backward compatibility $this->desc = $objp->description; $this->duration = $objp->duree; $this->rang = $objp->rang; @@ -1563,6 +1568,10 @@ class FichinterLigne extends CommonObjectLine dol_syslog("FichinterLigne::insert rang=".$this->rang); + if (empty($this->date) && !empty($this->datei)) { // For backward compatibility + $this->date = $this->datei; + } + $this->db->begin(); $rangToUse = $this->rang; @@ -1586,7 +1595,7 @@ class FichinterLigne extends CommonObjectLine $sql .= ' (fk_fichinter, description, date, duree, rang)'; $sql .= " VALUES (".((int) $this->fk_fichinter).","; $sql .= " '".$this->db->escape($this->desc)."',"; - $sql .= " '".$this->db->idate($this->datei)."',"; + $sql .= " '".$this->db->idate($this->date)."',"; $sql .= " ".((int) $this->duration).","; $sql .= ' '.((int) $rangToUse); $sql .= ')'; @@ -1648,14 +1657,18 @@ class FichinterLigne extends CommonObjectLine $error = 0; + if (empty($this->date) && !empty($this->datei)) { // For backward compatibility + $this->date = $this->datei; + } + $this->db->begin(); // Mise a jour ligne en base $sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET"; - $sql .= " description='".$this->db->escape($this->desc)."'"; - $sql .= ",date='".$this->db->idate($this->datei)."'"; - $sql .= ",duree=".$this->duration; - $sql .= ",rang='".$this->db->escape($this->rang)."'"; + $sql .= " description = '".$this->db->escape($this->desc)."',"; + $sql .= " date = '".$this->db->idate($this->date)."',"; + $sql .= " duree = ".((int) $this->duration).","; + $sql .= " rang = ".((int) $this->rang); $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog("FichinterLigne::update", LOG_DEBUG); diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index b128bba60f8..6f9beb5d051 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -19,7 +19,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -64,7 +64,6 @@ class FichinterRec extends Fichinter public $number; public $date; public $amount; - public $remise; public $tva; public $total; @@ -222,7 +221,7 @@ class FichinterRec extends Fichinter $result_insert = $this->addline( $fichintsrc->lines[$i]->desc, $fichintsrc->lines[$i]->duration, - $fichintsrc->lines[$i]->datei, + $fichintsrc->lines[$i]->date, $fichintsrc->lines[$i]->rang, $fichintsrc->lines[$i]->subprice, $fichintsrc->lines[$i]->qty, @@ -235,7 +234,7 @@ class FichinterRec extends Fichinter 0, $fichintsrc->lines[$i]->product_type, $fichintsrc->lines[$i]->special_code, - $fichintsrc->lines[$i]->label, + !empty($fichintsrc->lines[$i]->label) ? $fichintsrc->lines[$i]->label : "", $fichintsrc->lines[$i]->fk_unit ); @@ -305,10 +304,10 @@ class FichinterRec extends Fichinter $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; - $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; // deprecated - $this->rang = $obj->rang; - $this->special_code = $obj->special_code; + $this->model_pdf = !empty($obj->model_pdf) ? $obj->model_pdf : ""; + $this->modelpdf = !empty($obj->model_pdf) ? $obj->model_pdf : ""; // deprecated + $this->rang = !empty($obj->rang) ? $obj->rang : ""; + $this->special_code = !empty($obj->special_code) ? $obj->special_code : ""; $this->frequency = $obj->frequency; $this->unit_frequency = $obj->unit_frequency; $this->date_when = $this->db->jdate($obj->date_when); @@ -350,8 +349,8 @@ class FichinterRec extends Fichinter // phpcs:enable $this->lines = array(); - $sql = 'SELECT l.rowid, l.fk_product, l.product_type as product_type, l.label as custom_label, l.description, '; - $sql .= ' l.price, l.qty, l.tva_tx, l.remise_percent, l.subprice, l.duree, '; + $sql = 'SELECT l.rowid, l.fk_product, l.product_type as product_type, l.label as custom_label, l.description,'; + $sql .= ' l.price, l.qty, l.tva_tx, l.remise_percent, l.subprice, l.duree, l.date,'; $sql .= ' l.total_ht, l.total_tva, l.total_ttc,'; $sql .= ' l.rang, l.special_code,'; $sql .= ' l.fk_unit, p.ref as product_ref, p.fk_product_type as fk_product_type,'; @@ -381,19 +380,16 @@ class FichinterRec extends Fichinter $line->qty = $objp->qty; $line->duree = $objp->duree; $line->duration = $objp->duree; - $line->datei = $objp->date; + $line->date = $objp->date; $line->subprice = $objp->subprice; $line->tva_tx = $objp->tva_tx; $line->remise_percent = $objp->remise_percent; - $line->fk_remise_except = $objp->fk_remise_except; + $line->fk_remise_except = !empty($objp->fk_remise_except) ? $objp->fk_remise_except : ""; $line->fk_product = $objp->fk_product; - $line->date_start = $objp->date_start; - $line->date_end = $objp->date_end; - $line->info_bits = $objp->info_bits; + $line->info_bits = !empty($objp->info_bits) ? $objp->info_bits : ""; $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; $line->total_ttc = $objp->total_ttc; - $line->code_ventilation = $objp->fk_code_ventilation; $line->rang = $objp->rang; $line->special_code = $objp->special_code; $line->fk_unit = $objp->fk_unit; @@ -460,7 +456,7 @@ class FichinterRec extends Fichinter * * @param string $desc Description de la ligne * @param integer $duration Durée - * @param string $datei Date + * @param string $date Date * @param int $rang Position of line * @param double $pu_ht Unit price without tax (> 0 even for credit note) * @param double $qty Quantity @@ -477,7 +473,7 @@ class FichinterRec extends Fichinter * @param string $fk_unit Unit * @return int <0 if KO, Id of line if OK */ - public function addline($desc, $duration, $datei, $rang = -1, $pu_ht = 0, $qty = 0, $txtva = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $special_code = 0, $label = '', $fk_unit = null) + public function addline($desc, $duration, $date, $rang = -1, $pu_ht = 0, $qty = 0, $txtva = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $special_code = 0, $label = '', $fk_unit = null) { global $mysoc; @@ -520,6 +516,8 @@ class FichinterRec extends Fichinter $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; + $pu_ht = $tabprice[3]; + $product_type = $type; if ($fk_product) { $product = new Product($this->db); @@ -539,8 +537,7 @@ class FichinterRec extends Fichinter $sql .= ", fk_product"; $sql .= ", product_type"; $sql .= ", remise_percent"; - //$sql.= ", subprice"; - $sql .= ", remise"; + $sql .= ", subprice"; $sql .= ", total_ht"; $sql .= ", total_tva"; $sql .= ", total_ttc"; @@ -551,7 +548,7 @@ class FichinterRec extends Fichinter $sql .= (int) $this->id; $sql .= ", ".(!empty($label) ? "'".$this->db->escape($label)."'" : "null"); $sql .= ", ".(!empty($desc) ? "'".$this->db->escape($desc)."'" : "null"); - $sql .= ", ".(!empty($datei) ? "'".$this->db->idate($datei)."'" : "null"); + $sql .= ", ".(!empty($date) ? "'".$this->db->idate($date)."'" : "null"); $sql .= ", ".$duration; //$sql.= ", ".price2num($pu_ht); //$sql.= ", ".(!empty($qty)? $qty :(!empty($duration)? $duration :"null")); @@ -559,8 +556,7 @@ class FichinterRec extends Fichinter $sql .= ", ".(!empty($fk_product) ? $fk_product : "null"); $sql .= ", ".$product_type; $sql .= ", ".(!empty($remise_percent) ? $remise_percent : "null"); - //$sql.= ", '".price2num($pu_ht)."'"; - $sql .= ", null"; + $sql.= ", '".price2num($pu_ht)."'"; $sql .= ", '".price2num($total_ht)."'"; $sql .= ", '".price2num($total_tva)."'"; $sql .= ", '".price2num($total_ttc)."'"; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index ef6ffc80881..02099d959c7 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -23,6 +23,7 @@ * \brief Onglet de gestion des contacts de fiche d'intervention */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -123,7 +124,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->ficheinter->creer) { diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index d0dd326df07..1b388763c02 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -28,13 +28,14 @@ * \brief Page des documents joints sur les contrats */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.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/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -123,7 +124,7 @@ if ($object->id) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->commande->creer) { diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 7e0bf6f7f44..c7b150b7d2d 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -25,6 +25,7 @@ * \brief Home page of interventional module */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; @@ -169,7 +170,7 @@ if ($resql) { /* * Draft orders */ -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; @@ -292,7 +293,7 @@ if ($resql) { * interventions to process */ -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index 589f1901cd6..c556ba022e0 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -24,11 +24,12 @@ * \brief Page d'affichage des infos d'une fiche d'intervention */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -78,7 +79,7 @@ $morehtmlref = '
    '; // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->commande->creer) { diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 9f887c36900..9e8f7896860 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -29,24 +29,25 @@ * \ingroup ficheinter */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } // Load translation files required by the page $langs->loadLangs(array('companies', 'bills', 'interventions')); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $langs->load("contracts"); } @@ -120,13 +121,13 @@ $arrayfields = array( 'f.ref'=>array('label'=>'Ref', 'checked'=>1), 'f.ref_client'=>array('label'=>'RefCustomer', 'checked'=>1), 's.nom'=>array('label'=>'ThirdParty', 'checked'=>1), - 'pr.ref'=>array('label'=>'Project', 'checked'=>1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1)), + 'pr.ref'=>array('label'=>'Project', 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1)), 'c.ref'=>array('label'=>'Contract', 'checked'=>1, 'enabled'=>(empty($conf->contrat->enabled) ? 0 : 1)), 'f.description'=>array('label'=>'Description', 'checked'=>1), 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500), - 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), - 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), + 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000), 'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), 'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), @@ -202,10 +203,10 @@ $form = new Form($db); $formfile = new FormFile($db); $objectstatic = new Fichinter($db); $companystatic = new Societe($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $projetstatic = new Project($db); } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $contratstatic = new Contrat($db); } @@ -234,10 +235,10 @@ if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= " fd.rowid as lineid, fd.description as descriptiondetail, fd.date as dp, fd.duree,"; } $sql .= " s.nom as name, s.rowid as socid, s.client, s.fournisseur, s.email, s.status as thirdpartystatus"; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title"; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_customer, c.ref_supplier as contrat_ref_supplier"; } // Add fields from extrafields @@ -250,11 +251,14 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr on f.fk_projet = pr.rowid"; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid"; } if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { @@ -323,20 +327,18 @@ $sql .= $hookmanager->resPrint; // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - /* This old and fast method to get and count full list returns all record so use a high amount of memory. */ - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); /* The fast and low memory method to get and count full list converts the sql into a sql count */ - /*$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); $resql = $db->query($sqlforcount); if ($resql) { $objforcount = $db->fetch_object($resql); $nbtotalofrecords = $objforcount->nbtotalofrecords; } else { dol_print_error($db); - }*/ + } - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -492,7 +494,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
    '; @@ -502,7 +504,7 @@ print ''; // Action column -if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; } // Fields of detail line @@ -587,7 +589,7 @@ if (!empty($arrayfields['fd.duree']['checked'])) { print ''; } // Action column -if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['f.ref']['checked'])) { print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); } @@ -649,7 +655,11 @@ if (!empty($arrayfields['fd.date']['checked'])) { if (!empty($arrayfields['fd.duree']['checked'])) { print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + +// Action column +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; @@ -686,7 +696,18 @@ while ($i < $imaxinloop) { $companystatic->status = $obj->thirdpartystatus; print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['f.ref']['checked'])) { print "'; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; $oldyear = $year; } diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 7538846c6a1..910b56ddae4 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -34,7 +34,7 @@ if (!defined('DOL_APPLICATION_TITLE')) { define('DOL_APPLICATION_TITLE', 'Dolibarr'); } if (!defined('DOL_VERSION')) { - define('DOL_VERSION', '16.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c + define('DOL_VERSION', '17.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c } if (!defined('EURO')) { @@ -253,7 +253,7 @@ if (empty($dolibarr_main_data_root)) { // Define some constants define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir (defined only for some code that want to be compatible with old versions without this parameter) define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents) -// Try to autodetect DOL_MAIN_URL_ROOT and DOL_URL_ROOT. +// Try to autodetect DOL_MAIN_URL_ROOT and DOL_URL_ROOT when root is not directly the main domain. // Note: autodetect works only in case 1, 2, 3 and 4 of phpunit test CoreTest.php. For case 5, 6, only setting value into conf.php will works. $tmp = ''; $found = 0; @@ -283,7 +283,8 @@ foreach ($paths as $tmppath) { // We check to find (B+start of C)=A } //print "found=".$found." dolibarr_main_url_root=".$dolibarr_main_url_root."\n"; if (!$found) { - $tmp = $dolibarr_main_url_root; // If autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT). + // There is no subdir that compose the main url root or autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT). + $tmp = $dolibarr_main_url_root; } else { $tmp = 'http'.(((empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') && (empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] != 443)) ? '' : 's').'://'.$_SERVER["SERVER_NAME"].((empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == 80 || $_SERVER["SERVER_PORT"] == 443) ? '' : ':'.$_SERVER["SERVER_PORT"]).($tmp3 ? (preg_match('/^\//', $tmp3) ? '' : '/').$tmp3 : ''); } @@ -311,9 +312,6 @@ define('MAIN_DB_PREFIX', $dolibarr_main_db_prefix); * To use other version than embeded libraries, define here constant to path. Use '' to use include class path autodetect. */ // Path to root libraries -if (!defined('ADODB_PATH')) { - define('ADODB_PATH', (!isset($dolibarr_lib_ADODB_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/adodbtime/' : (empty($dolibarr_lib_ADODB_PATH) ? '' : $dolibarr_lib_ADODB_PATH.'/')); -} if (!defined('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/tecnickcom/tcpdf/' : $dolibarr_lib_TCPDF_PATH.'/'); } @@ -354,10 +352,6 @@ if (!defined('DOL_DEFAULT_TTF_BOLD')) { * Include functions */ -if (!defined('ADODB_DATE_VERSION')) { - include_once ADODB_PATH.'adodb-time.inc.php'; -} - // If password is encoded, we decode it. Note: When page is called for install, $dolibarr_main_db_pass may not be defined yet. if ((!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) || !empty($dolibarr_main_db_encrypted_pass)) { if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index 6cfc4fbe7b9..29cf421059e 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -35,6 +35,7 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; @@ -92,7 +93,7 @@ if ($idprod > 0) { } // After best supplier prices and before costprice - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { // Add price for pmp $price = $producttmp->pmp; if (empty($price) && !empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { @@ -114,7 +115,7 @@ if ($idprod > 0) { // Add price for costprice (at end) $price = $producttmp->cost_price; - if (empty($price) && ! empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { + if (empty($price) && !empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { // get costprice for subproducts if any $producttmp->get_sousproduits_arbo(); $prods_arbo=$producttmp->get_arbo_each_prod(); diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index fb89cd2c455..90a760e14a1 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -29,6 +29,7 @@ * \brief Page for supplier third party card (view, edit) */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; @@ -36,10 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; } -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } @@ -105,7 +106,7 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } } - // terms of the settlement + // Set payment terms of the settlement if ($action == 'setconditions' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentTerms(GETPOST('cond_reglement_supplier_id', 'int')); @@ -113,7 +114,7 @@ if (empty($reshook)) { dol_print_error($db, $object->error); } } - // mode de reglement + // Payment mode if ($action == 'setmode' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_supplier_id', 'int')); @@ -122,6 +123,15 @@ if (empty($reshook)) { } } + // Bank account + if ($action == 'setbankaccount' && $user->rights->societe->creer) { + $object->fetch($id); + $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + // update supplier order min amount if ($action == 'setsupplier_order_min_amount') { $object->fetch($id); @@ -222,9 +232,9 @@ if ($object->id > 0) { $langs->load('compta'); print ''; print ''; print ''; } @@ -262,7 +272,7 @@ if ($object->id > 0) { print '
    '; $searchpicto = $form->showFilterButtons('left'); print $searchpicto; @@ -573,7 +575,7 @@ if (!empty($arrayfields['f.fk_statut']['checked'])) { if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 } - print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1, 0, 0, '', 'onrightofpage'); print ' '; $searchpicto = $form->showFilterButtons(); print $searchpicto; @@ -601,6 +603,10 @@ $totalarray['nbfield'] = 0; // Fields title label // -------------------------------------------------------------------- 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 '"; @@ -850,7 +871,7 @@ while ($i < $imaxinloop) { $totalarray['val']['fd.duree'] += $obj->duree; } // Action column - if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { 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; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index be5f67da555..5b246e55eb7 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -24,10 +24,11 @@ * \brief Fiche d'information sur une fiche d'intervention */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -88,7 +89,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->commande->creer) { diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 9e49d9bc4b5..59c3ba83ee1 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -21,6 +21,7 @@ * \brief Page with interventions statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinterstats.class.php'; @@ -42,7 +43,7 @@ if ($user->socid > 0) { $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; @@ -287,11 +288,11 @@ foreach ($data as $val) { print '
    0 ? '&userid='.$userid : '').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%'.price(price2num($val['total'], 'MT'), 1).''.round($val['total_diff']).''.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%'.price(price2num($val['avg'], 'MT'), 1).''.round($val['avg_diff']).''.(isset($val['avg_diff']) ? round($val['avg_diff']) : "0").'%
    '; - print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer); + print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->hasRight('societe', 'creer')); print ''; - print $form->editfieldval("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer); + print $form->editfieldval("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->hasRight('societe', 'creer')); print '
    '; } print '
    '; print $langs->trans('PaymentConditions'); print ''; - if (($action != 'editconditions') && $user->rights->societe->creer) { + if (($action != 'editconditions') && $user->hasRight('societe', 'creer')) { print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
    '; @@ -275,12 +285,12 @@ if ($object->id > 0) { print "
    '; print ''; } print '
    '; print $langs->trans('PaymentMode'); print ''; - if (($action != 'editmode') && $user->rights->societe->creer) { + if (($action != 'editmode') && $user->hasRight('societe', 'creer')) { print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; @@ -293,12 +303,32 @@ if ($object->id > 0) { print "
    '; + print ''; + } + print '
    '; + print $langs->trans('PaymentBankAccount'); + print ''; + if (($action != 'editbankaccount') && $user->hasRight('societe', 'creer')) { + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; + print '
    '; + if ($action == 'editbankaccount') { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'none'); + } + print "
    '; print '
    '; print $langs->trans("CustomerRelativeDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->socid > 0) { + if ($user->hasRight('societe', 'creer') && !$user->socid > 0) { print ''.img_edit($langs->trans("Modify")).''; } print '
    '; @@ -311,7 +341,7 @@ if ($object->id > 0) { print '
    '; print $langs->trans("CustomerAbsoluteDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->socid > 0) { + if ($user->hasRight('societe', 'creer') && !$user->socid > 0) { print ''.img_edit($langs->trans("Modify")).''; } print '
    '; @@ -328,7 +358,7 @@ if ($object->id > 0) { print '
    '; print $form->editfieldkey("OrderMinAmount", 'supplier_order_min_amount', $object->supplier_order_min_amount, $object, $user->rights->societe->creer); @@ -340,7 +370,7 @@ if ($object->id > 0) { } // Categories - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { $langs->load("categories"); print '
    '.$langs->trans("SuppliersCategoriesShort").''; @@ -353,7 +383,7 @@ if ($object->id > 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Module Adherent - if (!empty($conf->adherent->enabled)) { + if (isModEnabled('adherent')) { $langs->load("members"); $langs->load("users"); print '
    '.$langs->trans("LinkedToDolibarrMember").'
    '; $boxstat .= ''; // User - print ''; + print ''; // Supervisor print ''; // Type of leave request @@ -304,6 +339,7 @@ if (count($typeleaves) == 0) { print ''; } print ''; + print ''; // Action column print ''; $usersupervisor = new User($db); foreach ($listUsers as $users) { + $arrayofselected = is_array($toselect) ? $toselect : array(); + // If user has not permission to edit/read all, we must see only subordinates if (empty($user->rights->holiday->readall)) { if (($users['rowid'] != $user->id) && (!in_array($users['rowid'], $userchilds))) { @@ -395,11 +439,21 @@ if (count($typeleaves) == 0) { print ''; // Button modify - print ''."\n"; + print ''; print ''; $i++; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index a4b9bcfcfdb..c47b47634d7 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -28,6 +28,7 @@ * \brief Page des documents joints sur les contrats */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -239,7 +240,7 @@ if ($object->id) { print '
    '; - if (!empty($conf->supplier_proposal->enabled)) { + if (isModEnabled('supplier_proposal')) { // Box proposals $tmp = $object->getOutstandingProposals('supplier'); $outstandingOpened = $tmp['opened']; @@ -408,7 +438,7 @@ if ($object->id > 0) { } } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { // Box proposals $tmp = $object->getOutstandingOrders('supplier'); $outstandingOpened = $tmp['opened']; @@ -429,7 +459,7 @@ if ($object->id > 0) { } } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) { $warn = ''; $tmp = $object->getOutstandingBills('supplier'); $outstandingOpened = $tmp['opened']; @@ -514,7 +544,7 @@ if ($object->id > 0) { /* * List of products */ - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled("product") || isModEnabled("service")) { $langs->load("products"); //Query from product/liste.php $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity, p.tosell as status, p.tobuy as status_buy, p.tobatch as status_batch,'; @@ -842,16 +872,16 @@ if ($object->id > 0) { print dolGetButtonAction($langs->trans('ThirdPartyIsClosed'), $langs->trans('ThirdPartyIsClosed'), 'default', $_SERVER['PHP_SELF'].'#', '', false); } - if (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->creer)) { + if (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->creer)) { $langs->load("supplier_proposal"); if ($object->status == 1) { print dolGetButtonAction('', $langs->trans('AddSupplierProposal'), 'default', DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id, ''); } else { - print dolGetButtonAction($langs->trans('ThirdPartyIsClosed'), $langs->trans('AddSupplierProposalGR'), 'default', $_SERVER['PHP_SELF'].'#', '', false); + print dolGetButtonAction($langs->trans('ThirdPartyIsClosed'), $langs->trans('AddSupplierProposal'), 'default', $_SERVER['PHP_SELF'].'#', '', false); } } - if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { + if ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')) { $langs->load("orders"); if ($object->status == 1) { print dolGetButtonAction('', $langs->trans('AddSupplierOrderShort'), 'default', DOL_URL_ROOT.'/fourn/commande/card.php?action=create&token='.newToken().'&socid='.$object->id, ''); @@ -860,11 +890,11 @@ if ($object->id > 0) { } } - if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { + if ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')) { if (!empty($orders2invoice) && $orders2invoice > 0) { if ($object->status == 1) { // Company is open - print dolGetButtonAction('', $langs->trans('CreateInvoiceForThisSupplierGR'), 'default', DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'&search_billed=0&autoselectall=1', ''); + print dolGetButtonAction('', $langs->trans('CreateInvoiceForThisSupplier'), 'default', DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'&search_billed=0&autoselectall=1', ''); } else { print dolGetButtonAction('', $langs->trans('CreateInvoiceForThisCustomer'), 'default', $_SERVER['PHP_SELF'].'#', '', false); } @@ -873,7 +903,7 @@ if ($object->id > 0) { } } - if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { + if ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')) { $langs->load("bills"); if ($object->status == 1) { print dolGetButtonAction('', $langs->trans('AddBill'), 'default', DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id, ''); diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 17146eecd35..5cc3e5592a2 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -433,7 +433,7 @@ class SupplierInvoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { if (empty($accountid)) { throw new RestException(400, 'Bank account ID is mandatory'); } @@ -482,7 +482,7 @@ class SupplierInvoices extends DolibarrApi throw new RestException(400, 'Payment error : '.$paiement->error); } - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment_supplier', '(SupplierInvoicePayment)', $accountid, $chqemetteur, $chqbank); if ($result < 0) { $this->db->rollback(); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d39620bdb3b..4fc242bdbcc 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -35,11 +35,12 @@ */ require_once DOL_DOCUMENT_ROOT.'/core/class/commonorder.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->productbatch->enabled)) { +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; +if (isModEnabled('productbatch')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; } -require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; + /** * Class to manage predefined suppliers products @@ -191,7 +192,7 @@ class CommandeFournisseur extends CommonOrder * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * 'label' the translation key. * 'picto' is code of a picto to show before value in forms - * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or 'isModEnabled("multicurrency")' ...) * 'position' is the sort order of field. * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) @@ -218,7 +219,7 @@ class CommandeFournisseur extends CommonOrder 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'showoncombobox'=>1, 'position'=>25, 'searchall'=>1), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefOrderSupplierShort', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'searchall'=>1), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>45), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>45), 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>60), 'date_approve' =>array('type'=>'datetime', 'label'=>'DateApprove', 'enabled'=>1, 'visible'=>-1, 'position'=>62), 'date_approve2' =>array('type'=>'datetime', 'label'=>'DateApprove2', 'enabled'=>1, 'visible'=>3, 'position'=>64), @@ -247,11 +248,11 @@ class CommandeFournisseur extends CommonOrder 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>3, 'position'=>205), 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>3, 'position'=>210), 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>0, 'position'=>215), - 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Currency', 'enabled'=>'!empty($conf->multicurrency->enabled)', 'visible'=>-1, 'position'=>220), - 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'CurrencyRate', 'enabled'=>'!empty($conf->multicurrency->enabled)', 'visible'=>-1, 'position'=>225), - 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'!empty($conf->multicurrency->enabled)', 'visible'=>-1, 'position'=>230), - 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'!empty($conf->multicurrency->enabled)', 'visible'=>-1, 'position'=>235), - 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'!empty($conf->multicurrency->enabled)', 'visible'=>-1, 'position'=>240), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Currency', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>220), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'CurrencyRate', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>225), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountHT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>230), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountVAT', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>235), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyAmountTTC', 'enabled'=>'isModEnabled("multicurrency")', 'visible'=>-1, 'position'=>240), 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>500), 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>1, 'notnull'=>1, 'position'=>46), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>1000, 'index'=>1), @@ -751,7 +752,7 @@ class CommandeFournisseur extends CommonOrder // phpcs:enable global $conf, $langs, $hookmanager; - if (empty($this->statuts) || empty($this->statutshort)) { + if (empty($this->statuts) || empty($this->statuts_short)) { $langs->load('orders'); $this->statuts[0] = 'StatusSupplierOrderDraft'; @@ -769,15 +770,15 @@ class CommandeFournisseur extends CommonOrder $this->statuts[9] = 'StatusSupplierOrderRefused'; // List of language codes for status - $this->statutshort[0] = 'StatusSupplierOrderDraftShort'; - $this->statutshort[1] = 'StatusSupplierOrderValidatedShort'; - $this->statutshort[2] = 'StatusSupplierOrderApprovedShort'; - $this->statutshort[3] = 'StatusSupplierOrderOnProcessShort'; - $this->statutshort[4] = 'StatusSupplierOrderReceivedPartiallyShort'; - $this->statutshort[5] = 'StatusSupplierOrderReceivedAllShort'; - $this->statutshort[6] = 'StatusSupplierOrderCanceledShort'; - $this->statutshort[7] = 'StatusSupplierOrderCanceledShort'; - $this->statutshort[9] = 'StatusSupplierOrderRefusedShort'; + $this->statuts_short[0] = 'StatusSupplierOrderDraftShort'; + $this->statuts_short[1] = 'StatusSupplierOrderValidatedShort'; + $this->statuts_short[2] = 'StatusSupplierOrderApprovedShort'; + $this->statuts_short[3] = 'StatusSupplierOrderOnProcessShort'; + $this->statuts_short[4] = 'StatusSupplierOrderReceivedPartiallyShort'; + $this->statuts_short[5] = 'StatusSupplierOrderReceivedAllShort'; + $this->statuts_short[6] = 'StatusSupplierOrderCanceledShort'; + $this->statuts_short[7] = 'StatusSupplierOrderCanceledShort'; + $this->statuts_short[9] = 'StatusSupplierOrderRefusedShort'; } $statustrans = array( @@ -806,7 +807,7 @@ class CommandeFournisseur extends CommonOrder } $statusLong = $langs->transnoentitiesnoconv($this->statuts[$status]).$billedtext; - $statusShort = $langs->transnoentitiesnoconv($this->statutshort[$status]); + $statusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]); $parameters = array('status' => $status, 'mode' => $mode, 'billed' => $billed); $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook @@ -836,7 +837,7 @@ class CommandeFournisseur extends CommonOrder $label = ''; - if ($user->rights->fournisseur->commande->lire) { + if ($user->hasRight("fournisseur", "commande", "read")) { $label = ''.$langs->trans("SupplierOrder").''; if (isset($this->statut)) { $label .= ' '.$this->getLibStatut(5); @@ -1097,7 +1098,7 @@ class CommandeFournisseur extends CommonOrder } // If stock is incremented on validate order, we must increment it - if (!$error && $movetoapprovestatus && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) { + if (!$error && $movetoapprovestatus && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -1398,7 +1399,7 @@ class CommandeFournisseur extends CommonOrder $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; $sql .= ", '".$this->db->escape($this->note_private)."'"; $sql .= ", '".$this->db->escape($this->note_public)."'"; - $sql .= ", ".((int) $conf->entity); + $sql .= ", ".setEntity($this); $sql .= ", ".((int) $this->socid); $sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : "null"); $sql .= ", '".$this->db->idate($date)."'"; @@ -1432,7 +1433,7 @@ class CommandeFournisseur extends CommonOrder } - $this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline() + //$this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline() // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set $result = $this->addline( @@ -1454,7 +1455,8 @@ class CommandeFournisseur extends CommonOrder $line->date_start, $line->date_end, $line->array_options, - $line->fk_unit + $line->fk_unit, + $line->special_code ); if ($result < 0) { dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error @@ -1745,9 +1747,10 @@ class CommandeFournisseur extends CommonOrder * @param string $origin 'order', ... * @param int $origin_id Id of origin object * @param int $rang Rank + * @param int $special_code Special code * @return int <=0 if KO, >0 if OK */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0) { global $langs, $mysoc, $conf; @@ -1818,10 +1821,10 @@ class CommandeFournisseur extends CommonOrder $label = ''; // deprecated if ($fk_product > 0) { - if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) { + if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) { // Not the common case // Check quantity is enough dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db); + $prod = new ProductFournisseur($this->db); if ($prod->fetch($fk_product) > 0) { $product_type = $prod->type; $label = $prod->label; @@ -1830,7 +1833,7 @@ class CommandeFournisseur extends CommonOrder // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', (isset($this->fk_soc) ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc - // If supplier order created from customer order, we take best supplier price + // If supplier order created from sales order, we take best supplier price // If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price if ($result > 0 && ($origin == 'commande' || $pu === '')) { $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice @@ -1880,19 +1883,20 @@ class CommandeFournisseur extends CommonOrder if (!empty($prod->packaging) && ($qty % $prod->packaging) > 0) { $coeff = intval($qty / $prod->packaging) + 1; $qty = $prod->packaging * $coeff; - setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs'); + setEventMessages($langs->trans('QtyRecalculatedWithPackaging'), null, 'mesgs'); } } } } - if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) { + if (isModEnabled("multicurrency") && $pu_ht_devise > 0) { $pu = 0; } $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); // Clean vat code + $reg = array(); $vat_src_code = ''; if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; @@ -1957,7 +1961,7 @@ class CommandeFournisseur extends CommonOrder $this->line->total_localtax2 = $total_localtax2; $this->line->total_ttc = $total_ttc; $this->line->product_type = $type; - $this->line->special_code = $this->special_code; + $this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0); $this->line->origin = $origin; $this->line->origin_id = $origin_id; $this->line->fk_unit = $fk_unit; @@ -2083,7 +2087,7 @@ class CommandeFournisseur extends CommonOrder } // If module stock is enabled and the stock increase is done on purchase order dispatching - if (!$error && $entrepot > 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { + if (!$error && $entrepot > 0 && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { $mouv = new MouvementStock($this->db); if ($product > 0) { // $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on) @@ -2136,7 +2140,7 @@ class CommandeFournisseur extends CommonOrder } if ($line->delete($notrigger) > 0) { - $this->update_price(); + $this->update_price(1); return 1; } else { $this->error = $line->error; @@ -2380,7 +2384,7 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::Livraison"); $usercanreceive = 0; - if (empty($conf->reception->enabled)) { + if (!isModEnabled('reception')) { $usercanreceive = $user->rights->fournisseur->commande->receptionner; } else { $usercanreceive = $user->rights->reception->creer; @@ -2606,11 +2610,11 @@ class CommandeFournisseur extends CommonOrder } /** - * Update a supplier order from a customer order + * Update a supplier order from a sales order * * @param User $user User that create - * @param int $idc Id of supplier order to update - * @param int $comclientid Id of customer order to use as template + * @param int $idc Id of purchase order to update + * @param int $comclientid Id of sale order to use as template * @return int <0 if KO, >0 if OK */ public function updateFromCommandeClient($user, $idc, $comclientid) @@ -2639,7 +2643,7 @@ class CommandeFournisseur extends CommonOrder $sql .= ", ".price2num($comclient->lines[$i]->qty, 'MS').", ".price2num($comclient->lines[$i]->tva_tx, 5).", ".price2num($comclient->lines[$i]->localtax1_tx, 5).", ".price2num($comclient->lines[$i]->localtax2_tx, 5).", ".price2num($comclient->lines[$i]->remise_percent, 3); $sql .= ", '".price2num($comclient->lines[$i]->subprice, 'MT')."','0', '".$this->db->escape($ref)."');"; if ($this->db->query($sql)) { - $this->update_price(); + $this->update_price(1); } } @@ -2833,7 +2837,7 @@ class CommandeFournisseur extends CommonOrder if ($qty < $this->line->packaging) { $qty = $this->line->packaging; } else { - if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { + if (!empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { $coeff = intval($qty / $this->line->packaging) + 1; $qty = $this->line->packaging * $coeff; setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs'); @@ -2860,7 +2864,7 @@ class CommandeFournisseur extends CommonOrder $this->line->total_localtax2 = $total_localtax2; $this->line->total_ttc = $total_ttc; $this->line->product_type = $type; - $this->line->special_code = $this->special_code; + $this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0); $this->line->origin = $this->origin; $this->line->fk_unit = $fk_unit; @@ -2892,7 +2896,7 @@ class CommandeFournisseur extends CommonOrder // Mise a jour info denormalisees au niveau facture if ($result >= 0) { - $this->update_price('', 'auto'); + $this->update_price('1', 'auto'); $this->db->commit(); return $result; } else { @@ -3185,26 +3189,28 @@ class CommandeFournisseur extends CommonOrder * @param int $hidedesc Hide description * @param int $hideref Hide ref * @param null|array $moreparams Array to provide more information - * @return int 0 if KO, 1 if OK + * @return int < 0 if KO, 0 = no doc generated, > 0 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $langs; - $langs->load("suppliers"); - $outputlangs->load("products"); - if (!dol_strlen($modele)) { - $modele = ''; - if ($this->model_pdf) { + $modele = ''; // No doc template/generation by default + + if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)) { $modele = $conf->global->COMMANDE_SUPPLIER_ADDON_PDF; } } + if (empty($modele)) { return 0; } else { + $langs->load("suppliers"); + $outputlangs->load("products"); + $modelpath = "core/modules/supplier_order/doc/"; return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } @@ -3369,7 +3375,7 @@ class CommandeFournisseur extends CommonOrder { global $conf, $langs; - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; $qtydelivered = array(); diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index dfb1e371636..7c8e4acb25f 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -131,9 +131,9 @@ class CommandeFournisseurDispatch extends CommonObjectLine $this->statuts[0] = 'Received'; $this->statuts[1] = 'Verified'; $this->statuts[2] = 'Denied'; - $this->statutshort[0] = 'Received'; - $this->statutshort[1] = 'Verified'; - $this->statutshort[2] = 'Denied'; + $this->statuts_short[0] = 'Received'; + $this->statuts_short[1] = 'Verified'; + $this->statuts_short[2] = 'Denied'; } @@ -580,7 +580,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine if ($mode == 0) { return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statutshort[$status]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { return $langs->trans($this->statuts[$status]); } elseif ($mode == 3) { @@ -601,11 +601,11 @@ class CommandeFournisseurDispatch extends CommonObjectLine } } elseif ($mode == 5) { if ($status == 0) { - return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + return ''.$langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); } elseif ($status == 1) { - return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + return ''.$langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); } elseif ($status == 2) { - return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + return ''.$langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } } diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 31bc37b6e1a..738e27a84e9 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -195,7 +195,7 @@ class FactureFournisseurRec extends CommonInvoice 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80), 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>210), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>85), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>85), 'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>175), 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>90), 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>95), @@ -982,9 +982,9 @@ class FactureFournisseurRec extends CommonInvoice $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; $sql .= ') VALUES ('; $sql .= ' ' . (int) $facid; // source supplier invoie id - $sql .= ', ' . (! empty($fk_product) ? "'" . $this->db->escape($fk_product) . "'" : 'null'); - $sql .= ', ' . (! empty($ref) ? "'" . $this->db->escape($ref) . "'" : 'null'); - $sql .= ', ' . (! empty($label) ? "'" . $this->db->escape($label) . "'" : 'null'); + $sql .= ', ' . (!empty($fk_product) ? "'" . $this->db->escape($fk_product) . "'" : 'null'); + $sql .= ', ' . (!empty($ref) ? "'" . $this->db->escape($ref) . "'" : 'null'); + $sql .= ', ' . (!empty($label) ? "'" . $this->db->escape($label) . "'" : 'null'); $sql .= ", '" . $this->db->escape($desc) . "'"; $sql .= ', ' . price2num($pu_ht); $sql .= ', ' . price2num($pu_ttc); @@ -1771,7 +1771,7 @@ class FactureFournisseurRec extends CommonInvoice } $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET frequency = ".($frequency ? ((int) $this->db->escape($frequency)) : "NULL"); + $sql .= " SET frequency = ".($frequency ? ((int) $frequency) : "NULL"); if (!empty($unit)) { $sql .= ", unit_frequency = '".$this->db->escape($unit)."'"; } @@ -2154,8 +2154,8 @@ class FactureFournisseurLigneRec extends CommonObjectLine $sql .= ' fk_facture_fourn = ' . (int) $this->fk_facture_fourn; $sql .= ', fk_parent_line = ' . (int) $this->fk_parent; $sql .= ', fk_product = ' . (int) $this->fk_product; - $sql .= ', ref = ' . (! empty($this->ref) ? "'" . $this->db->escape($this->ref) . "'" : 'NULL'); - $sql .= ", label = " . (! empty($this->label) ? "'" . $this->db->escape($this->label) . "'" : 'NULL'); + $sql .= ', ref = ' . (!empty($this->ref) ? "'" . $this->db->escape($this->ref) . "'" : 'NULL'); + $sql .= ", label = " . (!empty($this->label) ? "'" . $this->db->escape($this->label) . "'" : 'NULL'); $sql .= ", description = '" . $this->db->escape($this->description) . "'"; $sql .= ', pu_ht = ' . price2num($this->pu_ht); $sql .= ', pu_ttc = ' . price2num($this->pu_ttc); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b8e6f7d90dd..adf9fac3bde 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -38,12 +38,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { 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'; } @@ -297,7 +295,7 @@ class FactureFournisseur extends CommonInvoice 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>130), 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>135), 'fk_facture_source' =>array('type'=>'integer', 'label'=>'Fk facture source', 'enabled'=>1, 'visible'=>-1, 'position'=>140), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>145), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'visible'=>-1, 'position'=>145), 'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>'$conf->banque->enabled', 'visible'=>-1, 'position'=>150), 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>155), 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>160), @@ -433,7 +431,7 @@ class FactureFournisseur extends CommonInvoice $result = $_facrec->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); // This load $_facrec->linkedObjectsIds // Define some dates - if (! empty($_facrec->frequency)) { + if (!empty($_facrec->frequency)) { $originaldatewhen = $_facrec->date_when; $nextdatewhen = dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency); $previousdaynextdatewhen = dol_time_plus_duree($nextdatewhen, -1, 'd'); @@ -464,7 +462,7 @@ class FactureFournisseur extends CommonInvoice if (! $this->type) { $this->type = self::TYPE_STANDARD; } - if (! empty(GETPOST('ref_supplier'))) { + if (!empty(GETPOST('ref_supplier'))) { $this->ref_supplier = trim($this->ref_supplier); } else { $this->ref_supplier = trim($this->ref_supplier . '_' . ($_facrec->nb_gen_done + 1)); @@ -504,13 +502,13 @@ class FactureFournisseur extends CommonInvoice $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->thirdparty->default_lang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($this->thirdparty->default_lang)) { $newlang = $this->thirdparty->default_lang; // for proposal, order, invoice, ... } - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->default_lang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($this->default_lang)) { $newlang = $this->default_lang; // for thirdparty } - if (! empty($newlang)) { + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -540,7 +538,7 @@ class FactureFournisseur extends CommonInvoice } // Define due date if not already defined - if (! empty($forceduedate)) { + if (!empty($forceduedate)) { $this->date_echeance = $forceduedate; } @@ -592,7 +590,7 @@ class FactureFournisseur extends CommonInvoice $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql .= ", ".(double) $this->multicurrency_tx; - $sql .= ", ".(isset($this->fk_facture_source) ? $this->fk_facture_source : "NULL"); + $sql .= ", ".($this->fk_facture_source ? ((int) $this->fk_facture_source) : "null"); $sql .= ", ".(isset($this->fk_fac_rec_source) ? $this->fk_fac_rec_source : "NULL"); $sql .= ")"; @@ -760,9 +758,9 @@ class FactureFournisseur extends CommonInvoice // If margin module defined on costprice, we try the costprice // If not defined or if module margin defined and pmp and stock module enabled, we try pmp price // else we get the best supplier price - if ($conf->global->MARGIN_TYPE == 'costprice' && ! empty($producttmp->cost_price)) { + if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) { $buyprice = $producttmp->cost_price; - } elseif (! empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && ! empty($producttmp->pmp)) { + } elseif (isModEnabled('stock') && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) { $buyprice = $producttmp->pmp; } else { if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) { @@ -809,7 +807,7 @@ class FactureFournisseur extends CommonInvoice // Update total price - $result = $this->update_price(); + $result = $this->update_price(1); if ($result > 0) { // Actions on extra fields if (!$error) { @@ -1234,30 +1232,29 @@ class FactureFournisseur extends CommonInvoice $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; $sql .= " ref_supplier=".(isset($this->ref_supplier) ? "'".$this->db->escape($this->ref_supplier)."'" : "null").","; $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; - $sql .= " entity=".(isset($this->entity) ? $this->entity : "null").","; - $sql .= " type=".(isset($this->type) ? $this->type : "null").","; - $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; + $sql .= " entity=".(isset($this->entity) ? ((int) $this->entity) : "null").","; + $sql .= " type=".(isset($this->type) ? ((int) $this->type) : "null").","; + $sql .= " fk_soc=".(isset($this->fk_soc) ? ((int) $this->fk_soc) : "null").","; $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; $sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').","; if (dol_strlen($this->tms) != 0) { $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; } $sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; - $sql .= " paye=".(isset($this->paye) ? $this->paye : "null").","; + $sql .= " paye=".(isset($this->paye) ? ((int) $this->paye) : "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->tva) ? $this->tva : "null").","; - $sql .= " localtax1=".(isset($this->localtax1) ? $this->localtax1 : "null").","; - $sql .= " localtax2=".(isset($this->localtax2) ? $this->localtax2 : "null").","; - $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; - $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; - $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; - $sql .= " fk_statut=".(isset($this->status) ? $this->status : (isset($this->statut) ? $this->statut : "null")).","; - $sql .= " fk_user_author=".(isset($this->author) ? $this->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 .= " localtax1=".(isset($this->localtax1) ? ((float) $this->localtax1) : "null").","; + $sql .= " localtax2=".(isset($this->localtax2) ? ((float) $this->localtax2) : "null").","; + $sql .= " total_ht=".(isset($this->total_ht) ? ((float) $this->total_ht) : "null").","; + $sql .= " total_tva=".(isset($this->total_tva) ? ((float) $this->total_tva) : "null").","; + $sql .= " total_ttc=".(isset($this->total_ttc) ? ((float) $this->total_ttc) : "null").","; + $sql .= " fk_statut=".(isset($this->status) ? ((int) $this->status) : (isset($this->statut) ? ((int) $this->statut) : "null")).","; + $sql .= " fk_user_author=".(isset($this->author) ? ((int) $this->author) : "null").","; + $sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? ((int) $this->fk_user_valid) : "null").","; + $sql .= " fk_facture_source=".($this->fk_facture_source ? ((int) $this->fk_facture_source) : "null").","; + $sql .= " fk_projet=".(isset($this->fk_project) ? ((int) $this->fk_project) : "null").","; + $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? ((int) $this->cond_reglement_id) : "null").","; $sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : '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").","; @@ -1812,7 +1809,7 @@ class FactureFournisseur extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { // Si on incrémente le produit principal et ses composants à la validation de facture fournisseur - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -1943,7 +1940,7 @@ class FactureFournisseur extends CommonInvoice } // Si on incremente le produit principal et ses composants a la validation de facture fournisseur, on decremente - if ($result >= 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { + if ($result >= 0 && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2074,7 +2071,7 @@ class FactureFournisseur extends CommonInvoice if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) { // Check quantity is enough dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db); + $prod = new ProductFournisseur($this->db); if ($prod->fetch($fk_product) > 0) { $product_type = $prod->type; $label = $prod->label; @@ -2125,7 +2122,7 @@ class FactureFournisseur extends CommonInvoice $product_type = $type; } - if (!empty($conf->multicurrency->enabled) && $pu_devise > 0) { + if (isModEnabled("multicurrency") && $pu_devise > 0) { $pu = 0; } @@ -2425,7 +2422,7 @@ class FactureFournisseur extends CommonInvoice $this->errors[] = $line->error; } else { // Update total price into invoice record - $res = $this->update_price('', 'auto', 0, $this->thirdparty); + $res = $this->update_price('1', 'auto', 0, $this->thirdparty); } return $res; @@ -2472,7 +2469,7 @@ class FactureFournisseur extends CommonInvoice $this->db->rollback(); return -3; } else { - $res = $this->update_price(); + $res = $this->update_price(1); if ($res > 0) { $this->db->commit(); @@ -3060,7 +3057,7 @@ class FactureFournisseur extends CommonInvoice // Clear fields $object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier); $object->author = $user->id; - $object->user_valid = ''; + $object->user_valid = 0; $object->fk_facture_source = 0; $object->date_creation = ''; $object->date_validation = ''; @@ -3861,7 +3858,7 @@ class SupplierInvoiceLine extends CommonObjectLine $sql .= ' '.((!empty($this->fk_product) && $this->fk_product > 0) ? $this->fk_product : "null").','; $sql .= " ".((int) $this->product_type).","; $sql .= " ".price2num($this->remise_percent).","; - $sql .= ' '.(! empty($this->fk_remise_except) ? ((int) $this->fk_remise_except) : "null").','; + $sql .= ' '.(!empty($this->fk_remise_except) ? ((int) $this->fk_remise_except) : "null").','; $sql .= " ".price2num($this->subprice).","; $sql .= " ".(!empty($this->qty) ?price2num($this->total_ttc / $this->qty) : price2num($this->total_ttc)).","; $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 34835e1cef9..fa1706a523a 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -31,7 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/productfournisseurprice.class.php'; @@ -296,7 +295,7 @@ class ProductFournisseur extends Product // Multicurrency $multicurrency_unitBuyPrice = null; $fk_multicurrency = null; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (empty($multicurrency_tx)) { $multicurrency_tx = 1; } @@ -630,7 +629,7 @@ class ProductFournisseur extends Product $this->fourn_multicurrency_tx = $obj->multicurrency_tx; $this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_code = $obj->multicurrency_code; - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $this->fourn_barcode = $obj->barcode; // deprecated $this->fourn_fk_barcode_type = $obj->fk_barcode_type; // deprecated $this->supplier_barcode = $obj->barcode; @@ -638,7 +637,8 @@ class ProductFournisseur extends Product } $this->packaging = $obj->packaging; - if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) { + if (isModEnabled('dynamicprices') && empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) { + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProductSupplier($this); if ($price_result >= 0) { @@ -742,12 +742,13 @@ class ProductFournisseur extends Product $prodfourn->packaging = $record["packaging"]; - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $prodfourn->supplier_barcode = $record["barcode"]; $prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"]; } - if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) { + if (isModEnabled('dynamicprices') && !empty($prodfourn->fk_supplier_price_expression)) { + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProductSupplier($prodfourn); if ($price_result >= 0) { @@ -853,13 +854,15 @@ class ProductFournisseur extends Product $fourn_unitprice = $record["unitprice"]; $fourn_unitprice_with_discount = $record["unitprice"] * (1 - $record["remise_percent"] / 100); - if (!empty($conf->dynamicprices->enabled) && !empty($record["fk_supplier_price_expression"])) { + if (isModEnabled('dynamicprices') && !empty($record["fk_supplier_price_expression"])) { $prod_supplier = new ProductFournisseur($this->db); $prod_supplier->product_fourn_price_id = $record["product_fourn_price_id"]; $prod_supplier->id = $prodid; $prod_supplier->fourn_qty = $record["quantity"]; $prod_supplier->fourn_tva_tx = $record["tva_tx"]; $prod_supplier->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; + + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProductSupplier($prod_supplier); if ($price_result >= 0) { @@ -1133,12 +1136,15 @@ class ProductFournisseur extends Product * * @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 $maxlength Maxlength of ref * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip No tooltip + * @param string $morecss ''=Add more css on link + * @param int $add_label 0=Default, 1=Add label into string, >1=Add first chars into string + * @param string $sep ' - '=Separator between ref and label if option 'add_label' is set * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0, $morecss = '', $add_label = 0, $sep = ' - ') { global $db, $conf, $langs, $hookmanager; @@ -1149,6 +1155,11 @@ class ProductFournisseur extends Product $result = ''; $label = ''; + $newref = $this->ref; + if ($maxlength) { + $newref = dol_trunc($newref, $maxlength, 'middle'); + } + if (!empty($this->entity)) { $tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80); if ($this->nbphoto > 0) { @@ -1177,12 +1188,12 @@ class ProductFournisseur extends Product $label .= '
    '.$langs->trans('RefSupplier').': '.$this->ref_supplier; if ($this->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { $langs->load("productbatch"); $label .= "
    ".$langs->trans("ManageLotSerial").': '.$this->getLibStatut(0, 2); } } - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $label .= '
    '.$langs->trans('BarCode').': '.$this->barcode; } @@ -1216,13 +1227,13 @@ class ProductFournisseur extends Product } } - if (!empty($conf->accounting->enabled) && $this->status) { + if (isModEnabled('accounting') && $this->status) { include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; $label .= '
    '.$langs->trans('ProductAccountancySellCode').': '.length_accountg($this->accountancy_code_sell); $label .= '
    '.$langs->trans('ProductAccountancySellIntraCode').': '.length_accountg($this->accountancy_code_sell_intra); $label .= '
    '.$langs->trans('ProductAccountancySellExportCode').': '.length_accountg($this->accountancy_code_sell_export); } - if (!empty($conf->accounting->enabled) && $this->status_buy) { + if (isModEnabled('accounting') && $this->status_buy) { include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; $label .= '
    '.$langs->trans('ProductAccountancyBuyCode').': '.length_accountg($this->accountancy_code_buy); $label .= '
    '.$langs->trans('ProductAccountancyBuyIntraCode').': '.length_accountg($this->accountancy_code_buy_intra); @@ -1270,10 +1281,12 @@ class ProductFournisseur extends Product $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.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : ''); + $result .= $newref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : ''); } $result .= $linkend; - //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + if ($withpicto != 2) { + $result .= (($add_label && $this->label) ? $sep.dol_trunc($this->label, ($add_label > 1 ? $add_label : 0)) : ''); + } global $action; $hookmanager->initHooks(array($this->element . 'dao')); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 8fc181e18e0..bdf4f8aa457 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -349,7 +349,7 @@ class PaiementFourn extends Paiement if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $newlang = ''; $outputlangs = $langs; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $invoice->thirdparty->default_lang; } if (!empty($newlang)) { @@ -862,7 +862,7 @@ class PaiementFourn extends Paiement global $conf; $way = 'dolibarr'; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { foreach ($this->multicurrency_amounts as $value) { if (!empty($value)) { // one value found then payment is in invoice currency $way = 'customer'; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 3b0f4fdb6e5..f559c31a89f 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2016 Regis Houssin * Copyright (C) 2010-2015 Juanjo Menent - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2022 Philippe Grand * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ion Agorria @@ -28,60 +28,67 @@ */ /** - * \file htdocs/fourn/commande/card.php - * \ingroup supplier, order - * \brief Card supplier order + * \file htdocs/fourn/commande/card.php + * \ingroup supplier, order + * \brief Card supplier order */ + +// Load Dolibarr environment require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_order/modules_commandefournisseur.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if (!empty($conf->supplier_proposal->enabled)) { + +if (isModEnabled('supplier_proposal')) { require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; } -if (!empty($conf->product->enabled)) { +if (isModEnabled("product")) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP -if (!empty($conf->variants->enabled)) { +if (isModEnabled('variants')) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } + +// Load translation files required by the page $langs->loadLangs(array('admin', 'orders', 'sendings', 'companies', 'bills', 'propal', 'receptions', 'supplier_proposal', 'deliveries', 'products', 'stocks', 'productbatch')); -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load('incoterm'); } + +// Get Parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'purchaseordercard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOST('socid', 'int'); $projectid = GETPOST('projectid', 'int'); -$cancel = GETPOST('cancel', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$origin = GETPOST('origin', 'alpha'); -$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility -$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; +$cancel = GETPOST('cancel', 'alpha'); +$lineid = GETPOST('lineid', 'int'); +$origin = GETPOST('origin', 'alpha'); +$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility +$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; -//PDF +// PDF $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); @@ -160,7 +167,7 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatede // Project permission $caneditproject = false; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $caneditproject = empty($conf->global->SUPPLIER_ORDER_FORBID_EDIT_PROJECT) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && preg_match('/^[\(]?PROV/i', $object->ref)); } @@ -405,7 +412,16 @@ if (empty($reshook)) { } // Add a product line - if ($action == 'addline' && $usercancreate) { + if ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha') && $usercancreate) { + // Define new vat_rate for all lines + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->product_type, 0, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice, $line->ref_supplier); + } + } elseif ($action == 'addline' && $usercancreate) { $db->begin(); $langs->load('errors'); @@ -469,7 +485,7 @@ if (empty($reshook)) { $error++; } - if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') { + if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') { if ($combinations = GETPOST('combinations', 'array')) { //Check if there is a product with the given combination $prodcomb = new ProductCombination($db); @@ -518,7 +534,7 @@ if (empty($reshook)) { $label = $productsupplier->label; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -555,13 +571,15 @@ if (empty($reshook)) { $ref_supplier = $productsupplier->ref_supplier; // Get vat rate + $tva_npr = 0; if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority) $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); $tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); + if (empty($tva_tx)) { + $tva_npr = 0; + } } - if (empty($tva_tx)) { - $tva_npr = 0; - } + $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr); @@ -667,11 +685,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { - $newlang = GETPOST('lang_id', 'aZ09'); - } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + if (GETPOST('lang_id', 'aZ09')) + $newlang = GETPOST('lang_id', 'aZ09'); } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); @@ -844,10 +861,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -882,10 +899,10 @@ if (empty($reshook)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -924,10 +941,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -973,7 +990,7 @@ if (empty($reshook)) { } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) { // warning name of option should be STOCK_CALCULATE_ON_SUPPLIER_APPROVE_ORDER + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) { // warning name of option should be STOCK_CALCULATE_ON_SUPPLIER_APPROVE_ORDER if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); @@ -987,10 +1004,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1048,10 +1065,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -1534,11 +1551,14 @@ $form = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); $productstatic = new Product($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } -$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewOrderSupplier"); +} $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); @@ -1612,7 +1632,7 @@ if ($action == 'create') { $datedelivery = (!empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : '')); - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!empty($objectsrc->multicurrency_code)) { $currency_code = $objectsrc->multicurrency_code; } @@ -1630,7 +1650,7 @@ if ($action == 'create') { $cond_reglement_id = !empty($societe->cond_reglement_supplier_id) ? $societe->cond_reglement_supplier_id : 0; $mode_reglement_id = !empty($societe->mode_reglement_supplier_id) ? $societe->mode_reglement_supplier_id : 0; - if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($societe->multicurrency_code)) { $currency_code = $societe->multicurrency_code; } @@ -1678,7 +1698,7 @@ if ($action == 'create') { print $societe->getNomUrl(1, 'supplier'); print ''; } else { - print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', '(s.fournisseur=1 AND s.status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) { print ''."\n"; + + + // Formulaire de demande + print ''."\n"; + print ''."\n"; + print ''."\n"; + + print dol_get_fiche_head(); + + print ''; + print ''; + + // groupe + print ''; + print ''; + + print ''; + + // users + print ''; + print ''; + + + + // Type + print ''; + print ''; + print ''; + print ''; + + // Date start + print ''; + print ''; + print ''; + print ''; + + // Date end + print ''; + print ''; + print ''; + print ''; + + // Approver + print ''; + print ''; + print ''; + print ''; + + //auto validation ON CREATE + print ''."\n"; + + + //no auto SEND MAIL + print ''."\n"; + + // Description + print ''; + print ''; + print ''; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + print ''; + print '
    '; + print $form->textwithpicto($langs->trans("groups"), $langs->trans("fusionGroupsUsers")); + + print ''; + //@todo ajouter entity ! + $sql =' SELECT rowid, nom from '.MAIN_DB_PREFIX.'usergroup '; + + $resql = $db->query($sql); + $Tgroup = array(); + while ($obj = $db->fetch_object($resql)) { + $Tgroup[$obj->rowid] = $obj->nom; + } + print $form->multiselectarray('groups', $Tgroup, GETPOST('groups', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + + print '
    '; + print $form->textwithpicto($langs->trans("users"), $langs->trans("fusionGroupsUsers")); + print ''; + + $sql = ' SELECT DISTINCT u.rowid,u.lastname,u.firstname from '.MAIN_DB_PREFIX.'user as u'; + $sql .= ' WHERE 1=1 '; + $sql .= !empty($morefilter) ? $morefilter : ''; + + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $userlist[$obj->rowid] = $obj->firstname . ' '. $obj->lastname; + } + } + + print img_picto('', 'users') . $form->multiselectarray('users', $userlist, GETPOST('users', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print '
    '.$langs->trans("Type").''; + $typeleaves = $object->getTypes(1, -1); + $arraytypeleaves = array(); + foreach ($typeleaves as $key => $val) { + $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); + $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')' : ''); + $arraytypeleaves[$val['rowid']] = $labeltoshow; + } + print $form->selectarray('type', $arraytypeleaves, (GETPOST('type', 'alpha') ?GETPOST('type', 'alpha') : ''), 1, 0, 0, '', 0, 0, 0, '', '', true); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } + print '
    '; + print $form->textwithpicto($langs->trans("DateDebCP"), $langs->trans("FirstDayOfHoliday")); + print ''; + // Si la demande ne vient pas de l'agenda + if (!GETPOST('date_debut_')) { + print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1); + } else { + $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_debut_month', 'int'), GETPOST('date_debut_day', 'int'), GETPOST('date_debut_year', 'int')); + print $form->selectDate($tmpdate, 'date_debut_', 0, 0, 0, '', 1, 1); + } + print '     '; + print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday', 'alpha') ?GETPOST('starthalfday', 'alpha') : 'morning')); + print '
    '; + print $form->textwithpicto($langs->trans("DateFinCP"), $langs->trans("LastDayOfHoliday")); + print ''; + if (!GETPOST('date_fin_')) { + print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1); + } else { + $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_fin_month', 'int'), GETPOST('date_fin_day', 'int'), GETPOST('date_fin_year', 'int')); + print $form->selectDate($tmpdate, 'date_fin_', 0, 0, 0, '', 1, 1); + } + print '     '; + print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday', 'alpha') ?GETPOST('endhalfday', 'alpha') : 'afternoon')); + print '
    '.$langs->trans("ReviewedByCP").''; + + $object = new Holiday($db); + $include_users = $object->fetch_users_approver_holiday(); + if (empty($include_users)) { + print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); + } else { + // Defined default approver (the forced approved of user or the supervisor if no forced value defined) + // Note: This use will be set only if the deinfed approvr has permission to approve so is inside include_users + $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); + if (!empty($conf->global->HOLIDAY_DEFAULT_VALIDATOR)) { + $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver + } + if (GETPOST('valideur', 'int') > 0) { + $defaultselectuser = GETPOST('valideur', 'int'); + } + $s = $form->select_dolusers($defaultselectuser, "valideur", 1, '', 0, $include_users, '', '0,'.$conf->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500'); + print img_picto('', 'user').$form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + } + + + print '
    '.$langs->trans("AutoValidationOnCreate").''; + print ''; + print '
    '.$langs->trans("AutoSendMail").''; + print ''; + print '
    '.$langs->trans("DescCP").''; + $doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%'); + print $doleditor->Create(1); + print '
    '; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel("SendRequestCollectiveCP"); + + print ''."\n"; + } +} else { + if ($error) { + print '
    '; + print $error; + print '

    '; + print '
    '; + } +} + +// End of page +llxFooter(); + +if (is_object($db)) { + $db->close(); +} +/** + * send email to validator for current leave represented by (id) + * + * @param int $id validator for current leave represented by (id) + * @param int $cancreate flag for user right + * @param int $now date + * @param int $autoValidation boolean flag on autovalidation + * + * @return stdClass + * @throws Exception + */ +function sendMail($id, $cancreate, $now, $autoValidation) +{ + $objStd = new stdClass(); + $objStd->msg = ''; + $objStd->status = 'success'; + $objStd->error = 0; + $objStd->style = ''; + + global $db, $user, $conf, $langs; + + $object = new Holiday($db); + + $result = $object->fetch($id); + + if ($result) { + // If draft and owner of leave + if ($object->statut == Holiday::STATUS_VALIDATED && $cancreate) { + $object->oldcopy = dol_clone($object); + + //if ($autoValidation) $object->statut = Holiday::STATUS_VALIDATED; + + $verif = $object->validate($user); + + if ($verif > 0) { + // To + $destinataire = new User($db); + $destinataire->fetch($object->fk_validator); + $emailTo = $destinataire->email; + + + if (!$emailTo) { + dol_syslog("Expected validator has no email, so we redirect directly to finished page without sending email"); + + $objStd->error++; + $objStd->msg = $langs->trans('ErroremailTo'); + $objStd->status = 'error'; + $objStd->style="warnings"; + return $objStd; + } + + // From + $expediteur = new User($db); + $expediteur->fetch($object->fk_user); + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; + + // Subject + $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $societeName = $conf->global->MAIN_APPLICATION_TITLE; + } + + $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); + + // Content + $message = "

    ".$langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",

    \n"; + + $message .= "

    ".$langs->transnoentities("HolidaysToValidateBody")."

    \n"; + + + // option to warn the validator in case of too short delay + if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_TOO_LOW_DELAY)) { + $delayForRequest = 0; // TODO Set delay depending of holiday leave type + if ($delayForRequest) { + $nowplusdelay = dol_time_plus_duree($now, $delayForRequest, 'd'); + + if ($object->date_debut < $nowplusdelay) { + $message = "

    ".$langs->transnoentities("HolidaysToValidateDelay", $delayForRequest)."

    \n"; + } + } + } + + // option to notify the validator if the balance is less than the request + if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_NEGATIVE_BALANCE)) { + $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + + if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) { + $message .= "

    ".$langs->transnoentities("HolidaysToValidateAlertSolde")."

    \n"; + } + } + + $link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id; + + $message .= "
      "; + $message .= "
    • ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."
    • \n"; + $message .= "
    • ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')."
    • \n"; + $message .= "
    • ".$langs->transnoentitiesnoconv("Link").' : '.$link."
    • \n"; + $message .= "
    \n"; + + $trackid = 'leav'.$object->id; + + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 1, '', '', $trackid); + + // Sending the email + $result = $mail->sendfile(); + + if (!$result) { + $objStd->error++; + $objStd->msg = $langs->trans('ErroreSendmail'); + $objStd->style="warnings"; + $objStd->status = 'error'; + } else { + $objStd->msg = $langs->trans('mailSended'); + } + + return $objStd; + } else { + $objStd->error++; + $objStd->msg = $langs->trans('ErroreVerif'); + $objStd->status = 'error'; + $objStd->style="errors"; + return $objStd; + } + } + } else { + $objStd->error++; + $objStd->msg = $langs->trans('ErrorloadUserOnSendingMail'); + $objStd->status = 'error'; + $objStd->style="warnings"; + return $objStd; + } + + return $objStd; +} diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 26be8d2c726..0125becd21c 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -59,12 +59,6 @@ class Holiday extends CommonObject */ public $picto = 'holiday'; - /** - * @deprecated - * @see $id - */ - public $rowid; - /** * @var int User ID */ @@ -95,14 +89,19 @@ class Holiday extends CommonObject public $date_valid = ''; /** - * @var int ID of user that has validated or approved (empty if not approved) + * @var int ID of user that has validated */ public $fk_user_valid; /** - * @var int Date approbation + * @var int Date approval */ - public $date_approbation; + public $date_approval; + + /** + * @var int ID of user that has approved + */ + public $fk_user_approve; /** * @var int Date for refuse @@ -383,6 +382,8 @@ class Holiday extends CommonObject $sql .= " cp.fk_validator,"; $sql .= " cp.date_valid,"; $sql .= " cp.fk_user_valid,"; + $sql .= " cp.date_approval,"; + $sql .= " cp.fk_user_approve,"; $sql .= " cp.date_refuse,"; $sql .= " cp.fk_user_refuse,"; $sql .= " cp.date_cancel,"; @@ -420,6 +421,9 @@ class Holiday extends CommonObject $this->fk_validator = $obj->fk_validator; $this->date_valid = $this->db->jdate($obj->date_valid); $this->fk_user_valid = $obj->fk_user_valid; + $this->user_validation_id = $obj->fk_user_valid; + $this->date_approval = $this->db->jdate($obj->date_approval); + $this->fk_user_approve = $obj->fk_user_approve; $this->date_refuse = $this->db->jdate($obj->date_refuse); $this->fk_user_refuse = $obj->fk_user_refuse; $this->date_cancel = $this->db->jdate($obj->date_cancel); @@ -473,6 +477,8 @@ class Holiday extends CommonObject $sql .= " cp.fk_validator,"; $sql .= " cp.date_valid,"; $sql .= " cp.fk_user_valid,"; + $sql .= " cp.date_approval,"; + $sql .= " cp.fk_user_approve,"; $sql .= " cp.date_refuse,"; $sql .= " cp.fk_user_refuse,"; $sql .= " cp.date_cancel,"; @@ -525,6 +531,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['ref'] = ($obj->ref ? $obj->ref : $obj->rowid); $tab_result[$i]['fk_user'] = $obj->fk_user; @@ -540,6 +547,8 @@ class Holiday extends CommonObject $tab_result[$i]['fk_validator'] = $obj->fk_validator; $tab_result[$i]['date_valid'] = $this->db->jdate($obj->date_valid); $tab_result[$i]['fk_user_valid'] = $obj->fk_user_valid; + $tab_result[$i]['date_approval'] = $this->db->jdate($obj->date_approval); + $tab_result[$i]['fk_user_approve'] = $obj->fk_user_approve; $tab_result[$i]['date_refuse'] = $this->db->jdate($obj->date_refuse); $tab_result[$i]['fk_user_refuse'] = $obj->fk_user_refuse; $tab_result[$i]['date_cancel'] = $this->db->jdate($obj->date_cancel); @@ -598,6 +607,8 @@ class Holiday extends CommonObject $sql .= " cp.fk_validator,"; $sql .= " cp.date_valid,"; $sql .= " cp.fk_user_valid,"; + $sql .= " cp.date_approval,"; + $sql .= " cp.fk_user_approve,"; $sql .= " cp.date_refuse,"; $sql .= " cp.fk_user_refuse,"; $sql .= " cp.date_cancel,"; @@ -649,7 +660,9 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['ref'] = ($obj->ref ? $obj->ref : $obj->rowid); + $tab_result[$i]['fk_user'] = $obj->fk_user; $tab_result[$i]['fk_type'] = $obj->fk_type; $tab_result[$i]['date_create'] = $this->db->jdate($obj->date_create); @@ -664,6 +677,8 @@ class Holiday extends CommonObject $tab_result[$i]['fk_validator'] = $obj->fk_validator; $tab_result[$i]['date_valid'] = $this->db->jdate($obj->date_valid); $tab_result[$i]['fk_user_valid'] = $obj->fk_user_valid; + $tab_result[$i]['date_approval'] = $this->db->jdate($obj->date_approval); + $tab_result[$i]['fk_user_approve'] = $obj->fk_user_approve; $tab_result[$i]['date_refuse'] = $obj->date_refuse; $tab_result[$i]['fk_user_refuse'] = $obj->fk_user_refuse; $tab_result[$i]['date_cancel'] = $obj->date_cancel; @@ -729,9 +744,12 @@ class Holiday extends CommonObject // Update status $sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET"; + $sql .= " fk_user_valid = ".((int) $user->id).","; + $sql .= " date_valid = '".$this->db->idate(dol_now())."',"; if (!empty($this->statut) && is_numeric($this->statut)) { $sql .= " statut = ".((int) $this->statut).","; } else { + $this->error = 'Property status must be a numeric value'; $error++; } $sql .= " ref = '".$this->db->escape($num)."'"; @@ -854,7 +872,7 @@ class Holiday extends CommonObject $error++; } if (!empty($this->fk_validator)) { - $sql .= " fk_validator = '".$this->db->escape($this->fk_validator)."',"; + $sql .= " fk_validator = ".((int) $this->fk_validator).","; } else { $error++; } @@ -864,17 +882,27 @@ class Holiday extends CommonObject $sql .= " date_valid = NULL,"; } if (!empty($this->fk_user_valid)) { - $sql .= " fk_user_valid = '".$this->db->escape($this->fk_user_valid)."',"; + $sql .= " fk_user_valid = ".((int) $this->fk_user_valid).","; } else { $sql .= " fk_user_valid = NULL,"; } + if (!empty($this->date_approval)) { + $sql .= " date_approval = '".$this->db->idate($this->date_approval)."',"; + } else { + $sql .= " date_approval = NULL,"; + } + if (!empty($this->fk_user_approve)) { + $sql .= " fk_user_approve = ".((int) $this->fk_user_approve).","; + } else { + $sql .= " fk_user_approve = NULL,"; + } if (!empty($this->date_refuse)) { $sql .= " date_refuse = '".$this->db->idate($this->date_refuse)."',"; } else { $sql .= " date_refuse = NULL,"; } if (!empty($this->fk_user_refuse)) { - $sql .= " fk_user_refuse = '".$this->db->escape($this->fk_user_refuse)."',"; + $sql .= " fk_user_refuse = ".((int) $this->fk_user_refuse).","; } else { $sql .= " fk_user_refuse = NULL,"; } @@ -884,7 +912,7 @@ class Holiday extends CommonObject $sql .= " date_cancel = NULL,"; } if (!empty($this->fk_user_cancel)) { - $sql .= " fk_user_cancel = '".$this->db->escape($this->fk_user_cancel)."',"; + $sql .= " fk_user_cancel = ".((int) $this->fk_user_cancel).","; } else { $sql .= " fk_user_cancel = NULL,"; } @@ -983,17 +1011,27 @@ class Holiday extends CommonObject $sql .= " date_valid = NULL,"; } if (!empty($this->fk_user_valid)) { - $sql .= " fk_user_valid = '".$this->db->escape($this->fk_user_valid)."',"; + $sql .= " fk_user_valid = ".((int) $this->fk_user_valid).","; } else { $sql .= " fk_user_valid = NULL,"; } + if (!empty($this->date_approval)) { + $sql .= " date_approval = '".$this->db->idate($this->date_approval)."',"; + } else { + $sql .= " date_approval = NULL,"; + } + if (!empty($this->fk_user_approve)) { + $sql .= " fk_user_approve = ".((int) $this->fk_user_approve).","; + } else { + $sql .= " fk_user_approve = NULL,"; + } if (!empty($this->date_refuse)) { $sql .= " date_refuse = '".$this->db->idate($this->date_refuse)."',"; } else { $sql .= " date_refuse = NULL,"; } if (!empty($this->fk_user_refuse)) { - $sql .= " fk_user_refuse = '".$this->db->escape($this->fk_user_refuse)."',"; + $sql .= " fk_user_refuse = ".((int) $this->fk_user_refuse).","; } else { $sql .= " fk_user_refuse = NULL,"; } @@ -1003,7 +1041,7 @@ class Holiday extends CommonObject $sql .= " date_cancel = NULL,"; } if (!empty($this->fk_user_cancel)) { - $sql .= " fk_user_cancel = '".$this->db->escape($this->fk_user_cancel)."',"; + $sql .= " fk_user_cancel = ".((int) $this->fk_user_cancel).","; } else { $sql .= " fk_user_cancel = NULL,"; } @@ -1115,11 +1153,11 @@ class Holiday extends CommonObject $this->fetchByUser($fk_user, '', ''); foreach ($this->holiday as $infos_CP) { - if ($infos_CP['statut'] == 4) { + if ($infos_CP['statut'] == Holiday::STATUS_CANCELED) { continue; // ignore not validated holidays } - if ($infos_CP['statut'] == 5) { - continue; // ignore not validated holidays + if ($infos_CP['statut'] == Holiday::STATUS_REFUSED) { + continue; // ignore refused holidays } //var_dump("--"); //var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']); @@ -1731,13 +1769,13 @@ class Holiday extends CommonObject if ($type) { // If user of Dolibarr $sql = "SELECT"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= " DISTINCT"; } $sql .= " u.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; @@ -1821,13 +1859,13 @@ class Holiday extends CommonObject if ($type) { // If we need users of Dolibarr $sql = "SELECT"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= " DISTINCT"; } $sql .= " u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; @@ -1855,6 +1893,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user + $tab_result[$i]['id'] = $obj->rowid; // id of user $tab_result[$i]['name'] = $obj->lastname; // deprecated $tab_result[$i]['lastname'] = $obj->lastname; $tab_result[$i]['firstname'] = $obj->firstname; @@ -1897,6 +1936,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user + $tab_result[$i]['id'] = $obj->rowid; // id of user $tab_result[$i]['name'] = $obj->lastname; // deprecated $tab_result[$i]['lastname'] = $obj->lastname; $tab_result[$i]['firstname'] = $obj->firstname; @@ -2131,6 +2171,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['date_action'] = $obj->date_action; $tab_result[$i]['fk_user_action'] = $obj->fk_user_action; $tab_result[$i]['fk_user_update'] = $obj->fk_user_update; @@ -2179,7 +2220,7 @@ class Holiday extends CommonObject $num = $this->db->num_rows($result); if ($num) { while ($obj = $this->db->fetch_object($result)) { - $types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newbymonth'=>$obj->newbymonth); + $types[$obj->rowid] = array('id'=> $obj->rowid, 'rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newbymonth'=>$obj->newbymonth); } return $types; @@ -2206,12 +2247,13 @@ class Holiday extends CommonObject $sql .= " f.date_create as datec,"; $sql .= " f.tms as date_modification,"; $sql .= " f.date_valid as datev,"; - $sql .= " f.date_approve as datea,"; + $sql .= " f.date_approval as datea,"; $sql .= " f.date_refuse as dater,"; $sql .= " f.fk_user_create as fk_user_creation,"; $sql .= " f.fk_user_modif as fk_user_modification,"; - $sql .= " f.fk_user_valid as fk_user_approve_done,"; - $sql .= " f.fk_validator as fk_user_approve_expected,"; + $sql .= " f.fk_user_valid as fk_user_validation,"; + $sql .= " f.fk_user_approve as fk_user_approval_done,"; + $sql .= " f.fk_validator as fk_user_approval_expected,"; $sql .= " f.fk_user_refuse as fk_user_refuse"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as f"; $sql .= " WHERE f.rowid = ".((int) $id); @@ -2227,16 +2269,16 @@ class Holiday extends CommonObject $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->date_modification); $this->date_validation = $this->db->jdate($obj->datev); - $this->date_approbation = $this->db->jdate($obj->datea); + $this->date_approval = $this->db->jdate($obj->datea); if (!empty($obj->fk_user_creation)) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_creation); $this->user_creation = $cuser; } - if (!empty($obj->fk_user_approve_done)) { + if (!empty($obj->fk_user_valid)) { $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_approve_done); + $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } if (!empty($obj->fk_user_modification)) { @@ -2246,15 +2288,9 @@ class Holiday extends CommonObject } if ($obj->status == Holiday::STATUS_APPROVED || $obj->status == Holiday::STATUS_CANCELED) { - if ($obj->fk_user_approve_done) { + if ($obj->fk_user_approval_done) { $auser = new User($this->db); - $auser->fetch($obj->fk_user_approve_done); - $this->user_approve = $auser; - } - } else { - if (!empty($obj->fk_user_approve_expected)) { - $auser = new User($this->db); - $auser->fetch($obj->fk_user_approve_expected); + $auser->fetch($obj->fk_user_approval_done); $this->user_approve = $auser; } } diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 85de7b09f61..2d47467319d 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -26,6 +26,7 @@ * \brief File that defines the balance of paid holiday of users. */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; @@ -45,6 +46,9 @@ $search_supervisor = GETPOST('search_supervisor', 'int'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$confirm = GETPOST('confirm', 'alpha'); + $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; @@ -60,6 +64,17 @@ if (!$sortorder) { } +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('defineholidaylist')); +$extrafields = new ExtraFields($db); + +$holiday = new Holiday($db); + + +if (empty($conf->holiday->enabled)) { + accessforbidden('Module not enabled'); +} + // Protection if external user if ($user->socid > 0) { accessforbidden(); @@ -71,23 +86,6 @@ if (empty($user->rights->holiday->read)) { } -// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array -$hookmanager->initHooks(array('defineholidaylist')); -$extrafields = new ExtraFields($db); - -$holiday = new Holiday($db); - -if (empty($conf->holiday->enabled)) { - llxHeader('', $langs->trans('CPTitreMenu')); - print '
    '; - print ''.$langs->trans('NotActiveModCP').''; - print '
    '; - llxFooter(); - exit(); -} - - - /* * Actions */ @@ -118,16 +116,15 @@ if (empty($reshook)) { } // Mass actions - /* - $objectclass='Skeleton'; - $objectlabel='Skeleton'; - $permissiontoread = $user->rights->skeleton->read; - $permissiontodelete = $user->rights->skeleton->delete; - $uploaddir = $conf->skeleton->dir_output; + $objectclass = 'Holiday'; + $objectlabel = 'Holiday'; + $permissiontoread = $user->hasRight('holiday', 'read'); + $permissiontodelete = $user->hasRight('holiday', 'delete'); + $permissiontoapprove = $user->hasRight('holiday', 'approve'); + $uploaddir = $conf->holiday->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - */ - // Si il y a une action de mise à jour + // If there is an update action if ($action == 'update' && GETPOSTISSET('update_cp')) { $error = 0; $nbok = 0; @@ -212,13 +209,23 @@ $title = $langs->trans('CPTitreMenu'); llxHeader('', $title); - $typeleaves = $holiday->getTypes(1, 1); $result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. if ($result < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); } +// List of mass actions available +$arrayofmassactions = array( + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if ($user->hasRight("holiday", "approve")) { + $arrayofmassactions['preincreaseholiday'] = img_picto('', 'add', 'class="pictofixedwidth"').$langs->trans("IncreaseHolidays"); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + print ''; if ($optioncss != '') { @@ -232,7 +239,33 @@ print ''; print ''; print ''; -print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png'); +$title = $langs->trans("MenuConfCP"); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $massactionbutton, '', '', 'title_hrm', 0, '', '', $limit, 0, 0, 1); + +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($massaction == 'preincreaseholiday') { + $langs->load("holiday", "hrm"); + require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; + $staticholiday = new Holiday($db); + $arraytypeholidays = $staticholiday->getTypes(1, 1); + $formquestion[] = array(); + $labeltypes = array(); + foreach ($typeleaves as $key => $val) { + $labeltypes[$val['id']] = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); + } + $formquestion [] = array( 'type' => 'other', + 'name' => 'typeofholiday', + 'label' => $langs->trans("Type"), + 'value' => $form->selectarray('typeholiday', $labeltypes, GETPOST('typeholiday', 'alpha'), 1) + ); + $formquestion [] = array( 'type' => 'other', + 'name' => 'nbdaysholydays', + 'label' => $langs->trans("NumberDayAddMass"), + 'value' => '' + ); + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassIncreaseHoliday"), $langs->trans("ConfirmMassIncreaseHolidayQuestion", count($toselect)), "increaseholiday", $formquestion, 1, 0, 200, 500, 1); +} print '
    '.$langs->trans('LastUpdateCP').': '."\n"; $lastUpdate = $holiday->getConfCP('lastUpdate'); @@ -288,11 +321,13 @@ if (count($typeleaves) == 0) { print '
    '; + print ''; + print ''; - print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth200'); + print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150'); print ''; @@ -326,11 +362,19 @@ if (count($typeleaves) == 0) { } print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]); print_liste_field_titre(''); + + if ($massactionbutton) { + $selectedfields = $form->showCheckAddButtons('checkforselect', 1); + } + + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print '
    '; + print ''; if (!empty($user->rights->holiday->define_holiday)) { // Allowed to set the balance of any user print ''; } 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($userstatic->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print '
    '."\n"; print ''; - if (! empty($object->fk_user_create)) { + if (!empty($object->fk_user_create)) { $userCreate=new User($db); $userCreate->fetch($object->fk_user_create); print ''; diff --git a/htdocs/holiday/info.php b/htdocs/holiday/info.php index 5df3a5069de..a1aea0720a5 100644 --- a/htdocs/holiday/info.php +++ b/htdocs/holiday/info.php @@ -23,6 +23,7 @@ * \brief Page to show a leave information */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index f5a112d0e43..564fb8a2a96 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -25,6 +25,7 @@ * \brief List of holiday */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -59,29 +60,6 @@ $id = GETPOST('id', 'int'); $childids = $user->getAllChildIds(1); -// Security check -$socid = 0; -if ($user->socid > 0) { // Protection if external user - //$socid = $user->socid; - accessforbidden(); -} -$result = restrictedArea($user, 'holiday', '', ''); -// If we are on the view of a specific user -if ($id > 0) { - $canread = 0; - if ($id == $user->id) { - $canread = 1; - } - if (!empty($user->rights->holiday->readall)) { - $canread = 1; - } - if (!empty($user->rights->holiday->read) && in_array($id, $childids)) { - $canread = 1; - } - if (!$canread) { - accessforbidden(); - } -} $diroutputmassaction = $conf->holiday->dir_output.'/temp/massgeneration/'.$user->id; @@ -148,7 +126,7 @@ $arrayfields = array( 'cp.date_debut'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>40), 'cp.date_fin'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>42), 'cp.date_valid'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1, 'position'=>60), - 'cp.date_approve'=>array('label'=>$langs->trans("DateApprove"), 'checked'=>1, 'position'=>70), + 'cp.date_approval'=>array('label'=>$langs->trans("DateApprove"), 'checked'=>1, 'position'=>70), 'cp.date_create'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'cp.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>501), 'cp.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), @@ -156,15 +134,36 @@ $arrayfields = array( // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; -if (empty($conf->holiday->enabled)) { - llxHeader('', $langs->trans('CPTitreMenu')); - print '
    '; - print ''.$langs->trans('NotActiveModCP').''; - print '
    '; - llxFooter(); - exit(); + +// Security check +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); } +if (empty($conf->holiday->enabled)) accessforbidden('Module not enabled'); + +$result = restrictedArea($user, 'holiday', '', ''); +// If we are on the view of a specific user +if ($id > 0) { + $canread = 0; + if ($id == $user->id) { + $canread = 1; + } + if (!empty($user->rights->holiday->readall)) { + $canread = 1; + } + if (!empty($user->rights->holiday->read) && in_array($id, $childids)) { + $canread = 1; + } + if (!$canread) { + accessforbidden(); + } +} + + + /* * Actions @@ -211,9 +210,9 @@ if (empty($reshook)) { // Mass actions $objectclass = 'Holiday'; $objectlabel = 'Holiday'; - $permissiontoread = $user->rights->holiday->read; - $permissiontodelete = $user->rights->holiday->delete; - $permissiontoapprove = $user->rights->holiday->approve; + $permissiontoread = $user->hasRight('holiday', 'read'); + $permissiontodelete = $user->hasRight('holiday', 'delete'); + $permissiontoapprove = $user->hasRight('holiday', 'approve'); $uploaddir = $conf->holiday->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -272,6 +271,8 @@ $sql .= " cp.statut as status,"; $sql .= " cp.fk_validator,"; $sql .= " cp.date_valid,"; $sql .= " cp.fk_user_valid,"; +$sql .= " cp.date_approval,"; +$sql .= " cp.fk_user_approve,"; $sql .= " cp.date_refuse,"; $sql .= " cp.fk_user_refuse,"; $sql .= " cp.date_cancel,"; @@ -303,6 +304,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."holiday as cp"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (cp.rowid = ef.fk_object)"; @@ -355,21 +359,32 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); - +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} //print $sql; $resql = $db->query($sql); @@ -539,7 +554,7 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); @@ -554,7 +569,13 @@ if ($resql) { // Filters print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['cp.ref']['checked'])) { print ''; } - // End date + // Date validation if (!empty($arrayfields['cp.date_valid']['checked'])) { print ''; } + // Date appoval + if (!empty($arrayfields['cp.date_approval']['checked'])) { + print ''; + } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook @@ -674,14 +701,19 @@ if ($resql) { } // Action column - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print "\n"; print ''; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); + } if (!empty($arrayfields['cp.ref']['checked'])) { print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder); } @@ -706,6 +738,9 @@ if ($resql) { if (!empty($arrayfields['cp.date_valid']['checked'])) { print_liste_field_titre($arrayfields['cp.date_valid']['label'], $_SERVER["PHP_SELF"], "cp.date_valid", "", $param, '', $sortfield, $sortorder, 'center '); } + if (!empty($arrayfields['cp.date_approval']['checked'])) { + print_liste_field_titre($arrayfields['cp.date_approval']['label'], $_SERVER["PHP_SELF"], "cp.date_approval", "", $param, '', $sortfield, $sortorder, 'center '); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -721,7 +756,9 @@ if ($resql) { if (!empty($arrayfields['cp.statut']['checked'])) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right '); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); + } print "\n"; $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon")); @@ -779,7 +816,18 @@ if ($resql) { $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon'; print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['cp.ref']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; } - /*if (!empty($arrayfields['cp.date_approve']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; - }*/ + // Date approval + if (!empty($arrayfields['cp.date_approval']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -881,15 +931,17 @@ if ($resql) { } // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index bfde7e34191..a1a23715126 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -24,6 +24,7 @@ * \brief Monthly report of leave requests. */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -117,16 +118,16 @@ if (empty($reshook)) { } $arrayfields = array( - 'cp.ref'=>array('label'=>$langs->trans('Ref'), 'checked'=>1), - 'cp.fk_user'=>array('label'=>$langs->trans('Employee'), 'checked'=>1), - 'cp.fk_type'=>array('label'=>$langs->trans('Type'), 'checked'=>1), - 'cp.date_debut'=>array('label'=>$langs->trans('DateDebCP'), 'checked'=>1), - 'cp.date_fin'=>array('label'=>$langs->trans('DateFinCP'), 'checked'=>1), - 'used_days'=>array('label'=>$langs->trans('NbUseDaysCPShort'), 'checked'=>1), - 'date_start_month'=>array('label'=>$langs->trans('DateStartInMonth'), 'checked'=>1), - 'date_end_month'=>array('label'=>$langs->trans('DateEndInMonth'), 'checked'=>1), - 'used_days_month'=>array('label'=>$langs->trans('NbUseDaysCPShortInMonth'), 'checked'=>1), - 'cp.description'=>array('label'=>$langs->trans('DescCP'), 'checked'=>1), + 'cp.ref'=>array('label' => 'Ref', 'checked'=>1), + 'cp.fk_user'=>array('label' => 'Employee', 'checked'=>1), + 'cp.fk_type'=>array('label' => 'Type', 'checked'=>1), + 'cp.date_debut'=>array('label' => 'DateDebCP', 'checked'=>1), + 'cp.date_fin'=>array('label' => 'DateFinCP', 'checked'=>1), + 'used_days'=>array('label' => 'NbUseDaysCPShort', 'checked'=>1), + 'date_start_month'=>array('label' => 'DateStartInMonth', 'checked'=>1), + 'date_end_month'=>array('label' => 'DateEndInMonth', 'checked'=>1), + 'used_days_month'=>array('label' => 'NbUseDaysCPShortInMonth', 'checked'=>1), + 'cp.description'=>array('label' => 'DescCP', 'checked'=>1), ); @@ -245,7 +246,7 @@ if (!empty($arrayfields['cp.ref']['checked'])) { // Filter: Employee if (!empty($arrayfields['cp.fk_user']['checked'])) { print ''; } @@ -310,22 +311,22 @@ if (!empty($arrayfields['ct.label']['checked'])) { print_liste_field_titre($arrayfields['ct.label']['label'], $_SERVER["PHP_SELF"], 'ct.label', '', '', '', $sortfield, $sortorder); } if (!empty($arrayfields['cp.date_debut']['checked'])) { - print_liste_field_titre($arrayfields['cp.date_debut']['label'], $_SERVER["PHP_SELF"], 'cp.date_debut', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['cp.date_debut']['label'], $_SERVER["PHP_SELF"], 'cp.date_debut', '', '', '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['cp.date_fin']['checked'])) { - print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], 'cp.date_fin', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], 'cp.date_fin', '', '', '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['used_days']['checked'])) { - print_liste_field_titre($arrayfields['used_days']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['used_days']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidth125 right '); } if (!empty($arrayfields['date_start_month']['checked'])) { - print_liste_field_titre($arrayfields['date_start_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['date_start_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['date_end_month']['checked'])) { - print_liste_field_titre($arrayfields['date_end_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['date_end_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['used_days_month']['checked'])) { - print_liste_field_titre($arrayfields['used_days_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['used_days_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidth125 right '); } if (!empty($arrayfields['cp.description']['checked'])) { print_liste_field_titre($arrayfields['cp.description']['label'], $_SERVER["PHP_SELF"], 'cp.description', '', '', '', $sortfield, $sortorder); @@ -334,7 +335,7 @@ print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', print ''; if ($num == 0) { - print ''; + print ''; } else { while ($obj = $db->fetch_object($resql)) { $user = new User($db); @@ -386,7 +387,7 @@ if ($num == 0) { print ''; if (!empty($arrayfields['cp.ref']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['cp.fk_user']['checked'])) { print ''; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index ea71deb4d26..9bd55252a43 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -24,6 +24,7 @@ * \ingroup holiday */ +// Load Dolibarr environment require '../main.inc.php'; // Security check (access forbidden for external user too) @@ -74,11 +75,6 @@ if (!$sortorder) { $sortorder = "DESC"; } -// Si l'utilisateur n'a pas le droit de lire cette page -if (!$user->rights->holiday->readall) { - accessforbidden(); -} - // Load translation files required by the page $langs->loadLangs(array('users', 'other', 'holiday')); @@ -92,12 +88,12 @@ $arrayfields = array(); $arrayofmassactions = array(); if (empty($conf->holiday->enabled)) { - llxHeader('', $langs->trans('CPTitreMenu')); - print '
    '; - print ''.$langs->trans('NotActiveModCP').''; - print '
    '; - llxFooter(); - exit(); + accessforbidden('Module not enabled'); +} + +// Si l'utilisateur n'a pas le droit de lire cette page +if (!$user->rights->holiday->readall) { + accessforbidden(); } @@ -287,7 +283,7 @@ print ''; print ''; print ''; -$newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request', '', $user->rights->holiday->write); +$newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create', '', $user->rights->holiday->write); print_barre_liste($langs->trans('LogCP'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1); print '
    '.$langs->trans('LastUpdateCP').': '; diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 223f8a720d5..99212988488 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -16,10 +16,12 @@ */ /** - * \file htdocs/hrm/admin/admin_establishment.php - * \ingroup HRM - * \brief HRM Establishment module setup page + * \file htdocs/hrm/admin/admin_establishment.php + * \ingroup HRM + * \brief HRM Establishment module setup page */ + +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php'; @@ -29,15 +31,16 @@ $langs->loadLangs(array('admin', 'hrm')); $error = 0; +// Permissions $permissiontoread = $user->admin; -$permissiontoadd = $user->admin; +$permissiontoadd = $user->admin; // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled('hrm')) accessforbidden(); if (empty($permissiontoread)) accessforbidden(); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -53,10 +56,10 @@ if (empty($page) || $page == -1) { $page = 0; } +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; /* diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index 6763fb43f8e..ece067ce072 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -16,10 +16,12 @@ */ /** - * \file htdocs/hrm/admin/admin_hrm.php - * \ingroup HRM - * \brief HRM module setup page + * \file htdocs/hrm/admin/admin_hrm.php + * \ingroup HRM + * \brief HRM module setup page */ + +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -27,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'hrm')); +// Get Parameters $action = GETPOST('action', 'aZ09'); // Other parameters HRM_* @@ -34,15 +37,16 @@ $list = array( // 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example ); +// Permissions $permissiontoread = $user->admin; -$permissiontoadd = $user->admin; +$permissiontoadd = $user->admin; // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled('hrm')) accessforbidden(); if (empty($permissiontoread)) accessforbidden(); diff --git a/htdocs/hrm/admin/evaluation_extrafields.php b/htdocs/hrm/admin/evaluation_extrafields.php index 6513ea311e3..8363829975e 100644 --- a/htdocs/hrm/admin/evaluation_extrafields.php +++ b/htdocs/hrm/admin/evaluation_extrafields.php @@ -21,9 +21,9 @@ */ /** - * \file admin/evaluation_extrafields.php - * \ingroup hrm - * \brief Page to setup extra fields of hrm + * \file htdocs/hrm/admin/evaluation_extrafields.php + * \ingroup hrm + * \brief Page to setup extra fields of hrm evaluation */ // Load Dolibarr environment @@ -44,10 +44,12 @@ foreach ($tmptype2label as $key => $val) { $type2label[$key] = $langs->transnoentitiesnoconv($val); } +// Get Parameters $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'hrm_evaluation'; //Must be the $table_element of the class that manage extrafield +// Security Check if (!$user->admin) { accessforbidden(); } @@ -86,14 +88,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/hrm/admin/job_extrafields.php b/htdocs/hrm/admin/job_extrafields.php index 5d6ea5d6990..6ac0773c00f 100644 --- a/htdocs/hrm/admin/job_extrafields.php +++ b/htdocs/hrm/admin/job_extrafields.php @@ -21,9 +21,9 @@ */ /** - * \file admin/job_extrafields.php - * \ingroup hrm - * \brief Page to setup extra fields of hrm + * \file htdocs/hrm/admin/job_extrafields.php + * \ingroup hrm + * \brief Page to setup extra fields of hrm jobs */ // Load Dolibarr environment @@ -44,10 +44,12 @@ foreach ($tmptype2label as $key => $val) { $type2label[$key] = $langs->transnoentitiesnoconv($val); } +// Get Parameters $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'hrm_job'; //Must be the $table_element of the class that manage extrafield +// Security Check if (!$user->admin) { accessforbidden(); } @@ -65,7 +67,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; * View */ -$textobject = $langs->transnoentitiesnoconv("Job"); +$textobject = $langs->transnoentitiesnoconv("JobPosition"); $help_url = ''; $page_name = "HrmSetup"; @@ -86,14 +88,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/hrm/admin/skill_extrafields.php b/htdocs/hrm/admin/skill_extrafields.php index adcf6277dd0..d2541af15fa 100644 --- a/htdocs/hrm/admin/skill_extrafields.php +++ b/htdocs/hrm/admin/skill_extrafields.php @@ -21,9 +21,9 @@ */ /** - * \file admin/skill_extrafields.php - * \ingroup hrm - * \brief Page to setup extra fields of hrm + * \file htdocs/hrm/admin/skill_extrafields.php + * \ingroup hrm + * \brief Page to setup extra fields of hrm skills */ // Load Dolibarr environment @@ -48,6 +48,7 @@ $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'hrm_skill'; //Must be the $table_element of the class that manage extrafield +// Security check if (!$user->admin) { accessforbidden(); } @@ -86,14 +87,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 326ced8b9c8..6a37ba1e929 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -445,6 +445,9 @@ class Establishment extends CommonObject $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; + $label .= '
    '; + $label .= ''.$langs->trans('Residence').': '.$this->address.', '.$this->zip.' '.$this->town; + $url = DOL_URL_ROOT.'/hrm/establishment/card.php?id='.$this->id; if ($option != 'nolink') { @@ -489,7 +492,7 @@ class Establishment extends CommonObject } if ($withpicto != 2) { - $result .= $this->ref; + $result .= $this->label; } $result .= $linkend; diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index f21f7a6ba2b..c4b8bd46178 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -20,9 +20,9 @@ */ /** - * \file class/evaluation.class.php - * \ingroup hrm - * \brief This file is a CRUD class file for Evaluation (Create/Read/Update/Delete) + * \file htdocs/hrm/class/evaluation.class.php + * \ingroup hrm + * \brief This file is a CRUD class file for Evaluation (Create/Read/Update/Delete) */ // Put here all includes required by your class file @@ -119,7 +119,7 @@ class Evaluation extends CommonObject 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '6' => 'Closed'),), 'date_eval' => array('type'=>'date', 'label'=>'DateEval', 'enabled'=>'1', 'position'=>502, 'notnull'=>1, 'visible'=>1,), 'fk_user' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'User', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1,), - 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,), + 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobPosition', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,), ); public $rowid; public $ref; diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 8fd7d3b177a..f9bbde51912 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -178,7 +178,7 @@ class Evaluationline extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -383,10 +383,10 @@ class Evaluationline extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { - $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; } elseif ($key == 'customsql') { $sqlwhere[] = $value; + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; } elseif (strpos($value, '%') === false) { $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; } else { @@ -500,8 +500,8 @@ class Evaluationline extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->evaluationdet->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->evaluationdet->evaluationdet_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->evaluationdet->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->evaluationdet->evaluationdet_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -618,8 +618,8 @@ class Evaluationline extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -642,8 +642,8 @@ class Evaluationline extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -666,8 +666,8 @@ class Evaluationline extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index c21335f2df5..117878c10c9 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -177,7 +177,7 @@ class Job extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -496,8 +496,8 @@ class Job extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->job->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->job->job_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->job->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->job->job_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -652,8 +652,8 @@ class Job extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -676,8 +676,8 @@ class Job extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -700,8 +700,8 @@ class Job extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index 9416907b8ed..5d0c04a4f47 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -110,10 +110,10 @@ class Position extends CommonObject 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), 'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>0,), 'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'default'=>0), - 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,), + 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobPosition', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,), 'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>51, 'notnull'=>1, 'visible'=>1,), 'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>1,), - 'abort_comment' => array('type'=>'varchar(255)', 'label'=>'AbandonmentComment', 'enabled'=>'1', 'position'=>502, 'notnull'=>0, 'visible'=>1,), + 'abort_comment' => array('type'=>'varchar(255)', 'label'=>'AbandonmentComment', 'enabled'=>'getDolGlobalInt("HRM_JOB_POSITON_ENDING_COMMENT")', 'position'=>502, 'notnull'=>0, 'visible'=>1,), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>0,), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), @@ -188,7 +188,7 @@ class Position extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { //$this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -507,8 +507,8 @@ class Position extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->position->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->position->position_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->position->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->position->position_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -626,8 +626,8 @@ class Position extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -650,8 +650,8 @@ class Position extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -674,8 +674,8 @@ class Position extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index d9f4073e11e..2c86c5dca56 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -189,7 +189,7 @@ class Skill extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -564,8 +564,8 @@ class Skill extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skill->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skill->skill_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skill->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skill->skill_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -682,8 +682,8 @@ class Skill extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -706,8 +706,8 @@ class Skill extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -730,8 +730,8 @@ class Skill extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index 3c24ca78415..4dface42230 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -169,7 +169,7 @@ class Skilldet extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -376,10 +376,10 @@ class Skilldet extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { - $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; } elseif ($key == 'customsql') { $sqlwhere[] = $value; + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; } elseif (strpos($value, '%') === false) { $sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")"; } else { @@ -488,8 +488,8 @@ class Skilldet extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skilldet->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skilldet->skilldet_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skilldet->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skilldet->skilldet_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -606,8 +606,8 @@ class Skilldet extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -630,8 +630,8 @@ class Skilldet extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -654,8 +654,8 @@ class Skilldet extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 6e2413c4f5f..6db80642bab 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -177,7 +177,7 @@ class SkillRank extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -527,8 +527,8 @@ class SkillRank extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skillrank->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->skillrank->skillrank_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skillrank->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->skillrank->skillrank_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -645,8 +645,8 @@ class SkillRank extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -669,8 +669,8 @@ class SkillRank extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -693,8 +693,8 @@ class SkillRank extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->hrm->hrm_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->hrm->hrm_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/hrm/compare.php b/htdocs/hrm/compare.php index c8bb01d85e5..686d5820695 100644 --- a/htdocs/hrm/compare.php +++ b/htdocs/hrm/compare.php @@ -1,9 +1,9 @@ - * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2021 Greg Rastklan - * Copyright (C) 2021 Jean-Pascal BOUDET - * Copyright (C) 2021 Grégory BLEMAND + * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2021 Greg Rastklan + * Copyright (C) 2021 Jean-Pascal BOUDET + * Copyright (C) 2021 Grégory BLEMAND * * 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 @@ -18,7 +18,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * \file class/compare.php + * \file htdocs/hrm/compare.php * \ingroup hrm * \brief This file compares skills of user groups * @@ -33,23 +33,29 @@ * */ + +// Load Dolibarr environment require_once '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm.lib.php'; -$permissiontoread = $user->rights->hrm->evaluation->read || $user->rights->hrm->compare_advance->read; -$permissiontoadd = 0; -if (empty($conf->hrm->enabled)) accessforbidden(); -if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden(); +// Load translation files required by the page $langs->load('hrm'); +// Permissions +$permissiontoread = $user->rights->hrm->evaluation->read || $user->rights->hrm->compare_advance->read; +$permissiontoadd = 0; + +if (empty($conf->hrm->enabled)) accessforbidden(); +if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden(); + /* * View diff --git a/htdocs/hrm/core/tpl/objectline_title.tpl.php b/htdocs/hrm/core/tpl/objectline_title.tpl.php index 3801288543a..ae835ea2bca 100644 --- a/htdocs/hrm/core/tpl/objectline_title.tpl.php +++ b/htdocs/hrm/core/tpl/objectline_title.tpl.php @@ -65,7 +65,7 @@ print '
    '; print ''; // Note -print ''; +print ''; //print ''; // No width to allow autodim diff --git a/htdocs/hrm/core/tpl/skilldet.fiche.tpl.php b/htdocs/hrm/core/tpl/skilldet.fiche.tpl.php index 60bb56ff173..81e3f9f2155 100644 --- a/htdocs/hrm/core/tpl/skilldet.fiche.tpl.php +++ b/htdocs/hrm/core/tpl/skilldet.fiche.tpl.php @@ -43,7 +43,7 @@ $value_private .= "\n"; /* // Special cases if ($module == 'propal') { -$permission = $user->rights->propale->creer; +$permission = $user->rights->propal->creer; } elseif ($module == 'supplier_proposal') { $permission = $user->rights->supplier_proposal->creer; } elseif ($module == 'fichinter') { diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 1fe67dd0bd1..8e00473bca2 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -20,6 +20,7 @@ * \brief Page to show an establishment */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php'; @@ -60,7 +61,7 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled('hrm')) accessforbidden(); if (empty($permissiontoread)) accessforbidden(); @@ -178,7 +179,7 @@ if ($action == 'create') { // Entity /* - if (! empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { print ''; print ''; print ''; print ''; print ''; print ''; @@ -419,8 +420,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea * Action bar */ print '
    '; + + // Modify print ''.$langs->trans('Modify').''; - print ''.$langs->trans('Delete').''; + + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); + print '
    '; } diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index afbd480e928..641c53e0f70 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -20,6 +20,7 @@ * \brief Page to show info of an establishment */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -85,7 +86,7 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled('hrm')) accessforbidden(); if (empty($permissiontoread)) accessforbidden(); @@ -123,11 +124,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = establishment_prepare_head($object); @@ -147,7 +148,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -168,7 +169,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/hrm/evaluation_agenda.php b/htdocs/hrm/evaluation_agenda.php index 8d2d234dd43..cc314bd9bce 100644 --- a/htdocs/hrm/evaluation_agenda.php +++ b/htdocs/hrm/evaluation_agenda.php @@ -20,9 +20,9 @@ */ /** - * \file evaluation_agenda.php - * \ingroup hr - * \brief Tab of events on Evaluation + * \file htdocs/hrm/evaluation_agenda.php + * \ingroup hrm + * \brief Tab of events on Evaluation */ @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); // Get parameters $id = GETPOST('id', 'int'); @@ -85,9 +85,10 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } +// Permissions $permissiontoadd = $user->rights->hrm->evaluation->write; // Used by the include of actions_addupdatedelete.inc.php $permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php @@ -134,11 +135,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = evaluationPrepareHead($object); @@ -157,7 +158,7 @@ if ($object->id > 0) { $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$u_position->getNomUrl(1); $job = new Job($db); $job->fetch($object->fk_job); - $morehtmlref .= '
    '.$langs->trans('Job').' : '.$job->getNomUrl(1); + $morehtmlref .= '
    '.$langs->trans('JobPosition').' : '.$job->getNomUrl(1); $morehtmlref .= ''; @@ -209,7 +210,7 @@ if ($object->id > 0) { print ''; if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&id='.$object->id.'&socid='.$socid; + $param = '&id='.$object->id.'&socid='.(!empty($socid) ? '&socid='.$socid : ''); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php index 80110a3e8a0..101873a69e4 100644 --- a/htdocs/hrm/evaluation_card.php +++ b/htdocs/hrm/evaluation_card.php @@ -20,9 +20,9 @@ */ /** - * \file evaluation_card.php - * \ingroup hrm - * \brief Page to create/edit/view evaluation + * \file htdocs/hrm/evaluation_card.php + * \ingroup hrm + * \brief Page to create/edit/view evaluation */ // Load Dolibarr environment @@ -32,14 +32,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/skillrank.class.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_evaluation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skillrank.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; + // Load translation files required by the page -$langs->loadLangs(array("hrm", "other", 'products')); +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? // Get parameters $id = GETPOST('id', 'int'); @@ -50,7 +51,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'evaluationcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Evaluation($db); @@ -79,7 +80,7 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. - +// Permissions $permissiontoread = $user->rights->hrm->evaluation->read; $permissiontoadd = $user->rights->hrm->evaluation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontovalidate = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->hrm->evaluation_advance->validate) || (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $permissiontoadd); @@ -93,7 +94,9 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled("hrm")) { + accessforbidden(); +} if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden(); @@ -282,11 +285,7 @@ if ($action == 'create') { print dol_get_fiche_end(); - print '
    '; - print ''; - print '  '; - print ''; // Cancel for create does not post form if we don't know the backtopage - print '
    '; + print $form->buttonsSaveCancel("Create", "Cancel"); print ''; } @@ -320,9 +319,7 @@ if (($id || $ref) && $action == 'edit') { print dol_get_fiche_end(); - print '
    '; - print '   '; - print '
    '; + print $form->buttonsSaveCancel(); print ''; } @@ -353,7 +350,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } $text = $langs->trans('ConfirmValidateEvaluation', $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -380,8 +377,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - // Confirmation of action xxxx + // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) if ($action == 'xxx') { + $text = $langs->trans('ConfirmActionMyObject', $object->ref); + $formquestion = array(); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); @@ -411,7 +410,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$u_position->getNomUrl(1); $job = new Job($db); $job->fetch($object->fk_job); - $morehtmlref .= '
    '.$langs->trans('Job').' : '.$job->getNomUrl(1); + $morehtmlref .= '
    '.$langs->trans('JobPosition').' : '.$job->getNomUrl(1); $morehtmlref .= ''; @@ -445,11 +444,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea * Lines */ - if (!empty($object->table_element_line)) { - if ($object->status == Evaluation::STATUS_DRAFT) { - $result = $object->getLinesArray(); + if (!empty($object->table_element_line) && $object->status == Evaluation::STATUS_DRAFT) { + // Show object lines + $result = $object->getLinesArray(); + if ($result < 0) { + dol_print_error($db, $object->error, $object->errors); + } - print ' + print '
    '; + + print ' @@ -457,46 +461,44 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea '; - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print '
    '; - /*if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { - print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; print ''; @@ -582,7 +603,7 @@ if ($resql) { // Approver if (!empty($arrayfields['cp.fk_validator']['checked'])) { - if ($user->rights->holiday->readall) { + if ($user->hasRight('holiday', 'readall')) { print ''; $validator = new UserGroup($db); $excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id; @@ -637,12 +658,18 @@ if ($resql) { print ''; print ''; + print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - 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 ''; print $holidaystatic->getNomUrl(1, 1); @@ -840,18 +888,20 @@ if ($resql) { $totalarray['nbfield']++; } } + // Date validation if (!empty($arrayfields['cp.date_valid']['checked'])) { // date_valid is both date_valid but also date_approval - print ''; + print ''; print dol_print_date($db->jdate($obj->date_valid), 'day'); print ''; - print dol_print_date($db->jdate($obj->date_approve), 'day'); - print ''; + print dol_print_date($db->jdate($obj->date_approval), 'day'); + 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; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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 ''; + print ''; - print $form->select_dolusers($search_employee, "search_employee", 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + print $form->select_dolusers($search_employee, "search_employee", 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth100'); print '
    '.$langs->trans('None').'
    '.$langs->trans('None').'
    '.$holidaystatic->getNomUrl(1, 1).''.$holidaystatic->getNomUrl(1, 1).''.$user->getFullName($langs).''.$langs->trans('Label').''.$langs->trans('Description').''.$langs->trans('EmployeeRank').''.$form->textwithpicto($langs->trans("Level"), $langs->trans('EmployeeRank')).'
    '.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; @@ -254,7 +255,7 @@ if ($action == 'create') { } // Part to edit record -if (($id || $ref) && $action == 'edit') { +if ((!empty($id) || !empty($ref)) && $action == 'edit') { $result = $object->fetch($id); if ($result > 0) { $head = establishment_prepare_head($object); @@ -282,7 +283,7 @@ if (($id || $ref) && $action == 'edit') { // Entity /* - if (! empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { print '
    '.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; print $object->entity > 0 ? $object->entity : $conf->entity; @@ -371,7 +372,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Entity /* - if ($conf->multicompany->enabled) { + if (!isModEnabled('multicompany') { print '
    '.$langs->trans("Entity").''.$object->entity.'
    '; - print ''; - print ''; - print ''; - print ''; - print ''; - }*/ - - - if (!empty($object->lines)) { - $conf->modules_parts['tpl']['hrm']='/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran - print '
    '.$langs->trans('Skill').''.$langs->trans('Description').''.$langs->trans('Rank').'
    '; - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, ''); - print '
    '; - } - - - - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { - print '
    '; - - if ($object->status == $object::STATUS_DRAFT && $permissiontoadd) { - print '
    '; - print ''; - print '
    '; - } - } - - - print '
    '; - - print "\n"; - print "
    "; + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } + + $conf->modules_parts['tpl']['hrm']='/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran + + print '
    '; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print ''; + } + + //if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + //} + + // Form to add new line + /* + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) + $object->formAddObjectLine(1, $mysoc, $soc); + } + } + */ + + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '
    '; + } + print '
    '; + + print "\n"; + + print "
    "; } // list of comparison @@ -614,15 +616,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); } // Back to draft if ($object->status == $object::STATUS_VALIDATED) { - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); - print dolGetButtonAction($langs->trans('Close'), '', 'close', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_CLOSED && $permissiontoclose)); + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Close'), 'close', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_CLOSED && $permissiontoclose)); } elseif ($object->status != $object::STATUS_CLOSED) { - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); } if ($object->status == $object::STATUS_CLOSED) { diff --git a/htdocs/hrm/evaluation_contact.php b/htdocs/hrm/evaluation_contact.php index 0cc25901302..4ea2e8e81be 100644 --- a/htdocs/hrm/evaluation_contact.php +++ b/htdocs/hrm/evaluation_contact.php @@ -20,22 +20,25 @@ */ /** - * \file evaluation_contact.php - * \ingroup hrm - * \brief Tab for contacts linked to Evaluation + * \file htdocs/hrm/evaluation_contact.php + * \ingroup hrm + * \brief Tab for contacts linked to Evaluation */ + // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_evaluation.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); +// Get Parameters $id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -53,6 +56,7 @@ $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 +// Permissions $permission = $user->rights->hrm->evaluation->write; // Security check (enable the most restrictive one) @@ -64,10 +68,13 @@ $permission = $user->rights->hrm->evaluation->write; //if (!$permissiontoread) accessforbidden(); + /* - * Add a new contact + * Action */ +// Add a new contact + if ($action == 'addcontact' && $permission) { $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); @@ -132,43 +139,13 @@ if ($object->id) { $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); - // Project - if (! empty($conf->project->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - 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 .= ': '.$proj->getNomUrl(); - } else { - $morehtmlref .= ''; - } - } - }*/ + $morehtmlref .= $langs->trans('Label').' : '.$object->label; + $u_position = new User(($db)); + $u_position->fetch($object->fk_user); + $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$u_position->getNomUrl(1); + $job = new Job($db); + $job->fetch($object->fk_job); + $morehtmlref .= '
    '.$langs->trans('JobPosition').' : '.$job->getNomUrl(1); $morehtmlref .= '
    '; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); diff --git a/htdocs/hrm/evaluation_document.php b/htdocs/hrm/evaluation_document.php index cf93c75edbf..84bc6023291 100644 --- a/htdocs/hrm/evaluation_document.php +++ b/htdocs/hrm/evaluation_document.php @@ -20,9 +20,9 @@ */ /** - * \file evaluation_document.php - * \ingroup hrm - * \brief Tab for documents linked to Evaluation + * \file htdocs/hrm/evaluation_document.php + * \ingroup hrm + * \brief Tab for documents linked to Evaluation */ @@ -33,20 +33,20 @@ 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'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_evaluation.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); - +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); +// Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); -// Get parameters + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -80,7 +80,8 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->hrm->multidir_output[$object->entity ? $object->entity : $conf->entity]."/evaluation/".get_exdir(0, 0, 0, 1, $object); } -$permissiontoadd = $user->rights->hrm->evaluation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +// Permissions +$permissiontoadd = $user->rights->hrm->evaluation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php $permissiontoread = $user->rights->hrm->evaluation->read; // Security check (enable the most restrictive one) @@ -137,7 +138,7 @@ if ($object->id) { $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$u_position->getNomUrl(1); $job = new Job($db); $job->fetch($object->fk_job); - $morehtmlref .= '
    '.$langs->trans('Job').' : '.$job->getNomUrl(1); + $morehtmlref .= '
    '.$langs->trans('JobPosition').' : '.$job->getNomUrl(1); $morehtmlref .= ''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/hrm/evaluation_list.php b/htdocs/hrm/evaluation_list.php index 84080f930fa..dea398ad6a6 100644 --- a/htdocs/hrm/evaluation_list.php +++ b/htdocs/hrm/evaluation_list.php @@ -20,9 +20,9 @@ */ /** - * \file evaluation_list.php - * \ingroup hrm - * \brief List page for evaluation + * \file htdocs/hrm/evaluation_list.php + * \ingroup hrm + * \brief List page for evaluation */ @@ -40,8 +40,9 @@ require_once __DIR__.'/class/evaluation.class.php'; //dol_include_once('/othermodule/class/otherobject.class.php'); // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); +// Get Parameters $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -49,10 +50,11 @@ $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') : 'evaluationlist'; // 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') +$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'); +$ref = GETPOST('ref', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -130,10 +132,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -$permissiontoread = $user->rights->hrm->evaluation->read; +// Permissions +$permissiontoread = $user->rights->hrm->evaluation->read; $permissiontoreadall = $user->rights->hrm->evaluation->readall; -$permissiontoadd = $user->rights->hrm->evaluation->write; -$permissiontodelete = $user->rights->hrm->evaluation->delete; +$permissiontoadd = $user->rights->hrm->evaluation->write; +$permissiontodelete = $user->rights->hrm->evaluation->delete; // Security check if (empty($conf->hrm->enabled)) { diff --git a/htdocs/hrm/evaluation_note.php b/htdocs/hrm/evaluation_note.php index 1b6b5a35564..3f0d41e946a 100644 --- a/htdocs/hrm/evaluation_note.php +++ b/htdocs/hrm/evaluation_note.php @@ -20,25 +20,27 @@ */ /** - * \file evaluation_note.php - * \ingroup hrm - * \brief Tab for notes on Evaluation + * \file htdocs/hrm/evaluation_note.php + * \ingroup hrm + * \brief Tab for notes on Evaluation */ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php'; + // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies")); +$langs->loadLangs(array('hrm', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -47,17 +49,19 @@ $object = new Evaluation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('evaluationnote', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } -$permissionnote = $user->rights->hrm->evaluation->write; // Used by the include of actions_setnotes.inc.php -$permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php +// Permissions +$permissionnote = $user->rights->hrm->evaluation->write; // Used by the include of actions_setnotes.inc.php +$permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php // Security check (enable the most restrictive one) //if ($user->socid > 0) accessforbidden(); @@ -109,7 +113,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$u_position->getNomUrl(1); $job = new Job($db); $job->fetch($object->fk_job); - $morehtmlref .= '
    '.$langs->trans('Job').' : '.$job->getNomUrl(1); + $morehtmlref .= '
    '.$langs->trans('JobPosition').' : '.$job->getNomUrl(1); $morehtmlref .= ''; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 1160ee0fc14..d81044d4a23 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -21,39 +21,45 @@ */ /** - * \file htdocs/hrm/index.php - * \ingroup hrm - * \brief Home page for HRM area. + * \file htdocs/hrm/index.php + * \ingroup hrm + * \brief Home page for HRM area. */ + +// Load Dolibarr environment require '../main.inc.php'; 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.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; -if (!empty($conf->deplacement->enabled)) { +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; + +if (isModEnabled('deplacement')) { require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; } -if (!empty($conf->expensereport->enabled)) { +if (isModEnabled('expensereport')) { require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; } -if (!empty($conf->recruitment->enabled)) { +if (isModEnabled('recruitment')) { require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; } -if (!empty($conf->holiday->enabled)) { +if (isModEnabled('holiday')) { require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; } + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager = new HookManager($db); $hookmanager->initHooks('hrmindex'); // Load translation files required by the page $langs->loadLangs(array('users', 'holiday', 'trips', 'boxes')); +// Get Parameters $socid = GETPOST("socid", "int"); // Protection if external user @@ -73,7 +79,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; */ // Update sold -if (!empty($conf->holiday->enabled) && !empty($setupcompanynotcomplete)) { +if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) { $holidaystatic = new Holiday($db); $result = $holidaystatic->updateBalance(); } @@ -106,15 +112,15 @@ if (!empty($setupcompanynotcomplete)) { print '
    '; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is useless due to the global search combo - if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) { + if (isModEnabled('holiday') && $user->rights->holiday->read) { $langs->load("holiday"); $listofsearchfields['search_holiday'] = array('text'=>'TitreRequestCP'); } - if (!empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) { + if (isModEnabled('deplacement') && $user->rights->deplacement->lire) { $langs->load("trips"); $listofsearchfields['search_deplacement'] = array('text'=>'ExpenseReport'); } - if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { + if (isModEnabled('expensereport') && $user->rights->expensereport->lire) { $langs->load("trips"); $listofsearchfields['search_expensereport'] = array('text'=>'ExpenseReport'); } @@ -144,7 +150,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is usel } -if (!empty($conf->holiday->enabled)) { +if (isModEnabled('holiday')) { if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) { $holidaystatic = new Holiday($db); $user_id = $user->id; @@ -181,7 +187,7 @@ print '
    '; // Latest leave requests -if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) { +if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.statut as user_status,"; $sql .= " x.rowid, x.ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; @@ -264,7 +270,7 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) { // Latest expense report -if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { +if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo,"; $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u"; @@ -336,7 +342,7 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) { +if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) { $staticrecruitmentcandidature = new RecruitmentCandidature($db); $staticrecruitmentjobposition = new RecruitmentJobPosition($db); $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,"; diff --git a/htdocs/hrm/job_agenda.php b/htdocs/hrm/job_agenda.php index b8008f009ea..1da6b4948b1 100644 --- a/htdocs/hrm/job_agenda.php +++ b/htdocs/hrm/job_agenda.php @@ -20,24 +20,24 @@ */ /** - * \file job_agenda.php - * \ingroup hrm - * \brief Tab of events on Job + * \file htdocs/hrm/job_agenda.php + * \ingroup hrm + * \brief Tab of events on Job */ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -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/company.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); // Get parameters $id = GETPOST('id', 'int'); @@ -84,11 +84,12 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } +// Permissions $permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php +$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php // Security check (enable the most restrictive one) //if ($user->socid > 0) accessforbidden(); @@ -133,11 +134,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = jobPrepareHead($object); @@ -197,7 +198,7 @@ if ($object->id > 0) { } if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&id='.$object->id.'&socid='.$socid; + $param = '&id='.$object->id.'&socid='.(!empty($socid) ? '&socid='.$socid : ''); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/hrm/job_card.php b/htdocs/hrm/job_card.php index a9ec4f77121..ba4198497b0 100644 --- a/htdocs/hrm/job_card.php +++ b/htdocs/hrm/job_card.php @@ -20,7 +20,7 @@ */ /** - * \file job_card.php + * \file htdocs/hrm/job_card.php * \ingroup hrm * \brief Page to create/edit/view job */ @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other", 'products')); +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? // Get parameters $id = GETPOST('id', 'int'); @@ -47,7 +47,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Job($db); @@ -76,9 +76,9 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. - +// Permissions $permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->hrm->all->delete; $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/job'; diff --git a/htdocs/hrm/job_contact.php b/htdocs/hrm/job_contact.php index 76f6e73d690..dc25ad6eae2 100644 --- a/htdocs/hrm/job_contact.php +++ b/htdocs/hrm/job_contact.php @@ -20,22 +20,23 @@ */ /** - * \file job_contact.php - * \ingroup hrm - * \brief Tab for contacts linked to Job + * \file htdocs/hrm/job_contact.php + * \ingroup hrm + * \brief Tab for contacts linked to Job */ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); +// Get Parameters $id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -53,6 +54,7 @@ $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 +// Permissions $permission = $user->rights->hrm->job->write; // Security check (enable the most restrictive one) @@ -139,7 +141,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -160,7 +162,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/hrm/job_document.php b/htdocs/hrm/job_document.php index 0e4d34e0412..eda504b07cd 100644 --- a/htdocs/hrm/job_document.php +++ b/htdocs/hrm/job_document.php @@ -20,9 +20,9 @@ */ /** - * \file job_document.php - * \ingroup hrm - * \brief Tab for documents linked to Job + * \file htdocs/hrm/job_document.php + * \ingroup hrm + * \brief Tab for documents linked to Job */ // Load Dolibarr environment @@ -36,15 +36,15 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies", "other", "mails")); - +$langs->loadLangs(array('hrm', 'companies', 'other', 'mails')); +// Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); -// Get parameters + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -68,6 +68,7 @@ $object = new Job($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('jobdocument', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -78,6 +79,7 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->hrm->multidir_output[$object->entity ? $object->entity : $conf->entity]."/job/".get_exdir(0, 0, 0, 1, $object); } +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php diff --git a/htdocs/hrm/job_list.php b/htdocs/hrm/job_list.php index 53cb43ad080..ed0fb480a3a 100644 --- a/htdocs/hrm/job_list.php +++ b/htdocs/hrm/job_list.php @@ -20,9 +20,9 @@ */ /** - * \file job_list.php - * \ingroup hrm - * \brief List page for job + * \file htdocs/hrm/job_list.php + * \ingroup hrm + * \brief List page of jobs */ @@ -40,8 +40,9 @@ require_once __DIR__.'/class/job.class.php'; //dol_include_once('/othermodule/class/otherobject.class.php'); // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); +// Get Parameters $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -130,8 +131,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Permissions $permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; +$permissiontoadd = $user->rights->hrm->all->write; $permissiontodelete = $user->rights->hrm->all->delete; // Security check diff --git a/htdocs/hrm/job_note.php b/htdocs/hrm/job_note.php index 7205afec247..f90ccfc18e0 100644 --- a/htdocs/hrm/job_note.php +++ b/htdocs/hrm/job_note.php @@ -20,9 +20,9 @@ */ /** - * \file job_note.php - * \ingroup hrm - * \brief Tab for notes on Job + * \file htdocs/hrm/job_note.php + * \ingroup hrm + * \brief Tab for notes on Job */ @@ -33,12 +33,13 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies")); +$langs->loadLangs(array('hrm', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -47,15 +48,17 @@ $object = new Job($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('jobnote', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissionnote = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php diff --git a/htdocs/hrm/lib/hrm.lib.php b/htdocs/hrm/lib/hrm.lib.php index 508cbef22fd..88a851f0137 100644 --- a/htdocs/hrm/lib/hrm.lib.php +++ b/htdocs/hrm/lib/hrm.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2021 Greg Rastklan * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND + * Copyright (C) 2022 Frédéric 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 @@ -21,7 +22,7 @@ /** * \file hrm/lib/hrm.lib.php - * \ingroup hr + * \ingroup hrm * \brief Library files with common functions for Workstation */ @@ -32,10 +33,15 @@ */ function hrmAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; $langs->load("hrm"); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('hrm_evaluation'); + $extrafields->fetch_name_optionals_label('hrm_job'); + $extrafields->fetch_name_optionals_label('hrm_skill'); + $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . "/admin/hrm.php"; @@ -43,37 +49,37 @@ function hrmAdminPrepareHead() $head[$h][2] = 'settings'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php'; - $head[$h][1] = $langs->trans("Establishments"); - $head[$h][2] = 'establishments'; - $h++; - - $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/evaluation_extrafields.php'; - $head[$h][1] = $langs->trans("EvaluationsExtraFields"); - $head[$h][2] = 'evaluationsAttributes'; - $h++; - - $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/job_extrafields.php'; - $head[$h][1] = $langs->trans("JobsExtraFields"); - $head[$h][2] = 'jobsAttributes'; - $h++; - - $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/skill_extrafields.php'; - $head[$h][1] = $langs->trans("SkillsExtraFields"); - $head[$h][2] = 'skillsAttributes'; - $h++; - - /* - $head[$h][0] = dol_buildpath("/workstation/admin/myobject_extrafields.php", 1); - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'myobject_extrafields'; + $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php'; + $head[$h][1] = $langs->trans("Establishments"); + $head[$h][2] = 'establishments'; $h++; - */ - /*$head[$h][0] = require_once "/admin/about.php"; - $head[$h][1] = $langs->trans("About"); - $head[$h][2] = 'about'; - $h++;*/ + $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/skill_extrafields.php'; + $head[$h][1] = $langs->trans("SkillsExtraFields"); + $nbExtrafields = $extrafields->attributes['hrm_skill']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } + $head[$h][2] = 'skillsAttributes'; + $h++; + + $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/job_extrafields.php'; + $head[$h][1] = $langs->trans("JobsExtraFields"); + $nbExtrafields = $extrafields->attributes['hrm_job']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } + $head[$h][2] = 'jobsAttributes'; + $h++; + + $head[$h][0] = DOL_URL_ROOT . '/hrm/admin/evaluation_extrafields.php'; + $head[$h][1] = $langs->trans("EvaluationsExtraFields"); + $nbExtrafields = $extrafields->attributes['hrm_evaluation']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } + $head[$h][2] = 'evaluationsAttributes'; + $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line @@ -85,7 +91,7 @@ function hrmAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin'); - complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove'); return $head; } diff --git a/htdocs/hrm/position.php b/htdocs/hrm/position.php index 78838136a1e..4d6b130d1e0 100644 --- a/htdocs/hrm/position.php +++ b/htdocs/hrm/position.php @@ -20,9 +20,9 @@ */ /** - * \file position.php - * \ingroup hrm - * \brief Page to create/edit/view position + * \file htdocs/hrm/position.php + * \ingroup hrm + * \brief Page to create/edit/view position */ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db @@ -31,7 +31,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -41,7 +40,6 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification @@ -88,10 +86,6 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... -$backtopage = GETPOST('backtopage', 'alpha'); -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$fk_job = GETPOST('fk_job', 'int'); // Get parameters $id = GETPOST('fk_job', 'int'); @@ -105,12 +99,18 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'positioncard'; // To manage different context of search +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +$fk_job = GETPOST('fk_job', 'int'); + // Initialize technical objects $object = new Job($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id; + $hookmanager->initHooks(array('positiontab', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels @@ -130,6 +130,7 @@ foreach ($object->fields as $key => $val) { // Load object include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->hrm->all->delete; @@ -900,6 +901,8 @@ function DisplayPositionList() // Part to create if ($action == 'create') { $object = new Position($db); + // Fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label($object->table_element); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Position")), '', 'object_' . $object->picto); print '
    '; diff --git a/htdocs/hrm/position_agenda.php b/htdocs/hrm/position_agenda.php index ccbfabb985b..846202e26a0 100644 --- a/htdocs/hrm/position_agenda.php +++ b/htdocs/hrm/position_agenda.php @@ -20,9 +20,9 @@ */ /** - * \file position_agenda.php - * \ingroup hrm - * \brief Tab of events on Position + * \file htdocs/hrm/position_agenda.php + * \ingroup hrm + * \brief Tab of events on Position */ @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); // Get parameters $id = GETPOST('id', 'int'); @@ -79,15 +79,17 @@ $object = new Position($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('positionagenda', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php @@ -134,11 +136,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = positionCardPrepareHead($object); @@ -208,7 +210,7 @@ if ($object->id > 0) { print '
    '; if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&id='.$object->id.'&socid='.$socid; + $param = '&id='.$object->id.'&socid='.(!empty($socid) ? '&socid='.$socid : ''); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/hrm/position_card.php b/htdocs/hrm/position_card.php index 746e1265a0b..31328b4f625 100644 --- a/htdocs/hrm/position_card.php +++ b/htdocs/hrm/position_card.php @@ -20,9 +20,9 @@ */ /** - * \file position_card.php - * \ingroup hrm - * \brief Page to create/edit/view position + * \file htdocs/hrm/position_card.php + * \ingroup hrm + * \brief Page to create/edit/view job position */ @@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; //dol_include_once('/hrm/position.php'); +// Get Parameters $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); @@ -50,6 +51,7 @@ if ($res < 0) { dol_print_error($db, $object->error); } +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->hrm->all->delete; @@ -197,6 +199,9 @@ function displayPositionCard(&$object) $formfile = new FormFile($db); $formproject = new FormProjets($db); + $backtopage = GETPOST('backtopage', 'alpha'); + $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); + $title = $langs->trans("Position"); $help_url = ''; llxHeader('', $title, $help_url); @@ -337,7 +342,7 @@ function displayPositionCard(&$object) // */ // $filedir = $conf->societe->multidir_output[$object->entity].'/'.$object->id; // $urlsource = $_SERVER["PHP_SELF"]."?socid=".$object->id; -// $genallowed = $user->rights->societe->lire; +// $genallowed = $user->hasRight('societe', 'lire'); // $delallowed = $user->rights->societe->creer; // // print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang); diff --git a/htdocs/hrm/position_contact.php b/htdocs/hrm/position_contact.php index 56029f790a7..4d85987f4d6 100644 --- a/htdocs/hrm/position_contact.php +++ b/htdocs/hrm/position_contact.php @@ -20,22 +20,23 @@ */ /** - * \file position_contact.php - * \ingroup hrm - * \brief Tab for contacts linked to Position + * \file htdocs/hrm/position_contact.php + * \ingroup hrm + * \brief Tab for contacts linked to Job Position */ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies", "other", "mails")); +// Get Parameters $id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -47,12 +48,14 @@ $object = new Position($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('positioncontact', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 +// Permissions $permission = $user->rights->hrm->position->write; // Security check (enable the most restrictive one) @@ -139,7 +142,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -160,7 +163,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/hrm/position_document.php b/htdocs/hrm/position_document.php index c51f2204441..30f33453c03 100644 --- a/htdocs/hrm/position_document.php +++ b/htdocs/hrm/position_document.php @@ -20,9 +20,9 @@ */ /** - * \file position_document.php - * \ingroup hrm - * \brief Tab for documents linked to Position + * \file htdocs/hrm/position_document.php + * \ingroup hrm + * \brief Tab for documents linked to Position */ // Load Dolibarr environment @@ -39,13 +39,13 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies", "other", "mails")); - +// Get parameters $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); -// Get parameters +// Get parameters for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -79,8 +79,9 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->hrm->multidir_output[$object->entity ? $object->entity : $conf->entity]."/position/".get_exdir(0, 0, 0, 1, $object); } +// Permissions $permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php +$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php // Security check (enable the most restrictive one) //if ($user->socid > 0) accessforbidden(); diff --git a/htdocs/hrm/position_list.php b/htdocs/hrm/position_list.php index e9eb83e12e4..40cb706b5df 100644 --- a/htdocs/hrm/position_list.php +++ b/htdocs/hrm/position_list.php @@ -20,9 +20,9 @@ */ /** - * \file position_list.php - * \ingroup hrm - * \brief List page for position + * \file htdocs/hrm/position_list.php + * \ingroup hrm + * \brief List page for job positions */ @@ -40,8 +40,9 @@ require_once __DIR__.'/class/position.class.php'; //dol_include_once('/othermodule/class/otherobject.class.php'); // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); +// Get Parameters $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 ? @@ -51,8 +52,10 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'positionlist'; // 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') +$mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -114,11 +117,11 @@ $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { - $visible = (int) dol_eval($val['visible'], 1, 1, '1'); + $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1, 1, '1')), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -130,22 +133,20 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -$permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; +// Permissions +$permissiontoread = $user->rights->hrm->all->read; +$permissiontoadd = $user->rights->hrm->all->write; $permissiontodelete = $user->rights->hrm->all->delete; -// Security check -if (empty($conf->hrm->enabled)) { - accessforbidden('Module not enabled'); -} - // Security check (enable the most restrictive one) if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) accessforbidden(); //$socid = 0; if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->hrm->enabled)) accessforbidden(); +if (!isModEnabled('hrm')) { + accessforbidden('Module hrm not enabled'); +} if (!$permissiontoread) accessforbidden(); @@ -248,23 +249,23 @@ foreach ($search as $key => $val) { } $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) { - if ($search[$key] == '-1' || $search[$key] === '0') { + if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) { $search[$key] = ''; } $mode_search = 2; } if ($search[$key] != '') { - $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search)); } } else { if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { if (preg_match('/_dtstart$/', $key)) { - $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; } if (preg_match('/_dtend$/', $key)) { - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'"; } } } @@ -288,7 +289,7 @@ $sql .= $hookmanager->resPrint; /* If a group by is required $sql .= " GROUP BY "; foreach($object->fields as $key => $val) { - $sql .= "t.".$key.", "; + $sql .= "t.".$db->escape($key).", "; } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -303,8 +304,6 @@ $sql .= $hookmanager->resPrint; $sql = preg_replace('/,\s*$/', '', $sql); */ -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -314,24 +313,24 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $page = 0; $offset = 0; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { $obj = $db->fetch_object($resql); @@ -364,6 +363,9 @@ llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', ''); $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } @@ -372,11 +374,17 @@ if ($limit > 0 && $limit != $conf->liste_limit) { } foreach ($search as $key => $val) { - if (is_array($search[$key]) && count($search[$key])) { + if (is_array($search[$key])) { foreach ($search[$key] as $skey) { - $param .= '&search_'.$key.'[]='.urlencode($skey); + if ($skey != '') { + $param .= '&search_'.$key.'[]='.urlencode($skey); + } } - } else { + } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { + $param .= '&search_'.$key.'month='.((int) GETPOST('search_'.$key.'month', 'int')); + $param .= '&search_'.$key.'day='.((int) GETPOST('search_'.$key.'day', 'int')); + $param .= '&search_'.$key.'year='.((int) GETPOST('search_'.$key.'year', 'int')); + } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } } @@ -397,7 +405,7 @@ $arrayofmassactions = array( //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) { +if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { @@ -416,6 +424,7 @@ print ''; print ''; print ''; print ''; +print ''; $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/position.php', 1).'?action=create', '', $permissiontoadd); @@ -429,9 +438,12 @@ $trackid = 'xxxx'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($search_all) { + $setupstring = ''; foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; } + print ''."\n"; print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; } @@ -455,7 +467,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // 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 @@ -465,7 +477,15 @@ print ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} foreach ($object->fields as $key => $val) { + $searchkey = empty($search[$key]) ? '' : $search[$key]; $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { $cssforfield .= ($cssforfield ? ' ' : '').'center'; @@ -473,7 +493,7 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } if (!empty($arrayfields['t.'.$key]['checked'])) { @@ -481,9 +501,7 @@ foreach ($object->fields as $key => $val) { if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { - print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); - } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - print ''; + print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1); } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { print '
    '; print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -491,6 +509,12 @@ foreach ($object->fields as $key => $val) { print '
    '; print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; + } elseif ($key == 'lang') { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($db); + print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2); + } else { + print ''; } print ''; } @@ -503,16 +527,23 @@ $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 '
    '; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} print ''."\n"; +$totalarray = array(); +$totalarray['nbfield'] = 0; // Fields title label // -------------------------------------------------------------------- print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -521,21 +552,26 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label if (!empty($arrayfields['t.'.$key]['checked'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; + $totalarray['nbfield']++; } } // 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); +$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +$totalarray['nbfield']++; print ''."\n"; @@ -553,9 +589,11 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar // Loop on record // -------------------------------------------------------------------- $i = 0; +$savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; -while ($i < ($limit ? min($num, $limit) : $num)) { +$imaxinloop = ($limit ? min($num, $limit) : $num); +while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); if (empty($obj)) { break; // Should not happen @@ -564,75 +602,107 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Store properties in $object $object->setVarsFromFetchObj($obj); - // Show here line of result - print ''; - foreach ($object->fields as $key => $val) { - $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; - } elseif ($key == 'status') { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; + if ($mode == 'kanban') { + if ($i == 0) { + print ''; } - - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { - $cssforfield .= ($cssforfield ? ' ' : '').'right'; - } - //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; - - if (!empty($arrayfields['t.'.$key]['checked'])) { - print ''; - if ($key == 'status') { - print $object->getLibStatut(5); - } elseif ($key == 'rowid') { - print $object->getNomUrl(1); - } else { - print $object->showOutputField($val, $key, $object->$key, ''); + } else { + // Show here line of result + $j = 0; + print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; - if (!$i) { - $totalarray['nbfield']++; - } - if (!empty($val['isameasure']) && $val['isameasure'] == 1) { - if (!$i) { - $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; - } - if (!isset($totalarray['val'])) { - $totalarray['val'] = array(); - } - if (!isset($totalarray['val']['t.'.$key])) { - $totalarray['val']['t.'.$key] = 0; - } - $totalarray['val']['t.'.$key] += $object->$key; - } } - } - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $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']++; - } + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } - print ''."\n"; + if (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif ($key == 'ref') { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + + if (!empty($arrayfields['t.'.$key]['checked'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'rowid') { + print $object->showOutputField($val, $key, $object->id, ''); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + if (!isset($totalarray['val'])) { + $totalarray['val'] = array(); + } + if (!isset($totalarray['val']['t.'.$key])) { + $totalarray['val']['t.'.$key] = 0; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } + if (!$i) { + $totalarray['nbfield']++; + } + + print ''."\n"; + } $i++; } @@ -648,14 +718,14 @@ if ($num == 0) { $colspan++; } } - print ''; + 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 +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
    '; + print '
    '; } - - if (in_array($val['type'], array('timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif ($key == 'ref') { - $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + // Output Kanban + print $object->getKanbanView(''); + if ($i == ($imaxinloop - 1)) { + print '
    '; + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } 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($object->id, $arrayofselected)) { - $selected = 1; - } - print ''; - } - 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print '
    '.$langs->trans("NoRecordFound").'
    '.$langs->trans("NoRecordFound").'
    '."\n"; diff --git a/htdocs/hrm/position_note.php b/htdocs/hrm/position_note.php index 99d6581247f..a816692b86c 100644 --- a/htdocs/hrm/position_note.php +++ b/htdocs/hrm/position_note.php @@ -20,26 +20,27 @@ */ /** - * \file position_note.php - * \ingroup hrm - * \ingroup hrm - * \brief Tab for notes on Position + * \file htdocs/hrm/position_note.php + * \ingroup hrm + * \brief Tab for notes on Position */ // Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';; require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';; + // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies")); +$langs->loadLangs(array('hrm', 'companies')); + // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -55,10 +56,11 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } -$permissionnote = $user->rights->hrm->all->write; +// Permissions +$permissionnote = $user->rights->hrm->all->write; $permissiontoread = $user->rights->hrm->all->read; // Used by the include of actions_addupdatedelete.inc.php // Security check (enable the most restrictive one) diff --git a/htdocs/hrm/skill_agenda.php b/htdocs/hrm/skill_agenda.php index e1947741bde..a24f3a4caa2 100644 --- a/htdocs/hrm/skill_agenda.php +++ b/htdocs/hrm/skill_agenda.php @@ -20,24 +20,24 @@ */ /** - * \file skill_agenda.php - * \ingroup hrm - * \brief Tab of events on skill + * \file htdocs/hrm/skill_agenda.php + * \ingroup hrm + * \brief Tab of events on skill */ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -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/company.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other")); +$langs->loadLangs(array('hrm', 'other')); // Get parameters $id = GETPOST('id', 'int'); @@ -56,6 +56,7 @@ if (GETPOST('actioncode', 'array')) { } $search_agenda_label = GETPOST('search_agenda_label'); +// Get Parameters for Pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -84,9 +85,10 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->hrm->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } +// Permissions $permissiontoread = $user->rights->hrm->all->read; $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php @@ -133,11 +135,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = skillPrepareHead($object); @@ -202,7 +204,7 @@ if ($object->id > 0) { print '
    '; if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&id='.$object->id.'&socid='.$socid; + $param = '&id='.$object->id.'&socid='.(!empty($socid) ? '&socid='.$socid : ''); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index 9093766d3ed..9c5de6bf7f5 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -20,9 +20,9 @@ */ /** - * \file skill_card.php + * \file htdocs/hrm/skill_card.php * \ingroup hrm - * \brief Page to create/edit/view skill + * \brief Page to create/edit/view skills */ @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("hrm", "other", 'products')); +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? // Get parameters $id = GETPOST('id', 'int'); @@ -47,7 +47,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'skillcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Skill($db); @@ -77,9 +77,9 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. - -$permissiontoread = $user->rights->hrm->all->read; -$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +// Permissions +$permissiontoread = $user->rights->hrm->all->read; +$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->rights->hrm->all->delete; $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/skill'; @@ -332,7 +332,7 @@ if (($id || $ref) && $action == 'edit') { // $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $sk->$key; // } //var_dump($val.' '.$key.' '.$value); - if ($val['noteditable']) { + if (!empty($val['noteditable'])) { print $sk->showOutputField($val, $key, $value, '', '', '', 0); } else { /** @var Skilldet $sk */ @@ -577,7 +577,7 @@ if ($action != "create" && $action != "edit") { $title = $langs->transnoentitiesnoconv("Skilldets"); $morejs = array(); $morecss = array(); - + $nbtotalofrecords = 0; // Build and execute select // -------------------------------------------------------------------- @@ -626,8 +626,10 @@ if ($action != "create" && $action != "edit") { print ''; } - $param_fk = "&fk_skill=" . $id . "&fk_user_creat=" . $user->rowid; + $param_fk = "&fk_skill=" . $id . "&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid :0); $backtopage = dol_buildpath('/hrm/skill_card.php', 1) . '?id=' . $id; + $param = ""; + $massactionbutton = ""; //$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/skilldet_card.php', 1) . '?action=create&backtopage=' . urlencode($_SERVER['PHP_SELF']) . $param_fk . '&backtopage=' . $backtopage, '', $permissiontoadd); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, "", '', '', 0, 0, 1); @@ -688,7 +690,7 @@ if ($action != "create" && $action != "edit") { // $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; // } if (!empty($arrayfields['t.' . $key]['checked'])) { - print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : '')) . "\n"; + print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, (!empty($cssforfield) ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield . ' ' : '')) . "\n"; } } print '
    ' . $langs->trans("NoRecordFound") . '
    '; $addadmin = ''; if (property_exists($object, 'admin')) { - if (!empty($conf->multicompany->enabled) && !empty($object->admin) && empty($object->entity)) { + if (isModEnabled('multicompany') && !empty($object->admin) && empty($object->entity)) { $addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"'); } elseif (!empty($object->admin)) { $addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"'); } } - print showValueWithClipboardCPButton($object->login).$addadmin; + print showValueWithClipboardCPButton(!empty($object->login) ? $object->login : '').$addadmin; print '
    '.$langs->trans("RefEmployee").''; - print showValueWithClipboardCPButton($object->ref_employee); + print showValueWithClipboardCPButton(!empty($object->ref_employee) ? $object->ref_employee : ''); print '
    '.$langs->trans("NationalRegistrationNumber").''; - print showValueWithClipboardCPButton($object->national_registration_number); + print showValueWithClipboardCPButton(!empty($object->national_registration_number) ? $object->national_registration_number : ''); print '
    '.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).''; - print ''; + $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$key; + print ''; print img_picto('', 'download', 'class="paddingright opacitymedium"'); print $langs->trans("DownloadEmptyExampleShort"); print ''; @@ -583,7 +584,8 @@ if ($step == 3 && $datatoimport) { $text = $objmodelimport->getDriverDescForKey($format); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text); print ''; - print ''; + $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$format; + print ''; print img_picto('', 'download', 'class="paddingright opacitymedium"'); print $langs->trans("DownloadEmptyExampleShort"); print ''; @@ -1066,6 +1068,7 @@ if ($step == 4 && $datatoimport) { print '
    '."\n"; // List of source fields + $var = false; $lefti = 1; foreach ($fieldssource as $key => $val) { @@ -1088,6 +1091,7 @@ if ($step == 4 && $datatoimport) { print '
    '; // Set the list of all possible target fields in Dolibarr. + $optionsall = array(); foreach ($fieldstarget as $code => $line) { //var_dump($line); @@ -1139,8 +1143,7 @@ if ($step == 4 && $datatoimport) { $entityicon = !empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ... $entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ... - //print '=> '.img_object('', $entityicon).' '.$langs->trans($entitylang).'=> => '; //var_dump($_SESSION['dol_array_match_file_to_database_select']); @@ -1508,7 +1511,7 @@ if ($step == 4 && $datatoimport) { print '
    '; print $obj->label; print ''; + print ''; if (empty($obj->fk_user)) { print $langs->trans("Everybody"); } else { @@ -1587,7 +1590,7 @@ if ($step == 5 && $datatoimport) { $param .= '&updatekeys[]='.implode('&updatekeys[]=', $updatekeys); } - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:Módulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 5); @@ -1821,7 +1824,7 @@ if ($step == 5 && $datatoimport) { // Actions print '
    '; - if ($user->rights->import->run) { + if ($user->hasRight('import', 'run')) { print ''; } else { print ''.$langs->trans("RunSimulateImportFile").''; @@ -1858,7 +1861,7 @@ if ($step == 5 && $datatoimport) { //dol_syslog("line ".$sourcelinenb.' - '.$nboflines.' - '.$excludefirstline.' - '.$endatlinenb); $arrayrecord = $obj->import_read_record(); if ($arrayrecord === false) { - $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines. Ensure the complete string is delimited correctly when there is a separator character in the text string.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); + $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach the end of file or an empty line at record '.$sourcelinenb.'. This may occurs when some records are split onto several lines and not correctly delimited by the "Char delimiter", or if there is line with no data on all fields.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); $endoffile++; continue; } @@ -1911,8 +1914,8 @@ if ($step == 5 && $datatoimport) { print '
    '; print '
    '; print '
    '.$langs->trans("ResultOfSimulationNoError").'
    '; - print $langs->trans("NbInsert", empty($obj->nbinsert) ? 0 : $obj->nbinsert).'
    '; - print $langs->trans("NbUpdate", empty($obj->nbupdate) ? 0 : $obj->nbupdate).'
    '; + print $langs->trans("NbInsertSim", empty($obj->nbinsert) ? 0 : $obj->nbinsert).'
    '; + print $langs->trans("NbUpdateSim", empty($obj->nbupdate) ? 0 : $obj->nbupdate).'
    '; print '
    '; print '
    '; } else { @@ -1977,7 +1980,7 @@ if ($step == 5 && $datatoimport) { // Actions print '
    '; - if ($user->rights->import->run) { + if ($user->hasRight('import', 'run')) { if (empty($nboferrors)) { print ''.$langs->trans("RunImportFile").''; } else { @@ -2053,7 +2056,7 @@ if ($step == 6 && $datatoimport) { $param .= '&enclosure='.urlencode($enclosure); } - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:Módulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 6); @@ -2243,7 +2246,7 @@ if ($step == 6 && $datatoimport) { $sourcelinenb++; $arrayrecord = $obj->import_read_record(); if ($arrayrecord === false) { - $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); + $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach the end of file or an empty line at record '.$sourcelinenb.'. This may occurs when some records are split onto several lines and not correctly delimited by the "Char delimiter", or if there is line with no data on all fields.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); $endoffile++; continue; } @@ -2336,7 +2339,7 @@ $db->close(); */ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') { - global $langs; + global $conf, $langs; $height = '32px'; @@ -2382,7 +2385,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') if (isset($fieldssource[$pos]['imported']) && $fieldssource[$pos]['imported'] == false) { print '
    '; } else { - print ''; + print ''; } print $langs->trans("Column").' '.num2Alpha($pos - 1).' (#'.$pos.')'; if (empty($fieldssource[$pos]['example1'])) { @@ -2394,7 +2397,12 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') if (!utf8_check($example)) { $example = utf8_encode($example); } - print ' - '; + if (!empty($conf->dol_optimize_smallscreen)) { + //print '
    '; + print ' - '; + } else { + print ' - '; + } //print ''.$langs->trans("ExampleOnFirstLine").': '; print ''.$example.''; } diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 48b0b78f381..3e09e53fbe6 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -55,9 +55,13 @@ class DoliStorage implements TokenStorageInterface private $conf; private $key; - private $stateKey; + //private $stateKey; private $keyforprovider; + public $state; + public $date_creation; + public $date_modification; + /** * @param DoliDB $db Database handler @@ -100,7 +104,9 @@ class DoliStorage implements TokenStorageInterface //var_dump($token); dol_syslog("storeAccessToken service=".$service); - $serializedToken = serialize($token); + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $serializedToken = dolEncrypt(serialize($token)); + $this->tokens[$service] = $token; if (!is_array($this->tokens)) { @@ -122,8 +128,10 @@ class DoliStorage implements TokenStorageInterface $resql = $this->db->query($sql); } else { // save - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity)"; - $sql.= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($serializedToken)."', ".((int) $conf->entity).")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity, datec)"; + $sql .= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($serializedToken)."', ".((int) $conf->entity).", "; + $sql .= " '".$this->db->idate(dol_now())."'"; + $sql .= ")"; $resql = $this->db->query($sql); } //print $sql; @@ -140,7 +148,7 @@ class DoliStorage implements TokenStorageInterface // get from db dol_syslog("hasAccessToken service=".$service); - $sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token"; + $sql = "SELECT token, datec, tms, state FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$this->db->escape($service.(empty($this->keyforprovider) ? '' : '-'.$this->keyforprovider))."'"; $sql .= " AND entity IN (".getEntity('oauth_token').")"; $resql = $this->db->query($sql); @@ -149,9 +157,16 @@ class DoliStorage implements TokenStorageInterface } $result = $this->db->fetch_array($resql); if ($result) { - $token = unserialize($result['token']); + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $token = unserialize(dolDecrypt($result['token'])); + $this->date_creation = $this->db->jdate($result['datec']); + $this->date_modification = $this->db->jdate($result['tms']); + $this->state = $result['state']; } else { $token = ''; + $this->date_creation = null; + $this->date_modification = null; + $this->state = ''; } $this->tokens[$service] = $token; @@ -217,9 +232,7 @@ class DoliStorage implements TokenStorageInterface { global $conf; - // TODO save or update - - dol_syslog("storeAuthorizationState service=".$service); + dol_syslog("storeAuthorizationState service=".$service." state=".$state); if (!isset($this->states) || !is_array($this->states)) { $this->states = array(); @@ -228,7 +241,10 @@ class DoliStorage implements TokenStorageInterface //$states[$service] = $state; $this->states[$service] = $state; - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_state"; + //$newstate = preg_replace('/\-.*$/', '', $state); + $newstate = $state; + + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; $sql .= " AND entity IN (".getEntity('oauth_token').")"; $resql = $this->db->query($sql); @@ -238,14 +254,14 @@ class DoliStorage implements TokenStorageInterface $obj = $this->db->fetch_array($resql); if ($obj) { // update - $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_state"; - $sql.= " SET state = '".$this->db->escape($state)."'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; + $sql.= " SET state = '".$this->db->escape($newstate)."'"; $sql.= " WHERE rowid = ".((int) $obj['rowid']); $resql = $this->db->query($sql); } else { - // save - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_state (service, state, entity)"; - $sql.= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($state)."', ".((int) $conf->entity).")"; + // insert (should not happen) + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity)"; + $sql.= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).")"; $resql = $this->db->query($sql); } @@ -261,7 +277,7 @@ class DoliStorage implements TokenStorageInterface // get state from db dol_syslog("hasAuthorizationState service=".$service); - $sql = "SELECT state FROM ".MAIN_DB_PREFIX."oauth_state"; + $sql = "SELECT state FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; $sql .= " AND entity IN (".getEntity('oauth_token').")"; diff --git a/htdocs/includes/adodbtime/README.txt b/htdocs/includes/adodbtime/README.txt deleted file mode 100644 index 3e2969a2868..00000000000 --- a/htdocs/includes/adodbtime/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -README -====== - -ADOdb Date Library, part of the ADOdb abstraction library - -See Wiki: https://adodb.org/dokuwiki/doku.php?id=v5:datetime:datetime_index -Download: https://github.com/ADOdb/ADOdb/blob/master/adodb-time.inc.php diff --git a/htdocs/includes/adodbtime/adodb-time.inc.php b/htdocs/includes/adodbtime/adodb-time.inc.php deleted file mode 100644 index 030196db275..00000000000 --- a/htdocs/includes/adodbtime/adodb-time.inc.php +++ /dev/null @@ -1,1459 +0,0 @@ - 4 digit year conversion. The maximum is billions of years in the -future, but this is a theoretical limit as the computation of that year -would take too long with the current implementation of adodb_mktime(). - -This library replaces native functions as follows: - -
    -	getdate()  with  adodb_getdate()
    -	date()     with  adodb_date()
    -	gmdate()   with  adodb_gmdate()
    -	mktime()   with  adodb_mktime()
    -	gmmktime() with  adodb_gmmktime()
    -	strftime() with  adodb_strftime()
    -	strftime() with  adodb_gmstrftime()
    -
    - -The parameters are identical, except that adodb_date() accepts a subset -of date()'s field formats. Mktime() will convert from local time to GMT, -and date() will convert from GMT to local time, but daylight savings is -not handled currently. - -This library is independant of the rest of ADOdb, and can be used -as standalone code. - -PERFORMANCE - -For high speed, this library uses the native date functions where -possible, and only switches to PHP code when the dates fall outside -the 32-bit signed integer range. - -GREGORIAN CORRECTION - -Pope Gregory shortened October of A.D. 1582 by ten days. Thursday, -October 4, 1582 (Julian) was followed immediately by Friday, October 15, -1582 (Gregorian). - -Since 0.06, we handle this correctly, so: - -adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582) - == 24 * 3600 (1 day) - -============================================================================= - -COPYRIGHT - -(c) 2003-2014 John Lim and released under BSD-style license except for code by -jackbbs, which includes adodb_mktime, adodb_get_gmt_diff, adodb_is_leap_year -and originally found at http://www.php.net/manual/en/function.mktime.php - -============================================================================= - -BUG REPORTS - -These should be posted to the ADOdb forums at - - http://phplens.com/lens/lensforum/topics.php?id=4 - -============================================================================= - -FUNCTION DESCRIPTIONS - -** FUNCTION adodb_time() - -Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) as an unsigned integer. - -** FUNCTION adodb_getdate($date=false) - -Returns an array containing date information, as getdate(), but supports -dates greater than 1901 to 2038. The local date/time format is derived from a -heuristic the first time adodb_getdate is called. - - -** FUNCTION adodb_date($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - -The format fields that adodb_date supports: - -
    -	a - "am" or "pm"
    -	A - "AM" or "PM"
    -	d - day of the month, 2 digits with leading zeros; i.e. "01" to "31"
    -	D - day of the week, textual, 3 letters; e.g. "Fri"
    -	F - month, textual, long; e.g. "January"
    -	g - hour, 12-hour format without leading zeros; i.e. "1" to "12"
    -	G - hour, 24-hour format without leading zeros; i.e. "0" to "23"
    -	h - hour, 12-hour format; i.e. "01" to "12"
    -	H - hour, 24-hour format; i.e. "00" to "23"
    -	i - minutes; i.e. "00" to "59"
    -	j - day of the month without leading zeros; i.e. "1" to "31"
    -	l (lowercase 'L') - day of the week, textual, long; e.g. "Friday"
    -	L - boolean for whether it is a leap year; i.e. "0" or "1"
    -	m - month; i.e. "01" to "12"
    -	M - month, textual, 3 letters; e.g. "Jan"
    -	n - month without leading zeros; i.e. "1" to "12"
    -	O - Difference to Greenwich time in hours; e.g. "+0200"
    -	Q - Quarter, as in 1, 2, 3, 4
    -	r - RFC 2822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200"
    -	s - seconds; i.e. "00" to "59"
    -	S - English ordinal suffix for the day of the month, 2 characters;
    -	   			i.e. "st", "nd", "rd" or "th"
    -	t - number of days in the given month; i.e. "28" to "31"
    -	T - Timezone setting of this machine; e.g. "EST" or "MDT"
    -	U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
    -	w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)
    -	Y - year, 4 digits; e.g. "1999"
    -	y - year, 2 digits; e.g. "99"
    -	z - day of the year; i.e. "0" to "365"
    -	Z - timezone offset in seconds (i.e. "-43200" to "43200").
    -	   			The offset for timezones west of UTC is always negative,
    -				and for those east of UTC is always positive.
    -
    - -Unsupported: -
    -	B - Swatch Internet time
    -	I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
    -	W - ISO-8601 week number of year, weeks starting on Monday
    -
    -
    - - -** FUNCTION adodb_date2($fmt, $isoDateString = false) -Same as adodb_date, but 2nd parameter accepts iso date, eg. - - adodb_date2('d-M-Y H:i','2003-12-25 13:01:34'); - - -** FUNCTION adodb_gmdate($fmt, $timestamp = false) - -Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - - -** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) - -Converts a local date to a unix timestamp. Unlike the function mktime(), it supports -dates outside the 1901 to 2038 range. All parameters are optional. - - -** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) - -Converts a gmt date to a unix timestamp. Unlike the function gmmktime(), it supports -dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters -are currently compulsory. - -** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) -Convert a timestamp to a formatted GMT date. - -** FUNCTION adodb_strftime($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. Internally converts $fmt into -adodb_date format, then echo result. - -For best results, you can define the local date format yourself. Define a global -variable $ADODB_DATE_LOCALE which is an array, 1st element is date format using -adodb_date syntax, and 2nd element is the time format, also in adodb_date syntax. - - eg. $ADODB_DATE_LOCALE = array('d/m/Y','H:i:s'); - - Supported format codes: - -
    -	%a - abbreviated weekday name according to the current locale
    -	%A - full weekday name according to the current locale
    -	%b - abbreviated month name according to the current locale
    -	%B - full month name according to the current locale
    -	%c - preferred date and time representation for the current locale
    -	%d - day of the month as a decimal number (range 01 to 31)
    -	%D - same as %m/%d/%y
    -	%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')
    -	%h - same as %b
    -	%H - hour as a decimal number using a 24-hour clock (range 00 to 23)
    -	%I - hour as a decimal number using a 12-hour clock (range 01 to 12)
    -	%m - month as a decimal number (range 01 to 12)
    -	%M - minute as a decimal number
    -	%n - newline character
    -	%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
    -	%r - time in a.m. and p.m. notation
    -	%R - time in 24 hour notation
    -	%S - second as a decimal number
    -	%t - tab character
    -	%T - current time, equal to %H:%M:%S
    -	%x - preferred date representation for the current locale without the time
    -	%X - preferred time representation for the current locale without the date
    -	%y - year as a decimal number without a century (range 00 to 99)
    -	%Y - year as a decimal number including the century
    -	%Z - time zone or name or abbreviation
    -	%% - a literal `%' character
    -
    - - Unsupported codes: -
    -	%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
    -	%g - like %G, but without the century.
    -	%G - The 4-digit year corresponding to the ISO week number (see %V).
    -	     This has the same format and value as %Y, except that if the ISO week number belongs
    -		 to the previous or next year, that year is used instead.
    -	%j - day of the year as a decimal number (range 001 to 366)
    -	%u - weekday as a decimal number [1,7], with 1 representing Monday
    -	%U - week number of the current year as a decimal number, starting
    -	    with the first Sunday as the first day of the first week
    -	%V - The ISO 8601:1988 week number of the current year as a decimal number,
    -	     range 01 to 53, where week 1 is the first week that has at least 4 days in the
    -		 current year, and with Monday as the first day of the week. (Use %G or %g for
    -		 the year component that corresponds to the week number for the specified timestamp.)
    -	%w - day of the week as a decimal, Sunday being 0
    -	%W - week number of the current year as a decimal number, starting with the
    -	     first Monday as the first day of the first week
    -
    - -============================================================================= - -NOTES - -Useful url for generating test timestamps: - http://www.4webhelp.net/us/timestamp.php - -Possible future optimizations include - -a. Using an algorithm similar to Plauger's in "The Standard C Library" -(page 428, xttotm.c _Ttotm() function). Plauger's algorithm will not -work outside 32-bit signed range, so i decided not to implement it. - -b. Implement daylight savings, which looks awfully complicated, see - http://webexhibits.org/daylightsaving/ - - -CHANGELOG -- 16 Jan 2011 0.36 -Added adodb_time() which returns current time. If > 2038, will return as float - -- 7 Feb 2011 0.35 -Changed adodb_date to be symmetric with adodb_mktime. See $jan1_71. fix for bc. - -- 13 July 2010 0.34 -Changed adodb_get_gm_diff to use DateTimeZone(). - -- 11 Feb 2008 0.33 -* Bug in 0.32 fix for hour handling. Fixed. - -- 1 Feb 2008 0.32 -* Now adodb_mktime(0,0,0,12+$m,20,2040) works properly. - -- 10 Jan 2008 0.31 -* Now adodb_mktime(0,0,0,24,1,2037) works correctly. - -- 15 July 2007 0.30 -Added PHP 5.2.0 compatability fixes. - * gmtime behaviour for 1970 has changed. We use the actual date if it is between 1970 to 2038 to get the - * timezone, otherwise we use the current year as the baseline to retrieve the timezone. - * Also the timezone's in php 5.2.* support historical data better, eg. if timezone today was +8, but - in 1970 it was +7:30, then php 5.2 return +7:30, while this library will use +8. - * - -- 19 March 2006 0.24 -Changed strftime() locale detection, because some locales prepend the day of week to the date when %c is used. - -- 10 Feb 2006 0.23 -PHP5 compat: when we detect PHP5, the RFC2822 format for gmt 0000hrs is changed from -0000 to +0000. - In PHP4, we will still use -0000 for 100% compat with PHP4. - -- 08 Sept 2005 0.22 -In adodb_date2(), $is_gmt not supported properly. Fixed. - -- 18 July 2005 0.21 -In PHP 4.3.11, the 'r' format has changed. Leading 0 in day is added. Changed for compat. -Added support for negative months in adodb_mktime(). - -- 24 Feb 2005 0.20 -Added limited strftime/gmstrftime support. x10 improvement in performance of adodb_date(). - -- 21 Dec 2004 0.17 -In adodb_getdate(), the timestamp was accidentally converted to gmt when $is_gmt is false. -Also adodb_mktime(0,0,0) did not work properly. Both fixed thx Mauro. - -- 17 Nov 2004 0.16 -Removed intval typecast in adodb_mktime() for secs, allowing: - adodb_mktime(0,0,0 + 2236672153,1,1,1934); -Suggested by Ryan. - -- 18 July 2004 0.15 -All params in adodb_mktime were formerly compulsory. Now only the hour, min, secs is compulsory. -This brings it more in line with mktime (still not identical). - -- 23 June 2004 0.14 - -Allow you to define your own daylights savings function, adodb_daylight_sv. -If the function is defined (somewhere in an include), then you can correct for daylights savings. - -In this example, we apply daylights savings in June or July, adding one hour. This is extremely -unrealistic as it does not take into account time-zone, geographic location, current year. - -function adodb_daylight_sv(&$arr, $is_gmt) -{ - if ($is_gmt) return; - $m = $arr['mon']; - if ($m == 6 || $m == 7) $arr['hours'] += 1; -} - -This is only called by adodb_date() and not by adodb_mktime(). - -The format of $arr is -Array ( - [seconds] => 0 - [minutes] => 0 - [hours] => 0 - [mday] => 1 # day of month, eg 1st day of the month - [mon] => 2 # month (eg. Feb) - [year] => 2102 - [yday] => 31 # days in current year - [leap] => # true if leap year - [ndays] => 28 # no of days in current month - ) - - -- 28 Apr 2004 0.13 -Fixed adodb_date to properly support $is_gmt. Thx to Dimitar Angelov. - -- 20 Mar 2004 0.12 -Fixed month calculation error in adodb_date. 2102-June-01 appeared as 2102-May-32. - -- 26 Oct 2003 0.11 -Because of daylight savings problems (some systems apply daylight savings to -January!!!), changed adodb_get_gmt_diff() to ignore daylight savings. - -- 9 Aug 2003 0.10 -Fixed bug with dates after 2038. -See http://phplens.com/lens/lensforum/msgs.php?id=6980 - -- 1 July 2003 0.09 -Added support for Q (Quarter). -Added adodb_date2(), which accepts ISO date in 2nd param - -- 3 March 2003 0.08 -Added support for 'S' adodb_date() format char. Added constant ADODB_ALLOW_NEGATIVE_TS -if you want PHP to handle negative timestamps between 1901 to 1969. - -- 27 Feb 2003 0.07 -All negative numbers handled by adodb now because of RH 7.3+ problems. -See http://bugs.php.net/bug.php?id=20048&edit=2 - -- 4 Feb 2003 0.06 -Fixed a typo, 1852 changed to 1582! This means that pre-1852 dates -are now correctly handled. - -- 29 Jan 2003 0.05 - -Leap year checking differs under Julian calendar (pre 1582). Also -leap year code optimized by checking for most common case first. - -We also handle month overflow correctly in mktime (eg month set to 13). - -Day overflow for less than one month's days is supported. - -- 28 Jan 2003 0.04 - -Gregorian correction handled. In PHP5, we might throw an error if -mktime uses invalid dates around 5-14 Oct 1582. Released with ADOdb 3.10. -Added limbo 5-14 Oct 1582 check, when we set to 15 Oct 1582. - -- 27 Jan 2003 0.03 - -Fixed some more month problems due to gmt issues. Added constant ADODB_DATE_VERSION. -Fixed calculation of days since start of year for <1970. - -- 27 Jan 2003 0.02 - -Changed _adodb_getdate() to inline leap year checking for better performance. -Fixed problem with time-zones west of GMT +0000. - -- 24 Jan 2003 0.01 - -First implementation. -*/ - - -/* Initialization */ - -/* - Version Number -*/ -define('ADODB_DATE_VERSION',0.35); - -$ADODB_DATETIME_CLASS = (PHP_VERSION >= 5.2); - -/* - This code was originally for windows. But apparently this problem happens - also with Linux, RH 7.3 and later! - - glibc-2.2.5-34 and greater has been changed to return -1 for dates < - 1970. This used to work. The problem exists with RedHat 7.3 and 8.0 - echo (mktime(0, 0, 0, 1, 1, 1960)); // prints -1 - - References: - http://bugs.php.net/bug.php?id=20048&edit=2 - http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html -*/ - -if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); - -function adodb_date_test_date($y1,$m,$d=13) -{ - $h = round(rand()% 24); - $t = adodb_mktime($h,0,0,$m,$d,$y1); - $rez = adodb_date('Y-n-j H:i:s',$t); - if ($h == 0) $h = '00'; - else if ($h < 10) $h = '0'.$h; - if ("$y1-$m-$d $h:00:00" != $rez) { - print "$y1 error, expected=$y1-$m-$d $h:00:00, adodb=$rez
    "; - return false; - } - return true; -} - -function adodb_date_test_strftime($fmt) -{ - $s1 = strftime($fmt); - $s2 = adodb_strftime($fmt); - - if ($s1 == $s2) return true; - - echo "error for $fmt, strftime=$s1, adodb=$s2
    "; - return false; -} - -/** - Test Suite -*/ -function adodb_date_test() -{ - - for ($m=-24; $m<=24; $m++) - echo "$m :",adodb_date('d-m-Y',adodb_mktime(0,0,0,1+$m,20,2040)),"
    "; - - error_reporting(E_ALL); - print "

    Testing adodb_date and adodb_mktime. version=".ADODB_DATE_VERSION.' PHP='.PHP_VERSION."

    "; - @set_time_limit(0); - $fail = false; - - // This flag disables calling of PHP native functions, so we can properly test the code - if (!defined('ADODB_TEST_DATES')) define('ADODB_TEST_DATES',1); - - $t = time(); - - - $fmt = 'Y-m-d H:i:s'; - echo '
    ';
    -	echo 'adodb: ',adodb_date($fmt,$t),'
    '; - echo 'php : ',date($fmt,$t),'
    '; - echo '
    '; - - adodb_date_test_strftime('%Y %m %x %X'); - adodb_date_test_strftime("%A %d %B %Y"); - adodb_date_test_strftime("%H %M S"); - - $t = adodb_mktime(0,0,0); - if (!(adodb_date('Y-m-d') == date('Y-m-d'))) print 'Error in '.adodb_mktime(0,0,0).'
    '; - - $t = adodb_mktime(0,0,0,6,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-06-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - $t = adodb_mktime(0,0,0,2,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-02-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - - print "

    Testing gregorian <=> julian conversion

    "; - $t = adodb_mktime(0,0,0,10,11,1492); - //http://www.holidayorigins.com/html/columbus_day.html - Friday check - if (!(adodb_date('D Y-m-d',$t) == 'Fri 1492-10-11')) print 'Error in Columbus landing
    '; - - $t = adodb_mktime(0,0,0,2,29,1500); - if (!(adodb_date('Y-m-d',$t) == '1500-02-29')) print 'Error in julian leap years
    '; - - $t = adodb_mktime(0,0,0,2,29,1700); - if (!(adodb_date('Y-m-d',$t) == '1700-03-01')) print 'Error in gregorian leap years
    '; - - print adodb_mktime(0,0,0,10,4,1582).' '; - print adodb_mktime(0,0,0,10,15,1582); - $diff = (adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582)); - if ($diff != 3600*24) print " Error in gregorian correction = ".($diff/3600/24)." days
    "; - - print " 15 Oct 1582, Fri=".(adodb_dow(1582,10,15) == 5 ? 'Fri' : 'Error')."
    "; - print " 4 Oct 1582, Thu=".(adodb_dow(1582,10,4) == 4 ? 'Thu' : 'Error')."
    "; - - print "

    Testing overflow

    "; - - $t = adodb_mktime(0,0,0,3,33,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-04-02')) print 'Error in day overflow 1
    '; - $t = adodb_mktime(0,0,0,4,33,1971); - if (!(adodb_date('Y-m-d',$t) == '1971-05-03')) print 'Error in day overflow 2
    '; - $t = adodb_mktime(0,0,0,1,60,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-03-01')) print 'Error in day overflow 3 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,32,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-01')) print 'Error in day overflow 4 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,63,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-02-01')) print 'Error in day overflow 5 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,13,3,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-03')) print 'Error in mth overflow 1
    '; - - print "Testing 2-digit => 4-digit year conversion

    "; - if (adodb_year_digit_check(00) != 2000) print "Err 2-digit 2000
    "; - if (adodb_year_digit_check(10) != 2010) print "Err 2-digit 2010
    "; - if (adodb_year_digit_check(20) != 2020) print "Err 2-digit 2020
    "; - if (adodb_year_digit_check(30) != 2030) print "Err 2-digit 2030
    "; - if (adodb_year_digit_check(40) != 1940) print "Err 2-digit 1940
    "; - if (adodb_year_digit_check(50) != 1950) print "Err 2-digit 1950
    "; - if (adodb_year_digit_check(90) != 1990) print "Err 2-digit 1990
    "; - - // Test string formating - print "

    Testing date formating

    "; - - $fmt = '\d\a\t\e T Y-m-d H:i:s a A d D F g G h H i j l L m M n O \R\F\C2822 r s t U w y Y z Z 2003'; - $s1 = date($fmt,0); - $s2 = adodb_date($fmt,0); - if ($s1 != $s2) { - print " date() 0 failed
    $s1
    $s2
    "; - } - flush(); - for ($i=100; --$i > 0; ) { - - $ts = 3600.0*((rand()%60000)+(rand()%60000))+(rand()%60000); - $s1 = date($fmt,$ts); - $s2 = adodb_date($fmt,$ts); - //print "$s1
    $s2

    "; - $pos = strcmp($s1,$s2); - - if (($s1) != ($s2)) { - for ($j=0,$k=strlen($s1); $j < $k; $j++) { - if ($s1[$j] != $s2[$j]) { - print substr($s1,$j).' '; - break; - } - } - print "Error date(): $ts

    -  \"$s1\" (date len=".strlen($s1).")
    -  \"$s2\" (adodb_date len=".strlen($s2).")

    "; - $fail = true; - } - - $a1 = getdate($ts); - $a2 = adodb_getdate($ts); - $rez = array_diff($a1,$a2); - if (sizeof($rez)>0) { - print "Error getdate() $ts
    "; - print_r($a1); - print "
    "; - print_r($a2); - print "

    "; - $fail = true; - } - } - - // Test generation of dates outside 1901-2038 - print "

    Testing random dates between 100 and 4000

    "; - adodb_date_test_date(100,1); - for ($i=100; --$i >= 0;) { - $y1 = 100+rand(0,1970-100); - $m = rand(1,12); - adodb_date_test_date($y1,$m); - - $y1 = 3000-rand(0,3000-1970); - adodb_date_test_date($y1,$m); - } - print '

    '; - $start = 1960+rand(0,10); - $yrs = 12; - $i = 365.25*86400*($start-1970); - $offset = 36000+rand(10000,60000); - $max = 365*$yrs*86400; - $lastyear = 0; - - // we generate a timestamp, convert it to a date, and convert it back to a timestamp - // and check if the roundtrip broke the original timestamp value. - print "Testing $start to ".($start+$yrs).", or $max seconds, offset=$offset: "; - $cnt = 0; - for ($max += $i; $i < $max; $i += $offset) { - $ret = adodb_date('m,d,Y,H,i,s',$i); - $arr = explode(',',$ret); - if ($lastyear != $arr[2]) { - $lastyear = $arr[2]; - print " $lastyear "; - flush(); - } - $newi = adodb_mktime($arr[3],$arr[4],$arr[5],$arr[0],$arr[1],$arr[2]); - if ($i != $newi) { - print "Error at $i, adodb_mktime returned $newi ($ret)"; - $fail = true; - break; - } - $cnt += 1; - } - echo "Tested $cnt dates
    "; - if (!$fail) print "

    Passed !

    "; - else print "

    Failed :-(

    "; -} - -function adodb_time() -{ - $d = new DateTime(); - return $d->format('U'); -} - -/** - Returns day of week, 0 = Sunday,... 6=Saturday. - Algorithm from PEAR::Date_Calc -*/ -function adodb_dow($year, $month, $day) -{ -/* -Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and -proclaimed that from that time onwards 3 days would be dropped from the calendar -every 400 years. - -Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). -*/ - if ($year <= 1582) { - if ($year < 1582 || - ($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3; - else - $greg_correction = 0; - } else - $greg_correction = 0; - - if($month > 2) - $month -= 2; - else { - $month += 10; - $year--; - } - - $day = floor((13 * $month - 1) / 5) + - $day + ($year % 100) + - floor(($year % 100) / 4) + - floor(($year / 100) / 4) - 2 * - floor($year / 100) + 77 + $greg_correction; - - return $day - 7 * floor($day / 7); -} - - -/** - Checks for leap year, returns true if it is. No 2-digit year check. Also - handles julian calendar correctly. -*/ -function _adodb_is_leap_year($year) -{ - if ($year % 4 != 0) return false; - - if ($year % 400 == 0) { - return true; - // if gregorian calendar (>1582), century not-divisible by 400 is not leap - } else if ($year > 1582 && $year % 100 == 0 ) { - return false; - } - - return true; -} - - -/** - checks for leap year, returns true if it is. Has 2-digit year check -*/ -function adodb_is_leap_year($year) -{ - return _adodb_is_leap_year(adodb_year_digit_check($year)); -} - -/** - Fix 2-digit years. Works for any century. - Assumes that if 2-digit is more than 30 years in future, then previous century. -*/ -function adodb_year_digit_check($y) -{ - if ($y < 100) { - - $yr = (integer) date("Y"); - $century = (integer) ($yr /100); - - if ($yr%100 > 50) { - $c1 = $century + 1; - $c0 = $century; - } else { - $c1 = $century; - $c0 = $century - 1; - } - $c1 *= 100; - // if 2-digit year is less than 30 years in future, set it to this century - // otherwise if more than 30 years in future, then we set 2-digit year to the prev century. - if (($y + $c1) < $yr+30) $y = $y + $c1; - else $y = $y + $c0*100; - } - return $y; -} - -function adodb_get_gmt_diff_ts($ts) -{ - if (0 <= $ts && $ts <= 0x7FFFFFFF) { // check if number in 32-bit signed range) { - $arr = getdate($ts); - $y = $arr['year']; - $m = $arr['mon']; - $d = $arr['mday']; - return adodb_get_gmt_diff($y,$m,$d); - } else { - return adodb_get_gmt_diff(false,false,false); - } - -} - -/** - get local time zone offset from GMT. Does not handle historical timezones before 1970. -*/ -function adodb_get_gmt_diff($y,$m,$d) -{ -static $TZ,$tzo; -global $ADODB_DATETIME_CLASS; - - if (!defined('ADODB_TEST_DATES')) $y = false; - else if ($y < 1970 || $y >= 2038) $y = false; - - if ($ADODB_DATETIME_CLASS && $y !== false) { - $dt = new DateTime(); - $dt->setISODate($y,$m,$d); - if (empty($tzo)) { - $tzo = new DateTimeZone(date_default_timezone_get()); - # $tzt = timezone_transitions_get( $tzo ); - } - return -$tzo->getOffset($dt); - } else { - if (isset($TZ)) return $TZ; - $y = date('Y'); - /* - if (function_exists('date_default_timezone_get') && function_exists('timezone_offset_get')) { - $tzonename = date_default_timezone_get(); - if ($tzonename) { - $tobj = new DateTimeZone($tzonename); - $TZ = -timezone_offset_get($tobj,new DateTime("now",$tzo)); - } - } - */ - if (empty($TZ)) $TZ = mktime(0,0,0,12,2,$y) - gmmktime(0,0,0,12,2,$y); - } - return $TZ; -} - -/** - Returns an array with date info. -*/ -function adodb_getdate($d=false,$fast=false) -{ - if ($d === false) return getdate(); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return @getdate($d); - } - } - return _adodb_getdate($d); -} - -/* -// generate $YRS table for _adodb_getdate() -function adodb_date_gentable($out=true) -{ - - for ($i=1970; $i >= 1600; $i-=10) { - $s = adodb_gmmktime(0,0,0,1,1,$i); - echo "$i => $s,
    "; - } -} -adodb_date_gentable(); - -for ($i=1970; $i > 1500; $i--) { - -echo "
    $i "; - adodb_date_test_date($i,1,1); -} - -*/ - - -$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); -$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - -function adodb_validdate($y,$m,$d) -{ -global $_month_table_normal,$_month_table_leaf; - - if (_adodb_is_leap_year($y)) $marr = $_month_table_leaf; - else $marr = $_month_table_normal; - - if ($m > 12 || $m < 1) return false; - - if ($d > 31 || $d < 1) return false; - - if ($marr[$m] < $d) return false; - - if ($y < 1000 && $y > 3000) return false; - - return true; -} - -/** - Low-level function that returns the getdate() array. We have a special - $fast flag, which if set to true, will return fewer array values, - and is much faster as it does not calculate dow, etc. -*/ -function _adodb_getdate($origd=false,$fast=false,$is_gmt=false) -{ -static $YRS; -global $_month_table_normal,$_month_table_leaf; - - $d = $origd - ($is_gmt ? 0 : adodb_get_gmt_diff_ts($origd)); - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $d366 = $_day_power * 366; - $d365 = $_day_power * 365; - - if ($d < 0) { - - if (empty($YRS)) $YRS = array( - 1970 => 0, - 1960 => -315619200, - 1950 => -631152000, - 1940 => -946771200, - 1930 => -1262304000, - 1920 => -1577923200, - 1910 => -1893456000, - 1900 => -2208988800, - 1890 => -2524521600, - 1880 => -2840140800, - 1870 => -3155673600, - 1860 => -3471292800, - 1850 => -3786825600, - 1840 => -4102444800, - 1830 => -4417977600, - 1820 => -4733596800, - 1810 => -5049129600, - 1800 => -5364662400, - 1790 => -5680195200, - 1780 => -5995814400, - 1770 => -6311347200, - 1760 => -6626966400, - 1750 => -6942499200, - 1740 => -7258118400, - 1730 => -7573651200, - 1720 => -7889270400, - 1710 => -8204803200, - 1700 => -8520336000, - 1690 => -8835868800, - 1680 => -9151488000, - 1670 => -9467020800, - 1660 => -9782640000, - 1650 => -10098172800, - 1640 => -10413792000, - 1630 => -10729324800, - 1620 => -11044944000, - 1610 => -11360476800, - 1600 => -11676096000); - - if ($is_gmt) $origd = $d; - // The valid range of a 32bit signed timestamp is typically from - // Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT - // - - # old algorithm iterates through all years. new algorithm does it in - # 10 year blocks - - /* - # old algo - for ($a = 1970 ; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - */ - - $lastsecs = 0; - $lastyear = 1970; - foreach($YRS as $year => $secs) { - if ($d >= $secs) { - $a = $lastyear; - break; - } - $lastsecs = $secs; - $lastyear = $year; - } - - $d -= $lastsecs; - if (!isset($a)) $a = $lastyear; - - //echo ' yr=',$a,' ', $d,'.'; - - for (; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - /**/ - - $secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd; - - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 13 ; --$a > 0;) { - $lastd = $d; - $d += $mtab[$a] * $_day_power; - if ($d >= 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - - $d = $lastd; - $day = $ndays + ceil(($d+1) / ($_day_power)); - - $d += ($ndays - $day+1)* $_day_power; - $hour = floor($d/$_hour_power); - - } else { - for ($a = 1970 ;; $a++) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d -= $d366; - else $d -= $d365; - if ($d < 0) { - $year = $a; - break; - } - } - $secsInYear = $lastd; - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 1 ; $a <= 12; $a++) { - $lastd = $d; - $d -= $mtab[$a] * $_day_power; - if ($d < 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - $d = $lastd; - $day = ceil(($d+1) / $_day_power); - $d = $d - ($day-1) * $_day_power; - $hour = floor($d /$_hour_power); - } - - $d -= $hour * $_hour_power; - $min = floor($d/$_min_power); - $secs = $d - $min * $_min_power; - if ($fast) { - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'leap' => $leaf, - 'ndays' => $ndays - ); - } - - - $dow = adodb_dow($year,$month,$day); - - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'wday' => $dow, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'weekday' => gmdate('l',$_day_power*(3+$dow)), - 'month' => gmdate('F',mktime(0,0,0,$month,2,1971)), - 0 => $origd - ); -} -/* - if ($isphp5) - $dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); - else - $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); - break;*/ -function adodb_tz_offset($gmt,$isphp5) -{ - $zhrs = abs($gmt)/3600; - $hrs = floor($zhrs); - if ($isphp5) - return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); - else - return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); -} - - -function adodb_gmdate($fmt,$d=false) -{ - return adodb_date($fmt,$d,true); -} - -// accepts unix timestamp and iso date format in $d -function adodb_date2($fmt, $d=false, $is_gmt=false) -{ - if ($d !== false) { - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($d), $rr)) return adodb_date($fmt,false,$is_gmt); - - if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt); - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1],false,$is_gmt); - else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1],false,$is_gmt); - } - - return adodb_date($fmt,$d,$is_gmt); -} - - -/** - Return formatted date based on timestamp $d -*/ -function adodb_date($fmt,$d=false,$is_gmt=false) -{ -static $daylight; -global $ADODB_DATETIME_CLASS; -static $jan1_1971; - - - if (!isset($daylight)) { - $daylight = function_exists('adodb_daylight_sv'); - if (empty($jan1_1971)) $jan1_1971 = mktime(0,0,0,1,1,1971); // we only use date() when > 1970 as adodb_mktime() only uses mktime() when > 1970 - } - - if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= $jan1_1971) // if windows, must be +ve integer - return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d); - - } - } - $_day_power = 86400; - - $arr = _adodb_getdate($d,true,$is_gmt); - - if ($daylight) adodb_daylight_sv($arr, $is_gmt); - - $year = $arr['year']; - $month = $arr['mon']; - $day = $arr['mday']; - $hour = $arr['hours']; - $min = $arr['minutes']; - $secs = $arr['seconds']; - - $max = strlen($fmt); - $dates = ''; - - $isphp5 = PHP_VERSION >= 5; - - /* - at this point, we have the following integer vars to manipulate: - $year, $month, $day, $hour, $min, $secs - */ - for ($i=0; $i < $max; $i++) { - switch($fmt[$i]) { - case 'e': - $dates .= date('e'); - break; - case 'T': - if ($ADODB_DATETIME_CLASS) { - $dt = new DateTime(); - $dt->SetDate($year,$month,$day); - $dates .= $dt->Format('T'); - } else - $dates .= date('T'); - break; - // YEAR - case 'L': $dates .= $arr['leap'] ? '1' : '0'; break; - case 'r': // Thu, 21 Dec 2000 16:01:07 +0200 - - // 4.3.11 uses '04 Jun 2004' - // 4.3.8 uses ' 4 Jun 2004' - $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', ' - . ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' '; - - if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; - - if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min; - - if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs; - - $gmt = adodb_get_gmt_diff($year,$month,$day); - - $dates .= ' '.adodb_tz_offset($gmt,$isphp5); - break; - - case 'Y': $dates .= $year; break; - case 'y': $dates .= substr($year,strlen($year)-2,2); break; - // MONTH - case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break; - case 'Q': $dates .= ($month+3)>>2; break; - case 'n': $dates .= $month; break; - case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break; - case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break; - // DAY - case 't': $dates .= $arr['ndays']; break; - case 'z': $dates .= $arr['yday']; break; - case 'w': $dates .= adodb_dow($year,$month,$day); break; - case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'j': $dates .= $day; break; - case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break; - case 'S': - $d10 = $day % 10; - if ($d10 == 1) $dates .= 'st'; - else if ($d10 == 2 && $day != 12) $dates .= 'nd'; - else if ($d10 == 3) $dates .= 'rd'; - else $dates .= 'th'; - break; - - // HOUR - case 'Z': - $dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff($year,$month,$day); break; - case 'O': - $gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff($year,$month,$day); - - $dates .= adodb_tz_offset($gmt,$isphp5); - break; - - case 'H': - if ($hour < 10) $dates .= '0'.$hour; - else $dates .= $hour; - break; - case 'h': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - - if ($hh < 10) $dates .= '0'.$hh; - else $dates .= $hh; - break; - - case 'G': - $dates .= $hour; - break; - - case 'g': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - $dates .= $hh; - break; - // MINUTES - case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break; - // SECONDS - case 'U': $dates .= $d; break; - case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break; - // AM/PM - // Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM - case 'a': - if ($hour>=12) $dates .= 'pm'; - else $dates .= 'am'; - break; - case 'A': - if ($hour>=12) $dates .= 'PM'; - else $dates .= 'AM'; - break; - default: - $dates .= $fmt[$i]; break; - // ESCAPE - case "\\": - $i++; - if ($i < $max) $dates .= $fmt[$i]; - break; - } - } - return $dates; -} - -/** - Returns a timestamp given a GMT/UTC time. - Note that $is_dst is not implemented and is ignored. -*/ -function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false) -{ - return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true); -} - -/** - Return a timestamp given a local time. Originally by jackbbs. - Note that $is_dst is not implemented and is ignored. - - Not a very fast algorithm - O(n) operation. Could be optimized to O(1). -*/ -function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false,$is_gmt=false) -{ - if (!defined('ADODB_TEST_DATES')) { - - if ($mon === false) { - return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec); - } - - // for windows, we don't check 1970 because with timezone differences, - // 1 Jan 1970 could generate negative timestamp, which is illegal - $usephpfns = (1970 < $year && $year < 2038 - || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038) - ); - - - if ($usephpfns && ($year + $mon/12+$day/365.25+$hr/(24*365.25) >= 2038)) $usephpfns = false; - - if ($usephpfns) { - return $is_gmt ? - @gmmktime($hr,$min,$sec,$mon,$day,$year): - @mktime($hr,$min,$sec,$mon,$day,$year); - } - } - - $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff($year,$mon,$day); - - /* - # disabled because some people place large values in $sec. - # however we need it for $mon because we use an array... - $hr = intval($hr); - $min = intval($min); - $sec = intval($sec); - */ - $mon = intval($mon); - $day = intval($day); - $year = intval($year); - - - $year = adodb_year_digit_check($year); - - if ($mon > 12) { - $y = floor(($mon-1)/ 12); - $year += $y; - $mon -= $y*12; - } else if ($mon < 1) { - $y = ceil((1-$mon) / 12); - $year -= $y; - $mon += $y*12; - } - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $_total_date = 0; - if ($year >= 1970) { - for ($a = 1970 ; $a <= $year; $a++) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a < $year) { - $_total_date += $_add_date; - } else { - for($b=1;$b<$mon;$b++) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date +=$day-1; - $ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different; - - } else { - for ($a = 1969 ; $a >= $year; $a--) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a > $year) { $_total_date += $_add_date; - } else { - for($b=12;$b>$mon;$b--) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date += $loop_table[$mon] - $day; - - $_day_time = $hr * $_hour_power + $min * $_min_power + $sec; - $_day_time = $_day_power - $_day_time; - $ret = -( $_total_date * $_day_power + $_day_time - $gmt_different); - if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction - else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582. - } - //print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret; - return $ret; -} - -function adodb_gmstrftime($fmt, $ts=false) -{ - return adodb_strftime($fmt,$ts,true); -} - -// hack - convert to adodb_date -function adodb_strftime($fmt, $ts=false,$is_gmt=false) -{ -global $ADODB_DATE_LOCALE; - - if (!defined('ADODB_TEST_DATES')) { - if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); - - } - } - - if (empty($ADODB_DATE_LOCALE)) { - /* - $tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am - $sep = substr($tstr,2,1); - $hasAM = strrpos($tstr,'M') !== false; - */ - # see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24 - $dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am - $sep = substr($dstr,2,1); - $tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am - $hasAM = strrpos($tstr,'M') !== false; - - $ADODB_DATE_LOCALE = array(); - $ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y'; - $ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s'; - - } - $inpct = false; - $fmtdate = ''; - for ($i=0,$max = strlen($fmt); $i < $max; $i++) { - $ch = $fmt[$i]; - if ($ch == '%') { - if ($inpct) { - $fmtdate .= '%'; - $inpct = false; - } else - $inpct = true; - } else if ($inpct) { - - $inpct = false; - switch($ch) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'E': - case 'O': - /* ignore format modifiers */ - $inpct = true; - break; - - case 'a': $fmtdate .= 'D'; break; - case 'A': $fmtdate .= 'l'; break; - case 'h': - case 'b': $fmtdate .= 'M'; break; - case 'B': $fmtdate .= 'F'; break; - case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break; - case 'C': $fmtdate .= '\C?'; break; // century - case 'd': $fmtdate .= 'd'; break; - case 'D': $fmtdate .= 'm/d/y'; break; - case 'e': $fmtdate .= 'j'; break; - case 'g': $fmtdate .= '\g?'; break; //? - case 'G': $fmtdate .= '\G?'; break; //? - case 'H': $fmtdate .= 'H'; break; - case 'I': $fmtdate .= 'h'; break; - case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd - case 'm': $fmtdate .= 'm'; break; - case 'M': $fmtdate .= 'i'; break; - case 'n': $fmtdate .= "\n"; break; - case 'p': $fmtdate .= 'a'; break; - case 'r': $fmtdate .= 'h:i:s a'; break; - case 'R': $fmtdate .= 'H:i:s'; break; - case 'S': $fmtdate .= 's'; break; - case 't': $fmtdate .= "\t"; break; - case 'T': $fmtdate .= 'H:i:s'; break; - case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break; - case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break; - case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'y': $fmtdate .= 'y'; break; - case 'Y': $fmtdate .= 'Y'; break; - case 'Z': $fmtdate .= 'T'; break; - } - } else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' )) - $fmtdate .= "\\".$ch; - else - $fmtdate .= $ch; - } - //echo "fmt=",$fmtdate,"
    "; - if ($ts === false) $ts = time(); - $ret = adodb_date($fmtdate, $ts, $is_gmt); - return $ret; -} diff --git a/htdocs/includes/jquery/js/jquery-ui.js b/htdocs/includes/jquery/js/jquery-ui.js index 5d9bfa2f1b1..1a613bf2f94 100644 --- a/htdocs/includes/jquery/js/jquery-ui.js +++ b/htdocs/includes/jquery/js/jquery-ui.js @@ -1,4 +1,4 @@ -/*! jQuery UI - v1.13.1 - 2022-01-20 +/*! jQuery UI - v1.13.2 - 2022-07-14 * http://jqueryui.com * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js * Copyright jQuery Foundation and other contributors; Licensed MIT */ @@ -20,11 +20,11 @@ $.ui = $.ui || {}; -var version = $.ui.version = "1.13.1"; +var version = $.ui.version = "1.13.2"; /*! - * jQuery UI Widget 1.13.1 + * jQuery UI Widget 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -766,7 +766,7 @@ var widget = $.widget; /*! - * jQuery UI Position 1.13.1 + * jQuery UI Position 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -1263,7 +1263,7 @@ var position = $.ui.position; /*! - * jQuery UI :data 1.13.1 + * jQuery UI :data 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -1292,7 +1292,7 @@ var data = $.extend( $.expr.pseudos, { } ); /*! - * jQuery UI Disable Selection 1.13.1 + * jQuery UI Disable Selection 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -2047,7 +2047,7 @@ colors = jQuery.Color.names = { /*! - * jQuery UI Effects 1.13.1 + * jQuery UI Effects 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -2431,7 +2431,7 @@ if ( $.uiBackCompat !== false ) { } $.extend( $.effects, { - version: "1.13.1", + version: "1.13.2", define: function( name, mode, effect ) { if ( !effect ) { @@ -2999,7 +2999,7 @@ var effect = $.effects; /*! - * jQuery UI Effects Blind 1.13.1 + * jQuery UI Effects Blind 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3054,7 +3054,7 @@ var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, d /*! - * jQuery UI Effects Bounce 1.13.1 + * jQuery UI Effects Bounce 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3149,7 +3149,7 @@ var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) /*! - * jQuery UI Effects Clip 1.13.1 + * jQuery UI Effects Clip 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3199,7 +3199,7 @@ var effectsEffectClip = $.effects.define( "clip", "hide", function( options, don /*! - * jQuery UI Effects Drop 1.13.1 + * jQuery UI Effects Drop 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3253,7 +3253,7 @@ var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, don /*! - * jQuery UI Effects Explode 1.13.1 + * jQuery UI Effects Explode 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3349,7 +3349,7 @@ var effectsEffectExplode = $.effects.define( "explode", "hide", function( option /*! - * jQuery UI Effects Fade 1.13.1 + * jQuery UI Effects Fade 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3381,7 +3381,7 @@ var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, d /*! - * jQuery UI Effects Fold 1.13.1 + * jQuery UI Effects Fold 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3455,7 +3455,7 @@ var effectsEffectFold = $.effects.define( "fold", "hide", function( options, don /*! - * jQuery UI Effects Highlight 1.13.1 + * jQuery UI Effects Highlight 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3497,7 +3497,7 @@ var effectsEffectHighlight = $.effects.define( "highlight", "show", function( op /*! - * jQuery UI Effects Size 1.13.1 + * jQuery UI Effects Size 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3675,7 +3675,7 @@ var effectsEffectSize = $.effects.define( "size", function( options, done ) { /*! - * jQuery UI Effects Scale 1.13.1 + * jQuery UI Effects Scale 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3715,7 +3715,7 @@ var effectsEffectScale = $.effects.define( "scale", function( options, done ) { /*! - * jQuery UI Effects Puff 1.13.1 + * jQuery UI Effects Puff 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3741,7 +3741,7 @@ var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, don /*! - * jQuery UI Effects Pulsate 1.13.1 + * jQuery UI Effects Pulsate 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3790,7 +3790,7 @@ var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( option /*! - * jQuery UI Effects Shake 1.13.1 + * jQuery UI Effects Shake 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3849,7 +3849,7 @@ var effectsEffectShake = $.effects.define( "shake", function( options, done ) { /*! - * jQuery UI Effects Slide 1.13.1 + * jQuery UI Effects Slide 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3910,7 +3910,7 @@ var effectsEffectSlide = $.effects.define( "slide", "show", function( options, d /*! - * jQuery UI Effects Transfer 1.13.1 + * jQuery UI Effects Transfer 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -3935,7 +3935,7 @@ var effectsEffectTransfer = effect; /*! - * jQuery UI Focusable 1.13.1 + * jQuery UI Focusable 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4017,7 +4017,7 @@ var form = $.fn._form = function() { /*! - * jQuery UI Form Reset Mixin 1.13.1 + * jQuery UI Form Reset Mixin 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4079,7 +4079,7 @@ var formResetMixin = $.ui.formResetMixin = { /*! - * jQuery UI Support for jQuery core 1.8.x and newer 1.13.1 + * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4154,7 +4154,7 @@ if ( !$.fn.even || !$.fn.odd ) { ; /*! - * jQuery UI Keycode 1.13.1 + * jQuery UI Keycode 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4189,7 +4189,7 @@ var keycode = $.ui.keyCode = { /*! - * jQuery UI Labels 1.13.1 + * jQuery UI Labels 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4244,7 +4244,7 @@ var labels = $.fn.labels = function() { /*! - * jQuery UI Scroll Parent 1.13.1 + * jQuery UI Scroll Parent 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4278,7 +4278,7 @@ var scrollParent = $.fn.scrollParent = function( includeHidden ) { /*! - * jQuery UI Tabbable 1.13.1 + * jQuery UI Tabbable 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4302,7 +4302,7 @@ var tabbable = $.extend( $.expr.pseudos, { /*! - * jQuery UI Unique ID 1.13.1 + * jQuery UI Unique ID 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4340,7 +4340,7 @@ var uniqueId = $.fn.extend( { /*! - * jQuery UI Accordion 1.13.1 + * jQuery UI Accordion 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4361,7 +4361,7 @@ var uniqueId = $.fn.extend( { var widgetsAccordion = $.widget( "ui.accordion", { - version: "1.13.1", + version: "1.13.2", options: { active: 0, animate: {}, @@ -4972,7 +4972,7 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) { /*! - * jQuery UI Menu 1.13.1 + * jQuery UI Menu 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -4991,7 +4991,7 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) { var widgetsMenu = $.widget( "ui.menu", { - version: "1.13.1", + version: "1.13.2", defaultElement: "
     
    ",x=o?"":"",g=0;g<7;g++)x+="";for(w+=x+"",D=this._getDaysInMonth(U,K),U===t.selectedYear&&K===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),C=(this._getFirstDayOfMonth(U,K)-n+7)%7,D=Math.ceil((C+D)/7),I=Y&&this.maxRows>D?this.maxRows:D,this.maxRows=I,T=this._daylightSavingAdjust(new Date(U,K,1-C)),P=0;P",M=o?"":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[T]):[!0,""],z=(H=T.getMonth()!==K)&&!d||!S[0]||j&&T"+(H&&!u?" ":z?""+T.getDate()+"":""+T.getDate()+"")+"",T.setDate(T.getDate()+1),T=this._daylightSavingAdjust(T);w+=M+""}11<++K&&(K=0,U++),_+=w+="
    "+this._get(t,"weekHeader")+""+r[k]+"
    "+this._get(t,"calculateWeek")(T)+"
    "+(Y?"
    "+(0":""):"")}f+=_}return f+=F,t._keyEvent=!1,f},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="
    ",y="";if(o||!f)y+=""+a[e]+"";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+=""}if(m||(b+=y+(!o&&f&&g?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!g)b+=""+i+"";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":" ")+y),b+="
    "},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new st,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.2";V.datepicker,V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var rt=!1;V(document).on("mouseup",function(){rt=!1});V.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!rt){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),rt=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,rt=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,n={width:i.size.width-a,height:i.size.height-o},a=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,o&&a?{top:o,left:a}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=V(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,a=o instanceof V?o.get(0):/parent/.test(o)?e.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(a,"left")?a.scrollWidth:o,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,a={top:0,left:0},r=e.containerElement,t=!0;r[0]!==document&&/static/.test(r.css("position"))&&(a=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-a.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-a.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-a.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),s&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=!(t=!(t=!(t=!(t=t||this.element.find("[autofocus]")).length?this.element.find(":tabbable"):t).length?this.uiDialogButtonPane.find(":tabbable"):t).length?this.uiDialogTitlebarClose.filter(":tabbable"):t).length?this.uiDialog:t).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("
    ").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);var e,i,s;t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("
    "),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("").button({label:V("").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=V("
    "),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("
    ").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("
    ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||((e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i||e._delay(e._restoreTabbableFocus)))}.bind(this)),this.overlay=V("
    ").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});V.ui.dialog;function lt(t,e,i){return e<=t&&t").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("
    ").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.13.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("
    "),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY;return ll||i.righth||i.bottoma&&i.rightr&&i.bottom",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("
      ",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("
      ").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("
    • ",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("
    • "),s=V("
      ",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){this.isOpen&&(V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){e.hidden||s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("
      ").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),a={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(a),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e=this._valueMax())return this._valueMax();var e=0=e&&(t+=0this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t*{ cursor: "+o.cursor+" !important; }").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?h&&c:o",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("
     
    '; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { + if ((!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) || !empty($dolibarr_main_db_encrypted_pass)) { require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; - if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { + if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted @@ -420,7 +420,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $afterversionarray = explode('.', '5.0.9'); $beforeversionarray = explode('.', '6.0.9'); if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { - if (!empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { global $multicompany_transverse_mode; // Only if the transverse mode is not used @@ -455,7 +455,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $afterversionarray = explode('.', '8.0.9'); $beforeversionarray = explode('.', '9.0.9'); if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { - migrate_user_photospath(); + //migrate_user_photospath(); } // Scripts for 11.0 @@ -480,8 +480,16 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $afterversionarray = explode('.', '15.0.9'); $beforeversionarray = explode('.', '16.0.9'); if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + migrate_user_photospath(); migrate_user_photospath2(); } + + // Scripts for 17.0 + $afterversionarray = explode('.', '16.0.9'); + $beforeversionarray = explode('.', '17.0.9'); + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + migrate_contractdet_rank(); + } } @@ -574,7 +582,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print ''; } } else { - //if (! empty($conf->modules)) + //if (!empty($conf->modules)) if (!empty($conf->modules_parts['hooks'])) { // If there is at least one module with one hook, we show message to say nothing was done print ''; } } else { - //if (! empty($conf->modules)) + //if (!empty($conf->modules)) if (!empty($conf->modules_parts['hooks'])) { // If there is at least one module with one hook, we show message to say nothing was done print '\n"; } } + +/** + * Migrate Rank into contract line + * + * @return void + */ +function migrate_contractdet_rank() +{ + + global $db, $langs; + + $error = 0; + $resultstring = ''; + + $db->begin(); + print ''; + + if (!$resultstring) { + print '\n"; + } +} diff --git a/htdocs/intracommreport/admin/intracommreport.php b/htdocs/intracommreport/admin/intracommreport.php index 3185e8a030e..778cd7a94c4 100644 --- a/htdocs/intracommreport/admin/intracommreport.php +++ b/htdocs/intracommreport/admin/intracommreport.php @@ -13,15 +13,16 @@ * 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 . + * along with this program. If not, see . */ /** - * \file htdocs/intracommreport/admin/intracommreport.php - * \ingroup intracommreport - * \brief Page to setup the module intracomm report + * \file htdocs/intracommreport/admin/intracommreport.php + * \ingroup intracommreport + * \brief Page to setup the module intracomm report */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/intracommreport.lib.php'; @@ -30,10 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "intracommreport")); +// Access Control if (!$user->admin) { accessforbidden(); } +// Get Parameters $action = GETPOST('action', 'aZ09'); // Parameters INTRACOMMREPORT_* and others @@ -81,6 +84,7 @@ if ($action == 'update') { } } + /* * View */ diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 681320e0d75..403c4b28eae 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -33,13 +33,16 @@ * */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php'; +// Load translation files required by the page $langs->loadLangs(array("intracommreport")); +// Get Parameters $id = GETPOST('id', 'int'); $action = GETPOST('action'); $exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB or DES @@ -48,6 +51,7 @@ $month = GETPOSTINT('month'); $label = (string) GETPOST('label', 'alphanohtml'); $type_declaration = (string) GETPOST('type_declaration', 'alphanohtml'); $backtopage = GETPOST('backtopage', 'alpha'); + $declaration = array( "deb" => $langs->trans("DEB"), "des" => $langs->trans("DES"), @@ -56,6 +60,8 @@ $typeOfDeclaration = array( "introduction" => $langs->trans("Introduction"), "expedition" => $langs->trans("Expedition"), ); + +// Initialize technical objects $object = new IntracommReport($db); if ($id > 0) { $object->fetch($id); @@ -68,6 +74,7 @@ $hookmanager->initHooks(array('intracommcard', 'globalcard')); $error = 0; +// Permissions $permissiontoread = $user->rights->intracommreport->read; $permissiontoadd = $user->rights->intracommreport->write; $permissiontodelete = $user->rights->intracommreport->delete; @@ -112,7 +119,7 @@ if ($action == 'add' && $permissiontoadd) { $object->label = trim($label); $object->type = trim($exporttype); $object->type_declaration = $type_declaration; - $object->subscription = (int) $subscription; + //$object->subscription = (int) $subscription; // Fill array 'array_options' with data from add form // $ret = $extrafields->setOptionalsFromPost($extralabels, $object); @@ -155,10 +162,11 @@ if ($action == 'add' && $permissiontoadd) { * View */ +$title = $langs->trans("IntracommReportTitle"); +llxHeader("", $title); + // Creation mode if ($action == 'create') { - $title = $langs->trans("IntracommReportTitle"); - llxHeader("", $title); print load_fiche_titre($langs->trans("IntracommReportTitle")); print '
    '; @@ -294,8 +302,6 @@ if ($id > 0 && $action != 'edit') { { global $langs, $formother, $year, $month, $type_declaration; - $title = $langs->trans("IntracommReportDESTitle"); - llxHeader("", $title); print load_fiche_titre($langs->trans("IntracommReportDESTitle")); print dol_get_fiche_head(); diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index 5411e6b7aaa..88788f7070e 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -14,14 +14,16 @@ * 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 . + * along with this program. If not, see . */ /** - * \file htdocs/intracommreport/class/intracommreport.class.php - * \ingroup Intracomm report - * \brief File of class to manage intracomm report + * \file htdocs/intracommreport/class/intracommreport.class.php + * \ingroup Intracomm report + * \brief File of class to manage intracomm report */ + + require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; @@ -45,16 +47,28 @@ class IntracommReport extends CommonObject */ public $fk_element = 'fk_intracommreport'; + /** + * 0 = No test on entity, 1 = Test with field entity, 2 = Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; + + public $picto = 'intracommreport'; + + + public $label; // ref ??? + + public $period; + + public $declaration; + /** * @var string declaration number */ public $declaration_number; - /** - * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - * @var int - */ - public $ismultientitymanaged = 1; + public $type_declaration; // deb or des + /** * DEB - Product @@ -71,6 +85,7 @@ class IntracommReport extends CommonObject 'expedition'=>'Expédition' ); + /** * Constructor * @@ -83,7 +98,8 @@ class IntracommReport extends CommonObject } /** - * Fonction create + * Function create + * * @param User $user User * @param int $notrigger notrigger * @return int @@ -94,7 +110,8 @@ class IntracommReport extends CommonObject } /** - * Fonction fetch + * Function fetch + * * @param int $id object ID * @return int */ @@ -104,7 +121,8 @@ class IntracommReport extends CommonObject } /** - * Fonction delete + * Function delete + * * @param int $id object ID * @param User $user User * @param int $notrigger notrigger diff --git a/htdocs/intracommreport/list.php b/htdocs/intracommreport/list.php index 1478dbea83f..c107ba9e492 100644 --- a/htdocs/intracommreport/list.php +++ b/htdocs/intracommreport/list.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -22,6 +22,7 @@ * \brief Page to list intracomm report */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -30,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('intracommreport')); +// Get Parameters $action = GETPOST('action', 'alpha'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); @@ -121,19 +123,21 @@ $isInEEC = isInEEC($mysoc); $arrayfields = array( 'i.ref' => array('label'=>$langs->trans("Ref"), 'checked'=>1), 'i.label' => array('label'=>$langs->trans("Label"), 'checked'=>1), - 'i.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(!empty($conf->produit->enabled) && !empty($conf->service->enabled))), + 'i.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(isModEnabled("product") && isModEnabled("service"))), ); + /* // Extra fields if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs((int) $extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); } } */ + $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -146,13 +150,17 @@ if ($search_type == '0') { $result = restrictedArea($user, 'produit|service', '', '', '', '', '', 0); } +$permissiontoread = $user->rights->intracommreport->read; +$permissiontodelete = $user->rights->intracommreport->delete; + /* * Actions */ if (GETPOST('cancel', 'alpha')) { - $action = 'list'; $massaction = ''; + $action = 'list'; + $massaction = ''; } if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; @@ -188,8 +196,6 @@ if (empty($reshook)) { $objectlabel = 'Products'; } - $permtoread = $user->rights->produit->lire; - $permtodelete = $user->rights->produit->supprimer; $uploaddir = $conf->product->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -203,24 +209,26 @@ $formother = new FormOther($db); $title = $langs->trans('IntracommReportList'.$type); -$sql = 'SELECT DISTINCT i.rowid, i.type_declaration, i.type_export, i.periods, i.mode, i.entity'; +$sql = 'SELECT i.rowid, i.type_declaration, i.type_export, i.periods, i.mode, i.entity'; + /* // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); } */ // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$sql .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql = preg_replace('/,\s*$/', '', $sql); $sql .= $hookmanager->resPrint; +$sqlfields = $sql; + $sql .= ' FROM '.MAIN_DB_PREFIX.'intracommreport as i'; - // if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."intracommreport_extrafields as ef on (i.rowid = ef.fk_object)"; - $sql .= ' WHERE i.entity IN ('.getEntity('intracommreport').')'; - if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -255,7 +263,7 @@ $sql .= " GROUP BY i.rowid, i.type_declaration, i.type_export, i.periods, i.mode /* // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } */ @@ -265,281 +273,315 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldSelect', $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); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -$sql .= $db->plimit($limit + 1, $offset); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} $resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); + exit; +} -if ($resql) { - $num = $db->num_rows($resql); +$num = $db->num_rows($resql); - $arrayofselected = is_array($toselect) ? $toselect : array(); +$helpurl = 'EN:Module_IntracommReport|FR:Module_ProDouane'; +llxHeader('', $title, $helpurl, ''); - $helpurl = 'EN:Module_IntracommReport|FR:Module_ProDouane'; - llxHeader('', $title, $helpurl, ''); +// Displays product removal confirmation +if (GETPOST('delreport')) { + setEventMessages($langs->trans("IntracommReportDeleted", GETPOST('delreport')), null, 'mesgs'); +} - // Displays product removal confirmation - if (GETPOST('delreport')) { - setEventMessages($langs->trans("IntracommReportDeleted", GETPOST('delreport')), null, 'mesgs'); - } +$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); - } - if ($search_ref) { - $param = "&search_ref=".urlencode($search_ref); - } - if ($search_label) { - $param .= "&search_label=".urlencode($search_label); - } +$param = ''; +if (!empty($mode)) { + $param .= '&mode='.urlencode($mode); +} +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 ($search_ref) { + $param = "&search_ref=".urlencode($search_ref); +} +if ($search_label) { + $param .= "&search_label=".urlencode($search_label); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +// Add $param from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$param .= $hookmanager->resPrint; - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +// List of mass actions available +$arrayofmassactions = array( + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>$langs->trans("SendByMail"), +); +if (!empty($permissiontodelete)) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); - // List of mass actions available - $arrayofmassactions = array( - 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), - ); - if ($user->rights->intracommreport->delete) { - $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); - } - if (in_array($massaction, array('presend', 'predelete'))) { - $arrayofmassactions = array(); - } - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); +$newcardbutton = ''; +if ($user->rights->intracommreport->write) { + $newcardbutton .= dolGetButtonTitle($langs->trans("NewDeclaration"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/intracommreport/card.php?action=create&type='.$type); +} - $newcardbutton = ''; - if ($user->rights->intracommreport->write) { - $newcardbutton .= dolGetButtonTitle($langs->trans("NewDeclaration"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/intracommreport/card.php?action=create&type='.$type); - } +print ''; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +if (empty($arrayfields['i.fk_product_type']['checked'])) { + print ''; +} - print ''; - if ($optioncss != '') { - print ''; - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if (empty($arrayfields['i.fk_product_type']['checked'])) { - print ''; - } +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'intracommreport', 0, $newcardbutton, '', $limit); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'intracommreport', 0, $newcardbutton, '', $limit); +$topicmail = "Information"; +$modelmail = "product"; +$objecttmp = new IntracommReport($db); +$trackid = 'prod'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - $topicmail = "Information"; - $modelmail = "product"; - $objecttmp = new IntracommReport($db); - $trackid = 'prod'.$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).'
    '; +} - if ($sall) { - foreach ($fieldstosearchall as $key => $val) { - $fieldstosearchall[$key] = $langs->trans($val); - } - print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; - } +$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; +} - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook - if (empty($reshook)) { - $moreforfilter .= $hookmanager->resPrint; - } else { - $moreforfilter = $hookmanager->resPrint; - } +if ($moreforfilter) { + print '
    '; + print $moreforfilter; + print '
    '; +} - if ($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); +} - $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 ''.$langs->trans('UpgradeExternalModule').': '.$langs->trans("NodoUpgradeAfterDB"); @@ -646,7 +654,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print '
    '; print ''.$langs->trans('UpgradeExternalModule').': '.$langs->trans("NodoUpgradeAfterFiles"); @@ -2024,7 +2032,7 @@ function migrate_modeles($db, $langs, $conf) } } - if (!empty($conf->commande->enabled)) { + if (isModEnabled('commande')) { include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; $modellist = ModelePDFCommandes::liste_modeles($db); if (count($modellist) == 0) { @@ -2037,7 +2045,7 @@ function migrate_modeles($db, $langs, $conf) } } - if (!empty($conf->expedition->enabled)) { + if (isModEnabled("expedition")) { include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; $modellist = ModelePDFExpedition::liste_modeles($db); if (count($modellist) == 0) { @@ -4094,6 +4102,8 @@ function migrate_delete_old_files($db, $langs, $conf) '/core/triggers/interface_modCommande_Ecotax.class.php', '/core/triggers/interface_modCommande_fraisport.class.php', '/core/triggers/interface_modPropale_PropalWorkflow.class.php', + '/core/triggers/interface_99_modWebhook_WebhookTriggers.class.php', + '/core/triggers/interface_99_modZapier_ZapierTriggers.class.php', '/core/menus/smartphone/iphone.lib.php', '/core/menus/smartphone/iphone_backoffice.php', '/core/menus/smartphone/iphone_frontoffice.php', @@ -4116,6 +4126,7 @@ function migrate_delete_old_files($db, $langs, $conf) '/core/boxes/box_members.php', '/api/class/api_generic.class.php', + '/asterisk/cidlookup.php', '/categories/class/api_category.class.php', '/categories/class/api_deprecated_category.class.php', '/compta/facture/class/api_invoice.class.php', @@ -5133,3 +5144,61 @@ function migrate_export_import_profiles($mode = 'export') print '
    '.$langs->trans("NothingToDo")."
    '; + print ''.$langs->trans('MigrationContractLineRank')."
    \n"; + + $sql = "SELECT c.rowid as cid ,cd.rowid as cdid,cd.rang FROM ".$db->prefix()."contratdet as cd INNER JOIN ".$db->prefix()."contrat as c ON c.rowid=cd.fk_contrat AND cd.rang=0"; + $sql .=" ORDER BY c.rowid,cd.rowid"; + + $resql = $db->query($sql); + if ($resql) { + $currentRank=0; + $current_contract=0; + while ($obj = $db->fetch_object($resql)) { + if (empty($current_contract) || $current_contract==$obj->cid) { + $currentRank++; + } else { + $currentRank=1; + } + + $sqlUpd = "UPDATE ".$db->prefix()."contratdet SET rang=".(int) $currentRank." WHERE rowid=".(int) $obj->cdid; + $resultstring = '.'; + print $resultstring; + $resqlUpd = $db->query($sqlUpd); + if (!$resqlUpd) { + dol_print_error($db); + $error++; + } + + $current_contract = $obj->cid; + } + } else { + $error++; + } + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } + + print '
    '.$langs->trans("NothingToDo")."
    '."\n"; - print '
    '; - print '
    '."\n"; - - // Lines with input filters - print ''; - if (!empty($arrayfields['i.ref']['checked'])) { - print ''; - } - if (!empty($arrayfields['i.label']['checked'])) { - print ''; - } - // Type - // Type (customer/prospect/supplier) - if (!empty($arrayfields['customerorsupplier']['checked'])) { - print ''; - } - - if (!empty($arrayfields['i.fk_product_type']['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); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - // Date creation - if (!empty($arrayfields['i.datec']['checked'])) { - print ''; - } - // Date modification - if (!empty($arrayfields['i.tms']['checked'])) { - print ''; - } - print ''; +if (!empty($arrayfields['i.ref']['checked'])) { + print ''; +} +if (!empty($arrayfields['i.label']['checked'])) { + print ''; +} +// Type +// Type (customer/prospect/supplier) +if (!empty($arrayfields['customerorsupplier']['checked'])) { + print ''; +} - print ''; +if (!empty($arrayfields['i.fk_product_type']['checked'])) { + print ''; +} - 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['i.datec']['checked'])) { + print ''; +} +// Date modification +if (!empty($arrayfields['i.tms']['checked'])) { + print ''; +} +print ''; + +print ''; + +print ''; +if (!empty($arrayfields['i.ref']['checked'])) { + print_liste_field_titre($arrayfields['i.ref']['label'], $_SERVER["PHP_SELF"], "i.ref", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['i.label']['checked'])) { + print_liste_field_titre($arrayfields['i.label']['label'], $_SERVER["PHP_SELF"], "i.label", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['i.fk_product_type']['checked'])) { + print_liste_field_titre($arrayfields['i.fk_product_type']['label'], $_SERVER["PHP_SELF"], "i.fk_product_type", "", $param, "", $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['i.datec']['checked'])) { + print_liste_field_titre($arrayfields['i.datec']['label'], $_SERVER["PHP_SELF"], "i.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['i.tms']['checked'])) { + print_liste_field_titre($arrayfields['i.tms']['label'], $_SERVER["PHP_SELF"], "i.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} + +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +print "\n"; + + +$intracommreport_static = new IntracommReport($db); + +$i = 0; +$totalarray = array(); +while ($i < min($num, $limit)) { + $obj = $db->fetch_object($resql); + + $intracommreport_static->id = $obj->rowid; + $intracommreport_static->ref = $obj->ref; + $intracommreport_static->ref_fourn = $obj->ref_supplier; + $intracommreport_static->label = $obj->label; + $intracommreport_static->type = $obj->fk_product_type; + $intracommreport_static->status_buy = $obj->tobuy; + $intracommreport_static->status = $obj->tosell; + $intracommreport_static->status_batch = $obj->tobatch; + $intracommreport_static->entity = $obj->entity; + + print ''; + + // Ref if (!empty($arrayfields['i.ref']['checked'])) { - print_liste_field_titre($arrayfields['i.ref']['label'], $_SERVER["PHP_SELF"], "i.ref", "", $param, "", $sortfield, $sortorder); - } - if (!empty($arrayfields['i.label']['checked'])) { - print_liste_field_titre($arrayfields['i.label']['label'], $_SERVER["PHP_SELF"], "i.label", "", $param, "", $sortfield, $sortorder); - } - if (!empty($arrayfields['i.fk_product_type']['checked'])) { - print_liste_field_titre($arrayfields['i.fk_product_type']['label'], $_SERVER["PHP_SELF"], "i.fk_product_type", "", $param, "", $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['i.datec']['checked'])) { - print_liste_field_titre($arrayfields['i.datec']['label'], $_SERVER["PHP_SELF"], "i.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - } - if (!empty($arrayfields['i.tms']['checked'])) { - print_liste_field_titre($arrayfields['i.tms']['label'], $_SERVER["PHP_SELF"], "i.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - } - - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); - print "\n"; - - - $intracommreport_static = new IntracommReport($db); - - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) { - $obj = $db->fetch_object($resql); - - $intracommreport_static->id = $obj->rowid; - $intracommreport_static->ref = $obj->ref; - $intracommreport_static->ref_fourn = $obj->ref_supplier; - $intracommreport_static->label = $obj->label; - $intracommreport_static->type = $obj->fk_product_type; - $intracommreport_static->status_buy = $obj->tobuy; - $intracommreport_static->status = $obj->tosell; - $intracommreport_static->status_batch = $obj->tobatch; - $intracommreport_static->entity = $obj->entity; - - print ''; - - // Ref - if (!empty($arrayfields['i.ref']['checked'])) { - print '\n"; - if (!$i) { - $totalarray['nbfield']++; - } - } - // Label - if (!empty($arrayfields['i.label']['checked'])) { - print ''; - if (!$i) { - $totalarray['nbfield']++; - } - } - // Type - if (!empty($arrayfields['i.fk_product_type']['checked'])) { - print ''; - if (!$i) { - $totalarray['nbfield']++; - } - } - // Action - print ''; + print '\n"; if (!$i) { $totalarray['nbfield']++; } - - print "\n"; - $i++; + } + // Label + if (!empty($arrayfields['i.label']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Type + if (!empty($arrayfields['i.fk_product_type']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Action + print ''; + if (!$i) { + $totalarray['nbfield']++; } - $db->free($resql); - - print "
    '; - print ''; - print ''; - print ''; - print ''; - if ($type != '') { - print ''; - } - print $formcompany->selectProspectCustomerType($search_type, 'search_type', 'search_type', 'list'); - print ''; - $array = array('-1'=>' ', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service')); - print $form->selectarray('search_type', $array, $search_type); - print ''; - print ''; - print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; +// Lines with input filters +print '
    '; + print ''; print ''; + print ''; + print ''; + if ($type != '') { + print ''; + } + print $formcompany->selectProspectCustomerType($search_type, 'search_type', 'search_type', 'list'); + print '
    '; + $array = array('-1'=>' ', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service')); + print $form->selectarray('search_type', $array, $search_type); + print '
    '; + print ''; + print ''; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '
    '; - print $intracommreport_static->getNomUrl(1); - print "'.dol_trunc($obj->label, 80).''.$obj->fk_product_type.''; - 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 $intracommreport_static->getNomUrl(1); + print "
    '.dol_trunc($obj->label, 80).''.$obj->fk_product_type.''; + 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 ''; -} else { - dol_print_error($db); + print "
    '.$langs->trans("NoRecordFound").'
    "; +print "
    "; +print ''; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php b/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php index b95a5717932..ccf54b1d6d9 100644 --- a/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php +++ b/htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php @@ -125,18 +125,19 @@ class KnowledgeManagement extends DolibarrApi * * Get a list of knowledgerecords * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param int $category Use this param to filter list by category + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" * @return array Array of order objects * * @throws RestException * * @url GET /knowledgerecords/ */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $category = 0, $sqlfilters = '') { global $db, $conf; @@ -166,6 +167,9 @@ class KnowledgeManagement extends DolibarrApi if ($restrictonsocid && (!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 ($category > 0) { + $sql .= ", ".$this->db->prefix()."categorie_knowledgemanagement as c"; + } $sql .= " WHERE 1 = 1"; // Example of use $mode @@ -188,6 +192,11 @@ class KnowledgeManagement extends DolibarrApi if ($restrictonsocid && $search_sale > 0) { $sql .= " AND sc.fk_user = ".((int) $search_sale); } + // Select products of given category + if ($category > 0) { + $sql .= " AND c.fk_categorie = ".((int) $category); + $sql .= " AND c.fk_knowledgemanagement = t.rowid"; + } if ($sqlfilters) { $errormessage = ''; if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) { diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index d48be5e2a21..69e7e40c16b 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -103,9 +103,8 @@ class KnowledgeRecord extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "csslist"=>"nowraponall", "showoncombobox"=>1), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1), - 'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), + 'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'tdcss'=>'titlefieldcreate nowraponall', "csslist"=>"tdoverflowmax100"), - 'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,), 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,), @@ -115,7 +114,8 @@ class KnowledgeRecord extends CommonObject 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), //'url' => array('type'=>'varchar(255)', 'label'=>'URL', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflow200', 'help'=>'UrlForInfoPage'), - 'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php:0:(t.active:=:1):pos', 'label'=>'SuggestedForTicketsInGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory', 'csslist'=>'minwidth200 tdoverflowmax250'), + 'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php:0:(t.active:=:1):pos', 'label'=>'SuggestedForTicketsInGroup', 'enabled'=>'isModEnabled("ticket")', 'position'=>520, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory', 'csslist'=>'minwidth200 tdoverflowmax250'), + 'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>3, 'searchall'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'), 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>5, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Obsolete'),), ); public $rowid; @@ -187,7 +187,7 @@ class KnowledgeRecord extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -530,8 +530,8 @@ class KnowledgeRecord extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->knowledgerecord->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->knowledgerecord->knowledgerecord_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->knowledgerecord->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->knowledgerecord->knowledgerecord_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -648,8 +648,8 @@ class KnowledgeRecord extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -672,8 +672,8 @@ class KnowledgeRecord extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -696,8 +696,8 @@ class KnowledgeRecord extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->knowledgemanagement->knowledgemanagement_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php index ba5a3c3b391..1e5f69aaa93 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_standard.php @@ -26,7 +26,7 @@ dol_include_once('/knowledgemanagement/core/modules/knowledgemanagement/modules_ /** - * Class to manage customer order numbering rules standard + * Class to manage the knowledgerecord numbering rules standard */ class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord { diff --git a/htdocs/knowledgemanagement/knowledgemanagementindex.php b/htdocs/knowledgemanagement/knowledgemanagementindex.php index ccb3503eb2f..8f168e62598 100644 --- a/htdocs/knowledgemanagement/knowledgemanagementindex.php +++ b/htdocs/knowledgemanagement/knowledgemanagementindex.php @@ -72,7 +72,7 @@ print '
    '; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read) +if (!empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read) { $langs->load("orders"); @@ -153,7 +153,7 @@ $max = $NBMAX; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject -if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read) { +if (!empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."knowledgemanagement_myobject as s"; //if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; diff --git a/htdocs/knowledgemanagement/knowledgerecord_agenda.php b/htdocs/knowledgemanagement/knowledgerecord_agenda.php index cbf8ccf0895..b293a2dbdd7 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_agenda.php +++ b/htdocs/knowledgemanagement/knowledgerecord_agenda.php @@ -87,7 +87,8 @@ if ($id > 0 || !empty($ref)) { // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'knowledgemanagement', $object->id); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft); $permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php @@ -126,11 +127,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = knowledgerecordPrepareHead($object); @@ -150,7 +151,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -170,7 +171,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index 66b7b0ca160..0c182d71f9e 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -85,8 +85,8 @@ $upload_dir = $conf->knowledgemanagement->multidir_output[isset($object->entity) // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft); //if (empty($conf->knowledgemanagement->enabled)) accessforbidden(); //if (empty($permissiontoread)) accessforbidden(); @@ -118,7 +118,7 @@ if (empty($reshook)) { $triggermodname = 'KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_MODIFY'; // Name of trigger action code to execute when we modify record - // Upadate / add for lang + // Update / add for lang if (($action == 'update' || $action == 'add') && !empty($permissiontoadd)) { $object->lang = (GETPOSTISSET('langkm') ? GETPOST('langkm', 'aZ09') : $object->lang); } @@ -182,14 +182,16 @@ if ($action == 'create') { print ''; } - print dol_get_fiche_head(array(), ''); + print dol_get_fiche_head(array(), '', '', -3); print ''."\n"; // Common attributes + $object->fields['answer']['enabled'] = 0; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + $object->fields['answer']['enabled'] = 1; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { $cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1); if (count($cate_arbo)) { @@ -205,6 +207,14 @@ if ($action == 'create') { print '
    '."\n"; + // Add field answer + print '
    '; + print $langs->trans($object->fields['answer']['label']).'
    '; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%'); + $out = $doleditor->Create(1); + print $out; + print dol_get_fiche_end(); print $form->buttonsSaveCancel('Create'); @@ -229,14 +239,16 @@ if (($id || $ref) && $action == 'edit') { print ''; } - print dol_get_fiche_head(); + print dol_get_fiche_head(array(), '', '', -3); print ''."\n"; // Common attributes + $object->fields['answer']['enabled'] = 0; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; + $object->fields['answer']['enabled'] = 1; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { $cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1); if (count($cate_arbo)) { @@ -260,6 +272,14 @@ if (($id || $ref) && $action == 'edit') { print '
    '; + // Add field answer + print '
    '; + print $langs->trans($object->fields['answer']['label']).'
    '; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%'); + $out = $doleditor->Create(1); + print $out; + print dol_get_fiche_end(); print $form->buttonsSaveCancel(); @@ -294,7 +314,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) if ($action == 'close') { $text = $langs->trans('ConfirmCloseKM', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -319,7 +339,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) if ($action == 'reopen') { $text = $langs->trans('ConfirmReopenKM', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -366,7 +386,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -384,7 +404,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -408,11 +428,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $keyforbreak='fk_c_ticket_category'; // We change column just before this field //unset($object->fields['fk_project']); // Hide field already shown in banner //unset($object->fields['fk_soc']); // Hide field already shown in banner + $object->fields['answer']['enabled'] = 0; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + $object->fields['answer']['enabled'] = 1; // Categories if (isModEnabled('categorie')) { - print '
    '.$langs->trans("Categories").''; + print '
    '.$langs->trans("Categories").''; print $form->showCategories($object->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1); print "
    '; + print ''; print ''; print '
    '; + // Add field answer + print '
    '; + print $langs->trans($object->fields['answer']['label']).'
    '; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%', 1); + $out = $doleditor->Create(1); + print $out; + print dol_get_fiche_end(); @@ -442,20 +473,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - //print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle'); + //print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle'); } // Back to draft if ($object->status == $object::STATUS_VALIDATED) { - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes', '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); } if (($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_VALIDATED) && $permissiontovalidate) { - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); } // Validate if ($object->status == $object::STATUS_DRAFT) { if ((empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) && $permissiontovalidate) { - print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&token='.newToken().'&confirm=yes', '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&token='.newToken().'&confirm=yes', '', $permissiontoadd); } else { $langs->load("errors"); //print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0); @@ -464,7 +495,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().'&object=scrumsprint', '', $permissiontoadd); /* if ($permissiontoadd) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_contact.php b/htdocs/knowledgemanagement/knowledgerecord_contact.php index 2b2facafc18..4e557a3e1ae 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_contact.php +++ b/htdocs/knowledgemanagement/knowledgerecord_contact.php @@ -53,12 +53,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'knowledgemanagement', $object->id); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft); $permission = $user->rights->knowledgemanagement->knowledgerecord->write; + /* - * Add a new contact + * Actions */ if ($action == 'addcontact' && $permission) { @@ -108,16 +110,10 @@ $contactstatic = new Contact($db); $userstatic = new User($db); -/* *************************************************************************** */ -/* */ -/* View and edit mode */ -/* */ -/* *************************************************************************** */ +// View and edit mode if ($object->id) { - /* - * Show tabs - */ + // Show tabs $head = knowledgerecordPrepareHead($object); print dol_get_fiche_head($head, 'contact', $langs->trans("KnowledgeRecord"), -1, $object->picto); @@ -132,7 +128,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -153,7 +149,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/knowledgemanagement/knowledgerecord_document.php b/htdocs/knowledgemanagement/knowledgerecord_document.php index ce185c9b8cf..7430de8a495 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_document.php +++ b/htdocs/knowledgemanagement/knowledgerecord_document.php @@ -78,7 +78,8 @@ if ($id > 0 || !empty($ref)) { // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'knowledgemanagement', $object->id); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft); $permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php @@ -130,7 +131,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -151,7 +152,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 5ff747620aa..dffd3d63d7b 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class.php'; // for other modules -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } //dol_include_once('/othermodule/class/otherobject.class.php'); @@ -153,7 +153,7 @@ if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } -//$result = restrictedArea($user, 'knowledgemanagement'); +$result = restrictedArea($user, 'knowledgemanagement', 0, '', 'knowledgerecord'); //if (!$permissiontoread) accessforbidden(); @@ -293,7 +293,11 @@ if (!empty($searchCategoryKnowledgemanagementList)) { if (intval($searchCategoryKnowledgemanagement) == -2) { $searchCategoryKnowledgemanagementSqlList[] = "NOT EXISTS (SELECT ck.fk_knowledgemanagement FROM ".MAIN_DB_PREFIX."categorie_knowledgemanagement as ck WHERE t.rowid = ck.fk_knowledgemanagement)"; } elseif (intval($searchCategoryKnowledgemanagement) > 0) { - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryKnowledgemanagement); + if ($searchCategoryKnowledgemanagementOperator == 0) { + $searchCategoryKnowledgemanagementSqlList[] = " EXISTS (SELECT ck.fk_knowledgemanagement FROM ".MAIN_DB_PREFIX."categorie_knowledgemanagement as ck WHERE t.rowid = ck.fk_knowledgemanagement AND ck.fk_categorie = ".((int) $searchCategoryKnowledgemanagement).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryKnowledgemanagement); + } } } if ($listofcategoryid) { @@ -327,7 +331,7 @@ foreach($object->fields as $key => $val) { $sql .= "t.".$key.", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } // Add where from hooks @@ -472,7 +476,7 @@ $moreforfilter.= '';*/ // Filter on categories $moreforfilter = ''; -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) { $moreforfilter .= '
    '; $moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"'); $categoriesKnowledgeArr = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', '', 64, 0, 1); diff --git a/htdocs/knowledgemanagement/knowledgerecord_note.php b/htdocs/knowledgemanagement/knowledgerecord_note.php index 0f56a6115a3..28a2bcaa9d0 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_note.php +++ b/htdocs/knowledgemanagement/knowledgerecord_note.php @@ -46,11 +46,6 @@ $hookmanager->initHooks(array('knowledgerecordnote', 'globalcard')); // Note tha // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'knowledgemanagement', $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)) { @@ -60,6 +55,11 @@ if ($id > 0 || !empty($ref)) { $permissionnote = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_setnotes.inc.php $permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; // Used by the include of actions_addupdatedelete.inc.php +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft); /* @@ -104,7 +104,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -125,7 +125,7 @@ if ($id > 0 || !empty($ref)) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php b/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php index 12db6245087..d1de9e5e401 100644 --- a/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php +++ b/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php @@ -28,10 +28,13 @@ */ function knowledgemanagementAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; $langs->load("knowledgemanagement"); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('knowledgemanagement_knowledgerecord'); + $h = 0; $head = array(); @@ -43,14 +46,13 @@ function knowledgemanagementAdminPrepareHead() $head[$h][0] = DOL_URL_ROOT.'/admin/knowledgerecord_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['knowledgemanagement_knowledgerecord']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'extra'; $h++; - /*$head[$h][0] = DOL_URL_ROOT.'/knowledgemanagement/admin/about.php'; - $head[$h][1] = $langs->trans("About"); - $head[$h][2] = 'about'; - $h++;*/ - // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( @@ -61,5 +63,7 @@ function knowledgemanagementAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'knowledgemanagement'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'knowledgemanagement', 'remove'); + return $head; } diff --git a/htdocs/langs/HOWTO-Translation.txt b/htdocs/langs/HOWTO-Translation.txt index 0a05133fdb8..7e7d3c68af1 100644 --- a/htdocs/langs/HOWTO-Translation.txt +++ b/htdocs/langs/HOWTO-Translation.txt @@ -3,7 +3,8 @@ An instruction guide for translating Dolibarr in a new language is available on Dolibarr wiki: -English: https://wiki.dolibarr.org/index.php/Translator_documentation -French: https://wiki.dolibarr.org/index.php/Documentation_traducteur -Spanish: https://wiki.dolibarr.org/index.php/Documentaci%C3%B3n_traductores -German: https://wiki.dolibarr.org/index.php/Dokumentation_Uebersetzung +English: https://wiki.dolibarr.org/index.php/Translator_documentation +French: https://wiki.dolibarr.org/index.php/Documentation_traducteur +Spanish: https://wiki.dolibarr.org/index.php/Documentaci%C3%B3n_traductores +German: https://wiki.dolibarr.org/index.php/Dokumentation_Uebersetzung +Chinese: https://wiki.dolibarr.org/index.php/%E7%BF%BB%E8%AF%91%E6%96%87%E6%A1%A3 diff --git a/htdocs/langs/ar_IQ/projects.lang b/htdocs/langs/ar_IQ/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/ar_IQ/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/de_AT/admin.lang b/htdocs/langs/de_AT/admin.lang index 54771c2245a..eb37ef1ee98 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -21,8 +21,6 @@ SessionSaveHandler=Sessionmanager YourSession=Ihre Anmeldung Sessions=Benutzeranmeldungen DolibarrSetup=Dolibarr installieren oder aktualisieren -InternalUser=interner Nutzer -ExternalUser=externer Nutzer InternalUsers=interne Nutzer ExternalUsers=externe Nutzer UploadNewTemplate=Neue Vorlage(n) hochladen diff --git a/htdocs/langs/de_AT/ecm.lang b/htdocs/langs/de_AT/ecm.lang index bfb47abf032..29ad990c4ca 100644 --- a/htdocs/langs/de_AT/ecm.lang +++ b/htdocs/langs/de_AT/ecm.lang @@ -2,4 +2,3 @@ ECMSectionsManual=Manuelle Verzeichnisse ECMSectionsAuto=Automatische Verzeichnisse ECMNbOfFilesInSubDir=Anzahl der Dateien im Unterverzeichnis -ECMAreaDesc2=* Automatische Verzeichnisse werden automatisch befüllt, wenn Sie Dokumente von der Karte eines Elements erstellen.
    * Manuelle Verzeichnisse können Sie dazu nutzen, nicht mit anderen Elementen verbundene Dokumente zu speichern. diff --git a/htdocs/langs/de_CH/accountancy.lang b/htdocs/langs/de_CH/accountancy.lang index 6a826327010..a65ad255398 100644 --- a/htdocs/langs/de_CH/accountancy.lang +++ b/htdocs/langs/de_CH/accountancy.lang @@ -39,7 +39,6 @@ CountriesNotInEEC=Nicht EWR - Staaten CountriesInEECExceptMe=Länder im EWR ausser %s CountriesExceptMe=Alle Staaten, ausser %s AccountantFiles=Geschäftsvorgänge exportieren -ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy.
    The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...). ExportAccountingSourceDocHelp2=Die Journale exportierst du im Menu %s - %s. VueByAccountAccounting=Anzeigen nach Buchhaltungskonto VueBySubAccountAccounting=Anzeigen nach Nebenbuchkonto @@ -232,7 +231,6 @@ AccountingAccountForSalesTaxAreDefinedInto=Obacht: Das Buchhaltungskonto für d NumberOfAccountancyEntries=Anzahl Einträge NumberOfAccountancyMovements=Anzahl Bewegungen ACCOUNTING_DISABLE_BINDING_ON_SALES=Bindung & Übertragung in der Verkaufsbuchhaltung deaktivieren (Kundenrechnungen werden in der Buchhaltung nicht berücksichtigt) -NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible) ConfirmExportFile=Bestätigen der Generierung der Buchhaltungsexportdatei ? ExportDraftJournal=Exportiere Entwurfsjournal Modelcsv=Exportformat diff --git a/htdocs/langs/de_CH/admin.lang b/htdocs/langs/de_CH/admin.lang index 3529a5b6b40..b8e31734903 100644 --- a/htdocs/langs/de_CH/admin.lang +++ b/htdocs/langs/de_CH/admin.lang @@ -256,7 +256,6 @@ SetAsDefault=Als Standard definieren InstalledInto=Installiert im Verzeichnis %s BarcodeInitForThirdparties=Barcode Init. für alle Partner BarcodeInitForProductsOrServices=Alle Strichcodes für Produkte oder Services initialisieren oder zurücksetzen -InitEmptyBarCode=Init value for the %s empty barcodes EraseAllCurrentBarCode=Alle aktuellen Barcode-Werte löschen ConfirmEraseAllCurrentBarCode=Wirklich alle aktuellen Barcode-Werte löschen? AllBarcodeReset=Alle Barcode-Werte wurden entfernt @@ -396,7 +395,6 @@ Permission215=Lieferanten einrichten Permission255=Andere Passwörter ändern Permission272=Rechnungen anzeigen Permission273=Ausgabe Rechnungen -Permission300=Barcodes auslesen Permission301=Barcodes erzeugen und ändern. Permission331=Lesezeichen einsehen Permission430=PHP Debug Bar verwenden diff --git a/htdocs/langs/de_CH/commercial.lang b/htdocs/langs/de_CH/commercial.lang index edf30db19b1..a3ab0012f82 100644 --- a/htdocs/langs/de_CH/commercial.lang +++ b/htdocs/langs/de_CH/commercial.lang @@ -35,8 +35,5 @@ Stats=Verkaufsstatistik StatusProsp=Interessenten Status NoLimit=Kein Limit ToOfferALinkForOnlineSignature=Link zur Digitalen Unterschrift -WelcomeOnOnlineSignaturePage=Willkommen auf der Seite zum Offerten von %s zu aktzeptieren. -ThisScreenAllowsYouToSignDocFrom=Hier kannst du die Offerte akzeptieren, unterzeichen oder zurückweisen. -ThisIsInformationOnDocumentToSign=Hier die Informationen zum Dokument, das zu akzeptieren oder zurückzuweisen ist. SignatureProposalRef=Unterschrift zur Offerte %s FeatureOnlineSignDisabled=Hoppla, online unterschreiben ist entweder deaktiviert - oder die Offerte wurde erstellt, bevor online unterschreiben aktiviert worden war. diff --git a/htdocs/langs/de_CH/ecm.lang b/htdocs/langs/de_CH/ecm.lang index 57cb0298e43..814cee2c845 100644 --- a/htdocs/langs/de_CH/ecm.lang +++ b/htdocs/langs/de_CH/ecm.lang @@ -6,7 +6,6 @@ ECMAddSection=Ordner hinzufügen ECMNbOfFilesInDir=Anzahl der Dateien in Ordner ECMNbOfSubDir=Anzahl der Unterordner ECMNbOfFilesInSubDir=Anzahl Dateien in Unterordnern -ECMAreaDesc2=* In den automatischen Verzeichnissen werden die vom System erzeugeten Dokumente abgelegt.
    * Die manuellen Verzeichnisse können Sie selbst verwalten und zusätzliche nicht direkt zuordenbare Dokument hinterlegen. ECMSectionWasRemoved=Der Ordner %s wurde gelöscht. ECMSearchByKeywords=Suche nach Stichwörter ECMSearchByEntity=Suche nach Objekt diff --git a/htdocs/langs/el_CY/members.lang b/htdocs/langs/el_CY/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/el_CY/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/el_CY/projects.lang b/htdocs/langs/el_CY/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/el_CY/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_AE/members.lang b/htdocs/langs/en_AE/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_AE/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_AE/projects.lang b/htdocs/langs/en_AE/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_AE/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_AU/members.lang b/htdocs/langs/en_AU/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_AU/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_AU/projects.lang b/htdocs/langs/en_AU/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_AU/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_CA/members.lang b/htdocs/langs/en_CA/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_CA/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_CA/projects.lang b/htdocs/langs/en_CA/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_CA/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_GB/accountancy.lang b/htdocs/langs/en_GB/accountancy.lang index 0afbc72c036..8ed034a497b 100644 --- a/htdocs/langs/en_GB/accountancy.lang +++ b/htdocs/langs/en_GB/accountancy.lang @@ -50,7 +50,6 @@ ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin sorting the page "Links to do" by th ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin sorting the page "Links done" by the most recent elements ACCOUNTING_LENGTH_GACCOUNT=Length of the General Ledger accounts (If you set value to 6 here, the account '706' will appear as '706000' on screen) ACCOUNTING_SELL_JOURNAL=Sales journal -ACCOUNTING_MISCELLANEOUS_JOURNAL=General journal ACCOUNTING_ACCOUNT_SUSPENSE=Suspense account DONATION_ACCOUNTINGACCOUNT=Finance account to register donations ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default sales account (used if not defined in the product sheet) diff --git a/htdocs/langs/en_GB/admin.lang b/htdocs/langs/en_GB/admin.lang index 40504938dbe..f61f52381f7 100644 --- a/htdocs/langs/en_GB/admin.lang +++ b/htdocs/langs/en_GB/admin.lang @@ -39,7 +39,6 @@ UMaskExplanation=This parameter allows you to define permissions set by default ListOfDirectories=List of OpenDocument template directories ListOfDirectoriesForModelGenODT=List of directories containing template files in OpenDocument format.

    Put here full path of directories.
    Add a carriage return between each directory.
    To add a directory of the GED module, add here DOL_DATA_ROOT/ecm/yourdirectoryname.

    Files in those directories must end with .odt or .ods. FollowingSubstitutionKeysCanBeUsed=
    To learn how to create your .odt document templates, before storing them in those directories, read wiki documentation: -InitEmptyBarCode=Init value for the %s empty barcodes Module50200Name=PayPal DictionaryAccountancyJournal=Finance journals CompanyZip=Postcode diff --git a/htdocs/langs/en_GB/members.lang b/htdocs/langs/en_GB/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_GB/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_GB/projects.lang b/htdocs/langs/en_GB/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_GB/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_GB/trips.lang b/htdocs/langs/en_GB/trips.lang index 31e58b7f935..b9af13b26fa 100644 --- a/htdocs/langs/en_GB/trips.lang +++ b/htdocs/langs/en_GB/trips.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - trips -TripsAndExpensesStatistics=Expense report statistics -FeesKilometersOrAmout=Amount or Miles -TripNDF=Information expense report -TF_METRO=Tube -ErrorDoubleDeclaration=You have submitted another expense report in a similar date range. BrouillonnerTrip=Move expense report status back to "Draft" ConfirmBrouillonnerTrip=Are you sure you want to move this expense report status back to "Draft"? +ErrorDoubleDeclaration=You have submitted another expense report in a similar date range. +FeesKilometersOrAmout=Amount or Miles +TripNDF=Information expense report +TripsAndExpensesStatistics=Expense report statistics +TF_METRO=Tube diff --git a/htdocs/langs/en_IN/members.lang b/htdocs/langs/en_IN/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_IN/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_SG/members.lang b/htdocs/langs/en_SG/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_SG/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_SG/projects.lang b/htdocs/langs/en_SG/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_SG/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 8c0f0f9fbf3..a3ed5f9b7b6 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -48,8 +48,9 @@ CountriesNotInEEC=Countries not in EEC CountriesInEECExceptMe=Countries in EEC except %s CountriesExceptMe=All countries except %s AccountantFiles=Export source documents -ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that are used to generate your accountancy. +ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy.
    The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...). ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s. +ExportAccountingProjectHelp=Specify a project if you need an accounting report only for a specific project. Expense reports and loan payments are not included in project reports. VueByAccountAccounting=View by accounting account VueBySubAccountAccounting=View by accounting subaccount @@ -164,40 +165,44 @@ ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, what is the period selected by default -ACCOUNTING_SELL_JOURNAL=Sell journal -ACCOUNTING_PURCHASE_JOURNAL=Purchase journal -ACCOUNTING_MISCELLANEOUS_JOURNAL=Miscellaneous journal +ACCOUNTING_SELL_JOURNAL=Sales journal (sales and returns) +ACCOUNTING_PURCHASE_JOURNAL=Purchase journal (purchase and returns) +ACCOUNTING_BANK_JOURNAL=Cash journal (receipts and disbursements) ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal -ACCOUNTING_SOCIAL_JOURNAL=Social journal +ACCOUNTING_MISCELLANEOUS_JOURNAL=General journal ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal +ACCOUNTING_INVENTORY_JOURNAL=Inventory journal +ACCOUNTING_SOCIAL_JOURNAL=Social journal ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure -ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer +ACCOUNTING_ACCOUNT_TRANSFER_CASH=Account (from the Chart Of Account) to be used as the account for transitional bank transfers TransitionalAccount=Transitional bank transfer account -ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait -DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations -ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions +ACCOUNTING_ACCOUNT_SUSPENSE=Account (from the Chart Of Account) to be used as the account for unallocated funds either received or paid i.e. funds in "wait[ing]" +DONATION_ACCOUNTINGACCOUNT=Account (from the Chart Of Account) to be used to register donations (Donation module) +ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Account (from the Chart Of Account) to be used to register memberships subscriptions (Membership module - if membership recorded without invoice) -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Account (from the Chart Of Account) to be used as the default account to register customer deposit UseAuxiliaryAccountOnCustomerDeposit=Store customer account as individual account in subsidiary ledger for lines of down payments (if disabled, individual account for down payment lines will remain empty) +ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT=Account (from the Chart Of Account) to be used as the default +UseAuxiliaryAccountOnSupplierDeposit=Store supplier account as individual account in subsidiary ledger for lines of down payments (if disabled, individual account for down payment lines will remain empty) -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for the bought products (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Accounting account by default for the products sold in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Accounting account by default for the products sold and exported out of EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the products purchased within same country (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the products purchased from EEC to another EEC country (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the products purchased and imported from any other foreign country (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the sold products (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the products sold from EEC to another EEC country (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the products sold and exported to any other foreign country (used if not defined in the product sheet) -ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Accounting account by default for the bought services in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought services and imported out of EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Accounting account by default for the services sold in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Accounting account by default for the services sold and exported out of EEC (used if not defined in the service sheet) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the services purchased within same country (used if not defined in the service sheet) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the services purchased from EEC to another EEC country (used if not defined in the service sheet) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the services purchased and imported from other foreign country (used if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the sold services (used if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the services sold from EEC to another EEC country (used if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for the services sold and exported to any other foreign country (used if not defined in the service sheet) Doctype=Type of document Docdate=Date @@ -284,7 +289,7 @@ DescClosure=Consult here the number of movements by month not yet validated & lo OverviewOfMovementsNotValidated=Overview of movements not validated and locked AllMovementsWereRecordedAsValidated=All movements were recorded as validated and locked NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated and locked -ValidateMovements=Validate and lock record... +ValidateMovements=Validate and lock movements... DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible ValidateHistory=Bind Automatically @@ -320,9 +325,10 @@ AccountingJournalType1=Miscellaneous operations AccountingJournalType2=Sales AccountingJournalType3=Purchases AccountingJournalType4=Bank -AccountingJournalType5=Expenses report +AccountingJournalType5=Expense reports AccountingJournalType8=Inventory AccountingJournalType9=Has-new +GenerationOfAccountingEntries=Generation of accounting entries ErrorAccountingJournalIsAlreadyUse=This journal is already use AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu %s - %s NumberOfAccountancyEntries=Number of entries @@ -330,10 +336,12 @@ NumberOfAccountancyMovements=Number of movements ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on sales (customer invoices will not be taken into account in accounting) ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting) ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting) +ACCOUNTING_ENABLE_LETTERING=Enable the lettering function in the accounting ## Export +NotExportLettering=Do not export the lettering when generating the file NotifiedExportDate=Flag exported lines as Exported (to modify a line, you will need to delete the whole transaction and re-transfert it into accounting) -NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "Closure" feature, modification and deletion of the lines will DEFINITELY not be possible) +NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible) DateValidationAndLock=Date validation and lock ConfirmExportFile=Confirmation of the generation of the accounting export file ? ExportDraftJournal=Export draft journal @@ -399,7 +407,11 @@ Calculated=Calculated Formula=Formula ## Reconcile +LetteringAuto=Reconcile auto +LetteringManual=Reconcile manual Unlettering=Unreconcile +UnletteringAuto=Unreconcile auto +UnletteringManual=Unreconcile manual AccountancyNoLetteringModified=No reconcile modified AccountancyOneLetteringModifiedSuccessfully=One reconcile successfully modified AccountancyLetteringModifiedSuccessfully=%s reconcile successfully modified @@ -408,8 +420,9 @@ AccountancyOneUnletteringModifiedSuccessfully=One unreconcile successfully modif AccountancyUnletteringModifiedSuccessfully=%s unreconcile successfully modified ## Confirm box -ConfirmMassUnlettering=Bulk Unreconcile confirmation -ConfirmMassUnletteringQuestion=Are you sure you want to Unreconcile the %s selected record(s)? +ConfirmMassUnletteringAuto=Bulk auto unreconcile confirmation +ConfirmMassUnletteringManual=Bulk manual unreconcile confirmation +ConfirmMassUnletteringQuestion=Are you sure you want to unreconcile the %s selected record(s)? ConfirmMassDeleteBookkeepingWriting=Bulk Delete confirmation ConfirmMassDeleteBookkeepingWritingQuestion=This will delete the transaction from the accounting (all lines related to the same transaction will be deleted) Are you sure you want to delete the %s selected record(s)? @@ -455,6 +468,5 @@ FECFormatMulticurrencyCode=Multicurrency code (Idevise) DateExport=Date export WarningReportNotReliable=Warning, this report is not based on the Ledger, so does not contains transaction modified manually in the Ledger. If your journalization is up to date, the bookkeeping view is more accurate. ExpenseReportJournal=Expense Report Journal -InventoryJournal=Inventory Journal NAccounts=%s accounts diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f53323759d8..f5698ef5f29 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -51,8 +51,6 @@ ClientSortingCharset=Client collation WarningModuleNotActive=Module %s must be enabled WarningOnlyPermissionOfActivatedModules=Only permissions related to activated modules are shown here. You can activate other modules in the Home->Setup->Modules page. DolibarrSetup=Dolibarr install or upgrade -InternalUser=Internal user -ExternalUser=External user InternalUsers=Internal users ExternalUsers=External users UserInterface=User interface @@ -440,8 +438,10 @@ Unique=Unique Boolean=Boolean (one checkbox) ExtrafieldPhone = Phone ExtrafieldPrice = Price +ExtrafieldPriceWithCurrency=Price with currency ExtrafieldMail = Email ExtrafieldUrl = Url +ExtrafieldIP = IP ExtrafieldSelect = Select list ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator (not a field) @@ -478,7 +478,7 @@ InstalledInto=Installed into directory %s BarcodeInitForThirdparties=Mass barcode init for third-parties BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services CurrentlyNWithoutBarCode=Currently, you have %s record on %s %s without barcode defined. -InitEmptyBarCode=Init value for next %s empty records +InitEmptyBarCode=Init value for the %s empty barcodes EraseAllCurrentBarCode=Erase all current barcode values ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values? AllBarcodeReset=All barcode values have been removed @@ -502,7 +502,8 @@ WarningPHPMail=WARNING: The setup to send emails from the application is using t WarningPHPMailA=- Using the server of the Email Service Provider increases the trustability of your email, so it increases the deliverablity without being flagged as SPAM WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted for delivery (be careful also of your email provider's sending quota). WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox. -WarningPHPMailD=Also, it is therefore recommended to change the sending method of e-mails to the value "SMTP". If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by setting the MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP constant to 1 in Home - Setup - Other. +WarningPHPMailD=It is therefore recommended to change the sending method of e-mails to the value "SMTP". +WarningPHPMailDbis=If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by %sclicking here%s. WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s. WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: %s. ActualMailSPFRecordFound=Actual SPF record found (for email %s) : %s @@ -515,7 +516,7 @@ PageUrlForDefaultValuesCreate=
    Example:
    For the form to create a new third PageUrlForDefaultValuesList=
    Example:
    For the page that lists third parties, it is %s.
    For URL of external modules installed into custom directory, do not include the "custom/" so use a path like mymodule/mypagelist.php and not custom/mymodule/mypagelist.php.
    If you want default value only if url has some parameter, you can use %s AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) EnableDefaultValues=Enable customization of default values -EnableOverwriteTranslation=Enable usage of overwritten translation +EnableOverwriteTranslation=Allow customization of translations GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. WarningSettingSortOrder=Warning, setting a default sort order may result in a technical error when going on the list page if field is an unknown field. If you experience such an error, come back to this page to remove the default sort order and restore default behavior. Field=Field @@ -646,9 +647,9 @@ Module2400Name=Events/Agenda Module2400Desc=Track events. Log automatic events for tracking purposes or record manual events or meetings. This is the principal module for good Customer or Vendor Relationship Management. Module2500Name=DMS / ECM Module2500Desc=Document Management System / Electronic Content Management. Automatic organization of your generated or stored documents. Share them when you need. -Module2600Name=API/Web services (SOAP server) +Module2600Name=API / Web services (SOAP server) Module2600Desc=Enable the Dolibarr SOAP server providing API services -Module2610Name=API/Web services (REST server) +Module2610Name=API / Web services (REST server) Module2610Desc=Enable the Dolibarr REST server providing API services Module2660Name=Call WebServices (SOAP client) Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Only Purchase orders are currently supported.) @@ -699,6 +700,7 @@ Module62000Name=Incoterms Module62000Desc=Add features to manage Incoterms Module63000Name=Resources Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events +Module94160Name=Receptions Permission11=Read customer invoices Permission12=Create/modify customer invoices Permission13=Invalidate customer invoices @@ -715,6 +717,7 @@ Permission27=Delete commercial proposals Permission28=Export commercial proposals Permission31=Read products Permission32=Create/modify products +Permission33=Read prices products Permission34=Delete products Permission36=See/manage hidden products Permission38=Export products @@ -740,6 +743,7 @@ Permission79=Create/modify subscriptions Permission81=Read customers orders Permission82=Create/modify customers orders Permission84=Validate customers orders +Permission85=Generate the documents sales orders Permission86=Send customers orders Permission87=Close customers orders Permission88=Cancel customers orders @@ -841,9 +845,9 @@ Permission286=Export contacts Permission291=Read tariffs Permission292=Set permissions on the tariffs Permission293=Modify customer's tariffs -Permission300=Read barcodes -Permission301=Create/modify barcodes -Permission302=Delete barcodes +Permission301=Generate PDF sheets of barcodes +Permission304=Create/modify barcodes +Permission305=Delete barcodes Permission311=Read services Permission312=Assign service/subscription to contract Permission331=Read bookmarks @@ -875,6 +879,7 @@ Permission525=Access loan calculator Permission527=Export loans Permission531=Read services Permission532=Create/modify services +Permission533=Read prices services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services @@ -898,7 +903,7 @@ Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations Permission771=Read expense reports (yours and your subordinates) -Permission772=Create/modify expense reports (for you and your subordinates) +Permission772=Create/modify expense reports (for you and your subordinates) Permission773=Delete expense reports Permission775=Approve expense reports Permission776=Pay expense reports @@ -1080,6 +1085,10 @@ DictionaryAssetDisposalType=Type of disposal of assets TypeOfUnit=Type of unit SetupSaved=Setup saved SetupNotSaved=Setup not saved +OAuthServiceConfirmDeleteTitle=Delete OAuth entry +OAuthServiceConfirmDeleteMessage=Are you sure you want to delete this OAuth entry ? All existing tokens for it will also be deleted. +ErrorInEntryDeletion=Error in entry deletion +EntryDeleted=Entry deleted BackToModuleList=Back to Module list BackToDictionaryList=Back to Dictionaries list TypeOfRevenueStamp=Type of tax stamp @@ -1237,11 +1246,13 @@ BrowserName=Browser name BrowserOS=Browser OS ListOfSecurityEvents=List of Dolibarr security events SecurityEventsPurged=Security events purged +TrackableSecurityEvents=Trackable security events LogEventDesc=Enable logging for specific security events. Administrators the log via menu %s - %s. Warning, this feature can generate a large amount of data in the database. AreaForAdminOnly=Setup parameters can be set by administrator users only. SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. +MoreNetworksAvailableWithModule=More social networks may be available by enabling the module "Social networks". AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and presentation of the application can be modified here. @@ -1378,7 +1389,7 @@ GetBarCode=Get barcode NumberingModules=Numbering models DocumentModules=Document models ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters. PasswordGenerationNone=Do not suggest a generated password. Password must be typed in manually. PasswordGenerationPerso=Return a password according to your personally defined configuration. SetupPerso=According to your configuration @@ -1478,7 +1489,7 @@ AdherentLoginRequired= Manage a Login for each member AdherentMailRequired=Email required to create a new member MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default MemberCreateAnExternalUserForSubscriptionValidated=Create an external user login for each new member subscription validated -VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes +VisitorCanChooseItsPaymentMode=Visitor can choose from any available payment modes MEMBER_REMINDER_EMAIL=Enable automatic reminder by email of expired subscriptions. Note: Module %s must be enabled and correctly setup to send reminders. MembersDocModules=Document templates for documents generated from member record ##### LDAP setup ##### @@ -1740,8 +1751,8 @@ ActivateFCKeditor=Activate advanced editor for: FCKeditorForNotePublic=WYSIWIG creation/edition of the field "public notes" of elements FCKeditorForNotePrivate=WYSIWIG creation/edition of the field "private notes" of elements FCKeditorForCompany=WYSIWIG creation/edition of the field description of elements (except products/services) -FCKeditorForProduct=WYSIWIG creation/edition of the field description of products/services -FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files. +FCKeditorForProductDetails=WYSIWIG creation/edition of products description or lines for objects (lines of proposals, orders, invoices, etc...). +FCKeditorForProductDetails2=Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files. FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing) FCKeditorForUserSignature=WYSIWIG creation/edition of user signature FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) @@ -1764,7 +1775,7 @@ DetailMenuHandler=Menu handler where to show new menu DetailMenuModule=Module name if menu entry come from a module DetailType=Type of menu (top or left) DetailTitre=Menu label or label code for translation -DetailUrl=URL where menu send you (Absolute URL link or external link with http://) +DetailUrl=URL where menu send you (Relative URL link or external link with https://) DetailEnabled=Condition to show or not entry DetailRight=Condition to display unauthorized grey menus DetailLangs=Lang file name for label code translation @@ -1835,7 +1846,7 @@ StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatib CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sale from Point of Sale. Hence a warehouse is required. CashDeskForceDecreaseStockLabel=Stock decrease for batch products was forced. CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates. -CashDeskReaderKeyCodeForEnter=Key code for "Enter" defined in barcode reader (Example: 13) +CashDeskReaderKeyCodeForEnter=Key ASCII code for "Enter" defined in barcode reader (Example: 13) ##### Bookmark ##### BookmarkSetup=Bookmark module setup BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or external web sites on your left menu. @@ -1873,7 +1884,7 @@ SuppliersInvoiceNumberingModel=Vendor invoices numbering models IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=GeoIP Maxmind module setup -PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.
    Examples:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoLite2-Country.mmdb +PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions). YouCanDownloadFreeDatFileTo=You can download a free demo version of the Maxmind GeoIP country file at %s. YouCanDownloadAdvancedDatFileTo=You can also download a more complete version, with updates, of the Maxmind GeoIP country file at %s. @@ -1924,6 +1935,7 @@ BackupDumpWizard=Wizard to build the database dump file BackupZipWizard=Wizard to build the archive of documents directory SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform. +InstallModuleFromWebHasBeenDisabledContactUs=Install or development of external modules or dynamic websites, from the application, is currently locked for security purpose. Please contact us if you need to enable this feature. InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to add the 2 directive lines:
    $dolibarr_main_url_root_alt='/custom';
    $dolibarr_main_document_root_alt='%s/custom'; HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over @@ -2033,6 +2045,7 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF +DOC_SHOW_FIRST_SALES_REP=Show first sales representative MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame @@ -2050,6 +2063,8 @@ RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX) COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed +RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers +RemoveSpecialWordsHelp=Specify the words to be cleaned before calculating the customer or supplier account. Use a ";" between each word GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact) GDPRContactDesc=If you store personal data in your Information System, you can name the contact who is responsible for the General Data Protection Regulation here HelpOnTooltip=Help text to show on tooltip @@ -2066,11 +2081,18 @@ EmailCollectors=Email collectors EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector EMailHost=Host of email IMAP server +EMailHostPort=Port of email IMAP server +loginPassword=Login/Password +oauthToken=Oauth2 token +accessType=Acces type +oauthService=Oauth service +TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail). MailboxSourceDirectory=Mailbox source directory MailboxTargetDirectory=Mailbox target directory EmailcollectorOperations=Operations to do by collector EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Max number of emails collected per collect +TestCollectNow=Test collect CollectNow=Collect now ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s? DateLastCollectResult=Date of latest collect try @@ -2109,7 +2131,7 @@ CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree -OperationParamDesc=Define the rules to use to extract or set values.
    Example for operations that need to extract a name from email subject:
    name=EXTRACT:SUBJECT:Message from company ([^\n]*)
    Example for operations that create objects:
    objproperty1=SET:the value to set
    objproperty2=SET:a value including value of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. +OperationParamDesc=Define the rules to use to extract some data or set values to use for operation.

    Example to extract a company name from email subject into a temporary variable:
    tmp_var=EXTRACT:SUBJECT:Message from company ([^\n]*)

    Examples to set the properties of an object to create:
    objproperty1=SET:a hard coded value
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:a value (value is set only if property is not already defined)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. OpeningHours=Opening hours OpeningHoursDesc=Enter here the regular opening hours of your company. ResourceSetup=Configuration of Resource module @@ -2172,8 +2194,9 @@ EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax PDF_SHOW_PROJECT=Show project on document ShowProjectLabel=Project Label PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME=Include alias in thirdparty name -THIRDPARTY_ALIAS=Name thirdparty - Alias thirdparty +THIRDPARTY_ALIAS=Name thirdparty - Alias thirdparty ALIAS_THIRDPARTY=Alias thirdparty - Name thirdparty +PDFIn2Languages=Show labels into PDF in 2 different languages PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. PDF_USE_A=Gererate PDF documents with format PDF/A instead of defaut format PDF FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. @@ -2215,6 +2238,7 @@ NoExternalModuleWithUpdate=No updates found for external modules SwaggerDescriptionFile=Swagger API description file (for use with redoc for example) YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead. RandomlySelectedIfSeveral=Randomly selected if several pictures are available +SalesRepresentativeInfo=For Proposals, Orders, Invoices. DatabasePasswordObfuscated=Database password is obfuscated in conf file DatabasePasswordNotObfuscated=Database password is NOT obfuscated in conf file APIsAreNotEnabled=APIs modules are not enabled @@ -2254,7 +2278,7 @@ LateWarningAfter="Late" warning after TemplateforBusinessCards=Template for a business card in different size InventorySetup= Inventory Setup ExportUseLowMemoryMode=Use a low memory mode -ExportUseLowMemoryModeHelp=Use the low memory mode to execute the exec of the dump (compression is done through a pipe instead of into the PHP memory). This method does not allow to check that file is completed and error message can't be reported if it fails. +ExportUseLowMemoryModeHelp=Use the low memory mode to generate the dump file (compression is done through a pipe instead of into the PHP memory). This method does not allow to check that the file is complete and error message can't be reported if it fails. Use it if you experience not enough memory errors. ModuleWebhookName = Webhook ModuleWebhookDesc = Interface to catch dolibarr triggers and send it to an URL @@ -2278,7 +2302,49 @@ IconOnly=Icon only - Text on tooltip only INVOICE_ADD_ZATCA_QR_CODE=Show the ZATCA QR code on invoices INVOICE_ADD_ZATCA_QR_CODEMore=Some Arabic countries need this QR Code on their invoices INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices +INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address +INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory mention for France UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. IfThisCategoryIsChildOfAnother=If this category is a child of another one +DarkThemeMode=Dark theme mode +AlwaysDisabled=Always disabled +AccordingToBrowser=According to browser +AlwaysEnabled=Always Enabled +DoesNotWorkWithAllThemes=Will not work with all themes NoName=No name -CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is: +ShowAdvancedOptions= Show advanced options +HideAdvancedoptions= Hide advanced options +CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is: +OauthNotAvailableForAllAndHadToBeCreatedBefore=OAUTH2 authentication is not available for all hosts, and a token with the right permissions must have been created upstream with the OAUTH module +MAIN_MAIL_SMTPS_OAUTH_SERVICE=OAUTH2 authentication service +DontForgetCreateTokenOauthMod=A token with the right permissions must have been created upstream with the OAUTH module +MAIN_MAIL_SMTPS_AUTH_TYPE=Authentification method +UsePassword=Use a password +UseOauth=Use a OAUTH token +Images=Images +MaxNumberOfImagesInGetPost=Max number of images allowed in a HTML field submitted in a form +MaxNumberOfPostOnPublicPagesByIP=Max number of posts on public pages with the same IP address in a month +CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is: +ScriptIsEmpty=The script is empty +ShowHideTheNRequests=Show/hide the %s SQL request(s) +DefinedAPathForAntivirusCommandIntoSetup=Define a path for an antivirus program into %s +TriggerCodes=Triggerable events +TriggerCodeInfo=Enter here the trigger code(s) that must generate a post of a web request (only external URL are allowed). You can enter several trigger codes separated by a comma. +EditableWhenDraftOnly=If unchecked, the value can only be modified when object has a draft status +CssOnEdit=Css on edit pages +CssOnView=Css on view pages +CssOnList=Css on list pages +HelpCssOnEditDesc=The Css used when editing the field.
    Example: "minwiwdth100 maxwidth500 widthcentpercentminusx" +HelpCssOnViewDesc=The Css used when viewing the field. +HelpCssOnListDesc=The Css used when field is inside a list table.
    Example: "tdoverflowmax200" +RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions +MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions +WarningDisabled=Warning disabled +LimitsAndMitigation=Access limits and mitigation +DesktopsOnly=Desktops only +DesktopsAndSmartphones=Desktops et smartphones +AllowOnlineSign=Allow online signing +AllowExternalDownload=Allow external download (without login, using a shared link) +DeadlineDayVATSubmission=Deadline day for vat submission on the next month +MaxNumberOfAttachementOnForms=Max number of joinded files in a form +IfDefinedUseAValueBeetween=If defined, use a value between %s and %s diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 272ec22df5c..2016172c381 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -57,6 +57,7 @@ MemberValidatedInDolibarr=Member %s validated MemberModifiedInDolibarr=Member %s modified MemberResiliatedInDolibarr=Member %s terminated MemberDeletedInDolibarr=Member %s deleted +MemberExcludedInDolibarr=Member %s excluded MemberSubscriptionAddedInDolibarr=Subscription %s for member %s added MemberSubscriptionModifiedInDolibarr=Subscription %s for member %s modified MemberSubscriptionDeletedInDolibarr=Subscription %s for member %s deleted @@ -67,6 +68,7 @@ ShipmentBackToDraftInDolibarr=Shipment %s go back to draft status ShipmentDeletedInDolibarr=Shipment %s deleted ShipmentCanceledInDolibarr=Shipment %s canceled ReceptionValidatedInDolibarr=Reception %s validated +ReceptionDeletedInDolibarr=Reception %s deleted ReceptionClassifyClosedInDolibarr=Reception %s classified closed OrderCreatedInDolibarr=Order %s created OrderValidatedInDolibarr=Order %s validated @@ -86,6 +88,7 @@ SupplierInvoiceSentByEMail=Vendor invoice %s sent by email ShippingSentByEMail=Shipment %s sent by email ShippingValidated= Shipment %s validated InterventionSentByEMail=Intervention %s sent by email +ProjectSentByEMail=Project %s sent by email ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted @@ -135,7 +138,7 @@ AgendaUrlOptionsNotAdmin=logina=!%s to restrict output to actions not own AgendaUrlOptions4=logint=%s to restrict output to actions assigned to user %s (owner and others). AgendaUrlOptionsProject=project=__PROJECT_ID__ to restrict output to actions linked to project __PROJECT_ID__. AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto to exclude automatic events. -AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays. +AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays. AgendaShowBirthdayEvents=Birthdays of contacts AgendaHideBirthdayEvents=Hide birthdays of contacts Busy=Busy @@ -159,6 +162,7 @@ DateActionBegin=Start event date ConfirmCloneEvent=Are you sure you want to clone the event %s? RepeatEvent=Repeat event OnceOnly=Once only +EveryDay=Every day EveryWeek=Every week EveryMonth=Every month DayOfMonth=Day of month @@ -174,3 +178,4 @@ AddReminder=Create an automatic reminder notification for this event ErrorReminderActionCommCreation=Error creating the reminder notification for this event BrowserPush=Browser Popup Notification ActiveByDefault=Enabled by default +Until=until diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 22ca3f4cec1..d7c29a82399 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -13,10 +13,12 @@ BillsStatistics=Customers invoices statistics BillsStatisticsSuppliers=Vendors invoices statistics DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. +DisabledBecauseNotLastSituationInvoice=Disabled because invoice is not erasable. This invoice is not the last one in situation invoice cycle. DisabledBecauseNotErasable=Disabled because cannot be erased InvoiceStandard=Standard invoice InvoiceStandardAsk=Standard invoice InvoiceStandardDesc=This kind of invoice is the common invoice. +InvoiceStandardShort=Standard InvoiceDeposit=Down payment invoice InvoiceDepositAsk=Down payment invoice InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. @@ -24,6 +26,7 @@ InvoiceProForma=Proforma invoice InvoiceProFormaAsk=Proforma invoice InvoiceProFormaDesc=Proforma invoice is an image of a true invoice but has no accountancy value. InvoiceReplacement=Replacement invoice +InvoiceReplacementShort=Replacement InvoiceReplacementAsk=Replacement invoice for invoice InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. InvoiceAvoir=Credit note @@ -159,6 +162,7 @@ ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or ano ErrorInvoiceIsNotLastOfSameType=Error: The date of invoice %s is %s. It must be posterior or equal to last date for same type invoices (%s). Please change the invoice date. BillFrom=From BillTo=To +ShippingTo=Shipping to ActionsOnBill=Actions on invoice RecurringInvoiceTemplate=Template / Recurring invoice NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified for generation. @@ -446,6 +450,7 @@ ErrorPaymentConditionsNotEligibleToDepositCreation=The chose payment conditions PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer PaymentTypePRE=Direct debit payment order +PaymentTypePREdetails=(on account *-%s) PaymentTypeShortPRE=Debit payment order PaymentTypeLIQ=Cash PaymentTypeShortLIQ=Cash @@ -620,4 +625,5 @@ NoPaymentAvailable=No payment available for %s PaymentRegisteredAndInvoiceSetToPaid=Payment registered and invoice %s set to paid SendEmailsRemindersOnInvoiceDueDate=Send reminder by email for unpaid invoices MakePaymentAndClassifyPayed=Record payment -BulkPaymentNotPossibleForInvoice=Bulk payment is not possible for invoice %s (bad type or status) \ No newline at end of file +BulkPaymentNotPossibleForInvoice=Bulk payment is not possible for invoice %s (bad type or status) +MentionVATDebitOptionIsOn=Option to pay tax based on debits diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index a1046827559..9fdef53260f 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -14,28 +14,6 @@ OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to prev AddedByAuthority=Stored into remote authority NotAddedByAuthorityYet=Not yet stored into remote authority ShowDetails=Show stored details -logPAYMENT_VARIOUS_CREATE=Payment (not assigned to an invoice) created -logPAYMENT_VARIOUS_MODIFY=Payment (not assigned to an invoice) modified -logPAYMENT_VARIOUS_DELETE=Payment (not assigned to an invoice) logical deletion -logPAYMENT_ADD_TO_BANK=Payment added to bank -logPAYMENT_CUSTOMER_CREATE=Customer payment created -logPAYMENT_CUSTOMER_DELETE=Customer payment logical deletion -logDONATION_PAYMENT_CREATE=Donation payment created -logDONATION_PAYMENT_DELETE=Donation payment logical deletion -logBILL_PAYED=Customer invoice paid -logBILL_UNPAYED=Customer invoice set unpaid -logBILL_VALIDATE=Customer invoice validated -logBILL_SENTBYMAIL=Customer invoice send by mail -logBILL_DELETE=Customer invoice logically deleted -logMODULE_RESET=Module BlockedLog was disabled -logMODULE_SET=Module BlockedLog was enabled -logDON_VALIDATE=Donation validated -logDON_MODIFY=Donation modified -logDON_DELETE=Donation logical deletion -logMEMBER_SUBSCRIPTION_CREATE=Member subscription created -logMEMBER_SUBSCRIPTION_MODIFY=Member subscription modified -logMEMBER_SUBSCRIPTION_DELETE=Member subscription logical deletion -logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details @@ -54,4 +32,30 @@ TooManyRecordToScanRestrictFilters=Too many records to scan/analyze. Please rest RestrictYearToExport=Restrict month / year to export BlockedLogEnabled=System to track events into unalterable logs has been enabled BlockedLogDisabled=System to track events into unalterable logs has been disabled after some recording were done. We saved a special Fingerprint to track the chain as broken -BlockedLogDisabledBis=System to track events into unalterable logs has been disabled. This is possible because no record were done yet. \ No newline at end of file +BlockedLogDisabledBis=System to track events into unalterable logs has been disabled. This is possible because no record were done yet. + +## logTypes +logBILL_DELETE=Customer invoice logically deleted +logBILL_PAYED=Customer invoice paid +logBILL_SENTBYMAIL=Customer invoice send by mail +logBILL_UNPAYED=Customer invoice set unpaid +logBILL_VALIDATE=Customer invoice validated +logCASHCONTROL_VALIDATE=Cash desk closing recording +logDOC_DOWNLOAD=Download of a validated document in order to print or send +logDOC_PREVIEW=Preview of a validated document in order to print or download +logDONATION_PAYMENT_CREATE=Donation payment created +logDONATION_PAYMENT_DELETE=Donation payment logical deletion +logDON_DELETE=Donation logical deletion +logDON_MODIFY=Donation modified +logDON_VALIDATE=Donation validated +logMEMBER_SUBSCRIPTION_CREATE=Member subscription created +logMEMBER_SUBSCRIPTION_DELETE=Member subscription logical deletion +logMEMBER_SUBSCRIPTION_MODIFY=Member subscription modified +logMODULE_RESET=Module BlockedLog was disabled +logMODULE_SET=Module BlockedLog was enabled +logPAYMENT_ADD_TO_BANK=Payment added to bank +logPAYMENT_CUSTOMER_CREATE=Customer payment created +logPAYMENT_CUSTOMER_DELETE=Customer payment logical deletion +logPAYMENT_VARIOUS_CREATE=Payment (not assigned to an invoice) created +logPAYMENT_VARIOUS_DELETE=Payment (not assigned to an invoice) logical deletion +logPAYMENT_VARIOUS_MODIFY=Payment (not assigned to an invoice) modified diff --git a/htdocs/langs/en_US/bookmarks.lang b/htdocs/langs/en_US/bookmarks.lang index be0f2f7e25d..26551eee4f0 100644 --- a/htdocs/langs/en_US/bookmarks.lang +++ b/htdocs/langs/en_US/bookmarks.lang @@ -20,3 +20,4 @@ ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if the linked page should BookmarksManagement=Bookmarks management BookmarksMenuShortCut=Ctrl + shift + m NoBookmarks=No bookmarks defined +NoBookmarkFound=No bookmark found \ No newline at end of file diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 2ace1eb97e1..0ac1ecce545 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -44,8 +44,10 @@ BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified BoxMyLastBookmarks=Bookmarks: latest %s BoxOldestExpiredServices=Oldest active expired services +BoxOldestActions=Oldest events to do BoxLastExpiredServices=Latest %s oldest contacts with active expired services BoxTitleLastActionsToDo=Latest %s actions to do +BoxTitleOldestActionsToDo=Oldest %s events to do, not completed BoxTitleLastContracts=Latest %s contracts which were modified BoxTitleLastModifiedDonations=Latest %s donations which were modified BoxTitleLastModifiedExpenses=Latest %s expense reports which were modified diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index b53eb235c29..9cde66460d3 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -59,7 +59,7 @@ BillsCoinsPad=Coins and banknotes Pad DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr TakeposNeedsCategories=TakePOS needs at least one product categorie to work TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work -OrderNotes=Can add some notes to each ordered items +OrderNotes=Can add some notes to each ordered items CashDeskBankAccountFor=Default account to use for payments in NoPaimementModesDefined=No paiment mode defined in TakePOS configuration TicketVatGrouped=Group VAT by rate in tickets|receipts @@ -118,7 +118,7 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines of images to show +NumberOfLinesToShow=Number of lines of images to show DefineTablePlan=Define tables plan GiftReceiptButton=Add a "Gift receipt" button GiftReceipt=Gift receipt @@ -136,4 +136,12 @@ PrintWithoutDetails=Print without details YearNotDefined=Year is not defined TakeposBarcodeRuleToInsertProduct=Barcode rule to insert product TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.
    If empty (default value), application will use the full barcode scanned to find the product.

    If defined, syntax must be:
    ref:NB+qu:NB+qd:NB+other:NB
    where NB is the number of characters to use to extract data from the scanned barcode with:
    • ref : product reference
    • qu : quantity to set when inserting item (units)
    • qd : quantity to set when inserting item (decimals)
    • other : others characters
    -AlreadyPrinted=Already printed \ No newline at end of file +AlreadyPrinted=Already printed +HideCategories=Hide categories +HideStockOnLine=Hide stock on line +ShowOnlyProductInStock=Show the products in stock +ShowCategoryDescription=Show category description +ShowProductReference=Show reference of products +UsePriceHT=Use price excl. taxes and not price incl. taxes +TerminalName=Terminal %s +TerminalNameDesc=Terminal name diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index af816e362e4..0493968798e 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -42,6 +42,7 @@ MemberHasNoCategory=This member is not in any tags/categories ContactHasNoCategory=This contact is not in any tags/categories ProjectHasNoCategory=This project is not in any tags/categories ClassifyInCategory=Add to tag/category +RemoveCategory=Remove category NotCategorized=Without tag/category CategoryExistsAtSameLevel=This category already exists with this ref ContentsVisibleByAllShort=Contents visible by all @@ -87,7 +88,7 @@ DeleteFromCat=Remove from tags/category ExtraFieldsCategories=Complementary attributes CategoriesSetup=Tags/categories setup CategorieRecursiv=Link with parent tag/category automatically -CategorieRecursivHelp=If option is on, when you add a product into a subcategory, product will also be added into the parent category. +CategorieRecursivHelp=If option is on, when you add an object into a subcategory, the object will also be added into the parent categories. AddProductServiceIntoCategory=Add the following product/service AddCustomerIntoCategory=Assign category to customer AddSupplierIntoCategory=Assign category to supplier diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index 21d282cd794..eba95a8aabb 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -74,8 +74,16 @@ StatusProsp=Prospect status DraftPropals=Draft commercial proposals NoLimit=No limit ToOfferALinkForOnlineSignature=Link for online signature -WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s -ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal -ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse +WelcomeOnOnlineSignaturePageProposal=Welcome to the page to accept commercial proposals from %s +WelcomeOnOnlineSignaturePageContract=Welcome to %s Contract PDF Signing Page +WelcomeOnOnlineSignaturePageFichinter=Welcome to %s Intervention PDF Signing Page +ThisScreenAllowsYouToSignDocFromProposal=This screen allow you to accept and sign, or refuse, a quote/commercial proposal +ThisScreenAllowsYouToSignDocFromContract=This screen allow you to sign contract on PDF format online. +ThisScreenAllowsYouToSignDocFromFichinter=This screen allow you to sign intervention on PDF format online. +ThisIsInformationOnDocumentToSignProposal=This is information on document to accept or refuse +ThisIsInformationOnDocumentToSignContract=This is information on contract to sign +ThisIsInformationOnDocumentToSignFichinter=This is information on intervention to sign SignatureProposalRef=Signature of quote/commercial proposal %s +SignatureContractRef=Signature of contract %s +SignatureFichinterRef=Signature of intervention %s FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 71b16f24506..e022c7cb09f 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -313,11 +313,11 @@ CustomerAbsoluteDiscountShort=Absolute discount CompanyHasRelativeDiscount=This customer has a default discount of %s%% CompanyHasNoRelativeDiscount=This customer has no relative discount by default HasRelativeDiscountFromSupplier=You have a default discount of %s%% from this vendor -HasNoRelativeDiscountFromSupplier=You have no default relative discount from this vendor +HasNoRelativeDiscountFromSupplier=No default relative discount from this vendor CompanyHasAbsoluteDiscount=This customer has discounts available (credits notes or down payments) for %s %s CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for %s %s CompanyHasCreditNote=This customer still has credit notes for %s %s -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor +HasNoAbsoluteDiscountFromSupplier=No discount/credit available from this vendor HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for %s %s from this vendor HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for %s %s from this vendor HasCreditNoteFromSupplier=You have credit notes for %s %s from this vendor @@ -444,7 +444,7 @@ AddAddress=Add address SupplierCategory=Vendor category JuridicalStatus200=Independent DeleteFile=Delete file -ConfirmDeleteFile=Are you sure you want to delete this file? +ConfirmDeleteFile=Are you sure you want to delete this file %s? AllocateCommercial=Assigned to sales representative Organization=Organization FiscalYearInformation=Fiscal Year @@ -498,3 +498,5 @@ RestOfEurope=Rest of Europe (EEC) OutOfEurope=Out of Europe (EEC) CurrentOutstandingBillLate=Current outstanding bill late BecarefullChangeThirdpartyBeforeAddProductToInvoice=Be carefull, depending on your product price settings, you should change thirdparty before adding product to POS. +EmailAlreadyExistsPleaseRewriteYourCompanyName=email already exists please rewrite your company name +TwoRecordsOfCompanyName=more than one record exists for this company please contact us to complete your partnership request" \ No newline at end of file diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 82ef7f0be9a..b3d5f675830 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -29,6 +29,8 @@ BalanceBefore=Balance (before) Balance=Balance Debit=Debit Credit=Credit +AccountingDebit=Debit +AccountingCredit=Credit Piece=Accounting Doc. AmountHTVATRealReceived=Net collected AmountHTVATRealPaid=Net paid @@ -244,12 +246,12 @@ TurnoverPerProductInCommitmentAccountingNotRelevant=The report of Turnover colle TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=The report of Turnover collected per sale tax rate is not available. This report is only available for turnover invoiced. CalculationMode=Calculation mode AccountancyJournal=Accounting code journal -ACCOUNTING_VAT_SOLD_ACCOUNT=Accounting account by default for VAT on sales (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_BUY_ACCOUNT=Accounting account by default for VAT on purchases (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_PAY_ACCOUNT=Accounting account by default for paying VAT -ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account used for customer third parties +ACCOUNTING_VAT_SOLD_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for VAT on sales (used if not defined on VAT dictionary setup) +ACCOUNTING_VAT_BUY_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for VAT on purchases (used if not defined on VAT dictionary setup) +ACCOUNTING_VAT_PAY_ACCOUNT=Account (from the Chart Of Account) to be used as the default account for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Account (from the Chart Of Account) used for "customer" third parties ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated customer accounting account on third party is not defined. -ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account used for vendor third parties +ACCOUNTING_ACCOUNT_SUPPLIER=Account (from the Chart of Account) used for the "vendor" third parties ACCOUNTING_ACCOUNT_SUPPLIER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated vendor accounting account on third party is not defined. ConfirmCloneTax=Confirm the clone of a social/fiscal tax ConfirmCloneVAT=Confirm the clone of a VAT declaration diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 9705f8823b0..19572c361ad 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -26,7 +26,7 @@ CronCommand=Command CronList=Scheduled jobs CronDelete=Delete scheduled jobs CronConfirmDelete=Are you sure you want to delete these scheduled jobs? -CronExecute=Launch scheduled job +CronExecute=Launch now CronConfirmExecute=Are you sure you want to execute these scheduled jobs now? CronInfo=Scheduled job module allows to schedule jobs to execute them automatically. Jobs can also be started manually. CronTask=Job @@ -58,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Schedule +CronStatusActiveBtn=Enable scheduling CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled (not scheduled) CronId=Id @@ -84,10 +84,17 @@ MakeLocalDatabaseDumpShort=Local database backup MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep MakeSendLocalDatabaseDumpShort=Send local database backup MakeSendLocalDatabaseDump=Send local database backup by email. Parameters are: to, from, subject, message, filename (Name of file sent), filter ('sql' for backup of database only) +BackupIsTooLargeSend=Sorry, last backup file is too large to be send by email +CleanUnfinishedCronjobShort=Clean unfinished cronjob +CleanUnfinishedCronjob=Clean cronjob stuck in processing when the process is no longer running WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run. DATAPOLICYJob=Data cleaner and anonymizer JobXMustBeEnabled=Job %s must be enabled +EmailIfError=Email for warning on error +ErrorInBatch=Error when running the job %s + # Cron Boxes LastExecutedScheduledJob=Last executed scheduled job NextScheduledJobExecute=Next scheduled job to execute NumberScheduledJobError=Number of scheduled jobs in error +NumberScheduledJobNeverFinished=Number of scheduled jobs never finished diff --git a/htdocs/datapolicy/langs/en_US/datapolicy.lang b/htdocs/langs/en_US/datapolicy.lang similarity index 100% rename from htdocs/datapolicy/langs/en_US/datapolicy.lang rename to htdocs/langs/en_US/datapolicy.lang diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index 494a6c55164..5ced4ec5617 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -5,6 +5,7 @@ ECMSectionManual=Manual directory ECMSectionAuto=Automatic directory ECMSectionsManual=Manual tree ECMSectionsAuto=Automatic tree +ECMSectionsMedias=Medias tree ECMSections=Directories ECMRoot=ECM Root ECMNewSection=New directory @@ -16,7 +17,9 @@ ECMNbOfFilesInSubDir=Number of files in sub-directories ECMCreationUser=Creator ECMArea=DMS/ECM area ECMAreaDesc=The DMS/ECM (Document Management System / Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. -ECMAreaDesc2=* Automatic directories are filled automatically when adding documents from card of an element.
    * Manual directories can be used to save documents not linked to a particular element. +ECMAreaDesc2a=* Manual directories can be used to save documents not linked to a particular element. +ECMAreaDesc2b=* Automatic directories are filled automatically when adding documents from the page of an element. +ECMAreaDesc3=* Medias directories are files into the subdirectory /medias of documents directory, readable by everybody with no need to be logged and no need to have the file shared explicitely. It is used to store image files from emailing or website module. ECMSectionWasRemoved=Directory %s has been deleted. ECMSectionWasCreated=Directory %s has been created. ECMSearchByKeywords=Search by keywords diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 3e2f4aa44d3..b3eeae4606b 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -49,6 +49,7 @@ ErrorBadImageFormat=Image file has not a supported format (Your PHP does not sup ErrorBadDateFormat=Value '%s' has wrong date format ErrorWrongDate=Date is not correct! ErrorFailedToWriteInDir=Failed to write in directory %s +ErrorFailedToBuildArchive=Failed to build archive file %s ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s) ErrorUserCannotBeDelete=User cannot be deleted. Maybe it is associated to Dolibarr entities. ErrorFieldsRequired=Some required fields have been left blank. @@ -77,7 +78,7 @@ ErrorNoValueForCheckBoxType=Please fill value for checkbox list ErrorNoValueForRadioType=Please fill value for radio list ErrorBadFormatValueList=The list value cannot have more than one comma: %s, but need at least one: key,value ErrorFieldCanNotContainSpecialCharacters=The field %s must not contains special characters. -ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters and cannot contain only numbers. +ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters, and must start with an alphabetical character (a-z) ErrorFieldMustHaveXChar=The field %s must have at least %s characters. ErrorNoAccountancyModuleLoaded=No accountancy module activated ErrorExportDuplicateProfil=This profile name already exists for this export set. @@ -96,10 +97,9 @@ ErrorWrongValueForField=Field %s: '%s' does not match regex rule < ErrorHtmlInjectionForField=Field %s: The value '%s' contains a malicious data not allowed ErrorFieldValueNotIn=Field %s: '%s' is not a value found in field %s of %s ErrorFieldRefNotIn=Field %s: '%s' is not a %s existing ref -ErrorMultipleRecordFoundFromRef=Several record found when searching from ref %s. No way to know which ID to use. +ErrorMultipleRecordFoundFromRef=Several record found when searching from ref %s. No way to know which ID to use. ErrorsOnXLines=%s errors found ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the file (file might be infected by a virus) -ErrorSpecialCharNotAllowedForField=Special characters are not allowed for field "%s" ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module. ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities @@ -244,11 +244,12 @@ ErrorObjectMustHaveStatusActiveToBeDisabled=Objects must have status 'Active' to ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Objects must have status 'Draft' or 'Disabled' to be enabled ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox' into definition of object '%s'. No way to show the combolist. ErrorFieldRequiredForProduct=Field '%s' is required for product %s +AlreadyTooMuchPostOnThisIPAdress=You have already posted too much on this IP address. ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s. ErrorAddAtLeastOneLineFirst=Add at least one line first ErrorRecordAlreadyInAccountingDeletionNotPossible=Error, record is already transferred in accounting, deletion is not possible. ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Error, language is mandatory if you set the page as a translation of another one. -ErrorLanguageOfTranslatedPageIsSameThanThisPage=Error, language of translated page is same than this one. +ErrorLanguageOfTranslatedPageIsSameThanThisPage=Error, language of translated page is same than this one. ErrorBatchNoFoundForProductInWarehouse=No lot/serial found for product "%s" in warehouse "%s". ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this lot/serial for product "%s" in warehouse "%s". ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) @@ -279,13 +280,13 @@ ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. ErrorIsNotADraft=%s is not a draft ErrorExecIdFailed=Can't execute command "id" -ErrorBadCharIntoLoginName=Unauthorized character in the login name -ErrorRequestTooLarge=Error, request too large -ErrorNotApproverForHoliday=You are not the approver for leave %s +ErrorBadCharIntoLoginName=Unauthorized character in the field %s +ErrorRequestTooLarge=Error, request too large or session expired +ErrorNotApproverForHoliday=You are not the approver for leave %s ErrorAttributeIsUsedIntoProduct=This attribute is used in one or more product variants ErrorAttributeValueIsUsedIntoProduct=This attribute value is used in one or more product variants ErrorPaymentInBothCurrency=Error, all amounts must be entered in the same column -ErrorYouTryToPayInvoicesInACurrencyFromBankWithAnotherCurrency=You try to pay invoices in the currency %s from an account with the currency %s +ErrorYouTryToPayInvoicesInACurrencyFromBankWithAnotherCurrency=You try to pay invoices in the currency %s from an account with the currency %s ErrorInvoiceLoadThirdParty=Can't load third-party object for invoice "%s" ErrorInvoiceLoadThirdPartyKey=Third-party key "%s" no set for invoice "%s" ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status @@ -293,9 +294,15 @@ ErrorAjaxRequestFailed=Request failed ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory ErrorFailedToWriteInTempDirectory=Failed to write in temp directory ErrorQuantityIsLimitedTo=Quantity is limited to %s +ErrorFailedToLoadThirdParty=Failed to find/load thirdparty from id=%s, email=%s, name=%s +ErrorThisPaymentModeIsNotSepa=This payment mode is not a bank account +ErrorStripeCustomerNotFoundCreateFirst=Stripe customer is not set for this thirdparty (or set to a value deleted on Stripe side). Create (or re-attach) it first. +ErrorCharPlusNotSupportedByImapForSearch=IMAP search is not able to search into sender or recipient for a string containing the character + +ErrorTableNotFound=Table %s not found ErrorValueForTooLow=Value for %s is too low ErrorValueCantBeNull=Value for %s can't be null ErrorDateOfMovementLowerThanDateOfFileTransmission=The date of the bank transaction can't be lower than the date of the file transmission +ErrorTooMuchFileInForm=Too much files in form, the maximum number is %s file(s) # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -309,7 +316,7 @@ WarningConfFileMustBeReadOnly=Warning, your config file (htdocs/conf/conf.php WarningsOnXLines=Warnings on %s source record(s) WarningNoDocumentModelActivated=No model, for document generation, has been activated. A model will be chosen by default until you check your module setup. WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable the installation/migration tools by adding a file install.lock into directory %s. Omitting the creation of this file is a grave security risk. -WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other Setup). +WarningUntilDirRemoved=This security warning will remain active as long as the vulnerability is present. WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). @@ -331,6 +338,7 @@ WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connec WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead. WarningThemeForcedTo=Warning, theme has been forced to %s by hidden constant MAIN_FORCETHEME +WarningPagesWillBeDeleted=Warning, this will also delete all existing pages/containers of the website. You should export your website before, so you have a backup to re-import it later. WarningAutoValNotPossibleWhenStockIsDecreasedOnInvoiceVal=Automatic validation is disabled when option to decrease stock is set on "Invoice validation". # Validate diff --git a/htdocs/langs/en_US/expensereports.lang b/htdocs/langs/en_US/expensereports.lang index 6a305e43ad7..f3b5f07f241 100644 --- a/htdocs/langs/en_US/expensereports.lang +++ b/htdocs/langs/en_US/expensereports.lang @@ -1,3 +1,160 @@ +# Dolibarr language file - Source file is en_US - expensereports.lang +# copied from trips.lang + +AUTHOR=Recorded by +AUTHORPAIEMENT=Paid by +AddTrip=Create expense report +AllExpenseReport=All type of expense report +AllExpenseReports=All expense reports +AnyOtherInThisListCanValidate=Person to be informed for validating the request. +AttachTheNewLineToTheDocument=Attach the line to an uploaded document +AucuneLigne=There is no expense report declared yet +BrouillonnerTrip=Move back expense report to status "Draft" +byEX_DAY=by day (limitation to %s) +byEX_EXP=by line (limitation to %s) +byEX_MON=by month (limitation to %s) +byEX_YEA=by year (limitation to %s) +CANCEL_USER=Deleted by +CarCategory=Vehicle category +ClassifyRefunded=Classify 'Refunded' +CompanyVisited=Company/organization visited +ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? +ConfirmCancelTrip=Are you sure you want to cancel this expense report? +ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? +ConfirmDeleteTrip=Are you sure you want to delete this expense report? +ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? +ConfirmRefuseTrip=Are you sure you want to deny this expense report? +ConfirmSaveTrip=Are you sure you want to validate this expense report? +ConfirmValideTrip=Are you sure you want to approve this expense report? +DATE_CANCEL=Cancelation date +DATE_PAIEMENT=Payment date +DATE_REFUS=Deny date +DATE_SAVE=Validation date +DefaultCategoryCar=Default transportation mode +DefaultRangeNumber=Default range number +DeleteTrip=Delete expense report +ErrorDoubleDeclaration=You have declared another expense report into a similar date range. +Error_EXPENSEREPORT_ADDON_NotDefined=Error, the rule for expense report numbering ref was not defined into setup of module 'Expense Report' +ExpenseRangeOffset=Offset amount: %s +expenseReportCatDisabled=Category disabled - see the c_exp_tax_cat dictionary +expenseReportCoef=Coefficient +expenseReportCoefUndefined=(value not defined) +expenseReportOffset=Offset +expenseReportPrintExample=offset + (d x coef) = %s +expenseReportRangeDisabled=Range disabled - see the c_exp_tax_range dictionay +expenseReportRangeFromTo=from %d to %d +expenseReportRangeMoreThan=more than %d +expenseReportTotalForFive=Example with d = 5 +ExpenseReportApplyTo=Apply to +ExpenseReportApproved=An expense report was approved +ExpenseReportApprovedMessage=The expense report %s was approved.
    - User: %s
    - Approved by: %s
    Click here to show the expense report: %s +ExpenseReportCanceled=An expense report was canceled +ExpenseReportCanceledMessage=The expense report %s was canceled.
    - User: %s
    - Canceled by: %s
    - Motive for cancellation: %s
    Click here to show the expense report: %s +ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) +ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) +ExpenseReportDateEnd=Date end +ExpenseReportDateStart=Date start +ExpenseReportDomain=Domain to apply +ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers +ExpenseReportLimitAmount=Max amount +ExpenseReportLimitOn=Limit on +ExpenseReportLine=Expense report line +ExpenseReportPaid=An expense report was paid +ExpenseReportPaidMessage=The expense report %s was paid.
    - User: %s
    - Paid by: %s
    Click here to show the expense report: %s +ExpenseReportPayment=Expense report payment +ExpenseReportRef=Ref. expense report +ExpenseReportRefused=An expense report was refused +ExpenseReportRefusedMessage=The expense report %s was refused.
    - User: %s
    - Refused by: %s
    - Motive for refusal: %s
    Click here to show the expense report: %s +ExpenseReportRestrictive=Exceeding forbidden +ExpenseReportRuleErrorOnSave=Error: %s +ExpenseReportRuleSave=Expense report rule saved +ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report +ExpenseReportWaitingForApproval=A new expense report has been submitted for approval +ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.
    - User: %s
    - Period: %s
    Click here to validate: %s +ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval +ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.
    The %s, you refused to approve the expense report for this reason: %s.
    A new version has been proposed and waiting for your approval.
    - User: %s
    - Period: %s
    Click here to validate: %s +ExpenseReportsIk=Configuration of mileage charges +ExpenseReportsRules=Expense report rules +ExpenseReportsToApprove=Expense reports to approve +ExpenseReportsToPay=Expense reports to pay +ExpensesArea=Expense reports area +FeesKilometersOrAmout=Amount or kilometers +LastExpenseReports=Latest %s expense reports +ListOfFees=List of fees +ListOfTrips=List of expense reports +ListToApprove=Waiting for approval +ListTripsAndExpenses=List of expense reports +MOTIF_CANCEL=Reason +MOTIF_REFUS=Reason +ModePaiement=Payment mode +NewTrip=New expense report +nolimitbyEX_DAY=by day (no limitation) +nolimitbyEX_EXP=by line (no limitation) +nolimitbyEX_MON=by month (no limitation) +nolimitbyEX_YEA=by year (no limitation) +NoTripsToExportCSV=No expense report to export for this period. +NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. +OnExpense=Expense line +PDFStandardExpenseReports=Standard template to generate a PDF document for expense report +PaidTrip=Pay an expense report +REFUSEUR=Denied by +RangeIk=Mileage range +RangeNum=Range %d +SaveTrip=Validate expense report +ShowExpenseReport=Show expense report +ShowTrip=Show expense report +TripCard=Expense report card +TripId=Id expense report +TripNDF=Informations expense report +TripSociete=Information company +Trips=Expense reports +TripsAndExpenses=Expenses reports +TripsAndExpensesStatistics=Expense reports statistics +TypeFees=Types of fees +UploadANewFileNow=Upload a new document now +VALIDATOR=User responsible for approval +VALIDOR=Approved by +ValidateAndSubmit=Validate and submit for approval +ValidatedWaitingApproval=Validated (waiting for approval) +ValideTrip=Approve expense report + +## Dictionary +EX_BRE=Breakfast +EX_CAM=CV maintenance and repair +EX_CAM_VP=PV maintenance and repair +EX_CAR=Car rental +EX_CUR=Customers receiving +EX_DOC=Documentation +EX_EMM=Employees meal +EX_FUE=Fuel CV +EX_FUE_VP=Fuel PV +EX_GUM=Guests meal +EX_HOT=Hotel +EX_IND=Indemnity transportation subscription +EX_KME=Mileage costs +EX_OTR=Other receiving +EX_PAR=Parking CV +EX_PAR_VP=Parking PV +EX_POS=Postage +EX_SUM=Maintenance supply +EX_SUO=Office supplies +EX_TAX=Various Taxes +EX_TOL=Toll CV +EX_TOL_VP=Toll PV +TF_BUS=Bus +TF_CAR=Car +TF_ESSENCE=Fuel +TF_HOTEL=Hotel +TF_LUNCH=Lunch +TF_METRO=Metro +TF_OTHER=Other +TF_PEAGE=Toll +TF_TAXI=Taxi +TF_TRAIN=Train +TF_TRIP=Transportation + + +## add new (not from trips.lang) ExpenseReportPayments=Expense report payments # # error diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index 090af7c6a11..eb0c03fd56f 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -134,7 +134,9 @@ FormatControlRule=Format control rule ## imports updates KeysToUseForUpdates=Key (column) to use for updating existing data NbInsert=Number of inserted lines: %s +NbInsertSim=Number of lines that will be inserted: %s NbUpdate=Number of updated lines: %s +NbUpdateSim=Number of lines that will be updated : %s MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number WarningFirstImportedLine=The first line(s) will not be imported with the current selection diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 66b6d83d930..1921b9ed794 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -1,9 +1,11 @@ # Dolibarr language file - Source file is en_US - holiday HRM=HRM -Holidays=Leave +Holidays=Leaves +Holiday=Leave CPTitreMenu=Leave MenuReportMonth=Monthly statement MenuAddCP=New leave request +MenuCollectiveAddCP=New collective leave request NotActiveModCP=You must enable the module Leave to view this page. AddCP=Make a leave request DateDebCP=Start date @@ -56,6 +58,7 @@ ConfirmDeleteCP=Confirm the deletion of this leave request? ErrorCantDeleteCP=Error you don't have the right to delete this leave request. CantCreateCP=You don't have the right to make leave requests. InvalidValidatorCP=You must choose the approver for your leave request. +InvalidValidator=The user chosen isn't an approver. NoDateDebut=You must select a start date. NoDateFin=You must select an end date. ErrorDureeCP=Your leave request does not contain working day. @@ -79,6 +82,8 @@ MotifCP=Reason UserCP=User ErrorAddEventToUserCP=An error occurred while adding the exceptional leave. AddEventToUserOkCP=The addition of the exceptional leave has been completed. +ErrorFieldRequiredUserOrGroup=The "group" field or the "user" field must be filled in +fusionGroupsUsers=The groups field and the user field will be merged MenuLogCP=View change logs LogCP=Log of all updates made to "Balance of Leave" ActionByCP=Updated by @@ -86,6 +91,13 @@ UserUpdateCP=Updated for PrevSoldeCP=Previous Balance NewSoldeCP=New Balance alreadyCPexist=A leave request has already been done on this period. +UseralreadyCPexist=A leave request has already been done on this period for %s. +groups=Groups +users=Users +AutoSendMail=Automatic mailing +NewHolidayForGroup=New collective leave request +SendRequestCollectiveCP=Send collective leave request +AutoValidationOnCreate=Automatic validation FirstDayOfHoliday=Beginning day of leave request LastDayOfHoliday=Ending day of leave request BoxTitleLastLeaveRequests=Latest %s modified leave requests @@ -137,4 +149,10 @@ XIsAUsualNonWorkingDay=%s is usualy a NON working day BlockHolidayIfNegative=Block if balance negative LeaveRequestCreationBlockedBecauseBalanceIsNegative=The creation of this leave request is blocked because your balance is negative ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted=Leave request %s must be draft, canceled or refused to be deleted -HolidayQtyNotModified=Balance of remaining days for %s has not been changed \ No newline at end of file +IncreaseHolidays=Increase holiday +HolidayRecordsIncreased= %s holiday records increased +HolidayRecordIncreased=Holiday record increased +ConfirmMassIncreaseHoliday=Bulk holiday increase +NumberDayAddMass=Number of day to add to the selection +ConfirmMassIncreaseHolidayQuestion=Are you sure you want to increase holiday of the %s selected record(s)? +HolidayQtyNotModified=Balance of remaining days for %s has not been changed diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang index cbd3dc91663..966f2399a13 100644 --- a/htdocs/langs/en_US/hrm.lang +++ b/htdocs/langs/en_US/hrm.lang @@ -26,8 +26,8 @@ HRM_DEFAULT_SKILL_DESCRIPTION=Default description of ranks when skill is created deplacement=Shift DateEval=Evaluation date JobCard=Job card -JobPosition=Job -JobsPosition=Jobs +JobPosition=Job profile +JobsPosition=Job profiles NewSkill=New Skill SkillType=Skill type Skilldets=List of ranks for this skill diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 27e1792edac..d0c841fe802 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -28,6 +28,7 @@ ErrorPHPVersionTooLow=PHP version too old. Version %s or higher is required. ErrorPHPVersionTooHigh=PHP version too high. Version %s or lower is required. ErrorConnectedButDatabaseNotFound=Connection to server successful but database '%s' not found. ErrorDatabaseAlreadyExists=Database '%s' already exists. +ErrorNoMigrationFilesFoundForParameters=No migration file found for the selected versions IfDatabaseNotExistsGoBackAndUncheckCreate=If the database does not exist, go back and check option "Create database". IfDatabaseExistsGoBackAndCheckCreate=If database already exists, go back and uncheck "Create database" option. WarningBrowserTooOld=Version of browser is too old. Upgrading your browser to a recent version of Firefox, Chrome or Opera is highly recommended. @@ -213,3 +214,4 @@ Loaded=Loaded FunctionTest=Function test NodoUpgradeAfterDB=No action requested by external modules after upgrade of database NodoUpgradeAfterFiles=No action requested by external modules after upgrade of files or directories +MigrationContractLineRank=Migrate Contract Line to use Rank (and enable Reorder) diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index a57a84fc4c8..4119973d6dd 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -68,3 +68,5 @@ ConfirmReopenIntervention=Are you sure you want to open back the intervention %s, logi ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours. SetLinkToUser=Link to a Dolibarr user SetLinkToThirdParty=Link to a Dolibarr third party +MemberCountersArePublic=Counters of valid members are public MembersCards=Generation of cards for members MembersList=List of members MembersListToValid=List of draft members (to be validated) @@ -34,7 +35,8 @@ DateSubscription=Date of membership DateEndSubscription=End date of membership EndSubscription=End of membership SubscriptionId=Contribution ID -WithoutSubscription=Without contribution +WithoutSubscription=Without membership +WaitingSubscription=Membership pending MemberId=Member Id MemberRef=Member Ref NewMember=New member @@ -72,6 +74,12 @@ MemberTypeCanNotBeDeleted=Member type can not be deleted NewSubscription=New contribution NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s. Subscription=Contribution +AnyAmountWithAdvisedAmount=Any amount of your choice, recommended %s +AnyAmountWithoutAdvisedAmount=Any amount of your choice +CanEditAmountShort=Any amount +CanEditAmountShortForValues=recommended, any amount +MembershipDuration=Duration +GetMembershipButtonLabel=Join Subscriptions=Contributions SubscriptionLate=Late SubscriptionNotReceived=Contribution never received @@ -136,7 +144,7 @@ CardContent=Content of your member card # Text of email templates ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.

    ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:

    -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded.

    +ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    ThisIsContentOfSubscriptionReminderEmail=We want to let you know that your subscription is about to expire or has already expired (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). We hope you will renew it.

    ThisIsContentOfYourCard=This is a summary of the information we have about you. Please contact us if anything is incorrect.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the notification email received in case of auto-inscription of a guest @@ -199,8 +207,10 @@ NbOfSubscriptions=Number of contributions AmountOfSubscriptions=Amount collected from contributions TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) DefaultAmount=Default amount of contribution -CanEditAmount=Visitor can choose/edit amount of its contribution -MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page +CanEditAmount=Subscription amount is free +CanEditAmountDetail=Visitor can choose/edit amount of its contribution regardless of the member type +AmountIsLowerToMinimumNotice=sur un dû total de %s +MEMBER_NEWFORM_PAYONLINE=After the online registration, switch automatically on the online payment page ByProperties=By nature MembersStatisticsByProperties=Members statistics by nature VATToUseForSubscriptions=VAT rate to use for contributionss diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index c9c69b6af3b..cefdfaa1b41 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -1,7 +1,8 @@ # Dolibarr language file - Source file is en_US - loan +IdModule= Module id ModuleBuilderDesc=This tool must be used only by experienced users or developers. It provides utilities to build or edit your own module. Documentation for alternative manual development is here. EnterNameOfModuleDesc=Enter the name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) -EnterNameOfObjectDesc=Enter the name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...). The CRUD class file, but also API file, pages to list/add/edit/delete object and SQL files will be generated. +EnterNameOfObjectDesc=Enter the name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...). The CRUD class file, the pages to list/add/edit/delete the object and the SQL files will be generated. EnterNameOfDictionaryDesc=Enter the name of the dictionary to create with no spaces. Use uppercase to separate words (For example: MyDico...). The class file, but also the SQL file will be generated. ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): %s ModuleBuilderDesc3=Generated/editable modules found: %s @@ -9,6 +10,7 @@ ModuleBuilderDesc4=A module is detected as 'editable' when the file %s%s? This will change code in PHP class but also remove column from table definition of object. NotNull=Not NULL NotNullDesc=1=Set database to NOT NULL, 0=Allow null values, -1=Allow null values by forcing value to NULL if empty ('' or 0) @@ -81,15 +86,16 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=API explorer +ApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions SeeExamples=See examples here -EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) -VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing).

    It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty -DisplayOnPdf=Display on PDF +EnabledDesc=Condition to have this field active.

    Examples:
    1
    isModEnabled('MAIN_MODULE_MYMODULE')
    getDolGlobalString('MYMODULE_OPTION')==2 +VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing). +ItCanBeAnExpression=It can be an expression. Example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    $user->hasRight('holiday', 'define_holiday')?1:5 +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty +DisplayOnPdf=On PDF IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 0) SpecDefDesc=Enter here all documentation you want to provide with your module that is not already defined by other tabs. You can use .md or better, the rich .asciidoc syntax. @@ -130,27 +136,32 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -IncludeRefGeneration=The reference of object must be generated automatically by custom numbering rules +IncludeRefGeneration=The reference of this object must be generated automatically by custom numbering rules IncludeRefGenerationHelp=Check this if you want to include code to manage the generation of the reference automatically using custom numbering rules -IncludeDocGeneration=I want to generate some documents from templates for the object +IncludeDocGeneration=I want the feature to generate some documents (PDF, ODT) from templates for this object IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. -ShowOnCombobox=Show value into combobox +ShowOnCombobox=Show value into combo boxes KeyForTooltip=Key for tooltip CSSClass=CSS for edit/create form CSSViewClass=CSS for read form CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key -TypeOfFieldsHelp=Type of fields:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]]
    '1' means we add a + button after the combo to create the record
    'filter' is a sql condition, example: 'status=1 AND fk_user=__USER_ID__ AND entity IN (__SHARED_ENTITIES__)' +ForeignKeyDesc=If the value of this field must be guaranted to exists into another table. Enter here a value matching syntax: tablename.parentfieldtocheck +TypeOfFieldsHelp=Example:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]]
    '1' means we add a + button after the combo to create the record
    'filter' is a sql condition, example: 'status=1 AND fk_user=__USER_ID__ AND entity IN (__SHARED_ENTITIES__)' +TypeOfFieldsHelpIntro=This is the type of the field/attribute. AsciiToHtmlConverter=Ascii to HTML converter AsciiToPdfConverter=Ascii to PDF converter TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. ImportExportProfiles=Import and export profiles -ValidateModBuilderDesc=Set this to 1 if you want to have the method $this->validateField() of object being called to validate the content of the field during insert or upadate. Set 0 if there is no validation required. +ValidateModBuilderDesc=Set this to 1 if you want to have the method $this->validateField() of object being called to validate the content of the field during insert or update. Set 0 if there is no validation required. WarningDatabaseIsNotUpdated=Warning: The database is not updated automatically, you must destroy tables and disable-enable the module to have tables recreated LinkToParentMenu=Parent menu (fk_xxxxmenu) ListOfTabsEntries=List of tab entries TabsDefDesc=Define here the tabs provided by your module TabsDefDescTooltip=The tabs provided by your module/application are defined into the array $this->tabs into the module descriptor file. You can edit manually this file or use the embedded editor. -BadValueForType=Bad value for type %s \ No newline at end of file +BadValueForType=Bad value for type %s +DefinePropertiesFromExistingTable=Define properties from an existing table +DefinePropertiesFromExistingTableDesc=If a table in the database (for the object to create) already exists, you can use it to define the properties of the object. +DefinePropertiesFromExistingTableDesc2=Keep empty if the table does not exist yet. The code generator will use different kinds of fields to build an example of table that you can edit later. diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 9e1c8bb64ce..442c5c92b1c 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -27,6 +27,7 @@ ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of materials ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? ManufacturingEfficiency=Manufacturing efficiency ConsumptionEfficiency=Consumption efficiency +Consumption=Consumption ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the manufacturing or the disassembly ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product DeleteBillOfMaterials=Delete Bill Of Materials @@ -82,6 +83,7 @@ ProductsToProduce=Products to produce UnitCost=Unit cost TotalCost=Total cost BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) +BOMTotalCostService=If the "Workstation" module is activated and a workstation is defined by default on the line, then the calculation is "quantity (converted into hours) x workstation ahr", otherwise "quantity (converted into hours) x cost price of the service" GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it. ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO Workstation=Workstation @@ -113,3 +115,4 @@ MoChildGenerate=Generate Child Mo ParentMo=MO Parent MOChild=MO Child BomCantAddChildBom=The nomenclature %s is already present in the tree leading to the nomenclature %s +BOMNetNeeds = BOM Net Needs diff --git a/htdocs/langs/en_US/oauth.lang b/htdocs/langs/en_US/oauth.lang index 08f7956f455..01bb08e38bd 100644 --- a/htdocs/langs/en_US/oauth.lang +++ b/htdocs/langs/en_US/oauth.lang @@ -9,8 +9,9 @@ HasAccessToken=A token was generated and saved into local database NewTokenStored=Token received and saved ToCheckDeleteTokenOnProvider=Click here to check/delete authorization saved by %s OAuth provider TokenDeleted=Token deleted +GetAccess=Click here to get a token RequestAccess=Click here to request/renew access and receive a new token -DeleteAccess=Click here to delete token +DeleteAccess=Click here to delete the token UseTheFollowingUrlAsRedirectURI=Use the following URL as the Redirect URI when creating your credentials with your OAuth provider: ListOfSupportedOauthProviders=Add your OAuth2 token providers. Then, go on your OAuth provider admin page to create/get an OAuth ID and Secret and save them here. Once done, switch on the other tab to generate your token. OAuthSetupForLogin=Page to manage (generate/delete) OAuth tokens @@ -33,4 +34,7 @@ OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live OAUTH_ID=OAuth ID OAUTH_SECRET=OAuth secret OAuthProviderAdded=OAuth provider added -AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=An OAuth entry for this provider and label already exists \ No newline at end of file +AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=An OAuth entry for this provider and label already exists +URLOfServiceForAuthorization=URL provided by OAuth service for authentication +Scopes=Permissions (Scopes) +ScopeUndefined=Permissions (Scopes) undefined (see previous tab) \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index e533dc71fa5..d5701ba2224 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -181,6 +181,7 @@ SizeUnitfoot=foot SizeUnitpoint=point BugTracker=Bug tracker SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.
    Change will become effective once you click on the confirmation link in the email.
    Check your inbox. +EnterNewPasswordHere=Enter your new password here BackToLoginPage=Back to login page AuthenticationDoesNotAllowSendNewPassword=Authentication mode is %s.
    In this mode, Dolibarr can't know nor change your password.
    Contact your system administrator if you want to change your password. EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. @@ -311,10 +312,10 @@ ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry -# FTP +# ftp FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area +NewFTPClient=New FTP/SFTP connection setup +FTPArea=FTP/SFTP Area FTPAreaDesc=This screen shows a view of an FTP et SFTP server. SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions @@ -325,3 +326,9 @@ FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and FTPPassiveMode=Passive mode ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... FailedToGetFile=Failed to get files %s +ErrorFTPNodisconnect=Error to disconnect FTP/SFTP server +FileWasUpload=File %s was uploaded +FTPFailedToUploadFile=Failed to upload the file %s. +AddFolder=Create folder +FileWasCreateFolder=Folder %s has been created +FTPFailedToCreateFolder=Failed to create folder %s. diff --git a/htdocs/langs/en_US/partnership.lang b/htdocs/langs/en_US/partnership.lang index 5c85e4d7830..89a1bfa742d 100644 --- a/htdocs/langs/en_US/partnership.lang +++ b/htdocs/langs/en_US/partnership.lang @@ -20,6 +20,7 @@ ModulePartnershipName=Partnership management PartnershipDescription=Module Partnership management PartnershipDescriptionLong= Module Partnership management Partnership=Partnership +Partnerships=Partnerships AddPartnership=Add partnership CancelPartnershipForExpiredMembers=Partnership: Cancel partnership of members with expired subscriptions PartnershipCheckBacklink=Partnership: Check referring backlink @@ -28,6 +29,7 @@ PartnershipCheckBacklink=Partnership: Check referring backlink # Menu # NewPartnership=New Partnership +NewPartnershipbyWeb= Your partnership was added successfully. ListOfPartnerships=List of partnership # @@ -48,8 +50,8 @@ PublicFormRegistrationPartnerDesc=Dolibarr can provide you a public URL/website # Object # DeletePartnership=Delete a partnership -PartnershipDedicatedToThisThirdParty=Partnership dedicated to this third party -PartnershipDedicatedToThisMember=Partnership dedicated to this member +PartnershipDedicatedToThisThirdParty=Partnership dedicated to this third party +PartnershipDedicatedToThisMember=Partnership dedicated to this member DatePartnershipStart=Start date DatePartnershipEnd=End date ReasonDecline=Decline reason diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang index beaf9a5ea3f..a935cd38434 100644 --- a/htdocs/langs/en_US/paypal.lang +++ b/htdocs/langs/en_US/paypal.lang @@ -34,3 +34,4 @@ ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. ValidationOfPaymentFailed=Validation of payment has failed CardOwner=Card holder PayPalBalance=Paypal credit +OnlineSubscriptionPaymentLine=Online subscription recorded on %s
    Paid via %s
    Originating IP address: %s
    Transaction ID: %s diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 4bd64f44577..a1039e05e62 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -17,6 +17,7 @@ printBatch=Lot/Serial: %s printEatby=Eat-by: %s printSellby=Sell-by: %s printQty=Qty: %d +printPlannedWarehouse=Warehouse: %s AddDispatchBatchLine=Add a line for Shelf Life dispatching WhenProductBatchModuleOnOptionAreForced=When module Lot/Serial is on, automatic stock decrease is forced to 'Decrease real stocks on shipping validation' and automatic increase mode is forced to 'Increase real stocks on manual dispatching into warehouses' and can't be edited. Other options can be defined as you want. ProductDoesNotUseBatchSerial=This product does not use lot/serial number diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 38f57cda105..3d5048d99a9 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -416,6 +416,7 @@ ProductsMergeSuccess=Products have been merged ErrorsProductsMerge=Errors in products merge SwitchOnSaleStatus=Switch on sale status SwitchOnPurchaseStatus=Switch on purchase status +UpdatePrice=Increase/decrease customer price StockMouvementExtraFields= Extra Fields (stock mouvement) InventoryExtraFields= Extra Fields (inventory) ScanOrTypeOrCopyPasteYourBarCodes=Scan or type or copy/paste your barcodes @@ -427,3 +428,4 @@ RealValuation=Real Valuation ConfirmEditExtrafield = Select the extrafield you want modify ConfirmEditExtrafieldQuestion = Are you sure you want to modify this extrafield? ModifyValueExtrafields = Modify value of an extrafield +OrProductsWithCategories=Or products with tags/categories diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index e0fa85dd273..2407d4b2d86 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -23,6 +23,7 @@ TasksPublicDesc=This view presents all projects and tasks you are allowed to rea TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything). AllTaskVisibleButEditIfYouAreAssigned=All tasks for qualified projects are visible, but you can enter time only for task assigned to selected user. Assign task if you need to enter time on it. OnlyYourTaskAreVisible=Only tasks assigned to you are visible. If you need to enter time on a task and if the task is not visible here, then you need to assign the task to yourself. +ImportDatasetProjects=Projects or opportunities ImportDatasetTasks=Tasks of projects ProjectCategories=Project tags/categories NewProject=New project @@ -37,7 +38,9 @@ OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status OpportunitiesStatusForProjects=Leads amount of projects by status ShowProject=Show project ShowTask=Show task +SetThirdParty=Set third party SetProject=Set project +OutOfProject=Out of project NoProject=No project defined or owned NbOfProjects=Number of projects NbOfTasks=Number of tasks @@ -238,7 +241,7 @@ OppStatusPENDING=Pending OppStatusWON=Won OppStatusLOST=Lost Budget=Budget -AllowToLinkFromOtherCompany=Allow to link project from other company

    Supported values:
    - Keep empty: Can link any project of the company (default)
    - "all": Can link any projects, even projects of other companies
    - A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)
    +AllowToLinkFromOtherCompany=Allow to link an element with a project of other company

    Supported values:
    - Keep empty: Can link elements with any projects in the same company (default)
    - "all": Can link elements with any projects, even projects of other companies
    - A list of third-party ids separated by commas: can link elements with any projects of these third partys (Example: 123,4795,53)
    LatestProjects=Latest %s projects LatestModifiedProjects=Latest %s modified projects OtherFilteredTasks=Other filtered tasks @@ -259,7 +262,7 @@ TimeSpentInvoiced=Time spent billed TimeSpentForIntervention=Time spent TimeSpentForInvoice=Time spent OneLinePerUser=One line per user -ServiceToUseOnLines=Service to use on lines +ServiceToUseOnLines=Service to use on lines by default InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project InterventionGeneratedFromTimeSpent=Intervention %s has been generated from time spent on project ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. @@ -282,7 +285,7 @@ ProfitIsCalculatedWith=Profit is calculated using AddPersonToTask=Add also to tasks UsageOrganizeEvent=Usage: Event Organization PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) -PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks already set to a progress of 100 %% won't be affected: you will have to close them manually. This option only affects open projects. SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them ProjectTasksWithoutTimeSpent=Project tasks without time spent FormForNewLeadDesc=Thanks to fill the following form to contact us. You can also send us an email directly to %s. @@ -293,4 +296,5 @@ LeadPublicFormDesc=You can enable here a public page to allow your prospects to EnablePublicLeadForm=Enable the public form for contact NewLeadbyWeb=Your message or request has been recorded. We will answer or contact your soon. NewLeadForm=New contact form -LeadFromPublicForm=Online lead from public form \ No newline at end of file +LeadFromPublicForm=Online lead from public form +ExportAccountingReportButtonLabel=Get report \ No newline at end of file diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index aa5ef73f7dc..7e9afd4e27c 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -103,11 +103,15 @@ IdProposal=Proposal ID IdProduct=Product ID LineBuyPriceHT=Buy Price Amount net of tax for line SignPropal=Accept proposal +SignContract=Sign contract +SignFichinter=Sign intervention RefusePropal=Refuse proposal Sign=Sign NoSign=Refuse PropalAlreadySigned=Proposal already accepted PropalAlreadyRefused=Proposal already refused PropalSigned=Proposal accepted +ContractSigned=Contract signed +FichinterSigned=Intervention signed PropalRefused=Proposal refused ConfirmRefusePropal=Are you sure you want to refuse this commercial proposal? diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang index 5b51f5ba071..7324f14f2e0 100644 --- a/htdocs/langs/en_US/receptions.lang +++ b/htdocs/langs/en_US/receptions.lang @@ -32,6 +32,7 @@ StatusReceptionDraftShort=Draft StatusReceptionValidatedShort=Validated StatusReceptionProcessedShort=Processed ReceptionSheet=Reception sheet +ValidateReception=Validate reception ConfirmDeleteReception=Are you sure you want to delete this reception? ConfirmValidateReception=Are you sure you want to validate this reception with reference %s? ConfirmCancelReception=Are you sure you want to cancel this reception? diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 888f6fe5225..686722a48c5 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -57,15 +57,16 @@ EmailRecruiter=Email recruiter ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used NewCandidature=New application ListOfCandidatures=List of applications -RequestedRemuneration=Requested remuneration -ProposedRemuneration=Proposed remuneration +Remuneration=Salary +RequestedRemuneration=Requested salary +ProposedRemuneration=Proposed salary ContractProposed=Contract proposed ContractSigned=Contract signed ContractRefused=Contract refused RecruitmentCandidature=Application JobPositions=Job positions RecruitmentCandidatures=Applications -InterviewToDo=Interview to do +InterviewToDo=Contacts to follow AnswerCandidature=Application answer YourCandidature=Your application YourCandidatureAnswerMessage=Thanks you for your application.
    ... diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang index 20a10694500..d5f5b7e7544 100644 --- a/htdocs/langs/en_US/salaries.lang +++ b/htdocs/langs/en_US/salaries.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - salaries -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accounting account used for user third parties -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=The dedicated accounting account defined on user card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated user accounting account on user is not defined. +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Account (from the Chart of Account) used by default for "user" third parties +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=The dedicated account defined on user card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated user accounting account on user is not defined. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accounting account by default for wage payments CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary Salary=Salary diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 47483bb8f3b..f789ce283e5 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -24,6 +24,7 @@ StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials +SubjectToLotSerialOnly=Products subject to lot/serial only Movements=Movements ErrorWarehouseRefRequired=Warehouse reference name is required ListOfWarehouses=List of warehouses @@ -48,7 +49,7 @@ StockCorrection=Stock correction CorrectStock=Correct stock StockTransfer=Stock transfer TransferStock=Transfer stock -MassStockTransferShort=Mass stock transfer +MassStockTransferShort=Bulk stock change StockMovement=Stock movement StockMovements=Stock movements NumberOfUnit=Number of units @@ -146,8 +147,9 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click on "%s". +SelectProductInAndOutWareHouse=Select a source warehouse (optional), a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click on "%s". RecordMovement=Record transfer +RecordMovements=Record stock movements ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded RuleForStockAvailability=Rules on stock requirements @@ -234,7 +236,7 @@ StockIncrease=Stock increase StockDecrease=Stock decrease InventoryForASpecificWarehouse=Inventory for a specific warehouse InventoryForASpecificProduct=Inventory for a specific product -StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use +StockIsRequiredToChooseWhichLotToUse=An existing stock is required to be able to choose which lot to use ForceTo=Force to AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (Warning: This may decrease dramatically performances) StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past @@ -270,7 +272,7 @@ InventoryStartedShort=Started ErrorOnElementsInventory=Operation canceled for the following reason: ErrorCantFindCodeInInventory=Can't find the following code in inventory QtyWasAddedToTheScannedBarcode=Success !! The quantity was added to all the requested barcode. You can close the Scanner tool. -StockChangeDisabled=Change on stock disabled +StockChangeDisabled=Stock change disabled NoWarehouseDefinedForTerminal=No warehouse defined for terminal ClearQtys=Clear all quantities ModuleStockTransferName=Advanced Stock Transfer diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang index 3ea0cf2354b..2a3f988cebf 100644 --- a/htdocs/langs/en_US/stripe.lang +++ b/htdocs/langs/en_US/stripe.lang @@ -61,6 +61,7 @@ DeleteACard=Delete Card ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card? CreateCustomerOnStripe=Create customer on Stripe CreateCardOnStripe=Create card on Stripe +CreateBANOnStripe=Create bank on Stripe ShowInStripe=Show in Stripe StripeUserAccountForActions=User account to use for email notification of some Stripe events (Stripe payouts) StripePayoutList=List of Stripe payouts @@ -69,4 +70,5 @@ ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mo PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period. ClickHereToTryAgain=Click here to try again... CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s -TERMINAL_LOCATION=Location (address) for terminals \ No newline at end of file +TERMINAL_LOCATION=Location (address) for terminals +RequestDirectDebitWithStripe=Request Direct Debit with Stripe \ No newline at end of file diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 15da3f0638a..08895194016 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -4,6 +4,7 @@ SuppliersInvoice=Vendor invoice SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor +NewSupplierInvoice = New vendor invoice History=History ListOfSuppliers=List of vendors ShowSupplier=Show vendor diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 1fe2e5b8a6e..0cde40ba20a 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -194,8 +194,7 @@ TicketAssigned=Ticket is now assigned TicketChangeType=Change type TicketChangeCategory=Change analytic code TicketChangeSeverity=Change severity -TicketAddMessage=Add a message -AddMessage=Add a message +TicketAddMessage=Add private message MessageSuccessfullyAdded=Ticket added TicketMessageSuccessfullyAdded=Message successfully added TicketMessagesList=Message list @@ -206,8 +205,8 @@ TicketSeverity=Severity ShowTicket=See ticket RelatedTickets=Related tickets TicketAddIntervention=Create intervention -CloseTicket=Close|Solve ticket -AbandonTicket=Abandon ticket +CloseTicket=Close|Solve +AbandonTicket=Abandon CloseATicket=Close|Solve a ticket ConfirmCloseAticket=Confirm ticket closing ConfirmAbandonTicket=Do you confirm the closing of the ticket to status 'Abandonned' @@ -221,18 +220,17 @@ SendMessageByEmail=Send message by email TicketNewMessage=New message ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send TicketGoIntoContactTab=Please go into "Contacts" tab to select them -TicketMessageMailIntro=Introduction +TicketMessageMailIntro=Message header TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved. -TicketMessageMailIntroLabelAdmin=Introduction text to all ticket answers TicketMessageMailIntroText=Hello,
    A new answer has been added to a ticket that you follow. Here is the message:
    TicketMessageMailIntroHelpAdmin=This text will be inserted before the answer when replying to a ticket from Dolibarr -TicketMessageMailSignature=Signature -TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved. -TicketMessageMailSignatureText=Message sent by %s via Dolibarr -TicketMessageMailSignatureLabelAdmin=Signature of response email -TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message. +TicketMessageMailFooter=Message footer +TicketMessageMailFooterHelp=This text is added only at the end of the message sent by email and will not be saved. +TicketMessageMailFooterText=Message sent by %s via Dolibarr +TicketMessageMailFooterHelpAdmin=This text will be inserted after the response message. TicketMessageHelp=Only this text will be saved in the message list on ticket card. TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values. +ForEmailMessageWillBeCompletedWith=For email messages sent to external users, the message will be completed with TimeElapsedSince=Time elapsed since TicketTimeToRead=Time elapsed before read TicketTimeElapsedBeforeSince=Time elapsed before / since @@ -243,6 +241,7 @@ TicketMessageMailIntroAutoNewPublicMessage=A new message was posted on the ticke TicketAssignedToYou=Ticket assigned TicketAssignedEmailBody=You have been assigned the ticket #%s by %s MarkMessageAsPrivate=Mark message as private +TicketMessageSendEmailHelp=An email will be sent to all assigned contact (internal contacts, but also external contacts except if the option "%s" is checked) TicketMessagePrivateHelp=This message will not display to external users TicketEmailOriginIssuer=Issuer at origin of the tickets InitialMessage=Initial Message diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index 9210ede360c..b37233a526f 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -1,150 +1,152 @@ # Dolibarr language file - Source file is en_US - trips -ShowExpenseReport=Show expense report -Trips=Expense reports -TripsAndExpenses=Expenses reports -TripsAndExpensesStatistics=Expense reports statistics -TripCard=Expense report card +AUTHOR=Recorded by +AUTHORPAIEMENT=Paid by AddTrip=Create expense report -ListOfTrips=List of expense reports -ListOfFees=List of fees -TypeFees=Types of fees -ShowTrip=Show expense report -NewTrip=New expense report -LastExpenseReports=Latest %s expense reports +AllExpenseReport=All type of expense report AllExpenseReports=All expense reports -CompanyVisited=Company/organization visited -FeesKilometersOrAmout=Amount or kilometers -DeleteTrip=Delete expense report -ConfirmDeleteTrip=Are you sure you want to delete this expense report? -ListTripsAndExpenses=List of expense reports -ListToApprove=Waiting for approval -ExpensesArea=Expense reports area +AnyOtherInThisListCanValidate=Person to be informed for validating the request. +AttachTheNewLineToTheDocument=Attach the line to an uploaded document +AucuneLigne=There is no expense report declared yet +BrouillonnerTrip=Move back expense report to status "Draft" +byEX_DAY=by day (limitation to %s) +byEX_EXP=by line (limitation to %s) +byEX_MON=by month (limitation to %s) +byEX_YEA=by year (limitation to %s) +CANCEL_USER=Deleted by +CarCategory=Vehicle category ClassifyRefunded=Classify 'Refunded' +CompanyVisited=Company/organization visited +ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? +ConfirmCancelTrip=Are you sure you want to cancel this expense report? +ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? +ConfirmDeleteTrip=Are you sure you want to delete this expense report? +ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? +ConfirmRefuseTrip=Are you sure you want to deny this expense report? +ConfirmSaveTrip=Are you sure you want to validate this expense report? +ConfirmValideTrip=Are you sure you want to approve this expense report? +DATE_CANCEL=Cancelation date +DATE_PAIEMENT=Payment date +DATE_REFUS=Deny date +DATE_SAVE=Validation date +DefaultCategoryCar=Default transportation mode +DefaultRangeNumber=Default range number +DeleteTrip=Delete expense report +ErrorDoubleDeclaration=You have declared another expense report into a similar date range. +Error_EXPENSEREPORT_ADDON_NotDefined=Error, the rule for expense report numbering ref was not defined into setup of module 'Expense Report' +ExpenseRangeOffset=Offset amount: %s +expenseReportCatDisabled=Category disabled - see the c_exp_tax_cat dictionary +expenseReportCoef=Coefficient +expenseReportCoefUndefined=(value not defined) +expenseReportOffset=Offset +expenseReportPrintExample=offset + (d x coef) = %s +expenseReportRangeDisabled=Range disabled - see the c_exp_tax_range dictionay +expenseReportRangeFromTo=from %d to %d +expenseReportRangeMoreThan=more than %d +expenseReportTotalForFive=Example with d = 5 +ExpenseReportApplyTo=Apply to +ExpenseReportApproved=An expense report was approved +ExpenseReportApprovedMessage=The expense report %s was approved.
    - User: %s
    - Approved by: %s
    Click here to show the expense report: %s +ExpenseReportCanceled=An expense report was canceled +ExpenseReportCanceledMessage=The expense report %s was canceled.
    - User: %s
    - Canceled by: %s
    - Motive for cancellation: %s
    Click here to show the expense report: %s +ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) +ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) +ExpenseReportDateEnd=Date end +ExpenseReportDateStart=Date start +ExpenseReportDomain=Domain to apply +ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers +ExpenseReportLimitAmount=Max amount +ExpenseReportLimitOn=Limit on +ExpenseReportLine=Expense report line +ExpenseReportPaid=An expense report was paid +ExpenseReportPaidMessage=The expense report %s was paid.
    - User: %s
    - Paid by: %s
    Click here to show the expense report: %s +ExpenseReportPayment=Expense report payment +ExpenseReportRef=Ref. expense report +ExpenseReportRefused=An expense report was refused +ExpenseReportRefusedMessage=The expense report %s was refused.
    - User: %s
    - Refused by: %s
    - Motive for refusal: %s
    Click here to show the expense report: %s +ExpenseReportRestrictive=Exceeding forbidden +ExpenseReportRuleErrorOnSave=Error: %s +ExpenseReportRuleSave=Expense report rule saved +ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report ExpenseReportWaitingForApproval=A new expense report has been submitted for approval ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.
    - User: %s
    - Period: %s
    Click here to validate: %s ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.
    The %s, you refused to approve the expense report for this reason: %s.
    A new version has been proposed and waiting for your approval.
    - User: %s
    - Period: %s
    Click here to validate: %s -ExpenseReportApproved=An expense report was approved -ExpenseReportApprovedMessage=The expense report %s was approved.
    - User: %s
    - Approved by: %s
    Click here to show the expense report: %s -ExpenseReportRefused=An expense report was refused -ExpenseReportRefusedMessage=The expense report %s was refused.
    - User: %s
    - Refused by: %s
    - Motive for refusal: %s
    Click here to show the expense report: %s -ExpenseReportCanceled=An expense report was canceled -ExpenseReportCanceledMessage=The expense report %s was canceled.
    - User: %s
    - Canceled by: %s
    - Motive for cancellation: %s
    Click here to show the expense report: %s -ExpenseReportPaid=An expense report was paid -ExpenseReportPaidMessage=The expense report %s was paid.
    - User: %s
    - Paid by: %s
    Click here to show the expense report: %s -TripId=Id expense report -AnyOtherInThisListCanValidate=Person to be informed for validating the request. -TripSociete=Information company -TripNDF=Informations expense report -PDFStandardExpenseReports=Standard template to generate a PDF document for expense report -ExpenseReportLine=Expense report line -TF_OTHER=Other -TF_TRIP=Transportation -TF_LUNCH=Lunch -TF_METRO=Metro -TF_TRAIN=Train -TF_BUS=Bus -TF_CAR=Car -TF_PEAGE=Toll -TF_ESSENCE=Fuel -TF_HOTEL=Hotel -TF_TAXI=Taxi -EX_KME=Mileage costs -EX_FUE=Fuel CV -EX_HOT=Hotel -EX_PAR=Parking CV -EX_TOL=Toll CV -EX_TAX=Various Taxes -EX_IND=Indemnity transportation subscription -EX_SUM=Maintenance supply -EX_SUO=Office supplies -EX_CAR=Car rental -EX_DOC=Documentation -EX_CUR=Customers receiving -EX_OTR=Other receiving -EX_POS=Postage -EX_CAM=CV maintenance and repair -EX_EMM=Employees meal -EX_GUM=Guests meal -EX_BRE=Breakfast -EX_FUE_VP=Fuel PV -EX_TOL_VP=Toll PV -EX_PAR_VP=Parking PV -EX_CAM_VP=PV maintenance and repair -DefaultCategoryCar=Default transportation mode -DefaultRangeNumber=Default range number -UploadANewFileNow=Upload a new document now -Error_EXPENSEREPORT_ADDON_NotDefined=Error, the rule for expense report numbering ref was not defined into setup of module 'Expense Report' -ErrorDoubleDeclaration=You have declared another expense report into a similar date range. -AucuneLigne=There is no expense report declared yet -ModePaiement=Payment mode -VALIDATOR=User responsible for approval -VALIDOR=Approved by -AUTHOR=Recorded by -AUTHORPAIEMENT=Paid by -REFUSEUR=Denied by -CANCEL_USER=Deleted by -MOTIF_REFUS=Reason -MOTIF_CANCEL=Reason -DATE_REFUS=Deny date -DATE_SAVE=Validation date -DATE_CANCEL=Cancelation date -DATE_PAIEMENT=Payment date -ExpenseReportRef=Ref. expense report -ValidateAndSubmit=Validate and submit for approval -ValidatedWaitingApproval=Validated (waiting for approval) -NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. -ConfirmRefuseTrip=Are you sure you want to deny this expense report? -ValideTrip=Approve expense report -ConfirmValideTrip=Are you sure you want to approve this expense report? -PaidTrip=Pay an expense report -ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? -ConfirmCancelTrip=Are you sure you want to cancel this expense report? -BrouillonnerTrip=Move back expense report to status "Draft" -ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? -SaveTrip=Validate expense report -ConfirmSaveTrip=Are you sure you want to validate this expense report? -NoTripsToExportCSV=No expense report to export for this period. -ExpenseReportPayment=Expense report payment -ExpenseReportsToApprove=Expense reports to approve -ExpenseReportsToPay=Expense reports to pay -ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? ExpenseReportsIk=Configuration of mileage charges ExpenseReportsRules=Expense report rules -ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers -ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report -expenseReportOffset=Offset -expenseReportCoef=Coefficient -expenseReportTotalForFive=Example with d = 5 -expenseReportRangeFromTo=from %d to %d -expenseReportRangeMoreThan=more than %d -expenseReportCoefUndefined=(value not defined) -expenseReportCatDisabled=Category disabled - see the c_exp_tax_cat dictionary -expenseReportRangeDisabled=Range disabled - see the c_exp_tax_range dictionay -expenseReportPrintExample=offset + (d x coef) = %s -ExpenseReportApplyTo=Apply to -ExpenseReportDomain=Domain to apply -ExpenseReportLimitOn=Limit on -ExpenseReportDateStart=Date start -ExpenseReportDateEnd=Date end -ExpenseReportLimitAmount=Max amount -ExpenseReportRestrictive=Exceeding forbidden -AllExpenseReport=All type of expense report -OnExpense=Expense line -ExpenseReportRuleSave=Expense report rule saved -ExpenseReportRuleErrorOnSave=Error: %s -RangeNum=Range %d -ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) -byEX_DAY=by day (limitation to %s) -byEX_MON=by month (limitation to %s) -byEX_YEA=by year (limitation to %s) -byEX_EXP=by line (limitation to %s) -ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) +ExpenseReportsToApprove=Expense reports to approve +ExpenseReportsToPay=Expense reports to pay +ExpensesArea=Expense reports area +FeesKilometersOrAmout=Amount or kilometers +LastExpenseReports=Latest %s expense reports +ListOfFees=List of fees +ListOfTrips=List of expense reports +ListToApprove=Waiting for approval +ListTripsAndExpenses=List of expense reports +MOTIF_CANCEL=Reason +MOTIF_REFUS=Reason +ModePaiement=Payment mode +NewTrip=New expense report nolimitbyEX_DAY=by day (no limitation) +nolimitbyEX_EXP=by line (no limitation) nolimitbyEX_MON=by month (no limitation) nolimitbyEX_YEA=by year (no limitation) -nolimitbyEX_EXP=by line (no limitation) -CarCategory=Vehicle category -ExpenseRangeOffset=Offset amount: %s +NoTripsToExportCSV=No expense report to export for this period. +NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. +OnExpense=Expense line +PDFStandardExpenseReports=Standard template to generate a PDF document for expense report +PaidTrip=Pay an expense report +REFUSEUR=Denied by RangeIk=Mileage range -AttachTheNewLineToTheDocument=Attach the line to an uploaded document +RangeNum=Range %d +SaveTrip=Validate expense report +ShowExpenseReport=Show expense report +ShowTrip=Show expense report +TripCard=Expense report card +TripId=Id expense report +TripNDF=Informations expense report +TripSociete=Information company +Trips=Expense reports +TripsAndExpenses=Expenses reports +TripsAndExpensesStatistics=Expense reports statistics +TypeFees=Types of fees +UploadANewFileNow=Upload a new document now +VALIDATOR=User responsible for approval +VALIDOR=Approved by +ValidateAndSubmit=Validate and submit for approval +ValidatedWaitingApproval=Validated (waiting for approval) +ValideTrip=Approve expense report + +## Dictionary +EX_BRE=Breakfast +EX_CAM=CV maintenance and repair +EX_CAM_VP=PV maintenance and repair +EX_CAR=Car rental +EX_CUR=Customers receiving +EX_DOC=Documentation +EX_EMM=Employees meal +EX_FUE=Fuel CV +EX_FUE_VP=Fuel PV +EX_GUM=Guests meal +EX_HOT=Hotel +EX_IND=Indemnity transportation subscription +EX_KME=Mileage costs +EX_OTR=Other receiving +EX_PAR=Parking CV +EX_PAR_VP=Parking PV +EX_POS=Postage +EX_SUM=Maintenance supply +EX_SUO=Office supplies +EX_TAX=Various Taxes +EX_TOL=Toll CV +EX_TOL_VP=Toll PV +TF_BUS=Bus +TF_CAR=Car +TF_ESSENCE=Fuel +TF_HOTEL=Hotel +TF_LUNCH=Lunch +TF_METRO=Metro +TF_OTHER=Other +TF_PEAGE=Toll +TF_TAXI=Taxi +TF_TRAIN=Train +TF_TRIP=Transportation diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index c98c1f4902f..757e9f1dedf 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -47,7 +47,7 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to %s. PasswordChangeRequest=Request to change password for %s PasswordChangeRequestSent=Request to change password for %s sent to %s. -IfLoginExistPasswordRequestSent=If this login is a valid account, an email to reset password has been sent. +IfLoginExistPasswordRequestSent=If this login is a valid account (with a valid email), an email to reset password has been sent. IfEmailExistPasswordRequestSent=If this email is a valid account, an email to reset password has been sent. ConfirmPasswordReset=Confirm password reset MenuUsersAndGroups=Users & Groups @@ -68,7 +68,6 @@ CreateDolibarrLogin=Create a user CreateDolibarrThirdParty=Create a third party LoginAccountDisableInDolibarr=Account disabled in Dolibarr. UsePersonalValue=Use personal value -InternalUser=Internal user ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate @@ -128,3 +127,5 @@ DateLastLogin=Date last login DatePreviousLogin=Date previous login IPLastLogin=IP last login IPPreviousLogin=IP previous login +ShowAllPerms=Show all permission rows +HideAllPerms=Hide all permission rows diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index b5ef14bd118..742e3afff67 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -1,5 +1,6 @@ # Dolibarr language file - Source file is en_US - website Shortname=Code +WebsiteName=Name of the website WebsiteSetupDesc=Create here the websites you wish to use. Then go into menu Websites to edit them. DeleteWebsite=Delete website ConfirmDeleteWebsite=Are you sure you want to delete this web site? All its pages and content will also be removed. The files uploaded (like into the medias directory, the ECM module, ...) will remain. @@ -15,9 +16,9 @@ WEBSITE_HTML_HEADER=Addition at bottom of HTML Header (common to all pages) WEBSITE_ROBOT=Robot file (robots.txt) WEBSITE_HTACCESS=Website .htaccess file WEBSITE_MANIFEST_JSON=Website manifest.json file -WEBSITE_README=README.md file WEBSITE_KEYWORDSDesc=Use a comma to separate values -EnterHereLicenseInformation=Enter here meta data or license information to fille a README.md file. if you distribute your website as a template, the file will be included into the temptate package. +EnterHereReadmeInformation=Enter here a description of the website. If you distribute your website as a template, the file will be included into the temptate package. +EnterHereLicenseInformation=Enter here the LICENSE of the code of the website. If you distribute your website as a template, the file will be included into the temptate package. HtmlHeaderPage=HTML header (specific to this page only) PageNameAliasHelp=Name or alias of the page.
    This alias is also used to forge a SEO URL when website is ran from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "%s" to edit this alias. EditTheWebSiteForACommonHeader=Note: If you want to define a personalized header for all pages, edit the header on the site level instead of on the page/container. @@ -42,6 +43,8 @@ ViewPageInNewTab=View page in new tab SetAsHomePage=Set as Home page RealURL=Real URL ViewWebsiteInProduction=View web site using home URLs +Virtualhost=Virtual host or domain name +VirtualhostDesc=The name of the Virtual host or domain (For example: www.mywebsite.com, mybigcompany.net, ...) SetHereVirtualHost=Use with Apache/NGinx/...
    Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on
    %s ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=Use with PHP embedded server
    On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
    php -S 0.0.0.0:8080 -t %s @@ -137,7 +140,7 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. -GenerateSitemaps=Generate website sitemap file +GenerateSitemaps=Generate website sitemap.xml file ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... ConfirmSitemapsCreation=Confirm sitemap generation SitemapGenerated=Sitemap file %s generated @@ -145,3 +148,10 @@ ImportFavicon=Favicon ErrorFaviconType=Favicon must be png ErrorFaviconSize=Favicon must be sized 16x16, 32x32 or 64x64 FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64) +NextContainer=Next page/container +PreviousContainer=Previous page/container +WebsiteMustBeDisabled=The website must have the status "%s" +WebpageMustBeDisabled=The web page must have the status "%s" +SetWebsiteOnlineBefore=When website is offline, all pages are offline. Change status of website first. +Booking=Booking +Reservation=Reservation diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index 75cee952bcd..7b8d4ae3f26 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -33,7 +33,7 @@ InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer AmountToWithdraw=Amount to withdraw AmountToTransfer=Amount to transfer NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. -NoSupplierInvoiceToWithdraw=No supplier invoice with open 'Direct credit requests' is waiting. Go on tab '%s' on invoice card to make a request. +NoSupplierInvoiceToWithdraw=No supplier invoice with open '%s' is waiting. Go on tab '%s' on invoice card to make a request. ResponsibleUser=User Responsible WithdrawalsSetup=Direct debit payment setup CreditTransferSetup=Credit transfer setup @@ -42,6 +42,7 @@ CreditTransferStatistics=Credit transfer statistics Rejects=Rejects LastWithdrawalReceipt=Latest %s direct debit receipts MakeWithdrawRequest=Make a direct debit payment request +MakeWithdrawRequestStripe=Make a direct debit payment request via Stripe MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s direct debit payment requests recorded BankTransferRequestsDone=%s credit transfer requests recorded @@ -100,8 +101,11 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, you can go into menu "Bank->Payment by direct debit" to generate and manage a Direct debit order file. +DoStandingOrdersBeforePayments2=You can also send a request directly to a SEPA payment processor like Stripe, ... +DoStandingOrdersBeforePayments3=When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu "Bank->Payment by credit transfer" to generate and manage a Credit transfer order file. +DoCreditTransferBeforePayments3=When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. WithdrawalFile=Debit order file CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" @@ -118,7 +122,7 @@ WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty am SepaMandate=SEPA Direct Debit Mandate SepaMandateShort=SEPA Mandate PleaseReturnMandate=Please return this mandate form by email to %s or by mail to -SEPALegalText=By signing this mandate form, you authorize (A) %s to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank. +SEPALegalText=By signing this mandate form, you authorize (A) %s and its payment service provider to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank. CreditorIdentifier=Creditor Identifier CreditorName=Creditor Name SEPAFillForm=(B) Please complete all the fields marked * diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang index 803a31c9646..a2b6b4c1f95 100644 --- a/htdocs/langs/en_US/workflow.lang +++ b/htdocs/langs/en_US/workflow.lang @@ -22,7 +22,7 @@ descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked sourc descWORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION=Classify linked source purchase order as received when a reception is validated (and if the quantity received by all receptions is the same as in the purchase order to update) descWORKFLOW_ORDER_CLASSIFY_RECEIVED_RECEPTION_CLOSED=Classify linked source purchase order as received when a reception is closed (and if the quantity received by all rceptions is the same as in the purchase order to update) # Autoclassify purchase invoice -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_EXPEDITION_CLASSIFY_CLOSED_INVOICE=Classify receptions to "billed" when a linked purchase invoice is validated (and if the amount of the invoice is the same as the total amount of the linked receptions) # Automatically link ticket to contract descWORKFLOW_TICKET_LINK_CONTRACT=When creating a ticket, link available contracts of matching thirdparty descWORKFLOW_TICKET_USE_PARENT_COMPANY_CONTRACTS=When linking contracts, search among those of parents companies @@ -31,6 +31,6 @@ descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the tic AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification # Autoclassify shipment -descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked shipments) AutomaticClosing=Automatic closing AutomaticLinking=Automatic linking diff --git a/htdocs/langs/en_ZA/members.lang b/htdocs/langs/en_ZA/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/en_ZA/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/en_ZA/projects.lang b/htdocs/langs/en_ZA/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/en_ZA/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_AR/admin.lang b/htdocs/langs/es_AR/admin.lang index 76c93629d16..beedcee5010 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -252,7 +252,6 @@ UpdateServerOffline=Actualizar servidor fuera de línea WithCounter=Administrar un contador AddCRIfTooLong=No hay ajuste de texto automático. El texto que es demasiado largo no será mostrado en el documento. Por favor agregar saltos de línea en el área de texto si es necesario. String=Cuerda -InitEmptyBarCode=Init value for the %s empty barcodes Module30Name=Facturas Module40Desc=Gestión de proveedores y compras (órdenes de compra y facturas de proveedores) Module52Name=Inventarios(Stocks) diff --git a/htdocs/langs/es_AR/commercial.lang b/htdocs/langs/es_AR/commercial.lang index d85913580a1..b8b70ff7a01 100644 --- a/htdocs/langs/es_AR/commercial.lang +++ b/htdocs/langs/es_AR/commercial.lang @@ -60,6 +60,5 @@ Stats=Estadísticas de ventas StatusProsp=Estado del cliente potencial DraftPropals=Presupuestos en borrador ToOfferALinkForOnlineSignature=Vínculo para firma digital -ThisScreenAllowsYouToSignDocFrom=Esta pantalla te permitirá aceptar, firmar o rechazar un presupuesto SignatureProposalRef=Firma del presupuesto %s FeatureOnlineSignDisabled=La funcionalidad para la firma digital está deshabilitada o el documento fue generado antes de habilitar la función diff --git a/htdocs/langs/es_AR/ecm.lang b/htdocs/langs/es_AR/ecm.lang index a668d35a6b8..099dbdbaf6f 100644 --- a/htdocs/langs/es_AR/ecm.lang +++ b/htdocs/langs/es_AR/ecm.lang @@ -15,7 +15,6 @@ ECMNbOfSubDir=Cantidad de sub-carpetas ECMNbOfFilesInSubDir=Cantidad de archivos en sub-carpetas ECMArea=Area SAD/ACE ECMAreaDesc=El área de SAD/ACE (Sistema de Administración de Documentos / Administración de Contenido Electrónico) te permite guardar, compartir y rápidamente buscar todo tipo de documentos en Dolibarr. -ECMAreaDesc2=* Las carpetas automáticas son llenadas automáticamente al agregar documentos desde la ficha de un elemento.
    * Las carpetas manuales pueden ser usadas para guardar documentos no enlazados a un elemento en particular. ECMSectionWasRemoved=Carpeta %s ha sido eliminada. ECMSectionWasCreated=Carpeta %s ha sido creada. ECMSearchByKeywords=Búsqueda por palabras clave diff --git a/htdocs/langs/es_AR/mailmanspip.lang b/htdocs/langs/es_AR/mailmanspip.lang index 700cfd3bb70..840c7e7dd58 100644 --- a/htdocs/langs/es_AR/mailmanspip.lang +++ b/htdocs/langs/es_AR/mailmanspip.lang @@ -7,7 +7,6 @@ MailmanCreationSuccess=La prueba de suscripción se ha ejecutado correctamente MailmanDeletionSuccess=La prueba de desuscripción se ha ejecutado correctamente SynchroMailManEnabled=Será realizada una actualización en la lista de envío de correos SynchroSpipEnabled=Será realizada una actualización en el módulo SPIP -DescADHERENT_MAILMAN_ADMINPW=Contraseña de administrador de Envío de Correos DescADHERENT_MAILMAN_URL=URL para suscripciones a la lista de envío de correos DescADHERENT_MAILMAN_UNSUB_URL=URL para desuscripciones a la lista de envío de correos DescADHERENT_MAILMAN_LISTS=Lista(s) para inscripción automática de nuevos miembros (separados por una coma) diff --git a/htdocs/langs/es_BO/members.lang b/htdocs/langs/es_BO/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_BO/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_BO/projects.lang b/htdocs/langs/es_BO/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_BO/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_CL/accountancy.lang b/htdocs/langs/es_CL/accountancy.lang index 2bff8d60933..9a12ca9824b 100644 --- a/htdocs/langs/es_CL/accountancy.lang +++ b/htdocs/langs/es_CL/accountancy.lang @@ -217,4 +217,3 @@ ToBind=Líneas para enlazar UseMenuToSetBindindManualy=Líneas aún no enlazadas, use el menú %s para hacer el enlace manualmente WarningReportNotReliable=Advertencia, este informe no se basa en el Libro mayor, por lo que no contiene la transacción modificada manualmente en el Libro mayor. Si su publicación está actualizada, la vista de contabilidad es más precisa. ExpenseReportJournal=Diario del informe de gastos -InventoryJournal=Revista de inventario diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index aa792dc23db..7e7c5a27736 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -340,7 +340,6 @@ DefaultLink=Enlace predeterminado ValueOverwrittenByUserSetup=Advertencia, este valor puede ser sobrescrito por la configuración específica del usuario (cada usuario puede establecer su propia URL de clicktodial) BarcodeInitForProductsOrServices=Inicialización o reinicio masivo del código de barras para productos o servicios CurrentlyNWithoutBarCode=Actualmente, tiene %s registros en %s %s sin código de barras definido. -InitEmptyBarCode=Init value for the %s empty barcodes EraseAllCurrentBarCode=Borrar todos los valores actuales del código de barras ConfirmEraseAllCurrentBarCode=¿Seguro que quieres borrar todos los valores actuales del código de barras? AllBarcodeReset=Todos los valores del código de barras han sido eliminados @@ -574,7 +573,6 @@ Permission281=Leer contactos Permission291=Tarifas de lectura Permission292=Establecer permisos sobre las tarifas Permission293=Modificar las tarifas del cliente. -Permission300=Leer codigos de barras Permission301=Crear / modificar códigos de barras Permission311=Leer Servicios Permission312=Asignar servicio / suscripción al contrato diff --git a/htdocs/langs/es_CL/commercial.lang b/htdocs/langs/es_CL/commercial.lang index 33c14696715..2308c317fae 100644 --- a/htdocs/langs/es_CL/commercial.lang +++ b/htdocs/langs/es_CL/commercial.lang @@ -57,6 +57,4 @@ ActionAC_AUTO=Eventos insertados automáticamente Stats=Estadísticas de ventas StatusProsp=Estado de la perspectiva DraftPropals=Cotizaciones borrador -WelcomeOnOnlineSignaturePage=Bienvenido a la página para aceptar propuestas comerciales de %s -ThisScreenAllowsYouToSignDocFrom=Esta pantalla le permite aceptar y firmar, o rechazar, un presupuesto/propuesta comercial SignatureProposalRef=Firma de cotización / propuesta comercial %s diff --git a/htdocs/langs/es_CL/ecm.lang b/htdocs/langs/es_CL/ecm.lang index c8bda73008d..462663342bc 100644 --- a/htdocs/langs/es_CL/ecm.lang +++ b/htdocs/langs/es_CL/ecm.lang @@ -6,7 +6,6 @@ ECMNbOfSubDir=Cantidad de subdirectorios ECMNbOfFilesInSubDir=Número de archivos en subdirectorios ECMArea=Área de DMS / ECM ECMAreaDesc=El área DMS / ECM (Sistema de gestión de documentos / gestión de contenido electrónico) le permite guardar, compartir y buscar rápidamente todo tipo de documentos en Dolibarr. -ECMAreaDesc2=* Los directorios automáticos se rellenan automáticamente al agregar documentos desde la tarjeta de un elemento.
    * Los directorios manuales se pueden usar para guardar documentos no vinculados a un elemento en particular. ECMSectionWasRemoved=El directorio %s ha sido borrado. ECMSectionWasCreated=El directorio %s ha sido creado. ECMNoDirectoryYet=Sin directorio creado diff --git a/htdocs/langs/es_CL/errors.lang b/htdocs/langs/es_CL/errors.lang index 8c45fd1469b..93bfc615ce6 100644 --- a/htdocs/langs/es_CL/errors.lang +++ b/htdocs/langs/es_CL/errors.lang @@ -69,7 +69,6 @@ ErrorFieldValueNotIn=El campo %s : ' %s ' no es un valor e ErrorFieldRefNotIn=Campo %s : ' %s ' no es una referencia %s existente ErrorsOnXLines=Se encontraron errores %s ErrorFileIsInfectedWithAVirus=El programa antivirus no pudo validar el archivo (el archivo podría estar infectado por un virus) -ErrorSpecialCharNotAllowedForField=Los caracteres especiales no están permitidos para el campo "%s" ErrorNumRefModel=Existe una referencia en la base de datos (%s) y no es compatible con esta regla de numeración. Elimine la referencia de registro o renombrada para activar este módulo. ErrorQtyTooLowForThisSupplier=Cantidad demasiado baja para este proveedor o ningún precio definido en este producto para este proveedor ErrorOrdersNotCreatedQtyTooLow=Algunos pedidos no se han creado debido a cantidades demasiado bajas diff --git a/htdocs/langs/es_CL/mailmanspip.lang b/htdocs/langs/es_CL/mailmanspip.lang index 34a39aa742a..fdbf3c00d12 100644 --- a/htdocs/langs/es_CL/mailmanspip.lang +++ b/htdocs/langs/es_CL/mailmanspip.lang @@ -6,7 +6,6 @@ MailmanCreationSuccess=La prueba de suscripción se ejecutó con éxito MailmanDeletionSuccess=La prueba de cancelación se ejecutó con éxito SynchroMailManEnabled=Se realizará una actualización de Mailman SynchroSpipEnabled=Se realizará una actualización de Spip -DescADHERENT_MAILMAN_ADMINPW=Contraseña de administrador de Mailman DescADHERENT_MAILMAN_URL=URL para las suscripciones de Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL para la cancelación de suscripciones de Mailman DescADHERENT_MAILMAN_LISTS=Lista (s) para la inscripción automática de nuevos miembros (separados por una coma) diff --git a/htdocs/langs/es_CL/members.lang b/htdocs/langs/es_CL/members.lang index a226d236563..d8ea715ef45 100644 --- a/htdocs/langs/es_CL/members.lang +++ b/htdocs/langs/es_CL/members.lang @@ -53,7 +53,6 @@ YourMembershipWasValidated=Su membresía fue validada YourMembershipWasCanceled=Su membresía fue cancelada CardContent=Contenido de su tarjeta de miembro ThisIsContentOfYourMembershipRequestWasReceived=Queremos informarle que se recibió su solicitud de membresía.

    -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    ThisIsContentOfSubscriptionReminderEmail=Queremos informarle que su suscripción está a punto de caducar o ya ha caducado (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Esperamos que lo renueven.

    ThisIsContentOfYourCard=Este es un resumen de la información que tenemos sobre usted. Por favor, póngase en contacto con nosotros si algo es incorrecto.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Asunto de la notificación por correo electrónico recibida en caso de autoinscripción de un invitado @@ -85,7 +84,6 @@ MenuMembersStats=Estadística NewMemberbyWeb=Nuevo miembro agregado. Esperando aprobacion NewMemberForm=Nueva forma de miembro TurnoverOrBudget=Volumen de ventas (empresa) o Cotización (asociación o colectivo) -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type MEMBER_NEWFORM_PAYONLINE=Salte en la página integrada de pago en línea MembersStatisticsByProperties=Estadísticas de miembros por naturaleza NoEmailSentToMember=No se envió ningún correo electrónico al miembro diff --git a/htdocs/langs/es_CL/projects.lang b/htdocs/langs/es_CL/projects.lang index aaae5a794c4..7afb36f5a70 100644 --- a/htdocs/langs/es_CL/projects.lang +++ b/htdocs/langs/es_CL/projects.lang @@ -156,6 +156,5 @@ ModuleSalaryToDefineHourlyRateMustBeEnabled=El módulo 'Salarios' debe e NewTaskRefSuggested=Referencia de tarea ya utilizada, se requiere una nueva referencia de tarea TimeSpentForIntervention=Tiempo dedicado TimeSpentForInvoice=Tiempo dedicado -ServiceToUseOnLines=Service to use on lines by default InvoiceGeneratedFromTimeSpent=La factura %s se ha generado desde el tiempo invertido en el proyecto UsageBillTimeShort=Uso: Bill time diff --git a/htdocs/langs/es_CL/ticket.lang b/htdocs/langs/es_CL/ticket.lang index c1f9984feda..3cec391874a 100644 --- a/htdocs/langs/es_CL/ticket.lang +++ b/htdocs/langs/es_CL/ticket.lang @@ -60,7 +60,6 @@ TicketAssigned=Ticket ahora está asignado TicketChangeCategory=Cambiar código analítico TicketChangeSeverity=Cambiar severidad TicketAddMessage=Añade un mensaje -AddMessage=Añade un mensaje MessageSuccessfullyAdded=Ticket agregado TicketMessageSuccessfullyAdded=Mensaje agregado con éxito TicketMessagesList=Lista de mensajes @@ -73,8 +72,6 @@ TicketDurationAutoInfos=Duración calculada automáticamente a partir de interve SendMessageByEmail=Enviar mensaje por correo electrónico ErrorMailRecipientIsEmptyForSendTicketMessage=El destinatario está vacío. Sin enviar correo electrónico TicketMessageMailIntroHelp=Este texto se agrega solo al comienzo del correo electrónico y no se guardará. -TicketMessageMailSignatureHelp=Este texto se agrega solo al final del correo electrónico y no se guardará. -TicketMessageMailSignatureLabelAdmin=Firma del correo electrónico de respuesta TicketMessageHelp=Solo este texto se guardará en la lista de mensajes en la tarjeta de Tickets. TicketTimeToRead=Tiempo transcurrido antes de leer TicketContacts=Ticket de contactos diff --git a/htdocs/langs/es_CO/accountancy.lang b/htdocs/langs/es_CO/accountancy.lang index 8e9afa1c3f8..43dd8df9360 100644 --- a/htdocs/langs/es_CO/accountancy.lang +++ b/htdocs/langs/es_CO/accountancy.lang @@ -33,7 +33,6 @@ GroupIsEmptyCheckSetup=El grupo está vacío, verifique la configuración del gr DetailByAccount=Mostrar detalle por cuenta AccountWithNonZeroValues=Cuentas con valores distintos de cero. CountriesInEECExceptMe=Países en EEC excepto %s -ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy.
    The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...). MainAccountForCustomersNotDefined=Cuenta contable principal para clientes no definidos en la configuración. MainAccountForSuppliersNotDefined=Cuenta de contabilidad principal para proveedores no definidos en la configuración. MainAccountForUsersNotDefined=Cuenta de contabilidad principal para usuarios no definidos en la configuración. @@ -215,7 +214,6 @@ AccountingAccountForSalesTaxAreDefinedInto=Nota: la cuenta contable del impuesto NumberOfAccountancyMovements=Numero de movimientos ACCOUNTING_DISABLE_BINDING_ON_SALES=Deshabilitar la vinculación y la transferencia en la contabilidad de las ventas (las facturas de los clientes no se tendrán en cuenta en la contabilidad) ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Deshabilite la vinculación y transferencia en contabilidad en compras (las facturas de proveedores no se tendrán en cuenta en la contabilidad) -NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible) ExportDraftJournal=Exportar borrador de revista Selectmodelcsv=Selecciona un modelo de exportación. Modelcsv_CEGID=Exportación para CEGID Expert Comptabilité @@ -277,4 +275,3 @@ FECFormatCredit=Crédito (crédito) DateExport=Exportación de fecha WarningReportNotReliable=Advertencia, este informe no se basa en el Libro mayor, por lo que no contiene la transacción modificada manualmente en el Libro mayor. Si su publicación está actualizada, la vista de contabilidad es más precisa. ExpenseReportJournal=Diario de informe de gastos -InventoryJournal=Diario de inventario diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index d6fec62304b..4ca8b5f0aa3 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -362,7 +362,6 @@ ValueOverwrittenByUserSetup=Advertencia, este valor puede ser sobrescrito por la BarcodeInitForThirdparties=init para código de barras masivo para terceros BarcodeInitForProductsOrServices=Código de barras masivo de inicio o reinicio para productos o servicios. CurrentlyNWithoutBarCode=Actualmente, tienes el registro %s en %s %s sin un código de barras definido. -InitEmptyBarCode=Init value for the %s empty barcodes EraseAllCurrentBarCode=Borrar todos los valores de código de barras actuales ConfirmEraseAllCurrentBarCode=¿Está seguro de que desea borrar todos los valores de código de barras actuales? AllBarcodeReset=Todos los valores de código de barras han sido eliminados @@ -1308,7 +1307,6 @@ ActivateFCKeditor=Activar editor avanzado para: FCKeditorForNotePublic=Creación / edición WYSIWIG del campo "notas públicas" de elementos FCKeditorForNotePrivate=Creación / edición WYSIWIG del campo "notas privadas" de elementos FCKeditorForCompany=Creación / edición WYSIWIG de la descripción de campo de elementos (excepto productos / servicios) -FCKeditorForProduct=Creación / edición WYSIWIG de la descripción de campo de productos / servicios FCKeditorForProductDetails=WYSIWIG creación / edición de líneas de detalle de productos para todas las entidades (propuestas, pedidos, facturas, etc ...). Advertencia: El uso de esta opción para este caso no se recomienda seriamente, ya que puede crear problemas con caracteres especiales y formato de página al crear archivos PDF. FCKeditorForMailing=Creación / edición WYSIWIG para eMailings masivos (Herramientas-> eMailing) FCKeditorForUserSignature=Creación / edición WYSIWIG de la firma del usuario. diff --git a/htdocs/langs/es_CO/commercial.lang b/htdocs/langs/es_CO/commercial.lang index 4ecf1bf3338..a682aab5fd4 100644 --- a/htdocs/langs/es_CO/commercial.lang +++ b/htdocs/langs/es_CO/commercial.lang @@ -53,8 +53,5 @@ Stats=Estadísticas de ventas StatusProsp=Estado cliente potencial DraftPropals=Borrador de propuestas comerciales ToOfferALinkForOnlineSignature=Enlace para firma en línea -WelcomeOnOnlineSignaturePage=Bienvenido a la página para aceptar propuestas comerciales de %s -ThisScreenAllowsYouToSignDocFrom=Esta pantalla le permite aceptar y firmar, o rechazar, una cotización / propuesta comercial -ThisIsInformationOnDocumentToSign=Esta es información en el documento para aceptar o rechazar SignatureProposalRef=Firma de cotización / propuesta comercial %s FeatureOnlineSignDisabled=Característica para la firma en línea deshabilitada o documento generado antes de que se habilitara la característica diff --git a/htdocs/langs/es_CO/ecm.lang b/htdocs/langs/es_CO/ecm.lang index 8e5fb615fc0..27f9ce5dd7b 100644 --- a/htdocs/langs/es_CO/ecm.lang +++ b/htdocs/langs/es_CO/ecm.lang @@ -6,7 +6,6 @@ ECMCreationDate=Fecha de creación ECMNbOfFilesInSubDir=Número de archivos en subdirectorios ECMArea=Área DMS / ECM ECMAreaDesc=El área DMS / ECM (Document Management System / Electronic Content Management) permite guardar, compartir y buscar rápidamente todo tipo de documentos en Dolibarr. -ECMAreaDesc2=* Los directorios automáticos se llenan automáticamente al agregar documentos desde la tarjeta de un elemento.
    * Los directorios manuales se pueden usar para guardar documentos que no están vinculados a un elemento en particular. ECMSectionWasRemoved=El directorio %s ha sido eliminado. ECMSectionWasCreated=Se ha creado el directorio %s . ECMNoDirectoryYet=No se creó ningún directorio diff --git a/htdocs/langs/es_CO/errors.lang b/htdocs/langs/es_CO/errors.lang index 2e958b678d9..23b931b6d88 100644 --- a/htdocs/langs/es_CO/errors.lang +++ b/htdocs/langs/es_CO/errors.lang @@ -73,7 +73,6 @@ ErrorWrongValueForField=El campo %s: '%s' no coincide con la regla ErrorFieldValueNotIn=El campo %s : ' %s ' no es un valor que se encuentra en el campo %s de %s ErrorFieldRefNotIn=El campo%s: '%s' no es una referia existente %s ErrorFileIsInfectedWithAVirus=El programa antivirus no pudo validar el archivo (el archivo podría estar infectado por un virus) -ErrorSpecialCharNotAllowedForField=No se permiten caracteres especiales para el campo "%s" ErrorNumRefModel=Existe una referencia en la base de datos (%s) y no es compatible con esta regla de numeración. Elimine el registro o la referencia renombrada para activar este módulo. ErrorQtyTooLowForThisSupplier=Cantidad demasiado baja para este proveedor o ningún precio definido en este producto para este proveedor ErrorOrdersNotCreatedQtyTooLow=Algunos pedidos no se han creado debido a cantidades demasiado bajas. diff --git a/htdocs/langs/es_CO/mailmanspip.lang b/htdocs/langs/es_CO/mailmanspip.lang index 98090117641..eaf04c1a531 100644 --- a/htdocs/langs/es_CO/mailmanspip.lang +++ b/htdocs/langs/es_CO/mailmanspip.lang @@ -6,7 +6,6 @@ MailmanCreationSuccess=La prueba de suscripción se ejecutó con éxito MailmanDeletionSuccess=La prueba de cancelación de suscripción se ejecutó con éxito SynchroMailManEnabled=Se realizará una actualización de Mailman SynchroSpipEnabled=Se realizará una actualización de Spip -DescADHERENT_MAILMAN_ADMINPW=Contraseña de administrador de Mailman DescADHERENT_MAILMAN_URL=URL de las suscripciones de Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL para darse de baja de Mailman DescADHERENT_MAILMAN_LISTS=Lista(s) para la inscripción automática de nuevos miembros (separados por coma) diff --git a/htdocs/langs/es_CO/projects.lang b/htdocs/langs/es_CO/projects.lang index d7d0f29d616..2535094af83 100644 --- a/htdocs/langs/es_CO/projects.lang +++ b/htdocs/langs/es_CO/projects.lang @@ -186,7 +186,6 @@ NewTaskRefSuggested=La referencia de tarea ya se usó, se requiere una nueva ref TimeSpentInvoiced=Tiempo invertido facturado TimeSpentForIntervention=Tiempo usado TimeSpentForInvoice=Tiempo usado -ServiceToUseOnLines=Service to use on lines by default InvoiceGeneratedFromTimeSpent=La factura %s se ha generado a partir del tiempo dedicado al proyecto InterventionGeneratedFromTimeSpent=La intervención %s se ha generado a partir del tiempo dedicado al proyecto ProjectBillTimeDescription=Verifique si ingresa la hoja de tiempo en las tareas del proyecto Y planea generar factura(s) a partir de la hoja de tiempo para facturar al cliente del proyecto (no verifique si planea crear una factura que no se base en las hojas de tiempo ingresadas). Nota: Para generar factura, vaya a la pestaña 'Tiempo invertido' del proyecto y seleccione las líneas para incluir. diff --git a/htdocs/langs/es_CO/ticket.lang b/htdocs/langs/es_CO/ticket.lang index 02301c15de2..ea3d8b55ff9 100644 --- a/htdocs/langs/es_CO/ticket.lang +++ b/htdocs/langs/es_CO/ticket.lang @@ -77,7 +77,6 @@ TicketChangeType=Tipo de cambio TicketChangeCategory=Cambiar el código analítico TicketChangeSeverity=Cambiar la gravedad TicketAddMessage=Añade un mensaje -AddMessage=Añade un mensaje MessageSuccessfullyAdded=Ticket agregado TicketMessageSuccessfullyAdded=Mensaje agregado exitosamente TicketMessagesList=Lista de mensajes @@ -93,8 +92,6 @@ SendMessageByEmail=Enviar mensaje por correo electrónico ErrorMailRecipientIsEmptyForSendTicketMessage=El destinatario está vacío. No enviar correo electrónico TicketGoIntoContactTab=Vaya a la pestaña "Contactos" para seleccionarlos. TicketMessageMailIntroHelp=Este texto se agrega solo al comienzo del correo electrónico y no se guardará. -TicketMessageMailSignatureHelp=Este texto se agrega solo al final del correo electrónico y no se guardará. -TicketMessageMailSignatureLabelAdmin=Firma del correo electrónico de respuesta TicketMessageHelp=Solo este texto se guardará en la lista de mensajes de la tarjeta del ticket. TicketTimeToRead=Tiempo transcurrido antes de leer TicketContacts=Ticket de contactos diff --git a/htdocs/langs/es_CO/workflow.lang b/htdocs/langs/es_CO/workflow.lang index 326b17aadd9..aee62bbc20c 100644 --- a/htdocs/langs/es_CO/workflow.lang +++ b/htdocs/langs/es_CO/workflow.lang @@ -14,5 +14,4 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasifique el pedido de ventas de o descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED=Clasifique el pedido de venta de origen vinculado como enviado cuando se cierra un envío (y si la cantidad enviada por todos los envíos es la misma que en el pedido para actualizar) descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasifique la propuesta del proveedor de origen vinculado como facturada cuando se valida la factura del proveedor (y si el monto de la factura es el mismo que el monto total de la propuesta vinculada) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasifique el pedido de compra de origen vinculado como facturado cuando se valida la factura del proveedor (y si el monto de la factura es el mismo que el monto total del pedido vinculado) -descWORKFLOW_BILL_ON_RECEPTION=Clasifique las recepciones como "facturadas" cuando un pedido de proveedor vinculado is validado descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Clasifique el envío de origen vinculado como cerrado cuando se valida la factura del cliente diff --git a/htdocs/langs/es_DO/members.lang b/htdocs/langs/es_DO/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_DO/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_DO/projects.lang b/htdocs/langs/es_DO/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_DO/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_EC/accountancy.lang b/htdocs/langs/es_EC/accountancy.lang index 56a5c3e928d..b24e09e5bb2 100644 --- a/htdocs/langs/es_EC/accountancy.lang +++ b/htdocs/langs/es_EC/accountancy.lang @@ -229,4 +229,3 @@ ToBind=Líneas para atar UseMenuToSetBindindManualy=Líneas aún no enlazadas, use el menú %s para hacer el enlace manualmente. WarningReportNotReliable=Advertencia, este informe no se basa en el Libro mayor, por lo que no contiene la transacción modificada manualmente en el Libro mayor. Si su publicación está actualizada, la vista de contabilidad es más precisa. ExpenseReportJournal=Diario del informe de gastos -InventoryJournal=Diario de inventario diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index 96820c4587e..6286debaffd 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -335,7 +335,6 @@ ValueOverwrittenByUserSetup=Advertencia: este valor puede ser sobrescrito por la BarcodeInitForThirdparties=Inicio masivo de código de barras para terceros. BarcodeInitForProductsOrServices=Inicio de código de barras masivo o restablecimiento de productos o servicios CurrentlyNWithoutBarCode=Actualmente, tiene %s registrado en %s %s sin código de barras definido. -InitEmptyBarCode=Init value for the %s empty barcodes EraseAllCurrentBarCode=Borrar todos los valores de códigos de barras actuales ConfirmEraseAllCurrentBarCode=¿Está seguro de que desea borrar todos los valores de códigos de barras actuales? AllBarcodeReset=Todos los valores de código de barras se han eliminado @@ -586,7 +585,6 @@ Permission282=Crear / modificar contactos Permission291=Leer tarifas Permission292=Establecer permisos en las tarifas Permission293=Modificar las tarifas del cliente. -Permission300=Leer codigos de barras Permission301=Crear / modificar códigos de barras Permission311=Leer servicios Permission312=Asignar servicio / suscripción al contrato. diff --git a/htdocs/langs/es_EC/commercial.lang b/htdocs/langs/es_EC/commercial.lang index 85789b47b39..ee890081cfd 100644 --- a/htdocs/langs/es_EC/commercial.lang +++ b/htdocs/langs/es_EC/commercial.lang @@ -60,6 +60,4 @@ ActionAC_OTH_AUTOShort=Automático Stats=Estadísticas de ventas StatusProsp=Estado del prospecto DraftPropals=Proyecto de propuestas comerciales -WelcomeOnOnlineSignaturePage=Bienvenido a la página para aceptar propuestas comerciales de %s -ThisScreenAllowsYouToSignDocFrom=Esta pantalla le permite aceptar y firmar, o rechazar, una propuesta de cotización/comercial SignatureProposalRef=Firma de cotización/propuesta comercial %s. diff --git a/htdocs/langs/es_EC/ecm.lang b/htdocs/langs/es_EC/ecm.lang index 7f8d9157910..0fea60981c8 100644 --- a/htdocs/langs/es_EC/ecm.lang +++ b/htdocs/langs/es_EC/ecm.lang @@ -5,7 +5,6 @@ ECMCreationDate=Fecha de creación ECMNbOfFilesInSubDir=Número de archivos en subdirectorios ECMArea=Área de DMS/ECM ECMAreaDesc=El área SGD/GCE (Sistema de Gestión de Documentos / Gestión de Contenido Electrónico) le permite guardar, compartir y buscar rápidamente todo tipo de documentos en Dolibarr. -ECMAreaDesc2=* Los directorios automáticos se rellenan automáticamente al agregar documentos desde la tarjeta de un elemento.
    * Los directorios manuales se pueden utilizar para guardar documentos no vinculados a un elemento en particular. ECMSectionWasRemoved=Se ha eliminado el directorio %s. ECMSectionWasCreated=Directorio %s ha sido creado. ECMSearchByKeywords=Búsqueda por palabras clave diff --git a/htdocs/langs/es_EC/errors.lang b/htdocs/langs/es_EC/errors.lang index 87dd8507320..ae701afac8d 100644 --- a/htdocs/langs/es_EC/errors.lang +++ b/htdocs/langs/es_EC/errors.lang @@ -64,7 +64,6 @@ ErrorWrongValueForField=El campo %s: '%s' no coincide con la expre ErrorFieldValueNotIn=El campo %s: '%s' no es un valor que se encuentra en el campo %s de %s ErrorFieldRefNotIn=Campo %s: '%s' no es una %s referencia existente ErrorFileIsInfectedWithAVirus=El programa antivirus no pudo validar el archivo (el archivo podría estar infectado por un virus) -ErrorSpecialCharNotAllowedForField=No se permiten caracteres especiales para el campo "%s" ErrorNumRefModel=Existe una referencia en la base de datos (%s) y no es compatible con esta regla de numeración. Elimine la referencia de registro o renombrado para activar este módulo. ErrorQtyTooLowForThisSupplier=Cantidad demasiado baja para este proveedor o ningún precio definido en este producto para este proveedor ErrorOrdersNotCreatedQtyTooLow=Algunos pedidos no se han creado debido a cantidades demasiado bajas diff --git a/htdocs/langs/es_EC/mailmanspip.lang b/htdocs/langs/es_EC/mailmanspip.lang index 6b8fb02ecff..dc6431a176e 100644 --- a/htdocs/langs/es_EC/mailmanspip.lang +++ b/htdocs/langs/es_EC/mailmanspip.lang @@ -6,7 +6,6 @@ MailmanCreationSuccess=La prueba de suscripción se ejecutó correctamente MailmanDeletionSuccess=La prueba de cancelación de la suscripción se ejecutó correctamente SynchroMailManEnabled=Se realizará una actualización Mailman SynchroSpipEnabled=Se realizará una actualización de Spip -DescADHERENT_MAILMAN_ADMINPW=Contraseña del administrador de Mailman DescADHERENT_MAILMAN_URL=URL para las suscripciones de Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL para cancelación de suscripciones de Mailman DescADHERENT_MAILMAN_LISTS=Lista(s) para la inscripción automática de nuevos miembros (separados por una coma) diff --git a/htdocs/langs/es_EC/projects.lang b/htdocs/langs/es_EC/projects.lang index 7ac28478c77..c87a5444272 100644 --- a/htdocs/langs/es_EC/projects.lang +++ b/htdocs/langs/es_EC/projects.lang @@ -165,7 +165,6 @@ NewTaskRefSuggested=Referencia de tarea ya utilizada, se requiere una nueva refe TimeSpentInvoiced=Tiempo gastado facturado TimeSpentForIntervention=Tiempo usado TimeSpentForInvoice=Tiempo usado -ServiceToUseOnLines=Service to use on lines by default InvoiceGeneratedFromTimeSpent=La factura %s se ha generado a partir del tiempo dedicado al proyecto ProjectBillTimeDescription=Verifique si ingresa la hoja de tiempo en las tareas del proyecto Y planea generar factura(s) de la hoja de tiempo para facturar al cliente del proyecto (no verifique si planea crear una factura que no se base en las hojas de tiempo ingresadas). Nota: Para generar la factura, vaya a la pestaña 'Tiempo empleado' del proyecto y seleccione las líneas para incluir. UsageBillTimeShort=Uso: Tiempo a facturar diff --git a/htdocs/langs/es_EC/ticket.lang b/htdocs/langs/es_EC/ticket.lang index 657aba67728..1580632c9ad 100644 --- a/htdocs/langs/es_EC/ticket.lang +++ b/htdocs/langs/es_EC/ticket.lang @@ -53,7 +53,6 @@ TicketAssigned=Ticket ahora está asignado TicketChangeCategory=Cambiar código analítico TicketChangeSeverity=Cambiar severidad TicketAddMessage=Añade un mensaje -AddMessage=Añade un mensaje MessageSuccessfullyAdded=Ticket agregado TicketMessageSuccessfullyAdded=Mensaje agregado con éxito TicketMessagesList=Lista de mensajes @@ -65,9 +64,6 @@ TicketDurationAutoInfos=Duración calculada automáticamente a partir de interve SendMessageByEmail=Enviar mensaje por correo electrónico ErrorMailRecipientIsEmptyForSendTicketMessage=El destinatario está vacío. No se envio el correo electrónico TicketMessageMailIntroHelp=Este texto se agrega solo al comienzo del correo electrónico y no se guardará. -TicketMessageMailSignatureHelp=Este texto se agrega solo al final del correo electrónico y no se guardará. -TicketMessageMailSignatureLabelAdmin=Firma del correo electrónico de respuesta -TicketMessageMailSignatureHelpAdmin=Este texto se inserta después del mensaje de respuesta. TicketMessageHelp=Solo este texto se guardará en la lista de mensajes en la tarjeta de tickets. TicketTimeToRead=Tiempo transcurrido antes de leer TicketContacts=Boleto de contactos diff --git a/htdocs/langs/es_ES/commercial.lang b/htdocs/langs/es_ES/commercial.lang index 5fe49a5b4f4..8292b6391d6 100644 --- a/htdocs/langs/es_ES/commercial.lang +++ b/htdocs/langs/es_ES/commercial.lang @@ -68,13 +68,22 @@ ActionAC_OTH_AUTO=Eventos creados automáticamente ActionAC_MANUAL=Eventos creados manualmente ActionAC_AUTO=Eventos creados automáticamente ActionAC_OTH_AUTOShort=Auto +ActionAC_EVENTORGANIZATION=Eventos de organización Stats=Estadísticas de venta StatusProsp=Estado prospección DraftPropals=Presupuestos borrador NoLimit=Sin límite ToOfferALinkForOnlineSignature=Enlace para la firma en línea -WelcomeOnOnlineSignaturePage=Bienvenido a la página para aceptar presupuestos de %s -ThisScreenAllowsYouToSignDocFrom=Esta pantalla le permite aceptar y firmar, o rechazar, una presupuesto/propuesta comercial -ThisIsInformationOnDocumentToSign=Esta es la información del documento para aceptar o rechazar +WelcomeOnOnlineSignaturePageProposal=Bienvenido a la página para firmar presupuestos de %s +WelcomeOnOnlineSignaturePageContract=Bienvenido a la página para firmar contratos de %s +WelcomeOnOnlineSignaturePageFichinter=Bienvenido a la página para firmar intervenciones de %s +ThisScreenAllowsYouToSignDocFromProposal=Esta página permite aceptar y firmar o rechazar un presupuesto o propuesta comercial. +ThisScreenAllowsYouToSignDocFromContract=Esta página permite aceptar y firmar el contrato PDF online. +ThisScreenAllowsYouToSignDocFromFichinter=Esta página permite aceptar y firmar una intervención en formato PDF online. +ThisIsInformationOnDocumentToSignProposal=Esta es la información del presupuesto para aceptar o rechazar +ThisIsInformationOnDocumentToSignContract=Esta es la información del contrato a firmar +ThisIsInformationOnDocumentToSignFichinter=Esta es la información de la intervención a firmar SignatureProposalRef=Firma del presupuesto/propuesta comercial %s +SignatureContractRef=Firma del contrato %s +SignatureFichinterRef=Firma de la intervención %s FeatureOnlineSignDisabled=Característica para la firma en línea inhabilitada o documento generado antes de que se habilitara la característica diff --git a/htdocs/langs/es_ES/interventions.lang b/htdocs/langs/es_ES/interventions.lang index 83471928031..b335c533713 100644 --- a/htdocs/langs/es_ES/interventions.lang +++ b/htdocs/langs/es_ES/interventions.lang @@ -66,3 +66,8 @@ RepeatableIntervention=Plantilla de intervención ToCreateAPredefinedIntervention=Para crear una intervención predefinida o recurrente, cree una intervención común y conviértala en plantilla de intervención ConfirmReopenIntervention=¿Está seguro de querer volver a abrir la intervención %s ? GenerateInter=Generar intervención +FichinterNoContractLinked=La intervención %s se ha creado sin un contacto vinculado. +ErrorFicheinterCompanyDoesNotExist=La compañía no existe, la intervención no se ha creado. +NextDateToIntervention=Fecha para la próxima generación de intervención +AllowOnlineSign=Permitir firma online +AllowExternalDownload=Permitir descarga externa \ No newline at end of file diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 2af1c00c5cf..00488783f8a 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -926,6 +926,7 @@ DirectDownloadInternalLink=Enlace de descarga privado PrivateDownloadLinkDesc=Debe iniciar sesión y necesita permisos para ver o descargar el archivo Download=Descargar DownloadDocument=Descargar el documento +DownloadSignedDocument=Descargar el documento firmado ActualizeCurrency=Actualizar el tipo de cambio Fiscalyear=Año fiscal ModuleBuilder=Módulo Builder diff --git a/htdocs/langs/es_ES/propal.lang b/htdocs/langs/es_ES/propal.lang index 2f31aab4e89..159daf31178 100644 --- a/htdocs/langs/es_ES/propal.lang +++ b/htdocs/langs/es_ES/propal.lang @@ -103,11 +103,15 @@ IdProposal=ID de Presupuesto IdProduct=ID del Producto LineBuyPriceHT=Precio de compra Importe neto de impuestos por línea SignPropal=Aceptar presupuesto +SignContract=Firmar contrato +SignFichinter=Firmar intervención RefusePropal=Rechazar presupuesto Sign=Firma NoSign=Establecer no firmado PropalAlreadySigned=Presupuesto ya aceptado PropalAlreadyRefused=Presupuesto ya rechazado PropalSigned=Presupuesto aceptado +ContractSigned=Contrato firmado +FichinterSigned=Intervención firmada PropalRefused=Presupuesto rechazado ConfirmRefusePropal=¿Está seguro de querer rechazar este presupuesto? diff --git a/htdocs/langs/es_GT/members.lang b/htdocs/langs/es_GT/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_GT/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_GT/projects.lang b/htdocs/langs/es_GT/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_GT/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_HN/members.lang b/htdocs/langs/es_HN/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_HN/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_HN/projects.lang b/htdocs/langs/es_HN/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_HN/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_MX/accountancy.lang b/htdocs/langs/es_MX/accountancy.lang index 1ae2423f16f..ef79a5fabff 100644 --- a/htdocs/langs/es_MX/accountancy.lang +++ b/htdocs/langs/es_MX/accountancy.lang @@ -125,4 +125,3 @@ ExportDraftJournal=Exportar borrador de diario SomeMandatoryStepsOfSetupWereNotDone=Algunos pasos obligatorios de la instalación no se realizaron, favor de completar ExportNotSupported=El formato de exportación configurado no se admite en esta página NoJournalDefined=Ningún diario definido -InventoryJournal=Diario de inventario diff --git a/htdocs/langs/es_MX/admin.lang b/htdocs/langs/es_MX/admin.lang index 8c57272b7ea..4097de49b9f 100644 --- a/htdocs/langs/es_MX/admin.lang +++ b/htdocs/langs/es_MX/admin.lang @@ -238,7 +238,6 @@ ExtrafieldSelectList =Seleccionar de la tabla ComputedFormula=Campo calculado Computedpersistent=Almacenar campo calculado SetAsDefault=Establecer como predeterminado -InitEmptyBarCode=Init value for the %s empty barcodes ClickToShowDescription=Haga clic para mostrar la descripción DependsOn=Este módulo necesita los módulo(s) WarningSettingSortOrder=Advertencia, establecer un orden predeterminado puede resultar en un error técnico al pasar a la página de lista si "campo" es un campo desconocido. Si experimenta un error de este tipo, vuelva a esta página para eliminar el orden predeterminado y restaurar el comportamiento predeterminado. diff --git a/htdocs/langs/es_PA/members.lang b/htdocs/langs/es_PA/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_PA/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_PA/projects.lang b/htdocs/langs/es_PA/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_PA/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_PE/members.lang b/htdocs/langs/es_PE/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_PE/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_PY/members.lang b/htdocs/langs/es_PY/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_PY/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_PY/projects.lang b/htdocs/langs/es_PY/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_PY/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_US/members.lang b/htdocs/langs/es_US/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_US/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_US/projects.lang b/htdocs/langs/es_US/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_US/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_UY/members.lang b/htdocs/langs/es_UY/members.lang deleted file mode 100644 index 5f7a2ff4020..00000000000 --- a/htdocs/langs/es_UY/members.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - members -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.

    -CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type diff --git a/htdocs/langs/es_UY/projects.lang b/htdocs/langs/es_UY/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_UY/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/es_VE/admin.lang b/htdocs/langs/es_VE/admin.lang index 33ac1c8513d..5ac3d8e921b 100644 --- a/htdocs/langs/es_VE/admin.lang +++ b/htdocs/langs/es_VE/admin.lang @@ -5,7 +5,6 @@ ConfirmPurgeSessions=¿De verdad quieres purgar todas las sesiones? Esto descone SetupArea=Parametrizaje NotConfigured=Módulo / Aplicación no configurada GenericMaskCodes3=Cualquier otro carácter en la máscara se quedará sin cambios.
    No se permiten espacios
    -InitEmptyBarCode=Init value for the %s empty barcodes Module1780Desc=Crear etiquetas/Categoría (Productos, clientes, proveedores, contactos y miembros) Permission254=Modificar la contraseña de otros usuarios Permission255=Eliminar o desactivar otros usuarios diff --git a/htdocs/langs/es_VE/projects.lang b/htdocs/langs/es_VE/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/es_VE/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index a04f84af674..d9c277fcdf6 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -72,7 +72,6 @@ ExtrafieldCheckBoxFromList=Les cases à cocher du tableau ExtrafieldLink=Lier à un objet LibraryToBuildPDF=Bibliothèque utilisée pour la génération de PDF CurrentlyNWithoutBarCode=Actuellement, vous avez %s enregistrements sur %s %s sans code à barres défini. -InitEmptyBarCode=Init value for the %s empty barcodes ConfirmEraseAllCurrentBarCode=Êtes-vous sûr de vouloir effacer toutes les valeurs actuelles du code-barres? EnableFileCache=Activer le cache de fichiers DisplayCompanyManagers=Afficher les noms des gestionnaires diff --git a/htdocs/langs/fr_CA/commercial.lang b/htdocs/langs/fr_CA/commercial.lang index fe52f49e25d..0f68fbd09db 100644 --- a/htdocs/langs/fr_CA/commercial.lang +++ b/htdocs/langs/fr_CA/commercial.lang @@ -9,5 +9,3 @@ SaleRepresentativesOfThirdParty=Représentants commerciaux de tiers LastDoneTasks=Dernières %s actions complétées LastActionsToDo=Le plus ancien %s actions non complétées ActionAC_OTH_AUTO=Événements insérés automatiquement -ThisScreenAllowsYouToSignDocFrom=Cet écran vous permet d'accepter et signer ou de refuser le devis ou la proposition commerciale -ThisIsInformationOnDocumentToSign=Ceci est une information sur le document à accepter ou à refuser diff --git a/htdocs/langs/fr_CA/ecm.lang b/htdocs/langs/fr_CA/ecm.lang index d660995b9f5..c6a678b714f 100644 --- a/htdocs/langs/fr_CA/ecm.lang +++ b/htdocs/langs/fr_CA/ecm.lang @@ -5,7 +5,6 @@ ECMSectionsManual=Arbre manuel ECMSectionsAuto=Arbre automatique ECMAddSection=Ajouter un répertoire ECMCreationDate=Date création -ECMAreaDesc2=* Les répertoires automatiques sont remplis automatiquement lors de l'ajout de documents à partir d'une carte d'un élément.
    * Les répertoires manuels peuvent être utilisés pour enregistrer des documents non liés à un élément particulier. ECMSectionWasRemoved=Le répertoire %s a été supprimé. ECMSectionOfDocuments=Répertoires de documents ShowECMSection=Afficher le répertoire diff --git a/htdocs/langs/fr_CA/errors.lang b/htdocs/langs/fr_CA/errors.lang index 86d639a66e5..2560a86fb1b 100644 --- a/htdocs/langs/fr_CA/errors.lang +++ b/htdocs/langs/fr_CA/errors.lang @@ -51,7 +51,6 @@ ErrorLDAPMakeManualTest=Un fichier .ldif a été généré dans le répertoire % ErrorModuleRequireJavascript=Javascript ne doit pas être désactivé pour que cette fonction fonctionne. Pour activer / désactiver Javascript, accédez au menu Accueil-> Configuration-> Affichage. ErrorPasswordsMustMatch=Les deux mots de passe dactylographiés doivent correspondre les uns aux autres ErrorFileIsInfectedWithAVirus=Le programme antivirus n'a pas pu valider le fichier (le fichier peut être infecté par un virus) -ErrorSpecialCharNotAllowedForField=Les caractères spéciaux ne sont pas autorisés pour le champ "%s" ErrorNumRefModel=Une référence existe dans la base de données (%s) et n'est pas compatible avec cette règle de numérotation. Supprimez l'enregistrement ou la renommée référence pour activer ce module. ErrorBadMaskBadRazMonth=Erreur, mauvaise valeur de réinitialisation ErrorCounterMustHaveMoreThan3Digits=Le compteur doit avoir plus de 3 chiffres diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 83d10982ca2..53edef4c0a1 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -59,6 +59,7 @@ MainAccountForSuppliersNotDefined=Compte comptable général pour les fournisseu MainAccountForUsersNotDefined=Compte comptable général pour les utilisateurs non défini dans la configuration MainAccountForVatPaymentNotDefined=Compte comptable général pour les paiements de TVA non défini dans la configuration MainAccountForSubscriptionPaymentNotDefined=Le compte comptable général des paiements de cotisations n'est pas défini dans la configuration +UserAccountNotDefined=Compte comptable pour l'utilisateur non défini dans la configuration AccountancyArea=Espace comptabilité AccountancyAreaDescIntro=L'utilisation du module de comptabilité se fait en plusieurs étapes: @@ -185,7 +186,7 @@ ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Compte comptable pour enregistrer les ad ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Compte comptable par défaut pour les acomptes clients UseAuxiliaryAccountOnCustomerDeposit=Enregistrer le compte client comme compte individuel dans le grand livre auxiliaire pour les lignes d'acompte (si désactivé, le compte individuel pour les lignes d'acompte restera vide) ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT=Compte comptable par défaut pour enregistrer l'acompte fournisseur -UseAuxiliaryAccountOnSupplierDeposit=Store supplier account as individual account in subsidiary ledger for lines of down payments (if disabled, individual account for down payment lines will remain empty) +UseAuxiliaryAccountOnSupplierDeposit=Stocker le compte fournisseur comme compte individuel dans le grand livre auxiliaire pour les lignes d'acomptes (si désactivé, le compte individuel pour les lignes d'acompte restera vide) ACCOUNTING_PRODUCT_BUY_ACCOUNT=Compte comptable par défaut pour les produits achetés (utilisé si non défini dans la fiche produit) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Compte comptable par défaut pour les produits achetés dans la CEE (utilisé si non défini dans la fiche produit) @@ -286,7 +287,7 @@ DescClosure=Consultez ici le nombre de mouvements par mois non encore validés & OverviewOfMovementsNotValidated=Aperçu des mouvements non validés et verrouillés AllMovementsWereRecordedAsValidated=Tous les mouvements ont été enregistrés comme validés et ont été verrouillés NotAllMovementsCouldBeRecordedAsValidated=Certains mouvements n'ont pas pu être enregistrés comme validés et n'ont pas été verrouillés -ValidateMovements=Valider et verrouiller l'enregistrement... +ValidateMovements=Valider et verrouiller les mouvements... DescValidateMovements=Toute modification ou suppression d'écriture, de lettrage et de suppression sera interdite. Toutes les entrées pour un exercice doivent être validées, sinon la fermeture ne sera pas possible ValidateHistory=Lier automatiquement @@ -401,7 +402,11 @@ Calculated=Calculé Formula=Formule ## Reconcile +LetteringAuto=Rapprocher automatiquement +LetteringManual=Rapprocher manuel Unlettering=Annuler le rapprochement +UnletteringAuto=Annuler le rapprochement automatique +UnletteringManual=Annuler rapprochement manuel AccountancyNoLetteringModified=Pas de rapprochement modifié AccountancyOneLetteringModifiedSuccessfully=Un rapprochement modifié avec succès AccountancyLetteringModifiedSuccessfully=%s rapprochements modifiés avec succès @@ -410,8 +415,9 @@ AccountancyOneUnletteringModifiedSuccessfully=Une annulation de rapprochement mo AccountancyUnletteringModifiedSuccessfully=%s annulations de rapprochement modifiées avec succès ## Confirm box -ConfirmMassUnlettering=Confirmation d'annulation de rapprochement en masse -ConfirmMassUnletteringQuestion=Êtes-vous sûr de vouloir annuler le rapprochement de(s) %s enregistrement(s) sélectionné(s) ? +ConfirmMassUnletteringAuto=Confirmation d'annulation de rapprochement automatique +ConfirmMassUnletteringManual=Confirmation de dé-rapprochement manuel +ConfirmMassUnletteringQuestion=Voulez-vous vraiment annuler le rapprochement des %s enregistrements sélectionnés ? ConfirmMassDeleteBookkeepingWriting=Confirmation de suppression en masse ConfirmMassDeleteBookkeepingWritingQuestion=Cela supprimera la transaction de la comptabilité (toutes les lignes liées à la même transaction seront supprimées). Êtes-vous sûr de vouloir supprimer le(s) %s enregistrement(s) sélectionné(s) ? diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 91b925bd4f7..1a756fbc7c7 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -51,8 +51,6 @@ ClientSortingCharset=Jeu de caractère de tri du client WarningModuleNotActive=Le module %s doit être activé pour utiliser cette fonction. WarningOnlyPermissionOfActivatedModules=Attention, seules les permissions en rapport avec les modules activés sont affichées ici. Vous pouvez activer d'autres modules sur la page Accueil->Configuration->Modules. DolibarrSetup=Installation ou mise à jour de Dolibarr -InternalUser=Utilisateur interne -ExternalUser=Utilisateur externe InternalUsers=Utilisateurs internes ExternalUsers=Utilisateurs externes UserInterface=Interface utilisateur @@ -285,7 +283,7 @@ ContentForLines=Contenu à afficher pour chaque produit ou service (à partir de NoticePeriod=Délai de prévenance NewByMonth=Mois suivant Emails=Emails -EMailsSetup=Configuration Emails +EMailsSetup=Configuration des mails EMailsDesc=Cette page permet de définir les paramètres et options d'envoi des e-mails. EmailSenderProfiles=Expéditeur des e-mails EMailsSenderProfileDesc=Vous pouvez garder cette section vide. Si vous entrez des emails ici, ils seront ajoutés à la liste des expéditeurs possibles dans la liste déroulante lorsque vous écrivez un nouvel email. @@ -439,8 +437,10 @@ Unique=Unique Boolean=Boolean (case à cocher unique) ExtrafieldPhone = Téléphone ExtrafieldPrice = Prix +ExtrafieldPriceWithCurrency=Prix avec devise ExtrafieldMail = Email ExtrafieldUrl = Url +ExtrafieldIP = IP ExtrafieldSelect = Liste de sélection ExtrafieldSelectList = Liste issue d'une table ExtrafieldSeparator=Séparateur (il ne s'agit pas d'un champ de saisie) @@ -501,7 +501,7 @@ WarningPHPMail=AVERTISSEMENT: la configuration pour envoyer des e-mails à parti WarningPHPMailA= - L'utilisation des serveurs de prestataires de messagerie augmente le niveau confiance des e-mails, cela augmente donc les chances de délivrabilité en n'étant pas considéré comme spam. WarningPHPMailB=- Certains fournisseurs de services de messagerie (comme Yahoo) ne vous permettent pas d'envoyer un e-mail à partir d'un autre serveur que leur propre serveur. Votre configuration actuelle utilise le serveur de l'application pour envoyer des e-mails et non le serveur de votre fournisseur de messagerie, donc certains destinataires (ceux compatibles avec le protocole DMARC restrictif), demanderont à votre fournisseur de messagerie si ils peuvent accepter votre message et ce fournisseur de messagerie (comme Yahoo) peut répondre «non» parce que le serveur d'envoi n'est pas le leur, aussi une partie de vos e-mails envoyés peuvent ne pas être acceptés pour la livraison (faites également attention au quota d'envoi de votre fournisseur de messagerie). WarningPHPMailC=- Utiliser le serveur SMTP de votre propre fournisseur de services de messagerie pour envoyer des e-mails est également intéressant afin que tous les e-mails envoyés depuis l'application soient également enregistrés dans votre répertoire "Envoyés" de votre boîte aux lettres. -WarningPHPMailD=Aussi, il est recommandé de changer le mode d'envoi des e-mails à la valeur "SMTP". Si vous souhaitez vraiment conserver la méthode "PHP" par défaut pour envoyer des e-mails, ignorez simplement cet avertissement ou supprimez-le en définissant la constante MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP sur 1 dans Accueil - Configuration - Autre. +WarningPHPMailD=Aussi, il est recommandé de changer le mode d'envoi des e-mails à la valeur "SMTP". Si vous souhaitez vraiment conserver la méthode "PHP" par défaut pour envoyer des e-mails, ignorez simplement cet avertissement ou supprimez-le en définissant la constante MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP sur 1 dans Accueil - Configuration - Divers. WarningPHPMail2=Si votre fournisseur de messagerie SMTP a besoin de restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP du mail user agent (MUA) de votre application CRM ERP : %s . WarningPHPMailSPF=Si le nom de domaine de votre adresse e-mail d'expéditeur est protégé par un enregistrement SPF (demandez à votre fournisseur de nom de domaine), vous devez inclure les adresses IP suivantes dans l'enregistrement SPF du DNS de votre domaine: %s. ActualMailSPFRecordFound=Enregistrement SPF réel trouvé (pour l'e-mail %s) : %s @@ -842,9 +842,9 @@ Permission286=Exporter les contacts Permission291=Consulter les tarifs Permission292=Définir les permissions sur les tarifs Permission293=Modifier les tarifs clients -Permission300=Consulter les codes-barres -Permission301=Créer/modifier les codes-barres -Permission302=Supprimer les codes-barres +Permission301=Générer le PDF du code barre +Permission304=Créer/modifier les codes-barres +Permission305=Supprimer les codes-barres Permission311=Consulter les services Permission312=Affecter le service/abonnement au contrat Permission331=Lire les marque-pages @@ -1082,6 +1082,10 @@ DictionaryAssetDisposalType=Type de cession d'actifs TypeOfUnit=Type d'unité SetupSaved=Configuration sauvegardée SetupNotSaved=Configuration non enregistrée +OAuthServiceConfirmDeleteTitle=Supprimer l'entrée OAuth +OAuthServiceConfirmDeleteMessage=Voulez-vous vraiment supprimer cette entrée OAuth ? Tous les jetons existants pour celui-ci seront également supprimés. +ErrorInEntryDeletion=Erreur lors de la suppression de l'entrée +EntryDeleted=Entrée supprimée BackToModuleList=Retour liste des modules BackToDictionaryList=Retour liste des dictionnaires TypeOfRevenueStamp=Type de timbre fiscal @@ -1239,7 +1243,7 @@ BrowserName=Nom du navigateur BrowserOS=OS du navigateur ListOfSecurityEvents=Liste des événements de sécurité Dolibarr SecurityEventsPurged=Evenement de sécurité purgés -TrackableSecurityEvents=Trackable security events +TrackableSecurityEvents=événement de sécurité traçable LogEventDesc=Vous pouvez activer ici l'historique des événements d'audit de sécurité. Cet historique est consultable par les administrateurs dans le menu %s - %s. Attention, cette fonctionnalité peut générer un gros volume de données. AreaForAdminOnly=Les paramètres d'installation ne peuvent être remplis que par les utilisateurs administrateurs uniquement. SystemInfoDesc=Les informations systèmes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement. @@ -1615,7 +1619,7 @@ LDAPFieldUserid=Id utilisateur LDAPFieldUseridExample=Exemple: uidnumber LDAPFieldHomedirectory=Répertoire racine LDAPFieldHomedirectoryExample=Exemple: homedirectory -LDAPFieldHomedirectoryprefix=Répertoire racine +LDAPFieldHomedirectoryprefix=Préfixe du répertoire racine LDAPSetupNotComplete=Configuration LDAP incomplète (à compléter sur les autres onglets) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrateur ou mot de passe non renseigné. Les accès LDAP seront donc anonymes et en lecture seule. LDAPDescContact=Cette page permet de définir le nom des attributs de l'arbre LDAP pour chaque information des contacts Dolibarr. @@ -1744,7 +1748,8 @@ FCKeditorForNotePublic=Création/édition WYSIWIG du champ notes publiques des FCKeditorForNotePrivate=Création/édition WYSIWIG du champ notes privées des éléments FCKeditorForCompany=Création/édition WYSIWIG de la description des éléments (autre que produits/services) FCKeditorForProduct=Création/édition WYSIWIG du champ description des produits/services -FCKeditorForProductDetails=Création/édition WYSIWYG des lignes de détails produits sur tous les éléments (commandes, propales, factures, etc...). Attention: L'utilisation pour ce cas est fortement déconseillée car peut créer des problèmes dans la gestion de caractères et mise en page des fichiers PDF générés. +FCKeditorForProductDetails=Création/édition WYSIWYG des lignes de détails produits sur tous les éléments (commandes, propales, factures, etc...). +FCKeditorForProductDetails2=Attention: L'utilisation pour ce cas est fortement déconseillée car peut créer des problèmes dans la gestion de caractères et mise en page des fichiers PDF générés. FCKeditorForMailing= Création/édition WYSIWIG des emailings (Outils->Emailings) FCKeditorForUserSignature=Création/édition WYSIWIG de la signature des utilisateurs FCKeditorForMail=Création/édition WYSIWIG tous les emails (sauf Outils->Emailings) @@ -1767,7 +1772,7 @@ DetailMenuHandler=Nom du gestionnaire menu dans lequel faire apparaitre le nouve DetailMenuModule=Nom du module si l'entrée menu est issue d'un module DetailType=Type de menu (top ou left) DetailTitre=Libellé du menu ou code libellé à traduire -DetailUrl=URL vers laquelle le menu pointe (Lien URL absolu ou lien externe avec http://) +DetailUrl=URL où le menu vous envoie (lien URL relatif ou lien externe avec https://) DetailEnabled=Condition d'affichage ou non DetailRight=Condition d'affichage plein ou grisé DetailLangs=Fichier .lang pour la traduction du code libellé @@ -2075,12 +2080,13 @@ loginPassword=Mot de passe oauthToken=Jeton Oauth2 accessType=Type d'accès oauthService=Service Oauth -TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail). +TokenMustHaveBeenCreated=Le module OAuth2 doit être activé et un token oauth2 doit avoir été créé avec les bonnes permissions (par exemple scope "gmail_full" avec OAuth pour Gmail). MailboxSourceDirectory=Répertoire source de la boîte aux lettres MailboxTargetDirectory=Répertoire cible de la boîte aux lettres EmailcollectorOperations=Opérations à effectuer par le collecteur EmailcollectorOperationsDesc=Les opérations sont exécutées de haut en bas MaxEmailCollectPerCollect=Nombre maximum d'emails collectés par collecte +TestCollectNow=Tester la collecte CollectNow=Collecter maintenant ConfirmCloneEmailCollector=Voulez-vous vraiment cloner le collecteur d'e-mails %s ? DateLastCollectResult=Date de la dernière tentative de collecte @@ -2104,7 +2110,7 @@ NoNewEmailToProcess=Aucun nouvel email (correspondants aux filtres) à traiter NothingProcessed=Aucune action faite XEmailsDoneYActionsDone=%s e-mails pré-qualifiés, %s e-mails traités avec succès (pour %s enregistrement/actions effectuées) RecordEvent=Enregistrer un événement dans l'agenda (avec le type Email envoyé ou reçu) -CreateLeadAndThirdParty=Créer un prospect (et un tiers si nécessaire) +CreateLeadAndThirdParty=Créer une opportunité (et un tiers si nécessaire) CreateTicketAndThirdParty=Créer un ticket (lié à un tiers si le tiers a été chargé par une opération précédente ou a été deviné à partir d'un tracker en en-tête d'email, sans tiers sinon) CodeLastResult=Dernier code de retour NbOfEmailsInInbox=Nombre de courriels dans le répertoire source @@ -2184,6 +2190,7 @@ ShowProjectLabel=Libellé du projet PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME=Inclure un alias dans le nom du tiers THIRDPARTY_ALIAS=Nom du tiers - Alias du tiers ALIAS_THIRDPARTY=Alias du tiers - Nom du tiers +MAIN_USE_COMPANY_NAME_OF_CONTACT=Use company name of contact PDF_USE_ALSO_LANGUAGE_CODE=Si vous souhaitez que certains textes de votre PDF soient dupliqués dans 2 langues différentes dans le même PDF généré, vous devez définir ici cette deuxième langue pour que le PDF généré contienne 2 langues différentes dans la même page, celle choisie lors de la génération du PDF et celle-ci (seuls quelques modèles PDF prennent en charge cette fonction). Gardez vide pour 1 langue par PDF. PDF_USE_A=Générer document PDF avec le format PDF/A à la place du format PDF standard FafaIconSocialNetworksDesc=Entrez ici le code d'une icône FontAwesome. Si vous ne savez pas ce qu'est FontAwesome, vous pouvez utiliser la valeur générique fa-address-book. @@ -2225,7 +2232,7 @@ NoExternalModuleWithUpdate=Aucune mise à jour trouvée pour les modules externe SwaggerDescriptionFile=Fichier de description de l’API Swagger (à utiliser avec redoc par exemple) YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=Vous avez activé l'API WS qui est dépréciée. Vous devriez utiliser l'API REST à la place. RandomlySelectedIfSeveral=Sélectionnée au hasard si plusieurs images sont disponibles -SalesRepresentativeInfo=For Proposals, Orders, Invoices. +SalesRepresentativeInfo=Pour Propositions, Commandes, Factures DatabasePasswordObfuscated=Le mot de passe de la base de données est masqué dans le fichier de configuration DatabasePasswordNotObfuscated=Le mot de passe de la base de données n'est PAS masqué dans le fichier de configuration APIsAreNotEnabled=Les modules API ne sont pas activés @@ -2307,4 +2314,22 @@ MAIN_MAIL_SMTPS_AUTH_TYPE=Méthode d'authentification UsePassword=Utiliser mot de passe UseOauth=Utiliser un token OAUTH Images=Images +Posts=publications MaxNumberOfImagesInGetPost=Nombre maximum d'images autorisées dans un champ HTML soumis dans un formulaire +MaxNumberOfPostOnPublicPagesByIP=Nombre maximum de publications par mois sur des pages publiques avec une adresse IP +CIDLookupURL=Le module apporte une URL qui peut être utilisée par un outil externe pour obtenir le nom d'un tiers ou d'un contact à partir de son numéro de téléphone. L'URL à utiliser est : +ScriptIsEmpty=Le script est manquant +ShowHideTheNRequests=Afficher/Cacher les %s requête(s) SQL. +DefinedAPathForAntivirusCommandIntoSetup=Définir un chemin pour un programme antivirus dans %s +TriggerCodes=Événements déclenchables +TriggerCodeInfo=Saisissez ici le(s) code(s) déclencheur(s) qui doivent générer la publication d'une requête web (seules les URL externes sont autorisées). Vous pouvez entrer plusieurs codes déclencheurs séparés par une virgule. +EditableWhenDraftOnly=Si décochée, la valeur ne peut être modifiée que lorsque l'objet a un état de brouillon +CssOnEdit=CSS sur les pages d'édition +CssOnView=CSS sur les pages de visualisation +CssOnList=CSS sur les pages de liste +HelpCssOnEditDesc=Le CSS utilisé lors de la modification du champ.
    Exemple : "minwidth100 maxwidth500 widthcentpercentminusx" +HelpCssOnViewDesc=Le CSS utilisé lors de l'affichage du champ. +HelpCssOnListDesc=Le CSS utilisé lorsque le champ est à l'intérieur du tableau d'une liste.
    Exemple : "tdoverflowmax200" +RECEPTION_PDF_HIDE_ORDERED=Masquer la quantité commandée sur les documents générés pour les réceptions +MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Afficher le prix sur les documents générés pour les réceptions +AllowExternalDownload=Autoriser le téléchargement externe diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 62fc347e802..62dbae7233e 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -87,6 +87,7 @@ SupplierInvoiceSentByEMail=Facture fournisseur %s envoyée par email ShippingSentByEMail=Bon d'expédition %s envoyé par email ShippingValidated= Expédition %s validée InterventionSentByEMail=Intervention %s envoyé par email +ProjectSentByEMail=Projet %s envoyé par email ProposalDeleted=Proposition commerciale supprimée OrderDeleted=Commande supprimée InvoiceDeleted=Facture supprimée diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index af88349f585..35de9806932 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -185,4 +185,4 @@ AlreadyOneBankAccount=un compte bancaire est déjà défini SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation=Virement SEPA : 'Type de paiement' au niveau 'Virement' SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp=A la génération d'un fichier SEPA XML pour les virements, la section "PaymentTypeInformation" peut maintenant être placée dans la section "CreditTransferTransactionInformation" (à la place de la section "Payment").\nNous recommandons fortement de ne pas cocher cette case pour conserver "PaymentTypeInformation" dans "Payment level" car toutes les banques ne l'accepterons pas obligatoirement au niveau de "CreditTransferTransactionInformation". Contactez votre banque avant de modifier ce paramètre. ToCreateRelatedRecordIntoBank=Pour créer un enregistrement bancaire associé manquant -BanklineExtraFields=Bank Line Extrafields +BanklineExtraFields=Extrait de la ligne bancaire diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index a764b511920..15a7901a2e9 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -448,8 +448,8 @@ PaymentTypeShortVIR=Virement bancaire PaymentTypePRE=Ordre de prélèvement PaymentTypePREdetails=(sur compte *-%s) PaymentTypeShortPRE=Ordre de prélèvement -PaymentTypeLIQ=Espèce -PaymentTypeShortLIQ=Espèce +PaymentTypeLIQ=Espèces +PaymentTypeShortLIQ=Espèces PaymentTypeCB=Carte bancaire PaymentTypeShortCB=Carte bancaire PaymentTypeCHQ=Chèque diff --git a/htdocs/langs/fr_FR/bookmarks.lang b/htdocs/langs/fr_FR/bookmarks.lang index b449ca7110a..355b1b351e4 100644 --- a/htdocs/langs/fr_FR/bookmarks.lang +++ b/htdocs/langs/fr_FR/bookmarks.lang @@ -20,3 +20,4 @@ ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choisir si le raccourci doit ouv BookmarksManagement=Gestion des marque-pages BookmarksMenuShortCut=Ctrl + Maj + m NoBookmarks=Aucun marque page enregistré +NoBookmarkFound=Pas de marque-page trouvé. diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index 75c6ccb9ed9..4cb9011885d 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -46,6 +46,7 @@ BoxMyLastBookmarks=Mes %s derniers marque-pages BoxOldestExpiredServices=Plus anciens services expirés BoxLastExpiredServices=Les %s plus anciens contrats avec services actifs expirés BoxTitleLastActionsToDo=Les %s derniers événements à réaliser +BoxTitleOldestActionsToDo=Les %s plus anciens événement non terminés BoxTitleLastContracts=Les %s derniers contrats modifiés BoxTitleLastModifiedDonations=Les %s derniers dons modifiés BoxTitleLastModifiedExpenses=Les %s dernières notes de frais modifiées diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 73e629b6fd9..049ee169cef 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -137,3 +137,11 @@ YearNotDefined=L'année n'est pas définie TakeposBarcodeRuleToInsertProduct=Règle de lecture du code barre des produits TakeposBarcodeRuleToInsertProductDesc=Règle pour extraire la référence produit + une quantité d'un code barre scanné.
    Si vide (valeur par défaut), l'application utilisera le code-barres complet scanné pour trouver le produit.

    Si elle est définie, la syntaxe doit être:
    ref: NB + Qu: NB + QD: NB + autres: NB
    où NB est le nombre de caractères à utiliser pour extraire les données du code à barres scannés avec:
    • ref : référence produit
    • qu : quantité de jeu lors de l'insertion article (unités)
    • qd: quantité de jeu lors de l'insertion article (décimaux)
    • autre : autres caractères
    AlreadyPrinted=Déjà imprimé +HideCategories=Cacher catégories +HideStockOnLine=Cacher les stocks sur les lignes +ShowOnlyProductInStock=Afficher les produits en stock +ShowCategoryDescription=Afficher la description de la catégorie +ShowProductReference=Afficher la référence des produits +UsePriceHT=Utiliser le prix HT et non le prix TTC +TerminalName=Terminal %s +TerminalNameDesc=Nom du terminal diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index 5f478aabc7f..641cf97bacf 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -42,6 +42,7 @@ MemberHasNoCategory=Ce membre n'appartient à aucun(e) tag/catégorie ContactHasNoCategory=Ce contact n'appartient à aucun(e) tag/catégorie ProjectHasNoCategory=Ce projet n'est classé dans aucune catégorie ClassifyInCategory=Ajouter tag/catégorie +RemoveCategory=Supprimer la catégorie NotCategorized=Sans tag/catégorie CategoryExistsAtSameLevel=Ce tag existe déjà avec cette référence ContentsVisibleByAllShort=Contenu visible par tous @@ -67,6 +68,7 @@ StockCategoriesShort=Tags/catégories d’entrepôt ThisCategoryHasNoItems=Cette catégorie ne contient aucun élément. CategId=ID du(de la) tag/catégorie ParentCategory=Catégorie parente +ParentCategoryID=ID de la balise/catégorie parent ParentCategoryLabel=Libellé du tag/catégorie parent CatSupList=Liste des tags/catégories des fournisseurs CatCusList=Liste des tags/catégories des clients/prospects diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index d663185936b..924059a1262 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -74,8 +74,12 @@ StatusProsp=Status prospection DraftPropals=Propositions brouillons NoLimit=Pas de limite ToOfferALinkForOnlineSignature=Lien pour signature en ligne -WelcomeOnOnlineSignaturePage=Bienvenue sur la page pour accepter les propositions commerciales de %s -ThisScreenAllowsYouToSignDocFrom=Cet écran vous permet d'accepter et signer en ligne, ou de refuser, le devis ou la proposition commerciale -ThisIsInformationOnDocumentToSign=Voici les informations sur le document à accepter ou refuser +WelcomeOnOnlineSignaturePageProposal=Bienvenue sur la page pour accepter les propositions commerciales de %s +WelcomeOnOnlineSignaturePageContract=Bienvenue sur la page de signature du contrat PDF %s +ThisScreenAllowsYouToSignDocFromProposal=Cet écran vous permet d'accepter et signer en ligne, ou de refuser, le devis ou la proposition commerciale +ThisScreenAllowsYouToSignDocFromContract=Cet écran vous permet de signer en ligne un contrat au format PDF. +ThisIsInformationOnDocumentToSignProposal=Voici les informations sur le document à accepter ou refuser +ThisIsInformationOnDocumentToSignContract=Voici les informations sur le contrat à signer SignatureProposalRef=Signature du devis ou proposition commerciale %s +SignatureContractRef=Signature du contrat %s FeatureOnlineSignDisabled=Fonctionnalité pour la signature en ligne désactivée ou document généré avant l'activation de la fonctionnalité diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 892eca48bae..f66d2005c73 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -313,11 +313,11 @@ CustomerAbsoluteDiscountShort=Remise fixe CompanyHasRelativeDiscount=Ce client a une remise par défaut de %s%% CompanyHasNoRelativeDiscount=Ce client n'a pas de remise relative par défaut HasRelativeDiscountFromSupplier=Vous avez une réduction par défaut de %s%% chez ce fournisseur -HasNoRelativeDiscountFromSupplier=Vous n'avez pas de remise relative par défaut chez ce fournisseur +HasNoRelativeDiscountFromSupplier=Aucune remise relative par défaut de ce fournisseur CompanyHasAbsoluteDiscount=Ce client dispose de crédits disponibles (avoirs ou acomptes) pour un montant de %s %s CompanyHasDownPaymentOrCommercialDiscount=Ce client a une réduction disponible (commercial, acompte) pour %s%s CompanyHasCreditNote=Ce client a %s %s d'avoirs disponibles -HasNoAbsoluteDiscountFromSupplier=Vous n'avez aucun crédit de réduction disponible auprès de ce fournisseur +HasNoAbsoluteDiscountFromSupplier=Aucun rabais/crédit disponible auprès de ce fournisseur HasAbsoluteDiscountFromSupplier=Vous avez des crédits disponibles (avoirs ou acomptes) pour %s %s chez ce fournisseur HasDownPaymentOrCommercialDiscountFromSupplier=Vous avez des crédits disponibles (bon de réductions, acomptes) pour %s %s chez ce fournisseur HasCreditNoteFromSupplier=Vous avez des avoirs pour %s %s chez ce fournisseur @@ -444,7 +444,7 @@ AddAddress=Créer adresse SupplierCategory=Catégorie du fournisseur JuridicalStatus200=Indépendant DeleteFile=Suppression d'un fichier -ConfirmDeleteFile=Êtes-vous sûr de vouloir supprimer ce fichier ? +ConfirmDeleteFile=Êtes-vous sûr de vouloir supprimer ce fichier %s ? AllocateCommercial=Affecter un commercial Organization=Organisme FiscalYearInformation=Exercice fiscal @@ -467,7 +467,7 @@ UniqueThirdParties=Nombre total des tiers InActivity=Ouvert ActivityCeased=Clos ThirdPartyIsClosed=Le tiers est clôturé -ProductsIntoElements=Liste des produits/services jusqu'à %s +ProductsIntoElements=Liste des produits/services présents dans %s CurrentOutstandingBill=Montant encours OutstandingBill=Montant encours autorisé OutstandingBillReached=Montant encours autorisé dépassé @@ -498,3 +498,5 @@ RestOfEurope=Reste de l'Union Européenne (UE) OutOfEurope=Hors Union Européenne (UE) CurrentOutstandingBillLate=Montant impayé arrivé à échéance BecarefullChangeThirdpartyBeforeAddProductToInvoice=Attention : selon votre configuration des prix des produits/services, vous devriez changer le tiers avant d'ajouter le produit +EmailAlreadyExistsPleaseRewriteYourCompanyName=l'e-mail existe déjà, veuillez réécrire le nom de votre entreprise +TwoRecordsOfCompanyName=plusieurs fiches existent pour cette entreprise merci de nous contacter pour compléter votre demande de partenariat" diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 8d89487c5cf..7d6bfc6f2e0 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -20,6 +20,7 @@ ContractsSubscriptions=Contrats/Abonnements ContractsAndLine=Contrats et lignes de contrats Contract=Contrat ContractLine=Ligne de contrat +ContractLines=Lignes du contrat Closing=Fermé NoContracts=Pas de contrats MenuServices=Services @@ -79,7 +80,7 @@ ConfirmDeleteContractLine=Êtes-vous sûr de vouloir supprimer cette ligne de co MoveToAnotherContract=Déplacer le service vers un autre contrat de ce tiers. ConfirmMoveToAnotherContract=J'ai choisi le contrat cible et confirme le déplacement du service dans ce contrat. ConfirmMoveToAnotherContractQuestion=Choisissez vers quel autre contrat (du même tiers), vous voulez déplacer ce service ? -PaymentRenewContractId=Renouvellement service (numéro %s) +PaymentRenewContractId=Renouveler le contrat %s (service %s) ExpiredSince=Expiré le NoExpiredServices=Pas de services actifs expirés ListOfServicesToExpireWithDuration=Liste des services actifs expirant dans %s jours @@ -100,5 +101,8 @@ TypeContact_contrat_external_BILLING=Contact client facturation contrat TypeContact_contrat_external_CUSTOMER=Contact client suivi contrat TypeContact_contrat_external_SALESREPSIGN=Contact client signataire contrat HideClosedServiceByDefault=Masquer les services fermés par défaut +AllowOnlineSign=Autoriser la signature en ligne ShowClosedServices=Afficher les services fermés HideClosedServices=Masquer les services fermés +UserStartingService=Utilisateur démarrant le service +UserClosingService=Utilisateur stoppant le service diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index 64bf5493285..e851fd5a13a 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -82,10 +82,18 @@ UseMenuModuleToolsToAddCronJobs=Aller à la page "Accueil - Outils JobDisabled=Travail désactivé MakeLocalDatabaseDumpShort=Sauvegarde locale de base MakeLocalDatabaseDump=Créez un fichier dump de base local. Les paramètres sont: compression ('gz' ou 'bz' ou 'none'), type de sauvegarde ('mysql', 'pgsql', 'auto'), 1, 'auto' ou nom du fichier à générer, nombre de fichiers de sauvegarde à garder +MakeSendLocalDatabaseDumpShort=Envoyer la sauvegarde de la base de données locale +MakeSendLocalDatabaseDump=Envoyez la sauvegarde de la base de données locale par e-mail. Les paramètres sont : to, from, subject, message, filename (nom du fichier envoyé), filter ('sql' pour la sauvegarde de la base de données uniquement) +CleanUnfinishedCronjobShort=Nettoyer la tâche planifiée inachevée +CleanUnfinishedCronjob=Nettoyer la tâche planifiée bloquée dans le traitement lorsque le processus n'est plus en cours d'exécution WarningCronDelayed=Attention, à des fins de performance, quelle que soit la prochaine date d'exécution des travaux activés, vos travaux peuvent être retardés jusqu'à %s heures avant d'être exécutés. DATAPOLICYJob=Nettoyeur de données et anonymiseur JobXMustBeEnabled=La tâche planifiée %s doit être activée +EmailIfError=E-mail d'avertissement en cas d'erreur +ErrorInBatch=Erreur lors de l'exécution du travail %s + # Cron Boxes LastExecutedScheduledJob=Dernier travail planifié exécuté NextScheduledJobExecute=Prochaine travail planifié à exécuter NumberScheduledJobError=Nombre de travaux planifiées en erreur +NumberScheduledJobNeverFinished=Nombre de tâches planifiées jamais terminées diff --git a/htdocs/langs/fr_FR/datapolicy.lang b/htdocs/langs/fr_FR/datapolicy.lang new file mode 100644 index 00000000000..16ed7ca5933 --- /dev/null +++ b/htdocs/langs/fr_FR/datapolicy.lang @@ -0,0 +1,92 @@ +# 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 +# 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 . + +# Module label 'ModuledatapolicyName' +Module4100Name = Politique de confidentialité des données +# Module description 'ModuledatapolicyDesc' +Module4100Desc = Module de gestion de la confidentialité des données (conformité avec le RGPD) + +# +# Administration page +# +datapolicySetup = Configuration de la politique de confidentialité des données du module +Deletion = Suppression de données +datapolicySetupPage = En fonction des législations de vos pays (Exemple Article 5 du RGPD), les données personnelles doivent être conservées pendant une durée n'excédant pas celle nécessaire aux finalités pour lesquelles elles ont été collectées, sauf à des fins d'archivage.
    La suppression se fera automatiquement après une certaine durée sans événement (la durée que vous aurez indiquée ci-dessous). +NB_MONTHS = %s mois +ONE_YEAR = 1 an +NB_YEARS = %s ans +DATAPOLICY_TIERS_CLIENT = Client +DATAPOLICY_TIERS_PROSPECT = Prospect +DATAPOLICY_TIERS_PROSPECT_CLIENT = Prospect/Client +DATAPOLICY_TIERS_NIPROSPECT_NICLIENT = Ni prospect/Ni client +DATAPOLICY_TIERS_FOURNISSEUR = Fournisseur +DATAPOLICY_CONTACT_CLIENT = Client +DATAPOLICY_CONTACT_PROSPECT = Prospect +DATAPOLICY_CONTACT_PROSPECT_CLIENT = Prospect/Client +DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT = Ni prospect/Ni client +DATAPOLICY_CONTACT_FOURNISSEUR = Fournisseur +DATAPOLICY_ADHERENT = Adhérent +DATAPOLICY_Tooltip_SETUP = Type de contact - Indiquez vos choix pour chaque type. +DATAPOLICYMail = Configuration des e-mails +DATAPOLICYSUBJECTMAIL = Objet du courriel +DATAPOLICYCONTENTMAIL = Contenu de l'e-mail +DATAPOLICYSUBSITUTION = Vous pouvez utiliser les variables suivantes dans votre email (LINKACCEPT permet de créer un lien enregistrant l'accord de la personne, LINKREFUSED permet d'enregistrer le refus de la personne) : +DATAPOLICYACCEPT = Message après accord +DATAPOLICYREFUSE = Message après désaccord +SendAgreementText = Vous pouvez envoyer un e-mail RGPD à tous vos contacts concernés (qui n'ont pas encore reçu d'e-mail et pour lesquels vous n'avez rien enregistré concernant leur accord RGPD). Pour ce faire, utilisez le bouton suivant. +SendAgreement = Envoyer des emails +AllAgreementSend = Tous les e-mails ont été envoyés +TXTLINKDATAPOLICYACCEPT = Texte pour le lien "accord" +TXTLINKDATAPOLICYREFUSE = Texte pour le lien "désaccord" + + +# +# Extrafields +# +DATAPOLICY_BLOCKCHECKBOX = RGPD : Traitement des données personnelles +DATAPOLICY_consentement = Consentement obtenu pour le traitement des données personnelles +DATAPOLICY_opposition_traitement = S'oppose au traitement de ses données personnelles +DATAPOLICY_opposition_prospection = S'oppose au traitement de ses données personnelles à des fins de prospection + +# +# Popup +# +DATAPOLICY_POPUP_ANONYME_TITLE = Anonymiser un tiers +DATAPOLICY_POPUP_ANONYME_TEXTE = Vous ne pouvez pas supprimer ce contact de Dolibarr car il y a des éléments liés. Conformément au RGPD, vous rendrez toutes ces données anonymes pour respecter vos obligations. Voulez-vous continuer ? + +# +# Button for portability +# +DATAPOLICY_PORTABILITE = Portabilité RGPD +DATAPOLICY_PORTABILITE_TITLE = Exportation de données personnelles +DATAPOLICY_PORTABILITE_CONFIRMATION = Vous souhaitez exporter les données personnelles de ce contact. Êtes-vous sûr ? + +# +# Notes added during an anonymization +# +ANONYMISER_AT = Anonymisé le %s + +# V2 +DATAPOLICYReturn = Validation RGPD +DATAPOLICY_date = Date d'accord/désaccord RGPD +DATAPOLICY_send = Date d'envoi de l'e-mail d'accord +DATAPOLICYReturn = Validation RGPD +DATAPOLICY_SEND = Envoyer un e-mail RGPD +MailSent = L'email a été envoyé + +# ERROR +ErrorSubjectIsRequired = Erreur : L'objet de l'email est obligatoire. Indiquez-le dans la configuration du module +=Suite à un problème technique, nous n'avons pas pu enregistrer votre choix. Nous nous en excusons. Contactez-nous pour nous faire part de votre choix. +NUMBER_MONTH_BEFORE_DELETION = Nombre de mois avant la suppression diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index f043c5b5afc..d407d7c91b8 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -48,6 +48,7 @@ ErrorBadImageFormat=Cet image est dans un format non pris en charge (Votre PHP n ErrorBadDateFormat=La valeur '%s' a un format de date non reconnu ErrorWrongDate=La date est incorrecte ErrorFailedToWriteInDir=Impossible d'écrire dans le répertoire %s +ErrorFailedToBuildArchive=Échec de la création du fichier d'archive %s ErrorFoundBadEmailInFile=Syntaxe d'email incorrecte trouvée pour %s lignes dans le fichier (exemple ligne %s avec email=%s) ErrorUserCannotBeDelete=L'utilisateur ne peut pas être supprimé. Peut-être est-il associé à des éléments de Dolibarr. ErrorFieldsRequired=Des champs obligatoire n'ont pas été remplis. @@ -76,7 +77,7 @@ ErrorNoValueForCheckBoxType=Les valeurs de la liste de case à cochées doivent ErrorNoValueForRadioType=Les valeurs de la liste d'options doivent être renseignées ErrorBadFormatValueList=Les valeurs de la liste ne peuvent pas avoir plus d'une virgule: %s mais il en faut au moins une: clé, valeur ErrorFieldCanNotContainSpecialCharacters=Le champ %s ne peut contenir de caractères spéciaux. -ErrorFieldCanNotContainSpecialNorUpperCharacters=Le champ %s ne doit contenir ni caractères spéciaux ni majuscules et ne peut contenir que des chiffres. +ErrorFieldCanNotContainSpecialNorUpperCharacters=Le champ %s ne doit pas contenir de caractères spéciaux, ni de majuscules, et doit commencer par un caractère alphabétique (a-z) ErrorFieldMustHaveXChar=Le champ %s doit comporter au moins %s caractères. ErrorNoAccountancyModuleLoaded=Aucun module de comptabilité activé ErrorExportDuplicateProfil=Ce nom de profil existe déjà pour ce lot d'export. @@ -97,7 +98,6 @@ ErrorFieldValueNotIn=Champ %s: '%s' n'est pas une valeur disponibl ErrorFieldRefNotIn=Champ %s: '%s' n'est pas une référence existante comme %s ErrorsOnXLines=Erreurs sur %s enregistrement(s) source ErrorFileIsInfectedWithAVirus=L'antivirus n'a pas pu valider ce fichier (il est probablement infecté par un virus) ! -ErrorSpecialCharNotAllowedForField=Les caractères spéciaux ne sont pas admis pour le champ "%s" ErrorNumRefModel=Une référence existe en base (%s) et est incompatible avec cette numérotation. Supprimez la ligne ou renommez la référence pour activer ce module. ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur ou aucun tarif défini sur ce produit pour ce fournisseur ErrorOrdersNotCreatedQtyTooLow=Certaines commandes n'ont pas été créées en raison de quantités trop faibles @@ -291,6 +291,13 @@ ErrorAjaxRequestFailed=Demande échouée ErrorThirpdartyOrMemberidIsMandatory=Définir un tiers ou un adhérent dans le partenariat est obligatoire ErrorFailedToWriteInTempDirectory=Impossible d'écrire dans le répertoire temporaire ErrorQuantityIsLimitedTo=La quantité est limitée à %s +ErrorFailedToLoadThirdParty=Impossible de trouver/charger un tiers à partir de id=%s, email=%s, name=%s +ErrorThisPaymentModeIsNotSepa=Ce mode de paiement n'est pas un compte bancaire +ErrorStripeCustomerNotFoundCreateFirst=Le client Stripe n'est pas défini pour ce tiers (ou défini sur une valeur supprimée du côté Stripe). Créez (ou rattachez) d'abord. +ErrorCharPlusNotSupportedByImapForSearch=La recherche IMAP n'est pas en mesure de rechercher dans l'expéditeur ou le destinataire une chaîne contenant le caractère + +ErrorTableNotFound=Table %s introuvable +ErrorValueForTooLow=La valeur pour %s est trop faible +ErrorValueCantBeNull=La valeur pour %s ne peut pas être nulle # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Votre paramètre PHP upload_max_filesize (%s) est supérieur au paramètre PHP post_max_size (%s). Ceci n'est pas une configuration cohérente. @@ -326,6 +333,8 @@ WarningAvailableOnlyForHTTPSServers=Disponible uniquement si une connexion sécu WarningModuleXDisabledSoYouMayMissEventHere=Le module %s n’a pas été activé. Par conséquent, il se peut que vous manquiez beaucoup d’événements ici. WarningPaypalPaymentNotCompatibleWithStrict=La valeur 'Strict' fait que les fonctionnalités de paiement en ligne ne fonctionnent pas correctement. Utilisez plutôt 'Lax'. WarningThemeForcedTo=Attention, le choix du thème a été forcé à %s par la constante cachée MAIN_FORCETHEME +WarningPagesWillBeDeleted=Attention, cela supprimera également toutes les pages/conteneurs existants du site. Vous devriez exporter votre site Web avant, afin d'avoir une sauvegarde pour le réimporter plus tard. +WarningAutoValNotPossibleWhenStockIsDecreasedOnInvoiceVal=La validation automatique est désactivée lorsque l'option de diminution du stock est définie sur "Validation de la facture". # Validate RequireValidValue = Valeur non valide diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 665173fd58e..260bcebda1d 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -95,8 +95,8 @@ NbOfLinesOK=Nombre de lignes sans erreur ni avertissement : %s. NbOfLinesImported=Nombre de lignes importées avec succès : %s. DataComeFromNoWhere=La valeur à insérer n'est issue d'aucun champ du fichier source. DataComeFromFileFieldNb=La valeur à insérer provient de la colonne %s dans le fichier source. -DataComeFromIdFoundFromRef=La valeur provenant du fichier source sera utilisée pour trouver l'identifiant de l'objet parent à utiliser (donc l'objet %s qui a la référence du fichier source doit exister dans la base de données). -DataComeFromIdFoundFromCodeId=Le valeur du code provenant du fichier source sera utilisé pour trouver l'id de l'objet parent à utiliser (donc le code du fichier source doit exister dans le dictionnaire %s ). Notez que si vous connaissez l'identifiant, vous pouvez également l'utiliser dans le fichier source à la place du code. L'importation devrait fonctionner dans les deux cas. +DataComeFromIdFoundFromRef=La valeur qui vient du fichier source sera utilisée pour trouver l'id de l'objet parent à utiliser (donc l'objet %s qui a la réf. du fichier source doit exister dans la base de données). +DataComeFromIdFoundFromCodeId=La valeur du code provenant du fichier source sera utilisée pour trouver l'identifiant de l'objet parent à utiliser (donc le code du fichier source doit exister dans le dictionnaire %s). Notez que si vous connaissez l'identifiant, vous pouvez également l'utiliser dans le fichier source à la place du code. L'importation devrait fonctionner dans les deux cas. DataIsInsertedInto=La donnée issue du fichier source sera insérée dans le champ suivant: DataIDSourceIsInsertedInto=L'identifiant de l'objet père, retrouvé à partir de la donnée dans le fichier source, sera inséré dans le champ suivant : DataCodeIDSourceIsInsertedInto=L'identifiant de la ligne père, retrouvé à partir du code, sera inséré dans le champ suivant : @@ -134,7 +134,9 @@ FormatControlRule=Règle de contrôle de format ## imports updates KeysToUseForUpdates=Clé à utiliser pour mettre à jour les données NbInsert=Nombre de lignes insérées: %s +NbInsertSim=Nombre de lignes qui seront insérées : %s NbUpdate=Nombre de lignes mises à jour: %s +NbUpdateSim=Nombre de lignes qui seront mises à jour : %s MultipleRecordFoundWithTheseFilters=Plusieurs enregistrements ont été trouvés avec ces filtres: %s StocksWithBatch=Stocks et entrepôts des produits avec numéro de lot/série WarningFirstImportedLine=La ou les premières lignes ne seront pas importées avec la sélection actuelle diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index c6671f9f6a3..27439f66c27 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -1,9 +1,11 @@ # Dolibarr language file - Source file is en_US - holiday HRM=GRH -Holidays=Congés +Holidays=Feuilles +Holiday=Demande de congés CPTitreMenu=Demande de congés MenuReportMonth=État mensuel MenuAddCP=Créer demande de congés +MenuCollectiveAddCP=Nouvelle demande de congé collectif NotActiveModCP=Vous devez activer le module Congés pour afficher cette page. AddCP=Créer une demande de congés DateDebCP=Date Début @@ -56,6 +58,7 @@ ConfirmDeleteCP=Confirmer la suppression de cette demande de congés ? ErrorCantDeleteCP=Erreur, vous n'avez pas le droit de supprimer cette demande de congés. CantCreateCP=Erreur, vous n'avez pas le droit de créer une demande de congés. InvalidValidatorCP=Vous devez choisir un approbateur pour votre demande de congés. +InvalidValidator=L'utilisateur choisi n'est pas un approbateur. NoDateDebut=Vous devez choisir une date de début. NoDateFin=Vous devez choisir une date de fin. ErrorDureeCP=Votre demande de congés payés ne contient aucun jour ouvré. @@ -79,6 +82,8 @@ MotifCP=Motif UserCP=Utilisateur ErrorAddEventToUserCP=Une erreur est survenue durant l'ajout du congé exceptionnel. AddEventToUserOkCP=L'ajout du congé exceptionnel à bien été effectué. +ErrorFieldRequiredUserOrGroup=Le champ "groupe" ou le champ "utilisateur" doivent être remplis +fusionGroupsUsers=Le champ "groupes" et le champ "utilisateur" seront fusionnés MenuLogCP=Voir historique modif. LogCP=Historique des mises à jour de jours de congés disponibles ActionByCP=Réalisée par @@ -86,6 +91,13 @@ UserUpdateCP=Mis à jour pour PrevSoldeCP=Précédent Solde NewSoldeCP=Nouveau Solde alreadyCPexist=Une demande de congés a déjà été faite sur cette période. +UseralreadyCPexist=Une demande de congé a déjà été faite pour cette période pour %s. +groups=Groupes +users=Utilisateurs +AutoSendMail=Envoi automatique d'email +NewHolidayForGroup=Nouvelle demande de congé collectif +SendRequestCollectiveCP=Envoyer la demande de congé collectif +AutoValidationOnCreate=Validation automatique FirstDayOfHoliday=Premier jour de congés LastDayOfHoliday=Dernier jour de congés BoxTitleLastLeaveRequests=Les %s dernières demandes de congés modifiées @@ -137,3 +149,10 @@ XIsAUsualNonWorkingDay=%s est généralement un jour NON ouvrable BlockHolidayIfNegative=Bloqué lorsque le solde est négatif LeaveRequestCreationBlockedBecauseBalanceIsNegative=La création de cette demande de congé est bloquée car votre solde est négatif ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted=La demande de congé %s doit être brouillon, annulée ou refusée pour être supprimée +IncreaseHolidays=Augmenter le nombre de jours de vacances +HolidayRecordsIncreased= %s registres de vacances augmentés +HolidayRecordIncreased=Registre de vacances augmenté +ConfirmMassIncreaseHoliday=Augmentation en masse des vacances +NumberDayAddMass=Nombre de jours à ajouter à la sélection +ConfirmMassIncreaseHolidayQuestion=Êtes-vous sûr de vouloir augmenter les vacances du ou des enregistrement(s) sélectionnés %s ? +HolidayQtyNotModified=Le solde des jours restants pour %s n'a pas été modifié diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 5e520547352..0888db3aca6 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -28,6 +28,7 @@ ErrorPHPVersionTooLow=Version PHP trop ancienne. La version %s ou supérieure es ErrorPHPVersionTooHigh=Version PHP trop élevée. La version %s ou inférieure est requise. ErrorConnectedButDatabaseNotFound=Connexion au serveur réussie mais base '%s' introuvable. ErrorDatabaseAlreadyExists=La base de données '%s' existe déjà. +ErrorNoMigrationFilesFoundForParameters=Aucun fichier de migration trouvé pour les versions sélectionnées IfDatabaseNotExistsGoBackAndUncheckCreate=Si la base n'existe pas, revenez en arrière et cochez l'option "Créer la base de données". IfDatabaseExistsGoBackAndCheckCreate=Si la base existe déjà, revenez en arrière et désactiver l'option "Créer la base de données". WarningBrowserTooOld=Version du navigateur trop ancienne. Nous vous recommandons de mettre à jour vers une version récente de Firefox, Chrome ou Opera. @@ -50,7 +51,6 @@ DatabaseName=Nom de la base de données DatabasePrefix=Préfixe des tables DatabasePrefixDescription=Préfixe de table de base de données. Si vide, la valeur par défaut est llx_. AdminLogin=Identifiant du propriétaire de la base de données Dolibarr. -PasswordAgain=Vérification du mot de passe AdminPassword=Mot de passe du propriétaire de la base de données Dolibarr. CreateDatabase=Créer la base de données CreateUser=Créer le propriétaire ou lui affecter les droits à la base @@ -212,3 +212,5 @@ ClickHereToGoToApp=Cliquez ici pour aller sur votre application ClickOnLinkOrRemoveManualy=Si une mise à niveau est en cours, veuillez patienter. Si non, cliquez sur le lien suivant. Si vous atteignez toujours cette page, vous devez supprimer manuellement le fichier install.lock dans le répertoire documents Loaded=Chargé FunctionTest=Fonction test +NodoUpgradeAfterDB=Aucune action demandée par les modules externes après la mise à jour de la base de données +NodoUpgradeAfterFiles=Aucune action demandée par les modules externes après la mise à jour des fichiers ou des répertoires diff --git a/htdocs/langs/fr_FR/interventions.lang b/htdocs/langs/fr_FR/interventions.lang index 50e6ff1d9d1..c09f8431498 100644 --- a/htdocs/langs/fr_FR/interventions.lang +++ b/htdocs/langs/fr_FR/interventions.lang @@ -68,3 +68,4 @@ ConfirmReopenIntervention=Êtes-vous sur de vouloir ré-ouvrir l'intervention %s, i ErrorUserPermissionAllowsToLinksToItselfOnly=Pour des raisons de sécurité, il faut posséder les droits de modification de tous les utilisateurs pour pouvoir lier un adhérent à un utilisateur autre que vous même. SetLinkToUser=Lier à un utilisateur Dolibarr SetLinkToThirdParty=Lier à un tiers Dolibarr +MemberCountersArePublic=Les compteurs de membres valides sont publics MembersCards=Génération de cartes pour les membres MembersList=Liste des adhérents MembersListToValid=Liste des adhérents brouillons (à valider) @@ -72,6 +73,12 @@ MemberTypeCanNotBeDeleted=Ce type d'adhérent ne peut pas être supprimé NewSubscription=Nouvelle cotisation NewSubscriptionDesc=Ce formulaire permet de vous inscrire comme nouvel adhérent de l'association. Pour un renouvellement (si vous êtes déjà adhérent), contactez plutôt l'association par email %s. Subscription=Adhésion / cotisation +AnyAmountWithAdvisedAmount=Tout montant avec une quantité recommandée de %s%s +AnyAmountWithoutAdvisedAmount=Tout montant +CanEditAmountShort=Tout montant +CanEditAmountShortForValues=recommandé, tout montant +MembershipDuration=Durée +GetMembershipButtonLabel=Obtenir l'adhésion Subscriptions=Adhésions / cotisations SubscriptionLate=En retard SubscriptionNotReceived=Cotisation non reçue @@ -136,7 +143,7 @@ CardContent=Contenu de votre fiche adhérent # Text of email templates ThisIsContentOfYourMembershipRequestWasReceived=Nous vous informons que votre demande d'adhésion a bien été reçue.

    ThisIsContentOfYourMembershipWasValidated=Nous vous informons que votre adhésion a été validé avec les informations suivantes:

    -ThisIsContentOfYourSubscriptionWasRecorded=Nous vous informons que votre nouvelle cotisation a été enregistrée.

    +ThisIsContentOfYourSubscriptionWasRecorded=Nous voulons vous informer que votre nouvelle cotisation a été enregistrée. Veuillez trouver votre facture ci-jointe.

    ThisIsContentOfSubscriptionReminderEmail=Nous voulons vous informer que votre adhésion est sur le point d'expirer ou a déjà expiré (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Nous espérons que vous pourrez la renouveler, votre soutien nous est précieux.

    ThisIsContentOfYourCard=Ceci est un rappel des informations que nous avons vous concernant. N'hésitez pas à nous contacter en cas d'erreur.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet de l'email reçu en cas d'auto-inscription d'un invité @@ -199,7 +206,8 @@ NbOfSubscriptions=Nombre de cotisations AmountOfSubscriptions=Montant des cotisations TurnoverOrBudget=Chiffre affaire (pour société) ou Budget (asso ou collectivité) DefaultAmount=Montant par défaut de la cotisation -CanEditAmount=Le visiteur peut modifier / choisir le montant de sa cotisation +CanEditAmount=Le visiteur peut choisir/modifier le montant de sa contribution quel que soit le type d'adhérent +AmountIsLowerToMinimumNotice=Le montant est inférieur au montant minimum de %s MEMBER_NEWFORM_PAYONLINE=Rediriger sur la page intégrée de paiement en ligne ByProperties=Par nature MembersStatisticsByProperties=Statistiques des adhérents par nature diff --git a/htdocs/langs/fr_FR/modulebuilder.lang b/htdocs/langs/fr_FR/modulebuilder.lang index d29c9f2164b..2bd50f4225b 100644 --- a/htdocs/langs/fr_FR/modulebuilder.lang +++ b/htdocs/langs/fr_FR/modulebuilder.lang @@ -1,7 +1,8 @@ # Dolibarr language file - Source file is en_US - loan +IdModule= ID module ModuleBuilderDesc=Cet outil ne doit être utilisé que par des utilisateurs ou des développeurs expérimentés. Il fournit des utilitaires pour construire ou éditer votre propre module. La documentation pour le développement manuel alternatif est ici . EnterNameOfModuleDesc=Entrez le nom du module/application à créer sans espaces. Utilisez des majuscules pour séparer les mots (Par exemple: MyModule, EcommerceForShop, SyncWithMySystem...) -EnterNameOfObjectDesc=Entrez le nom de l'objet à créer sans espaces. Utilisez des majuscules pour séparer les mots (par exemple: MyObject, Student, Teacher...). Le fichier de classe CRUD, mais aussi le fichier d'API, les pages pour lister/ajouter/modifier/supprimer l'objet et les fichiers SQL seront générés. +EnterNameOfObjectDesc=Renseignez le nom de l'objet à créer, sans utiliser d'espace. Utilisez des majuscules pour séparer les termes (par exemple : MyObject, Student, Teacher...). Le fichier de classe CRUD, les pages pour lister/ajouter/modifier/supprimer l'objet et les fichiers SQL seront générés. EnterNameOfDictionaryDesc=Entrez le nom du dictionnaire à créer sans espaces. Utilisez des majuscules pour séparer les mots (Par exemple : MyDico...). Le fichier de classe, mais aussi le fichier SQL seront générés. ModuleBuilderDesc2=Chemin ou les modules sont générés/modifiés (premier répertoire pour les modules externes défini dans %s):%s ModuleBuilderDesc3=Modules générés/éditables trouvés : %s @@ -9,6 +10,7 @@ ModuleBuilderDesc4=Un module est détecté comme 'modifiable' quand le fichier < NewModule=Nouveau module NewObjectInModulebuilder=Nouvel objet NewDictionary=Nouveau dictionnaire +ModuleName=Nom du module ModuleKey=Clé du module ObjectKey=Clé de l'objet DicKey=Clé du dictionnaire @@ -48,6 +50,7 @@ PathToModulePackage=Chemin du zip du package du module/application PathToModuleDocumentation=Chemin d'accès au fichier de documentation du module (%s) SpaceOrSpecialCharAreNotAllowed=Les espaces et les caractères spéciaux ne sont pas autorisés. FileNotYetGenerated=Fichier non encore généré +GenerateCode=Générer le code RegenerateClassAndSql=Forcer la mise à jour des fichiers .class et .sql RegenerateMissingFiles=Générer les fichiers manquant SpecificationFile=Fichier de documentation @@ -86,10 +89,10 @@ ListOfMenusEntries=Liste des entrées du menu ListOfDictionariesEntries=Liste des entrées de dictionnaires ListOfPermissionsDefined=Liste des permissions SeeExamples=Voir des exemples ici -EnabledDesc=Condition pour que ce champ soit actif (Exemples: 1 ou $conf->global->MYMODULE_MYOPTION) -VisibleDesc=Le champ est-il visible ? (Exemples: 0 = Jamais visible, 1 = Visible sur les listes et formulaires de création/mise à jour/visualisation, 2 = Visible uniquement sur la liste, 3 = Visible uniquement sur le formulaire de création/mise à jour/affichage (pas les listes), 4=Visible sur les listes et formulaire de mise à jour et affichage uniquement (pas en création), 5=Visible sur les listes et formulaire en lecture (pas en création ni modification).

    Utiliser une valeur négative signifie que le champ n'est pas affiché par défaut sur la liste mais peut être sélectionné pour l'affichage).

    Il peut s'agir d'une expression, par exemple :
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Afficher ce champ sur les documents PDF compatibles, vous pouvez gérer la position avec le champ "Position.
    Actuellement, les modèles compatibles PDF connus sont : eratostene (commande), espadon (expédition), sponge (factures), cyan (devis/propositions commerciales), cornas (commande fournisseur)

    Pour le document :
    0 = non affiché
    1 = affiché
    2 = affiché uniquement si non vide

    Pour les lignes de document :
    0 = non affiché
    1 = affiché dans une colonne
    3 = affiché dans la colonne description après la description
    4 = affiché dans la colonne description après la description uniquement si non vide -DisplayOnPdf=Afficher sur PDF +EnabledDesc=Condition pour que ce champs soit actif.

    Exemples:
    1
    isModEnabled('MAIN_MODULE_MYMODULE')
    getDolGlobalString('MYMODULE_OPTION')==2 +VisibleDesc=Le champ est-il visible ? (Exemples: 0=Jamais visible, 1=Visible sur les listes et formulaires de création/mise à jour/visualisation, 2=Visible uniquement sur les listes, 3=Visible uniquement sur le formulaire de création/mise à jour/affichage (pas les listes), 4=Visible sur les listes et formulaire de mise à jour et affichage uniquement (pas en création), 5=Visible sur les listes et formulaire en lecture (pas en création ni modification).

    Utiliser une valeur négative signifie que le champ n'est pas affiché par défaut sur la liste mais peut être sélectionné pour l'affichage).

    Il peut s'agir d'une expression, par exemple :
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    $user->hasRight('holiday', 'define_holiday')?1:5 +DisplayOnPdfDesc=Affichez ce champ sur les documents PDF compatibles, vous pouvez gérer la position avec le champ "Position".
    Pour le document :
    0 = non affiché
    1 = affiché
    2 = affiché uniquement si non vide

    Pour les lignes de document :
    0 = non affiché
    1 = affiché dans une colonne
    3 = affiché dans la colonne description après la description
    4 = affiché dans la colonne description après la description uniquement si non vide +DisplayOnPdf=Sur les PDF IsAMeasureDesc=Peut-on cumuler la valeur du champ pour obtenir un total dans les listes ? (Exemples: 1 ou 0) SearchAllDesc=Le champ doit-il être utilisé pour effectuer une recherche à partir de l'outil de recherche rapide ? (Exemples: 1 ou 0) SpecDefDesc=Entrez ici toute la documentation que vous souhaitez joindre au module et qui n'a pas encore été définis dans d'autres onglets. Vous pouvez utiliser .md ou, mieux, la syntaxe enrichie .asciidoc. @@ -105,7 +108,7 @@ TriggerDefDesc=Définissez dans le fichier trigger le code que vous souhaitez ex SeeIDsInUse=Voir les IDs utilisés dans votre installation SeeReservedIDsRangeHere=Voir la plage des ID réservés ToolkitForDevelopers=Boîte à outils pour développeurs Dolibarr -TryToUseTheModuleBuilder=Si vous connaissez SQL et PHP, vous pouvez utiliser l'assistant de création de module natif.
    Activez le module %s et utilisez l'assistant en cliquant sur la . dans le menu en haut à droite.
    Avertissement: Il s'agit d'une fonctionnalité avancée pour les développeurs. Ne pas expérimenter sur votre site de production! +TryToUseTheModuleBuilder=Si vous connaissez SQL et PHP, vous pouvez utiliser l'assistant de création de module natif.
    Activez le module %s et utilisez l'assistant en cliquant sur la dans le menu en haut à droite.
    Avertissement: Il s'agit d'une fonctionnalité avancée pour les développeurs. Ne pas expérimenter sur votre site de production! SeeTopRightMenu=Voir à droite de votre barre de menu principal AddLanguageFile=Ajouter le fichier de langue YouCanUseTranslationKey=Vous pouvez utiliser ici une clé qui est la clé de traduction trouvée dans le fichier de langue (voir l'onglet "Langues") @@ -132,9 +135,9 @@ UseSpecificAuthor = Utiliser un auteur spécifique UseSpecificVersion = Utiliser une version initiale spécifique IncludeRefGeneration=La référence de l'objet doit être générée automatiquement par des règles de numérotation personnalisées IncludeRefGenerationHelp=Cochez cette case si vous souhaitez inclure du code pour gérer automatiquement la génération de la référence à l'aide de règles de numérotation personnalisées -IncludeDocGeneration=Je souhaite générer des documents à partir de modèles pour l'objet +IncludeDocGeneration=Je souhaite la fonctionnalité pour générer des documents (PDF, ODT) à partir de modèles pour cet objet IncludeDocGenerationHelp=Si vous cochez cette case, du code sera généré pour ajouter une section "Générer un document" sur la fiche de l'objet. -ShowOnCombobox=Afficher la valeur dans la liste déroulante +ShowOnCombobox=Afficher la valeur dans les listes déroulantes KeyForTooltip=Clé pour l'info-bulle CSSClass=CSS pour le formulaire d'édition / création CSSViewClass=CSS pour le formulaire de lecture @@ -154,3 +157,6 @@ ListOfTabsEntries=Liste des entrées d'onglet TabsDefDesc=Définissez ici les onglets proposés par votre module TabsDefDescTooltip=Les onglets fournis par votre module/application sont définis dans le tableau $this->tabs dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré. BadValueForType=Mauvaise valeur pour le type %s +DefinePropertiesFromExistingTable=Définir des propriétés à partir d'une table existante +DefinePropertiesFromExistingTableDesc=Si une table dans la base de données (pour l'objet à créer) existe déjà, vous pouvez l'utiliser pour définir les propriétés de l'objet. +DefinePropertiesFromExistingTableDesc2=Laisser vide si la table n'existe pas encore. Le générateur de code utilisera différents types de champs pour créer un exemple de table que vous pourrez modifier ultérieurement. diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index 709ff68b963..3cab2476a09 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -82,6 +82,7 @@ ProductsToProduce=Produits à produire UnitCost=Coût unitaire TotalCost=Coût total BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le prix de revient si défini, sinon le PMP si défini, sinon le meilleur prix d'achat) +BOMTotalCostService=Si le module "Poste de travail" est activé et qu'un poste de travail est défini par défaut sur la ligne, alors le calcul est "quantité (convertie en heures) x poste de travail ahr", sinon "quantité (convertie en heures) x prix de revient de la prestation" GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler. ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une Nomenclature ou un Ordre de fabrication. Workstation=Poste de travail @@ -109,7 +110,7 @@ THMEstimatedHelp=Ce taux permet de définir un coût prévisionnel de l'article BOM=Nomenclature CollapseBOMHelp=Vous pouvez définir l'affichage par défaut des détails de la nomenclature dans la configuration du module BOM MOAndLines=Ordres de fabrication et lignes -MoChildGenerate=Generate Child Mo -ParentMo=MO Parent -MOChild=MO Child -BomCantAddChildBom=La nomenclature %s est déjà présente dans l'arborescence qui mène à la nomenclature %s +MoChildGenerate=Générer OF enfant +ParentMo=OF parent +MOChild=OF Enfant +BomCantAddChildBom=La nomenclature %s est déjà présente dans l'arbre menant à la nomenclature %s diff --git a/htdocs/langs/fr_FR/oauth.lang b/htdocs/langs/fr_FR/oauth.lang index 493cf00deb9..e884f616f39 100644 --- a/htdocs/langs/fr_FR/oauth.lang +++ b/htdocs/langs/fr_FR/oauth.lang @@ -9,8 +9,9 @@ HasAccessToken=Un jeton a été généré et sauvegardé dans la base de donnée NewTokenStored=Jeton reçu et sauvegardé ToCheckDeleteTokenOnProvider=Cliquer ici pour vérifier/effacer les autorisations sauvées par le fournisseur OAuth %s TokenDeleted=Jeton effacé +GetAccess=Cliquez ici pour obtenir un token RequestAccess=Cliquez ici pour demander/renouveler l'accès et recevoir un nouveau jeton -DeleteAccess=Cliquez ici pour effacer le jeton +DeleteAccess=Cliquez ici pour supprimer le jeton UseTheFollowingUrlAsRedirectURI=Utilisez l'URL suivante comme URI de redirection quand vous créez des identifiants d'accès chez votre fournisseur OAuth : ListOfSupportedOauthProviders=Ajoutez vos fournisseurs de jetons OAuth2. Ensuite, rendez-vous sur la page d'administration de votre fournisseur OAuth pour créer/obtenir un identifiant et un secret OAuth et enregistrez-les ici. Une fois cela fait, basculez sur l'autre onglet pour générer votre jeton. OAuthSetupForLogin=Page pour gérer (générer/supprimer) les jetons OAuth @@ -34,3 +35,6 @@ OAUTH_ID=ID OAuth OAUTH_SECRET=Code secret OAuth OAuthProviderAdded=Fournisseur OAuth ajouté AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=Une entrée OAuth pour ce fournisseur et ce libellé existe déjà +URLOfServiceForAuthorization=URL fournie par le service OAuth pour l'authentification +Scopes=Permissions ("Scopes" OAuth) +ScopeUndefined=Permissions (Cibles) non définies (voir onglet précédent) diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 7617085348e..6c714be2c4d 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -311,10 +311,10 @@ ExternalSiteURL=URL du site externe du contenu iFrame HTML ExternalSiteModuleNotComplete=La configuration du module "Site externe" est incomplète. ExampleMyMenuEntry=Mon entrée de menu -# FTP +# ftp FTPClientSetup=Connexion client FTP/FTPS NewFTPClient=Nouvelle connexion FTP/FTPS -FTPArea=Zone des connexions FTP/FTPS +FTPArea=Zone FTP/SFTP FTPAreaDesc=Vue d'un serveur FTP/FTPS SetupOfFTPClientModuleNotComplete=La configuration du client FTP/FTPS semble incomplète FTPFeatureNotSupportedByYourPHP=Votre version de PHP ne supporte pas les fonctions FTP/FTPS @@ -325,3 +325,9 @@ FTPFailedToRemoveDir=Échec suppression répertoire %s (Vérifiez les per FTPPassiveMode=Mode passif ChooseAFTPEntryIntoMenu=Sélection d'un site FTP/FTPS depuis le menu FailedToGetFile=Echec à la récupération du fichier %s +ErrorFTPNodisconnect=Erreur de déconnexion du serveur FTP/SFTP +FileWasUpload=Le fichier %s a été téléchargé +FTPFailedToUploadFile=Impossible de télécharger le fichier %s. +AddFolder=Créer un dossier +FileWasCreateFolder=Le dossier %s a été créé +FTPFailedToCreateFolder=Échec de la création du dossier %s. diff --git a/htdocs/langs/fr_FR/partnership.lang b/htdocs/langs/fr_FR/partnership.lang index 845bf4ff36c..20c3fc0d801 100644 --- a/htdocs/langs/fr_FR/partnership.lang +++ b/htdocs/langs/fr_FR/partnership.lang @@ -20,6 +20,7 @@ ModulePartnershipName=Gestion des partenariats PartnershipDescription=Module de gestion des partenariats PartnershipDescriptionLong= Module de gestion des partenariats Partnership=Partenariat +Partnerships=Partenariats AddPartnership=Ajouter un partenariat CancelPartnershipForExpiredMembers=Partenariat : annuler le partenariat des adhérents dont les cotisations ont expirés PartnershipCheckBacklink=Partenariat : Vérifiez le backlink référent @@ -28,6 +29,7 @@ PartnershipCheckBacklink=Partenariat : Vérifiez le backlink référent # Menu # NewPartnership=Nouveau partenariat +NewPartnershipbyWeb= Votre partenariat a été ajouté avec succès. ListOfPartnerships=Listes des partenariats # @@ -42,6 +44,7 @@ PARTNERSHIP_BACKLINKS_TO_CHECK=Liens de retour à vérifier PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL=Nb de jours avant l'annulation de l'état d'un partenariat lorsque la cotisation a expiré ReferingWebsiteCheck=Vérification du site référent ReferingWebsiteCheckDesc=Vous pouvez activer une fonctionnalité pour vérifier que vos partenaires ont ajouté un rétrolien vers les domaines de votre site Web sur leur propre site Web. +PublicFormRegistrationPartnerDesc=Dolibarr peut vous fournir une URL/un site Web public pour permettre aux visiteurs externes de demander à faire partie du programme de partenariat. # # Object @@ -59,6 +62,12 @@ BacklinkNotFoundOnPartnerWebsite=Lien de retour non trouvé sur le site web part ConfirmClosePartnershipAsk=Êtes-vous sûr de vouloir annuler ce partenariat ? PartnershipType=Type de partenariat PartnershipRefApproved=Partenariat %s approuvé +KeywordToCheckInWebsite=Si vous souhaitez vérifier qu'un mot-clé donné est présent dans le site de chaque partenaire, définissez ce mot-clé ici +PartnershipDraft=Brouillon +PartnershipAccepted=Accepté +PartnershipRefused=Refusé +PartnershipCanceled=Annulé +PartnershipManagedFor=Les partenaires sont # # Template Mail @@ -82,11 +91,6 @@ CountLastUrlCheckError=Nombre d'erreurs lors de la dernière vérification d'URL LastCheckBacklink=Date de la dernière vérification d'URL ReasonDeclineOrCancel=Raison du refus -# -# Status -# -PartnershipDraft=Brouillon -PartnershipAccepted=Accepté -PartnershipRefused=Refusé -PartnershipCanceled=Annulé -PartnershipManagedFor=Les partenaires sont +NewPartnershipRequest=Nouvelle demande de partenariat +NewPartnershipRequestDesc=Ce formulaire vous permet de demander à faire partie de l'un de nos programmes de partenariat. Si vous avez besoin d'aide pour remplir ce formulaire, veuillez contacter par email %s . + diff --git a/htdocs/langs/fr_FR/paypal.lang b/htdocs/langs/fr_FR/paypal.lang index 0fdb3e38d20..be600a2671b 100644 --- a/htdocs/langs/fr_FR/paypal.lang +++ b/htdocs/langs/fr_FR/paypal.lang @@ -34,3 +34,4 @@ ARollbackWasPerformedOnPostActions=Une annulation a été effectuée sur toutes ValidationOfPaymentFailed=La validation du paiement a échoué CardOwner=Titulaire de la carte PayPalBalance=Crédit Paypal +OnlineSubscriptionPaymentLine=Cotisation en ligne enregistrée sur %s
    Payé via %s
    Adresse IP d'origine : %s
    ID de transaction : %s diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 68b5e928084..8493e419384 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -1,8 +1,8 @@ # ProductBATCH language file - Source file is en_US - ProductBATCH ManageLotSerial=Utiliser les numéros de lots/série -ProductStatusOnBatch=Oui (Lot/Série requis) +ProductStatusOnBatch=Oui (lot/série requis) ProductStatusOnSerial=Oui (numéro de série unique requis) -ProductStatusNotOnBatch=Non (Lot/Série non utilisé) +ProductStatusNotOnBatch=Non (lot/série non utilisé) ProductStatusOnBatchShort=Lot ProductStatusOnSerialShort=Numéro Série ProductStatusNotOnBatchShort=Non @@ -17,6 +17,7 @@ printBatch=Lot/Série: %s printEatby=DMD/DLUO: %s printSellby=DLC: %s printQty=Qté: %d +printPlannedWarehouse=Entrepôt : %s AddDispatchBatchLine=Ajouter une ligne pour la répartition par durée de conservation WhenProductBatchModuleOnOptionAreForced=Quand le module Lot/Série est activé, le mode de décrémentation automatique des stocks est forcé sur 'Décrémenter les stocks réel sur validation d'expédition' et le mode d'incrémentation automatique de stocks est forcé sur 'Incrémenter les stocks réels sur ventilation manuels dans les entrepôts' et ne peut pas être édité. Les autres options peuvent être définies comme vous le voulez. ProductDoesNotUseBatchSerial=Ce produit n'utilise pas les numéros de lot/série @@ -43,4 +44,4 @@ HideLots=Masquer les lots OutOfOrder=Hors d'usage InWorkingOrder=En état de marche ToReplace=Remplacer -CantMoveNonExistantSerial=Erreur : Vous avez demandé un mouvement sur un numéro de série qui n’existe plus. Peut-être avez-vous requis le même numéro de série plusieurs fois dans une même expédition, ou il a déjà servi dans une autre expédition. Supprimez cette expédition et préparez-en une autre. +CantMoveNonExistantSerial=Erreur : un numéro de série sur lequel vous avez demandé un mouvement n'existe plus. Peut-être avez-vous utilisé plusieurs fois le même numéro de série depuis le même entrepôt sur la même expédition, ou peut-être était-il utilisé sur une autre expédition. Supprimez cette expédition et préparez-en une autre. diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 31978c672e9..2592548059c 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -140,7 +140,7 @@ PriceQtyMin=Prix quantité min. PriceQtyMinCurrency=Prix (devise) pour cette quantité. WithoutDiscount=Sans remise VATRateForSupplierProduct=Taux TVA (pour ce produit/fournisseur) -DiscountQtyMin=Remise par défaut quantité min. +DiscountQtyMin=Remise pour cette qté. NoPriceDefinedForThisSupplier=Aucun prix/qté défini pour ce fournisseur/produit NoSupplierPriceDefinedForThisProduct=Aucun prix/qté fournisseur défini pour ce produit PredefinedItem=Article prédéfini @@ -345,7 +345,7 @@ PossibleValues=Valeurs possibles GoOnMenuToCreateVairants=Allez sur le menu %s - %s pour ajouter les attributs de variantes (comme les couleurs, tailles, ...) UseProductFournDesc=Ajouter une fonctionnalité pour définir la description produit définie par les vendeurs (pour chaque référence vendeur) en plus de la description pour les clients ProductSupplierDescription=Description du fournisseur du produit -UseProductSupplierPackaging=Utiliser le conditionnement/emballage sur les prix fournisseur (recalculer les quantités en fonction de l'emballage défini sur le prix fournisseur lors de l'ajout / mise à jour de la ligne dans les documents fournisseurs) +UseProductSupplierPackaging=Utiliser l'emballage pour les prix arrondis aux multiples pour les prix d'achat (recalculer les quantités en fonction des multiples définis sur les prix d'achat lors de l'ajout/de la mise à jour d'une ligne dans les documents d'un fournisseur) PackagingForThisProduct=Conditionnement PackagingForThisProductDesc=Vous achèterez automatiquement un multiple de cette quantité. QtyRecalculatedWithPackaging=La quantité de la ligne a été recalculée en fonction de l'emballage du fournisseur @@ -416,6 +416,7 @@ ProductsMergeSuccess=Produits fusionnés ErrorsProductsMerge=Erreur lors de la fusion des produits SwitchOnSaleStatus=Basculer le statut En vente SwitchOnPurchaseStatus=Basculer le statut En achat +UpdatePrice=Augmenter/baisser le prix de vente StockMouvementExtraFields= Champs supplémentaires (mouvement de stock) InventoryExtraFields= Attributs supplémentaires (inventaire) ScanOrTypeOrCopyPasteYourBarCodes=Scannez ou tapez ou copiez/collez vos codes-barres @@ -427,3 +428,4 @@ RealValuation=Valorisation réelle ConfirmEditExtrafield = Sélectionnez l'extrafield que vous souhaitez modifier ConfirmEditExtrafieldQuestion = Voulez-vous vraiment modifier cet extrafield ? ModifyValueExtrafields = Modifier la valeur d'un extrafield +OrProductsWithCategories=Ou des produits avec des tags/catégories diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index af97ce451bb..90fe82c2ffb 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -167,7 +167,7 @@ OpportunityAmount=Montant opportunité OpportunityAmountShort=Montant opportunité OpportunityWeightedAmount=Montant pondéré des opportunités OpportunityWeightedAmountShort=Montant pondéré opp. -OpportunityAmountAverageShort=montant moyen des opportunités +OpportunityAmountAverageShort=Montant moyen des opportunités OpportunityAmountWeigthedShort=Montant pondéré des opportunités WonLostExcluded=hors opportunités remportées/perdues ##### Types de contacts ##### @@ -259,7 +259,7 @@ TimeSpentInvoiced=Temps passé facturé TimeSpentForIntervention=Temps consommé TimeSpentForInvoice=Temps consommés OneLinePerUser=Une ligne par utilisateur -ServiceToUseOnLines=Service à utiliser sur les lignes +ServiceToUseOnLines=Service à utiliser sur les lignes par défaut InvoiceGeneratedFromTimeSpent=La facture %s a été générée à partir du temps passé sur le projet InterventionGeneratedFromTimeSpent=L'intervention %s a été générée à partir du temps consacré au projet ProjectBillTimeDescription=Cochez si vous saisissez du temps sur les tâches du projet ET prévoyez de générer des factures à partir des temps pour facturer le client du projet (ne cochez pas si vous comptez créer une facture qui n'est pas basée sur la saisie des temps). Note: Pour générer une facture, aller sur l'onglet 'Temps consommé' du project et sélectionnez les lignes à inclure. @@ -294,3 +294,4 @@ EnablePublicLeadForm=Activer le formulaire public de contact NewLeadbyWeb=Votre message ou votre demande a été enregistré. Nous vous répondrons ou vous contacterons bientôt. NewLeadForm=Nouveau formulaire de contact LeadFromPublicForm=Lead en ligne à partir d'un formulaire public +ExportAccountingReportButtonLabel=Obtenir un rapport diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index 41483196a39..93bfd82a24e 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -103,11 +103,13 @@ IdProposal=ID de la proposition commerciale IdProduct=ID produit LineBuyPriceHT=Prix d'achat HT de la ligne SignPropal=Accepter la proposition +SignContract=Signer le contrat RefusePropal=Refuser la proposition Sign=Signer NoSign=Mettre à Non signé PropalAlreadySigned=Proposition déjà acceptée PropalAlreadyRefused=Proposition déjà refusée PropalSigned=Proposition acceptée +ContractSigned=Contrat signé PropalRefused=Proposition refusée ConfirmRefusePropal=Êtes-vous sûr de vouloir refuser cette proposition ? diff --git a/htdocs/langs/fr_FR/receiptprinter.lang b/htdocs/langs/fr_FR/receiptprinter.lang index 6c313e08dd8..6964eb61308 100644 --- a/htdocs/langs/fr_FR/receiptprinter.lang +++ b/htdocs/langs/fr_FR/receiptprinter.lang @@ -7,7 +7,7 @@ TestSentToPrinter=Test envoyé à l'imprimante %s ReceiptPrinter=Imprimantes Tickets ReceiptPrinterDesc=Réglage des imprimantes de tickets ReceiptPrinterTemplateDesc=Réglage des modèles -ReceiptPrinterTypeDesc=Description des types d'imprimantes de tickets +ReceiptPrinterTypeDesc=Exemple de valeurs possibles pour le champ "Paramètres" selon le type de driver ReceiptPrinterProfileDesc=Description des imprimantes de tickets ListPrinters=Liste des imprimantes SetupReceiptTemplate=Réglage des modèles @@ -54,7 +54,9 @@ DOL_DOUBLE_WIDTH=Double la taille en largeur DOL_DEFAULT_HEIGHT_WIDTH=Hauteur et largeur par défaut  DOL_UNDERLINE=Activer le souligné DOL_UNDERLINE_DISABLED=Désactiver le souligné -DOL_BEEP=Bruit de fond +DOL_BEEP=Notification sonore +DOL_BEEP_ALTERNATIVE=Bip sonore (mode alternatif) +DOL_PRINT_CURR_DATE=Imprimer la date/l'heure actuelle DOL_PRINT_TEXT=Imprimer le texte DateInvoiceWithTime=Date et heure de facturation YearInvoice=Année de facturation diff --git a/htdocs/langs/fr_FR/receptions.lang b/htdocs/langs/fr_FR/receptions.lang index 30ac8e985bc..5411fc7142f 100644 --- a/htdocs/langs/fr_FR/receptions.lang +++ b/htdocs/langs/fr_FR/receptions.lang @@ -48,7 +48,6 @@ ReceptionsNumberingModules=Module de numérotation pour les réceptions ReceptionsReceiptModel=Modèles de document pour les réceptions NoMorePredefinedProductToDispatch=Plus de produits prédéfinis à expédier ReceptionExist=Une réception existe -ByingPrice=Prix d'achat ReceptionBackToDraftInDolibarr=Réception %s retourné en brouillon ReceptionClassifyClosedInDolibarr=Reception %s classée Fermée ReceptionUnClassifyCloseddInDolibarr=Réception %s ré-ouverte diff --git a/htdocs/langs/fr_FR/recruitment.lang b/htdocs/langs/fr_FR/recruitment.lang index f2d8df78aa3..1525b06d5b3 100644 --- a/htdocs/langs/fr_FR/recruitment.lang +++ b/htdocs/langs/fr_FR/recruitment.lang @@ -57,8 +57,9 @@ EmailRecruiter=Email recruteur ToUseAGenericEmail=Pour utiliser un e-mail générique. S'il n'est pas défini, l'email du responsable du recrutement sera utilisé NewCandidature=Nouvelle candidature ListOfCandidatures=Liste des candidatures -RequestedRemuneration=Rémunération demandée -ProposedRemuneration=Rémunération proposée +Remuneration=Salaire +RequestedRemuneration=Salaire demandé +ProposedRemuneration=Salaire proposé ContractProposed=Contrat proposé ContractSigned=Contrat signé ContractRefused=Contrat refusé @@ -74,3 +75,5 @@ JobClosedTextCanceled=Le poste n'est plus ouvert. ExtrafieldsJobPosition=Attributs complémentaires (postes) ExtrafieldsApplication=Attributs complémentaires (candidature) MakeOffer=Faire un offre +WeAreRecruiting=Nous recrutons. Voici une liste de postes à pourvoir... +NoPositionOpen=Aucun poste ouvert pour le moment diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index a0642c4c627..a0d91884279 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -24,6 +24,7 @@ StockAtDateInFuture=Date dans le futur StocksByLotSerial=Stocks par lot/série LotSerial=Lots/séries LotSerialList=Liste des numéros de lots/séries +SubjectToLotSerialOnly=Produits soumis au lot/série uniquement Movements=Mouvements ErrorWarehouseRefRequired=Le nom de référence de l'entrepôt est obligatoire ListOfWarehouses=Liste des entrepôts @@ -234,7 +235,7 @@ StockIncrease=Augmentation du stock StockDecrease=Diminution du stock InventoryForASpecificWarehouse=Inventaire pour un entrepôt spécifique InventoryForASpecificProduct=Inventaire pour un produit spécifique -StockIsRequiredToChooseWhichLotToUse=Le module Stock est requis pour choisir une lot +StockIsRequiredToChooseWhichLotToUse=Un stock existant est nécessaire pour pouvoir choisir le lot à utiliser ForceTo=Forcer à AlwaysShowFullArbo=Afficher l'arborescence complète de l'entrepôt sur la popup du lien entrepôt (Avertissement: cela peut réduire considérablement les performances) StockAtDatePastDesc=Vous pouvez voir ici le stock (stock réel) à une date donnée dans le passé diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 0998191b0a2..f73df3434c9 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -4,6 +4,7 @@ SuppliersInvoice=Facture fournisseur SupplierInvoices=Factures fournisseur ShowSupplierInvoice=Montrer la facture fournisseur NewSupplier=Nouveau fournisseur +NewSupplierInvoice = Nouvelle facture du vendeur History=Historique ListOfSuppliers=Liste des fournisseurs ShowSupplier=Afficher fournisseur diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 3f5be72e1d9..be78d74f2a8 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -149,6 +149,8 @@ TicketsAutoNotifyCloseHelp=Lors de la clôture d'un ticket, il vous sera propos TicketWrongContact=Le contact fourni ne fait pas partie des contacts actuels du ticket. E-mail non envoyé. TicketChooseProductCategory=Catégorie de produit pour les tickets TicketChooseProductCategoryHelp=Sélectionnez la catégorie de produit du support de ticket. Celui-ci sera utilisé pour lier automatiquement un contrat à un ticket. +TicketUseCaptchaCode=Utiliser le code graphique (CAPTCHA) lors de la création d'un ticket +TicketUseCaptchaCodeHelp=Ajoute la vérification CAPTCHA lors de la création d'un nouveau ticket. # # Index & list page @@ -204,8 +206,8 @@ TicketSeverity=Sévérité ShowTicket=Voir le ticket RelatedTickets=Tickets liés TicketAddIntervention=Créer intervention -CloseTicket=Fermer|Résoudre ticket -AbandonTicket=Abandonner le ticket +CloseTicket=Fermer|Résoudre +AbandonTicket=Abandonner CloseATicket=Fermer|Résoudre un ticket ConfirmCloseAticket=Confirmer la fermeture du ticket ConfirmAbandonTicket=Confirmez-vous la fermeture du ticket au statut 'Abandonné' @@ -219,18 +221,17 @@ SendMessageByEmail=Envoyer ce message par email TicketNewMessage=Nouveau message ErrorMailRecipientIsEmptyForSendTicketMessage=Le destinataire est vide. Aucun e-mail envoyé TicketGoIntoContactTab=Rendez-vous dans le tableau "Contacts" pour les sélectionner -TicketMessageMailIntro=Introduction +TicketMessageMailIntro=Entête de message TicketMessageMailIntroHelp=Ce texte est ajouté seulement au début de l'email et ne sera pas sauvegardé. -TicketMessageMailIntroLabelAdmin=Texte d'introduction à toutes les réponses aux tickets TicketMessageMailIntroText=Bonjour,
    Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici le message :
    TicketMessageMailIntroHelpAdmin=Ce texte sera inséré avant la réponse lors d'une réponse à un ticket depuis Dolibarr -TicketMessageMailSignature=Signature -TicketMessageMailSignatureHelp=Ce texte est ajouté seulement à la fin de l'email et ne sera pas sauvegardé. -TicketMessageMailSignatureText=Message envoyé par %s via Dolibarr -TicketMessageMailSignatureLabelAdmin=Signature de l'email de réponse -TicketMessageMailSignatureHelpAdmin=Ce texte sera inséré après le message de réponse. +TicketMessageMailFooter=Pied de page des messages +TicketMessageMailFooterHelp=Ce texte est ajouté uniquement à la fin du message envoyé par e-mail et ne sera pas enregistré. +TicketMessageMailFooterText=Message envoyé par %s via Dolibarr +TicketMessageMailFooterHelpAdmin=Ce texte sera inséré après le message de réponse. TicketMessageHelp=Seul ce texte sera sauvegardé dans la liste des messages sur la fiche ticket. TicketMessageSubstitutionReplacedByGenericValues=Les variables de substitution sont remplacées par des valeurs génériques. +ForEmailMessageWillBeCompletedWith=Pour les e-mails envoyés à des utilisateurs externes, le message sera complété par TimeElapsedSince=Temps écoulé depuis TicketTimeToRead=Temps écoulé avant la lecture TicketTimeElapsedBeforeSince=Temps écoulé avant / depuis @@ -296,7 +297,7 @@ TicketNewEmailBodyInfosTrackUrlCustomer=Vous pouvez voir la progression du ticke TicketCloseEmailBodyInfosTrackUrlCustomer=Vous pouvez consulter l'historique de ce ticket en cliquant sur le lien suivant TicketEmailPleaseDoNotReplyToThisEmail=Merci de ne pas répondre directement à ce courriel ! Utilisez le lien pour répondre via l'interface. TicketPublicInfoCreateTicket=Ce formulaire vous permet d'enregistrer un ticket dans notre système de gestion. -TicketPublicPleaseBeAccuratelyDescribe=Veuillez décrire avec précision le problème. Fournissez le plus d'informations possibles pour nous permettre d'identifier correctement votre demande. +TicketPublicPleaseBeAccuratelyDescribe=Veuillez décrire précisément votre question. Fournissez le plus d'informations possible pour nous permettre d'identifier correctement votre demande. TicketPublicMsgViewLogIn=Merci d'entrer le code de suivi du ticket TicketTrackId=ID de suivi publique OneOfTicketTrackId=Un de vos ID de suivi diff --git a/htdocs/langs/fr_FR/users.lang b/htdocs/langs/fr_FR/users.lang index 5888332a820..4840c05740a 100644 --- a/htdocs/langs/fr_FR/users.lang +++ b/htdocs/langs/fr_FR/users.lang @@ -68,7 +68,6 @@ CreateDolibarrLogin=Créer un compte utilisateur CreateDolibarrThirdParty=Créer un tiers LoginAccountDisableInDolibarr=Le compte est désactivé sur Dolibarr. UsePersonalValue=Utiliser valeur personnalisée -InternalUser=Utilisateur interne ExportDataset_user_1=Utilisateurs et attributs DomainUser=Utilisateur du domaine %s Reactivate=Réactiver diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index 53e07d0dd2e..c46c3b33e37 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -1,5 +1,6 @@ # Dolibarr language file - Source file is en_US - website Shortname=Code +WebsiteName=Nom du site web WebsiteSetupDesc=Créez ici les sites Web que vous souhaitez utiliser. Ensuite, allez dans le menu Sites Web pour les éditer. DeleteWebsite=Effacer site web ConfirmDeleteWebsite=Êtes-vous sûr de vouloir supprimer ce site web. Toutes les pages et le contenu seront également supprimés. Les fichiers téléversés (comme ceux dans le répertoire medias, dans le module GED, ...) seront conservés. @@ -15,9 +16,9 @@ WEBSITE_HTML_HEADER=Ajout en bas de l'en-tête HTML (commun à toutes les pages) WEBSITE_ROBOT=Fichier robot (robots.txt) WEBSITE_HTACCESS=Fichier .htaccess du site web WEBSITE_MANIFEST_JSON=Fichier manifest.json de site Web -WEBSITE_README=Fichier README.md WEBSITE_KEYWORDSDesc=Utiliser une virgule pour séparer les valeurs -EnterHereLicenseInformation=Entrez ici les métadonnées ou les informations de licence pour créer un fichier README.md. Si vous distribuez votre site Web en tant que modèle, le fichier sera inclus dans le package. +EnterHereReadmeInformation=Entrez ici une description du site Web. Si vous distribuez votre site Web en tant que modèle, le fichier sera inclus dans le package de modèles. +EnterHereLicenseInformation=Entrez ici la LICENCE du code du site Web. Si vous distribuez votre site Web en tant que modèle, le fichier sera inclus dans le package de modèles. HtmlHeaderPage=En-tête HTML (spécifique pour la page uniquement) PageNameAliasHelp=Nom ou alias de la page.
    Cet alias est également utilisé pour forger une URL SEO lorsque le site Web est exécuté à partir d'un hôte virtuel d'un serveur Web (comme Apache, Nginx, ...). Utilisez le bouton "%s" pour modifier cet alias. EditTheWebSiteForACommonHeader=Remarque: Si vous souhaitez définir un en-tête personnalisé pour toutes les pages, modifiez l'en-tête au niveau du site plutôt qu'au niveau page/container. @@ -42,6 +43,8 @@ ViewPageInNewTab=Pré-visualiser la page dans un nouvel onglet SetAsHomePage=Définir comme page d'accueil RealURL=URL réelle ViewWebsiteInProduction=Pré-visualiser le site web en utilisant l'URL de la page d'accueil +Virtualhost=Hôte virtuel ou nom de domaine +VirtualhostDesc=Le nom de l'hôte virtuel ou du domaine (par exemple : www.mywebsite.com, mybigcompany.net, ...) SetHereVirtualHost= Utilisation avec Apache/NGinx/...
    Créez sur votre serveur Web (Apache, Nginx, ...) un hôte virtuel dédié avec PHP activé et un répertoire racine sur
    %s ExampleToUseInApacheVirtualHostConfig=Exemple à utiliser dans la configuration de l'hôte virtuel Apache: YouCanAlsoTestWithPHPS= Utilisation avec un serveur PHP incorporé
    Sous environnement de développement, vous pouvez préférer tester le site avec le serveur Web PHP intégré (PHP 5.5 requis) en exécutant
    php -S 0.0.0.0:8080 -t %s @@ -145,3 +148,6 @@ ImportFavicon=Favicon ErrorFaviconType=Le Favicon doit être en png ErrorFaviconSize=Le Favicon doit être de taille 16x16, 32x32 ou 64x64 FaviconTooltip=Téléverser une image qui doit être au format png (16x16, 32x32 ou 64x64) +NextContainer=Page/conteneur suivant(e) +PreviousContainer=Page/conteneur précédent(e) +WebsiteMustBeDisabled=Le site Web doit avoir le statut "désactivé" diff --git a/htdocs/langs/fr_FR/withdrawals.lang b/htdocs/langs/fr_FR/withdrawals.lang index f91ffbd55f3..8b6e6aa317e 100644 --- a/htdocs/langs/fr_FR/withdrawals.lang +++ b/htdocs/langs/fr_FR/withdrawals.lang @@ -42,6 +42,7 @@ CreditTransferStatistics=Statistiques sur les virements Rejects=Rejets LastWithdrawalReceipt=Les %s derniers bons de prélèvements MakeWithdrawRequest=Faire une demande de prélèvement +MakeWithdrawRequestStripe=Faire une demande de paiement par prélèvement automatique via Stripe MakeBankTransferOrder=Faire une demande de virement WithdrawRequestsDone=%s demandes de prélèvements enregistrées BankTransferRequestsDone=%s demandes de prélèvements enregistrées @@ -100,8 +101,11 @@ CreditDate=Crédité le WithdrawalFileNotCapable=Impossible de générer le fichier de reçu des prélèvement pour votre pays %s (Votre pays n'est pas supporté) ShowWithdraw=Afficher ordre de prélèvement IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Toutefois, si la facture a au moins une demande de prélèvement non traité, elle ne sera pas classée payée afin de permettre le prélèvement d'abord. -DoStandingOrdersBeforePayments=Cet onglet vous permet de demander un prélèvement. Une fois la demande faite, allez dans le menu Banque->Paiement par prélèvement pour générer l'ordre de prélèvement. Lorsque l'ordre de paiement est clos, le paiement sur les factures seront automatiquement enregistrés, et les factures fermées si le reste à payer est nul. -DoCreditTransferBeforePayments=Cet onglet vous permet de demander un ordre de virement. Une fois fait, allez dans le menu Banque ->Paiements par virement pour gérer l'ordre de virement. Lorsque le virement est clôturé, le paiement des factures fournisseurs sera automatiquement enregistré et les factures clôturées si le solde à payer est nul. +DoStandingOrdersBeforePayments=Cet onglet vous permet de demander un ordre de prélèvement automatique. Une fois cela fait, vous pouvez vous rendre dans le menu "Banque->Paiement par prélèvement" pour générer et gérer un fichier d'ordre de prélèvement. +DoStandingOrdersBeforePayments2=Vous pouvez également envoyer une demande directement à un processeur de paiement SEPA comme Stripe, ... +DoStandingOrdersBeforePayments3=Lors de la clôture d'un ordre de prélèvement, le règlement des factures sera automatiquement enregistré, et les factures clôturées si le reste à payer est nul. +DoCreditTransferBeforePayments=Cet onglet vous permet de demander un ordre de virement. Une fois cela fait, allez dans le menu "Banque->Paiement par virement" pour générer et gérer un fichier d'ordre de virement. +DoCreditTransferBeforePayments3=A la clôture de l'ordre de virement, le règlement des factures sera automatiquement enregistré, et les factures clôturées si le reste à payer est nul. WithdrawalFile=Fichier de prélèvement CreditTransferFile=Fichier de virement SetToStatusSent=Mettre au statut "Fichier envoyé" @@ -118,7 +122,7 @@ WithdrawRequestErrorNilAmount=Impossible de créer une demande de prélèvement SepaMandate=Mandat prélèvement SEPA SepaMandateShort=Mandat SEPA PleaseReturnMandate=Merci de retourner ce formulaire mandat par email à %s ou par courrier à -SEPALegalText=En signant ce formulaire de mandat, vous autorisez (A) %s à envoyer des instructions à votre banque pour débiter votre compte et (B) votre banque à débiter votre compte conformément aux instructions de %s. Dans le cadre de vos droits, vous avez droit à un remboursement de votre banque selon les termes et conditions de votre accord avec votre banque. Vos droits concernant le mandat ci-dessus sont expliqués dans une déclaration que vous pouvez obtenir auprès de votre banque. +SEPALegalText=En signant ce formulaire de mandat, vous autorisez (A) %s et son prestataire de services de paiement à envoyer des instructions à votre banque pour débiter votre compte et (B) votre banque à débiter votre compte conformément aux instructions de %s. Dans le cadre de vos droits, vous avez droit à un remboursement de votre banque selon les termes et conditions de votre accord avec votre banque. Vos droits concernant le mandat ci-dessus sont expliqués dans une déclaration que vous pouvez obtenir auprès de votre banque. CreditorIdentifier=Identifiant créditeur CreditorName=Nom du créditeur SEPAFillForm=(B) Remplir tous les champs marqués * @@ -137,7 +141,7 @@ SEPAFRST=SEPA FRST ExecutionDate=Date d'éxecution CreateForSepa=Créer fichier de prélèvement automatique ICS=Identifiant du créancier - ICS -IDS=Debitor Identifier +IDS=Identifiant débiteur END_TO_END=Balise XML SEPA "EndToEndId" - Identifiant unique attribué par transaction USTRD=Balise XML SEPA "Non structurée" ADDDAYS=Ajouter des jours à la date d'exécution @@ -156,4 +160,4 @@ ErrorICSmissing=ICS manquant pour le compte bancaire %s TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Le montant total de l'ordre de prélèvement diffère de la somme des lignes WarningSomeDirectDebitOrdersAlreadyExists=Attention : Il y a déjà des ordres de prélèvement automatique en attente (%s) demandés pour un montant de %s WarningSomeCreditTransferAlreadyExists=Attention : Il y a déjà des virements en attente (%s) demandés pour un montant de %s -UsedFor=Used for %s +UsedFor=Utilisé pour %s diff --git a/htdocs/langs/it_CH/accountancy.lang b/htdocs/langs/it_CH/accountancy.lang deleted file mode 100644 index 44c4229cd8b..00000000000 --- a/htdocs/langs/it_CH/accountancy.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy.
    The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...). -NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible) diff --git a/htdocs/langs/nl_BE/admin.lang b/htdocs/langs/nl_BE/admin.lang index 29adcec7d4d..96a2c46c4ed 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -192,7 +192,6 @@ LibraryToBuildPDF=Bibliotheek om PDF bestanden te genereren. RefreshPhoneLink=Herladen link SetAsDefault=Instellen als standaard BarcodeInitForProductsOrServices=Mass barcode init of reset voor producten of diensten -InitEmptyBarCode=Init value for the %s empty barcodes NoDetails=Geen aanvullende details in voettekst DisplayCompanyInfo=Bedrijfsadres weergeven DisplayCompanyManagers=Namen van beheerders weergeven diff --git a/htdocs/langs/nl_BE/commercial.lang b/htdocs/langs/nl_BE/commercial.lang index d949aad6bac..fae3f5e6ae7 100644 --- a/htdocs/langs/nl_BE/commercial.lang +++ b/htdocs/langs/nl_BE/commercial.lang @@ -11,8 +11,5 @@ ActionAC_COM=Verzend verkooporder per mail ActionAC_SUP_ORD=Verzend bestelling per mail ActionAC_SUP_INV=Stuur leveranciersfactuur per mail ToOfferALinkForOnlineSignature=Link voor online handtekening -WelcomeOnOnlineSignaturePage=Welkom op deze pagina om commerciële voorstellen van %s te accepteren -ThisScreenAllowsYouToSignDocFrom=Met dit scherm kunt u een offerte / commercieel voorstel accepteren en ondertekenen of weigeren -ThisIsInformationOnDocumentToSign=In dit document is informatie om te accepteren of te weigeren SignatureProposalRef=Handtekening van offerte / commercieel voorstel %s FeatureOnlineSignDisabled=Functie voor online ondertekenen uitgeschakeld of het document is gegenereerd voordat de functie was ingeschakeld diff --git a/htdocs/langs/nl_BE/ticket.lang b/htdocs/langs/nl_BE/ticket.lang index 37e0550685c..3d1419278be 100644 --- a/htdocs/langs/nl_BE/ticket.lang +++ b/htdocs/langs/nl_BE/ticket.lang @@ -57,7 +57,6 @@ MarkAsRead=Markeer ticket als gelezen TicketHistory=Ticket geschiedenis TicketChangeType=Van type veranderen TicketAddMessage=Voeg een bericht toe -AddMessage=Voeg een bericht toe TicketMessageSuccessfullyAdded=Bericht is succesvol toegevoegd NoMsgForThisTicket=Geen bericht voor dit ticket TicketSeverity=Strengheid @@ -67,7 +66,6 @@ SendMessageByEmail=Stuur bericht per e-mail ErrorMailRecipientIsEmptyForSendTicketMessage=Ontvanger is leeg. Geen e-mail verzonden TicketMessageMailIntro=Inleiding TicketMessageMailIntroHelp=Deze tekst wordt alleen aan het begin van de e-mail toegevoegd en wordt niet opgeslagen. -TicketMessageMailSignatureLabelAdmin=Handtekening van reactie-e-mail TicketMessageHelp=Alleen deze tekst wordt opgeslagen in de berichtenlijst van het ticket. TicketMessageSubstitutionReplacedByGenericValues=Vervangingenvariabelen worden vervangen door generieke waarden. TimeElapsedSince=tijd verstreken sinds diff --git a/htdocs/langs/pt_AO/projects.lang b/htdocs/langs/pt_AO/projects.lang deleted file mode 100644 index f5f817beac1..00000000000 --- a/htdocs/langs/pt_AO/projects.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - projects -ServiceToUseOnLines=Service to use on lines by default diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index d2ab3e033a9..837113cb418 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -47,8 +47,6 @@ ClientSortingCharset=Conferência de Clientes WarningModuleNotActive=Módulo %s deve ser Ativado! WarningOnlyPermissionOfActivatedModules=Somente as permissões relacionadas com os módulos ativados que aparecem aqui. DolibarrSetup=Instalação/Atualização do Dolibarr -InternalUser=Usuário Interno -ExternalUser=Usuário Externo InternalUsers=Usuários Internos ExternalUsers=Usuários Externos UploadNewTemplate=Carregar novo(s) tema(s) @@ -652,7 +650,6 @@ Permission283=Deletar Contatos Permission286=Exportar Contatos Permission291=Ler Tarifas Permission292=Definir Permissões das Tarifas -Permission300=Ler códigos de barras Permission301=Criar/modificar códigos de barras Permission311=Ler Serviços Permission312=Atribuir Serviço no Contrato @@ -1336,7 +1333,6 @@ ActivateFCKeditor=Editor avançado ativo por: FCKeditorForNotePublic=Usar editor WYSIWIG nos campos de "notas públicas" dos elementos FCKeditorForNotePrivate=Usar editor WYSIWIG nos campos de "notas privadas" dos elementos FCKeditorForCompany=Usar editor WYSIWIG nos campos de descrição dos elementos (exceto produtos/serviços) -FCKeditorForProduct=Usar editor WYSIWIG nos campos de descrição de produtos/serviços FCKeditorForProductDetails=Criação / edição WYSIWIG de linhas de detalhes de produtos para todas as entidades (propostas, encomendas, facturas, etc ...). Aviso: O uso desta opção neste caso não é recomendado, pois pode criar problemas com caracteres especiais e formatação de página ao construir arquivos PDF. FCKeditorForMailing=Criação/edição do WYSIWIG nos E-Mails massivos (ferramentas->emailing) FCKeditorForUserSignature=criação/edição do WYSIWIG nas assinaturas de usuários diff --git a/htdocs/langs/pt_BR/commercial.lang b/htdocs/langs/pt_BR/commercial.lang index a70dde7954c..d7296bed8f8 100644 --- a/htdocs/langs/pt_BR/commercial.lang +++ b/htdocs/langs/pt_BR/commercial.lang @@ -54,7 +54,5 @@ Stats=Estatísticas de vendas StatusProsp=Status de prospecto de cliente DraftPropals=Minutas de orçamentos ToOfferALinkForOnlineSignature=Link para assinatura on-line -WelcomeOnOnlineSignaturePage=Bem-vindo à página para aceitar propostas comerciais de %s -ThisScreenAllowsYouToSignDocFrom=Esta tela permite que você aceite e assine ou recuse um orçamento / proposta comercial SignatureProposalRef=Assinatura da cotação / proposta comercial %s FeatureOnlineSignDisabled=Recurso para assinatura online desabilitado ou documento gerado antes que o recurso fosse ativado diff --git a/htdocs/langs/pt_BR/ecm.lang b/htdocs/langs/pt_BR/ecm.lang index 3c7bb7eddf3..1b5ed3fa5cb 100644 --- a/htdocs/langs/pt_BR/ecm.lang +++ b/htdocs/langs/pt_BR/ecm.lang @@ -12,7 +12,6 @@ ECMNbOfFilesInSubDir=Numero de arquivos nos subpastas ECMCreationUser=Criado por ECMArea=Área DMS / ECM ECMAreaDesc=A área DMS / ECM (Gerenciamento de documentos / Gerenciamento de conteúdo eletrônico) permite salvar, compartilhar e pesquisar rapidamente todos os tipos de documentos no Dolibarr. -ECMAreaDesc2=* As pastas automáticas são geradas automaticamente quando algum arquivo é adicionado a algum ficheiro do sistema.
    * As pastas manuais podem ser usados ​​para guardar documentos sem ligação a um cadastro do sistema. ECMSectionWasRemoved=A pasta %s foi eliminada ECMSearchByKeywords=Busca usando palavras chave ECMSearchByEntity=Busca por objeto diff --git a/htdocs/langs/pt_BR/errors.lang b/htdocs/langs/pt_BR/errors.lang index 03f3d75a362..517027dde8c 100644 --- a/htdocs/langs/pt_BR/errors.lang +++ b/htdocs/langs/pt_BR/errors.lang @@ -64,7 +64,6 @@ ErrorFieldValueNotIn=Campo %s : '%s' não é um valor encontrado n ErrorFieldRefNotIn=Campo %s : '%s' não é uma referência existente %s ErrorsOnXLines=%s erros encontrados ErrorFileIsInfectedWithAVirus=O antivírus não foi capaz de atestar o arquivo (o arquivo pode estar infectado por um vírus) -ErrorSpecialCharNotAllowedForField=O campo "%s" não aceita caracteres especiais ErrorNumRefModel=Uma referência existe no banco de dados (% s) e não é compatível com esta regra de numeração. Remover registro ou referência renomeado para ativar este módulo. ErrorQtyTooLowForThisSupplier=Quantidade muito baixa para este fornecedor ou nenhum preço definido neste produto para este fornecedor ErrorOrdersNotCreatedQtyTooLow=Algumas encomendas não foram criadas por causa de quantidades muito baixas diff --git a/htdocs/langs/pt_BR/mailmanspip.lang b/htdocs/langs/pt_BR/mailmanspip.lang index bbea232c4ef..9e0a707c3eb 100644 --- a/htdocs/langs/pt_BR/mailmanspip.lang +++ b/htdocs/langs/pt_BR/mailmanspip.lang @@ -7,7 +7,6 @@ MailmanCreationSuccess=O teste da assinatura foi realizado com sucesso MailmanDeletionSuccess=O teste de cancelamento da assinatura foi realizado com sucesso SynchroMailManEnabled=O Mailman sera atualizado SynchroSpipEnabled=O SPIP sera atualizado -DescADHERENT_MAILMAN_ADMINPW=Senha do administrador Mailman DescADHERENT_MAILMAN_URL=URL para inscriçoes Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL para desenscriçoes Mailman DescADHERENT_MAILMAN_LISTS=Lista(s) para inscriçao automatica de novos membros (separado por virgula) diff --git a/htdocs/langs/pt_BR/ticket.lang b/htdocs/langs/pt_BR/ticket.lang index 2a751f5516a..09f8001f5b1 100644 --- a/htdocs/langs/pt_BR/ticket.lang +++ b/htdocs/langs/pt_BR/ticket.lang @@ -76,7 +76,6 @@ TicketHistory=Histórico de bilhetes TicketChangeCategory=Modifica o código analítico TicketChangeSeverity=Alterar gravidade TicketAddMessage=Adiciona uma mensagem -AddMessage=Adiciona uma mensagem MessageSuccessfullyAdded=Bilhete adicionado NoMsgForThisTicket=Nenhuma mensagem para este bilhete TicketProperties=Classificação @@ -97,8 +96,6 @@ TicketUpdated=Bilhete atualizado SendMessageByEmail=Enviar mensagem por e-mail ErrorMailRecipientIsEmptyForSendTicketMessage=O destinatário está vazio. Nenhum e-mail enviado TicketMessageMailIntroHelp=Este texto é adicionado apenas no início do e-mail e não será salvo. -TicketMessageMailSignatureHelp=Este texto é adicionado somente no final do e-mail e não será salvo. -TicketMessageMailSignatureLabelAdmin=Assinatura do e-mail de resposta TicketTimeElapsedBeforeSince=Tempo decorrido antes / desde TicketContacts=Bilhete de contatos TicketDocumentsLinked=Documentos vinculados ao ticket diff --git a/htdocs/langs/pt_BR/website.lang b/htdocs/langs/pt_BR/website.lang index a5781ea5a75..e2afc369eb2 100644 --- a/htdocs/langs/pt_BR/website.lang +++ b/htdocs/langs/pt_BR/website.lang @@ -9,7 +9,6 @@ WEBSITE_CSS_URL=URL do arquivo CSS externo. WEBSITE_HTML_HEADER=Adição na parte inferior do cabeçalho HTML (comum a todas as páginas) WEBSITE_ROBOT=Arquivo robô (robots.txt) WEBSITE_MANIFEST_JSON=Arquivo manifest.json do site -WEBSITE_README=Arquivo README.md EnterHereLicenseInformation=Digite aqui metadados ou informações de licença para arquivar num arquivo README.md. Se você distribuir seu site como modelo, o arquivo será incluído no pacote tentado. HtmlHeaderPage=Cabeçalho HTML (específico apenas para esta página) PageNameAliasHelp=Nome ou alias da página.
    Esse alias também é usado para forjar uma URL de SEO quando o site é executado a partir de um host virtual de um servidor da Web (como Apacke, Nginx, ...). Use o botão %s para editar este alias. diff --git a/htdocs/langs/pt_MZ/accountancy.lang b/htdocs/langs/pt_MZ/accountancy.lang index 90584e4bd28..b99e895d7c0 100644 --- a/htdocs/langs/pt_MZ/accountancy.lang +++ b/htdocs/langs/pt_MZ/accountancy.lang @@ -27,7 +27,6 @@ ConfirmDeleteCptCategory=Tem certeza de que deseja remover essa conta contábil JournalizationInLedgerStatus=Situação do registro do diário GroupIsEmptyCheckSetup=O grupo está vazio, verifique a configuração do grupo de contabilidade personalizado AccountantFiles=Exportar documentos de origem -ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy.
    The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...). VueByAccountAccounting=Ver por conta contábil MainAccountForCustomersNotDefined=Conta contábil principal para clientes não definidos na configuração MainAccountForUsersNotDefined=Conta contábil principal para usuários não definidos na configuração @@ -185,7 +184,6 @@ AccountingJournalType9=Novo ErrorAccountingJournalIsAlreadyUse=Esta Livro de Registro já está sendo usado NumberOfAccountancyEntries=Número de entradas NumberOfAccountancyMovements=Número de movimentos -NotifiedValidationDate=Validate and Lock the exported entries (same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible) ExportDraftJournal=Livro de Registro de rascunho de exportação Selectmodelcsv=Escolha um modelo de exportação Modelcsv_CEGID=Exportar para CEGID Expert Comptable diff --git a/htdocs/langs/pt_MZ/admin.lang b/htdocs/langs/pt_MZ/admin.lang index e805a0c6120..961304d0627 100644 --- a/htdocs/langs/pt_MZ/admin.lang +++ b/htdocs/langs/pt_MZ/admin.lang @@ -47,8 +47,6 @@ ClientSortingCharset=Conferência de Clientes WarningModuleNotActive=Módulo %s deve ser Ativado! WarningOnlyPermissionOfActivatedModules=Somente as permissões relacionadas com os módulos ativados que aparecem aqui. DolibarrSetup=Instalação/Atualização do Dolibarr -InternalUser=Usuário Interno -ExternalUser=Usuário Externo InternalUsers=Usuários Internos ExternalUsers=Usuários Externos SetupArea=Conf. @@ -647,7 +645,6 @@ Permission283=Deletar Contatos Permission286=Exportar Contatos Permission291=Ler Tarifas Permission292=Definir Permissões das Tarifas -Permission300=Ler códigos de barras Permission301=Criar/modificar códigos de barras Permission311=Ler Serviços Permission312=Atribuir Serviço no Contrato @@ -1332,7 +1329,6 @@ ActivateFCKeditor=Editor avançado ativo por: FCKeditorForNotePublic=Usar editor WYSIWIG nos campos de "notas públicas" dos elementos FCKeditorForNotePrivate=Usar editor WYSIWIG nos campos de "notas privadas" dos elementos FCKeditorForCompany=Usar editor WYSIWIG nos campos de descrição dos elementos (exceto produtos/serviços) -FCKeditorForProduct=Usar editor WYSIWIG nos campos de descrição de produtos/serviços FCKeditorForProductDetails=Criação / edição WYSIWIG de linhas de detalhes de produtos para todas as entidades (propostas, encomendas, facturas, etc ...). Aviso: O uso desta opção neste caso não é recomendado, pois pode criar problemas com caracteres especiais e formatação de página ao construir arquivos PDF. FCKeditorForMailing=Criação/edição do WYSIWIG nos E-Mails massivos (ferramentas->emailing) FCKeditorForUserSignature=criação/edição do WYSIWIG nas assinaturas de usuários diff --git a/htdocs/langs/pt_MZ/commercial.lang b/htdocs/langs/pt_MZ/commercial.lang index 493791da89d..4e15f6d6895 100644 --- a/htdocs/langs/pt_MZ/commercial.lang +++ b/htdocs/langs/pt_MZ/commercial.lang @@ -56,7 +56,5 @@ Stats=Estatísticas de vendas StatusProsp=Status de prospecto de cliente DraftPropals=Minutas de orçamentos ToOfferALinkForOnlineSignature=Link para assinatura on-line -WelcomeOnOnlineSignaturePage=Bem-vindo à página para aceitar propostas comerciais de %s -ThisScreenAllowsYouToSignDocFrom=Esta tela permite que você aceite e assine ou recuse um orçamento / proposta comercial SignatureProposalRef=Assinatura da cotação / proposta comercial %s FeatureOnlineSignDisabled=Recurso para assinatura online desabilitado ou documento gerado antes que o recurso fosse ativado diff --git a/htdocs/langs/pt_MZ/ecm.lang b/htdocs/langs/pt_MZ/ecm.lang index 3c7bb7eddf3..1b5ed3fa5cb 100644 --- a/htdocs/langs/pt_MZ/ecm.lang +++ b/htdocs/langs/pt_MZ/ecm.lang @@ -12,7 +12,6 @@ ECMNbOfFilesInSubDir=Numero de arquivos nos subpastas ECMCreationUser=Criado por ECMArea=Área DMS / ECM ECMAreaDesc=A área DMS / ECM (Gerenciamento de documentos / Gerenciamento de conteúdo eletrônico) permite salvar, compartilhar e pesquisar rapidamente todos os tipos de documentos no Dolibarr. -ECMAreaDesc2=* As pastas automáticas são geradas automaticamente quando algum arquivo é adicionado a algum ficheiro do sistema.
    * As pastas manuais podem ser usados ​​para guardar documentos sem ligação a um cadastro do sistema. ECMSectionWasRemoved=A pasta %s foi eliminada ECMSearchByKeywords=Busca usando palavras chave ECMSearchByEntity=Busca por objeto diff --git a/htdocs/langs/pt_MZ/errors.lang b/htdocs/langs/pt_MZ/errors.lang index 03f3d75a362..517027dde8c 100644 --- a/htdocs/langs/pt_MZ/errors.lang +++ b/htdocs/langs/pt_MZ/errors.lang @@ -64,7 +64,6 @@ ErrorFieldValueNotIn=Campo %s : '%s' não é um valor encontrado n ErrorFieldRefNotIn=Campo %s : '%s' não é uma referência existente %s ErrorsOnXLines=%s erros encontrados ErrorFileIsInfectedWithAVirus=O antivírus não foi capaz de atestar o arquivo (o arquivo pode estar infectado por um vírus) -ErrorSpecialCharNotAllowedForField=O campo "%s" não aceita caracteres especiais ErrorNumRefModel=Uma referência existe no banco de dados (% s) e não é compatível com esta regra de numeração. Remover registro ou referência renomeado para ativar este módulo. ErrorQtyTooLowForThisSupplier=Quantidade muito baixa para este fornecedor ou nenhum preço definido neste produto para este fornecedor ErrorOrdersNotCreatedQtyTooLow=Algumas encomendas não foram criadas por causa de quantidades muito baixas diff --git a/htdocs/langs/pt_MZ/mailmanspip.lang b/htdocs/langs/pt_MZ/mailmanspip.lang index bbea232c4ef..9e0a707c3eb 100644 --- a/htdocs/langs/pt_MZ/mailmanspip.lang +++ b/htdocs/langs/pt_MZ/mailmanspip.lang @@ -7,7 +7,6 @@ MailmanCreationSuccess=O teste da assinatura foi realizado com sucesso MailmanDeletionSuccess=O teste de cancelamento da assinatura foi realizado com sucesso SynchroMailManEnabled=O Mailman sera atualizado SynchroSpipEnabled=O SPIP sera atualizado -DescADHERENT_MAILMAN_ADMINPW=Senha do administrador Mailman DescADHERENT_MAILMAN_URL=URL para inscriçoes Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL para desenscriçoes Mailman DescADHERENT_MAILMAN_LISTS=Lista(s) para inscriçao automatica de novos membros (separado por virgula) diff --git a/htdocs/langs/pt_MZ/projects.lang b/htdocs/langs/pt_MZ/projects.lang index 8d0c1cedae8..065ddf804d6 100644 --- a/htdocs/langs/pt_MZ/projects.lang +++ b/htdocs/langs/pt_MZ/projects.lang @@ -6,6 +6,5 @@ LinkToElementShort=Link para ProjectReferers=Itens correlatos OppStatusPROPO=Proposta OppStatusPENDING=Pedente -ServiceToUseOnLines=Service to use on lines by default NewInter=Nova Intervenção StartDateCannotBeAfterEndDate=A data final não pode ser anterior a data de início diff --git a/htdocs/langs/pt_MZ/website.lang b/htdocs/langs/pt_MZ/website.lang index a5781ea5a75..e2afc369eb2 100644 --- a/htdocs/langs/pt_MZ/website.lang +++ b/htdocs/langs/pt_MZ/website.lang @@ -9,7 +9,6 @@ WEBSITE_CSS_URL=URL do arquivo CSS externo. WEBSITE_HTML_HEADER=Adição na parte inferior do cabeçalho HTML (comum a todas as páginas) WEBSITE_ROBOT=Arquivo robô (robots.txt) WEBSITE_MANIFEST_JSON=Arquivo manifest.json do site -WEBSITE_README=Arquivo README.md EnterHereLicenseInformation=Digite aqui metadados ou informações de licença para arquivar num arquivo README.md. Se você distribuir seu site como modelo, o arquivo será incluído no pacote tentado. HtmlHeaderPage=Cabeçalho HTML (específico apenas para esta página) PageNameAliasHelp=Nome ou alias da página.
    Esse alias também é usado para forjar uma URL de SEO quando o site é executado a partir de um host virtual de um servidor da Web (como Apacke, Nginx, ...). Use o botão %s para editar este alias. diff --git a/htdocs/loan/calcmens.php b/htdocs/loan/calcmens.php index cc6debab86c..73b222c8274 100644 --- a/htdocs/loan/calcmens.php +++ b/htdocs/loan/calcmens.php @@ -33,6 +33,7 @@ if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); } +// Load Dolibarr environment require '../main.inc.php'; require DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index f3d83a1d37d..0f19f994c70 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -24,14 +24,15 @@ * \brief Loan card */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; } require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -244,7 +245,7 @@ if (empty($reshook)) { $form = new Form($db); $formproject = new FormProjets($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } @@ -274,7 +275,7 @@ if ($action == 'create') { print '
    '.$langs->trans("Label").'
    '.$langs->trans("Account").''; $form->select_comptes(GETPOST("accountid"), "accountid", 0, "courant=1", 1); // Show list of bank account with courant print '
    '.$langs->trans("Insurance").'
    '.$langs->trans("LoanAccountancyCapitalCode").''; @@ -424,7 +425,7 @@ if ($id > 0) { $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, $user->rights->loan->write, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, $user->rights->loan->write, 'string', '', null, null, '', 1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->loadLangs(array("projects")); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($user->rights->loan->write) { @@ -532,7 +533,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyCapitalCode"); print '
    '; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 1, 1); } else { print ''; @@ -543,7 +544,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyCapitalCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_capital, 1); @@ -563,7 +564,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyInsuranceCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 1, 1); } else { print ''; @@ -574,7 +575,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyInsuranceCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_insurance, 1); @@ -594,7 +595,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyInterestCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 1, 1); } else { print ''; @@ -605,7 +606,7 @@ if ($id > 0) { print $langs->trans("LoanAccountancyInterestCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_interest, 1); diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 81a00904794..1c6913035e8 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -104,6 +104,10 @@ class Loan extends CommonObject */ public $fk_project; + /** + * @var int totalpaid + */ + public $totalpaid; const STATUS_UNPAID = 0; const STATUS_PAID = 1; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index ae31a8314aa..3ce8af01790 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -497,7 +497,7 @@ class PaymentLoan extends CommonObject $error = 0; $this->db->begin(); - if (!empty($conf->banque->enabled)) { + if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 3bc60980245..c809711005f 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -22,13 +22,14 @@ * \brief Page with attached files on loan */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.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/lib/loan.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -103,7 +104,7 @@ if ($object->id) { $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' : '; if ($user->rights->loan->write) { diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index a0db5ca35a7..188a61c61e6 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -22,11 +22,12 @@ * \brief Page with info about loan */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -67,7 +68,7 @@ $morehtmlref = '
    '; $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' : '; if ($user->rights->loan->write) { @@ -101,8 +102,6 @@ $morehtmlref .= '
    '; $linkback = ''.$langs->trans("BackToList").''; -$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); print '
    '; diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index f9b08a63a48..1324876a98c 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -24,6 +24,7 @@ * \brief Page to list all loans */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; @@ -106,8 +107,13 @@ $title = $langs->trans('Loans'); $sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,"; $sql .= " SUM(pl.amount_capital) as alreadypaid"; -$sql .= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl"; -$sql .= " ON l.rowid = pl.fk_loan"; + +$sqlfields = $sql; // $sql fields to remove for count total + +$sql .= " FROM ".MAIN_DB_PREFIX."loan as l"; +$linktopl = " LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl ON l.rowid = pl.fk_loan"; +$sql .= $linktopl; + $sql .= " WHERE l.entity = ".$conf->entity; if ($search_amount) { $sql .= natural_search("l.capital", $search_amount, 1); @@ -119,36 +125,43 @@ if ($search_label) { $sql .= natural_search("l.label", $search_label); } $sql .= " GROUP BY l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend"; -$sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/'.preg_quote($linktopl, '/').'/', '', $sqlforcount); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); } +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); + exit; +} + +$num = $db->num_rows($resql); + // Output page // -------------------------------------------------------------------- diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index c9b6ef0e679..2f2ee7021eb 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -27,6 +27,7 @@ * \brief Tab for notes on loan */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 198025215b7..309e0d99f4a 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -21,10 +21,11 @@ * \brief Payment's card of loan */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } @@ -129,7 +130,7 @@ print '
    '.$langs->trans('NotePrivate').''.nl2br($payment->note_p print '
    '.$langs->trans('NotePublic').''.nl2br($payment->note_public).'
    '; if ($conf->global->MAIN_SHOW_LOGO && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && !empty($conf->global->MAIN_INFO_SOCIETE_LOGO)) { - print ''; + print ''; } print '
    '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).'
    '; print $langs->trans('SupplierCode').''; print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index fe4bdf42d79..03515c9a2e2 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -58,10 +58,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php'; $conf = new Conf(); // Set properties specific to database -$conf->db->host = $dolibarr_main_db_host; -$conf->db->port = $dolibarr_main_db_port; -$conf->db->name = $dolibarr_main_db_name; -$conf->db->user = $dolibarr_main_db_user; +$conf->db->host = empty($dolibarr_main_db_host) ? '' : $dolibarr_main_db_host; +$conf->db->port = empty($dolibarr_main_db_port) ? '' : $dolibarr_main_db_port; +$conf->db->name = empty($dolibarr_main_db_name) ? '' : $dolibarr_main_db_name; +$conf->db->user = empty($dolibarr_main_db_user) ? '' : $dolibarr_main_db_user; $conf->db->pass = empty($dolibarr_main_db_pass) ? '' : $dolibarr_main_db_pass; $conf->db->type = $dolibarr_main_db_type; $conf->db->prefix = $dolibarr_main_db_prefix; @@ -208,10 +208,16 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) { $mysoc = new Societe($db); $mysoc->setMysoc($conf); - // For some countries, we need to invert our address with customer address + // We set some specific default values according to country + if ($mysoc->country_code == 'DE' && !isset($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + // For DE, we need to invert our address with customer address $conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; } + if ($mysoc->country_code == 'FR' && !isset($conf->global->MAIN_PROFID1_IN_ADDRESS)) { + // For FR, default value of option to show profid SIRET is on by default + $conf->global->MAIN_PROFID1_IN_ADDRESS = 1; + } } diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php index da2cff7eff4..4c7e597e889 100644 --- a/htdocs/modulebuilder/admin/setup.php +++ b/htdocs/modulebuilder/admin/setup.php @@ -111,7 +111,7 @@ print '
    '; print ''; print ''; -print ''; +print ''; print ''; print "\n"; @@ -132,37 +132,39 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } } print ''; +} - print ''; - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; +print ''; - print ''; - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; +print ''; +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; @@ -170,14 +172,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } print ''; -print ''; +print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; print '
    '.$langs->trans("Key").''.$langs->trans("Parameter").''.$langs->trans("Value").'
    '.$langs->trans("UseSpecificEditorName").''; - print ''; - print '
    '.$langs->trans("UseSpecificEditorName").''; +print ''; +print '
    '.$langs->trans("UseSpecificEditorURL").''; - print ''; - print '
    '.$langs->trans("UseSpecificEditorURL").''; +print ''; +print '
    '.$langs->trans("UseSpecificFamily").''.$langs->trans("UseSpecificFamily").''; print ''; print '
    '.$langs->trans("UseSpecificAuthor").''.$langs->trans("UseSpecificAuthor").''; print ''; print '
    '.$langs->trans("UseSpecificVersion").''.$langs->trans("UseSpecificVersion").''; print ''; print '
    '.$langs->trans("UseSpecificReadme").''.$langs->trans("UseSpecificReadme").''; print ''; print '
    '.$langs->trans("AsciiToHtmlConverter").''.$langs->trans("AsciiToHtmlConverter").''; print ''; print ' '.$langs->trans("Example").': asciidoc, asciidoctor'; @@ -185,7 +187,7 @@ print '
    '.$langs->trans("AsciiToPdfConverter").''.$langs->trans("AsciiToPdfConverter").''; print ''; print ' '.$langs->trans("Example").': asciidoctor-pdf'; diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 0ab1abe8f9f..8b87d84c10e 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -31,6 +31,7 @@ if (!defined('NOSCANPOSTFORINJECTION')) { define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti SQL+XSS injection attack test } +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -42,12 +43,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "modulebuilder", "other", "cron", "errors")); -$action = GETPOST('action', 'aZ09'); +// GET Parameters +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); -$sortfield=GETPOST('sortfield', 'alpha'); -$sortorder=GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); $module = GETPOST('module', 'alpha'); $tab = GETPOST('tab', 'aZ09'); @@ -71,13 +73,19 @@ $file = GETPOST('file', 'alpha'); $modulename = dol_sanitizeFileName(GETPOST('modulename', 'alpha')); $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); $dicname = dol_sanitizeFileName(GETPOST('dicname', 'alpha')); +$editorname= GETPOST('editorname', 'alpha'); +$editorurl= GETPOST('editorurl', 'alpha'); +$version= GETPOST('version', 'alpha'); +$family= GETPOST('family', 'alpha'); +$picto= GETPOST('idpicto', 'alpha'); +$idmodule= GETPOST('idmodule', 'alpha'); // Security check if (!isModEnabled('modulebuilder')) { - accessforbidden(); + accessforbidden('Module ModuleBuilder not enabled'); } -if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) { - accessforbidden($langs->trans('ModuleBuilderNotAllowed')); +if (!$user->hasRight("modulebuilder", "run")) { + accessforbidden('ModuleBuilderNotAllowed'); } @@ -117,6 +125,7 @@ $form = new Form($db); // Define $listofmodules $dirsrootforscan = array($dirread); + // Add also the core modules into the list of modules to show/edit if ($dirread != DOL_DOCUMENT_ROOT && ($conf->global->MAIN_FEATURES_LEVEL >= 2 || !empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT))) { $dirsrootforscan[] = DOL_DOCUMENT_ROOT; @@ -193,10 +202,10 @@ foreach ($dirsrootforscan as $dirread) { } $textforlistofdirs .= ''.$dirread.''; if ($dirread == DOL_DOCUMENT_ROOT) { - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { + if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $textforlistofdirs .= $form->textwithpicto('', $langs->trans("ConstantIsOn", "MAIN_FEATURES_LEVEL")); } - if (!empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT)) { + if (getDolGlobalString('MODULEBUILDER_ADD_DOCUMENT_ROOT')) { $textforlistofdirs .= $form->textwithpicto('', $langs->trans("ConstantIsOn", "MODULEBUILDER_ADD_DOCUMENT_ROOT")); } } @@ -308,7 +317,6 @@ if ($dirins && $action == 'initmodule' && $modulename) { dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.key.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.key.sql'); - dol_delete_file($destdir.'/img/object_myobject.png'); dol_delete_file($destdir.'/class/myobject.class.php'); dol_delete_dir($destdir.'/class', 1); @@ -334,7 +342,13 @@ if ($dirins && $action == 'initmodule' && $modulename) { 'Mon module'=>$modulename, 'mon module'=>$modulename, 'htdocs/modulebuilder/template'=>strtolower($modulename), - '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email ? ' <'.$user->email.'>' : '') + '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email ? ' <'.$user->email.'>' : ''), + 'Editor name'=>$editorname, + 'https://www.example.com'=>$editorurl, + '$this->version = \'1.0\''=>'$this->version = \''.$version.'\'', + '$this->picto = \'generic\';'=>(empty($picto)) ? '$this->picto = \'generic\'' : '$this->picto = \''.$picto.'\';', + "modulefamily" =>$family, + '500000'=>$idmodule ); if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME)) { @@ -350,7 +364,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { $arrayreplacement['1.0'] = $conf->global->MODULEBUILDER_SPECIFIC_VERSION; } if (!empty($conf->global->MODULEBUILDER_SPECIFIC_FAMILY)) { - $arrayreplacement['other'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; + $arrayreplacement['modulefamily'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; } $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); @@ -370,7 +384,6 @@ if ($dirins && $action == 'initmodule' && $modulename) { if (!$error) { setEventMessages('ModuleInitialized', null); $module = $modulename; - $modulename = ''; clearstatcache(true); if (function_exists('opcache_invalidate')) { @@ -881,237 +894,7 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module)) { } } - -// Build the $fields array from SQL table (initfromtablename) -if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', 'alpha')) { - $tablename = GETPOST('initfromtablename', 'alpha'); - $_results = $db->DDLDescTable($tablename); - if (empty($_results)) { - setEventMessages($langs->trans("ErrorTableNotFound", $tablename), null, 'errors'); - } else { - /** - * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') - * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" - * 'label' the translation key. - * 'picto' is code of a picto to show before value in forms - * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) - * 'position' is the sort order of field. - * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). - * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) - * 'noteditable' says if field is not editable (1 or 0) - * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. - * '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_...). - * '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 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) - * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' - * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. - * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record - * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. - * 'arrayofkeyval' to set a list of values if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel"). Note that type can be 'integer' or 'varchar' - * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. - * 'comment' is not used. You can store here any text of your choice. It is not used by application. - * 'validate' is 1 if need to validate with $this->validateField() - * 'copytoclipboard' is 1 or 2 to allow to add a picto to copy value into clipboard (1=picto after label, 2=picto after value) - */ - - /*public $fields=array( - 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), - 'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), - 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text'), - 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'), - 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>'LinkToThirparty'), - 'description' =>array('type'=>'text', 'label'=>'Descrption', 'enabled'=>1, 'visible'=>0, 'position'=>60), - 'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61), - 'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62), - 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), - //'date_valid' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502), - 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510), - 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), - //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), - 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), - );*/ - - $string = 'public $fields=array('."\n"; - $string .= "
    "; - $i = 10; - while ($obj = $db->fetch_object($_results)) { - // fieldname - $fieldname = $obj->Field; - // type - $type = $obj->Type; - if ($type == 'int(11)') { - $type = 'integer'; - } - if ($type == 'float') { - $type = 'real'; - } - if (strstr($type, 'tinyint')) { - $type = 'integer'; - } - if ($obj->Field == 'fk_soc') { - $type = 'integer:Societe:societe/class/societe.class.php'; - } - if (preg_match('/^fk_proj/', $obj->Field)) { - $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; - } - if (preg_match('/^fk_prod/', $obj->Field)) { - $type = 'integer:Product:product/class/product.class.php:1'; - } - if ($obj->Field == 'fk_warehouse') { - $type = 'integer:Entrepot:product/stock/class/entrepot.class.php'; - } - if (preg_match('/^(fk_user|fk_commercial)/', $obj->Field)) { - $type = 'integer:User:user/class/user.class.php'; - } - - // notnull - $notnull = ($obj->Null == 'YES' ? 0 : 1); - if ($fieldname == 'fk_user_modif') { - $notnull = -1; - } - // label - $label = preg_replace('/_/', '', ucfirst($fieldname)); - if ($fieldname == 'rowid') { - $label = 'TechnicalID'; - } - if ($fieldname == 'import_key') { - $label = 'ImportId'; - } - if ($fieldname == 'fk_soc') { - $label = 'ThirdParty'; - } - if ($fieldname == 'tms') { - $label = 'DateModification'; - } - if ($fieldname == 'datec') { - $label = 'DateCreation'; - } - if ($fieldname == 'date_valid') { - $label = 'DateValidation'; - } - if ($fieldname == 'datev') { - $label = 'DateValidation'; - } - if ($fieldname == 'note_private') { - $label = 'NotePublic'; - } - if ($fieldname == 'note_public') { - $label = 'NotePrivate'; - } - if ($fieldname == 'fk_user_creat') { - $label = 'UserAuthor'; - } - if ($fieldname == 'fk_user_modif') { - $label = 'UserModif'; - } - if ($fieldname == 'fk_user_valid') { - $label = 'UserValidation'; - } - // visible - $visible = -1; - if ($fieldname == 'entity') { - $visible = -2; - } - if ($fieldname == 'import_key') { - $visible = -2; - } - if ($fieldname == 'fk_user_creat') { - $visible = -2; - } - if ($fieldname == 'fk_user_modif') { - $visible = -2; - } - if (in_array($fieldname, array('ref_ext', 'model_pdf', 'note_public', 'note_private'))) { - $visible = 0; - } - // enabled - $enabled = 1; - // default - $default = ''; - if ($fieldname == 'entity') { - $default = 1; - } - // position - $position = $i; - if (in_array($fieldname, array('status', 'statut', 'fk_status', 'fk_statut'))) { - $position = 500; - } - if ($fieldname == 'import_key') { - $position = 900; - } - // index - $index = 0; - if ($fieldname == 'entity') { - $index = 1; - } - // css, cssview, csslist - $css = ''; - $cssview = ''; - $csslist = ''; - if (preg_match('/^fk_/', $fieldname)) { - $css = 'maxwidth500 widthcentpercentminusxx'; - } - if ($fieldname == 'label') { - $css = 'minwidth300'; - $cssview = 'wordbreak'; - } - if (in_array($fieldname, array('note_public', 'note_private'))) { - $cssview = 'wordbreak'; - } - - // type - $picto = $obj->Picto; - if ($obj->Field == 'fk_soc') { - $picto = 'company'; - } - if (preg_match('/^fk_proj/', $obj->Field)) { - $picto = 'project'; - } - - // Build the property string - $string .= "'".$obj->Field."'=>array('type'=>'".$type."', 'label'=>'".$label."',"; - if ($default != '') { - $string .= " 'default'=>".$default.","; - } - $string .= " 'enabled'=>".$enabled.","; - $string .= " 'visible'=>".$visible; - if ($notnull) { - $string .= ", 'notnull'=>".$notnull; - } - if ($fieldname == 'ref' || $fieldname == 'code') { - $string .= ", 'showoncombobox'=>1"; - } - $string .= ", 'position'=>".$position; - if ($index) { - $string .= ", 'index'=>".$index; - } - if ($picto) { - $string .= ", 'picto'=>'".$picto."'"; - } - if ($css) { - $string .= ", 'css'=>".$css; - } - if ($cssview) { - $string .= ", 'cssview'=>".$cssview; - } - if ($csslist) { - $string .= ", 'csslist'=>".$csslist; - } - $string .= "),\n"; - $string .= "
    "; - $i += 5; - } - $string .= ');'."\n"; - $string .= "
    "; - print $string; - exit; - } -} - +// Init an object if ($dirins && $action == 'initobject' && $module && $objectname) { $objectname = ucfirst($objectname); @@ -1155,6 +938,247 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { } } + // If we must reuse a table for properties, define $stringforproperties + $stringforproperties = ''; + $tablename = GETPOST('initfromtablename', 'alpha'); + if ($tablename) { + $_results = $db->DDLDescTable($tablename); + if (empty($_results)) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorTableNotFound", $tablename), null, 'errors'); + } else { + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'picto' is code of a picto to show before value in forms + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or 'isModEnabled("multicurrency")' ...) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0') + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * '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_...). + * '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 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arrayofkeyval' to set a list of values if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel"). Note that type can be 'integer' or 'varchar' + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'validate' is 1 if need to validate with $this->validateField() + * 'copytoclipboard' is 1 or 2 to allow to add a picto to copy value into clipboard (1=picto after label, 2=picto after value) + */ + + /*public $fields=array( + 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + 'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), + 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'alwayseditable'=>'1'), + 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'), + 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>'LinkToThirdparty'), + 'description' =>array('type'=>'text', 'label'=>'Descrption', 'enabled'=>1, 'visible'=>0, 'position'=>60), + 'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61), + 'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62), + 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), + //'date_valid' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502), + 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), + //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), + 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), + );*/ + + $stringforproperties = '// BEGIN MODULEBUILDER PROPERTIES'."\n"; + $stringforproperties .= 'public $fields=array('."\n"; + $i = 10; + while ($obj = $db->fetch_object($_results)) { + // fieldname + $fieldname = $obj->Field; + // type + $type = $obj->Type; + if ($type == 'int(11)') { + $type = 'integer'; + } + if ($type == 'float') { + $type = 'real'; + } + if (strstr($type, 'tinyint')) { + $type = 'integer'; + } + if ($obj->Field == 'fk_soc') { + $type = 'integer:Societe:societe/class/societe.class.php'; + } + if (preg_match('/^fk_proj/', $obj->Field)) { + $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; + } + if (preg_match('/^fk_prod/', $obj->Field)) { + $type = 'integer:Product:product/class/product.class.php:1'; + } + if ($obj->Field == 'fk_warehouse') { + $type = 'integer:Entrepot:product/stock/class/entrepot.class.php'; + } + if (preg_match('/^(fk_user|fk_commercial)/', $obj->Field)) { + $type = 'integer:User:user/class/user.class.php'; + } + + // notnull + $notnull = ($obj->Null == 'YES' ? 0 : 1); + if ($fieldname == 'fk_user_modif') { + $notnull = -1; + } + // label + $label = preg_replace('/_/', '', ucfirst($fieldname)); + if ($fieldname == 'rowid') { + $label = 'TechnicalID'; + } + if ($fieldname == 'import_key') { + $label = 'ImportId'; + } + if ($fieldname == 'fk_soc') { + $label = 'ThirdParty'; + } + if ($fieldname == 'tms') { + $label = 'DateModification'; + } + if ($fieldname == 'datec') { + $label = 'DateCreation'; + } + if ($fieldname == 'date_valid') { + $label = 'DateValidation'; + } + if ($fieldname == 'datev') { + $label = 'DateValidation'; + } + if ($fieldname == 'note_private') { + $label = 'NotePublic'; + } + if ($fieldname == 'note_public') { + $label = 'NotePrivate'; + } + if ($fieldname == 'fk_user_creat') { + $label = 'UserAuthor'; + } + if ($fieldname == 'fk_user_modif') { + $label = 'UserModif'; + } + if ($fieldname == 'fk_user_valid') { + $label = 'UserValidation'; + } + // visible + $visible = -1; + if ($fieldname == 'entity') { + $visible = -2; + } + if ($fieldname == 'import_key') { + $visible = -2; + } + if ($fieldname == 'fk_user_creat') { + $visible = -2; + } + if ($fieldname == 'fk_user_modif') { + $visible = -2; + } + if (in_array($fieldname, array('ref_ext', 'model_pdf', 'note_public', 'note_private'))) { + $visible = 0; + } + // enabled + $enabled = 1; + // default + $default = ''; + if ($fieldname == 'entity') { + $default = 1; + } + // position + $position = $i; + if (in_array($fieldname, array('status', 'statut', 'fk_status', 'fk_statut'))) { + $position = 500; + } + if ($fieldname == 'import_key') { + $position = 900; + } + // $alwayseditable + if ($fieldname == 'label') { + $alwayseditable = 1; + } + // index + $index = 0; + if ($fieldname == 'entity') { + $index = 1; + } + // css, cssview, csslist + $css = ''; + $cssview = ''; + $csslist = ''; + if (preg_match('/^fk_/', $fieldname)) { + $css = 'maxwidth500 widthcentpercentminusxx'; + } + if ($fieldname == 'label') { + $css = 'minwidth300'; + $cssview = 'wordbreak'; + } + if (in_array($fieldname, array('note_public', 'note_private'))) { + $cssview = 'wordbreak'; + } + if (in_array($fieldname, array('ref', 'label')) || preg_match('/integer:/', $type)) { + $csslist = 'tdoverflowmax150'; + } + + // type + $picto = $obj->Picto; + if ($obj->Field == 'fk_soc') { + $picto = 'company'; + } + if (preg_match('/^fk_proj/', $obj->Field)) { + $picto = 'project'; + } + + // Build the property string + $stringforproperties .= "'".$obj->Field."'=>array('type'=>'".$type."', 'label'=>'".$label."',"; + if ($default != '') { + $stringforproperties .= " 'default'=>".$default.","; + } + $stringforproperties .= " 'enabled'=>".$enabled.","; + $stringforproperties .= " 'visible'=>".$visible; + if ($notnull) { + $stringforproperties .= ", 'notnull'=>".$notnull; + } + if ($alwayseditable) { + $stringforproperties .= ", 'alwayseditable'=>1"; + } + if ($fieldname == 'ref' || $fieldname == 'code') { + $stringforproperties .= ", 'showoncombobox'=>1"; + } + $stringforproperties .= ", 'position'=>".$position; + if ($index) { + $stringforproperties .= ", 'index'=>".$index; + } + if ($picto) { + $stringforproperties .= ", 'picto'=>'".$picto."'"; + } + if ($css) { + $stringforproperties .= ", 'css'=>'".$css."'"; + } + if ($cssview) { + $stringforproperties .= ", 'cssview'=>'".$cssview."'"; + } + if ($csslist) { + $stringforproperties .= ", 'csslist'=>'".$csslist."'"; + } + $stringforproperties .= "),\n"; + $i += 5; + } + $stringforproperties .= ');'."\n"; + $stringforproperties .= '// END MODULEBUILDER PROPERTIES'."\n"; + } + } + if (!$error) { // Copy some files $filetogenerate = array( @@ -1172,7 +1196,6 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { 'sql/llx_mymodule_myobject_extrafields.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql', 'sql/llx_mymodule_myobject_extrafields.key.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.key.sql', //'scripts/mymodule.php'=>'scripts/'.strtolower($objectname).'.php', - 'img/object_myobject.png'=>'img/object_'.strtolower($objectname).'.png', 'class/myobject.class.php'=>'class/'.strtolower($objectname).'.class.php', //'class/api_mymodule.class.php'=>'class/api_'.strtolower($module).'.class.php', ); @@ -1196,20 +1219,33 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { ); } - foreach ($filetogenerate as $srcfile => $destfile) { - $result = dol_copy($srcdir.'/'.$srcfile, $destdir.'/'.$destfile, $newmask, 0); - if ($result <= 0) { - if ($result < 0) { - $error++; - $langs->load("errors"); - setEventMessages($langs->trans("ErrorFailToCopyFile", $srcdir.'/'.$srcfile, $destdir.'/'.$destfile), null, 'errors'); - } else { - // $result == 0 - setEventMessages($langs->trans("FileAlreadyExists", $destfile), null, 'warnings'); + + if (!$error) { + foreach ($filetogenerate as $srcfile => $destfile) { + $result = dol_copy($srcdir.'/'.$srcfile, $destdir.'/'.$destfile, $newmask, 0); + if ($result <= 0) { + if ($result < 0) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFailToCopyFile", $srcdir.'/'.$srcfile, $destdir.'/'.$destfile), null, 'errors'); + } else { + // $result == 0 + setEventMessages($langs->trans("FileAlreadyExists", $destfile), null, 'warnings'); + } } } } + // Replace property section with $stringforproperties + if (!$error && $stringforproperties) { + //var_dump($stringforproperties);exit; + $arrayreplacement = array( + '/\/\/ BEGIN MODULEBUILDER PROPERTIES.*\/\/ END MODULEBUILDER PROPERTIES/ims' => $stringforproperties + ); + + dolReplaceInFile($destdir.'/class/'.strtolower($objectname).'.class.php', $arrayreplacement, '', 0, 0, 1); + } + // Edit the class 'class/'.strtolower($objectname).'.class.php' if (GETPOST('includerefgeneration', 'aZ09')) { // Replace 'visible'=>1, 'noteditable'=>0, 'default'=>'' @@ -1372,14 +1408,19 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { if (!$error) { // Edit the class file to write properties $object = rebuildObjectClass($destdir, $module, $objectname, $newmask); - if (is_numeric($object) && $object < 0) { + + if (is_numeric($object) && $object <= 0) { + $pathoffiletoeditsrc = $destdir.'/class/'.strtolower($objectname).'.class.php'; + setEventMessages($langs->trans('ErrorFailToCreateFile', $pathoffiletoeditsrc), null, 'errors'); $error++; } } if (!$error) { // Edit sql with new properties $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, '', $object); - if ($result < 0) { + + if ($result <= 0) { + setEventMessages($langs->trans('ErrorFailToCreateFile', '.sql'), null); $error++; } } @@ -1387,6 +1428,8 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { if (!$error) { setEventMessages($langs->trans('FilesForObjectInitialized', $objectname), null); $tabobj = $objectname; + } else { + $tabobj = 'newobject'; } } @@ -1471,25 +1514,26 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) && if (!$error && !GETPOST('regenerateclasssql')&& !GETPOST('regeneratemissing')) { $addfieldentry = array( - 'name'=>GETPOST('propname', 'aZ09'), - 'label'=>GETPOST('proplabel', 'alpha'), - 'type'=>GETPOST('proptype', 'alpha'), - 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' - 'visible'=>GETPOST('propvisible', 'int'), - 'enabled'=>GETPOST('propenabled', 'int'), - 'position'=>GETPOST('propposition', 'int'), - 'notnull'=>GETPOST('propnotnull', 'int'), - 'index'=>GETPOST('propindex', 'int'), - 'searchall'=>GETPOST('propsearchall', 'int'), - 'isameasure'=>GETPOST('propisameasure', 'int'), - 'comment'=>GETPOST('propcomment', 'alpha'), - 'help'=>GETPOST('prophelp', 'alpha'), - 'css'=>GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example - 'cssview'=>GETPOST('propcssview', 'alpha'), - 'csslist'=>GETPOST('propcsslist', 'alpha'), - 'default'=>GETPOST('propdefault', 'restricthtml'), - 'noteditable'=>intval(GETPOST('propnoteditable', 'int')), - 'validate' => GETPOST('propvalidate', 'int') + 'name'=>GETPOST('propname', 'aZ09'), + 'label'=>GETPOST('proplabel', 'alpha'), + 'type'=>GETPOST('proptype', 'alpha'), + 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' + 'visible'=>GETPOST('propvisible', 'int'), + 'enabled'=>GETPOST('propenabled', 'int'), + 'position'=>GETPOST('propposition', 'int'), + 'notnull'=>GETPOST('propnotnull', 'int'), + 'index'=>GETPOST('propindex', 'int'), + 'searchall'=>GETPOST('propsearchall', 'int'), + 'isameasure'=>GETPOST('propisameasure', 'int'), + 'comment'=>GETPOST('propcomment', 'alpha'), + 'help'=>GETPOST('prophelp', 'alpha'), + 'css'=>GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example + 'cssview'=>GETPOST('propcssview', 'alpha'), + 'csslist'=>GETPOST('propcsslist', 'alpha'), + 'default'=>GETPOST('propdefault', 'restricthtml'), + 'noteditable'=>intval(GETPOST('propnoteditable', 'int')), + 'alwayseditable'=>intval(GETPOST('propalwayseditable', 'int')), + 'validate' => GETPOST('propvalidate', 'int') ); @@ -1514,6 +1558,8 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) && $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, $addfieldentry, $moduletype); if (is_numeric($object) && $object <= 0) { + $pathoffiletoeditsrc = $destdir.'/class/'.strtolower($objectname).'.class.php'; + setEventMessages($langs->trans('ErrorFailToCreateFile', $pathoffiletoeditsrc), null, 'errors'); $error++; } } @@ -1523,6 +1569,7 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) && $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object, $moduletype); if ($result <= 0) { + setEventMessages($langs->trans('ErrorFailToCreateFile', '.sql'), null, 'errors'); $error++; } } @@ -1554,7 +1601,10 @@ if ($dirins && $action == 'confirm_deleteproperty' && $propertykey) { // Edit the class file to write properties if (!$error) { $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, array(), $propertykey); + if (is_numeric($object) && $object <= 0) { + $pathoffiletoeditsrc = $destdir.'/class/'.strtolower($objectname).'.class.php'; + setEventMessages($langs->trans('ErrorFailToCreateFile', $pathoffiletoeditsrc), null, 'errors'); $error++; } } @@ -1562,7 +1612,9 @@ if ($dirins && $action == 'confirm_deleteproperty' && $propertykey) { // Edit sql with new properties if (!$error) { $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object); + if ($result <= 0) { + setEventMessages($langs->trans('ErrorFailToCreateFile', '.sql'), null, 'errors'); $error++; } } @@ -1591,6 +1643,34 @@ if ($dirins && $action == 'confirm_deletemodule') { // Dir for module $dir = $dirins.'/'.$modulelowercase; + $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; + + // Dir for module + $dir = dol_buildpath($modulelowercase, 0); + + // Zip file to build + $FILENAMEZIP = ''; + + // Load module + dol_include_once($pathtofile); + $class = 'mod'.$module; + + if (class_exists($class)) { + try { + $moduleobj = new $class($db); + } catch (Exception $e) { + $error++; + dol_print_error($db, $e->getMessage()); + } + } else { + $error++; + $langs->load("errors"); + dol_print_error($db, $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module)); + exit; + } + + $moduleobj->remove(); + $result = dol_delete_dir_recursive($dir); if ($result > 0) { @@ -1641,7 +1721,6 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) { 'sql/llx_mymodule_myobject.key.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.key.sql', 'sql/llx_mymodule_myobject_extrafields.key.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.key.sql', 'scripts/myobject.php'=>'scripts/'.strtolower($objectname).'.php', - 'img/object_myobject.png'=>'img/object_'.strtolower($objectname).'.png', 'class/myobject.class.php'=>'class/'.strtolower($objectname).'.class.php', 'class/api_myobject.class.php'=>'class/api_'.strtolower($module).'.class.php', 'core/modules/mymodule/mod_myobject_advanced.php'=>'core/modules/'.strtolower($module).'/mod_'.strtolower($objectname).'_advanced.php', @@ -1720,7 +1799,7 @@ if ($dirins && $action == 'generatepackage') { $arrayversion = explode('.', $moduleobj->version, 3); if (count($arrayversion)) { - $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].(empty($arrayversion[1]) ? '.0' : '.'.$arrayversion[1]).($arrayversion[2] ? '.'.$arrayversion[2] : '').'.zip'; + $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].(empty($arrayversion[1]) ? '.0' : '.'.$arrayversion[1]).(empty($arrayversion[2]) ? '' : '.'.$arrayversion[2]).'.zip'; $dirofmodule = dol_buildpath($modulelowercase, 0).'/bin'; $outputfilezip = $dirofmodule.'/'.$FILENAMEZIP; @@ -1729,7 +1808,7 @@ if ($dirins && $action == 'generatepackage') { dol_mkdir($dirofmodule); } // Note: We exclude /bin/ to not include the already generated zip - $result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\//', $modulelowercase); + $result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\/|\.git|\.old|\.back|\.ssh/', $modulelowercase); } else { $result = -1; } @@ -1920,7 +1999,29 @@ if ($message) { } //print $langs->trans("ModuleBuilderDesc3", count($listofmodules), $FILEFLAG).'
    '; -$infomodulesfound = '
    '.$form->textwithpicto(''.$langs->trans("ModuleBuilderDesc3", count($listofmodules)).'', $langs->trans("ModuleBuilderDesc4", $FILEFLAG).'
    '.$textforlistofdirs).'
    '; +$infomodulesfound = '
    '.$form->textwithpicto('', $langs->trans("ModuleBuilderDesc3", count($listofmodules)).'

    '.$langs->trans("ModuleBuilderDesc4", $FILEFLAG).'
    '.$textforlistofdirs).'
    '; + + + +$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); +$allowonlineinstall = true; +if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) { + $allowonlineinstall = false; +} +if (empty($allowonlineinstall)) { + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean message + $message = info_admin($langs->trans('InstallModuleFromWebHasBeenDisabledContactUs')); + } else { + // Show technical message + $message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'), 0, 0, 1, 'warning'); + } + + print $message; + + llxFooter(); + exit(0); +} // Load module descriptor @@ -1999,8 +2100,10 @@ if (is_array($listofmodules) && count($listofmodules) > 0) { } $urltomodulesetup = ''.$langs->trans('Home').'-'.$langs->trans("Setup").'-'.$langs->trans("Modules").''; - if (!empty($conf->global->$const_name)) { // If module is already activated - $linktoenabledisable .= ''; + + // Define $linktoenabledisable to show after module title + if (isModEnabled($modulelowercase)) { // If module is already activated + $linktoenabledisable .= ''; $linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1); $linktoenabledisable .= ''; @@ -2060,7 +2163,7 @@ if (is_array($listofmodules) && count($listofmodules) > 0) { } $head[$h][0] = $_SERVER["PHP_SELF"].'?module=deletemodule'; -$head[$h][1] = $langs->trans("DangerZone"); +$head[$h][1] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("DangerZone"); $head[$h][2] = 'deletemodule'; $h++; @@ -2075,10 +2178,85 @@ if ($module == 'initmodule') { print ''; //print ''.$langs->trans("ModuleBuilderDesc2", 'conf/conf.php', $newdircustom).'
    '; - print $langs->trans("EnterNameOfModuleDesc").'
    '; print '
    '; - print '
    '; + print '
    '; + + print '
    '; + print ''.$langs->trans("IdModule").''; + print '
    '; + print ''; + print ''; + print '   ('; + print dolButtonToOpenUrlInDialogPopup('popup_modules_id', $langs->transnoentitiesnoconv("SeeIDsInUse"), $langs->transnoentitiesnoconv("SeeIDsInUse"), '/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', '', ''); + print ' - '; + print ''.$langs->trans("SeeReservedIDsRangeHere").''; + print ')'; + print ''; + print '
    '; + + print '
    '; + print ''.$langs->trans("ModuleName").''; + print '
    '; + print ''; + print ' '.$form->textwithpicto('', $langs->trans("EnterNameOfModuleDesc")); + print '
    '; + + print '
    '; + print ''.$langs->trans("Description").''; + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + print ''.$langs->trans("Version").''; + print '
    '; + print ''; + print '
    '; + + print '
    '; + print ''.$langs->trans("Family").''; + print '
    '; + print ''; + print ajax_combobox("family"); + print '
    '; + + print '
    '; + print ''.$langs->trans("Picto").''; + print '
    '; + print ''; + print $form->textwithpicto('', $langs->trans("Example").': fa-generic, fa-globe, ... any font awesome code.
    Advanced syntax is fa-fakey[_faprefix[_facolor[_fasize]]]'); + print '
    '; + + print '
    '; + print ''.$langs->trans("EditorName").''; + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + print ''.$langs->trans("EditorUrl").''; + print '
    '; + print '
    '; + print '
    '; print '
    '; print ''; @@ -2187,6 +2365,8 @@ if ($module == 'initmodule') { $head2[$h][2] = 'buildpackage'; $h++; + $MAXTABFOROBJECT = 15; + print ''; // Note module is inside $dirread @@ -2198,7 +2378,7 @@ if ($module == 'initmodule') { $pathtochangelog = $modulelowercase.'/ChangeLog.md'; if ($action != 'editfile' || empty($file)) { - print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Description - level 2 + print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', $MAXTABFOROBJECT, 'formodulesuffix'); // Description - level 2 print ''.$langs->trans("ModuleBuilderDesc".$tab).''; $infoonmodulepath = ''; @@ -2212,21 +2392,21 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '.$langs->trans("ReadmeFile").' : '.$pathtofilereadme.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '.$langs->trans("ChangeLog").' : '.$pathtochangelog.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; - print load_fiche_titre($langs->trans("DescriptorFile"), '', ''); + print load_fiche_titre($form->textwithpicto($langs->trans("DescriptorFile"), $langs->transnoentitiesnoconv("File").' '.$pathtofile), '', ''); if (!empty($moduleobj)) { print '
    '; @@ -2240,19 +2420,27 @@ if ($module == 'initmodule') { print '
    '; - print $langs->trans("Numero"); + print $langs->trans("IdModule"); print ''; print $moduleobj->numero; + print ''; print '   ('.$langs->trans("SeeIDsInUse").''; print ' - '.$langs->trans("SeeReservedIDsRangeHere").')'; + print ''; print '
    '; - print $langs->trans("Name"); + print $langs->trans("ModuleName"); print ''; print $moduleobj->getName(); print '
    '; + print $langs->trans("Description"); + print ''; + print $moduleobj->getDesc(); + print '
    '; print $langs->trans("Version"); print ''; @@ -2266,6 +2454,13 @@ if ($module == 'initmodule') { print $moduleobj->family; print '
    '; + print $langs->trans("Picto"); + print ''; + print $moduleobj->picto; + print '   '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"'); + print '
    '; print $langs->trans("EditorName"); print ''; @@ -2276,23 +2471,10 @@ if ($module == 'initmodule') { print $langs->trans("EditorUrl"); print ''; if (!empty($moduleobj->editor_url)) { - print ''.$moduleobj->editor_url.' '.img_picto('', 'globe').''; + print ''.$moduleobj->editor_url.' '.img_picto('', 'globe').''; } print '
    '; - print $langs->trans("Picto"); - print ''; - print $moduleobj->picto; - print '   '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"'); - print '
    '; - print $langs->trans("Description"); - print ''; - print $moduleobj->getDesc(); - print '
    '; } else { print $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module).'
    '; @@ -2302,7 +2484,7 @@ if ($module == 'initmodule') { print '

    '; // Readme file - print load_fiche_titre($langs->trans("ReadmeFile"), '', ''); + print load_fiche_titre($form->textwithpicto($langs->trans("ReadmeFile"), $langs->transnoentitiesnoconv("File").' '.$pathtofilereadme), '', ''); print ''; if (dol_is_file($dirread.'/'.$pathtofilereadme)) { @@ -2314,7 +2496,7 @@ if ($module == 'initmodule') { print '

    '; // ChangeLog - print load_fiche_titre($langs->trans("ChangeLog"), '', ''); + print load_fiche_titre($form->textwithpicto($langs->trans("ChangeLog"), $langs->transnoentitiesnoconv("File").' '.$pathtochangelog), '', ''); print ''; if (dol_is_file($dirread.'/'.$pathtochangelog)) { @@ -2356,7 +2538,7 @@ if ($module == 'initmodule') { print ''; } } else { - print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Level 2 + print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', $MAXTABFOROBJECT, 'formodulesuffix'); // Level 2 } if ($tab == 'languages') { @@ -2400,8 +2582,8 @@ if ($module == 'initmodule') { $pathtofile = 'langs/'.$langfile['relativename']; } print '
    '.$langs->trans("LanguageFile").' '.basename(dirname($pathtofile)).' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; print '
    '; @@ -2477,7 +2659,7 @@ if ($module == 'initmodule') { if ($h > 1) { $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabobj=deleteobject'; - $head3[$h][1] = $langs->trans("DangerZone"); + $head3[$h][1] =img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("DangerZone"); $head3[$h][2] = 'deleteobject'; $h++; } @@ -2503,12 +2685,38 @@ if ($module == 'initmodule') { print ''.$langs->trans("EnterNameOfObjectDesc").'

    '; - print '
    '; - print '
    '; + print '
    '; + + print '
    '; + print ''.$langs->trans("ObjectKey").'   '; + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + print ''.$langs->trans("Picto").'   '; + print '
    '; + print ''; + print $form->textwithpicto('', $langs->trans("Example").': fa-generic, fa-globe, ... any font awesome code.
    Advanced syntax is fa-fakey[_faprefix[_facolor[_fasize]]]'); + print '
    '; + + print '
    '; + print ''.$langs->trans("DefinePropertiesFromExistingTable").'   '; + print '
    '; + print ''; + print $form->textwithpicto('', $langs->trans("DefinePropertiesFromExistingTableDesc").'
    '.$langs->trans("DefinePropertiesFromExistingTableDesc2")); + print '
    '; + + print '
    '; + + print '
    '; + print '
    '; print '
    '; - print ''; + print '
    '; + print ''; print '
    '; print '
    '; + /* print '
    '; print ''.$langs->trans("or").''; print '
    '; @@ -2516,8 +2724,9 @@ if ($module == 'initmodule') { //print ' '; print $langs->trans("InitStructureFromExistingTable"); print ''; - print ''; + print ''; print '
    '; + */ print ''; } elseif ($tabobj == 'deleteobject') { @@ -2579,7 +2788,7 @@ if ($module == 'initmodule') { } if (class_exists($tabobj)) { try { - $tmpobjet = @new $tabobj($db); + $tmpobject = @new $tabobj($db); } catch (Exception $e) { dol_syslog('Failed to load Constructor of class: '.$e->getMessage(), LOG_WARNING); } @@ -2652,131 +2861,137 @@ if ($module == 'initmodule') { $urlofcard = dol_buildpath('/'.$pathtocard, 1); - - - + print ''; print '
    '; // Main DAO class file print ' '.$langs->trans("ClassFile").' : '.(dol_is_file($realpathtoclass) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoclass).(dol_is_file($realpathtoclass) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print '
    '; + // Image + if (dol_is_file($realpathtopicto)) { + print ' '.$langs->trans("Image").' : '.(dol_is_file($realpathtopicto) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtopicto).(dol_is_file($realpathtopicto) ? '' : '').''; + //print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print '
    '; + } elseif (!empty($tmpobject)) { + print ' '.$langs->trans("Image").' : '.img_picto('', $tmpobject->picto, 'class="pictofixedwidth"'); + print '
    '; + } + // API file print '
    '; print ' '.$langs->trans("ApiClassFile").' : '.(dol_is_file($realpathtoapi) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoapi).(dol_is_file($realpathtoapi)?'':'').''; if (dol_is_file($realpathtoapi)) { - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; print '   '; if (empty($conf->global->$const_name)) { // If module is not activated - print ''.$langs->trans("GoToApiExplorer").''; + print ''.$langs->trans("ApiExplorer").''; } else { - print ''.$langs->trans("GoToApiExplorer").''; + print ''.$langs->trans("ApiExplorer").''; } } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } // PHPUnit print '
    '; print ' '.$langs->trans("TestClassFile").' : '.(dol_is_file($realpathtophpunit) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtophpunit).(dol_is_file($realpathtophpunit)?'':'').''; if (dol_is_file($realpathtophpunit)) { - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; print '
    '; print ' '.$langs->trans("PageForLib").' : '.(dol_is_file($realpathtolib) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtolib).(dol_is_file($realpathtolib) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print ' '.$langs->trans("PageForObjLib").' : '.(dol_is_file($realpathtoobjlib) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoobjlib).(dol_is_file($realpathtoobjlib) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; - print '
    '; - print ' '.$langs->trans("Image").' : '.(dol_is_file($realpathtopicto) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtopicto).(dol_is_file($realpathtopicto) ? '' : '').''; - //print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; print ' '.$langs->trans("SqlFile").' : '.(dol_is_file($realpathtosql) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosql).(dol_is_file($realpathtosql) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; - print '   '.$langs->trans("DropTableIfEmpty").''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print '   '.$langs->trans("DropTableIfEmpty").''; //print '   '.$langs->trans("RunSql").''; print '
    '; print ' '.$langs->trans("SqlFileKey").' : '.(dol_is_file($realpathtosqlkey) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlkey).(dol_is_file($realpathtosqlkey) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; //print '   '.$langs->trans("RunSql").''; print '
    '; print ' '.$langs->trans("SqlFileExtraFields").' : '.(dol_is_file($realpathtosqlextra) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlextra).(dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey) ? '' : '').''; if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; print '   '; - print ''.$langs->trans("DropTableIfEmpty").''; + print ''.$langs->trans("DropTableIfEmpty").''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } //print '   '.$langs->trans("RunSql").''; print '
    '; print ' '.$langs->trans("SqlFileKeyExtraFields").' : '.(dol_is_file($realpathtosqlextrakey) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlextrakey).(dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey) ? '' : '').''; if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; print '
    '; print '
    '; print ' '.$langs->trans("PageForList").' : '.(dol_is_file($realpathtolist) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtolist).(dol_is_file($realpathtolist) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print ' '.$langs->trans("PageForCreateEditView").' : '.(dol_is_file($realpathtocard) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtocard).(dol_is_file($realpathtocard) ? '' : '').'?action=create'; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; // Page contact print ' '.$langs->trans("PageForContactTab").' : '.(dol_is_file($realpathtocontact) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtocontact).(dol_is_file($realpathtocontact) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtocontact)) { print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; // Page document print ' '.$langs->trans("PageForDocumentTab").' : '.(dol_is_file($realpathtodocument) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtodocument).(dol_is_file($realpathtodocument) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtodocument)) { print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; // Page notes print ' '.$langs->trans("PageForNoteTab").' : '.(dol_is_file($realpathtonote) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtonote).(dol_is_file($realpathtonote) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtonote)) { print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; // Page agenda print ' '.$langs->trans("PageForAgendaTab").' : '.(dol_is_file($realpathtoagenda) ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoagenda).(dol_is_file($realpathtoagenda) ? '' : '').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtoagenda)) { print ' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''; + print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
    '; print '
    '; @@ -2785,7 +3000,7 @@ if ($module == 'initmodule') { print '


    '; - if (!empty($tmpobjet)) { + if (!empty($tmpobject)) { $reflector = new ReflectionClass($tabobj); $reflectorproperties = $reflector->getProperties(); // Can also use get_object_vars $reflectorpropdefault = $reflector->getDefaultProperties(); // Can also use get_object_vars @@ -2809,22 +3024,26 @@ if ($module == 'initmodule') { print '
    '; print ''; print ''; - print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; + print ''; print ''; print ''; print ''; @@ -2838,9 +3057,9 @@ if ($module == 'initmodule') { print ''; print ''; - // We must use $reflectorpropdefault['fields'] to get list of fields because $tmpobjet->fields may have been + // We must use $reflectorpropdefault['fields'] to get list of fields because $tmpobject->fields may have been // modified during the constructor and we want value into head of class before constructor is called. - //$properties = dol_sort_array($tmpobjet->fields, 'position'); + //$properties = dol_sort_array($tmpobject->fields, 'position'); $properties = dol_sort_array($reflectorpropdefault['fields'], 'position'); if (!empty($properties)) { @@ -2858,6 +3077,7 @@ if ($module == 'initmodule') { print ''; print ''; print ''; + print ''; print ''; print ''; print ''; @@ -2879,7 +3099,7 @@ if ($module == 'initmodule') { { $propname=$propval->getName(); $comment=$propval->getDocComment(); - $type=gettype($tmpobjet->$propname); + $type=gettype($tmpobject->$propname); $default=$propdefault[$propname]; // Discard generic properties if (in_array($propname, array('element', 'childtables', 'table_element', 'table_element_line', 'class_element_line', 'ismultientitymanaged'))) continue; @@ -2892,7 +3112,7 @@ if ($module == 'initmodule') { $proplabel = $propval['label']; $proptype = $propval['type']; $proparrayofkeyval = !empty($propval['arrayofkeyval'])?$propval['arrayofkeyval']:''; - $propnotnull = $propval['notnull']; + $propnotnull = !empty($propval['notnull']) ? $propval['notnull'] : '0'; $propdefault = !empty($propval['default'])?$propval['default']:''; $propindex = !empty($propval['index'])?$propval['index']:''; $propforeignkey = !empty($propval['foreignkey'])?$propval['foreignkey']:''; @@ -2900,6 +3120,7 @@ if ($module == 'initmodule') { $propenabled = $propval['enabled']; $propvisible = $propval['visible']; $propnoteditable = !empty($propval['noteditable'])?$propval['noteditable']:0; + $propalwayseditable = !empty($propval['alwayseditable'])?$propval['alwayseditable']:0; $propsearchall = !empty($propval['searchall'])?$propval['searchall']:0; $propisameasure = !empty($propval['isameasure'])?$propval['isameasure']:0; $propcss = !empty($propval['css'])?$propval['css']:''; @@ -2928,7 +3149,9 @@ if ($module == 'initmodule') { print ''; print ''; print ''; print ''; + print ''; print ''; - print ''; - print ''; - print ''; print ''; + print ''; print ''; - print ''; - print ''; - print ''; - print ''; print ''; print_liste_field_titre("#", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'thsticky '); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Position", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LinkToParentMenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Title", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("mainmenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("leftmenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("RelativeURL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("URL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->transnoentitiesnoconv('DetailUrl')); print_liste_field_titre("LanguageFile", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Position", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Enabled", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("Permission", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Target", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("UserType", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Enabled", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center ', $langs->trans('DetailEnabled')); + print_liste_field_titre("Rights", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailRight')); + print_liste_field_titre("Target", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailTarget')); + print_liste_field_titre("MenuForUsers", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right ', $langs->trans('DetailUser')); print "\n"; if (count($menus)) { @@ -3485,7 +3719,15 @@ if ($module == 'initmodule') { print ''; print ''; print ''; @@ -3539,7 +3781,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -3630,7 +3872,7 @@ if ($module == 'initmodule') { print ''; print ''; - print ''; + print ''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } print ''; @@ -3690,7 +3932,7 @@ if ($module == 'initmodule') { print ''; if (!empty($triggers)) { @@ -3699,15 +3941,15 @@ if ($module == 'initmodule') { print ''; - print ''; + print ''; + print ''; print ''; } } else { print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; print ''; } @@ -3752,11 +3994,11 @@ if ($module == 'initmodule') { print ' '.$langs->trans("CSSFile").' : '; if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; - print ''; - print ''; + print ''; + print ''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''; } print ''; } else { @@ -3798,11 +4040,11 @@ if ($module == 'initmodule') { print ' '.$langs->trans("JSFile").' : '; if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; - print ''; - print ''; + print ''; + print ''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''; } print ''; } else { @@ -3847,13 +4089,13 @@ if ($module == 'initmodule') { $pathtofile = $widget['relpath']; print ''; + print ''; print ''; } } else { print ''; } print '
    '.$langs->trans("Property"); - print ' ('.$langs->trans("SeeExamples").')'; + print ''; + + $htmltext = $langs->trans("PropertyDesc").'

    '.$langs->trans("SeeExamples").''; + print $form->textwithpicto($langs->trans("Code"), $htmltext, 1, 'help', 'extracss', 0, 3, 'propertyhelp'); + print '
    '; print $form->textwithpicto($langs->trans("Label"), $langs->trans("YouCanUseTranslationKey")); print ''.$form->textwithpicto($langs->trans("Type"), $langs->trans("TypeOfFieldsHelp")).''.$form->textwithpicto($langs->trans("Type"), $langs->trans("TypeOfFieldsHelpIntro").'

    '.$langs->trans("TypeOfFieldsHelp"), 1, 'help', 'extracss', 0, 3, 'typehelp').'
    '.$form->textwithpicto($langs->trans("ArrayOfKeyValues"), $langs->trans("ArrayOfKeyValuesDesc")).''.$form->textwithpicto($langs->trans("NotNull"), $langs->trans("NotNullDesc")).''.$langs->trans("DefaultValue").''.$langs->trans("DatabaseIndex").''.$langs->trans("ForeignKey").''.$form->textwithpicto($langs->trans("ForeignKey"), $langs->trans("ForeignKeyDesc"), 1, 'help', 'extracss', 0, 3, 'foreignkeyhelp').''.$langs->trans("Position").''.$form->textwithpicto($langs->trans("Enabled"), $langs->trans("EnabledDesc")).''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''.$form->textwithpicto($langs->trans("Enabled"), $langs->trans("EnabledDesc"), 1, 'help', 'extracss', 0, 3, 'enabledhelp').''.$form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc").'

    '.$langs->trans("ItCanBeAnExpression"), 1, 'help', 'extracss', 0, 3, 'visiblehelp').'
    '.$langs->trans("NotEditable").''.$langs->trans("AlwaysEditable").''.$form->textwithpicto($langs->trans("SearchAll"), $langs->trans("SearchAllDesc")).''.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).''.$langs->trans("CSSClass").'
    '; print ''; print ''; @@ -2943,7 +3166,7 @@ if ($module == 'initmodule') { print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -2958,6 +3181,9 @@ if ($module == 'initmodule') { print ''; print ''; + print ''; + print ''; print ''; print ''; @@ -3014,31 +3240,37 @@ if ($module == 'initmodule') { print ''; print dol_escape_htmltag($propposition); print ''; + print ''; print $propenabled ? dol_escape_htmltag($propenabled) : ''; print ''; + // Visibility + print ''; print $propvisible ? dol_escape_htmltag($propvisible) : '0'; print ''; + // Readonly + print ''; print $propnoteditable ? dol_escape_htmltag($propnoteditable) : ''; print ''; + print $propalwayseditable ? dol_escape_htmltag($propalwayseditable) : ''; + print ''; print $propsearchall ? '1' : ''; print ''; print $propisameasure ? dol_escape_htmltag($propisameasure) : ''; print ''; + print ''; print $propcss ? dol_escape_htmltag($propcss) : ''; print ''; + print ''; print $propcssview ? dol_escape_htmltag($propcssview) : ''; print ''; + print ''; print $propcsslist ? dol_escape_htmltag($propcsslist) : ''; print ''; + // Key for tooltop + print ''; print $prophelp ? dol_escape_htmltag($prophelp) : ''; print ''; @@ -3079,7 +3311,7 @@ if ($module == 'initmodule') { $format = 'markdown'; } print ' '.$langs->trans("SpecificationFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; } } else { @@ -3172,7 +3404,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; if (is_array($dicts) && !empty($dicts)) { print ' '.$langs->trans("LanguageFile").' : '; @@ -3196,18 +3428,20 @@ if ($module == 'initmodule') { //$listofobject = dol_dir_list($dir, 'files', 0, '\.class\.php$'); $firstdicname = ''; - foreach ($dicts['tabname'] as $key => $dic) { - $dicname = $dic; - $diclabel = $dicts['tablib'][$key]; + if (!empty($dicts['tabname'])) { + foreach ($dicts['tabname'] as $key => $dic) { + $dicname = $dic; + $diclabel = $dicts['tablib'][$key]; - if (empty($firstdicname)) { - $firstdicname = $dicname; + if (empty($firstdicname)) { + $firstdicname = $dicname; + } + + $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic='.$dicname; + $head3[$h][1] = $diclabel; + $head3[$h][2] = $dicname; + $h++; } - - $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic='.$dicname; - $head3[$h][1] = $diclabel; - $head3[$h][2] = $dicname; - $h++; } if ($h > 1) { @@ -3324,7 +3558,7 @@ if ($module == 'initmodule') { print '
    '; //print '
    '; //print '
    '; - print ''; + print ''; /*print '
    '; print '
    '; print '
    '; @@ -3334,7 +3568,7 @@ if ($module == 'initmodule') { //print ' '; print $langs->trans("InitStructureFromExistingTable"); print ''; - print ''; + print ''; print '
    '; */ print ''; @@ -3397,7 +3631,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -3415,18 +3649,18 @@ if ($module == 'initmodule') { print '
    '; - print dol_escape_htmltag($menu['user']); + if ($menu['user'] == 2) { + print $langs->trans("AllMenus"); + } elseif ($menu['user'] == 0) { + print $langs->trans('Internal'); + } elseif ($menu['user'] == 1) { + print $langs->trans('External'); + } else { + print $menu['user']; // should not happen + } print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; print ''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; @@ -3639,11 +3881,11 @@ if ($module == 'initmodule') { if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; print ''.img_picto($langs->trans("Edit"), 'edit').' '; - print ''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').' '; + print ''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; print ''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print ' '.$langs->trans("TriggersFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ' '.$langs->trans("TriggersFile"); print ' : '.$langs->trans("FileNotYetGenerated").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').'
    '.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto('Generate', 'generate', 'class="paddingleft"').''.img_picto('Generate', 'generate', 'class="paddingleft"').'
    '.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto('Generate', 'generate', 'class="paddingleft"').''.img_picto('Generate', 'generate', 'class="paddingleft"').'
    '.$langs->trans("WidgetFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; - print ''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Delete"), 'delete').'
    '.$langs->trans("WidgetFile").' : '.$langs->trans("NoWidget").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print '
    '; @@ -3895,7 +4137,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; } else { $fullpathoffile = dol_buildpath($file, 0); @@ -3966,13 +4208,13 @@ if ($module == 'initmodule') { $pathtofile = $clifile['relpath']; print '
    '.$langs->trans("CLIFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '.$langs->trans("CLIFile").' : '.$langs->trans("FileNotYetGenerated"); ''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print '
    '; @@ -4013,7 +4255,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -4142,14 +4384,14 @@ if ($module == 'initmodule') { } print '
    '; print ' '.$langs->trans("SpecificationFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ' '.$langs->trans("SpecificationFile").' : '.$langs->trans("FileNotYetGenerated").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''.img_picto('Generate', 'generate', 'class="paddingleft"').'
    '; @@ -4204,7 +4446,7 @@ if ($module == 'initmodule') { print ''; print ''; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledoc), 'dayhour').')'; - print ' '.img_picto($langs->trans("Delete"), 'delete').''; + print ' '.img_picto($langs->trans("Delete"), 'delete').''; } print '
    '; @@ -4219,7 +4461,7 @@ if ($module == 'initmodule') { print ''; print ''; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledocpdf), 'dayhour').')'; - print ' '.img_picto($langs->trans("Delete"), 'delete').''; + print ' '.img_picto($langs->trans("Delete"), 'delete').''; } print '
    '; @@ -4274,7 +4516,7 @@ if ($module == 'initmodule') { $arrayversion = explode('.', $moduleobj->version, 3); if (count($arrayversion)) { - $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].(empty($arrayversion[1]) ? '.0' : '.'.$arrayversion[1]).($arrayversion[2] ? ".".$arrayversion[2] : '').".zip"; + $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].(empty($arrayversion[1]) ? '.0' : '.'.$arrayversion[1]).(empty($arrayversion[2]) ? '' : ".".$arrayversion[2]).".zip"; $outputfilezip = dol_buildpath($modulelowercase, 0).'/bin/'.$FILENAMEZIP; } @@ -4287,7 +4529,7 @@ if ($module == 'initmodule') { $relativepath = $modulelowercase.'/bin/'.$FILENAMEZIP; print ''.$outputfilezip.''; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfilezip), 'dayhour').')'; - print ' '.img_picto($langs->trans("Delete"), 'delete').''; + print ' '.img_picto($langs->trans("Delete"), 'delete').''; } print ''; @@ -4318,7 +4560,7 @@ if ($module == 'initmodule') { print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index 7a530721526..07653753646 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -113,10 +113,12 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; +if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl. + if ($action != 'create' && $action != 'edit') { + print '
    '; + print ''.$langs->trans("NewAttribute").''; + print "
    "; + } } diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 1c46028b142..8e60b2a296c 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -97,7 +97,7 @@ if (!class_exists('FormSetup')) { $formSetup = new FormSetup($db); -// Hôte +// HTTP HOST $item = $formSetup->newItem('NO_PARAM_JUST_TEXT'); $item->fieldOverride = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST']; $item->cssClass = 'minwidth500'; @@ -106,7 +106,7 @@ $item->cssClass = 'minwidth500'; $item = $formSetup->newItem('MYMODULE_MYPARAM1'); $item->defaultFieldValue = 'default value'; -// Setup conf MYMODULE_MYPARAM1 as a simple textarea input but we replace the text of field title +// Setup conf MYMODULE_MYPARAM2 as a simple textarea input but we replace the text of field title $item = $formSetup->newItem('MYMODULE_MYPARAM2'); $item->nameText = $item->getNameText().' more html text '; diff --git a/htdocs/modulebuilder/template/ajax/myobject.php b/htdocs/modulebuilder/template/ajax/myobject.php new file mode 100644 index 00000000000..3e22eb25f22 --- /dev/null +++ b/htdocs/modulebuilder/template/ajax/myobject.php @@ -0,0 +1,68 @@ + + * + * 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/mymodule/ajax/myobject.php + * \brief File to return Ajax response on product list request + */ + +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} + +// Load Dolibarr environment +require '../../main.inc.php'; + +$mode = GETPOST('mode', 'aZ09'); + +// Security check +restrictedArea($user, 'mymodule', 0, 'myobject'); + + +/* + * View + */ + +dol_syslog("Call ajax mymodule/ajax/myobject.php"); + +top_httphead('application/json'); + +$arrayresult = array(); + +// .... + +$db->close(); + +print json_encode($arrayresult); diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index 736fd9ddc38..ce92ef5ea8e 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -293,7 +293,9 @@ class MyModuleApi extends DolibarrApi throw new RestException(401, 'Access to instance id='.$this->myobject->id.' of object not allowed for login '.DolibarrApiAccess::$user->login); } - if (!$this->myobject->delete(DolibarrApiAccess::$user)) { + if ($this->myobject->delete(DolibarrApiAccess::$user) == 0) { + throw new RestException(409, 'Error when deleting MyObject : '.$this->myobject->error); + } elseif ($this->myobject->delete(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error when deleting MyObject : '.$this->myobject->error); } diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 0ad6add9fc8..2fe7d983513 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -84,11 +84,12 @@ class MyObject extends CommonObject * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * 'label' the translation key. * 'picto' is code of a picto to show before value in forms - * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or 'isModEnabled("multicurrency")' ...) * 'position' is the sort order of field. * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) * 'noteditable' says if field is not editable (1 or 0) + * 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0') * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. * '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_...). @@ -109,25 +110,25 @@ class MyObject extends CommonObject // BEGIN MODULEBUILDER PROPERTIES /** - * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array Array with all fields into database 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', 'enabled'=>1, 'visible'=>-2, 'noteditable'=>1, 'notnull'=> 1, 'index'=>1, 'position'=>1, 'comment'=>'Id', 'css'=>'left'), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=> 1, 'default'=>1, 'index'=>1, 'position'=>10), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'noteditable'=>0, 'default'=>'', 'notnull'=> 1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20, 'searchall'=>1, 'comment'=>'Reference of object', 'validate'=>1), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>'Help text', 'showoncombobox'=>2, 'validate'=>1), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>'Help text', 'showoncombobox'=>2, 'validate'=>1, 'alwayseditable'=>1), 'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for amount', 'validate'=>1), 'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>1, 'default'=>'0', 'position'=>45, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for quantity', 'css'=>'maxwidth75imp', 'validate'=>1), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'picto'=>'company', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'OrganizationEventLinkToThirdParty', 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx'), - 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx'), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'picto'=>'company', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'OrganizationEventLinkToThirdParty', 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>60, 'validate'=>1), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'validate'=>1, 'cssview'=>'wordbreak'), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'validate'=>1, 'cssview'=>'wordbreak'), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>500), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 0, 'position'=>501), //'date_validation ' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502), - 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>510, 'foreignkey'=>'user.rowid'), - 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>510, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150'), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511, 'csslist'=>'tdoverflowmax150'), //'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>0, 'notnull'=>0, 'position'=>600), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), @@ -253,7 +254,7 @@ class MyObject extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -449,7 +450,7 @@ class MyObject extends CommonObject $sql = "SELECT "; $sql .= $this->getFieldList('t'); - $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + $sql .= " FROM ".$this->db->prefix().$this->table_element." as t"; if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { $sql .= " WHERE t.entity IN (".getEntity($this->element).")"; } else { @@ -524,7 +525,7 @@ class MyObject extends CommonObject * Delete object in database * * @param User $user User that deletes - * @param bool $notrigger false=launch triggers after, true=disable triggers + * @param bool $notrigger false=launch triggers, true=disable triggers * @return int <0 if KO, >0 if OK */ public function delete(User $user, $notrigger = false) @@ -573,8 +574,8 @@ class MyObject extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->myobject->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->myobject->myobject_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->myobject->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->myobject->myobject_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -691,8 +692,8 @@ class MyObject extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -715,8 +716,8 @@ class MyObject extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -735,12 +736,12 @@ class MyObject extends CommonObject public function reopen($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_CANCELED) { + if ($this->status == self::STATUS_VALIDATED) { return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -864,6 +865,36 @@ class MyObject extends CommonObject return $result; } + /** + * Return a thumb for kanban views + * + * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) + * @return string HTML Code for Kanban thumb. + */ + /* + public function getKanbanView($option = '') + { + $return = '
    '; + $return .= '
    '; + $return .= ''; + $return .= img_picto('', $this->picto); + $return .= ''; + $return .= '
    '; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + if (property_exists($this, 'label')) { + $return .= '
    '.$this->label.''; + } + if (method_exists($this, 'getLibStatut')) { + $return .= '
    '.$this->getLibStatut(5).'
    '; + } + $return .= '
    '; + $return .= '
    '; + $return .= '
    '; + + return $return; + } + */ + /** * Return the label of the status * diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php index 290048785fd..7b2c4e2ab5a 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php @@ -24,7 +24,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets // CHANGE THIS: Set to 1 if selector is available for admin users only public $require_admin = 0; - public $enabled = '$conf->mymodule->enabled'; + public $enabled = 'isModEnabled("mymodule")'; public $require_module = array(); @@ -46,12 +46,8 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets */ public function __construct($db) { - global $conf; - $this->db = $db; - if (is_array($conf->modules)) { - $this->enabled = in_array('mymodule', $conf->modules) ? 1 : 0; - } + $this->enabled = isModEnabled('mymodule'); } diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index edf0c7647de..99cd900b512 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -71,7 +71,7 @@ class modMyModule extends DolibarrModules $this->editor_name = 'Editor name'; $this->editor_url = 'https://www.example.com'; - // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' + // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' $this->version = '1.0'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; @@ -144,7 +144,7 @@ class modMyModule extends DolibarrModules $this->langfiles = array("mymodule@mymodule"); // Prerequisites - $this->phpmin = array(5, 6); // Minimum version of PHP required by module + $this->phpmin = array(7, 0); // Minimum version of PHP required by module $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module // Messages at activation @@ -188,7 +188,7 @@ class modMyModule extends DolibarrModules // 'invoice_supplier' to add a tab in supplier invoice view // 'member' to add a tab in fundation member view // 'opensurveypoll' to add a tab in opensurvey poll view - // 'order' to add a tab in customer order view + // 'order' to add a tab in sale order view // 'order_supplier' to add a tab in supplier order view // 'payment' to add a tab in payment view // 'payment_supplier' to add a tab in supplier payment view @@ -298,8 +298,8 @@ class modMyModule extends DolibarrModules 'url'=>'/mymodule/mymoduleindex.php', 'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000 + $r, - 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->myobject->read' if you want your menu with a permission rules + 'enabled'=>'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. + 'perms'=>'1', // Use 'perms'=>'$user->hasRight("mymodule", "myobject", "read")' if you want your menu with a permission rules 'target'=>'', 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); @@ -315,8 +315,8 @@ class modMyModule extends DolibarrModules 'url'=>'/mymodule/mymoduleindex.php', 'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, - 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->mymodule->myobject->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'enabled'=>'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. + 'perms'=>'$user->hasRight("mymodule", "myobject", "read")', 'target'=>'', 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); @@ -329,8 +329,8 @@ class modMyModule extends DolibarrModules 'url'=>'/mymodule/myobject_list.php', 'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, - 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->mymodule->myobject->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'enabled'=>'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. + 'perms'=>'$user->hasRight("mymodule", "myobject", "read")' 'target'=>'', 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); @@ -343,8 +343,8 @@ class modMyModule extends DolibarrModules 'url'=>'/mymodule/myobject_card.php?action=create', 'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, - 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->mymodule->myobject->write', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'enabled'=>'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->hasRight("mymodule", "myobject", "write")' 'target'=>'', 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 4338c2b7d6a..b7dfc374a52 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -119,7 +119,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $form = new Form($this->db); $texte = $this->description.".
    \n"; - $texte .= '
    '; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -158,7 +158,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $texte .= $conf->global->MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH; $texte .= ''; $texte .= '
    '; - $texte .= ''; + $texte .= ''; $texte .= '
    '; // Scan directories @@ -172,18 +172,16 @@ class doc_generic_myobject_odt extends ModelePDFMyObject } if ($nbofiles) { - $texte .= '
    '; @@ -282,8 +281,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; + // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { @@ -291,11 +292,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -303,12 +304,12 @@ class doc_generic_myobject_odt extends ModelePDFMyObject dol_mkdir($conf->mymodule->dir_temp); if (!is_writable($conf->mymodule->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->mymodule->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mymodule->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } - // If CUSTOMER contact defined on order, we use it + // If CUSTOMER contact defined on object, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); if (count($arrayidcontact) > 0) { @@ -348,7 +349,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Line of free text $newfreetext = ''; - $paramfreetext = 'ORDER_FREE_TEXT'; + $paramfreetext = 'MYMODULE_MYOBJECT_FREE_TEXT'; if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 561c09f88d6..bd5348b1566 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -70,9 +70,9 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -121,10 +121,10 @@ class pdf_standard_myobject extends ModelePDFMyObject $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); // Get source company $this->emetteur = $mysoc; @@ -206,7 +206,7 @@ class pdf_standard_myobject extends ModelePDFMyObject if (empty($object->lines[$i]->fk_product)) continue; //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -223,7 +223,7 @@ class pdf_standard_myobject extends ModelePDFMyObject foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo { if ($obj['photo_vignette']) { @@ -312,7 +312,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -634,13 +634,13 @@ class pdf_standard_myobject extends ModelePDFMyObject // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } } else { - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + if (isModEnabled("multicurrency") && $object->multicurrency_tx != 1) { $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; } else { $tvaligne = $sign * $object->lines[$i]->total_tva; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index 61186a3b4f3..cce647de224 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -30,7 +30,7 @@ dol_include_once('/mymodule/core/modules/mymodule/modules_myobject.php'); /** - * Class to manage customer Bom numbering rules advanced + * Class to manage the Advanced numbering rule for MyObject */ class mod_myobject_advanced extends ModeleNumRefMyObject { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php index 75068cf8d57..f21ffe880d0 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php @@ -26,7 +26,7 @@ dol_include_once('/mymodule/core/modules/mymodule/modules_myobject.php'); /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for MyObject */ class mod_myobject_standard extends ModeleNumRefMyObject { diff --git a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php index 37ece327185..8f7764ad100 100644 --- a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php +++ b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php @@ -155,7 +155,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers //case 'MYECMDIR_MODIFY': //case 'MYECMDIR_DELETE': - // Customer orders + // Sales orders //case 'ORDER_CREATE': //case 'ORDER_MODIFY': //case 'ORDER_VALIDATE': @@ -177,7 +177,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers //case 'ORDER_SUPPLIER_REFUSE': //case 'ORDER_SUPPLIER_CANCEL': //case 'ORDER_SUPPLIER_SENTBYMAIL': - //case 'ORDER_SUPPLIER_DISPATCH': + //case 'ORDER_SUPPLIER_RECEIVE': //case 'LINEORDER_SUPPLIER_DISPATCH': //case 'LINEORDER_SUPPLIER_CREATE': //case 'LINEORDER_SUPPLIER_UPDATE': @@ -314,7 +314,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers // and more... default: - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); break; } diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index 985cbe6aa18..260868a10bf 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -21,15 +21,13 @@ * \brief CSS file for module MyModule. */ -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url. +//if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language +//if (!defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url. if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', 1); -} +//if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations +//if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); // Should be disable only for special situation if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', 1); } @@ -80,7 +78,7 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS -/*if (empty($user->id) && ! empty($_SESSION['dol_login'])) { +/*if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('',$_SESSION['dol_login']); $user->getrights(); }*/ diff --git a/htdocs/modulebuilder/template/img/README.md b/htdocs/modulebuilder/template/img/README.md new file mode 100644 index 00000000000..2fcb4afc087 --- /dev/null +++ b/htdocs/modulebuilder/template/img/README.md @@ -0,0 +1,14 @@ + +Directory for module image files +-------------------------------- + +You can put here the .png files of your module: + + +If the picto of your module is an image (property $picto has been set to 'mymodule.png@mymodule', you can put into this +directory a .png file called *object_mymodule.png* (16x16 or 32x32 pixels) + + +If the picto of an object is an image (property $picto of the object.class.php has been set to 'myobject.png@mymodule', then you can put into this +directory a .png file called *object_myobject.png* (16x16 or 32x32 pixels) + diff --git a/htdocs/modulebuilder/template/img/object_mymodule.png b/htdocs/modulebuilder/template/img/object_mymodule.png deleted file mode 100644 index b421fe3c9e0..00000000000 Binary files a/htdocs/modulebuilder/template/img/object_mymodule.png and /dev/null differ diff --git a/htdocs/modulebuilder/template/img/object_mymodule_over.png b/htdocs/modulebuilder/template/img/object_mymodule_over.png deleted file mode 100644 index 7831c3025d7..00000000000 Binary files a/htdocs/modulebuilder/template/img/object_mymodule_over.png and /dev/null differ diff --git a/htdocs/modulebuilder/template/img/object_myobject.png b/htdocs/modulebuilder/template/img/object_myobject.png deleted file mode 100644 index b421fe3c9e0..00000000000 Binary files a/htdocs/modulebuilder/template/img/object_myobject.png and /dev/null differ diff --git a/htdocs/modulebuilder/template/lib/mymodule.lib.php b/htdocs/modulebuilder/template/lib/mymodule.lib.php index ab8a647efe4..0ebae6eb74f 100644 --- a/htdocs/modulebuilder/template/lib/mymodule.lib.php +++ b/htdocs/modulebuilder/template/lib/mymodule.lib.php @@ -30,6 +30,10 @@ function mymoduleAdminPrepareHead() { global $langs, $conf; + // global $db; + // $extrafields = new ExtraFields($db); + // $extrafields->fetch_name_optionals_label('myobject'); + $langs->load("mymodule@mymodule"); $h = 0; @@ -43,6 +47,10 @@ function mymoduleAdminPrepareHead() /* $head[$h][0] = dol_buildpath("/mymodule/admin/myobject_extrafields.php", 1); $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = is_countable($extrafields->attributes['myobject']['label']) ? count($extrafields->attributes['myobject']['label']) : 0; + if ($nbExtrafields > 0) { + $head[$h][1] .= ' ' . $nbExtrafields . ''; + } $head[$h][2] = 'myobject_extrafields'; $h++; */ diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php index 15f3d83ac54..3b7b1b13009 100644 --- a/htdocs/modulebuilder/template/mymoduleindex.php +++ b/htdocs/modulebuilder/template/mymoduleindex.php @@ -62,19 +62,29 @@ $langs->loadLangs(array("mymodule@mymodule")); $action = GETPOST('action', 'aZ09'); +$max = 5; +$now = dol_now(); -// Security check -// if (! $user->rights->mymodule->myobject->read) { -// accessforbidden(); -// } +// Security check - Protection if external user $socid = GETPOST('socid', 'int'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } -$max = 5; -$now = dol_now(); +// Security check (enable the most restrictive one) +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//if (!isModEnabled('mymodule')) { +// accessforbidden('Module not enabled'); +//} +//if (! $user->hasRight('mymodule', 'myobject', 'read')) { +// accessforbidden(); +//} +//restrictedArea($user, 'mymodule', 0, 'mymodule_myobject', 'myobject', '', 'rowid'); +//if (empty($user->admin)) { +// accessforbidden('Must be admin'); +//} /* @@ -100,7 +110,7 @@ print '
    '; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) +if (isModEnabled('mymodule') && $user->rights->mymodule->read) { $langs->load("orders"); @@ -181,7 +191,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject -if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) +if (isModEnabled('mymodule') && $user->rights->mymodule->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."mymodule_myobject as s"; diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 740d419719a..d7b84707b95 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,8 +37,7 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined("MAIN_SECURITY_FORCECSP")) define('MAIN_SECURITY_FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification @@ -147,8 +145,10 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden(); +//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden(); +} if (!$permissiontoread) accessforbidden(); @@ -186,11 +186,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = myobjectPrepareHead($object); @@ -210,7 +210,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -230,7 +230,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index b7a051c1bd9..4e80c81a4df 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,8 +37,7 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined("MAIN_SECURITY_FORCECSP")) define('MAIN_SECURITY_FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification //if (! defined('NOSESSION')) define('NOSESSION', '1'); // Disable session @@ -128,11 +126,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ // Set $enablepermissioncheck to 1 to enable a minimum low level of checks $enablepermissioncheck = 0; if ($enablepermissioncheck) { - $permissiontoread = $user->rights->mymodule->myobject->read; - $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php - $permissiontodelete = $user->rights->mymodule->myobject->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); - $permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php - $permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php + $permissiontoread = $user->hasRight('mymodule', 'myobject', 'read'); + $permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php + $permissiontodelete = $user->hasRight('mymodule', 'myobject', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); + $permissionnote = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_setnotes.inc.php + $permissiondellink = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_dellink.inc.php } else { $permissiontoread = 1; $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php @@ -147,9 +145,13 @@ $upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object- //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden(); -if (!$permissiontoread) accessforbidden(); +//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden(); +} +if (!$permissiontoread) { + accessforbidden(); +} /* @@ -244,8 +246,7 @@ llxHeader('', $title, $help_url); // Part to create if ($action == 'create') { if (empty($permissiontoadd)) { - accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); - exit; + accessforbidden('NotEnoughPermissions', 0, 1); } print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("MyObject")), '', 'object_'.$object->picto); @@ -346,7 +347,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) if ($action == 'xxx') { $text = $langs->trans('ConfirmActionMyObject', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -355,6 +356,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); + /* $forcecombo=0; if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy @@ -393,7 +395,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -411,7 +413,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -513,20 +515,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); } // Back to draft if ($object->status == $object::STATUS_VALIDATED) { - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); } - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); // Validate if ($object->status == $object::STATUS_DRAFT) { if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { - print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); } else { $langs->load("errors"); print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0); @@ -534,27 +536,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); + if ($permissiontoadd) { + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); + } /* if ($permissiontoadd) { if ($object->status == $object::STATUS_ENABLED) { - print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Disable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd); } else { - print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Enable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd); } } if ($permissiontoadd) { if ($object->status == $object::STATUS_VALIDATED) { - print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Cancel'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd); } else { - print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Re-Open'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd); } } */ - // Delete (need delete permission, or if draft, just need create/modify permission) - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + // Delete + $params = array(); + print dolGetButtonAction('', $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete, $params); } print '
    '."\n"; } diff --git a/htdocs/modulebuilder/template/myobject_contact.php b/htdocs/modulebuilder/template/myobject_contact.php index 01efbec8cdc..9568201238c 100644 --- a/htdocs/modulebuilder/template/myobject_contact.php +++ b/htdocs/modulebuilder/template/myobject_contact.php @@ -93,8 +93,10 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden(); +//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden(); +} if (!$permissiontoread) accessforbidden(); @@ -173,7 +175,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -194,7 +196,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index df201c2653b..ff1756e2b15 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,8 +37,7 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined("MAIN_SECURITY_FORCECSP")) define('MAIN_SECURITY_FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification @@ -139,9 +137,17 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden(); -if (!$permissiontoread) accessforbidden(); +//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden(); +} +if (!$permissiontoread) { + accessforbidden(); +} +if (empty($object->id)) { + accessforbidden(); +} + /* @@ -162,100 +168,94 @@ $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) { - /* - * Show tabs - */ - $head = myobjectPrepareHead($object); +// Show tabs +$head = myobjectPrepareHead($object); - print dol_get_fiche_head($head, 'document', $langs->trans("MyObject"), -1, $object->picto); +print dol_get_fiche_head($head, 'document', $langs->trans("MyObject"), -1, $object->picto); - // Build file list - $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").''; - - $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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); - // Project - if (! empty($conf->project->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - 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 .= ': '.$proj->getNomUrl(); - } else { - $morehtmlref .= ''; - } - } - }*/ - $morehtmlref .= '
    '; - - 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 '
    '; - - print dol_get_fiche_end(); - - $modulepart = 'mymodule'; - //$permissiontoadd = $user->rights->mymodule->myobject->write; - $permissiontoadd = 1; - //$permtoedit = $user->rights->mymodule->myobject->write; - $permtoedit = 1; - $param = '&id='.$object->id; - - //$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/'; - $relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/'; - - include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} else { - accessforbidden('', 0, 1); +// Build file list +$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").''; + +$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') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (!empty($conf->project->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + 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 .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ +$morehtmlref .= '
    '; + +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 '
    '; + +print dol_get_fiche_end(); + +$modulepart = 'mymodule'; +//$permissiontoadd = $user->rights->mymodule->myobject->write; +$permissiontoadd = 1; +//$permtoedit = $user->rights->mymodule->myobject->write; +$permtoedit = 1; +$param = '&id='.$object->id; + +//$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/'; +$relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/'; + +include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 0f83371d676..29c9205b1f0 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,8 +37,7 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined("MAIN_SECURITY_FORCECSP")) define('MAIN_SECURITY_FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification //if (! defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions @@ -53,7 +51,8 @@ if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; + $i--; + $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; @@ -88,10 +87,7 @@ require_once __DIR__.'/class/myobject.class.php'; // Load translation files required by the page $langs->loadLangs(array("mymodule@mymodule", "other")); -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); - -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : '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 @@ -102,6 +98,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -137,7 +136,7 @@ if (!$sortorder) { } // Initialize array of search criterias -$search_all = GETPOST('search_all', 'alphanohtml'); +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); foreach ($object->fields as $key => $val) { if (GETPOST('search_'.$key, 'alpha') !== '') { @@ -197,8 +196,10 @@ if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) accessforbidden(); //$socid = 0; if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, 0, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled'); +//restrictedArea($user, $object->module, 0, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden('Module mymodule not enabled'); +} if (!$permissiontoread) accessforbidden(); @@ -281,6 +282,9 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); //$sql .= ", COUNT(rc.rowid) as anotherfield"; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; //$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."anothertable as rc ON rc.parent = t.rowid"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { @@ -363,21 +367,9 @@ $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPri // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - /* This old and fast method to get and count full list returns all record so use a high amount of memory. - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - */ - /* The slow method does not consume memory on mysql (not tested on pgsql) */ - /*$resql = $db->query($sql, 0, 'auto', 1); - while ($db->fetch_object($resql)) { - if (empty($nbtotalofrecords)) { - $nbtotalofrecords = 1; // We can't make +1 because init value is '' - } else { - $nbtotalofrecords++; - } - }*/ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); $resql = $db->query($sqlforcount); if ($resql) { $objforcount = $db->fetch_object($resql); @@ -386,7 +378,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { dol_print_error($db); } - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -580,7 +572,7 @@ foreach ($object->fields as $key => $val) { if (!empty($arrayfields['t.'.$key]['checked'])) { print '
    '; if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { - print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1); } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1); } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index 368803a78a5..89e5e0ba76e 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -28,7 +28,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -38,8 +37,7 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies +//if (! defined("MAIN_SECURITY_FORCECSP")) define('MAIN_SECURITY_FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification @@ -119,8 +117,10 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); -//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->mymodule->enabled)) accessforbidden(); +//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft); +if (!isModEnabled("mymodule")) { + accessforbidden(); +} if (!$permissiontoread) accessforbidden(); @@ -168,7 +168,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -189,7 +189,7 @@ if ($id > 0 || !empty($ref)) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php index 860c3a54bec..e335eb0ea46 100644 --- a/htdocs/modulebuilder/template/scripts/mymodule.php +++ b/htdocs/modulebuilder/template/scripts/mymodule.php @@ -29,7 +29,6 @@ //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs //if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters //if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu @@ -39,7 +38,6 @@ //if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions diff --git a/htdocs/mrp/ajax/ajax_bom.php b/htdocs/mrp/ajax/ajax_bom.php index 280a0c98cdd..050385246b5 100644 --- a/htdocs/mrp/ajax/ajax_bom.php +++ b/htdocs/mrp/ajax/ajax_bom.php @@ -26,9 +26,6 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', '1'); } @@ -42,17 +39,20 @@ if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; $idbom = GETPOST('idbom', 'alpha'); -$action = GETPOST('action', 'aZ09'); +//$action = GETPOST('action', 'aZ09'); /* * View */ +top_httphead('application/json'); + $object = new BOM($db); $result = $object->fetch($idbom); if ($result > 0) { diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index d186c6e533b..8624713c689 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -105,7 +105,7 @@ class Mo extends CommonObject 'mrptype' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>34, 'notnull'=>1, 'default'=>'0', 'arrayofkeyval'=>array(0=>'Manufacturing', 1=>'Disassemble'), 'css'=>'minwidth150', 'csslist'=>'minwidth150 center'), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>'$conf->product->enabled', 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax100', 'picto'=>'product'), 'qty' => array('type'=>'real', 'label'=>'QtyToProduce', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>1, 'comment'=>"Qty to produce", 'css'=>'width75', 'default'=>1, 'isameasure'=>1), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'2', 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax200'), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'2', 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax200', 'alwayseditable'=>1), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'css'=>'maxwidth400', 'csslist'=>'tdoverflowmax150'), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>51, 'notnull'=>-1, 'index'=>1, 'css'=>'minwidth200 maxwidth400', 'csslist'=>'tdoverflowmax100'), 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php:0', 'label'=>'WarehouseForProduction', 'picto'=>'stock', 'enabled'=>'$conf->stock->enabled', 'visible'=>1, 'position'=>52, 'css'=>'maxwidth400', 'csslist'=>'tdoverflowmax200'), @@ -116,8 +116,8 @@ class Mo extends CommonObject 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502,), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1, 'csslist'=>'tdoverflowmax100'), - 'date_start_planned' => array('type'=>'datetime', 'label'=>'DateStartPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'notnull'=>-1, 'index'=>1, 'help'=>'KeepEmptyForAsap'), - 'date_end_planned' => array('type'=>'datetime', 'label'=>'DateEndPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>56, 'notnull'=>-1, 'index'=>1,), + 'date_start_planned' => array('type'=>'datetime', 'label'=>'DateStartPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'notnull'=>-1, 'index'=>1, 'help'=>'KeepEmptyForAsap', 'alwayseditable'=>1), + 'date_end_planned' => array('type'=>'datetime', 'label'=>'DateEndPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>56, 'notnull'=>-1, 'index'=>1, 'alwayseditable'=>1), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,), 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010), 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'default'=>0, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'InProgress', '3'=>'StatusMOProduced', '9'=>'Canceled')), @@ -224,7 +224,7 @@ class Mo extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -613,11 +613,9 @@ class Mo extends CommonObject } if (!$error) { - setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); $this->db->commit(); return 1; } else { - setEventMessages($this->error, $this->errors, 'errors'); $this->db->rollback(); return -1; } @@ -636,8 +634,9 @@ class Mo extends CommonObject $role = ""; if ($this->status != self::STATUS_DRAFT) { - $this->error = 'BadStatus'; - return -1; + //$this->error = 'BadStatusForUpdateProduction'; + //return -1; + return 1; } $this->db->begin(); @@ -697,7 +696,7 @@ class Mo extends CommonObject if ($line->qty_frozen) { $moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce } else { - $moline->qty = price2num(($line->qty / ( ! empty($bom->qty) ? $bom->qty : 1 ) ) * $this->qty / ( ! empty($line->efficiency) ? $line->efficiency : 1 ), 'MS'); // Calculate with Qty to produce and more presition + $moline->qty = price2num(($line->qty / ( !empty($bom->qty) ? $bom->qty : 1 ) ) * $this->qty / ( !empty($line->efficiency) ? $line->efficiency : 1 ), 'MS'); // Calculate with Qty to produce and more presition } if ($moline->qty <= 0) { $error++; @@ -770,13 +769,13 @@ class Mo extends CommonObject $fk_movement = GETPOST('fk_movement', 'int'); $arrayoflines = $this->fetchLinesLinked('consumed', $idline); - if (! empty($arrayoflines)) { + if (!empty($arrayoflines)) { $this->db->begin(); $stockmove = new MouvementStock($this->db); $stockmove->setOrigin($this->element, $this->id); - if (! empty($fk_movement)) { + if (!empty($fk_movement)) { $moline = new MoLine($this->db); $TArrayMoLine = $moline->fetchAll('', '', 1, 0, array('customsql' => 'fk_stock_movement ='.$fk_movement)); $moline = array_shift($TArrayMoLine); @@ -903,8 +902,8 @@ class Mo extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mrp->create)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mrp->mrp_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mrp->create)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mrp->mrp_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -1015,8 +1014,8 @@ class Mo extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -1039,8 +1038,8 @@ class Mo extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -1063,8 +1062,8 @@ class Mo extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->mymodule->mymodule_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -1637,7 +1636,7 @@ class MoLine extends CommonObjectLine if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index d9ee0e39cc6..d7929ce1422 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -26,6 +26,7 @@ * \brief Home page for BOM and MRP modules */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; diff --git a/htdocs/mrp/js/lib_dispatch.js.php b/htdocs/mrp/js/lib_dispatch.js.php index e8ca84d7a4e..8470716ce8f 100644 --- a/htdocs/mrp/js/lib_dispatch.js.php +++ b/htdocs/mrp/js/lib_dispatch.js.php @@ -70,7 +70,7 @@ function addDispatchLine(index, type, mode) mode = mode || 'qtymissing' console.log("fourn/js/lib_dispatch.js.php Split line type="+type+" index="+index+" mode="+mode); - if(mode == 'qtymissingconsume') { + if(mode == 'qtymissingconsume' || mode == 'allmissingconsume') { var inputId = 'qtytoconsume'; var warehouseId = 'idwarehouse'; } @@ -94,16 +94,70 @@ function addDispatchLine(index, type, mode) console.log($("#qty_dispatched_"+index).val()); // If user did not reduced the qty to dispatch on old line, we keep only 1 on old line and the rest on new line if (qtyDispatched == qtyOrdered && qtyDispatched > 1) { - qtyDispatched = parseFloat($("#qty_dispatched_"+index).val()) + 1; - mode = 'lessone'; + qtyDispatched = parseFloat($("#qty_dispatched_" + index).val()) + 1; + + } + if(mode == 'allmissingconsume' || mode == 'alltoproduce') { + var qtymax = parseFloat($($row).data('max-qty')); + if(qtymax === 'undefined') qtymax = 1; } } - console.log("qtyDispatched="+qtyDispatched+" qtyOrdered="+qtyOrdered); + + if(mode == 'allmissingconsume' || mode == 'alltoproduce') { + var count = 0; + var qtyalreadyused = 0; + var error = 0; + + while (qtyalreadyused < qty) { + //If remaining qty needed is inferior to qty asked, qtymax = qty asked - qty already used + if ((qtyalreadyused + qtymax) > qty) qtymax = qty - qtyalreadyused; + //If first line, we replace value, not add line + if(count === 0){ + $("#"+inputId+"-"+index+"-"+nbrTrs).val(qtymax); + } else { + var res = addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, inputId, type, qtymax, mode, $row); + if(res === -1){ + error = 1; + break; + } + nbrTrs++; + } + qtyalreadyused = qtyalreadyused + qtymax; + count++; + $row = $("tr[name='" + type + '_' + index + "_1']").clone(true); + } + + if(error === 0) { + addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, inputId, type, '', mode, $row); + } + } + else addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, inputId, type, qty, mode, $row) + +} + +/** + * addDispatchTR + * Adds new table row for dispatching to multiple stock locations or multiple lot/serial + * + * @param qtyOrdered double + * @param qtyDispatched double + * @param index int + * @param nbrTrs int + * @param warehouseId int + * @param inputId int + * @param type string + * @param qty double + * @param mode string + * @param $row object + */ +function addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, inputId, type, qty, mode, $row) { if (qtyOrdered <= 1) { window.alert("Quantity can't be split"); + return -1; } else if (qtyDispatched >= qtyOrdered) { window.alert("No remain qty to dispatch"); + return -1; } else if (qtyDispatched < qtyOrdered) { //replace tr suffix nbr var re1 = new RegExp('_'+index+'_1', 'g'); @@ -128,24 +182,27 @@ function addDispatchLine(index, type, mode) /* Suffix of lines are: index _ trs.length */ $("#"+inputId+"-"+index+"-"+(nbrTrs+1)).focus(); if ($("#"+inputId+"-"+index+"-"+(nbrTrs)).val() == 0) { - $("#"+inputId+"-"+index+"-"+(nbrTrs)).val(1); + if(mode == 'allmissingconsume' || mode == 'alltoproduce') $("#"+inputId+"-"+index+"-"+(nbrTrs)).val(qty); + else $("#"+inputId+"-"+index+"-"+(nbrTrs)).val(1); } var totalonallines = 0; for (let i = 1; i <= nbrTrs; i++) { console.log(i+" = "+parseFloat($("#"+inputId+"-"+index+"-"+i).val())); totalonallines = totalonallines + parseFloat($("#"+inputId+"-"+index+"-"+i).val()); } - console.log("totalonallines="+totalonallines); - if (totalonallines == qtyOrdered && qtyOrdered > 1) { - var prevouslineqty = $("#"+inputId+"-"+index+"-"+nbrTrs).val(); - $("#"+inputId+"-"+index+"-"+(nbrTrs)).val(1); - $("#"+inputId+"-"+index+"-"+(nbrTrs+1)).val(prevouslineqty - 1); + + if(mode != 'allmissingconsume' && mode != 'alltoproduce') { + if (totalonallines == qtyOrdered && qtyOrdered > 1) { + var prevouslineqty = $("#" + inputId + "-" + index + "-" + nbrTrs).val(); + $("#" + inputId + "-" + index + "-" + (nbrTrs)).val(1); + $("#" + inputId + "-" + index + "-" + (nbrTrs + 1)).val(prevouslineqty - 1); + } } $("#qty_dispatched_"+index).val(qtyDispatched); //hide all buttons then show only the last one - $("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide(); - $("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show(); + $("tr[name^='"+type+"_"+index+"_'] .splitbutton").hide(); + $("tr[name^='"+type+"_"+index+"_']:last .splitbutton").show(); if (mode === 'lessone') { @@ -156,6 +213,10 @@ function addDispatchLine(index, type, mode) $("#"+inputId+"-"+index+(nbrTrs)).data('qty', qty); $("#"+inputId+"-"+index+(nbrTrs)).data('type', type); $("#"+inputId+"-"+index+(nbrTrs)).data('index', index); + if(mode == 'allmissingconsume' || mode == 'alltoproduce') { + let currentQtyDispatched = qtyDispatched+qty; + $row.find("input[id^='"+inputId+"']").val(qty); + } } } diff --git a/htdocs/mrp/lib/mrp.lib.php b/htdocs/mrp/lib/mrp.lib.php index c9720cb56bc..854244e53c7 100644 --- a/htdocs/mrp/lib/mrp.lib.php +++ b/htdocs/mrp/lib/mrp.lib.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -55,5 +55,7 @@ function mrpAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'mrp'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'mrp', 'remove'); + return $head; } diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php index 08bc07f298a..f78f5da9166 100644 --- a/htdocs/mrp/lib/mrp_mo.lib.php +++ b/htdocs/mrp/lib/mrp_mo.lib.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index 2e8b6691c0f..ac944acc066 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -130,11 +130,11 @@ $formproject = new FormProjets($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = moPrepareHead($object); @@ -153,7 +153,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { @@ -209,7 +209,7 @@ if ($object->id > 0) { if (get_class($objthirdparty) == 'Societe') { $out .= '&socid='.$objthirdparty->id; } - $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage=1&percentage=-1'; + $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'&percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); //$out.=""; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index b7d3f86b9e7..aa3381c1242 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -16,11 +16,12 @@ */ /** - * \file mo_card.php - * \ingroup mrp - * \brief Page to create/edit/view mo + * \file htdocs/mrp/mo_card.php + * \ingroup mrp + * \brief Page to create/edit/view MO Manufacturing Order */ + // Load Dolibarr environment require '../main.inc.php'; @@ -35,7 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("mrp", "other")); +$langs->loadLangs(array('mrp', 'other')); + // Get parameters $id = GETPOST('id', 'int'); @@ -47,7 +49,8 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'moc $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $TBomLineId = GETPOST('bomlineid', 'array'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); +$socid = GETPOST("socid", 'int'); // Initialize technical objects $object = new Mo($db); @@ -97,6 +100,7 @@ if (GETPOST('fk_bom', 'int') > 0) { $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'rowid', $isdraft); +// Permissions $permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->mrp->write; // Used by the include of actions_dellink.inc.php $permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php @@ -133,7 +137,7 @@ if (empty($reshook)) { } $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record - //Create MO with Childs + // Create MO with Childs if ($action == 'add' && empty($id) && !empty($TBomLineId)) { $noback = 1; include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; @@ -162,7 +166,7 @@ if (empty($reshook)) { $res = $object->add_object_linked('mo', $mo_parent->id); } - header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.$moline->fk_mo, 1)); + header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.((int) $moline->fk_mo), 1)); exit; } @@ -202,10 +206,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -424,7 +428,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } $text = $langs->trans('ConfirmValidateMo', $numref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -433,7 +437,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); - if (!empty($conf->mrp->enabled)) { + if (isModEnabled('mrp')) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -484,7 +488,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= $langs->trans('ThirdParty').' '; $morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { @@ -675,7 +679,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''; + print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : "").'&action=clone&object=mo', 'clone', $permissiontoadd); } // Cancel - Reopen @@ -700,12 +704,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print ''."\n"; } @@ -726,7 +726,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $filedir = $conf->mrp->dir_output.'/'.$objref; $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card + $delallowed = $user->hasRight("mrp", "creer"); // If you can create/edit, you can remove a file on card print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); // Show links to link elements diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index 810ea7c3200..4e8808012e1 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -131,7 +131,7 @@ if ($object->id) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index eacd731237c..1a00a2dc052 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -123,7 +123,7 @@ foreach ($object->fields as $key => $val) { $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( 'label'=>$val['label'], - 'checked'=>(($visible < 0) ? 0 : 1), + 'checked'=>(($visible <= 0) ? 0 : 1), 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' @@ -229,6 +229,9 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; @@ -302,7 +305,7 @@ foreach($object->fields as $key => $val) { $sql .= "t.".$key.", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.", " : ""); } @@ -314,35 +317,41 @@ $sql.=$hookmanager->resPrint; $sql=preg_replace('/,\s*$/','', $sql); */ -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $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 && !$page) { $obj = $db->fetch_object($resql); @@ -453,7 +462,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // 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 @@ -463,6 +472,13 @@ print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -508,16 +524,22 @@ $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 ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -542,7 +564,9 @@ $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} print ''."\n"; @@ -573,6 +597,18 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Show here line of result print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { @@ -630,15 +666,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) { $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 1384852ace8..2f3ed1f2d2b 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -47,7 +47,8 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mostockmovement'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$massaction = GETPOST('massaction', 'aZ09'); +$lineid = GETPOST('lineid', 'int'); $msid = GETPOST('msid', 'int'); $year = GETPOST("year", 'int'); @@ -119,9 +120,9 @@ $arrayfields = array( 'm.datem'=>array('label'=>"Date", 'checked'=>1, 'position'=>2), 'p.ref'=>array('label'=>"ProductRef", 'checked'=>1, 'css'=>'maxwidth100', 'position'=>3), 'p.label'=>array('label'=>"ProductLabel", 'checked'=>0, 'position'=>5), - 'm.batch'=>array('label'=>"BatchNumberShort", 'checked'=>1, 'position'=>8, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'pl.eatby'=>array('label'=>"EatByDate", 'checked'=>0, 'position'=>9, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'pl.sellby'=>array('label'=>"SellByDate", 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'm.batch'=>array('label'=>"BatchNumberShort", 'checked'=>1, 'position'=>8, 'enabled'=>(isModEnabled('productbatch'))), + 'pl.eatby'=>array('label'=>"EatByDate", 'checked'=>0, 'position'=>9, 'enabled'=>(isModEnabled('productbatch'))), + 'pl.sellby'=>array('label'=>"SellByDate", 'checked'=>0, 'position'=>10, 'enabled'=>(isModEnabled('productbatch'))), 'e.ref'=>array('label'=>"Warehouse", 'checked'=>1, 'position'=>100, 'enabled'=>(!($id > 0))), // If we are on specific warehouse, we hide it 'm.fk_user_author'=>array('label'=>"Author", 'checked'=>0, 'position'=>120), 'm.inventorycode'=>array('label'=>"InventoryCodeShort", 'checked'=>1, 'position'=>130), @@ -327,7 +328,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { @@ -605,7 +606,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!empty($arrayfields['m.datem']['checked'])) { print ''; } + + // Split + print ''; + + // SplitAll + print ''; + print ''; if ($action == 'addconsumeline') { @@ -850,7 +862,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; - print ''; + print ''; // Product print ''; } + + // Split + print ''; + + // Split All + print ''; + print ''; // Show detailed of already consumed with js code to collapse @@ -995,7 +1014,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { $i = 1; print ''."\n"; - print ''; + $maxQty = 1; + print ''; // Ref print ''; $preselected = (GETPOSTISSET('qty-'.$line->id.'-'.$i) ? GETPOST('qty-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyconsumed)); @@ -1050,7 +1070,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $formproduct->selectLotDataList('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', ''); $type = 'batch'; + print ''; + print ''; } print ''; } @@ -1128,6 +1153,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; + + // Split All + print ''; } print ''; print ''; @@ -1299,13 +1330,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } print ''; print ''; + + // Split + print ''; + + // Split All + print ''; } print ''; } if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { print ''."\n"; - print ''; + $maxQty = 1; + print ''; print ''; $preselected = (GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i) ? GETPOST('qtytoproduce-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyproduced)); if ($action == 'consumeorproduce' && !GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i)) { @@ -1360,7 +1398,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; + + print ''; } print ''; } diff --git a/htdocs/mrp/tpl/linkedobjectblock.tpl.php b/htdocs/mrp/tpl/linkedobjectblock.tpl.php index dfa6d9797c2..84ca487b771 100644 --- a/htdocs/mrp/tpl/linkedobjectblock.tpl.php +++ b/htdocs/mrp/tpl/linkedobjectblock.tpl.php @@ -26,7 +26,7 @@ if (empty($conf) || !is_object($conf)) { print "\n"; -global $user, $db; +global $user, $db, $hookmanager; global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; @@ -44,41 +44,45 @@ if ($object->element == 'mo') { $res = $mo_static->fetch($object->id); $TMoChilds = $mo_static->getMoChilds(); + $hookmanager->initHooks('LinesLinkedObjectBlock'); + $parameters = array('TMoChilds' => $TMoChilds); + $reshook = $hookmanager->executeHooks('LinesLinkedObjectBlock', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { + foreach ($TMoChilds as $key => $objectlink) { + $ilink++; - foreach ($TMoChilds as $key => $objectlink) { - $ilink++; + $trclass = 'oddeven'; - $trclass = 'oddeven'; + echo ''; + echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo "\n"; } - echo ''; - echo ''; - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo "\n"; } } else { $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); diff --git a/htdocs/mrp/tpl/originproductline.tpl.php b/htdocs/mrp/tpl/originproductline.tpl.php index 7e0468119bd..bd4ecbc4cd4 100644 --- a/htdocs/mrp/tpl/originproductline.tpl.php +++ b/htdocs/mrp/tpl/originproductline.tpl.php @@ -28,7 +28,7 @@ if (!empty($form) && !is_object($form)) { $form = new Form($db); } -$qtytoconsumeforline = $this->tpl['qty'] / ( ! empty($this->tpl['efficiency']) ? $this->tpl['efficiency'] : 1 ); +$qtytoconsumeforline = $this->tpl['qty'] / ( !empty($this->tpl['efficiency']) ? $this->tpl['efficiency'] : 1 ); /*if ((empty($this->tpl['qty_frozen']) && $this->tpl['qty_bom'] > 1)) { $qtytoconsumeforline = $qtytoconsumeforline / $this->tpl['qty_bom']; }*/ diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 91dc0bce0ad..03e5e09334a 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -23,22 +23,25 @@ * 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 . + * along with this program. If not, see . */ /** - * \file htdocs/multicurrency/multicurrency_rate.php - * \ingroup multicurrency - * \brief Page to list multicurrency rate + * \file htdocs/multicurrency/multicurrency_rate.php + * \ingroup multicurrency + * \brief Page to list multicurrency rate */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; + // Load translation files required by the page $langs->loadLangs(array('multicurrency')); +// Get Parameters $action = GETPOST('action', 'alpha'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); @@ -69,12 +72,13 @@ if (!$sortfield) $sortfield = "cr.date_sync"; if (!$sortorder) $sortorder = "DESC"; -// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks +// Initialize technical objects $object = new CurrencyRate($db); - -$extrafields = new ExtraFields($db); $form = new Form($db); +$extrafields = new ExtraFields($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks $hookmanager->initHooks(array('EditorRatelist', 'globallist')); if (empty($action)) { @@ -102,7 +106,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); // Access control // TODO Open this page to a given permission so a sale representative can modify change rates. Permission should be added into module multicurrency. // One permission to read rates (history) and one to add/edit rates. -if (!$user->admin || empty($conf->multicurrency->enabled)) { +if (!$user->admin || !isModEnabled("multicurrency")) { accessforbidden(); } @@ -231,8 +235,8 @@ if (empty($reshook)) { // Mass actions $objectclass = "CurrencyRate"; $uploaddir = $conf->multicurrency->multidir_output; // define only because core/actions_massactions.inc.php want it - $permtoread = $user->admin; - $permtodelete = $user->admin; + $permissiontoread = $user->admin; + $permissiontodelete = $user->admin; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -506,7 +510,7 @@ if ($resql) { } // code - if (! empty($arrayfields['m.code']['checked'])) { + if (!empty($arrayfields['m.code']['checked'])) { print '\n"; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 20985a52647..36c5b2ea07d 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -18,15 +18,16 @@ */ /** - * \file htdocs/opensurvey/card.php - * \ingroup opensurvey - * \brief Page to edit survey + * \file htdocs/opensurvey/card.php + * \ingroup opensurvey + * \brief Page to edit survey */ +// Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT."/core/class/doleditor.class.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/class/doleditor.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/lib/opensurvey.lib.php"; @@ -36,7 +37,7 @@ if (empty($user->rights->opensurvey->read)) { accessforbidden(); } -// Initialisation des variables +// Initialize Variables $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); @@ -46,6 +47,7 @@ if (GETPOST('id')) { $numsondage = (string) GETPOST('id', 'alpha'); } +// Initialize objects $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); @@ -59,6 +61,10 @@ $hookmanager->initHooks(array('surveycard', 'globalcard')); $expiredate = dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GETPOST('expireyear')); +$permissiontoread = $user->rights->opensurvey->read; +$permissiontoadd = $user->rights->opensurvey->write; +// permission delete doesn't exists +$permissiontodelete = $user->rights->opensurvey->write; /* @@ -203,7 +209,7 @@ $toutsujet = explode(",", $object->sujet); $listofanswers = array(); foreach ($toutsujet as $value) { $tmp = explode('@', $value); - $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); + $listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox')); } $toutsujet = str_replace("@", "
    ", $toutsujet); $toutsujet = str_replace("°", "'", $toutsujet); @@ -362,26 +368,25 @@ print ''."\n"; -/* - * Action bar - */ +// Action bar + print '
    '; if ($action != 'edit' && $user->rights->opensurvey->write) { - //Modify button + // Modify button print ''.$langs->trans("Modify").''; if ($object->status == Opensurveysondage::STATUS_VALIDATED) { - //Close button + // Close button print ''.$langs->trans("Close").''; } if ($object->status == Opensurveysondage::STATUS_CLOSED) { - //Opened button + // Re-Open print ''.$langs->trans("ReOpen").''; } - //Delete button - print ''.$langs->trans('Delete').''; + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?suppressionsondage=1&id='.urlencode($numsondage).'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print '
    '; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index cae73d0c2b2..2014e57f629 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -274,7 +274,7 @@ class Opensurveysondage extends CommonObject $this->sujet = $obj->sujet; $this->fk_user_creat = $obj->fk_user_creat; - $this->date_m = $this->db->jdate($obj->tls); + $this->date_m = $this->db->jdate(!empty($obj->tls) ? $obj->tls : ""); $ret = 1; } else { $sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey); @@ -571,12 +571,14 @@ class Opensurveysondage extends CommonObject * * @param string $comment Comment content * @param string $comment_user Comment author + * @param string $user_ip Comment author IP * @return boolean False in case of the query fails, true if it was successful */ - public function addComment($comment, $comment_user) + public function addComment($comment, $comment_user, $user_ip = '') { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; - $sql .= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; + $now = dol_now(); + $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment, date_creation, ip)"; + $sql .= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."','".$this->db->idate($now)."'".($user_ip ? ",'".$this->db->escape($user_ip)."'" : '').")"; $resql = $this->db->query($sql); if (!$resql) { @@ -685,7 +687,7 @@ class Opensurveysondage extends CommonObject { $result = 0; - $sql .= " SELECT COUNT(id_users) as nb FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; + $sql = " SELECT COUNT(id_users) as nb FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " WHERE id_sondage = '".$this->db->escape($this->ref)."'"; $resql = $this->db->query($sql); diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 76e4ffd9023..a8a231787c3 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2013 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,23 +17,26 @@ */ /** - * \file htdocs/opensurvey/exportcsv.php - * \ingroup opensurvey - * \brief Page to list surveys + * \file htdocs/opensurvey/exportcsv.php + * \ingroup opensurvey + * \brief Page to list surveys */ +// Load Dolibarr environment 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."/opensurvey/class/opensurveysondage.class.php"; + $action = GETPOST('action', 'aZ09'); $numsondage = ''; if (GETPOST('id')) { $numsondage = GETPOST("id", 'alpha'); } +// Initialize Objects $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); if ($result <= 0) { @@ -60,9 +63,9 @@ $now = dol_now(); $nbcolonnes = substr_count($object->sujet, ',') + 1; $toutsujet = explode(",", $object->sujet); - +$somme = array(); // affichage des sujets du sondage -$input .= $langs->trans("Name").";"; +$input = $langs->trans("Name").";"; for ($i = 0; $toutsujet[$i]; $i++) { if ($object->format == "D") { $input .= ''.dol_print_date($toutsujet[$i], 'dayhour').';'; @@ -102,15 +105,18 @@ if ($resql) { //affichage des resultats $ensemblereponses = $obj->reponses; for ($k = 0; $k < $nbcolonnes; $k++) { + if (empty($somme[$k])) { + $somme[$k] = 0; + } $car = substr($ensemblereponses, $k, 1); if ($car == "1") { $input .= 'OK;'; $somme[$k]++; } elseif ($car == "2") { - $input .= 'KO;'; + $input .= ';'; $somme[$k]++; } else { - $input .= ';'; + $input .= 'KO;'; } } diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index ba608723816..35e2b013525 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -23,6 +23,7 @@ * \brief Home page of opensurvey area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 0e22c524529..5700909cd91 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -22,6 +22,7 @@ * \brief Page to list surveys */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; @@ -39,6 +40,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'opensurveylist'; // 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') +$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $id = GETPOST('id', 'alpha'); $search_ref = GETPOST('search_ref', 'alpha'); @@ -174,16 +176,16 @@ $sql .= " WHERE p.entity IN (".getEntity('survey').")"; if ($search_status != '-1' && $search_status != '') { $sql .= natural_search("p.status", $search_status, 2); } -if ($search_expired == 'expired') { +if (!empty($search_expired) && $search_expired == 'expired') { $sql .= " AND p.date_fin < '".$db->idate($now)."'"; } -if ($search_expired == 'opened') { +if (!empty($search_expired) && $search_expired == 'opened') { $sql .= " AND p.date_fin >= '".$db->idate($now)."'"; } -if ($search_ref) { +if (!empty($search_ref)) { $sql .= natural_search("p.id_sondage", $search_ref); } -if ($search_title) { +if (!empty($search_title)) { $sql .= natural_search("p.titre", $search_title); } // Add where from extra fields @@ -326,6 +328,13 @@ print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + 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($object->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print ''; print ''; - if (empty($conf->productbatch->enabled)) { + if (!isModEnabled('productbatch')) { print ' '; } //else print '
    '; @@ -808,7 +809,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $objp = $db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { // If multilang is enabled + if (getDolGlobalInt('MAIN_MULTILANGS')) { // If multilang is enabled // TODO Use a cache here $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 865b3bf38ce..031018d0daa 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -107,7 +107,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index c86fcb1f926..7bff43bfc7b 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -174,6 +174,8 @@ if (empty($reshook)) { } $action = ''; + // Redirect to refresh the tab information + header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); } if (in_array($action, array('confirm_consumeorproduce', 'confirm_consumeandproduceall')) && $permissiontoproduce) { @@ -218,7 +220,7 @@ if (empty($reshook)) { if ($qtytoprocess >= 0) { $idstockmove = $stockmove->livraison($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); } else { - $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); + $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess * -1, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); } if ($idstockmove < 0) { $error++; @@ -257,6 +259,7 @@ if (empty($reshook)) { // Process line to produce $pos = 0; + foreach ($object->lines as $line) { if ($line->role == 'toproduce') { $tmpproduct = new Product($db); @@ -275,7 +278,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref), null, 'errors'); $error++; } - if (!empty($conf->productbatch->enabled) && $tmpproduct->status_batch && (!GETPOST('batchtoproduce-'.$line->id.'-'.$i))) { + if (isModEnabled('productbatch') && $tmpproduct->status_batch && (!GETPOST('batchtoproduce-'.$line->id.'-'.$i))) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref), null, 'errors'); $error++; @@ -393,10 +396,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -430,6 +433,8 @@ $tmpstockmovement = new MouvementStock($db); $help_url = 'EN:Module_Manufacturing_Orders|FR:Module_Ordres_de_Fabrication'; llxHeader('', $langs->trans('Mo'), $help_url, '', 0, 0, array('/mrp/js/lib_dispatch.js.php')); +$newToken = newToken(); + // Part to show record if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_thirdparty(); @@ -468,7 +473,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } $text = $langs->trans('ConfirmValidateMo', $numref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -477,7 +482,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); - if (!empty($conf->mrp->enabled)) { + if (isModEnabled('mrp')) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -520,7 +525,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; if ($permissiontoadd) { @@ -588,7 +593,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($object->status == $object::STATUS_DRAFT) { if ($permissiontoadd) { if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { - print ''.$langs->trans("Validate").''; + print ''.$langs->trans("Validate").''; } else { $langs->load("errors"); print ''.$langs->trans("Validate").''; @@ -599,7 +604,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Consume or produce if ($object->status == Mo::STATUS_VALIDATED || $object->status == Mo::STATUS_INPROGRESS) { if ($permissiontoproduce) { - print ''.$langs->trans('ConsumeOrProduce').''; + print ''.$langs->trans('ConsumeOrProduce').''; } else { print ''.$langs->trans('ConsumeOrProduce').''; } @@ -610,7 +615,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // ConsumeAndProduceAll if ($object->status == Mo::STATUS_VALIDATED || $object->status == Mo::STATUS_INPROGRESS) { if ($permissiontoproduce) { - print ''.$langs->trans('ConsumeAndProduceAll').''; + print ''.$langs->trans('ConsumeAndProduceAll').''; } else { print ''.$langs->trans('ConsumeAndProduceAll').''; } @@ -627,21 +632,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $nbProduced += $lineproduced['qty']; } if ($nbProduced > 0) { // If production has started, we can close it - print ''.$langs->trans("Close").''."\n"; + print ''.$langs->trans("Close").''."\n"; } else { print 'transnoentitiesnoconv("Production")).'">'.$langs->trans("Close").''."\n"; } - print ''.$langs->trans("Cancel").''."\n"; + print ''.$langs->trans("Cancel").''."\n"; } if ($object->status == $object::STATUS_CANCELED) { - print ''.$langs->trans("Re-Open").''."\n"; + print ''.$langs->trans("Re-Open").''."\n"; } if ($object->status == $object::STATUS_PRODUCED) { if ($permissiontoproduce) { - print ''.$langs->trans('ReOpen').''; + print ''.$langs->trans('ReOpen').''; } else { print ''.$langs->trans('ReOpen').''; } @@ -766,6 +771,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($permissiontodelete) { print '
    '.$tmpproduct->getNomUrl(1); print '
    '.$tmpproduct->label.''; @@ -930,6 +942,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print '
    '.$langs->trans("ToConsume").''; print ' '.img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.((int) $line->id).', \''.dol_escape_js($type).'\', \'qtymissingconsume\')"'); + print ''; + if (($action == 'consumeorproduce' || $action == 'consumeandproduceall') && $tmpproduct->status_batch == 2) print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" data-max-qty="1" onClick="addDispatchLine('.$line->id.', \'batch\', \'allmissingconsume\')"'); + print ''; if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { print $langs->trans("Batch"); + + // Split + print '
    '.$langs->trans("ToProduce").''; if ($tmpproduct->status_batch) { $type = 'batch'; + print ''; print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$line->id.', \''.$type.'\', \'qtymissing\')"'); + print ''; + if (($action == 'consumeorproduce' || $action == 'consumeandproduceall') && $tmpproduct->status_batch == 2) print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" onClick="addDispatchLine('.$line->id.', \'batch\', \'alltoproduce\')"'); // + print '
    ' . $langs->trans("ManufacturingOrder"); + if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + print ' '; + echo '' . $objectlink->getNomUrl(1) . '
    ' . $langs->trans("ManufacturingOrder"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { - print ' '; + // $result = $product_static->fetch($objectlink->fk_product); + print '' . dol_print_date($objectlink->date_creation, 'day') . '-' . $objectlink->getLibStatut(3) . ''; + + // we want to make the link via element_element for delete action + $sql = " Select rowid from " . MAIN_DB_PREFIX . "element_element"; + $sql .= " WHERE fk_source = " . (int) $object->id . " and fk_target = '" . dol_escape_htmltag($key) . "'"; + + $resql = $db->query($sql); + $k = 0; + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj->rowid && $obj->rowid > 0) $k = $obj->rowid; + } + echo '' . img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink') . ''; + echo '
    ' . $objectlink->getNomUrl(1) . ''; - // $result = $product_static->fetch($objectlink->fk_product); - print '' . dol_print_date($objectlink->date_creation, 'day') . '-' . $objectlink->getLibStatut(3) . ''; - - // we want to make the link via element_element for delete action - $sql = " Select rowid from " . MAIN_DB_PREFIX . "element_element"; - $sql .= " WHERE fk_source = " . (int) $object->id . " and fk_target = '" . dol_escape_htmltag($key) . "'"; - - $resql = $db->query($sql); - $k = 0; - if ($resql) { - $obj = $db->fetch_object($resql); - if ($obj->rowid && $obj->rowid > 0) $k = $obj->rowid; - } - echo '' . img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink') . ''; - echo '
    '; print $obj->code; print ' - '.$obj->name.''; @@ -516,7 +520,7 @@ if ($resql) { } // rate - if (! empty($arrayfields['cr.rate']['checked'])) { + if (!empty($arrayfields['cr.rate']['checked'])) { print ''; print $obj->rate; print "
    '; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''; print ''; print ''; @@ -334,7 +343,7 @@ print ''; print ''; print ''; $arraystatus = array('-1'=>' ', '0'=>$langs->trans("Draft"), '1'=>$langs->trans("Opened"), '2'=>$langs->trans("Closed")); -print ''; +print ''; // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -343,16 +352,22 @@ $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 ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +} print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.id_sondage", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "p.titre", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "p.format", $param, "", "", $sortfield, $sortorder); @@ -368,7 +383,9 @@ $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +} print ''."\n"; @@ -401,7 +418,18 @@ while ($i < min($num, $limit)) { // Show here line of result print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } // Ref print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 610d690944b..d8405c31027 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -23,6 +23,7 @@ * \brief Page to preview votes of a survey */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; @@ -434,7 +435,7 @@ $toutsujet = explode(",", $object->sujet); $listofanswers = array(); foreach ($toutsujet as $value) { $tmp = explode('@', $value); - $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); + $listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox')); } $toutsujet = str_replace("@", "
    ", $toutsujet); $toutsujet = str_replace("°", "'", $toutsujet); @@ -700,34 +701,10 @@ if ($object->format == "D") { $colspan = 1; $nbofsujet = count($toutsujet); for ($i = 0; $i < $nbofsujet; $i++) { - $current = $toutsujet[$i]; - - if (strpos($toutsujet[$i], '@') !== false) { - $current = substr($toutsujet[$i], 0, strpos($toutsujet[$i], '@')); - } - - if (isset($toutsujet[$i + 1]) && strpos($toutsujet[$i + 1], '@') !== false) { - $next = substr($toutsujet[$i + 1], 0, strpos($toutsujet[$i + 1], '@')); - } elseif (isset($toutsujet[$i + 1])) { - $next = $toutsujet[$i + 1]; - } - - $currenty = 0; - if ($current) { - $currenty = strftime("%Y", $current); - } - $next = 0; - if ($next) { - $nexty = strftime("%Y", $next); - } - if (isset($toutsujet[$i + 1]) && ($currenty == $nexty)) { + if (isset($toutsujet[$i + 1]) && date('Y', intval($toutsujet[$i])) == date('Y', intval($toutsujet[$i + 1]))) { $colspan++; } else { - print ''."\n"; + print ''."\n"; $colspan = 1; } } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index be9396646d5..bbc13d5d36b 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -22,6 +22,7 @@ * \brief Page to create a new survey (choice selection) */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index dcf0bc436b3..d8f89b18e16 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -22,6 +22,7 @@ * \brief Page to create a new survey (date selection) */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; @@ -36,6 +37,7 @@ if (!$user->rights->opensurvey->write) { $_SESSION["formatsondage"] = "D"; $erreur = false; +$erreurNbchoice = 0; /* * Actions @@ -48,114 +50,120 @@ if (GETPOST('confirmation')) { $nbofchoice = count($_SESSION["totalchoixjour"]); $errheure = array(); - for ($i = 0; $i < $nbofchoice; $i++) { - // Show hours choices - for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { - $horairesi = GETPOST("horaires".$i); - $_SESSION["horaires$i"][$j] = $horairesi[$j]; - - $tmphorairesi = GETPOST('horaires'.$i, 'array'); - - if (!is_array($tmphorairesi)) { - $errheure[$i][$j] = true; - $erreur = true; - continue; - } - - // A range like 8:00-11:00 - $creneaux = array(); - $heures = array(); - if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $tmphorairesi[$j], $creneaux)) { - //on recupere les deux parties du preg_match qu'on redécoupe autour des ":" - $debutcreneau = explode(":", $creneaux[1]); - $fincreneau = explode(":", $creneaux[2]); - - //comparaison des heures de fin et de debut - //si correctes, on entre les données dans la variables de session - if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { - $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $tmphorairesi[$j], $creneaux)) { //si c'est un creneau type 8h00-11h00 - //on recupere les deux parties du preg_match qu'on redécoupe autour des "H" - $debutcreneau = preg_split("/h/i", $creneaux[1]); - $fincreneau = preg_split("/h/i", $creneaux[2]); - - //comparaison des heures de fin et de debut - //si correctes, on entre les données dans la variables de session - if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { - $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $tmphorairesi[$j], $heures)) { //si c'est une heure simple type 8:00 - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < 24 && $heures[2] < 60) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $tmphorairesi[$j], $heures)) { //si c'est une heure encore plus simple type 8h - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < 24 && $heures[2] < 60) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $tmphorairesi[$j], $heures)) { //si c'est un creneau simple type 8-11 - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $tmphorairesi[$j], $heures)) { //si c'est un creneau H type 8h-11h - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j] = true; - $erreur = true; - } - } elseif ($tmphorairesi[$j] == "") { //Si la case est vide - unset($_SESSION["horaires$i"][$j]); - } else { //pour tout autre format, message d'erreur - $errheure[$i][$j] = true; - $erreur = true; - } - - if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) { - if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) { - $_SESSION["horaires$i"][$j] = ''; - } else { - $_SESSION["horaires$i"] = array(); - $_SESSION["horaires$i"][$j] = ''; - } - } - } - - if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") { - $choixdate .= ","; - $choixdate .= $_SESSION["totalchoixjour"][$i]; - } else { + if ($nbofchoice * $_SESSION["nbrecaseshoraires"] > 200) { + setEventMessages($langs->trans("ErrorFieldTooLong"), null, 'errors'); + $erreurNb++; + } else { + for ($i = 0; $i < $nbofchoice; $i++) { + // Show hours choices for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { - if ($_SESSION["horaires$i"][$j] != "") { - $choixdate .= ","; - $choixdate .= $_SESSION["totalchoixjour"][$i]; - $choixdate .= "@"; - // On remplace la virgule et l'arobase pour ne pas avoir de problème par la suite - $choixdate .= str_replace(array(',', '@'), array(',', '@'), $_SESSION["horaires$i"][$j]); + $horairesi = GETPOST("horaires".$i); + $_SESSION["horaires$i"][$j] = $horairesi[$j]; + + $tmphorairesi = GETPOST('horaires'.$i, 'array'); + + if (!is_array($tmphorairesi)) { + $errheure[$i][$j] = true; + $erreur = true; + continue; + } + + // A range like 8:00-11:00 + $creneaux = array(); + $heures = array(); + if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $tmphorairesi[$j], $creneaux)) { + //on recupere les deux parties du preg_match qu'on redécoupe autour des ":" + $debutcreneau = explode(":", $creneaux[1]); + $fincreneau = explode(":", $creneaux[2]); + + //comparaison des heures de fin et de debut + //si correctes, on entre les données dans la variables de session + if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { + $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $tmphorairesi[$j], $creneaux)) { //si c'est un creneau type 8h00-11h00 + //on recupere les deux parties du preg_match qu'on redécoupe autour des "H" + $debutcreneau = preg_split("/h/i", $creneaux[1]); + $fincreneau = preg_split("/h/i", $creneaux[2]); + + //comparaison des heures de fin et de debut + //si correctes, on entre les données dans la variables de session + if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { + $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $tmphorairesi[$j], $heures)) { //si c'est une heure simple type 8:00 + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < 24 && $heures[2] < 60) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $tmphorairesi[$j], $heures)) { //si c'est une heure encore plus simple type 8h + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < 24 && $heures[2] < 60) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $tmphorairesi[$j], $heures)) { //si c'est un creneau simple type 8-11 + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $tmphorairesi[$j], $heures)) { //si c'est un creneau H type 8h-11h + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j] = true; + $erreur = true; + } + } elseif ($tmphorairesi[$j] == "") { //Si la case est vide + unset($_SESSION["horaires$i"][$j]); + } else { //pour tout autre format, message d'erreur + $errheure[$i][$j] = true; + $erreur = true; + } + + if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) { + if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) { + $_SESSION["horaires$i"][$j] = ''; + } else { + $_SESSION["horaires$i"] = array(); + $_SESSION["horaires$i"][$j] = ''; + } + } + } + + if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") { + $choixdate .= ","; + $choixdate .= $_SESSION["totalchoixjour"][$i]; + } else { + for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { + if ($_SESSION["horaires$i"][$j] != "") { + $choixdate .= ","; + $choixdate .= $_SESSION["totalchoixjour"][$i]; + $choixdate .= "@"; + // On remplace la virgule et l'arobase pour ne pas avoir de problème par la suite + $choixdate .= str_replace(array(',', '@'), array(',', '@'), $_SESSION["horaires$i"][$j]); + } } } } } + if (!empty($errheure)) { setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors'); } @@ -169,7 +177,7 @@ if (GETPOST('confirmation')) { } // Add survey into database - if (!$erreur) { + if (!$erreur && $erreurNb == 0) { $_SESSION["toutchoix"] = substr("$choixdate", 1); ajouter_sondage(); diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index d35e7b3f5d9..48e6b56c0af 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -24,6 +24,7 @@ * \brief Page to create a new survey */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; diff --git a/htdocs/opensurvey/wizard/index.php b/htdocs/opensurvey/wizard/index.php index e55385e33a4..b8ccd0d8588 100644 --- a/htdocs/opensurvey/wizard/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -23,6 +23,7 @@ if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/partnership/admin/partnership_extrafields.php b/htdocs/partnership/admin/partnership_extrafields.php index 6406285777e..b96ea51a096 100644 --- a/htdocs/partnership/admin/partnership_extrafields.php +++ b/htdocs/partnership/admin/partnership_extrafields.php @@ -86,14 +86,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/partnership/admin/website.php b/htdocs/partnership/admin/website.php index 49fd7ff91df..717783f68d9 100644 --- a/htdocs/partnership/admin/website.php +++ b/htdocs/partnership/admin/website.php @@ -24,6 +24,7 @@ * \brief File of main public page for partnership module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -174,13 +175,6 @@ if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { print ''; print "\n"; - // Can edit - print '\n"; - // Jump to an online payment page print ''."\n"; $needToFetchEachLine = 0; if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) { foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) { - if (preg_match('/\$object/', $val)) { + if ($val && preg_match('/\$object/', $val)) { $needToFetchEachLine++; // There is at least one compute field that use $object } } diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index 3bd2b913163..a38fdc65ade 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -103,7 +103,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -124,7 +124,7 @@ if ($id > 0 || !empty($ref)) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 710cef4f25c..9b3a2a74fd1 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -23,6 +23,7 @@ * \brief Page to setup paybox module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -226,7 +227,7 @@ print '
    '.$langs->trans("Example").': '.$mysoc->n print ''; -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { print ''; -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { print '\n"; } else { $disabled = false; - if (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] == $conf->entity) ? false : true) { + if (isModEnabled('multicompany') && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] == $conf->entity) ? false : true) { } print ''; print ''; // Rule for price print ''; -if (empty($conf->multicompany->enabled)) { +if (!isModEnabled('multicompany')) { print ''; } else { print ''; @@ -597,7 +602,7 @@ print ''; print ''; // Use conditionnement in buying -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { print ''; print ''; print ''; print ''; print ''; print ''; print ''; @@ -715,7 +721,7 @@ print ''; */ // View product description in thirdparty language -if (!empty($conf->global->MAIN_MULTILANGS)) { +if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''; print ''; print ' -stock->enabled)) { ?> + diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index b21355c1c21..be4d4099d9b 100644 --- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php @@ -42,7 +42,7 @@ dol_htmloutput_errors($object->error, $object->errors); -stock->enabled)) { ?> + @@ -69,7 +69,7 @@ dol_htmloutput_errors($object->error, $object->errors); -stock->enabled)) { ?> + diff --git a/htdocs/product/card.php b/htdocs/product/card.php index b645ea02811..173c96fd297 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -19,6 +19,7 @@ * Copyright (C) 2019-2022 Frédéric France * Copyright (C) 2019-2020 Thibault FOUCART * Copyright (C) 2020 Pierre Ardoin + * Copyright (C) 2022 Vincent de Grandpré * * 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 @@ -40,46 +41,49 @@ * \brief Page to show product */ + +// Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled('propal')) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } if (isModEnabled('facture')) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; } -if (!empty($conf->bom->enabled)) { +if (isModEnabled('bom')) { require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; } // Load translation files required by the page $langs->loadLangs(array('products', 'other')); -if (!empty($conf->stock->enabled)) { +if (isModEnabled('stock')) { $langs->load("stocks"); } if (isModEnabled('facture')) { $langs->load("bills"); } -if (!empty($conf->productbatch->enabled)) { +if (isModEnabled('productbatch')) { $langs->load("productbatch"); } @@ -87,7 +91,8 @@ $mesg = ''; $error = 0; $errors = array(); $refalreadyexists = 0; -$id = GETPOST('id', 'int'); +// Get parameters +$id = GETPOST('id', 'int'); $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'alpha') : null); $type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT); $action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'); @@ -106,6 +111,7 @@ $accountancy_code_buy_intra = GETPOST('accountancy_code_buy_intra', 'alpha'); $accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha'); $checkmandatory = GETPOST('accountancy_code_buy_export', 'alpha'); + // by default 'alphanohtml' (better security); hidden conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML allows basic html $label_security_check = empty($conf->global->MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML) ? 'alphanohtml' : 'restricthtml'; @@ -135,14 +141,14 @@ if ($id > 0 || !empty($ref)) { if ($result < 0) { dol_print_error($db, $object->error, $object->errors); } - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); } - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { // For backward compatiblity, we scan also old dirs - if (!empty($conf->product->enabled)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { // For backward compatiblity, we scan also old dirs + if (isModEnabled("product")) { $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; } else { $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; @@ -179,7 +185,8 @@ if ($object->id > 0) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('productcard', 'globalcard')); -$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); +// Permissions +$usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); $usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); $usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)); @@ -552,6 +559,7 @@ if (empty($reshook)) { $object->duration_value = $duration_value; $object->duration_unit = $duration_unit; $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); + $object->fk_default_workstation = GETPOST('fk_default_workstation'); $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ?GETPOST('seuil_stock_alerte') : 0; $object->desiredstock = GETPOST('desiredstock') ?GETPOST('desiredstock') : 0; $object->canvas = GETPOST('canvas'); @@ -666,7 +674,20 @@ if (empty($reshook)) { if (count($object->errors)) { setEventMessages($object->error, $object->errors, 'errors'); } else { - setEventMessages($langs->trans($object->error), null, 'errors'); + if ($object->error == 'ErrorProductAlreadyExists') { + // allow to hook on ErrorProductAlreadyExists in any module + $reshook = $hookmanager->executeHooks('onProductAlreadyExists', $parameters, $object, $action); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } + if ($object->error) { + // check again to prevent translation issue, + // as error may have been cleared in hook function + setEventMessages($langs->trans($object->error), null, 'errors'); + } + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + } } $action = "create"; } @@ -704,6 +725,7 @@ if (empty($reshook)) { $object->status_batch = GETPOST('status_batch', 'aZ09'); $object->batch_mask = GETPOST('batch_mask', 'alpha'); $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); + $object->fk_default_workstation = GETPOST('fk_default_workstation'); // removed from update view so GETPOST always empty /* $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); @@ -1017,7 +1039,7 @@ if (empty($reshook)) { $filter = array('t.fk_product' => $object->id, 't.fk_soc' => $soc->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result) { if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines [0]->price); @@ -1184,28 +1206,37 @@ $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); $formcompany = new FormCompany($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } $title = $langs->trans('ProductServiceCard'); + $help_url = ''; $shortlabel = dol_trunc($object->label, 16); if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { - $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; + if ($action == 'create') { + $title = $langs->trans("NewProduct"); + } else { + $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; + } } if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { - $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; + if ($action == 'create') { + $title = $langs->trans("NewService"); + } else { + $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; + } } llxHeader('', $title, $help_url); // Load object modBarCodeProduct $res = 0; -if (!empty($conf->barcode->enabled) && !empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { +if (isModEnabled('barcode') && !empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM); $dirbarcode = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); foreach ($dirbarcode as $dirroot) { @@ -1326,7 +1357,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Batch number management - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print '"; if (empty($conf->global->PRODUCT_DISABLE_PUBLIC_URL)) { @@ -1427,7 +1456,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; } - if ($type != 1 && !empty($conf->stock->enabled)) { + if ($type != 1 && isModEnabled('stock')) { // Default warehouse print ''; + } + // Duration if ($type == 1) { print '"; //} - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { // Categories print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''.$form->selectarray('search_status', $arraystatus, $search_status).''.$form->selectarray('search_status', $arraystatus, $search_status, 0, 0, 0, '', 0, 0, 0, '', 'onroghtofpage').''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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 ''; print $opensurvey_static->getNomUrl(1); @@ -477,15 +505,17 @@ while ($i < min($num, $limit)) { $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column - 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; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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 ''; + print ''; - if ($current) { - print strftime("%Y", $current); - } - print ''.date('Y', intval($toutsujet[$i])).'
    '; - print $langs->trans("CanEditAmount"); - print ''; - print $form->selectyesno("PARTNERSHIP_NEWFORM_EDITAMOUNT", (!empty($conf->global->PARTNERSHIP_NEWFORM_EDITAMOUNT) ? $conf->global->PARTNERSHIP_NEWFORM_EDITAMOUNT : 0), 1); - print "
    '; print $langs->trans("PARTNERSHIP_NEWFORM_PAYONLINE"); @@ -188,13 +182,13 @@ if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { $listofval = array(); $listofval['-1'] = $langs->trans('No'); $listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')'; - if (!empty($conf->paybox->enabled)) { + if (isModEnabled('paybox')) { $listofval['paybox'] = 'Paybox'; } - if (!empty($conf->paypal->enabled)) { + if (isModEnabled('paypal')) { $listofval['paypal'] = 'PayPal'; } - if (!empty($conf->stripe->enabled)) { + if (isModEnabled('stripe')) { $listofval['stripe'] = 'Stripe'; } print $form->selectarray("PARTNERSHIP_NEWFORM_PAYONLINE", $listofval, (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) ? $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE : ''), 0); @@ -220,7 +214,7 @@ if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { print '
    '; //print $langs->trans('FollowingLinksArePublic').'
    '; print img_picto('', 'globe').' '.$langs->trans('BlankSubscriptionForm').'
    '; - if (!empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $entity_qr = '?entity='.$conf->entity; } else { $entity_qr = ''; diff --git a/htdocs/partnership/class/api_partnership.class.php b/htdocs/partnership/class/api_partnership.class.php new file mode 100644 index 00000000000..1e1c7ca80fe --- /dev/null +++ b/htdocs/partnership/class/api_partnership.class.php @@ -0,0 +1,394 @@ + + * Copyright (C) 2022 Alice Adminson + * + * 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 . + */ + +use Luracast\Restler\RestException; + +dol_include_once('/partnership/class/partnership.class.php'); + + + +/** + * \file partnership/class/api_partnership.class.php + * \ingroup partnership + * \brief File for API management of partnership. + */ + +/** + * API class for partnership partnership + * + * @access protected + * @class DolibarrApiAccess {@requires user,external} + */ +class PartnershipApi extends DolibarrApi +{ + /** + * @var Partnership $partnership {@type Partnership} + */ + public $partnership; + + /** + * Constructor + * + * @url GET / + * + */ + public function __construct() + { + global $db; + $this->db = $db; + $this->partnership = new Partnership($this->db); + } + + /** + * Get properties of a partnership object + * + * Return an array with partnership informations + * + * @param int $id ID of partnership + * @return array|mixed data without useless information + * + * @url GET partnerships/{id} + * + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + */ + public function get($id) + { + if (!DolibarrApiAccess::$user->rights->partnership->read) { + throw new RestException(401); + } + + $result = $this->partnership->fetch($id); + if (!$result) { + throw new RestException(404, 'Partnership not found'); + } + + if (!DolibarrApi::_checkAccessToResource('partnership', $this->partnership->id, 'partnership')) { + throw new RestException(401, 'Access to instance id='.$this->partnership->id.' of object not allowed for login '.DolibarrApiAccess::$user->login); + } + + return $this->_cleanObjectDatas($this->partnership); + } + + + /** + * List partnerships + * + * Get a list of partnerships + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of order objects + * + * @throws RestException + * + * @url GET /partnerships/ + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') + { + global $db, $conf; + + $obj_ret = array(); + $tmpobject = new Partnership($this->db); + + if (!DolibarrApiAccess::$user->rights->partnership->read) { + throw new RestException(401); + } + + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; + + $restrictonsocid = 0; // Set to 1 if there is a field socid in table of object + + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if ($restrictonsocid && !DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { + $search_sale = DolibarrApiAccess::$user->id; + } + + $sql = "SELECT t.rowid"; + if ($restrictonsocid && (!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.$tmpobject->table_element." as t"; + + if ($restrictonsocid && (!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 1 = 1"; + + // Example of use $mode + //if ($mode == 1) $sql.= " AND s.client IN (1, 3)"; + //if ($mode == 2) $sql.= " AND s.client IN (2, 3)"; + + if ($tmpobject->ismultientitymanaged) { + $sql .= ' AND t.entity IN ('.getEntity($tmpobject->element).')'; + } + if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) { + $sql .= " AND t.fk_soc = sc.fk_soc"; + } + if ($restrictonsocid && $socid) { + $sql .= " AND t.fk_soc = ".((int) $socid); + } + if ($restrictonsocid && $search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } + // Insert sale filter + if ($restrictonsocid && $search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); + } + if ($sqlfilters) { + $errormessage = ''; + if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) { + throw new RestException(503, 'Error when validating parameter sqlfilters -> '.$errormessage); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit + 1, $offset); + } + + $result = $this->db->query($sql); + $i = 0; + if ($result) { + $num = $this->db->num_rows($result); + while ($i < $num) { + $obj = $this->db->fetch_object($result); + $tmp_object = new Partnership($this->db); + if ($tmp_object->fetch($obj->rowid)) { + $obj_ret[] = $this->_cleanObjectDatas($tmp_object); + } + $i++; + } + } else { + throw new RestException(503, 'Error when retrieving partnership list: '.$this->db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No partnership found'); + } + return $obj_ret; + } + + /** + * Create partnership object + * + * @param array $request_data Request datas + * @return int ID of partnership + * + * @throws RestException + * + * @url POST partnerships/ + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->partnership->write) { + throw new RestException(401); + } + + // Check mandatory fields + $result = $this->_validate($request_data); + + foreach ($request_data as $field => $value) { + $this->partnership->$field = $this->_checkValForAPI($field, $value, $this->partnership); + } + + // Clean data + // $this->partnership->abc = sanitizeVal($this->partnership->abc, 'alphanohtml'); + + if ($this->partnership->create(DolibarrApiAccess::$user)<0) { + throw new RestException(500, "Error creating Partnership", array_merge(array($this->partnership->error), $this->partnership->errors)); + } + return $this->partnership->id; + } + + /** + * Update partnership + * + * @param int $id Id of partnership to update + * @param array $request_data Datas + * @return int + * + * @throws RestException + * + * @url PUT partnerships/{id} + */ + public function put($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->partnership->write) { + throw new RestException(401); + } + + $result = $this->partnership->fetch($id); + if (!$result) { + throw new RestException(404, 'Partnership not found'); + } + + if (!DolibarrApi::_checkAccessToResource('partnership', $this->partnership->id, 'partnership')) { + throw new RestException(401, 'Access to instance id='.$this->partnership->id.' of object not allowed for login '.DolibarrApiAccess::$user->login); + } + + foreach ($request_data as $field => $value) { + if ($field == 'id') { + continue; + } + $this->partnership->$field = $this->_checkValForAPI($field, $value, $this->partnership); + } + + // Clean data + // $this->partnership->abc = sanitizeVal($this->partnership->abc, 'alphanohtml'); + + if ($this->partnership->update(DolibarrApiAccess::$user, false) > 0) { + return $this->get($id); + } else { + throw new RestException(500, $this->partnership->error); + } + } + + /** + * Delete partnership + * + * @param int $id Partnership ID + * @return array + * + * @throws RestException + * + * @url DELETE partnerships/{id} + */ + public function delete($id) + { + if (!DolibarrApiAccess::$user->rights->partnership->delete) { + throw new RestException(401); + } + $result = $this->partnership->fetch($id); + if (!$result) { + throw new RestException(404, 'Partnership not found'); + } + + if (!DolibarrApi::_checkAccessToResource('partnership', $this->partnership->id, 'partnership')) { + throw new RestException(401, 'Access to instance id='.$this->partnership->id.' of object not allowed for login '.DolibarrApiAccess::$user->login); + } + + if (!$this->partnership->delete(DolibarrApiAccess::$user)) { + throw new RestException(500, 'Error when deleting Partnership : '.$this->partnership->error); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Partnership deleted' + ) + ); + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param Object $object Object to clean + * @return Object Object with cleaned properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); + + unset($object->rowid); + unset($object->canvas); + + /*unset($object->name); + unset($object->lastname); + unset($object->firstname); + unset($object->civility_id); + unset($object->statut); + unset($object->state); + unset($object->state_id); + unset($object->state_code); + unset($object->region); + unset($object->region_code); + unset($object->country); + unset($object->country_id); + unset($object->country_code); + unset($object->barcode_type); + unset($object->barcode_type_code); + unset($object->barcode_type_label); + unset($object->barcode_type_coder); + unset($object->total_ht); + unset($object->total_tva); + unset($object->total_localtax1); + unset($object->total_localtax2); + unset($object->total_ttc); + unset($object->fk_account); + unset($object->comments); + unset($object->note); + unset($object->mode_reglement_id); + unset($object->cond_reglement_id); + unset($object->cond_reglement); + unset($object->shipping_method_id); + unset($object->fk_incoterms); + unset($object->label_incoterms); + unset($object->location_incoterms); + */ + + // If object has lines, remove $db property + if (isset($object->lines) && is_array($object->lines) && count($object->lines) > 0) { + $nboflines = count($object->lines); + for ($i = 0; $i < $nboflines; $i++) { + $this->_cleanObjectDatas($object->lines[$i]); + + unset($object->lines[$i]->lines); + unset($object->lines[$i]->note); + } + } + + return $object; + } + + /** + * Validate fields before create or update object + * + * @param array $data Array of data to validate + * @return array + * + * @throws RestException + */ + private function _validate($data) + { + $partnership = array(); + foreach ($this->partnership->fields as $field => $propfield) { + if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) { + continue; // Not a mandatory field + } + if (!isset($data[$field])) { + throw new RestException(400, "$field field missing"); + } + $partnership[$field] = $data[$field]; + } + return $partnership; + } +} diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index e1f23ba7014..5908b964f2c 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -17,16 +17,14 @@ */ /** - * \file class/partnership.class.php + * \file htdocs/partnership/class/partnership.class.php * \ingroup partnership * \brief This file is a CRUD class file for Partnership (Create/Read/Update/Delete) */ + // Put here all includes required by your class file 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 Partnership @@ -105,8 +103,8 @@ class Partnership extends CommonObject public $fields=array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), - 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1), - 'fk_type' => array('type' => 'integer:PartnershipType:partnership/class/partnership_type.class.php:0:active=1', 'label' => 'Type', 'notnull'=>1, 'enabled' => 1, 'visible' => 1, 'position' => 20), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>'1', 'position'=>15, 'notnull'=>1, 'visible'=>-2, 'default'=>'1', 'index'=>1,), + 'fk_type' => array('type'=>'integer:PartnershipType:partnership/class/partnership_type.class.php:0:active=1', 'label'=>'Type', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1,), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), @@ -118,38 +116,35 @@ class Partnership extends CommonObject 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'date_partnership_start' => array('type'=>'date', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,), 'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,), - 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>2, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('-1'=>'','0'=>'Draft', '1'=>'Accepted', '2'=>'Refused', '9'=>'Terminated'),), - 'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1), + 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>2, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('-1'=>'', '0'=>'Draft', '1'=>'Accepted', '2'=>'Refused', '8'=>'Suspended', '9'=>'Terminated'),), + 'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1,), 'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',), 'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>-2,), 'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>73, 'notnull'=>0, 'visible'=>-2,), - // fk_member and fk_soc are added into constructor + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150',), + 'ip' => array('type'=>'varchar(250)', 'label'=>'Ip', 'enabled'=>'1', 'position'=>74, 'notnull'=>0, 'visible'=>-2,), ); - - /** - * @var int rowid - * @deprecated - * @see $id - */ public $rowid; - - public $fk_soc; // Link to thirdparty - public $fk_member; // Link to member - + public $ref; + public $entity; + public $fk_type; + public $note_public; + public $note_private; + public $date_creation; public $tms; public $fk_user_creat; public $fk_user_modif; - - public $status; + public $last_main_doc; + public $import_key; + public $model_pdf; public $date_partnership_start; public $date_partnership_end; + public $status; + public $url_to_check; public $count_last_url_check_error; public $last_check_backlink; - - /** - * @var string reason_decline_or_cancel - */ public $reason_decline_or_cancel; + public $fk_soc; // END MODULEBUILDER PROPERTIES @@ -199,7 +194,7 @@ class Partnership extends CommonObject $this->db = $db; - if (!empty($conf->global->PARTNERSHIP_IS_MANAGED_FOR) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') { + if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') { $this->fields['fk_member'] = array('type'=>'integer:Adherent:adherents/class/adherent.class.php:1', 'label'=>'Member', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'member', 'csslist'=>'tdoverflowmax150'); } else { $this->fields['fk_soc'] = array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'company', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150'); @@ -208,7 +203,7 @@ class Partnership extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { $this->fields['rowid']['visible'] = 0; } - // if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + // if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { // $this->fields['entity']['enabled'] = 0; // } @@ -615,8 +610,8 @@ class Partnership extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->partnership_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->partnership_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -739,8 +734,8 @@ class Partnership extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->partnership_advance->accept)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->partnership_advance->accept)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -857,8 +852,8 @@ class Partnership extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -909,8 +904,8 @@ class Partnership extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -933,8 +928,8 @@ class Partnership extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->partnership_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php index e0163ba4dfc..0c42dae87d2 100644 --- a/htdocs/partnership/class/partnership_type.class.php +++ b/htdocs/partnership/class/partnership_type.class.php @@ -90,7 +90,7 @@ class PartnershipType extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -129,9 +129,6 @@ class PartnershipType extends CommonObject public function create(User $user, $notrigger = false) { $resultcreate = $this->createCommon($user, $notrigger); - - //$resultvalidate = $this->validate($user, $notrigger); - return $resultcreate; } @@ -145,9 +142,6 @@ class PartnershipType extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) { - $this->fetchLines(); - } return $result; } @@ -253,79 +247,6 @@ class PartnershipType extends CommonObject public function delete(User $user, $notrigger = false) { return $this->deleteCommon($user, $notrigger); - //return $this->deleteCommon($user, $notrigger, 1); - } - - /** - * Set draft status - * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int <0 if KO, >0 if OK - */ - public function setDraft($user, $notrigger = 0) - { - // Protection - if ($this->status <= self::STATUS_DRAFT) { - return 0; - } - - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) - { - $this->error='Permission denied'; - return -1; - }*/ - - return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'PARTNERSHIPTYPE_UNVALIDATE'); - } - - /** - * Set cancel status - * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int <0 if KO, 0=Nothing done, >0 if OK - */ - public function cancel($user, $notrigger = 0) - { - // Protection - if ($this->status != self::STATUS_VALIDATED) { - return 0; - } - - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) - { - $this->error='Permission denied'; - return -1; - }*/ - - return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'PARTNERSHIPTYPE_CANCEL'); - } - - /** - * Set back to validated status - * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int <0 if KO, 0=Nothing done, >0 if OK - */ - public function reopen($user, $notrigger = 0) - { - // Protection - if ($this->status != self::STATUS_CANCELED) { - return 0; - } - - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->mymodule->mymodule_advance->validate)))) - { - $this->error='Permission denied'; - return -1; - }*/ - - return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'PARTNERSHIPTYPE_REOPEN'); } /** @@ -445,59 +366,6 @@ class PartnershipType extends CommonObject return $result; } - /** - * Return the label of the 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 - */ - public function getLabelStatus($mode = 0) - { - return $this->LibStatut($this->status, $mode); - } - - /** - * Return the label of the 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 - */ - public function getLibStatut($mode = 0) - { - return $this->LibStatut($this->status, $mode); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * 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 - */ - public function LibStatut($status, $mode = 0) - { - // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) { - global $langs; - //$langs->load("mymodule@mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); - } - - $statusType = 'status'.$status; - //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_CANCELED) { - $statusType = 'status6'; - } - - return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); - } - /** * Load the info information in the object * diff --git a/htdocs/partnership/class/partnershiputils.class.php b/htdocs/partnership/class/partnershiputils.class.php index c73068e17a4..647d1492ced 100644 --- a/htdocs/partnership/class/partnershiputils.class.php +++ b/htdocs/partnership/class/partnershiputils.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -159,7 +159,7 @@ class PartnershipUtils // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -325,7 +325,7 @@ class PartnershipUtils // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index d717bdc49bf..676de032659 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -30,7 +30,7 @@ dol_include_once('/partnership/core/modules/partnership/modules_partnership.php' /** - * Class to manage customer Bom numbering rules advanced + * Class to manage the Advanced numbering rule for Partnership */ class mod_partnership_advanced extends ModeleNumRefPartnership { diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php index d5a2bb326b2..5de4b07f215 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -26,7 +26,7 @@ dol_include_once('/partnership/core/modules/partnership/modules_partnership.php' /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Partnership */ class mod_partnership_standard extends ModeleNumRefPartnership { diff --git a/htdocs/partnership/lib/partnership.lib.php b/htdocs/partnership/lib/partnership.lib.php index 62046fec68c..5c30be6ffd1 100644 --- a/htdocs/partnership/lib/partnership.lib.php +++ b/htdocs/partnership/lib/partnership.lib.php @@ -28,10 +28,13 @@ */ function partnershipAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; $langs->loadLangs(array("members", "partnership")); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('partnership'); + $h = 0; $head = array(); @@ -43,6 +46,10 @@ function partnershipAdminPrepareHead() $head[$h][0] = dol_buildpath("/partnership/admin/partnership_extrafields.php", 1); $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = $extrafields->attributes['partnership']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'partnership_extrafields'; $h++; @@ -51,13 +58,6 @@ function partnershipAdminPrepareHead() $head[$h][2] = 'website'; $h++; - /* - $head[$h][0] = dol_buildpath("/partnership/admin/about.php", 1); - $head[$h][1] = $langs->trans("About"); - $head[$h][2] = 'about'; - $h++; - */ - // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( @@ -68,6 +68,8 @@ function partnershipAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'partnership'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'partnership', 'remove'); + return $head; } diff --git a/htdocs/partnership/partnership_agenda.php b/htdocs/partnership/partnership_agenda.php index ab6d7ea083a..dd886fc70d7 100644 --- a/htdocs/partnership/partnership_agenda.php +++ b/htdocs/partnership/partnership_agenda.php @@ -37,6 +37,7 @@ $langs->loadLangs(array("partnership", "other")); // Get parameters $id = GETPOST('id', 'int'); +$socid = GETPOST('socid', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -125,11 +126,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = partnershipPrepareHead($object); @@ -149,7 +150,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -169,7 +170,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index 25f8b286fb5..de5449b7e80 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -42,7 +42,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'partnershipcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Partnership($db); @@ -129,10 +129,10 @@ if (empty($reshook)) { if (method_exists($object, 'generateDocument')) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -161,10 +161,10 @@ if (empty($reshook)) { if (method_exists($object, 'generateDocument')) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -370,11 +370,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea array('type' => 'text', 'name' => 'reason_decline_or_cancel', 'label' => $langs->trans("Note"), 'morecss' => 'reason_decline_or_cancel minwidth400', 'value' => '') // Field to complete private note (not replace) ); - // if (!empty($conf->notification->enabled)) { + // if (isModEnabled('notification')) { // require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; // $notify = new Notify($db); // $formquestion = array_merge($formquestion, array( - // array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), + // array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PARTNERSHIP_CLOSE_DENY', $object->socid, $object)), // )); // } @@ -406,7 +406,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -424,7 +424,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -434,6 +434,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } }*/ $morehtmlref .= ''; + if (!isset($npfilter)) { + $npfilter = ""; + } if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 "; $object->next_prev_filter = $npfilter; @@ -554,22 +557,22 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); } if ($object->status == $object::STATUS_DRAFT) { - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); } // Back to draft if ($object->status != $object::STATUS_DRAFT) { - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); } // Validate if ($object->status == $object::STATUS_DRAFT) { if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { - print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); } else { $langs->load("errors"); print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0); diff --git a/htdocs/partnership/partnership_contact.php b/htdocs/partnership/partnership_contact.php index 094380ab83b..75d315ae396 100644 --- a/htdocs/partnership/partnership_contact.php +++ b/htdocs/partnership/partnership_contact.php @@ -133,7 +133,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -154,7 +154,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/partnership/partnership_document.php b/htdocs/partnership/partnership_document.php index f9ea6559979..0b6d0e6bd07 100644 --- a/htdocs/partnership/partnership_document.php +++ b/htdocs/partnership/partnership_document.php @@ -130,7 +130,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -151,7 +151,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php index c178fa070bc..36a0fd39218 100644 --- a/htdocs/partnership/partnership_list.php +++ b/htdocs/partnership/partnership_list.php @@ -28,7 +28,9 @@ 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.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; // for other modules @@ -49,7 +51,8 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always ' $mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); - +$socid = GETPOST('socid', 'int'); +$memberid = GETPOST('rowid', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -68,7 +71,13 @@ $object = new Partnership($db); $extrafields = new ExtraFields($db); $adherent = new Adherent($db); $diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('partnershiplist')); // Note that conf->hooks_modules contains array +if ($socid > 0) { + $hookmanager->initHooks(array('thirdpartypartnership')); +} elseif ($memberid > 0) { + $hookmanager->initHooks(array('memberpartnership')); +} else { + $hookmanager->initHooks(array('partnershiplist')); // Note that conf->hooks_modules contains array +} // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -144,7 +153,6 @@ $permissiontodelete = $user->rights->partnership->delete; if (empty($conf->partnership->enabled)) { accessforbidden('Module not enabled'); } -$socid = 0; if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); @@ -325,9 +333,19 @@ if ($object->ismultientitymanaged == 1) { } else { $sql .= " WHERE 1 = 1"; } -if ($managedfor == 'member') - $sql .= " AND fk_member > 0"; -else $sql .= " AND fk_soc > 0"; +if ($managedfor == 'member') { + if ($memberid > 0) { + $sql .= " AND t.fk_member = ".((int) $memberid); + } else { + $sql .= " AND fk_member > 0"; + } +} else { + if ($socid > 0) { + $sql .= " AND t.fk_soc = ".((int) $socid); + } else { + $sql .= " AND fk_soc > 0"; + } +} foreach ($search as $key => $val) { if (array_key_exists($key, $object->fields)) { if ($key == 'status' && $search[$key] == -1) { @@ -361,11 +379,14 @@ if ($managedfor == 'member') { if ($search_filter == 'withoutsubscription') { $sql .= " AND (d.datefin IS NULL)"; } + if ($search_filter == 'waitingsubscription') { + $sql .= " AND (d.datefin IS NULL AND t.subscription = '1')"; + } if ($search_filter == 'uptodate') { - $sql .= " AND (d.datefin >= '".$db->idate($now)."' OR dty.subscription = 0)"; + $sql .= " AND (d.datefin >= '".$db->idate($now)."' OR dty.subscription = '0')"; } if ($search_filter == 'outofdate') { - $sql .= " AND (d.datefin < '".$db->idate($now)."' AND dty.subscription = 1)"; + $sql .= " AND (d.datefin < '".$db->idate($now)."' AND dty.subscription = '1')"; } } if ($search_all) { @@ -385,7 +406,7 @@ foreach($object->fields as $key => $val) { $sql .= "t.".$db->escape($key).", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } @@ -401,7 +422,7 @@ $sql=preg_replace('/,\s*$/','', $sql); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); $resql = $db->query($sqlforcount); if ($resql) { $objforcount = $db->fetch_object($resql); @@ -446,6 +467,113 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); +if ($managedfor == "member") { + if ($memberid > 0 && $user->hasRight('adherent', 'lire')) { + $langs->load("members"); + + $adhstat = new Adherent($db); + $adht = new AdherentType($db); + $result = $adhstat->fetch($memberid); + + if (isModEnabled('notification')) { + $langs->load("mails"); + } + + $adht->fetch($adhstat->typeid); + + $head = member_prepare_head($adhstat); + + print dol_get_fiche_head($head, 'partnerships', $langs->trans("ThirdParty"), -1, 'user'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'rowid', $linkback); + + print '
    '; + + print '
    '; + print ''; + + // Login + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { + print ''; + } + + // Type + print '\n"; + + // Morphy + print ''; + print ''; + + // Company + print ''; + + // Civility + print ''; + print ''; + + print '
    '.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
    '.$langs->trans("Type").''.$adht->getNomUrl(1)."
    '.$langs->trans("MemberNature").''.$adhstat->getmorphylib().'
    '.$langs->trans("Company").''.$adhstat->company.'
    '.$langs->trans("UserTitle").''.$adhstat->getCivilityLabel().' 
    '; + + print '
    '; + + print dol_get_fiche_end(); + } +} elseif ($managedfor == "thirdparty") { + if ($socid && $user->hasRight('societe', 'lire')) { + $socstat = new Societe($db); + $res = $socstat->fetch($socid); + if ($res > 0) { + $tmpobject = $object; + $object = $socstat; // $object must be of type Societe when calling societe_prepare_head + $head = societe_prepare_head($socstat); + $object = $tmpobject; + + print dol_get_fiche_head($head, 'partnerships', $langs->trans("ThirdParty"), -1, 'company'); + + dol_banner_tab($socstat, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print ''; + + // Type Prospect/Customer/Supplier + print ''; + + // Customer code + if ($socstat->client && !empty($socstat->code_client)) { + print ''; + print ''; + } + // Supplier code + if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) { + print ''; + print ''; + } + + print '
    '.$langs->trans('NatureOfThirdParty').''; + print $socstat->getTypeUrl(1); + print '
    '; + print $langs->trans('CustomerCode').''; + print showValueWithClipboardCPButton(dol_escape_htmltag($socstat->code_client)); + $tmpcheck = $socstat->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' ('.$langs->trans("WrongCustomerCode").')'; + } + print '
    '; + print $langs->trans('SupplierCode').''; + print showValueWithClipboardCPButton(dol_escape_htmltag($socstat->code_fournisseur)); + $tmpcheck = $socstat->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' ('.$langs->trans("WrongSupplierCode").')'; + } + print '
    '; + print '
    '; + print dol_get_fiche_end(); + } + } +} $arrayofselected = is_array($toselect) ? $toselect : array(); @@ -456,6 +584,12 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } +if ($socid) { + $param .= '&socid='.urlencode($socid); +} +if ($memberid) { + $param .= '&rowid='.urlencode($memberid); +} foreach ($search as $key => $val) { if (is_array($search[$key]) && count($search[$key])) { foreach ($search[$key] as $skey) { @@ -509,7 +643,11 @@ print ''; print ''; print ''; print ''; - +if ($socid) { + print ''; +} elseif ($memberid) { + print ''; +} $newcardbutton = ''; $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/partnership/partnership_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); @@ -682,7 +820,7 @@ print '
    '; print $langs->trans("BankAccount").''; $form->select_comptes($conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 197676d74e7..68759eeb5e3 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -24,6 +24,7 @@ * \brief Page to setup paypal module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; @@ -244,7 +245,7 @@ print ''.$langs->trans("Example").': '.$mysoc->name.''; print '
    '; print $langs->trans("BankAccount").''; print img_picto('', 'bank_account').' '; diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index 3eda0fc4457..fb8426abc1b 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -22,6 +22,7 @@ * \brief Page to setup printing module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/printing/index.php b/htdocs/printing/index.php index 7ce4399501b..a4cc4d9103d 100644 --- a/htdocs/printing/index.php +++ b/htdocs/printing/index.php @@ -22,6 +22,7 @@ * \brief Printing */ +// Load Dolibarr environment require '../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php'; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index e1e23feac86..8ab5eefc2d4 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -21,6 +21,7 @@ * \brief Page for configuring dynamic prices */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; diff --git a/htdocs/product/admin/inventory_extrafields.php b/htdocs/product/admin/inventory_extrafields.php index 3c9364349ef..74267ee1c8e 100644 --- a/htdocs/product/admin/inventory_extrafields.php +++ b/htdocs/product/admin/inventory_extrafields.php @@ -91,14 +91,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index 2166ada6138..4fa0c293b2d 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -19,6 +19,7 @@ * This page is a tab in the setup of module Product if option PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL is set. */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index da669aa25d9..40f67137acd 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -30,6 +30,7 @@ * \brief Setup page of product module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -132,7 +133,7 @@ if ($action == 'other') { /*$value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity);*/ - $value = GETPOST('activate_viewProdDescInForm', 'alpha'); + $value = GETPOST('PRODUIT_DESC_IN_FORM', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", $value, 'chaine', 0, '', $conf->entity); $value = GETPOST('activate_viewProdTextsInThirdpartyLanguage', 'alpha'); @@ -147,11 +148,15 @@ if ($action == 'other') { $value = GETPOST('activate_FillProductDescAuto', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_AUTOFILL_DESC", $value, 'chaine', 0, '', $conf->entity); - $value = GETPOST('PRODUIT_FOURN_TEXTS', 'alpha'); - $res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('PRODUIT_FOURN_TEXTS')) { + $value = GETPOST('PRODUIT_FOURN_TEXTS', 'alpha'); + $res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity); + } - $value = GETPOST('PRODUCT_USE_SUPPLIER_PACKAGING', 'alpha'); - $res = dolibarr_set_const($db, "PRODUCT_USE_SUPPLIER_PACKAGING", $value, 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('PRODUCT_USE_SUPPLIER_PACKAGING')) { + $value = GETPOST('PRODUCT_USE_SUPPLIER_PACKAGING', 'alpha'); + $res = dolibarr_set_const($db, "PRODUCT_USE_SUPPLIER_PACKAGING", $value, 'chaine', 0, '', $conf->entity); + } } @@ -199,7 +204,7 @@ if ($action == 'set') { if ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->PRODUCT_ADDON_PDF == "$value") { + if (getDolGlobalString('PRODUCT_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'PRODUCT_ADDON_PDF', $conf->entity); } } @@ -338,7 +343,7 @@ foreach ($dirproduct as $dirroot) { print "
    '; if (!$disabled) { @@ -456,7 +461,7 @@ foreach ($dirmodels as $reldir) { // Defaut print ''; - if ($conf->global->PRODUCT_ADDON_PDF == $name) { + if (getDolGlobalString('PRODUCT_ADDON_PDF') == $name) { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; @@ -544,7 +549,7 @@ print ''.$langs->trans("VariantsAbility").''; //print ajax_constantonoff("PRODUIT_SOUSPRODUITS", array(), $conf->entity, 0, 0, 1, 0); //print $form->selectyesno("PRODUIT_SOUSPRODUITS", $conf->global->PRODUIT_SOUSPRODUITS, 1); -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { print ''.$langs->trans("ModuleMustBeEnabled", $langs->transnoentitiesnoconv("Module610Name")).''; } else { print yn(1).' ('.$langs->trans("ModuleIsEnabled", $langs->transnoentitiesnoconv("Module610Name")).')'; @@ -556,7 +561,7 @@ print '
    '.$langs->trans("PricingRule").''.$form->textwithpicto($langs->trans("PricingRule"), $langs->trans("SamePriceAlsoForSharedCompanies"), 1).'
    '.$form->textwithpicto($langs->trans("UseProductSupplierPackaging"), $langs->trans("PackagingForThisProductDesc")).''; @@ -688,7 +693,8 @@ print '
    '.$langs->trans("ViewProductDescInFormAbility").''; -print $form->selectyesno("activate_viewProdDescInForm", $conf->global->PRODUIT_DESC_IN_FORM, 1); +$arrayofchoices = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes").' ('.$langs->trans("DesktopsOnly").')', '2' => $langs->trans("Yes").' ('.$langs->trans("DesktopsAndSmartphones").')'); +print $form->selectarray("PRODUIT_DESC_IN_FORM", $arrayofchoices, getDolGlobalInt('PRODUIT_DESC_IN_FORM'), 0); print '
    '.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").''; diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index eaabe41eb74..4885c595097 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -25,6 +25,7 @@ * \brief Page to setup extra fields of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -91,14 +92,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index bf43c2d0048..8f46412871a 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -21,6 +21,7 @@ * \brief Setup page of product lot module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php index a164fec6d81..6f0f28ff235 100644 --- a/htdocs/product/admin/product_lot_extrafields.php +++ b/htdocs/product/admin/product_lot_extrafields.php @@ -25,6 +25,7 @@ * \brief Page to setup extra fields of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -84,13 +85,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php index b6d83ba1db9..afd46f104ae 100644 --- a/htdocs/product/admin/product_supplier_extrafields.php +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -17,7 +17,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -26,6 +26,7 @@ * \brief Page to setup extra fields of products */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -92,13 +93,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index 674e90f3614..1bf36688f93 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -25,6 +25,7 @@ // TODO We must add a confirmation on button because this will make a mass change // FIXME Should also change table product_price for price levels +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index 3a7b2c150db..a10de1f1e42 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -24,6 +24,7 @@ * \brief Page to setup extra fields of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -79,13 +80,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print "
    "; diff --git a/htdocs/product/admin/stock_mouvement_extrafields.php b/htdocs/product/admin/stock_mouvement_extrafields.php index d7a5d1e6d83..33aee41072e 100644 --- a/htdocs/product/admin/stock_mouvement_extrafields.php +++ b/htdocs/product/admin/stock_mouvement_extrafields.php @@ -91,14 +91,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 8ec76640871..c0ecdb2ad0f 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -27,6 +27,7 @@ * \brief Page of product events */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -143,7 +144,7 @@ if ($id > 0 || $ref) { } llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $type = $langs->trans('Product'); diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 74fa53dccb8..f61e92c56f3 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -38,13 +38,11 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) { define('NOREQUIREHTML', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; $htmlname = GETPOST('htmlname', 'aZ09'); @@ -79,6 +77,8 @@ if ($action == 'fetch' && !empty($id)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + top_httphead('application/json'); + $outjson = array(); $object = new Product($db); @@ -93,6 +93,7 @@ if ($action == 'fetch' && !empty($id)) { $outprice_ht = null; $outprice_ttc = null; $outpricebasetype = null; + $outtva_tx_formated = 0; $outtva_tx = 0; $outdefault_vat_code = ''; $outqty = 1; @@ -106,7 +107,7 @@ if ($action == 'fetch' && !empty($id)) { $thirdpartytemp->fetch($socid); //Load translation description and label - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $newlang = $thirdpartytemp->default_lang; if (!empty($newlang)) { @@ -140,7 +141,8 @@ if ($action == 'fetch' && !empty($id)) { $outprice_ttc = price($objp->unitprice * (1 + ($object->tva_tx / 100))); $outpricebasetype = $object->price_base_type; - $outtva_tx = $object->tva_tx; + $outtva_tx_formated = price($object->tva_tx); + $outtva_tx = price2num($object->tva_tx); $outdefault_vat_code = $object->default_vat_code; $outqty = $objp->quantity; @@ -165,15 +167,17 @@ if ($action == 'fetch' && !empty($id)) { $objp = $db->fetch_object($result); if ($objp) { $found = true; - $outprice_ht = price($objp->price); - $outprice_ttc = price($objp->price_ttc); + $outprice_ht = price($objp->price); // formated for langage user because is inserted into input field + $outprice_ttc = price($objp->price_ttc); // formated for langage user because is inserted into input field $outpricebasetype = $objp->price_base_type; if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { - $outtva_tx = $objp->tva_tx; + $outtva_tx_formated = price($objp->tva_tx); // formated for langage user because is inserted into input field + $outtva_tx = price2num($objp->tva_tx); // international numeric $outdefault_vat_code = $objp->default_vat_code; } else { // The common and default behaviour. - $outtva_tx = $object->tva_tx; + $outtva_tx_formated = price($object->tva_tx); + $outtva_tx = price2num($object->tva_tx); $outdefault_vat_code = $object->default_vat_code; } } @@ -188,14 +192,15 @@ if ($action == 'fetch' && !empty($id)) { $filter = array('t.fk_product' => $object->id, 't.fk_soc' => $socid); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result) { if (count($prodcustprice->lines) > 0) { $found = true; $outprice_ht = price($prodcustprice->lines[0]->price); $outprice_ttc = price($prodcustprice->lines[0]->price_ttc); $outpricebasetype = $prodcustprice->lines[0]->price_base_type; - $outtva_tx = $prodcustprice->lines[0]->tva_tx; + $outtva_tx_formated = price($prodcustprice->lines[0]->tva_tx); + $outtva_tx = price2num($prodcustprice->lines[0]->tva_tx); $outdefault_vat_code = $prodcustprice->lines[0]->default_vat_code; } } @@ -205,7 +210,8 @@ if ($action == 'fetch' && !empty($id)) { $outprice_ht = price($object->price); $outprice_ttc = price($object->price_ttc); $outpricebasetype = $object->price_base_type; - $outtva_tx = $object->tva_tx; + $outtva_tx_formated = price($object->tva_tx); + $outtva_tx = price2num($object->tva_tx); $outdefault_vat_code = $object->default_vat_code; } @@ -219,6 +225,7 @@ if ($action == 'fetch' && !empty($id)) { 'price_ht' => $outprice_ht, 'price_ttc' => $outprice_ttc, 'pricebasetype' => $outpricebasetype, + 'tva_tx_formated' => $outtva_tx_formated, 'tva_tx' => $outtva_tx, 'default_vat_code' => $outdefault_vat_code, 'qty' => $outqty, diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index 8813e4a8d7e..ca7f6000a82 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -43,7 +43,7 @@ print dol_get_fiche_head(''); -stock->enabled)) { ?> + @@ -72,7 +72,7 @@ print dol_get_fiche_head('');
    selectarray('statut_buy', $statutarray, $object->status_buy); ?>
    trans("StockLimit"); ?>
    selectarray('statut_buy', $statutarray, $object->status_buy); ?>
    trans("StockLimit"); ?>
    '.$langs->trans("ManageLotSerial").''; $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial")); print $form->selectarray('status_batch', $statutarray, GETPOST('status_batch')); @@ -1413,10 +1444,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Description (used in invoice, propal...) print '
    '.$langs->trans("Description").''; - - $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_details', '', false, true, getDolGlobalString('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%'); + $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_details', '', false, true, getDolGlobalString('FCKEDITOR_ENABLE_DETAILS'), ROWS_4, '90%'); $doleditor->Create(); - print "
    '.$langs->trans("DefaultWarehouse").''; print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"'); @@ -1457,6 +1486,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } + if ($type == 1 && $conf->workstation->enabled) { + // Default workstation + print '
    '.$langs->trans("DefaultWorkstation").''; + print img_picto($langs->trans("DefaultWorkstation"), 'workstation', 'class="pictofixedwidth"'); + print $formproduct->selectWorkstations($object->fk_default_workstation, 'fk_default_workstation', 1); + print '
    '.$langs->trans("Duration").''; @@ -1577,18 +1614,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Note (private, no output on invoices, propales...) - //if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) available in create mode + //if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) available in create mode //{ print '
    '.$langs->trans("NoteNotVisibleOnBill").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 140, 'dolibarr_details', '', false, true, getDolGlobalString('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_8, '90%'); + $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 140, 'dolibarr_details', '', false, true, getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE'), ROWS_8, '90%'); $doleditor->Create(); print "
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); @@ -1645,7 +1682,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; if (empty($conf->global->PRODUCT_DISABLE_ACCOUNTING)) { - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { // Accountancy_code_sell print ''; print '
    '.$langs->trans("ProductAccountancySellCode").''; @@ -1828,7 +1865,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Ref - print ''; + if (empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { + print ''; + } else { + print ''; + } + // Label print ''; @@ -1964,7 +2006,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '"; @@ -1979,7 +2021,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Stock - if ($object->isProduct() && !empty($conf->stock->enabled)) { + if ($object->isProduct() && isModEnabled('stock')) { // Default warehouse print ''; */ } + + if ($object->isService() && $conf->workstation->enabled) { + // Default workstation + print ''; + } + /* else { @@ -2027,7 +2078,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } - if (!$object->isService() && !empty($conf->bom->enabled)) { + if (!$object->isService() && isModEnabled('bom')) { print '"; @@ -2159,7 +2210,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$langs->trans("Ref").'
    '.$langs->trans("Ref").'
    '.$langs->trans("Ref").'
    '.$langs->trans("Label").'
    '.$langs->trans("Description").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('desc', GETPOSTISSET('desc') ? GETPOST('desc', 'restricthtml') : $object->description, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%'); + $doleditor = new DolEditor('desc', GETPOSTISSET('desc') ? GETPOST('desc', 'restricthtml') : $object->description, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), ROWS_4, '90%'); $doleditor->Create(); print "
    '.$langs->trans("DefaultWarehouse").''; print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"'); @@ -1996,6 +2038,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$langs->trans("DefaultWorkstation").''; + print img_picto($langs->trans("DefaultWorkstation"), 'workstation', 'class="pictofixedwidth"'); + print $formproduct->selectWorkstations($object->fk_default_workstation, 'fk_default_workstation', 1); + print '
    '.$form->textwithpicto($langs->trans("DefaultBOM"), $langs->trans("DefaultBOMDesc", $langs->transnoentitiesnoconv("Finished"))).''; $bomkey = "Bom:bom/class/bom.class.php:0:t.status=1 AND t.fk_product=".((int) $object->id); print $form->selectForForms($bomkey, 'fk_default_bom', $object->fk_default_bom, 1); @@ -2146,7 +2197,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { print '
    '.$langs->trans("NoteNotVisibleOnBill").''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%'); + $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_NOTE_PRIVATE'), ROWS_4, '90%'); $doleditor->Create(); print "
    '; if (empty($conf->global->PRODUCT_DISABLE_ACCOUNTING)) { - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { // Accountancy_code_sell print ''; print ''."\n"; } if (empty($text)) { - $text .= ''."\n"; - $text .= ''."\n"; + if ($source == 'proposal') { + $text .= ''."\n"; + $text .= ''."\n"; + } elseif ($source == 'contract') { + $text .= ''."\n"; + $text .= ''."\n"; + } elseif ($source == 'fichinter') { + $text .= ''."\n"; + $text .= ''."\n"; + } } print $text; // Output payment summary form print ''; @@ -893,7 +892,7 @@ if ($action == 'create') { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''; @@ -1102,14 +1101,14 @@ if ($action == 'create') { $text = $product_static->getNomUrl(1); $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); - $description = ($conf->global->PRODUIT_DESC_IN_FORM ? '' : dol_htmlentitiesbr($line->desc)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($line->desc)); print $form->textwithtooltip($text, $description, 3, '', '', $i); // Show range print_date_range($db->jdate($line->date_start), $db->jdate($line->date_end)); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print ($line->desc && $line->desc != $line->product_label) ? '
    '.dol_htmlentitiesbr($line->desc) : ''; } } @@ -1173,7 +1172,7 @@ if ($action == 'create') { $warehouseObject = null; - if (!empty($conf->stock->enabled)) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection + if (isModEnabled('stock')) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection print ''; $stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number @@ -1200,7 +1199,7 @@ if ($action == 'create') { } // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { if (!empty($product->status_batch)) { print ''; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { @@ -1243,10 +1242,15 @@ if ($action == 'create') { // Display lines for extrafields of the Reception line // $line is a 'CommandeFournisseurLigne', $dispatchLines contains values of Reception lines so properties of CommandeFournisseurDispatch if (!empty($extrafields)) { - //var_dump($line); $colspan = 5; if (isModEnabled('productbatch')) { - $colspan += 3; + $colspan += 2; + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + $colspan += 1; + } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + $colspan += 1; + } } $recLine = new CommandeFournisseurDispatch($db); @@ -1287,7 +1291,7 @@ if ($action == 'create') { $lines = $object->lines; $num_prod = count($lines); - + $indiceAsked = 0; if ($object->id > 0) { if (!empty($object->origin) && $object->origin_id > 0) { $object->origin = 'CommandeFournisseur'; @@ -1323,7 +1327,7 @@ if ($action == 'create') { $text = $langs->trans("ConfirmValidateReception", $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -1359,15 +1363,15 @@ if ($action == 'create') { $totalVolume = $tmparray['volume']; - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { + if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order"))) { $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } @@ -1380,39 +1384,25 @@ if ($action == 'create') { $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; + $morehtmlref .= '
    '; if (0) { // Do not change on reception - 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); + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify' && $permissiontoadd) { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on reception, so we will use the project or source object instead - // TODO Add project on reception - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -1428,7 +1418,7 @@ if ($action == 'create') { print '
    '.$langs->trans("ProductAccountancySellCode").''; @@ -2275,7 +2326,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Type - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { + if (isModEnabled("product") && isModEnabled("service")) { $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); print ''; } + if ($object->isService() && isModEnabled('workstation')) { + $workstation = new Workstation($db); + $res = $workstation->fetch($object->fk_default_workstation); + + print ''; + } + // Parent product. - if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { + if (isModEnabled('variants') && ($object->isProduct() || $object->isService())) { $combination = new ProductCombination($db); if ($combination->fetchByFkProductChild($object->id) > 0) { @@ -2528,7 +2588,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } - if (!$object->isService() && !empty($conf->bom->enabled) && $object->finished) { + if (!$object->isService() && isModEnabled('bom') && $object->finished) { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } // Qty in kit @@ -443,7 +444,7 @@ if ($id > 0 || !empty($ref)) { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; // Real stock } @@ -492,7 +493,7 @@ if ($id > 0 || !empty($ref)) { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; // Real stock } @@ -548,7 +549,7 @@ if ($id > 0 || !empty($ref)) { print ''; // Stock - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } @@ -565,12 +566,12 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; } else { $colspan = 10; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { $colspan++; } print ''; - print ''; + print ''; print ''; } @@ -590,7 +591,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; $rowspan = 1; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { $rowspan++; } @@ -603,7 +604,7 @@ if ($id > 0 || !empty($ref)) { print $langs->trans("KeywordFilter").': '; print '   '; print ''; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '
    '.$langs->trans("CategoryFilter").': '; print $form->select_all_categories(Categorie::TYPE_PRODUCT, $parent, 'parent').'  
    '; @@ -681,7 +682,7 @@ if ($id > 0 || !empty($ref)) { print ''; $labeltoshow = $objp->label; - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->labelm)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($objp->labelm)) { $labeltoshow = $objp->labelm; } diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 79ff858ba6e..c24082ae6e6 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -28,6 +28,8 @@ * \brief Page des documents joints sur les produits */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -38,9 +40,12 @@ if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php'; } + // Load translation files required by the page $langs->loadLangs(array('other', 'products')); + +// Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -74,25 +79,26 @@ if (!$sortfield) { $sortfield = "position_name"; } - +// Initialize objects $object = new Product($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); - } elseif (!empty($conf->service->enabled)) { + } elseif (isModEnabled("service")) { $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); } - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { // For backward compatiblity, we scan also old dirs - if (!empty($conf->product->enabled)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { // For backward compatiblity, we scan also old dirs + if (isModEnabled("product")) { $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; } else { $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; } } } + $modulepart = 'produit'; @@ -148,14 +154,14 @@ if ($action == 'filemerge' && $permissiontoadd) { $filetomerge_file_array = GETPOST('filetoadd'); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $lang_id = GETPOST('lang_id', 'aZ09'); } // Delete all file already associated $filetomerge = new Propalmergepdfproduct($db); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $result = $filetomerge->delete_by_product($user, $object->id, $lang_id); } else { $result = $filetomerge->delete_by_product($user, $object->id); @@ -170,7 +176,7 @@ if ($action == 'filemerge' && $permissiontoadd) { $filetomerge->fk_product = $object->id; $filetomerge->file_name = $filetomerge_file; - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $filetomerge->lang = $lang_id; } @@ -222,7 +228,7 @@ if ($object->id) { // Build file list $filearray = dol_dir_list($upload_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 + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { // For backward compatiblity, we scan also old dirs $filearrayold = dol_dir_list($upload_dirold, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $filearray = array_merge($filearray, $filearrayold); } @@ -265,7 +271,7 @@ if ($object->id) { if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { $filetomerge = new Propalmergepdfproduct($db); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $lang_id = GETPOST('lang_id', 'aZ09'); $result = $filetomerge->fetch_by_product($object->id, $lang_id); } else { @@ -277,7 +283,7 @@ if ($object->id) { $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { // For backward compatiblity, we scan also old dirs + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { // For backward compatiblity, we scan also old dirs $filearray = array_merge($filearray, dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1)); } @@ -299,7 +305,7 @@ if ($object->id) { print '
    '; print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); @@ -2341,7 +2392,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Batch number management (to batch) - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print '
    '.$langs->trans("ManageLotSerial").''; print $object->getLibStatut(0, 2); @@ -2360,7 +2411,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancySellCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->accountancy_code_sell, 1); @@ -2377,7 +2428,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancySellIntraCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell_intra)) { $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $object->accountancy_code_sell_intra, 1); @@ -2394,7 +2445,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancySellExportCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell_export)) { $accountingaccount3 = new AccountingAccount($db); $accountingaccount3->fetch('', $object->accountancy_code_sell_export, 1); @@ -2410,7 +2461,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancyBuyCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy)) { $accountingaccount4 = new AccountingAccount($db); $accountingaccount4->fetch('', $object->accountancy_code_buy, 1); @@ -2427,7 +2478,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancyBuyIntraCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy_intra)) { $accountingaccount5 = new AccountingAccount($db); $accountingaccount5->fetch('', $object->accountancy_code_buy_intra, 1); @@ -2444,7 +2495,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancyBuyExportCode"); print ''; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy_export)) { $accountingaccount6 = new AccountingAccount($db); $accountingaccount6->fetch('', $object->accountancy_code_buy_export, 1); @@ -2468,7 +2519,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Default warehouse - if ($object->isProduct() && !empty($conf->stock->enabled)) { + if ($object->isProduct() && isModEnabled('stock')) { $warehouse = new Entrepot($db); $warehouse->fetch($object->fk_default_warehouse); @@ -2477,8 +2528,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$langs->trans("DefaultWorkstation").''; + print (!empty($workstation->id) ? $workstation->getNomUrl(1) : ''); + print '
    '.$form->textwithpicto($langs->trans("DefaultBOM"), $langs->trans("DefaultBOMDesc", $langs->transnoentitiesnoconv("Finished"))).''; if ($object->fk_default_bom) { $bom_static = new BOM($db); @@ -2775,7 +2835,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == //print '
    '; // Propals - if (!empty($conf->propal->enabled) && $user->rights->propale->creer) { + if (isModEnabled("propal") && $user->rights->propal->creer) { $propal = new Propal($db); $langs->load("propal"); @@ -2796,7 +2856,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == } // Commande - if (!empty($conf->commande->enabled) && $user->rights->commande->creer) { + if (isModEnabled('commande') && $user->rights->commande->creer) { $commande = new Commande($db); $langs->load("orders"); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index da19c78b565..76ee11f727e 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -253,7 +253,7 @@ class Products extends DolibarrApi if (!$ids_only) { $product_static = new Product($this->db); if ($product_static->fetch($obj->rowid)) { - if ($includestockdata && DolibarrApiAccess::$user->rights->stock->lire) { + if (!empty($includestockdata) && DolibarrApiAccess::$user->rights->stock->lire) { $product_static->load_stock(); if (is_array($product_static->stock_warehouse)) { @@ -354,7 +354,7 @@ class Products extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $oldproduct = dol_clone($this->product, 0); + $oldproduct = dol_clone($this->product); foreach ($request_data as $field => $value) { if ($field == 'id') { @@ -682,7 +682,7 @@ class Products extends DolibarrApi if ($thirdparty_id) { $filter['t.fk_soc'] .= $thirdparty_id; } - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); } if (empty($prodcustprice->lines)) { @@ -1656,10 +1656,10 @@ class Products extends DolibarrApi $combinations[$key]->attributes = $prodc2vp->fetchByFkCombination((int) $combination->id); $combinations[$key] = $this->_cleanObjectDatas($combinations[$key]); - if ($includestock==1 && DolibarrApiAccess::$user->rights->stock->lire) { + if (!empty($includestock) && DolibarrApiAccess::$user->rights->stock->lire) { $productModel = new Product($this->db); $productModel->fetch((int) $combination->fk_product_child); - $productModel->load_stock(); + $productModel->load_stock($includestock); $combinations[$key]->stock_warehouse = $this->_cleanObjectDatas($productModel)->stock_warehouse; } } @@ -2052,8 +2052,8 @@ class Products extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includestockdata && DolibarrApiAccess::$user->rights->stock->lire) { - $this->product->load_stock(); + if (!empty($includestockdata) && DolibarrApiAccess::$user->rights->stock->lire) { + $this->product->load_stock($includestockdata); if (is_array($this->product->stock_warehouse)) { foreach ($this->product->stock_warehouse as $keytmp => $valtmp) { diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 4ede9e1e297..75a929f53e5 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -42,6 +42,7 @@ class FormProduct // Cache arrays public $cache_warehouses = array(); public $cache_lot = array(); + public $cache_workstations = array(); /** @@ -172,6 +173,63 @@ class FormProduct } } + /** + * Load in cache array list of workstations + * If fk_product is not 0, we do not use cache + * + * @param int $fk_product Add quantity of stock in label for product with id fk_product. Nothing if 0. + * @param array $exclude warehouses ids to exclude + * @param string $orderBy [='e.ref'] Order by + * @return int Nb of loaded lines, 0 if already loaded, <0 if KO + * @throws Exception + */ + public function loadWorkstations($fk_product = 0, $exclude = array(), $orderBy = 'w.ref') + { + global $conf, $langs; + + if (empty($fk_product) && count($this->cache_workstations)) { + return 0; // Cache already loaded and we do not want a list with information specific to a product + } + + $sql = "SELECT w.rowid, w.ref as ref, w.label as label, w.type, w.nb_operators_required,w.thm_operator_estimated,w.thm_machine_estimated"; + $sql .= " FROM ".$this->db->prefix()."workstation_workstation as w"; + $sql .= " WHERE 1 = 1"; + if (!empty($fk_product) && $fk_product > 0) { + $sql .= " AND w.fk_product = ".((int) $fk_product); + } + $sql .= " AND w.entity IN (".getEntity('workstation').")"; + + if (is_array($exclude) && !empty($exclude)) { + $sql .= ' AND w.rowid NOT IN('.$this->db->sanitize(implode(',', $exclude)).')'; + } + + $sql .= " ORDER BY ".$orderBy; + + dol_syslog(get_class($this).'::loadWorkstations', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $obj = $this->db->fetch_object($resql); + + $this->cache_workstations[$obj->rowid]['id'] = $obj->rowid; + $this->cache_workstations[$obj->rowid]['ref'] = $obj->ref; + $this->cache_workstations[$obj->rowid]['label'] = $obj->label; + $this->cache_workstations[$obj->rowid]['type'] = $obj->type; + $this->cache_workstations[$obj->rowid]['nb_operators_required'] = $obj->nb_operators_required; + $this->cache_workstations[$obj->rowid]['thm_operator_estimated'] = $obj->thm_operator_estimated; + $this->cache_workstations[$obj->rowid]['thm_machine_estimated'] = $obj->thm_machine_estimated; + $i++; + } + + return $num; + } else { + dol_print_error($this->db); + return -1; + } + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return full path to current warehouse in $tab (recursive function) @@ -320,6 +378,105 @@ class FormProduct return $out; } + /** + * Return list of workstations + * + * @param string|int $selected Id of preselected warehouse ('' or '-1' for no value, 'ifone' and 'ifonenodefault' = select value if one value otherwise no value, '-2' to use the default value from setup) + * @param string $htmlname Name of html select html + * @param int $empty 1=Can be empty, 0 if not + * @param int $disabled 1=Select is disabled + * @param int $fk_product Add quantity of stock in label for product with id fk_product. Nothing if 0. + * @param string $empty_label Empty label if needed (only if $empty=1) + * @param int $forcecombo 1=Force combo iso ajax select2 + * @param array $events Events to add to select2 + * @param string $morecss Add more css classes to HTML select + * @param array $exclude Warehouses ids to exclude + * @param int $showfullpath 1=Show full path of name (parent ref into label), 0=Show only ref of current warehouse + * @param string $orderBy [='e.ref'] Order by + * @return string HTML select + * + * @throws Exception + */ + public function selectWorkstations($selected = '', $htmlname = 'idworkstations', $empty = 0, $disabled = 0, $fk_product = 0, $empty_label = '', $forcecombo = 0, $events = array(), $morecss = 'minwidth200', $exclude = array(), $showfullpath = 1, $orderBy = 'e.ref') + { + global $conf, $langs, $user, $hookmanager; + + dol_syslog(get_class($this)."::selectWorkstations $selected, $htmlname, $empty, $disabled, $fk_product, $empty_label, $forcecombo, $morecss", LOG_DEBUG); + + $filterstatus=''; + $out = ''; + if (!empty($fk_product) && $fk_product > 0) { + $this->cache_workstations = array(); + } + + $this->loadWorkstations($fk_product); + $nbofworkstations = count($this->cache_workstations); + + if ($conf->use_javascript_ajax && !$forcecombo) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $comboenhancement = ajax_combobox($htmlname, $events); + $out .= $comboenhancement; + } + + if (strpos($htmlname, 'search_') !== 0) { + if (empty($user->fk_workstation) || $user->fk_workstation == -1) { + if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WORKSTATION)) { + $selected = $conf->global->MAIN_DEFAULT_WORKSTATION; + } + } else { + if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WORKSTATION)) { + $selected = $user->fk_workstation; + } + } + } + + $out .= ''; // Type - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { + if (isModEnabled("product") && isModEnabled("service")) { $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; } } else { print ''; - print ''; + print ''; print ''; } print '
    '; print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); @@ -293,7 +294,7 @@ if ($id > 0 || !empty($ref)) { $prods_arbo = $object->get_arbo_each_prod(); $tmpid = $id; - if (! empty($conf->use_javascript_ajax)) { + if (!empty($conf->use_javascript_ajax)) { $nboflines = $prods_arbo; $table_element_line='product_association'; @@ -329,13 +330,13 @@ if ($id > 0 || !empty($ref)) { print '
    '.$productstatic->getNomUrl(1, 'composition').''.$productstatic->label.''.$value['qty'].''.dol_escape_htmltag($productstatic->label).''.dol_escape_htmltag($value['qty']).'
    '.$langs->trans("None").''.$langs->trans("None").'
    '; @@ -368,7 +369,7 @@ if ($id > 0 || !empty($ref)) { // Min customer price print '
    '.$langs->trans('MinCustomerPrice').''.$langs->trans('Stock').''.$value['stock'].'  
    '.$langs->trans("None").''.$langs->trans("None").'
    '.$productstatic->getNomUrl(1, '', 24).'
    '; // Get language - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $langs->load("languages"); print ''; - // Date start - Date end + // Date start - Date end task print ''; if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print ''; + + if ($conf->service->enabled && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) { + print ''; + } } // Hook fields $parameters = array('mode' => 'create'); @@ -1534,6 +1779,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print ''; + + if ($conf->service->enabled && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) { + print ''; + } } // Fields from hook @@ -1580,16 +1831,32 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; // Date if (!empty($arrayfields['t.task_date']['checked'])) { - print ''; } + // Thirdparty + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print ''; + } + + // Thirdparty alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + } + if (!empty($allprojectforuser)) { - print ''; + if (!empty($arrayfields['p.project_ref']['checked'])) { + print ''; + } + if (!empty($arrayfields['p.project_label']['checked'])) { + print ''; + } } // Task if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task @@ -1612,6 +1879,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.task_duration']['checked'])) { print ''; } + // Product + if (!empty($arrayfields['t.fk_product']['checked'])) { + print ''; + } // Value in main currency if (!empty($arrayfields['value']['checked'])) { print ''; @@ -1640,8 +1911,20 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.task_date']['checked'])) { print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); } + + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder); + } if (!empty($allprojectforuser)) { - print_liste_field_titre("Project", $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['p.project_ref']['checked'])) { + print_liste_field_titre("Project", $_SERVER['PHP_SELF'], 'p.ref', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.project_label']['checked'])) { + print_liste_field_titre("ProjectLabel", $_SERVER['PHP_SELF'], 'p.title', '', $param, '', $sortfield, $sortorder); + } } if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task if (!empty($arrayfields['t.task_ref']['checked'])) { @@ -1660,6 +1943,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.task_duration']['checked'])) { print_liste_field_titre($arrayfields['t.task_duration']['label'], $_SERVER['PHP_SELF'], 't.task_duration', '', $param, '', $sortfield, $sortorder, 'right '); } + if (!empty($arrayfields['t.fk_product']['checked'])) { + print_liste_field_titre($arrayfields['t.fk_product']['label'], $_SERVER['PHP_SELF'], 't.fk_product', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['value']['checked'])) { print_liste_field_titre($arrayfields['value']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); } @@ -1684,7 +1971,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $total = 0; $totalvalue = 0; - $totalarray = array(); + $totalarray = array('nbfield'=>0); foreach ($tasks as $task_time) { if ($i >= $limit) { break; @@ -1713,23 +2000,78 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } } - // Project ref - if (!empty($allprojectforuser)) { - print ''; if (!$i) { $totalarray['nbfield']++; } } + // Thirdparty alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Project ref & label + if (!empty($allprojectforuser)) { + if (!empty($arrayfields['p.project_ref']['checked'])) { + print ''; + if (! $i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['p.project_label']['checked'])) { + print ''; + if (! $i) { + $totalarray['nbfield']++; + } + } + } + // Task ref if (!empty($arrayfields['t.task_ref']['checked'])) { if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task @@ -1826,11 +2168,36 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 't.task_duration'; } - $totalarray['val']['t.task_duration'] += $task_time->task_duration; + if (empty($totalarray['val']['t.task_duration'])) { + $totalarray['val']['t.task_duration'] = $task_time->task_duration; + } else { + $totalarray['val']['t.task_duration'] += $task_time->task_duration; + } if (!$i) { $totalarray['totaldurationfield'] = $totalarray['nbfield']; } - $totalarray['totalduration'] += $task_time->task_duration; + if (empty($totalarray['totalduration'])) { + $totalarray['totalduration'] = $task_time->task_duration; + } else { + $totalarray['totalduration'] += $task_time->task_duration; + } + } + + //Product + if (!empty($arrayfields['t.fk_product']['checked'])) { + print ''; } // Value spent @@ -1849,11 +2216,19 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'value'; } - $totalarray['val']['value'] += $value; + if (empty($totalarray['val']['value'])) { + $totalarray['val']['value'] = $value; + } else { + $totalarray['val']['value'] += $value; + } if (!$i) { $totalarray['totalvaluefield'] = $totalarray['nbfield']; } - $totalarray['totalvalue'] += $value; + if (empty($totalarray['totalvalue'])) { + $totalarray['totalvalue'] = $value; + } else { + $totalarray['totalvalue'] += $value; + } } // Invoiced @@ -1897,7 +2272,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ' '; print ''; } elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks - if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { + if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { print ' '; print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index a0e7ea817a7..e8d9f986f91 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -79,12 +79,13 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; // Security check if (empty($conf->agenda->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Agenda not enabled'); } // Not older than diff --git a/htdocs/public/cron/cron_run_jobs_by_url.php b/htdocs/public/cron/cron_run_jobs_by_url.php index bfc9b80ba44..2cbea50bb90 100644 --- a/htdocs/public/cron/cron_run_jobs_by_url.php +++ b/htdocs/public/cron/cron_run_jobs_by_url.php @@ -75,7 +75,7 @@ $langs->loadLangs(array("admin", "cron", "dict")); // Security check if (empty($conf->cron->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Cron not enabled'); } diff --git a/htdocs/datapolicy/public/index.php b/htdocs/public/datapolicy/index.php similarity index 75% rename from htdocs/datapolicy/public/index.php rename to htdocs/public/datapolicy/index.php index 104b393bf7e..ea19759a87d 100644 --- a/htdocs/datapolicy/public/index.php +++ b/htdocs/public/datapolicy/index.php @@ -1,5 +1,4 @@ * * This program is free software: you can redistribute it and/or modify @@ -19,108 +18,120 @@ /** * \file htdocs/datapolicy/admin/setup.php * \ingroup datapolicy - * \brief datapolicy setup page. + * \brief Page to show the result of updating it Data policiy preferences after an email campaign using sendMailDataPolicyContact() */ if (!defined('NOLOGIN')) { define("NOLOGIN", 1); // This means this output page does not require to be logged. } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -} if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; $idc = GETPOST('c', 'int'); $ids = GETPOST('s', 'int'); $ida = GETPOST('a', 'int'); -$action = GETPOST('action', 'aZ09'); -$lang = GETPOST('l', 'alpha'); -$code = GETPOST('key', 'alpha'); +$action = GETPOST('action', 'aZ09'); // 1 or 2 +$l = GETPOST('l', 'alpha'); +$securitykey = GETPOST('key', 'alpha'); -$acc = "DATAPOLICIESACCEPT_".$lang; -$ref = "DATAPOLICIESREFUSE_".$lang; -$langs->load('datapolicy@datapolicy', 0, 0, $lang); +$acc = "DATAPOLICIESACCEPT_".$l; +$ref = "DATAPOLICIESREFUSE_".$l; +$langs->load('datapolicy', 0, 0, $l); + + +/* + * Actions + */ if (empty($action) || (empty($idc) && empty($ids) && empty($ida))) { + print 'Missing paramater s, c or a'; return 0; } elseif (!empty($idc)) { $contact = new Contact($db); $contact->fetch($idc); - $check = md5($contact->email); - if ($check != $code) { - $return = $langs->trans('ErrorEmailDATAPOLICIES'); + $check = dol_hash($contact->email, 'md5'); + if ($check != $securitykey) { + $return = $langs->trans('Bad value for key.'); } elseif ($action == 1) { $contact->array_options['options_datapolicy_consentement'] = 1; $contact->array_options['options_datapolicy_opposition_traitement'] = 0; $contact->array_options['options_datapolicy_opposition_prospection'] = 0; - $contact->array_options['options_datapolicy_date'] = date('Y-m-d', time()); + $contact->array_options['options_datapolicy_date'] = dol_now(); - $return = $conf->global->$acc; + $return = getDolGlobalString($acc); } elseif ($action == 2) { $contact->no_email = 1; $contact->array_options['options_datapolicy_consentement'] = 0; $contact->array_options['options_datapolicy_opposition_traitement'] = 1; $contact->array_options['options_datapolicy_opposition_prospection'] = 1; - $contact->array_options['options_datapolicy_date'] = date('Y-m-d', time()); + $contact->array_options['options_datapolicy_date'] = dol_now(); - $return = $conf->global->$ref; + $return = getDolGlobalString($ref); } $contact->update($idc); } elseif (!empty($ids)) { $societe = new Societe($db); $societe->fetch($ids); - $check = md5($societe->email); - if ($check != $code) { - $return = $langs->trans('ErrorEmailDATAPOLICIES'); + $check = dol_hash($societe->email, 'md5'); + if ($check != $securitykey) { + $return = $langs->trans('Bad value for key.'); } elseif ($action == 1) { $societe->array_options['options_datapolicy_consentement'] = 1; $societe->array_options['options_datapolicy_opposition_traitement'] = 0; $societe->array_options['options_datapolicy_opposition_prospection'] = 0; - $societe->array_options['options_datapolicy_date'] = date('Y-m-d', time()); - $return = $conf->global->$acc; + $societe->array_options['options_datapolicy_date'] = dol_now(); + + $return = getDolGlobalString($acc); } elseif ($action == 2) { $societe->array_options['options_datapolicy_consentement'] = 0; $societe->array_options['options_datapolicy_opposition_traitement'] = 1; $societe->array_options['options_datapolicy_opposition_prospection'] = 1; - $societe->array_options['options_datapolicy_date'] = date('Y-m-d', time()); + $societe->array_options['options_datapolicy_date'] = dol_now(); - $return = $conf->global->$ref; + $return = getDolGlobalString($ref); } $societe->update($ids); } elseif (!empty($ida)) { $adherent = new Adherent($db); $adherent->fetch($ida); - $check = md5($adherent->email); - if ($check != $code) { - $return = $langs->trans('ErrorEmailDATAPOLICIES'); + $check = dol_hash($adherent->email, 'md5'); + if ($check != $securitykey) { + $return = $langs->trans('Bad value for key.'); } elseif ($action == 1) { $adherent->array_options['options_datapolicy_consentement'] = 1; $adherent->array_options['options_datapolicy_opposition_traitement'] = 0; $adherent->array_options['options_datapolicy_opposition_prospection'] = 0; - //$adherent->array_options['options_datapolicy_date'] = date('Y-m-d', time()); - $return = $conf->global->$acc; + //$adherent->array_options['options_datapolicy_date'] = dol_now(); + + $return = getDolGlobalString($acc); } elseif ($action == 2) { $adherent->array_options['options_datapolicy_consentement'] = 0; $adherent->array_options['options_datapolicy_opposition_traitement'] = 1; $adherent->array_options['options_datapolicy_opposition_prospection'] = 1; - //$adherent->array_options['options_datapolicy_date'] = date('Y-m-d', time()); + //$adherent->array_options['options_datapolicy_date'] = dol_now(); - $return = $conf->global->$ref; + $return = getDolGlobalString($ref); } $newuser = new User($db); $adherent->update($newuser); } -header("Content-type: text/html; charset=".$conf->file->character_set_client); + +/* + * View + */ + +top_httphead(); print ''; print "\n"; diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 49bde1a2b9b..f7274d5b06b 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -27,9 +27,6 @@ if (!defined('NOLOGIN')) { define('NOLOGIN', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', 1); } @@ -37,6 +34,7 @@ if (!defined('NOIPCHECK')) { define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip } +// Load Dolibarr environment require '../../main.inc.php'; require_once '../../core/lib/functions2.lib.php'; @@ -51,7 +49,7 @@ $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); // Security check global $dolibarr_main_demo; if (empty($dolibarr_main_demo)) { - accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page', 0, 0, 1); + httponly_accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page'); } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 87db3ee4133..509eb553288 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -25,9 +25,6 @@ if (!defined('NOLOGIN')) { define('NOLOGIN', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } @@ -55,12 +52,13 @@ function llxFooterVierge() print ''; } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; // Security check -if (empty($conf->don->enabled)) { - accessforbidden('', 0, 0, 1); +if (!isModEnabled('don')) { + httponly_accessforbidden('Module Donation not enabled'); } diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 7fac6ff323e..1c2bd6cea98 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -68,6 +68,7 @@ function llxFooter() } +// Load Dolibarr environment require '../../main.inc.php'; $mtid = GETPOST('mtid'); diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index 7c85d9a2fc0..a5291d06b7f 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -45,25 +45,15 @@ if (!defined('NOIPCHECK')) { if (!defined("NOSESSION")) { define("NOSESSION", '1'); } - -/** - * Header empty - * - * @return void - */ -function llxHeader() -{ +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php } -/** - * Footer empty - * - * @return void - */ -function llxFooter() -{ +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -71,9 +61,7 @@ global $user, $conf, $langs; $langs->loadLangs(array("main", "mails")); -$mtid = GETPOST('mtid'); -$email = GETPOST('email'); -$tag = GETPOST('tag'); +$tag = GETPOST('tag'); // To retreive the emailing, and recipient $unsuscrib = GETPOST('unsuscrib'); $securitykey = GETPOST('securitykey'); @@ -84,104 +72,98 @@ $securitykey = GETPOST('securitykey'); dol_syslog("public/emailing/mailing-read.php : tag=".$tag." securitykey=".$securitykey, LOG_DEBUG); -if ($securitykey != $conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) { +if ($securitykey != getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')) { print 'Bad security key value.'; exit; } - -if (!empty($tag) && ($unsuscrib == '1')) { - dol_syslog("public/emailing/mailing-unsubscribe.php : Launch unsubscribe requests", LOG_DEBUG); - - $sql = "SELECT mc.rowid, mc.email, mc.statut, m.entity"; - $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."mailing as m"; - $sql .= " WHERE mc.fk_mailing = m.rowid AND mc.tag='".$db->escape($tag)."'"; - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - } - - $obj = $db->fetch_object($resql); - - if (empty($obj)) { - print 'Email target not valid. Operation canceled.'; - exit; - } - if (empty($obj->email)) { - print 'Email target not valid. Operation canceled.'; - exit; - } - if ($obj->statut == 3) { - print 'Email target already set to unsubscribe. Operation canceled.'; - exit; - } - // TODO Test that mtid and email match also with the one found from $tag - /* - if ($obj->email != $email) - { - print 'Email does not match tagnot found. No need to unsubscribe.'; - exit; - } - */ - - // Update status of mail in recipient mailing list table - $statut = '3'; - $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".((int) $statut)." WHERE tag = '".$db->escape($tag)."'"; - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - } - - /* - // Update status communication of thirdparty prospect (old usage) - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag = '".$db->escape($tag)."' AND source_type='thirdparty' AND source_id is not null)"; - - $resql=$db->query($sql); - if (! $resql) dol_print_error($db); - - // Update status communication of contact prospect (old usage) - $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET no_email=1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag = '".$db->escape($tag)."' AND source_type='contact' AND source_id is not null)"; - - $resql=$db->query($sql); - if (! $resql) dol_print_error($db); - */ - - // Update status communication of email (new usage) - $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email, unsubscribegroup, ip) VALUES ('".$db->idate(dol_now())."', ".((int) $obj->entity).", '".$db->escape($obj->email)."', '', '".$db->escape(getUserRemoteIP())."')"; - - $resql = $db->query($sql); - //if (! $resql) dol_print_error($db); No test on errors, may fail if already unsubscribed - - - header("Content-type: text/html; charset=".$conf->file->character_set_client); - - // Security options - header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on) - header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks) - - print ''; - print "\n"; - print "\n"; - print "\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print "".$langs->trans("MailUnsubcribe")."\n"; - print ''."\n"; - print ''; - - print "\n"; - print ''."\n"; - print '
    '; @@ -310,7 +316,7 @@ if ($object->id) { print Form::selectarray('lang_id', $langs_available, $default_lang, 0, 0, 0, '', 0, 0, 0, 'ASC'); - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''; } @@ -322,7 +328,7 @@ if ($object->id) { $checked = ''; $filename = $filetoadd['name']; - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { if (array_key_exists($filetoadd['name'].'_'.$default_lang, $filetomerge->lines)) { $filename = $filetoadd['name'].' - '.$langs->trans('Language_'.$default_lang); $checked = ' checked '; diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 764ff919cc7..412d015f8b9 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -150,6 +150,8 @@ class PriceParser "length" => $product->length, "surface" => $product->surface, "price_min" => $product->price_min, + "cost_price" => $product->cost_price, + "pmp" => $product->pmp, )); //Retrieve all extrafield for product and add it to values diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 893cc654f89..5a95eb2bfc6 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -21,6 +21,7 @@ * \brief Page for editing expression */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; @@ -66,7 +67,8 @@ if ($action == 'add') { if ($eid == 0) { $result = $price_expression->find_title($title); if ($result == 0) { //No existing entry found with title, ok - //Check the expression validity by parsing it + // Check the expression validity by parsing it + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($db); $price_result = $priceparser->testExpression($id, $expression); if ($price_result < 0) { //Expression is not valid @@ -94,7 +96,8 @@ if ($action == 'update') { if ($eid != 0) { $result = $price_expression->find_title($title); if ($result == 0 || $result == $eid) { //No existing entry found with title or existing one is the current one, ok - //Check the expression validity by parsing it + // Check the expression validity by parsing it + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($db); $price_result = $priceparser->testExpression($id, $expression); if ($price_result < 0) { //Expression is not valid diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 9c9f0d3f982..c1b61913d9f 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -32,6 +32,7 @@ * \brief Page of tab suppliers for products */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -40,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; -if (!empty($conf->barcode->enabled)) { +if (isModEnabled('barcode')) { dol_include_once('/core/class/html.formbarcode.class.php'); } // Load translation files required by the page @@ -75,7 +76,7 @@ if ($user->socid) { $socid = $user->socid; } -if (empty($user->rights->fournisseur->lire)) { +if (empty($user->rights->fournisseur->lire) && (empty($conf->margin->enabled) && !$user->hasRight("margin", "liretous"))) { accessforbidden(); } @@ -243,7 +244,7 @@ if (empty($reshook)) { $_POST["price"] = 0; } } - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!GETPOST("multicurrency_code")) { $error++; $langs->load("errors"); @@ -302,7 +303,7 @@ if (empty($reshook)) { }*/ $object->packaging = $packaging; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $multicurrency_tx = price2num(GETPOST("multicurrency_tx", 'alpha')); $multicurrency_price = price2num(GETPOST("multicurrency_price", 'alpha')); $multicurrency_code = GETPOST("multicurrency_code", 'alpha'); @@ -315,8 +316,9 @@ if (empty($reshook)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } else { - if (!empty($conf->dynamicprices->enabled) && $price_expression !== '') { + if (isModEnabled('dynamicprices') && $price_expression !== '') { //Check the expression validity by parsing it + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($db); $object->fk_supplier_price_expression = $price_expression; $price_result = $priceparser->parseProductSupplier($object); @@ -325,7 +327,7 @@ if (empty($reshook)) { setEventMessages($priceparser->translatedError(), null, 'errors'); } } - if (!$error && !empty($conf->dynamicprices->enabled)) { + if (!$error && isModEnabled('dynamicprices')) { //Set the price expression for this supplier price $ret = $object->setSupplierPriceExpression($price_expression); if ($ret < 0) { @@ -400,7 +402,7 @@ if ($id > 0 || $ref) { print ''; // Type - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { + if (isModEnabled("product") && isModEnabled("service")) { $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); print ''; @@ -600,7 +639,7 @@ if ($id > 0 || $ref) { print ''; print ''; - if (!empty($conf->dynamicprices->enabled)) { //Only show price mode and expression selector if module is enabled + if (isModEnabled('dynamicprices')) { //Only show price mode and expression selector if module is enabled // Price mode selector print ''; print ''; // Barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { $formbarcode = new FormBarCode($db); // Barcode type @@ -763,7 +802,7 @@ END; // Option to define a transport cost on supplier price if (!empty($conf->global->PRODUCT_CHARGES)) { - if (!empty($conf->margin->enabled)) { + if (isModEnabled('margin')) { print ''; print ''; print ''; print ''; @@ -879,7 +918,7 @@ END; print "\n"; - if ($user->rights->fournisseur->lire) { // Duplicate ? this check is already in the head of this file + if ($user->hasRight("fournisseur", "read")) { // Duplicate ? this check is already in the head of this file $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); @@ -909,8 +948,8 @@ END; 'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5), 'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9), 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => isModEnabled('multicurrency'), 'checked'=>0, 'position'=>10), - 'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>1, 'position'=>13), - 'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>1, 'position'=>14), + 'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>-1, 'position'=>13), + 'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>-1, 'position'=>14), 'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>15), 'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>16), 'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => getDolGlobalInt('PRODUCT_USE_SUPPLIER_PACKAGING'), 'checked'=>0, 'position'=>17), @@ -980,7 +1019,7 @@ END; $nbfields++; print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); $nbfields++; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); $nbfields++; } @@ -992,7 +1031,7 @@ END; print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right '); $nbfields++; } - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); $nbfields++; } @@ -1109,7 +1148,7 @@ END; print $productfourn->fourn_price ? ''.price($productfourn->fourn_price).'' : ""; print ''; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { // Price for the quantity in currency print ''; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 40141fce304..a25737d5583 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -28,6 +28,8 @@ * \brief Homepage products and services */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -47,6 +49,7 @@ $langs->loadLangs(array('products', 'stocks')); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks $hookmanager->initHooks(array('productindex')); +// Initialize objects $product_static = new Product($db); // Security check @@ -90,7 +93,7 @@ print '
    '; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo // Search contract - if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { + if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->produit->lire || $user->rights->service->lire)) { $listofsearchfields['search_product'] = array('text'=>'ProductOrService'); } @@ -123,7 +126,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be /* * Number of products and/or services */ -if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { +if ((isModEnabled("product") || isModEnabled("service")) && ($user->hasRight("produit", "lire") || $user->hasRight("service", "lire"))) { $prodser = array(); $prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0; $prodser[0]['sell'] = 0; @@ -185,12 +188,12 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $total = $SommeA + $SommeB + $SommeC + $SommeD + $SommeE + $SommeF; $dataseries = array(); - if (!empty($conf->product->enabled)) { + if (isModEnabled("product")) { $dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnSale"), round($SommeA)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnPurchase"), round($SommeB)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsNotOnSell"), round($SommeC)); } - if (!empty($conf->service->enabled)) { + if (isModEnabled("service")) { $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnSale"), round($SommeD)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnPurchase"), round($SommeE)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesNotOnSell"), round($SommeF)); @@ -212,7 +215,7 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us } -if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) { +if (isModEnabled('categorie') && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '
    '; print '
    '; @@ -281,7 +284,7 @@ print '
    '; /* * Latest modified products */ -if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { +if ((isModEnabled("product") || isModEnabled("service")) && ($user->hasRight("produit", "lire") || $user->hasRight("service", "lire"))) { $max = 15; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; $sql .= " p.entity,"; @@ -338,8 +341,13 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $product_static->status_buy = $objp->tobuy; $product_static->status_batch = $objp->tobatch; + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read'); + if ($product_static->isService()) { + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read'); + } + // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product = ".((int) $objp->rowid); @@ -365,9 +373,11 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us print ""; // Sell price if (empty($conf->global->PRODUIT_MULTIPRICES)) { - if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_price_expression)) { + if (isModEnabled('dynamicprices') && !empty($objp->fk_price_expression)) { $product = new Product($db); $product->fetch($objp->rowid); + + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $priceparser = new PriceParser($db); $price_result = $priceparser->parseProduct($product); if ($price_result >= 0) { @@ -375,10 +385,12 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us } } print '
    '; } @@ -407,11 +419,11 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us // TODO Move this into a page that should be available into menu "accountancy - report - turnover - per quarter" // Also method used for counting must provide the 2 possible methods like done by all other reports into menu "accountancy - report - turnover": // "commitment engagment" method and "cash accounting" method -if (!empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) { - if (!empty($conf->product->enabled)) { +if (isModEnabled("invoice") && $user->hasRight('facture', 'lire') && getDolGlobalString('MAIN_SHOW_PRODUCT_ACTIVITY_TRIM')) { + if (isModEnabled("product")) { activitytrim(0); } - if (!empty($conf->service->enabled)) { + if (isModEnabled("service")) { activitytrim(1); } } diff --git a/htdocs/product/inventory/ajax/searchfrombarcode.php b/htdocs/product/inventory/ajax/searchfrombarcode.php index 68ffee43c23..efe4d65f2d3 100644 --- a/htdocs/product/inventory/ajax/searchfrombarcode.php +++ b/htdocs/product/inventory/ajax/searchfrombarcode.php @@ -1,5 +1,4 @@ id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -335,7 +336,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } } else { - if (! empty($object->fk_project)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= $proj->getNomUrl(); @@ -416,17 +417,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - /*if ($permissiontoadd) - { - print ''.$langs->trans("ToClone").''."\n"; - }*/ - - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; + if ($permissiontoadd) { + //print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=inventory', 'clone', $permissiontoadd); } + + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print ''."\n"; } diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index e0e2f9c59da..9acc4232490 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; /** * Class for Inventory */ + class Inventory extends CommonObject { /** @@ -60,10 +61,10 @@ class Inventory extends CommonObject */ public $picto = 'inventory'; - const STATUS_DRAFT = 0; // Draft + const STATUS_DRAFT = 0; // Draft const STATUS_VALIDATED = 1; // Inventory is in process - const STATUS_RECORDED = 2; // Inventory is finisged. Stock movement has been recorded. - const STATUS_CANCELED = 9; // Canceled + const STATUS_RECORDED = 2; // Inventory is finisged. Stock movement has been recorded. + const STATUS_CANCELED = 9; // Canceled /** * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') @@ -96,22 +97,22 @@ class Inventory extends CommonObject * @var array Array with all fields and their property */ 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(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object', 'css'=>'maxwidth200'), - 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), - 'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax200'), - 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'InventoryForASpecificWarehouse', 'picto'=>'stock', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'), - 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'InventoryForASpecificProduct', 'picto'=>'product', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'), - 'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>'$conf->global->STOCK_INVENTORY_ADD_A_VALUE_DATE', 'position'=>35), // This date is not used so disabled by default. - 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), - 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), - 'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502), - 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax200'), - 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511, 'csslist'=>'tdoverflowmax200'), - 'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512, 'csslist'=>'tdoverflowmax200'), - 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), - - 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Closed', 9=>'Canceled')) + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',), + 'ref' => array('type'=>'varchar(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object', 'css'=>'maxwidth200'), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), + 'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax200'), + 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'InventoryForASpecificWarehouse', 'picto'=>'stock', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'), + 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'get_name_url_params' => '0::0:-1:0::1', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'InventoryForASpecificProduct', 'picto'=>'product', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'), + 'categories_product' => array('type'=>'chkbxlst:categorie:label:rowid::type=0:0:', 'label'=>'OrProductsWithCategories', 'visible'=>3, 'enabled'=>1, 'position'=>33, 'help'=>'', 'picto'=>'category', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx'), + 'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>'$conf->global->STOCK_INVENTORY_ADD_A_VALUE_DATE', 'position'=>35, 'csslist'=>'nowraponall'), // This date is not used so disabled by default. + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500, 'csslist'=>'nowraponall'), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501, 'csslist'=>'nowraponall'), + 'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502, 'csslist'=>'nowraponall'), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax200'), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511, 'csslist'=>'tdoverflowmax200'), + 'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512, 'csslist'=>'tdoverflowmax200'), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), + 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Closed', 9=>'Canceled')) ); /** @@ -139,6 +140,10 @@ class Inventory extends CommonObject */ public $fk_product; + /** + * @var string Categories id separated by comma + */ + public $categories_product; public $date_inventory; public $title; @@ -156,8 +161,6 @@ class Inventory extends CommonObject * @var integer|string date_validation */ public $date_validation; - - public $tms; /** @@ -230,7 +233,7 @@ class Inventory extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled)) { + if (!isModEnabled('multicompany')) { $this->fields['entity']['enabled'] = 0; } } @@ -291,6 +294,14 @@ class Inventory extends CommonObject if ($this->fk_warehouse > 0) { $sql .= " AND ps.fk_entrepot = ".((int) $this->fk_warehouse); } + if (!empty($this->categories_product)) { + $sql .= " AND EXISTS ("; + $sql .= " SELECT cp.fk_product"; + $sql .= " FROM ".$this->db->prefix()."categorie_product AS cp"; + $sql .= " WHERE cp.fk_product = ps.fk_product"; + $sql .= " AND cp.fk_categorie IN (".$this->db->sanitize($this->categories_product).")"; + $sql .= ")"; + } $inventoryline = new InventoryLine($this->db); @@ -477,7 +488,7 @@ class Inventory extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } @@ -750,9 +761,9 @@ class InventoryLine extends CommonObjectLine * @var array Array with all fields and their property */ public $fields = array( - 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',), + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',), 'fk_inventory' => array('type'=>'integer:Inventory:product/inventory/class/inventory.class.php', 'label'=>'Inventory', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'LinkToInventory'), - 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'LinkToThirparty'), + 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'LinkToThirdparty'), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'LinkToProduct'), 'batch' => array('type'=>'string', 'label'=>'Batch', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'LinkToProduct'), 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), @@ -760,8 +771,8 @@ class InventoryLine extends CommonObjectLine 'qty_stock' => array('type'=>'double', 'label'=>'QtyFound', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'Qty we found/want (to define during draft edition)'), 'qty_view' => array('type'=>'double', 'label'=>'QtyBefore', 'visible'=>1, 'enabled'=>1, 'position'=>33, 'index'=>1, 'help'=>'Qty before (filled once movements are validated)'), 'qty_regulated' => array('type'=>'double', 'label'=>'QtyDelta', 'visible'=>1, 'enabled'=>1, 'position'=>34, 'index'=>1, 'help'=>'Qty aadded or removed (filled once movements are validated)'), - 'pmp_real' => array('type'=>'double', 'label'=>'PMPReal', 'visible'=>1, 'enabled'=>1, 'position'=>35), - 'pmp_expected' => array('type'=>'double', 'label'=>'PMPExpected', 'visible'=>1, 'enabled'=>1, 'position'=>36), + 'pmp_real' => array('type'=>'double', 'label'=>'PMPReal', 'visible'=>1, 'enabled'=>1, 'position'=>35), + 'pmp_expected' => array('type'=>'double', 'label'=>'PMPExpected', 'visible'=>1, 'enabled'=>1, 'position'=>36), ); /** @@ -804,7 +815,7 @@ class InventoryLine extends CommonObjectLine public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 3d0dea9e3b7..f0ac5395d9f 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -21,6 +21,7 @@ * \brief Tabe to enter counting */ +// Load Dolibarr environment require '../../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; @@ -41,6 +42,15 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorycard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); +$listoffset = GETPOST('listoffset', 'alpha'); +$limit = GETPOST('limit', 'int') > 0 ?GETPOST('limit', 'int') : $conf->liste_limit; +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page == -1) { + $page = 0; +} +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; $fk_warehouse = GETPOST('fk_warehouse', 'int'); $fk_product = GETPOST('fk_product', 'int'); @@ -86,6 +96,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'mymodule', $id); +//Parameters Page +$param = '&id='.$object->id; +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +$paramwithsearch = $param; + + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $permissiontoadd = $user->rights->stock->creer; $permissiontodelete = $user->rights->stock->supprimer; @@ -97,6 +115,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $now = dol_now(); + /* * Actions */ @@ -161,7 +180,7 @@ if (empty($reshook)) { // Get the real quantity in stock now, but before the stock move for inventory. $realqtynow = $product_static->stock_warehouse[$line->fk_warehouse]->real; - if ($conf->productbatch->enabled && $product_static->hasbatch()) { + if (isModEnabled('productbatch') && $product_static->hasbatch()) { $realqtynow = $product_static->stock_warehouse[$line->fk_warehouse]->detail_batch[$line->batch]->qty; } @@ -246,6 +265,7 @@ if (empty($reshook)) { $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated'; $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id'; $sql .= ' WHERE id.fk_inventory = '.((int) $object->id); + $sql .= $db->plimit($limit, $offset); $db->begin(); @@ -296,7 +316,7 @@ if (empty($reshook)) { } } - // Update user that update quantities + // Update line with id of stock movement (and the start quantity if it has changed this last recording) if (! $error) { $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."inventory"; $sqlupdate .= " SET fk_user_modif = ".((int) $user->id); @@ -315,9 +335,8 @@ if (empty($reshook)) { } } - $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php'; - $backtopage = DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id; + $backtopage = DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&page='.$page.$paramwithsearch; // Actions cancel, add, update, delete or clone include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; @@ -348,7 +367,7 @@ if (empty($reshook)) { $error++; setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors'); } - if (!$error && !empty($conf->productbatch->enabled)) { + if (!$error && isModEnabled('productbatch')) { $tmpproduct = new Product($db); $result = $tmpproduct->fetch($fk_product); @@ -408,30 +427,6 @@ $help_url = ''; llxHeader('', $langs->trans('Inventory'), $help_url); - -// Disable button Generate movement if data were modified and not saved -print ''; - - // Part to show record if ($object->id > 0) { $res = $object->fetch_optionals(); @@ -447,7 +442,7 @@ if ($object->id > 0) { } // Confirmation to delete line if ($action == 'deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid.'&page='.$page.$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -494,7 +489,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -516,7 +511,7 @@ if ($object->id > 0) { } } } else { - if (! empty($object->fk_project)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref.=$proj->getNomUrl(); @@ -553,8 +548,7 @@ if ($object->id > 0) { print dol_get_fiche_end(); - - print ''; + print ''; print ''; print ''; print ''; @@ -608,7 +602,7 @@ if ($object->id > 0) { if (!empty($conf->use_javascript_ajax)) { if ($permissiontoadd) { // Link to launch scan tool - if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) { + if (isModEnabled('barcode') || isModEnabled('productbatch')) { print ''.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").''; } @@ -906,7 +900,7 @@ if ($object->id > 0) { print ''; print ''; print ''; - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; @@ -944,7 +938,7 @@ if ($object->id > 0) { print ''; - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; @@ -979,7 +973,8 @@ if ($object->id > 0) { $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated, id.fk_movement, id.pmp_real, id.pmp_expected'; $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id'; $sql .= ' WHERE id.fk_inventory = '.((int) $object->id); - $sql .= ' ORDER BY id.rowid'; + $sql .= $db->order('id.rowid', 'ASC'); + $sql .= $db->plimit($limit, $offset); $cacheOfProducts = array(); $cacheOfWarehouses = array(); @@ -989,6 +984,10 @@ if ($object->id > 0) { if ($resql) { $num = $db->num_rows($resql); + if (!empty($limit != 0) || $num > $limit || $page) { + print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num >= $limit), '', '', $limit); + } + $i = 0; $hasinput = false; $totalarray = array(); @@ -1027,7 +1026,7 @@ if ($object->id > 0) { print $product_static->getNomUrl(1).' - '.$product_static->label; print ''; - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; } else { if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { //PMP Expected - if (! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; + if (!empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; else $pmp_expected = $product_static->pmp; $pmp_valuation = $pmp_expected * $valuetoshow; print ''; print ''; @@ -671,16 +701,6 @@ if ($action == 'create' && $user->rights->projet->creer) { } print ''; - // Date start - print ''; - - // Date end - print ''; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status print ''; @@ -706,6 +726,27 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print ''; + // Date project + print ''; + + if (isModEnabled('eventorganization')) { + // Date event + print ''; + + // Location + print ''; + print ''; + print ''; + } + // Description print ''; print ''; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { // Categories print ''; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -896,10 +938,25 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')) . '"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print ''; + print ''; } print ''; } @@ -979,9 +1036,18 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; } - // Date start - print ''; + print ''; + print ''; + + // Date project + print ''; - // Date end - print ''; + if (isModEnabled('eventorganization')) { + // Date event + print ''; - // Budget - print ''; - print ''; - print ''; + // Location + print ''; + print ''; + print ''; + } // Description print ''; @@ -1041,7 +1109,7 @@ if ($action == 'create' && $user->rights->projet->creer) { // Title $morehtmlref .= dol_escape_htmltag($object->title); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '; + $morehtmlref .= '
    '; if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { $morehtmlref .= $object->thirdparty->getNomUrl(1, 'project'); } @@ -1062,7 +1130,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
    '; print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, 0, $typeformat) : $langs->trans('Type'); @@ -509,6 +511,43 @@ if ($id > 0 || $ref) { print ''; } } + print ''; } print '
    '.$langs->trans("PriceMode").''; $price_expression = new PriceExpression($db); @@ -633,7 +672,7 @@ if ($id > 0 || $ref) { '; } - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { // Currency print '
    '.$langs->trans("Currency").''; @@ -748,7 +787,7 @@ END; print '
    '.$langs->trans("Charges").''; @@ -781,7 +820,7 @@ END; print ''.$langs->trans('ProductSupplierDescription').''; - $doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_PRODUCTDESC'), ROWS_4, '90%'); + $doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), ROWS_4, '90%'); $doleditor->Create(); print ''; print $productfourn->fourn_multicurrency_price ? ''.price($productfourn->fourn_multicurrency_price).'' : ""; @@ -1132,7 +1171,7 @@ END; } // Currency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print ''; print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : ''; print ''; - if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') { - print price($objp->price_ttc).' '.$langs->trans("TTC"); - } else { - print price($objp->price).' '.$langs->trans("HT"); + if ($usercancreadprice) { + if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') { + print price($objp->price_ttc).' '.$langs->trans("TTC"); + } else { + print price($objp->price).' '.$langs->trans("HT"); + } } print '
    '.$langs->trans("Warehouse").''.$langs->trans("Product").''; print $langs->trans("Batch"); print ''; print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOST('fk_product', 'int') : $object->fk_product), 'fk_product', '', 0, 0, -1, 2, '', 0, null, 0, '1', 0, 'maxwidth300'); print ''; print ''; print ''; $batch_static = new Productlot($db); $res = $batch_static->fetch(0, $product_static->id, $obj->batch); @@ -1044,7 +1043,7 @@ if ($object->id > 0) { $valuetoshow = $obj->qty_stock; // For inventory not yet close, we overwrite with the real value in stock now if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_VALIDATED) { - if (!empty($conf->productbatch->enabled) && $product_static->hasbatch()) { + if (isModEnabled('productbatch') && $product_static->hasbatch()) { $valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->detail_batch[$obj->batch]->qty; } else { $valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->real; @@ -1063,9 +1062,9 @@ if ($object->id > 0) { $hasinput = true; } - if (! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { + if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { //PMP Expected - if (! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; + if (!empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; else $pmp_expected = $product_static->pmp; $pmp_valuation = $pmp_expected * $valuetoshow; print ''; @@ -1087,7 +1086,7 @@ if ($object->id > 0) { print ''; - if (! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; + if (!empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; else $pmp_real = $product_static->pmp; $pmp_valuation_real = $pmp_real * $qty_view; print ''; @@ -1109,14 +1108,14 @@ if ($object->id > 0) { // Picto delete line print ''; - print ''.img_delete().''; + print ''.img_delete().''; $qty_tmp = price2num(GETPOST("id_".$obj->rowid."_input_tmp", 'MS')) >= 0 ? GETPOST("id_".$obj->rowid."_input_tmp") : $qty_view; print ''; print ''; @@ -1132,7 +1131,7 @@ if ($object->id > 0) { //PMP Real print ''; - if (! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; + if (!empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; else $pmp_real = $product_static->pmp; $pmp_valuation_real = $pmp_real * $obj->qty_view; print price($pmp_real); @@ -1194,8 +1193,50 @@ if ($object->id > 0) { } print ''; + print ''; + + + if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { ?> '; } print '
    '.$langs->trans("DateStart").''; - print $form->selectDate(($date_start ? $date_start : ''), 'projectstart', 0, 0, 0, '', 1, 0); - print '
    '.$langs->trans("DateEnd").''; - print $form->selectDate(($date_end ? $date_end : -1), 'projectend', 0, 0, 0, '', 1, 0); - print '
    '.$langs->trans("OpportunityStatus").'
    '.$langs->trans("Date").(isModEnabled('eventorganization') ? ' ('.$langs->trans("Project").')' : '').''; + print $form->selectDate(($date_start ? $date_start : ''), 'projectstart', 0, 0, 0, '', 1, 0); + print ' '.$langs->trans("to").' '; + print $form->selectDate(($date_end ? $date_end : -1), 'projectend', 0, 0, 0, '', 1, 0); + print '
    '.$langs->trans("Date").' ('.$langs->trans("Event").')'; + print $form->selectDate(($date_start_event ? $date_start_event : -1), 'date_start_event', 1, 1, 1, '', 1, 0); + print ' '.$langs->trans("to").' '; + print $form->selectDate(($date_end_event ? $date_end_event : -1), 'date_end_event', 1, 1, 1, '', 1, 0); + print '
    '.$langs->trans("Location").'
    '.$langs->trans("Description").''; @@ -713,7 +754,7 @@ if ($action == 'create' && $user->rights->projet->creer) { $doleditor->Create(); print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); @@ -850,15 +891,16 @@ if ($action == 'create' && $user->rights->projet->creer) { // Status print '
    '.$langs->trans("Status").''; - print ''; foreach ($object->statuts_short as $key => $val) { - print ''; + print ''; } print ''; + print ajax_combobox('status'); print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").''; + // Budget + print '
    '.$langs->trans("Budget").''; + print $langs->getCurrencySymbol($conf->currency); + print '
    '.$langs->trans("Date").(isModEnabled('eventorganization') ? ' ('.$langs->trans("Project").')' : '').''; print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0); + print ' '.$langs->trans("to").' '; + print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0); print '     rights->projet->creer) { print '/>'; print '
    '.$langs->trans("DateEnd").''; - print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0); - print '
    '.$langs->trans("Date").' ('.$langs->trans("Event").')'; + print $form->selectDate(($date_start_event ? $date_start_event : ($object->date_start_event ? $object->date_start_event : -1)), 'date_start_event', 1, 1, 1, '', 1, 0); + print ' '.$langs->trans("to").' '; + print $form->selectDate(($date_end_event ? $date_end_event : ($object->date_end_event ? $object->date_end_event : -1)), 'date_end_event', 1, 1, 1, '', 1, 0); + print '
    '.$langs->trans("Budget").''; - print $langs->getCurrencySymbol($conf->currency); - print '
    '.$langs->trans("Location").'
    '.$langs->trans("Description").'
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -1086,7 +1154,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -1141,18 +1209,6 @@ if ($action == 'create' && $user->rights->projet->creer) { */ } - // Date start - end - print ''; - // Budget print ''; + // Date start - end project + print ''; + // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; @@ -1274,7 +1342,7 @@ if ($action == 'create' && $user->rights->projet->creer) { if (empty($reshook)) { if ($action != "edit" && $action != 'presend') { // Create event - /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a + /*if (isModEnabled('agenda') && !empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a // "workflow" action so should appears somewhere else on // page. { @@ -1284,14 +1352,27 @@ if ($action == 'create' && $user->rights->projet->creer) { // Send if (empty($user->socid)) { if ($object->statut != Project::STATUS_CLOSED) { - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); } } + // Accounting Report + /* + $accouting_module_activated = isModEnabled('comptabilite') || isModEnabled('accounting'); + if ($accouting_module_activated && $object->statut != Project::STATUS_DRAFT) { + $start = dol_getdate((int) $object->date_start); + $end = dol_getdate((int) $object->date_end); + $url = DOL_URL_ROOT.'/compta/accounting-files.php?projectid='.$object->id; + if (!empty($object->date_start)) $url .= '&date_startday='.$start['mday'].'&date_startmonth='.$start['mon'].'&date_startyear='.$start['year']; + if (!empty($object->date_end)) $url .= '&date_stopday='.$end['mday'].'&date_stopmonth='.$end['mon'].'&date_stopyear='.$end['year']; + print dolGetButtonAction('', $langs->trans('ExportAccountingReportButtonLabel'), 'default', $url, ''); + } + */ + // Modify if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer) { if ($userWrite > 0) { - print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); } else { print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } @@ -1324,50 +1405,56 @@ if ($action == 'create' && $user->rights->projet->creer) { } } - // Add button to create objects from project + if (!empty($conf->global->PROJECT_SHOW_CREATE_OBJECT_BUTTON)) { - if (!empty($conf->propal->enabled) && $user->rights->propal->creer) { + print'"; } - // Clone if ($user->rights->projet->creer) { if ($userWrite > 0) { @@ -1380,7 +1467,7 @@ if ($action == 'create' && $user->rights->projet->creer) { // Delete if ($user->rights->projet->supprimer || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer)) { if ($userDelete > 0 || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer)) { - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); } else { print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index cb0fac8ca02..9213fc1470d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -87,29 +87,44 @@ class Project extends CommonObject public $title; /** - * @var int Date start + * @var int Date start * @deprecated * @see $date_start */ public $dateo; /** - * @var int Date start + * @var int Date start */ public $date_start; /** - * @var int Date end + * @var int Date end * @deprecated * @see $date_end */ public $datee; /** - * @var int Date end + * @var int Date end */ public $date_end; + /** + * @var int Date start event + */ + public $date_start_event; + + /** + * @var int Date end event + */ + public $date_end_event; + + /** + * @var string Location + */ + public $location; + /** * @var int Date close */ @@ -264,31 +279,36 @@ class Project extends CommonObject 'datee' =>array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>1, 'visible'=>1, 'position'=>35), 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>1), 'public' =>array('type'=>'integer', 'label'=>'Visibility', 'enabled'=>1, 'visible'=>1, 'position'=>65), - 'fk_opp_status' =>array('type'=>'integer', 'label'=>'OpportunityStatusShort', 'enabled'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'visible'=>1, 'position'=>75), - 'opp_percent' =>array('type'=>'double(5,2)', 'label'=>'OpportunityProbabilityShort', 'enabled'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'visible'=>1, 'position'=>80), + 'fk_opp_status' =>array('type'=>'integer', 'label'=>'OpportunityStatusShort', 'enabled'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'visible'=>1, 'position'=>75), + 'opp_percent' =>array('type'=>'double(5,2)', 'label'=>'OpportunityProbabilityShort', 'enabled'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'visible'=>1, 'position'=>80), 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>85, 'searchall'=>1), 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>90, 'searchall'=>1), 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>95), 'date_close' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>0, 'position'=>105), 'fk_user_close' =>array('type'=>'integer', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>0, 'position'=>110), - 'opp_amount' =>array('type'=>'double(24,8)', 'label'=>'OpportunityAmountShort', 'enabled'=>1, 'visible'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'position'=>115), + 'opp_amount' =>array('type'=>'double(24,8)', 'label'=>'OpportunityAmountShort', 'enabled'=>1, 'visible'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'position'=>115), 'budget_amount' =>array('type'=>'double(24,8)', 'label'=>'Budget', 'enabled'=>1, 'visible'=>1, 'position'=>119), 'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>130), 'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>135), 'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140), 'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145), - 'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>146), - 'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>147), - 'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>148), - 'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>149), - 'max_attendees' =>array('type'=>'integer', 'label'=>'MaxNbOfAttendees', 'enabled'=>1, 'visible'=>-1, 'position'=>150), - 'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>200), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>205), - 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>210), - 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>0, 'position'=>215), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>0, 'position'=>220), - 'email_msgid'=>array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'enabled'=>1, 'visible'=>-1, 'position'=>250, 'help'=>'EmailMsgIDWhenSourceisEmail'), - 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500) + // Properties for event organization + 'date_start_event' =>array('type'=>'date', 'label'=>'DateStartEvent', 'enabled'=>1, 'visible'=>1, 'position'=>200), + 'date_end_event' =>array('type'=>'date', 'label'=>'DateEndEvent', 'enabled'=>1, 'visible'=>1, 'position'=>201), + 'location' =>array('type'=>'text', 'label'=>'Location', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>202), + 'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>210), + 'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>211), + 'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>212), + 'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>215), + 'max_attendees' =>array('type'=>'integer', 'label'=>'MaxNbOfAttendees', 'enabled'=>1, 'visible'=>-1, 'position'=>215), + // Generic + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>400), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>405), + 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>410), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>0, 'position'=>415), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-1, 'position'=>420), + 'email_msgid'=>array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'enabled'=>1, 'visible'=>-1, 'position'=>450, 'help'=>'EmailMsgIDWhenSourceisEmail'), + 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500), ); // END MODULEBUILDER PROPERTIES @@ -408,10 +428,14 @@ class Project extends CommonObject $sql .= ", price_registration"; $sql .= ", price_booth"; $sql .= ", max_attendees"; + $sql .= ", date_start_event"; + $sql .= ", date_end_event"; + $sql .= ", location"; $sql .= ", email_msgid"; $sql .= ", note_private"; $sql .= ", note_public"; $sql .= ", entity"; + $sql .= ", ip"; $sql .= ") VALUES ("; $sql .= "'".$this->db->escape($this->ref)."'"; $sql .= ", '".$this->db->escape($this->title)."'"; @@ -436,10 +460,14 @@ class Project extends CommonObject $sql .= ", ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : 'null'); $sql .= ", ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : 'null'); $sql .= ", ".(strcmp($this->max_attendees, '') ? ((int) $this->max_attendees) : 'null'); + $sql .= ", ".($this->date_start_event != '' ? "'".$this->db->idate($this->date_start_event)."'" : 'null'); + $sql .= ", ".($this->date_end_event != '' ? "'".$this->db->idate($this->date_end_event)."'" : 'null'); + $sql .= ", ".($this->location ? "'".$this->db->escape($this->location)."'" : 'null'); $sql .= ", ".($this->email_msgid ? "'".$this->db->escape($this->email_msgid)."'" : 'null'); $sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : 'null'); $sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : 'null'); $sql .= ", ".((int) $conf->entity); + $sql .= ", ".(!isset($this->ip) ? 'NULL' : "'".$this->db->escape($this->ip)."'"); $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -530,11 +558,11 @@ class Project extends CommonObject $sql .= ", fk_opp_status = ".((is_numeric($this->opp_status) && $this->opp_status > 0) ? $this->opp_status : 'null'); $sql .= ", opp_percent = ".((is_numeric($this->opp_percent) && $this->opp_percent != '') ? $this->opp_percent : 'null'); $sql .= ", public = ".($this->public ? 1 : 0); - $sql .= ", datec=".($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null'); - $sql .= ", dateo=".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null'); - $sql .= ", datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); - $sql .= ", date_close=".($this->date_close != '' ? "'".$this->db->idate($this->date_close)."'" : 'null'); - $sql .= ", fk_user_close=".($this->fk_user_close > 0 ? $this->fk_user_close : "null"); + $sql .= ", datec = ".($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null'); + $sql .= ", dateo = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null'); + $sql .= ", datee = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); + $sql .= ", date_close = ".($this->date_close != '' ? "'".$this->db->idate($this->date_close)."'" : 'null'); + $sql .= ", fk_user_close = ".($this->fk_user_close > 0 ? $this->fk_user_close : "null"); $sql .= ", opp_amount = ".(strcmp($this->opp_amount, '') ? price2num($this->opp_amount) : "null"); $sql .= ", budget_amount = ".(strcmp($this->budget_amount, '') ? price2num($this->budget_amount) : "null"); $sql .= ", fk_user_modif = ".$user->id; @@ -547,6 +575,9 @@ class Project extends CommonObject $sql .= ", price_registration = ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : "null"); $sql .= ", price_booth = ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : "null"); $sql .= ", max_attendees = ".(strcmp($this->max_attendees, '') ? price2num($this->max_attendees) : "null"); + $sql .= ", date_start_event = ".($this->date_start_event != '' ? "'".$this->db->idate($this->date_start_event)."'" : 'null'); + $sql .= ", date_end_event = ".($this->date_end_event != '' ? "'".$this->db->idate($this->date_end_event)."'" : 'null'); + $sql .= ", location = '".$this->db->escape($this->location)."'"; $sql .= ", entity = ".((int) $this->entity); $sql .= " WHERE rowid = ".((int) $this->id); @@ -631,9 +662,9 @@ class Project extends CommonObject } $sql = "SELECT rowid, entity, ref, title, description, public, datec, opp_amount, budget_amount,"; - $sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,"; + $sql .= " tms, dateo as date_start, datee as date_end, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,"; $sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, email_msgid,"; - $sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth, max_attendees"; + $sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth, max_attendees, date_start_event, date_end_event, location"; $sql .= " FROM ".MAIN_DB_PREFIX."projet"; if (!empty($id)) { $sql .= " WHERE rowid = ".((int) $id); @@ -665,8 +696,8 @@ class Project extends CommonObject $this->datec = $this->db->jdate($obj->datec); // TODO deprecated $this->date_m = $this->db->jdate($obj->tms); $this->datem = $this->db->jdate($obj->tms); // TODO deprecated - $this->date_start = $this->db->jdate($obj->dateo); - $this->date_end = $this->db->jdate($obj->datee); + $this->date_start = $this->db->jdate($obj->date_start); + $this->date_end = $this->db->jdate($obj->date_end); $this->date_close = $this->db->jdate($obj->date_close); $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; @@ -692,6 +723,9 @@ class Project extends CommonObject $this->price_registration = $obj->price_registration; $this->price_booth = $obj->price_booth; $this->max_attendees = $obj->max_attendees; + $this->date_start_event = $this->db->jdate($obj->date_start_event); + $this->date_end_event = $this->db->jdate($obj->date_end_event); + $this->location = $obj->location; $this->email_msgid = $obj->email_msgid; $this->db->free($resql); @@ -1247,7 +1281,7 @@ class Project extends CommonObject $label .= ($label ? '
    ' : '').''.$langs->trans('Label').': '.$this->title; // The space must be after the : to not being explode when showing the title in img_picto if (isset($this->public)) { $label .= '
    '.$langs->trans("Visibility").": "; - $label .= ($this->public ? img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"').$langs->trans("SharedProject") : img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"').$langs->trans("PrivateProject")); + $label .= ($this->public ? img_picto($langs->trans('SharedProject'), 'world', 'class="pictofixedwidth"').$langs->trans("SharedProject") : img_picto($langs->trans('PrivateProject'), 'private', 'class="pictofixedwidth"').$langs->trans("PrivateProject")); } if (!empty($this->thirdparty_name)) { $label .= ($label ? '
    ' : '').''.$langs->trans('ThirdParty').': '.$this->thirdparty_name; // The space must be after the : to not being explode when showing the title in img_picto @@ -1308,14 +1342,14 @@ class Project extends CommonObject $result .= $linkstart; if ($withpicto) { - $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip pictofixedwidth em088"'), 0, 0, $notooltip ? 0 : 1); + $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="pictofixedwidth"' : '') : 'class="'.(($withpicto != 2) ? 'pictofixedwidth ' : '').'classfortooltip pictofixedwidth em088"'), 0, 0, $notooltip ? 0 : 1); } if ($withpicto != 2) { $result .= $this->ref; } $result .= $linkend; if ($withpicto != 2) { - $result .= (($addlabel && $this->title) ? $sep.dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : ''); + $result .= (($addlabel && $this->title) ? ''.$sep.dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)).'' : ''); } global $action; @@ -2014,7 +2048,7 @@ class Project extends CommonObject $sql .= " AND pt.fk_projet = ".((int) $this->id); $sql .= " AND (ptt.task_date >= '".$this->db->idate($datestart)."' "; $sql .= " AND ptt.task_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'm') - 1)."')"; - if ($task_id) { + if ($taskid) { $sql .= " AND ptt.fk_task=".((int) $taskid); } if (is_numeric($userid)) { @@ -2054,7 +2088,6 @@ class Project extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) @@ -2070,10 +2103,14 @@ class Project extends CommonObject // For external user, no check is done on company because readability is managed by public status of project and assignement. //$socid=$user->socid; - $projectsListId = null; - if (empty($user->rights->projet->all->lire)) { - $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); - } + $response = new WorkboardResponse(); + $response->warning_delay = $conf->project->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("OpenedProjects"); + $response->labelShort = $langs->trans("Opened"); + $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project'; + $response->img = img_object('', "projectpub"); + $response->nbtodo = 0; + $response->nbtodolate = 0; $sql = "SELECT p.rowid, p.fk_statut as status, p.fk_opp_status, p.datee as datee"; $sql .= " FROM (".MAIN_DB_PREFIX."projet as p"; @@ -2083,9 +2120,19 @@ class Project extends CommonObject //if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; $sql .= " WHERE p.fk_statut = 1"; $sql .= " AND p.entity IN (".getEntity('project').')'; - if (!empty($projectsListId)) { + + + $projectsListId = null; + if (!$user->hasRight("projet", "all", "lire")) { + $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project'; + $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); + if (empty($projectsListId)) { + return $response; + } + $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; } + // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser //if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; // For external user, no check is done on company permission because readability is managed by public status of project and assignement. @@ -2096,16 +2143,6 @@ class Project extends CommonObject if ($resql) { $project_static = new Project($this->db); - $response = new WorkboardResponse(); - $response->warning_delay = $conf->project->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("OpenedProjects"); - $response->labelShort = $langs->trans("Opened"); - if ($user->rights->projet->all->lire) { - $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project'; - } else { - $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project'; - } - $response->img = img_object('', "projectpub"); // This assignment in condition is not a bug. It allows walking the results. while ($obj = $this->db->fetch_object($resql)) { @@ -2121,12 +2158,11 @@ class Project extends CommonObject } return $response; - } else { - $this->error = $this->db->error(); - return -1; } - } + $this->error = $this->db->error(); + return -1; + } /** * Function used to replace a thirdparty id with another one. diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index f1295c10424..322277187f7 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -32,6 +32,11 @@ class ProjectStats extends Stats public $status; public $opp_status; + //SQL stat + public $field; + public $from; + public $where; + /** * Constructor @@ -46,6 +51,18 @@ class ProjectStats extends Stats require_once 'project.class.php'; $this->project = new Project($this->db); + + $this->from = MAIN_DB_PREFIX.$this->project->table_element; + $this->field = 'opp_amount'; + $this->where = " entity = ".$conf->entity; + if ($this->socid > 0) { + $this->where .= " AND fk_soc = ".((int) $this->socid); + } + if (is_array($this->userid) && count($this->userid) > 0) { + $this->where .= ' AND fk_user IN ('.$this->db->sanitize(join(',', $this->userid)).')'; + } elseif ($this->userid > 0) { + $this->where .= " AND fk_user = ".((int) $this->userid); + } } @@ -538,7 +555,6 @@ class ProjectStats extends Stats { $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")"; $sql .= " FROM ".$this->from; - $sql .= $this->join; $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 87ab0afdc47..ff1bdbc07f9 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -127,6 +127,7 @@ class Task extends CommonObjectLine public $timespent_fk_user; public $timespent_thm; public $timespent_note; + public $timespent_fk_product; public $comments = array(); @@ -1209,7 +1210,7 @@ class Task extends CommonObjectLine $this->timespent_datehour = $this->timespent_date; } - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); @@ -1230,6 +1231,7 @@ class Task extends CommonObjectLine $sql .= ", task_date_withhour"; $sql .= ", task_duration"; $sql .= ", fk_user"; + $sql .= ", fk_product"; $sql .= ", note"; $sql .= ", datec"; $sql .= ") VALUES ("; @@ -1239,6 +1241,7 @@ class Task extends CommonObjectLine $sql .= ", ".(empty($this->timespent_withhour) ? 0 : 1); $sql .= ", ".((int) $this->timespent_duration); $sql .= ", ".((int) $this->timespent_fk_user); + $sql .= ", ".((int) $this->timespent_fk_product); $sql .= ", ".(isset($this->timespent_note) ? "'".$this->db->escape($this->timespent_note)."'" : "null"); $sql .= ", '".$this->db->idate($now)."'"; $sql .= ")"; @@ -1526,6 +1529,7 @@ class Task extends CommonObjectLine $sql .= " t.task_date_withhour,"; $sql .= " t.task_duration,"; $sql .= " t.fk_user,"; + $sql .= " t.fk_product,"; $sql .= " t.thm,"; $sql .= " t.note"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; @@ -1544,6 +1548,7 @@ class Task extends CommonObjectLine $this->timespent_withhour = $obj->task_date_withhour; $this->timespent_duration = $obj->task_duration; $this->timespent_fk_user = $obj->fk_user; + $this->timespent_fk_product = $obj->fk_product; $this->timespent_thm = $obj->thm; // hourly rate $this->timespent_note = $obj->note; } @@ -1678,7 +1683,7 @@ class Task extends CommonObjectLine $this->timespent_note = trim($this->timespent_note); } - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); @@ -1697,6 +1702,7 @@ class Task extends CommonObjectLine $sql .= " task_date_withhour = ".(empty($this->timespent_withhour) ? 0 : 1).","; $sql .= " task_duration = ".((int) $this->timespent_duration).","; $sql .= " fk_user = ".((int) $this->timespent_fk_user).","; + $sql .= " fk_product = ".((int) $this->timespent_fk_product).","; $sql .= " note = ".(isset($this->timespent_note) ? "'".$this->db->escape($this->timespent_note)."'" : "null"); $sql .= " WHERE rowid = ".((int) $this->timespent_id); @@ -1721,26 +1727,31 @@ class Task extends CommonObjectLine $ret = -1; } - if ($ret == 1 && ($this->timespent_old_duration != $this->timespent_duration)) { - // Recalculate amount of time spent for task and update denormalized field - $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; - $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM ".MAIN_DB_PREFIX."projet_task_time as ptt where ptt.fk_task = ".((int) $this->id).")"; - if (isset($this->progress)) { - $sql .= ", progress = ".((float) $this->progress); // Do not overwrite value if not provided - } - $sql .= " WHERE rowid = ".((int) $this->id); + if ($ret == 1 && (($this->timespent_old_duration != $this->timespent_duration) || !empty($conf->global->TIMESPENT_ALWAYS_UPDATE_THM))) { + if ($this->timespent_old_duration != $this->timespent_duration) { + // Recalculate amount of time spent for task and update denormalized field + $sql = "UPDATE " . MAIN_DB_PREFIX . "projet_task"; + $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM " . MAIN_DB_PREFIX . "projet_task_time as ptt where ptt.fk_task = " . ((int) $this->id) . ")"; + if (isset($this->progress)) { + $sql .= ", progress = " . ((float) $this->progress); // Do not overwrite value if not provided + } + $sql .= " WHERE rowid = " . ((int) $this->id); - dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); - if (!$this->db->query($sql)) { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - $ret = -2; + dol_syslog(get_class($this) . "::updateTimeSpent", LOG_DEBUG); + if (!$this->db->query($sql)) { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + $ret = -2; + } } // Update hourly rate of this time spent entry, but only if it was not set initialy $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time"; $sql .= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $this->timespent_fk_user).")"; // set average hour rate of user - $sql .= " WHERE (thm IS NULL OR thm = 0) AND rowid = ".((int) $this->timespent_id); + $sql .= " WHERE rowid = ".((int) $this->timespent_id); + if (empty($conf->global->TIMESPENT_ALWAYS_UPDATE_THM)) { // then if not empty we always update, in case of new thm for user, or change user of task time line + $sql .= " AND (thm IS NULL OR thm = 0)"; + } dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); if (!$this->db->query($sql)) { @@ -1768,7 +1779,7 @@ class Task extends CommonObjectLine $error = 0; - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); @@ -2215,7 +2226,7 @@ class Task extends CommonObjectLine $response = new WorkboardResponse(); $response->warning_delay = $conf->project->task->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("OpenedTasks"); - if ($user->rights->projet->all->lire) { + if ($user->hasRight("projet", "all", "lire")) { $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project'; } else { $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&mainmenu=project'; diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index 997f45a39d0..024dce3abc9 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -23,6 +23,7 @@ * \brief Page of a project task */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -104,7 +105,7 @@ $morehtmlref = '
    '; $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; @@ -133,15 +134,6 @@ if ($object->public) { } print ''; -// Date start - end -print ''; - // Budget print ''; +// Date start - end project +print ''; + // Other attributes $cols = 2; // include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index be130572704..f6827fc19b3 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -22,6 +22,7 @@ * \brief List of all contacts of a project */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -34,7 +35,7 @@ if (isModEnabled('categorie')) { // Load translation files required by the page $langsLoad=array('projects', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -295,7 +296,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -315,7 +316,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; - $start = dol_print_date($object->date_start, 'day'); - print ($start ? $start : '?'); - $end = dol_print_date($object->date_end, 'day'); - print ' - '; - print ($end ? $end : '?'); - if ($object->hasDelay()) { - print img_warning("Late"); - } - print '
    '.$langs->trans("Budget").''; if (strcmp($object->budget_amount, '')) { @@ -1160,6 +1216,18 @@ if ($action == 'create' && $user->rights->projet->creer) { } print '
    '.$langs->trans("Dates").''; + $start = dol_print_date($object->date_start, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($object->date_end, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($object->hasDelay()) { + print img_warning("Late"); + } + print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; -print dol_print_date($object->date_start, 'day'); -$end = dol_print_date($object->date_end, 'day'); -if ($end) { - print ' - '.$end; -} -print '
    '.$langs->trans("Budget").''; if (strcmp($object->budget_amount, '')) { @@ -149,6 +141,15 @@ if (strcmp($object->budget_amount, '')) { } print '
    '.$langs->trans("Dates").''; +print dol_print_date($object->date_start, 'day'); +$end = dol_print_date($object->date_end, 'day'); +if ($end) { + print ' - '.$end; +} +print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -338,7 +339,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -384,8 +385,15 @@ if ($id > 0 || !empty($ref)) { print ''; } - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 588043a56dc..bb50bf0def6 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -23,6 +23,7 @@ * \brief Page to managed related documents linked to a project */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; @@ -97,7 +98,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $langs->trans('Project').' - '.$langs->trans('Document').' - '.$object->ref.' '.$object->name; +$title = $langs->trans('Documents').' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans('Document'); } @@ -137,7 +138,7 @@ if ($object->id > 0) { $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 16b67dd4876..f96f5737cf4 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -29,6 +29,7 @@ * \brief Page of project referrers */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -36,69 +37,69 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->stock->enabled)) { +if (isModEnabled('stock')) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; } -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } if (isModEnabled('facture')) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } -if (!empty($conf->supplier_proposal->enabled)) { +if (isModEnabled('supplier_proposal')) { require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; } -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { +if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; } -if (!empty($conf->contrat->enabled)) { +if (isModEnabled('contrat')) { require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; } -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; } -if (!empty($conf->deplacement->enabled)) { +if (isModEnabled('deplacement')) { require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; } -if (!empty($conf->expensereport->enabled)) { +if (isModEnabled('expensereport')) { require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; } if (isModEnabled('agenda')) { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; } -if (!empty($conf->don->enabled)) { +if (isModEnabled('don')) { require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; } if (!empty($conf->loan->enabled)) { require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; } -if (!empty($conf->stock->enabled)) { +if (isModEnabled('stock')) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; } -if (!empty($conf->tax->enabled)) { +if (isModEnabled('tax')) { require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; } -if (!empty($conf->banque->enabled)) { +if (isModEnabled("banque")) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; } if (!empty($conf->salaries->enabled)) { require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; } -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } -if (!empty($conf->mrp->enabled)) { +if (isModEnabled('mrp')) { require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; } @@ -107,22 +108,22 @@ $langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta')); if (isModEnabled('facture')) { $langs->load("bills"); } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { $langs->load("orders"); } -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { $langs->load("propal"); } -if (!empty($conf->ficheinter->enabled)) { +if (isModEnabled('ficheinter')) { $langs->load("interventions"); } -if (!empty($conf->deplacement->enabled)) { +if (isModEnabled('deplacement')) { $langs->load("trips"); } -if (!empty($conf->expensereport->enabled)) { +if (isModEnabled('expensereport')) { $langs->load("trips"); } -if (!empty($conf->don->enabled)) { +if (isModEnabled('don')) { $langs->load("donations"); } if (!empty($conf->loan->enabled)) { @@ -131,10 +132,10 @@ if (!empty($conf->loan->enabled)) { if (!empty($conf->salaries->enabled)) { $langs->load("salaries"); } -if (!empty($conf->mrp->enabled)) { +if (isModEnabled('mrp')) { $langs->load("mrp"); } -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langs->load("eventorganization"); } @@ -217,7 +218,7 @@ $morehtmlref = '
    '; $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; @@ -237,7 +238,7 @@ print '
    '; print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($object->budget_amount, '')) { + print ''.price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($object->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); @@ -396,13 +404,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($object->budget_amount, '')) { - print ''.price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency).''; - } - print '
    '; // Usage -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -260,7 +261,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PRO print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -306,8 +307,15 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print ''; } -// Date start - end -print ''; + +// Date start - end project +print ''; -// Budget -print ''; - // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; @@ -387,7 +388,7 @@ $listofreferent = array( 'lang'=>'propal', 'buttonnew'=>'AddProp', 'testnew'=>$user->rights->propal->creer, - 'test'=>$conf->propal->enabled && $user->rights->propale->lire), + 'test'=>$conf->propal->enabled && $user->rights->propal->lire), 'order'=>array( 'name'=>"CustomersOrders", 'title'=>"ListOrdersAssociatedProject", @@ -715,7 +716,7 @@ if (!$showdatefilter) { $langs->loadLangs(array("suppliers", "bills", "orders", "proposals", "margins")); -if (!empty($conf->stock->enabled)) { +if (isModEnabled('stock')) { $langs->load('stocks'); } diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index dda13754d31..f2889d7c469 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -117,7 +117,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -137,7 +137,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; +// Budget +print '
    '.$langs->trans("Budget").''; +if (strcmp($object->budget_amount, '')) { + print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; +} +print '
    '.$langs->trans("Dates").''; $start = dol_print_date($object->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); @@ -318,13 +326,6 @@ if ($object->hasDelay()) { } print '
    '.$langs->trans("Budget").''; -if (strcmp($object->budget_amount, '')) { - print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; -} -print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -160,7 +160,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -179,8 +179,15 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index ae0542d8b4b..8c6fc512509 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -43,7 +43,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $valsnb = array(); $valsamount = array(); $dataseries = array(); - // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) + // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for sale orders), 3=Closed (Sent/Received, billed or not) while ($i < $num) { $obj = $db->fetch_object($resql); if ($obj) { diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index b519f298ecc..2698a4b1a21 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2020 Laurent Destailleur + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2019 Nicolas ZABOURI * @@ -24,6 +24,7 @@ * \brief Main project home page */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -258,7 +259,7 @@ if ($resql) { $companystatic->status = $obj->thirdpartystatus; print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($object->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); @@ -191,13 +198,6 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($object->budget_amount, '')) { - print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); - } - print '
    '; - print ''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 8fa6c0ec2e5..12b58799b5d 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -29,20 +29,23 @@ * \brief Page to list projects */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; 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.'/core/class/html.formprojet.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } // Load translation files required by the page $langs->loadLangs(array('projects', 'companies', 'commercial')); -if (!empty($conf->eventorganization->enabled) && $conf->eventorganization->enabled) { +if (isModEnabled('eventorganization') && $conf->eventorganization->enabled) { $langs->loadLangs(array('eventorganization')); } @@ -91,6 +94,7 @@ $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alph $search_ref = GETPOST("search_ref", 'alpha'); $search_label = GETPOST("search_label", 'alpha'); $search_societe = GETPOST("search_societe", 'alpha'); +$search_societe_alias = GETPOST("search_societe_alias", 'alpha'); $search_status = GETPOST("search_status", 'int'); $search_opp_status = GETPOST("search_opp_status", 'alpha'); $search_opp_percent = GETPOST("search_opp_percent", 'alpha'); @@ -108,6 +112,14 @@ $search_accept_conference_suggestions = GETPOST('search_accept_conference_sugges $search_accept_booth_suggestions = GETPOST('search_accept_booth_suggestions', 'int'); $search_price_registration = GETPOST("search_price_registration", 'alpha'); $search_price_booth = GETPOST("search_price_booth", 'alpha'); +$search_login = GETPOST('search_login', 'alpha'); +$searchCategoryCustomerOperator = 0; +if (GETPOSTISSET('formfilteraction')) { + $searchCategoryCustomerOperator = GETPOST('search_category_customer_operator', 'int'); +} elseif (!empty($conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT)) { + $searchCategoryCustomerOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; +} +$searchCategoryCustomerList = GETPOST('search_category_customer_list', 'array'); $optioncss = GETPOST('optioncss', 'alpha'); $mine = ((GETPOST('mode') == 'mine') ? 1 : 0); @@ -140,15 +152,12 @@ $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); $search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver - +$search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); if ($search_status == '') { $search_status = -1; // -1 or 1 } -if (!empty($conf->categorie->enabled)) { - $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); -} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Project($db); @@ -197,10 +206,12 @@ foreach ($object->fields as $key => $val) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; // Add non object fields to fields for list -$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1)); +$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(!isModEnabled('societe') ? 0 : 1)); +$arrayfields['s.name_alias'] = array('label'=>"AliasNameShort", 'checked'=>0, 'position'=>22); $arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23); $arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120); $arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'position'=> 116, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106); +$arrayfields['u.login'] = array('label'=>"Author", 'checked'=>1, 'position'=>165); // Force some fields according to search_usage filter... if (GETPOST('search_usage_opportunity')) { //$arrayfields['p.usage_opportunity']['visible'] = 1; // Not require, filter on search_opp_status is enough @@ -247,6 +258,7 @@ if (empty($reshook)) { $search_ref = ""; $search_label = ""; $search_societe = ""; + $search_societe_alias = ''; $search_status = -1; $search_opp_status = -1; $search_opp_amount = ''; @@ -286,6 +298,7 @@ if (empty($reshook)) { $search_accept_booth_suggestions = ''; $search_price_registration = ''; $search_price_booth = ''; + $search_login = ''; $toselect = array(); $search_array_options = array(); $search_category_array = array(); @@ -351,8 +364,10 @@ if (empty($reshook)) { */ $form = new Form($db); +$formcompany = new FormCompany($db); $companystatic = new Societe($db); +$taskstatic = new Task($db); $formother = new FormOther($db); $formproject = new FormProjets($db); @@ -395,15 +410,19 @@ if (count($listofprojectcontacttypeexternal) == 0) { $listofprojectcontacttypeexternal[0] = '0'; // To avoid sql syntax error if not found } +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once. $sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat,"; $sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount,"; $sql .= " p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event,"; -$sql .= " p.email_msgid,"; -$sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth,"; +$sql .= " p.email_msgid, p.import_key,"; +$sql .= " p.accept_conference_suggestions, p.accept_booth_suggestions, p.price_registration, p.price_booth,"; $sql .= " s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; $sql .= " country.code as country_code,"; -$sql .= " cls.code as opp_status_code"; +$sql .= " cls.code as opp_status_code,"; +$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -416,15 +435,13 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p"; -if (!empty($conf->categorie->enabled)) { - $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_PROJECT, "p.rowid"); -} if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON p.fk_user_creat = u.rowid'; // We'll need this table joined to the select in order to filter by sale // No check is done on company permission because readability is managed by public status of project and assignement. //if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; @@ -437,10 +454,11 @@ if ($search_project_user > 0) { if ($search_project_contact > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ecp_contact"; } + +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + $sql .= " WHERE p.entity IN (".getEntity('project').')'; -if (!empty($conf->categorie->enabled)) { - $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_PROJECT, "p.rowid", $search_category_array); -} if (empty($user->rights->projet->all->lire)) { $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users } @@ -454,8 +472,15 @@ if ($search_ref) { if ($search_label) { $sql .= natural_search('p.title', $search_label); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_opp_amount) { $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); @@ -554,6 +579,83 @@ if ($search_price_registration != '') { if ($search_price_booth != '') { $sql .= natural_search('p.price_booth', $search_price_booth, 1); } +if ($search_login) { + $sql .= natural_search(array('u.login', 'u.firstname', 'u.lastname'), $search_login); +} +// Search for tag/category ($searchCategoryProjectList is an array of ID) +$searchCategoryProjectList = $search_category_array; +$searchCategoryProjectOperator = 0; +if (!empty($searchCategoryProjectList)) { + $searchCategoryProjectSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProjectList as $searchCategoryProject) { + if (intval($searchCategoryProject) == -2) { + $searchCategoryProjectSqlList[] = "NOT EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project)"; + } elseif (intval($searchCategoryProject) > 0) { + if ($searchCategoryProjectOperator == 0) { + $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); + } + } + } + if ($listofcategoryid) { + $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProjectOperator == 1) { + if (!empty($searchCategoryProjectSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProjectSqlList).")"; + } + } else { + if (!empty($searchCategoryProjectSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProjectSqlList).")"; + } + } +} +$searchCategoryCustomerSqlList = array(); +if ($searchCategoryCustomerOperator == 1) { + $existsCategoryCustomerList = array(); + foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + if (intval($searchCategoryCustomer) == -2) { + $sqlCategoryCustomerNotExists = " NOT EXISTS ("; + $sqlCategoryCustomerNotExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerNotExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerNotExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerNotExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerNotExists; + } elseif (intval($searchCategoryCustomer) > 0) { + $existsCategoryCustomerList[] = $db->escape($searchCategoryCustomer); + } + } + if (!empty($existsCategoryCustomerList)) { + $sqlCategoryCustomerExists = " EXISTS ("; + $sqlCategoryCustomerExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerExists .= " AND cat_cus.fk_categorie IN (".$db->sanitize(implode(',', $existsCategoryCustomerList)).")"; + $sqlCategoryCustomerExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerExists; + } + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryCustomerSqlList).")"; + } +} else { + foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + if (intval($searchCategoryCustomer) == -2) { + $sqlCategoryCustomerNotExists = " NOT EXISTS ("; + $sqlCategoryCustomerNotExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerNotExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerNotExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerNotExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerNotExists; + } elseif (intval($searchCategoryCustomer) > 0) { + $searchCategoryCustomerSqlList[] = "p.fk_soc IN (SELECT fk_soc FROM ".$db->prefix()."categorie_societe WHERE fk_categorie = ".((int) $searchCategoryCustomer).")"; + } + } + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryCustomerSqlList).")"; + } +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -697,6 +799,9 @@ if ($search_label != '') { if ($search_societe != '') { $param .= '&search_societe='.urlencode($search_societe); } +if ($search_societe_alias != '') { + $param .= '&search_societe_alias='.urlencode($search_societe_alias); +} if ($search_status >= 0) { $param .= '&search_status='.urlencode($search_status); } @@ -745,9 +850,15 @@ if ($search_price_registration != '') { if ($search_price_booth != '') { $param .= '&search_price_booth='.urlencode($search_price_booth); } +if ($search_login) { + $param .= '&search_login='.urlencode($search_login); +} if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } +foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + $param .= "&search_category_customer_list[]=".urlencode($searchCategoryCustomer); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -760,6 +871,7 @@ $arrayofmassactions = array( //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if ($user->rights->projet->creer) { $arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Close"); + $arrayofmassactions['preaffectuser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("AffectUser"); } if ($user->rights->projet->supprimer) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); @@ -767,7 +879,7 @@ if ($user->rights->projet->supprimer) { if (isModEnabled('category') && $user->rights->projet->creer) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } -if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'preaffectuser'))) { $arrayofmassactions = array(); } @@ -849,10 +961,22 @@ if ($user->rights->user->user->lire) { } // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { $formcategory = new FormCategory($db); $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array); } +// Filter on customer categories +if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + $moreforfilter .= '
    '; + $tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); + $categoriesArr = $form->select_all_categories(Categorie::TYPE_CUSTOMER, '', '', 64, 0, 1); + $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; + $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle); + $moreforfilter .= ' '; + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click + $moreforfilter .= '
    '; +} if (!empty($moreforfilter)) { print '
    '; @@ -864,7 +988,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); @@ -873,7 +997,7 @@ print '
    '; + print ''; print $projectstatic->getNomUrl(1); print '
    '; +print ''; // Action column if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { print ''; } + +// Alias +if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; +} // Sale representative if (!empty($arrayfields['commercial']['checked'])) { print ''; @@ -940,10 +1076,11 @@ if (!empty($arrayfields['p.datee']['checked'])) { print ''; print ''; } +// Visibility if (!empty($arrayfields['p.public']['checked'])) { print ''; } if (!empty($arrayfields['c.assigned']['checked'])) { @@ -953,7 +1090,7 @@ if (!empty($arrayfields['c.assigned']['checked'])) { // Opp status if (!empty($arrayfields['p.fk_opp_status']['checked'])) { print ''; } if (!empty($arrayfields['p.opp_amount']['checked'])) { @@ -1016,6 +1153,12 @@ if (!empty($arrayfields['p.price_booth']['checked'])) { print ''; print ''; } +if (!empty($arrayfields['u.login']['checked'])) { + // Author + print ''; +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -1038,6 +1181,11 @@ if (!empty($arrayfields['p.email_msgid']['checked'])) { print ''; } +if (!empty($arrayfields['p.import_key']['checked'])) { + // Import key + print ''; +} if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; } // Action column -print ''; - +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} print ''."\n"; print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['p.ref']['checked'])) { print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder); } @@ -1067,6 +1219,9 @@ if (!empty($arrayfields['p.title']['checked'])) { 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.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); +} if (!empty($arrayfields['commercial']['checked'])) { print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp '); } @@ -1121,6 +1276,9 @@ if (!empty($arrayfields['p.price_registration']['checked'])) { if (!empty($arrayfields['p.price_booth']['checked'])) { print_liste_field_titre($arrayfields['p.price_booth']['label'], $_SERVER["PHP_SELF"], 'p.price_booth', "", $param, '', $sortfield, $sortorder, 'right '); } +if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -1136,12 +1294,19 @@ if (!empty($arrayfields['p.tms']['checked'])) { if (!empty($arrayfields['p.email_msgid']['checked'])) { print_liste_field_titre($arrayfields['p.email_msgid']['label'], $_SERVER["PHP_SELF"], "p.email_msgid", "", $param, '', $sortfield, $sortorder, 'center '); } +if (!empty($arrayfields['p.import_key']['checked'])) { + print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, ''); +} if (!empty($arrayfields['p.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; +$userstatic = new User($db); + $i = 0; $totalarray = array( 'nbfield' => 0, @@ -1181,6 +1346,21 @@ while ($i < $imaxinloop) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Project url if (!empty($arrayfields['p.ref']['checked'])) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Opp Status if (!empty($arrayfields['p.fk_opp_status']['checked'])) { @@ -1344,7 +1542,11 @@ while ($i < $imaxinloop) { //if ($obj->opp_status_code) if (strcmp($obj->opp_amount, '')) { print ''.price($obj->opp_amount, 1, $langs, 1, -1, -1, '').''; - $totalarray['val']['p.opp_amount'] += $obj->opp_amount; + if (empty($totalarray['val']['p.opp_amount'])) { + $totalarray['val']['p.opp_amount'] = $obj->opp_amount; + } else { + $totalarray['val']['p.opp_amount'] += $obj->opp_amount; + } } print ''; if (!$i) { @@ -1373,7 +1575,11 @@ while ($i < $imaxinloop) { print ''; if (!$i) { @@ -1388,7 +1594,11 @@ while ($i < $imaxinloop) { print ''; if (!$i) { @@ -1494,6 +1704,33 @@ while ($i < $imaxinloop) { $totalarray['pos'][$totalarray['nbfield']] = 'p.price_booth'; } } + // Author + $userstatic->id = $obj->fk_user_creat; + $userstatic->login = $obj->login; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->email = $obj->user_email; + $userstatic->statut = $obj->user_statut; + $userstatic->entity = $obj->entity; + $userstatic->photo = $obj->photo; + $userstatic->office_phone = $obj->office_phone; + $userstatic->office_fax = $obj->office_fax; + $userstatic->user_mobile = $obj->user_mobile; + $userstatic->job = $obj->job; + $userstatic->gender = $obj->gender; + + if (!empty($arrayfields['u.login']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook @@ -1525,6 +1762,13 @@ while ($i < $imaxinloop) { print ''; if (!$i) $totalarray['nbfield']++; } + // Import key + if (!empty($arrayfields['p.import_key']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Status if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; @@ -1537,15 +1781,15 @@ while ($i < $imaxinloop) { print ''; - } - if (!$i) { - $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } print "\n"; diff --git a/htdocs/projet/messaging.php b/htdocs/projet/messaging.php new file mode 100644 index 00000000000..7fe5b4a0b9d --- /dev/null +++ b/htdocs/projet/messaging.php @@ -0,0 +1,221 @@ + + * 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/projet/messaging.php + * \ingroup project + * \brief Page with events on project + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + +// Load translation files required by the page +$langs->load("projects"); + +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); + +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST("sortfield", "aZ09comma"); +$sortorder = GETPOST("sortorder", 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = is_numeric($page) ? $page : 0; +$page = $page == -1 ? 0 : $page; +if (!$sortfield) { + $sortfield = "a.datep,a.id"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) { + $actioncode = '0'; + } +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} +$search_agenda_label = GETPOST('search_agenda_label'); + +$hookmanager->initHooks(array('projectcardinfo')); + +// Security check +$id = GETPOST("id", 'int'); +$socid = 0; +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. +$result = restrictedArea($user, 'projet', $id, 'projet&project'); + +if (!$user->rights->projet->lire) { + accessforbidden(); +} + + + +/* + * Actions + */ + +$parameters = array('id'=>$socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// 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 + $actioncode = ''; + $search_agenda_label = ''; +} + + + +/* + * View + */ + +$form = new Form($db); +$object = new Project($db); + +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); + $object->fetch_thirdparty(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } + $object->info($object->id); +} +$agenda = (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) ? '/'.$langs->trans("Agenda") : ''; +$title = $langs->trans('Events').$agenda.' - '.$object->ref.' '.$object->name; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +} +$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; +llxHeader("", $title, $help_url); + +$head = project_prepare_head($object); + +print dol_get_fiche_head($head, 'agenda', $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project')); + + +// Project card + +$linkback = ''.$langs->trans("BackToList").''; + +$morehtmlref = '
    '; +// Title +$morehtmlref .= $object->title; +// Thirdparty +if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); +} +$morehtmlref .= '
    '; + +// Define a complementary filter for search of next/prev ref. +if (empty($user->rights->projet->all->lire)) { + $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; +} + +dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + +print '
    '; +print '
    '; + +dol_print_object_info($object, 1); + +print '
    '; + +print '
    '; + +print dol_get_fiche_end(); + + +// Actions buttons + +$out = ''; +$permok = $user->rights->agenda->myactions->create; +if ($permok) { + $out .= '&projectid='.$object->id; +} + + + +//print ''; + +if (!empty($object->id)) { + print '
    '; + + //print '
    '; + $morehtmlcenter = ''; + + // Show link to change view in message + $messagingUrl = DOL_URL_ROOT.'/projet/messaging.php?id='.$object->id; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 2); + + // Show link to change view in agenda + $messagingUrl = DOL_URL_ROOT.'/projet/agenda.php?id='.$object->id; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1); + + + // // Show link to send an email (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus); + + // // Show link to add a private message (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus); + + // Show link to add event + if (isModEnabled('agenda')) { + $addActionBtnRight = !empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'&socid='.$object->socid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $addActionBtnRight); + } + + $param = '&id='.$object->id; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } + + print_barre_liste($langs->trans("ActionsOnProject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); + + // List of all actions + $filters = array(); + $filters['search_agenda_label'] = $search_agenda_label; + show_actions_messaging($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 2ee52d3a247..3ca7949b35a 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -22,6 +22,7 @@ * \brief Fiche d'information sur un projet */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; @@ -69,7 +70,7 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("Project").' - '.$langs->trans("Note").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Notes").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); } @@ -101,7 +102,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '
    '; diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index 5926451e321..32498121045 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -22,6 +22,7 @@ * \brief Page for project statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -40,7 +41,7 @@ if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index ffba37abb7d..3322b63b171 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -31,13 +31,13 @@ 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.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } // Load translation files required by the page $langsLoad=array('projects', 'users', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -402,10 +402,13 @@ $projectstatic = new Project($db); $taskstatic = new Task($db); $userstatic = new User($db); -$title = $langs->trans("Project").' - '.$langs->trans("Tasks").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Tasks").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks"); } +if ($action == 'create') { + $title = $langs->trans("NewTask"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; llxHeader("", $title, $help_url); @@ -550,7 +553,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $object->title; // Thirdparty if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -569,7 +572,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; @@ -904,6 +1028,18 @@ if (!empty($arrayfields['s.nom']['checked'])) { print ''; print ''; + if ($socid > 0) { + $tmpthirdparty = new Societe($db); + $tmpthirdparty->fetch($socid); + $search_societe_alias = $tmpthirdparty->name_alias; + } + print ''; + print ' '; $array = array(''=>'', 0 => $langs->trans("PrivateProject"), 1 => $langs->trans("SharedProject")); - print $form->selectarray('search_public', $array, $search_public); + print $form->selectarray('search_public', $array, $search_public, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth75'); print ''; - print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 0, 1, 0, 'maxwidth100 nowrapoption', 1, 0); + print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 1, 1, 0, 'maxwidth125 nowrapoption', 1, 1); print ''; + print ''; + print ''; print ''; + print ''; $arrayofstatus = array(); @@ -1045,19 +1193,23 @@ if (!empty($arrayfields['p.fk_statut']['checked'])) { $arrayofstatus[$key] = $langs->trans($val); } $arrayofstatus['99'] = $langs->trans("NotClosed").' ('.$langs->trans('Draft').' + '.$langs->trans('Opened').')'; - print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'minwidth75imp maxwidth125 selectarrowonleft'); + print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'minwidth75imp maxwidth125 selectarrowonleft onrightofpage'); print ajax_combobox('search_status'); print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; @@ -1206,7 +1386,20 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['s.nom']['checked'])) { print ''; if ($obj->socid) { - print $companystatic->getNomUrl(1); + print $companystatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); + } else { + print ' '; + } + print ''; + if ($obj->socid) { + print $companystatic->name_alias; } else { print ' '; } @@ -1217,7 +1410,7 @@ while ($i < $imaxinloop) { } // Sales Representatives if (!empty($arrayfields['commercial']['checked'])) { - print ''; + print ''; if ($obj->socid) { $companystatic->id = $obj->socid; $companystatic->name = $obj->name; @@ -1259,7 +1452,8 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Date start + + // Date start project if (!empty($arrayfields['p.dateo']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_start), 'day'); @@ -1268,7 +1462,7 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Date end + // Date end project if (!empty($arrayfields['p.datee']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_end), 'day'); @@ -1277,6 +1471,7 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } + // Visibility if (!empty($arrayfields['p.public']['checked'])) { print ''; @@ -1294,10 +1489,10 @@ while ($i < $imaxinloop) { } // Contacts of project if (!empty($arrayfields['c.assigned']['checked'])) { - print ''; + print ''; $ifisrt = 1; foreach (array('internal', 'external') as $source) { - $tab = $object->liste_contact(-1, $source); + $tab = $object->liste_contact(-1, $source, 0, '', 1); $numcontact = count($tab); if (!empty($numcontact)) { foreach ($tab as $contactproject) { @@ -1326,6 +1521,9 @@ while ($i < $imaxinloop) { } } print ''; if ($obj->opp_weighted_amount) { print ''.price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '').''; - $totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount; + if (empty($totalarray['val']['opp_weighted_amount'])) { + $totalarray['val']['opp_weighted_amount'] = $obj->opp_weighted_amount; + } else { + $totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount; + } } print ''; if ($obj->budget_amount != '') { print ''.price($obj->budget_amount, 1, $langs, 1, -1, -1).''; - $totalarray['val']['p.budget_amount'] += $obj->budget_amount; + if (empty($totalarray['val']['p.budget_amount'])) { + $totalarray['val']['p.budget_amount'] = $obj->budget_amount; + } else { + $totalarray['val']['p.budget_amount'] += $obj->budget_amount; + } } print ''; + if ($userstatic->id) { + print $userstatic->getNomUrl(-1); + } else { + print ' '; + } + print "'.dol_escape_htmltag($obj->import_key).''.$object->getLibStatut(5).''; 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($object->id, $arrayofselected)) { + if (in_array($obj->id, $arrayofselected)) { $selected = 1; } - print ''; + print ''; } print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -592,7 +595,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -611,8 +614,15 @@ if ($id > 0 || !empty($ref)) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; @@ -673,7 +676,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask'); + $projectoktoentertime = 1; if ($object->id > 0 && $object->statut == Project::STATUS_CLOSED) { + $projectoktoentertime = 0; print '
    '; $langs->load("errors"); print $langs->trans("WarningProjectClosed"); @@ -681,6 +686,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third } if ($object->id > 0 && $object->statut == Project::STATUS_DRAFT) { + $projectoktoentertime = 0; print '
    '; $langs->load("errors"); print $langs->trans("WarningProjectDraft"); @@ -729,7 +735,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Project print '
    '; $contactsofproject = (empty($object->id) ? '' : $object->getListContactId('internal')); @@ -747,12 +757,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third } print ''; - // Date start + // Date start task print ''; - // Date end + // Date end task print ''; @@ -771,18 +781,14 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''; diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index bed307d65bf..4540112f4c3 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -132,7 +132,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -151,7 +151,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($object->budget_amount, '')) { + print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($object->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); @@ -623,13 +633,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($object->budget_amount, '')) { - print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; - } - print '
    '.$langs->trans("ChildOfProjectTask").''; print img_picto('', 'project'); - $formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500 widthcentpercentminusxx'); + if ($projectoktoentertime) { + $formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500 widthcentpercentminusxx'); + } else { + $formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '', 'maxwidth500 widthcentpercentminusxx'); + } print '
    '.$langs->trans("DateStart").''; print $form->selectDate((!empty($date_start) ? $date_start : ''), 'dateo', 1, 1, 0, '', 1, 1); print '
    '.$langs->trans("DateEnd").''; print $form->selectDate((!empty($date_end) ? $date_end : -1), 'datee', -1, 1, 0, '', 1, 1); print '
    '.$langs->trans("Description").''; - if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) { - print ''; - } else { - // WYSIWYG editor - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0); - if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) { - $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; - } - $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows); - print $doleditor->Create(); + // WYSIWYG editor + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_SOCIETE) ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0); + if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) { + $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; } + $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows); + print $doleditor->Create(); print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -174,7 +174,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -221,8 +221,15 @@ if ($id > 0 || !empty($ref)) { print ''; } - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 44f981a46db..4bbc48900af 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -140,13 +140,19 @@ if (!empty($project_ref) && !empty($withproject)) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); +$result = $projectstatic->fetch($object->fk_project); + +$title = $object->ref . ' - ' . $langs->trans("Contacts"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); /* *************************************************************************** */ @@ -162,7 +168,6 @@ if ($id > 0 || !empty($ref)) { } $id = $object->id; // So when doing a search from ref, id is also set correctly. - $result = $projectstatic->fetch($object->fk_project); if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } @@ -191,7 +196,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -210,7 +215,7 @@ if ($id > 0 || !empty($ref)) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -233,13 +240,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); - } - print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -233,7 +238,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -252,8 +257,15 @@ if ($id > 0 || !empty($ref)) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 3ef93529b64..6a62e973a62 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -24,6 +24,7 @@ * \brief Page de gestion des documents attachees a une tache d'un projet */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -119,10 +120,15 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ - $form = new Form($db); -llxHeader('', $langs->trans('Task')); +$title = $object->ref . ' - ' . $langs->trans("Documents"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); if ($object->id > 0) { $projectstatic->fetch_thirdparty(); @@ -147,7 +153,7 @@ if ($object->id > 0) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -166,7 +172,7 @@ if ($object->id > 0) { print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -264,13 +276,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); - } - print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -189,7 +195,7 @@ if ($object->id > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -208,8 +214,15 @@ if ($object->id > 0) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index d15d5797dd6..72c5eb25874 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -46,7 +46,7 @@ $mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$search_categ = GETPOST("search_categ", 'alpha'); +$search_categ = GETPOST("search_categ", 'int'); $search_projectstatus = GETPOST('search_projectstatus'); if (!isset($search_projectstatus) || $search_projectstatus === '') { @@ -68,7 +68,15 @@ $search_task_user = GETPOST('search_task_user', 'int'); $search_task_progress = GETPOST('search_task_progress'); $search_task_budget_amount = GETPOST('search_task_budget_amount'); $search_societe = GETPOST('search_societe'); +$search_societe_alias = GETPOST('search_societe_alias'); $search_opp_status = GETPOST("search_opp_status", 'alpha'); +$searchCategoryCustomerOperator = 0; +if (GETPOSTISSET('formfilteraction')) { + $searchCategoryCustomerOperator = GETPOST('search_category_customer_operator', 'int'); +} elseif (!empty($conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT)) { + $searchCategoryCustomerOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; +} +$searchCategoryCustomerList = GETPOST('search_category_customer_list', 'array'); $mine = GETPOST('mode', 'alpha') == 'mine' ? 1 : 0; if ($mine) { @@ -154,6 +162,7 @@ $arrayfields = array( 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1), 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>0), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1), 'p.fk_statut'=>array('label'=>"ProjectStatus", 'checked'=>1), 't.planned_workload'=>array('label'=>"PlannedWorkload", 'checked'=>1, 'position'=>102), 't.duration_effective'=>array('label'=>"TimeSpent", 'checked'=>1, 'position'=>103), @@ -205,6 +214,8 @@ if (empty($reshook)) { $search_categ = ""; $search_projectstatus = -1; $search_project_ref = ""; + $search_societe = ""; + $search_societe_alias = ""; $search_project_title = ""; $search_task_ref = ""; $search_task_label = ""; @@ -231,6 +242,7 @@ if (empty($reshook)) { $search_datelimit_start = ''; $search_datelimit_end = ''; $toselect = array(); + $searchCategoryCustomerList = array(); $search_array_options = array(); } @@ -274,7 +286,7 @@ if ($search_task_user > 0) { $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $title = $langs->trans("Activities"); @@ -326,15 +338,11 @@ if (count($listoftaskcontacttype) == 0) { $distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is assigned only once. $sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.datee as projectdatee, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate, p.usage_bill_time,"; -$sql .= " s.nom as name, s.rowid as socid,"; +$sql .= " s.nom as name, s.name_alias as alias, s.rowid as socid,"; $sql .= " t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update,"; -$sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut, "; +$sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut,"; $sql .= " t.description, t.fk_task_parent"; $sql .= " ,t.budget_amount"; -// We'll need these fields in order to filter by categ -if ($search_categ > 0) { - $sql .= ", cs.fk_categorie, cs.fk_project"; -} // Add sum fields if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) { $sql .= " , SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "1", "0").") as tobill, SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "0", "1").") as billed"; @@ -351,10 +359,6 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; -// We'll need this table joined to the select in order to filter by categ -if ($search_categ > 0) { - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ -} $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tt ON tt.fk_task = t.rowid"; @@ -380,12 +384,6 @@ if (is_object($projectstatic) && $projectstatic->id > 0) { if ($socid) { $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; } -if ($search_categ > 0) { - $sql .= " AND cs.fk_categorie = ".((int) $search_categ); -} -if ($search_categ == -2) { - $sql .= " AND cs.fk_categorie IS NULL"; -} if ($search_project_ref) { $sql .= natural_search('p.ref', $search_project_ref); } @@ -410,8 +408,15 @@ if ($search_task_progress) { if ($search_task_budget_amount) { $sql .= natural_search('t.budget_amount', $search_task_budget_amount, 1); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_date_start) { $sql .= " AND t.dateo >= '".$db->idate($search_date_start)."'"; @@ -441,6 +446,80 @@ if ($search_project_user > 0) { if ($search_task_user > 0) { $sql .= " AND ect.fk_c_type_contact IN (".$db->sanitize(join(',', array_keys($listoftaskcontacttype))).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".((int) $search_task_user); } +// Search for tag/category ($searchCategoryProjectList is an array of ID) +$searchCategoryProjectList = array($search_categ); +$searchCategoryProjectOperator = 0; +if (!empty($searchCategoryProjectList)) { + $searchCategoryProjectSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProjectList as $searchCategoryProject) { + if (intval($searchCategoryProject) == -2) { + $searchCategoryProjectSqlList[] = "NOT EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project)"; + } elseif (intval($searchCategoryProject) > 0) { + if ($searchCategoryProjectOperator == 0) { + $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); + } + } + } + if ($listofcategoryid) { + $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProjectOperator == 1) { + if (!empty($searchCategoryProjectSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProjectSqlList).")"; + } + } else { + if (!empty($searchCategoryProjectSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProjectSqlList).")"; + } + } +} +$searchCategoryCustomerSqlList = array(); +if ($searchCategoryCustomerOperator == 1) { + $existsCategoryCustomerList = array(); + foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + if (intval($searchCategoryCustomer) == -2) { + $sqlCategoryCustomerNotExists = " NOT EXISTS ("; + $sqlCategoryCustomerNotExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerNotExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerNotExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerNotExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerNotExists; + } elseif (intval($searchCategoryCustomer) > 0) { + $existsCategoryCustomerList[] = $db->escape($searchCategoryCustomer); + } + } + if (!empty($existsCategoryCustomerList)) { + $sqlCategoryCustomerExists = " EXISTS ("; + $sqlCategoryCustomerExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerExists .= " AND cat_cus.fk_categorie IN (".$db->sanitize(implode(',', $existsCategoryCustomerList)).")"; + $sqlCategoryCustomerExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerExists; + } + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryCustomerSqlList).")"; + } +} else { + foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + if (intval($searchCategoryCustomer) == -2) { + $sqlCategoryCustomerNotExists = " NOT EXISTS ("; + $sqlCategoryCustomerNotExists .= " SELECT cat_cus.fk_soc"; + $sqlCategoryCustomerNotExists .= " FROM ".$db->prefix()."categorie_societe AS cat_cus"; + $sqlCategoryCustomerNotExists .= " WHERE cat_cus.fk_soc = p.fk_soc"; + $sqlCategoryCustomerNotExists .= " )"; + $searchCategoryCustomerSqlList[] = $sqlCategoryCustomerNotExists; + } elseif (intval($searchCategoryCustomer) > 0) { + $searchCategoryCustomerSqlList[] = "p.fk_soc IN (SELECT fk_soc FROM ".$db->prefix()."categorie_societe WHERE fk_categorie = ".((int) $searchCategoryCustomer).")"; + } + } + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryCustomerSqlList).")"; + } +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -452,9 +531,6 @@ if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed $sql .= " s.nom, s.rowid,"; $sql .= " t.datec, t.dateo, t.datee, t.tms,"; $sql .= " t.rowid, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress,t.budget_amount, t.fk_statut"; - if ($search_categ) { - $sql .= ", cs.fk_categorie, cs.fk_project"; - } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -579,6 +655,9 @@ if ($search_task_progress != '') { if ($search_societe != '') { $param .= '&search_societe='.urlencode($search_societe); } +if ($search_societe != '') { + $param .= '&search_societe_alias='.urlencode($search_societe_alias); +} if ($search_projectstatus != '') { $param .= '&search_projectstatus='.urlencode($search_projectstatus); } @@ -594,6 +673,9 @@ if ($search_task_user > 0) { if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } +foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + $param .= "&search_category_customer_list[]=".urlencode($searchCategoryCustomer); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks @@ -661,11 +743,11 @@ if ($search_all) { $moreforfilter = ''; // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (isModEnabled('categorie') && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('ProjectCategories'); - $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('project', $search_categ, 'search_categ', 0, $tmptitle, 'maxwidth300'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('project', $search_categ, 'search_categ', 1, $tmptitle, 'maxwidth300'); $moreforfilter .= '
    '; } @@ -689,6 +771,19 @@ if (empty($user->rights->user->user->lire)) { $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_task_user, 'search_task_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= ''; +// Filter on customer categories +if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_TASK_LIST) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + $moreforfilter .= '
    '; + $tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); + $categoriesArr = $form->select_all_categories(Categorie::TYPE_CUSTOMER, '', '', 64, 0, 1); + $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; + $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle); + $moreforfilter .= ' '; + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click + $moreforfilter .= '
    '; +} + if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; @@ -708,6 +803,13 @@ print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -220,13 +233,6 @@ if ($object->id > 0) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); - } - print '
    '; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} if (!empty($arrayfields['t.fk_task_parent']['checked'])) { print ''; } +if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; +} if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; } // Action column -print ''; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} print ''."\n"; $totalarray = array( @@ -854,6 +963,9 @@ $totalarray = array( // Fields title label // -------------------------------------------------------------------- print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['t.fk_task_parent']['checked'])) { print_liste_field_titre($arrayfields['t.fk_task_parent']['label'], $_SERVER["PHP_SELF"], "t.fk_task_parent", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; @@ -890,6 +1002,10 @@ if (!empty($arrayfields['s.nom']['checked'])) { print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } +if (!empty($arrayfields['s.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); + $totalarray['nbfield']++; +} if (!empty($arrayfields['p.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; @@ -946,7 +1062,9 @@ if (!empty($arrayfields['t.tms']['checked'])) { print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); $totalarray['nbfield']++; } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} $totalarray['nbfield']++; print ''."\n"; @@ -992,6 +1110,11 @@ while ($i < $imaxinloop) { $projectstatic->statut = $obj->projectstatus; $projectstatic->datee = $db->jdate($obj->projectdatee); + if ($obj->socid) { + $socstatic->id = $obj->socid; + $socstatic->name = $obj->name; + $socstatic->name_alias = $obj->alias; + } if ($mode == 'kanban') { if ($i == 0) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } // Ref Parent if (!empty($arrayfields['t.fk_task_parent']['checked'])) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; }*/ // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index a91879c2116..01c39c990f4 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -110,14 +110,19 @@ if (empty($reshook)) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $userstatic = new User($db); $now = dol_now(); +$title = $object->ref . ' - ' . $langs->trans("Notes"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); + if ($object->id > 0) { $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); @@ -137,7 +142,7 @@ if ($object->id > 0) { $morehtmlref .= $projectstatic->title; // Thirdparty if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -156,7 +161,7 @@ if ($object->id > 0) { print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; print ''; @@ -768,6 +870,11 @@ if (!empty($arrayfields['s.nom']['checked'])) { print ''; print ''; + print ''; + print ''; $arrayofstatus = array(); @@ -826,10 +933,12 @@ if (!empty($arrayfields['t.tms']['checked'])) { print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
    '; @@ -1008,6 +1131,18 @@ while ($i < $imaxinloop) { if ($userAccess >= 0) { 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; @@ -1058,7 +1193,8 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Date start + + // Date start project if (!empty($arrayfields['t.dateo']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_start), 'day'); @@ -1067,7 +1203,7 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - // Date end + // Date end project if (!empty($arrayfields['t.datee']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_end), 'day'); @@ -1101,9 +1237,20 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['s.nom']['checked'])) { print ''; if ($obj->socid) { - $socstatic->id = $obj->socid; - $socstatic->name = $obj->name; - print $socstatic->getNomUrl(1); + print $socstatic->getNomUrl(1, '', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); + } else { + print ' '; + } + print ''; + if ($obj->socid) { + print $socstatic->name_alias; } else { print ' '; } @@ -1315,21 +1462,23 @@ while ($i < $imaxinloop) { } } // Status - /*if (! empty($arrayfields['p.fk_statut']['checked'])) + /*if (!empty($arrayfields['p.fk_statut']['checked'])) { $projectstatic->statut = $obj->fk_statut; print ''.$projectstatic->getLibStatut(5).''; - 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($object->id, $arrayofselected)) { - $selected = 1; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
    '; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -179,7 +184,7 @@ if ($object->id > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
    '; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); @@ -198,8 +203,15 @@ if ($object->id > 0) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index 2ca72552fa4..07b0199d480 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -22,6 +22,7 @@ * \brief Page for tasks statistics */ +// Load Dolibarr environment require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; @@ -43,7 +44,7 @@ if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index da0a078196b..8b19c8c0519 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -100,8 +100,11 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) { $object->ref = $taskref ? $taskref : GETPOST("ref", 'alpha', 2); $object->label = GETPOST("label", "alphanohtml"); - if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $object->description = GETPOST('description', "alphanohtml"); - else $object->description = GETPOST('description', "restricthtml"); + if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) { + $object->description = GETPOST('description', "alphanohtml"); + } else { + $object->description = GETPOST('description', "restricthtml"); + } $object->fk_task_parent = $task_parent; $object->planned_workload = $planned_workload; $object->date_start = dol_mktime(GETPOST('dateohour', 'int'), GETPOST('dateomin', 'int'), 0, GETPOST('dateomonth', 'int'), GETPOST('dateoday', 'int'), GETPOST('dateoyear', 'int')); @@ -129,6 +132,28 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) { } } +if ($action == 'confirm_clone' && $confirm == 'yes') { + //$clone_contacts = GETPOST('clone_contacts') ? 1 : 0; + $clone_prog = GETPOST('clone_prog') ? 1 : 0; + $clone_time = GETPOST('clone_time') ? 1 : 0; + $clone_affectation = GETPOST('clone_affectation') ? 1 : 0; + $clone_change_dt = GETPOST('clone_change_dt') ? 1 : 0; + $clone_notes = GETPOST('clone_notes') ? 1 : 0; + $clone_file = GETPOST('clone_file') ? 1 : 0; + $result = $object->createFromClone($user, $object->id, $object->fk_project, $object->fk_task_parent, $clone_change_dt, $clone_affectation, $clone_time, $clone_file, $clone_notes, $clone_prog); + if ($result <= 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + // Load new object + $newobject = new Task($db); + $newobject->fetch($result); + $newobject->fetch_optionals(); + $newobject->fetch_thirdparty(); // Load new object + $object = $newobject; + $action = ''; + } +} + if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->supprimer) { $result = $projectstatic->fetch($object->fk_project); $projectstatic->fetch_thirdparty(); @@ -193,12 +218,19 @@ if ($action == 'remove_file' && $user->rights->projet->creer) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); +$result = $projectstatic->fetch($object->fk_project); + +$title = $object->ref; +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); + if ($id > 0 || !empty($ref)) { $res = $object->fetch_optionals(); @@ -206,7 +238,7 @@ if ($id > 0 || !empty($ref)) { $object->fetchComments(); } - $result = $projectstatic->fetch($object->fk_project); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } @@ -235,7 +267,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $projectstatic->title; // Thirdparty if (!empty($projectstatic->thirdparty->id) &&$projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -296,8 +328,15 @@ if ($id > 0 || !empty($ref)) { } print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; @@ -380,6 +412,22 @@ if ($id > 0 || !empty($ref)) { //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project //$arrayofuseridoftask=$object->getListContactId('internal'); + if ($action == 'clone') { + $formquestion = array( + 'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_contacts', 'label' => $langs->trans("CloneContacts"), 'value' => true), + array('type' => 'checkbox', 'name' => 'clone_change_dt', 'label' => $langs->trans("CloneChanges"), 'value' => true), + array('type' => 'checkbox', 'name' => 'clone_affectation', 'label' => $langs->trans("CloneAffectation"), 'value' => true), + array('type' => 'checkbox', 'name' => 'clone_prog', 'label' => $langs->trans("CloneProgression"), 'value' => true), + array('type' => 'checkbox', 'name' => 'clone_time', 'label' => $langs->trans("CloneTimes"), 'value' => true), + array('type' => 'checkbox', 'name' => 'clone_file', 'label' => $langs->trans("CloneFile"), 'value' => true), + + ); + + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("ToClone"), $langs->trans("ConfirmCloneTask"), "confirm_clone", $formquestion, '', 1, 300, 590); + } + + $head = task_prepare_head($object); if ($action == 'edit' && $user->rights->projet->creer) { @@ -446,18 +494,14 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; print ''; @@ -533,7 +577,7 @@ if ($id > 0 || !empty($ref)) { } print ''; - // Date start - Date end + // Date start - Date end task print ''; - // Date start - end - print ''; + + // Date start - end project + print ''; - // Budget - print ''; - // Other attributes $cols = 2; - //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + $savobject = $object; + $object = $projectstatic; + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + $object = $savobject; print '
    '; print $langs->trans("Usage"); print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -210,13 +222,6 @@ if ($object->id > 0) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); - } - print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -308,13 +347,6 @@ if ($id > 0 || !empty($ref)) { } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; - } - print '
    '.$langs->trans("Description").''; - if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) { - print ''; - } else { - // WYSIWYG editor - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0); - if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) { - $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; - } - $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows); - print $doleditor->Create(); + // WYSIWYG editor + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_SOCIETE) ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0); + if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) { + $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; } + $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows); + print $doleditor->Create(); print '
    '.$langs->trans("Budget").'
    '.$langs->trans("DateStart").' - '.$langs->trans("Deadline").''; $start = dol_print_date($object->date_start, 'dayhour'); print ($start ? $start : '?'); @@ -623,19 +667,21 @@ if ($id > 0 || !empty($ref)) { // Modify if ($user->rights->projet->creer) { print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Clone').''; } else { print ''.$langs->trans('Modify').''; } // Delete - if ($user->rights->projet->supprimer) { + $permissiontodelete = $user->hasRight('projet', 'supprimer'); + if ($permissiontodelete) { if (!$object->hasChildren() && !$object->hasTimeSpent()) { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&withproject='.((int) $withproject), 'delete', $permissiontodelete); } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("TaskHasChild"), $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&withproject='.((int) $withproject), 'delete', 0); } } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&withproject='.((int) $withproject), 'delete', $permissiontodelete); } print ''; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 6ff81ff3fbf..cb6cf3697c3 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -27,6 +27,7 @@ * \brief Page to add new time spent on a task */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -38,8 +39,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; // Load translation files required by the page -$langsLoad=array('projects', 'bills', 'orders'); -if (!empty($conf->eventorganization->enabled)) { +$langsLoad=array('projects', 'bills', 'orders', 'companies'); +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -53,6 +54,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected i $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'alpha'); +$mode = GETPOST('mode', 'alpha'); $id = GETPOST('id', 'int'); $projectid = GETPOST('projectid', 'int'); @@ -66,6 +68,14 @@ $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); $search_datehour = ''; $search_datewithhour = ''; +$search_date_startday = GETPOST('search_date_startday', 'int'); +$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); +$search_date_startyear = GETPOST('search_date_startyear', 'int'); +$search_date_endday = GETPOST('search_date_endday', 'int'); +$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); +$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver +$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_note = GETPOST('search_note', 'alpha'); $search_duration = GETPOST('search_duration', 'int'); $search_value = GETPOST('search_value', 'int'); @@ -73,6 +83,11 @@ $search_task_ref = GETPOST('search_task_ref', 'alpha'); $search_task_label = GETPOST('search_task_label', 'alpha'); $search_user = GETPOST('search_user', 'int'); $search_valuebilled = GETPOST('search_valuebilled', 'int'); +$search_product_ref = GETPOST('search_product_ref', 'alpha'); +$search_company = GETPOST('$search_company', 'alpha'); +$search_company_alias = GETPOST('$search_company_alias', 'alpha'); +$search_project_ref = GETPOST('$search_project_ref', 'alpha'); +$search_project_label = GETPOST('$search_project_label', 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -162,10 +177,23 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_value = ''; $search_date_creation = ''; $search_date_update = ''; + $search_date_startday = ''; + $search_date_startmonth = ''; + $search_date_startyear = ''; + $search_date_endday = ''; + $search_date_endmonth = ''; + $search_date_endyear = ''; + $search_date_start = ''; + $search_date_end = ''; $search_task_ref = ''; + $search_company = ''; + $search_company_alias = ''; + $search_project_ref = ''; + $search_project_label = ''; $search_task_label = ''; $search_user = 0; $search_valuebilled = ''; + $search_product_ref = ''; $toselect = array(); $search_array_options = array(); $action = ''; @@ -220,6 +248,7 @@ if ($action == 'addtimespent' && $user->rights->projet->time) { $object->timespent_date = dol_mktime(12, 0, 0, GETPOST("timemonth", 'int'), GETPOST("timeday", 'int'), GETPOST("timeyear", 'int')); } $object->timespent_fk_user = GETPOST("userid", 'int'); + $object->timespent_fk_product = GETPOST("fk_product", 'int'); $result = $object->addTimeSpent($user); if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); @@ -271,17 +300,17 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->timespent_date = dol_mktime(12, 0, 0, GETPOST("timelinemonth"), GETPOST("timelineday"), GETPOST("timelineyear")); } $object->timespent_fk_user = GETPOST("userid_line", 'int'); + $object->timespent_fk_product = GETPOST("fk_product", 'int'); $result = 0; if (in_array($object->timespent_fk_user, $childids) || $user->rights->projet->all->creer) { $result = $object->addTimeSpent($user); - } - - if ($result >= 0) { - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans($object->error), null, 'errors'); - $error++; + if ($result >= 0) { + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + $error++; + } } } else { $object->fetch($id, $ref); @@ -298,6 +327,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->timespent_date = dol_mktime(12, 0, 0, GETPOST("timelinemonth", 'int'), GETPOST("timelineday", 'int'), GETPOST("timelineyear", 'int')); } $object->timespent_fk_user = GETPOST("userid_line", 'int'); + $object->timespent_fk_product = GETPOST("fk_product", 'int'); $result = 0; if (in_array($object->timespent_fk_user, $childids) || $user->rights->projet->all->creer) { @@ -316,10 +346,10 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us } } -if ($action == 'confirm_deleteline' && $confirm == "yes" && $user->rights->projet->supprimer) { - $object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_id +if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { + $object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx - if (in_array($object->timespent_fk_user, $childids) || $user->rights->projet->all->creer) { + if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { $result = $object->delTimeSpent($user); // delete line with $object->timespent_id if ($result < 0) { @@ -391,36 +421,22 @@ if ($action == 'confirm_generateinvoice') { $generateinvoicemode = GETPOST('generateinvoicemode', 'string'); $invoiceToUse = GETPOST('invoiceid', 'int'); - $prodDurationHours = 1.0; + $prodDurationHoursBase = 1.0; + $product_data_cache = array(); if ($idprod > 0) { $tmpproduct->fetch($idprod); + if ($result<0) { + $error++; + setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors'); + } - if (empty($tmpproduct->duration_value)) { + $prodDurationHoursBase=$tmpproduct->getProductDurationHours(); + if ($prodDurationHoursBase<0) { $error++; $langs->load("errors"); - setEventMessages($langs->trans("ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice"), null, 'errors'); + setEventMessages(null, $tmpproduct->errors, 'errors'); } - if ($tmpproduct->duration_unit == 'i') { - $prodDurationHours = 1. / 60; - } - if ($tmpproduct->duration_unit == 'h') { - $prodDurationHours = 1.; - } - if ($tmpproduct->duration_unit == 'd') { - $prodDurationHours = 24.; - } - if ($tmpproduct->duration_unit == 'w') { - $prodDurationHours = 24. * 7; - } - if ($tmpproduct->duration_unit == 'm') { - $prodDurationHours = 24. * 30; - } - if ($tmpproduct->duration_unit == 'y') { - $prodDurationHours = 24. * 365; - } - $prodDurationHours *= $tmpproduct->duration_value; - $dataforprice = $tmpproduct->getSellPrice($mysoc, $projectstatic->thirdparty, 0); $pu_ht = empty($dataforprice['pu_ht']) ? 0 : $dataforprice['pu_ht']; @@ -428,7 +444,7 @@ if ($action == 'confirm_generateinvoice') { $localtax1 = $dataforprice['localtax1']; $localtax2 = $dataforprice['localtax2']; } else { - $prodDurationHours = 1; + $prodDurationHoursBase = 1; $pu_ht = 0; $txtva = get_default_tva($mysoc, $projectstatic->thirdparty); @@ -439,6 +455,9 @@ if ($action == 'confirm_generateinvoice') { $tmpinvoice->socid = $projectstatic->thirdparty->id; $tmpinvoice->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $tmpinvoice->fk_project = $projectstatic->id; + $tmpinvoice->cond_reglement_id = $projectstatic->thirdparty->cond_reglement_id; + $tmpinvoice->mode_reglement_id = $projectstatic->thirdparty->mode_reglement_id; + $tmpinvoice->fk_account = $projectstatic->thirdparty->fk_account; if ($invoiceToUse) { $tmpinvoice->fetch($invoiceToUse); @@ -451,49 +470,102 @@ if ($action == 'confirm_generateinvoice') { } if (!$error) { - if ($generateinvoicemode == 'onelineperuser') { + if ($generateinvoicemode == 'onelineperuser') { // 1 line per user (and per product) $arrayoftasks = array(); foreach ($toselect as $key => $value) { // Get userid, timepent - $object->fetchTimeSpent($value); - $arrayoftasks[$object->timespent_fk_user]['timespent'] += $object->timespent_duration; - $arrayoftasks[$object->timespent_fk_user]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table + $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; + $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); } - foreach ($arrayoftasks as $userid => $value) { + foreach ($arrayoftasks as $userid => $data) { $fuser->fetch($userid); - $pu_ht = $fuser->thm; $username = $fuser->getFullName($langs); - // Define qty per hour - $qtyhour = $value['timespent'] / 3600; - $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); + foreach ($data as $fk_product => $timespent_data) { + // Define qty per hour + $qtyhour = $timespent_data['timespent'] / 3600; + $qtyhourtext = convertSecondToTime($timespent_data['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); - /* - // If no unit price known - if (empty($pu_ht)) { - $pu_ht = price2num($value['totalvaluetodivideby3600'] / 3600, 'MU'); - } - */ + // Set the unit price we want to sell the time, for this user + if (getDolGlobalInt('PROJECT_USE_REAL_COST_FOR_TIME_INVOICING')) { + // We set unit price to 0 to force the use of the rate saved during recording + $pu_ht = 0; + } else { + // We want to sell all the time spent with the last hourly rate of user + $pu_ht = $fuser->thm; + } - //Unit price - $pu_ht = price2num(($value['totalvaluetodivideby3600'] / $value['timespent']), 'MU'); + // If no unit price known for user, we use the price recorded when recording timespent. + if (empty($pu_ht)) { + if ($timespent_data['timespent']) { + $pu_ht = price2num(($timespent_data['totalvaluetodivideby3600'] / $timespent_data['timespent']), 'MU'); + } + } - // Add lines - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_ht, round($qtyhour / $prodDurationHours, 2), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0)); + // Add lines + $prodDurationHours = $prodDurationHoursBase; + $idprodline=$idprod; + $pu_htline = $pu_ht; + $txtvaline = $txtva; + $localtax1line = $localtax1; + $localtax2line = $localtax2; - // Update lineid into line of timespent - $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); - $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).') AND fk_user = '.((int) $userid); - $result = $db->query($sql); - if (!$result) { - $error++; - setEventMessages($db->lasterror(), null, 'errors'); - break; + // If a particular product/service was defined for the task + if (!empty($fk_product) && $fk_product !== $idprod) { + if (!array_key_exists($fk_product, $product_data_cache)) { + $result = $tmpproduct->fetch($fk_product); + if ($result < 0) { + $error++; + setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors'); + } + $prodDurationHours = $tmpproduct->getProductDurationHours(); + if ($prodDurationHours < 0) { + $error++; + $langs->load("errors"); + setEventMessages(null, $tmpproduct->errors, 'errors'); + } + + $dataforprice = $tmpproduct->getSellPrice($mysoc, $projectstatic->thirdparty, 0); + + $pu_htline = empty($dataforprice['pu_ht']) ? 0 : $dataforprice['pu_ht']; + $txtvaline = $dataforprice['tva_tx']; + $localtax1line = $dataforprice['localtax1']; + $localtax2line = $dataforprice['localtax2']; + + $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); + } else { + $prodDurationHours = $product_data_cache[$fk_product]['duration']; + $pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht']; + $txtvaline = $product_data_cache[$fk_product]['dataforprice']['tva_tx']; + $localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1']; + $localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2']; + } + $idprodline=$fk_product; + } + + // Add lines + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); + if ($lineid<0) { + $error++; + setEventMessages(null, $tmpinvoice->errors, 'errors'); + } + + // Update lineid into line of timespent + $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).') AND fk_user = '.((int) $userid); + $result = $db->query($sql); + if (!$result) { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + break; + } } } } elseif ($generateinvoicemode == 'onelineperperiod') { // One line for each time spent line $arrayoftasks = array(); + $withdetail=GETPOST('detail_time_duration', 'alpha'); foreach ($toselect as $key => $value) { // Get userid, timepent @@ -509,7 +581,7 @@ if ($action == 'confirm_generateinvoice') { $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note if (!empty($withdetail)) { - if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { + if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { $arrayoftasks[$object->timespent_id]['note'] .= "
    "; } else { $arrayoftasks[$object->timespent_id]['note'] .= "\n"; @@ -523,6 +595,7 @@ if ($action == 'confirm_generateinvoice') { $arrayoftasks[$object->timespent_id]['note'] .= ' - '.$langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); } $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; + $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; } foreach ($arrayoftasks as $timespent_id => $value) { @@ -538,7 +611,49 @@ if ($action == 'confirm_generateinvoice') { } // Add lines - $lineid = $tmpinvoice->addline($value['note'], $pu_ht, round($qtyhour / $prodDurationHours, 2), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0)); + $prodDurationHours = $prodDurationHoursBase; + $idprodline=$idprod; + $pu_htline = $pu_ht; + $txtvaline = $txtva; + $localtax1line = $localtax1; + $localtax2line = $localtax2; + + if (!empty($value['fk_product']) && $value['fk_product']!==$idprod) { + if (!array_key_exists($value['fk_product'], $product_data_cache)) { + $result = $tmpproduct->fetch($value['fk_product']); + if ($result < 0) { + $error++; + setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors'); + } + $prodDurationHours = $tmpproduct->getProductDurationHours(); + if ($prodDurationHours < 0) { + $error++; + $langs->load("errors"); + setEventMessages(null, $tmpproduct->errors, 'errors'); + } + + $dataforprice = $tmpproduct->getSellPrice($mysoc, $projectstatic->thirdparty, 0); + + $pu_htline = empty($dataforprice['pu_ht']) ? 0 : $dataforprice['pu_ht']; + $txtvaline = $dataforprice['tva_tx']; + $localtax1line = $dataforprice['localtax1']; + $localtax2line = $dataforprice['localtax2']; + + $product_data_cache[$value['fk_product']] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); + } else { + $prodDurationHours = $product_data_cache[$value['fk_product']]['duration']; + $pu_htline = empty($product_data_cache[$value['fk_product']]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$value['fk_product']]['dataforprice']['pu_ht']; + $txtvaline = $product_data_cache[$value['fk_product']]['dataforprice']['tva_tx']; + $localtax1line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax1']; + $localtax2line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax2']; + } + $idprodline=$value['fk_product']; + } + $lineid = $tmpinvoice->addline($value['note'], $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); + if ($lineid<0) { + $error++; + setEventMessages(null, $tmpinvoice->errors, 'errors'); + } //var_dump($lineid);exit; // Update lineid into line of timespent @@ -557,56 +672,99 @@ if ($action == 'confirm_generateinvoice') { // Get userid, timepent $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) // $object->id is now the task id - $arrayoftasks[$object->id]['timespent'] += $object->timespent_duration; - $arrayoftasks[$object->id]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); + $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; + $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); } - foreach ($arrayoftasks as $task_id => $value) { + foreach ($arrayoftasks as $task_id => $data) { $ftask = new Task($db); $ftask->fetch($task_id); - // Define qty per hour - $qtyhour = $value['timespent'] / 3600; - $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); - if ($idprod > 0) { - // If a product is defined, we msut use the $prodDurationHours and $pu_ht of product (already set previously). - $pu_ht_for_task = $pu_ht; - // If we want to reuse the value of timespent (so use same price than cost price) - if (!empty($conf->global->PROJECT_TIME_SPENT_INTO_INVOICE_USE_VALUE)) { - $pu_ht_for_task = price2num($value['totalvaluetodivideby3600'] / $value['timespent'], 'MU') * $prodDurationHours; + foreach ($data as $fk_product=>$timespent_data) { + $qtyhour = $timespent_data['timespent'] / 3600; + $qtyhourtext = convertSecondToTime($timespent_data['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); + + // Add lines + $prodDurationHours = $prodDurationHoursBase; + $idprodline=$idprod; + $pu_htline = $pu_ht; + $txtvaline = $txtva; + $localtax1line = $localtax1; + $localtax2line = $localtax2; + + if (!empty($fk_product) && $fk_product!==$idprod) { + if (!array_key_exists($fk_product, $product_data_cache)) { + $result = $tmpproduct->fetch($fk_product); + if ($result < 0) { + $error++; + setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors'); + } + $prodDurationHours = $tmpproduct->getProductDurationHours(); + if ($prodDurationHours < 0) { + $error++; + $langs->load("errors"); + setEventMessages(null, $tmpproduct->errors, 'errors'); + } + + $dataforprice = $tmpproduct->getSellPrice($mysoc, $projectstatic->thirdparty, 0); + + $pu_htline = empty($dataforprice['pu_ht']) ? 0 : $dataforprice['pu_ht']; + $txtvaline = $dataforprice['tva_tx']; + $localtax1line = $dataforprice['localtax1']; + $localtax2line = $dataforprice['localtax2']; + + $product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice); + } else { + $prodDurationHours = $product_data_cache[$fk_product]['duration']; + $pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht']; + $txtvaline = $product_data_cache[$fk_product]['dataforprice']['tva_tx']; + $localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1']; + $localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2']; + } + $idprodline=$fk_product; } - $pa_ht = price2num($value['totalvaluetodivideby3600'] / $value['timespent'], 'MU') * $prodDurationHours; - } else { - // If not product used, we use the hour unit for duration and unit price. - $pu_ht_for_task = 0; - // If we want to reuse the value of timespent (so use same price than cost price) - if (!empty($conf->global->PROJECT_TIME_SPENT_INTO_INVOICE_USE_VALUE)) { - $pu_ht_for_task = price2num($value['totalvaluetodivideby3600'] / $value['timespent'], 'MU'); + + + if ($idprodline > 0) { + // If a product is defined, we msut use the $prodDurationHours and $pu_ht of product (already set previously). + $pu_ht_for_task = $pu_htline; + // If we want to reuse the value of timespent (so use same price than cost price) + if (!empty($conf->global->PROJECT_TIME_SPENT_INTO_INVOICE_USE_VALUE)) { + $pu_ht_for_task = price2num($timespent_data['totalvaluetodivideby3600'] / $timespent_data['timespent'], 'MU') * $prodDurationHours; + } + $pa_ht = price2num($timespent_data['totalvaluetodivideby3600'] / $timespent_data['timespent'], 'MU') * $prodDurationHours; + } else { + // If not product used, we use the hour unit for duration and unit price. + $pu_ht_for_task = 0; + // If we want to reuse the value of timespent (so use same price than cost price) + if (!empty($conf->global->PROJECT_TIME_SPENT_INTO_INVOICE_USE_VALUE)) { + $pu_ht_for_task = price2num($timespent_data['totalvaluetodivideby3600'] / $timespent_data['timespent'], 'MU'); + } + $pa_ht = price2num($timespent_data['totalvaluetodivideby3600'] / $timespent_data['timespent'], 'MU'); } - $pa_ht = price2num($value['totalvaluetodivideby3600'] / $value['timespent'], 'MU'); - } - // Add lines - $date_start = ''; - $date_end = ''; - $lineName = $ftask->ref.' - '.$ftask->label; - $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); - if ($lineid < 0) { - $error++; - setEventMessages($tmpinvoice->error, $tmpinvoice->errors, 'errors'); - break; - } - - if (!$error) { - // Update lineid into line of timespent - $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); - $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')'; - $result = $db->query($sql); - if (!$result) { + // Add lines + $date_start = ''; + $date_end = ''; + $lineName = $ftask->ref . ' - ' . $ftask->label; + $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); + if ($lineid < 0) { $error++; - setEventMessages($db->lasterror(), null, 'errors'); + setEventMessages($tmpinvoice->error, $tmpinvoice->errors, 'errors'); break; } + + if (!$error) { + // Update lineid into line of timespent + $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'projet_task_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); + $sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')'; + $result = $db->query($sql); + if (!$result) { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + break; + } + } } } } @@ -652,7 +810,7 @@ if ($action == 'confirm_generateinter') { $tmpinter->socid = $projectstatic->thirdparty->id; $tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $tmpinter->fk_project = $projectstatic->id; - $tmpinter->description = $projectstatic->title . ( ! empty($projectstatic->description) ? '-' . $projectstatic->label : '' ); + $tmpinter->description = $projectstatic->title . ( !empty($projectstatic->description) ? '-' . $projectstatic->label : '' ); if ($interToUse) { $tmpinter->fetch($interToUse); @@ -685,7 +843,7 @@ if ($action == 'confirm_generateinter') { $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); // Add lines - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . ( ! empty($value['note']) ? ' - ' . $value['note'] : '' ), $value['date'], $value['timespent']); + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . ( !empty($value['note']) ? ' - ' . $value['note'] : '' ), $value['date'], $value['timespent']); } } @@ -707,15 +865,20 @@ if ($action == 'confirm_generateinter') { /* * View */ - -$arrayofselected = is_array($toselect) ? $toselect : array(); - -llxHeader("", $langs->trans("Task")); - $form = new Form($db); $formother = new FormOther($db); $formproject = new FormProjets($db); $userstatic = new User($db); +//$result = $projectstatic->fetch($object->fk_project); +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser > 0) { /* @@ -778,7 +941,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $morehtmlref .= $projectstatic->title; // Thirdparty if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + $morehtmlref .= '
    '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -839,8 +1002,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + // Budget + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; + } + print '
    '.$langs->trans("Dates").''; $start = dol_print_date($projectstatic->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -851,16 +1021,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } print '
    '.$langs->trans("Budget").''; - if (strcmp($projectstatic->budget_amount, '')) { - print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).''; - } - print '
    '; @@ -935,7 +1101,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser //'builddoc'=>$langs->trans("PDFMerge"), ); } - if ( ! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { + if ( isModEnabled('ficheinter') && $user->rights->ficheinter->creer) { $langs->load("interventions"); $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); } @@ -999,7 +1165,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } print '
    '.$langs->trans("DateStart").' - '.$langs->trans("Deadline").''; $start = dol_print_date($object->date_start, 'dayhour'); print ($start ? $start : '?'); @@ -1073,7 +1239,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid, "projectstatic" => $projectstatic, "withproject" => $withproject); + $parameters = array('formConfirm' => $formconfirm, "projectstatic" => $projectstatic, "withproject" => $withproject); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $formconfirm .= $hookmanager->resPrint; @@ -1087,12 +1253,21 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser // Definition of fields for list $arrayfields = array(); $arrayfields['t.task_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1); + $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1); + $arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1'); if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task + if (! empty($allprojectforuser)) { + $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; + $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; + } $arrayfields['t.task_ref'] = array('label'=>$langs->trans("RefTask"), 'checked'=>1); $arrayfields['t.task_label'] = array('label'=>$langs->trans("LabelTask"), 'checked'=>1); } $arrayfields['author'] = array('label'=>$langs->trans("By"), 'checked'=>1); $arrayfields['t.note'] = array('label'=>$langs->trans("Note"), 'checked'=>1); + if (isModEnabled('service') && !empty($projectstatic->thirdparty) && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) { + $arrayfields['t.fk_product'] = array('label' => $langs->trans("Product"), 'checked' => 1); + } $arrayfields['t.task_duration'] = array('label'=>$langs->trans("Duration"), 'checked'=>1); $arrayfields['value'] = array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>(empty($conf->salaries->enabled) ? 0 : 1)); $arrayfields['valuebilled'] = array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((!empty($conf->global->PROJECT_HIDE_TASKS) || empty($conf->global->PROJECT_BILL_TIME_SPENT)) ? 0 : 1) && $projectstatic->usage_bill_time)); @@ -1120,6 +1295,18 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref != '') { $param .= '&search_task_ref='.urlencode($search_task_ref); } + if ($search_company != '') { + $param .= '&$search_company='.urlencode($search_company); + } + if ($search_company_alias != '') { + $param .= '&$search_company_alias='.urlencode($search_company_alias); + } + if ($search_project_ref != '') { + $param .= '&$search_project_ref='.urlencode($search_project_ref); + } + if ($search_project_label != '') { + $param .= '&$search_project_label='.urlencode($search_project_label); + } if ($search_task_label != '') { $param .= '&search_task_label='.urlencode($search_task_label); } @@ -1132,6 +1319,25 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } + if ($search_date_startday) { + $param .= '&search_date_startday='.urlencode($search_date_startday); + } + if ($search_date_startmonth) { + $param .= '&search_date_startmonth='.urlencode($search_date_startmonth); + } + if ($search_date_startyear) { + $param .= '&search_date_startyear='.urlencode($search_date_startyear); + } + if ($search_date_endday) { + $param .= '&search_date_endday='.urlencode($search_date_endday); + } + if ($search_date_endmonth) { + $param .= '&search_date_endmonth='.urlencode($search_date_endmonth); + } + if ($search_date_endyear) { + $param .= '&search_date_endyear='.urlencode($search_date_endyear); + } + /* // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -1162,9 +1368,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; } elseif ($action == 'createtime' && $user->rights->projet->time) { print ''; - } elseif ($massaction == 'generateinvoice' && $user->rights->facture->lire) { + } elseif ($massaction == 'generateinvoice' && $user->rights->facture->creer) { print ''; - } elseif ($massaction == 'generateinter' && $user->rights->ficheinter->lire) { + } elseif ($massaction == 'generateinter' && $user->rights->ficheinter->creer) { print ''; } else { print ''; @@ -1316,10 +1522,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser */ $tasks = array(); + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields + $sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm,"; + $sql .= " t.fk_product,"; $sql .= " pt.ref, pt.label, pt.fk_projet,"; $sql .= " u.lastname, u.firstname, u.login, u.photo, u.statut as user_status,"; $sql .= " il.fk_facture as invoice_id, inv.fk_statut,"; + $sql .= " p.fk_soc,s.name_alias,"; // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook @@ -1328,13 +1539,17 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facturedet as il ON il.rowid = t.invoice_line_id"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as inv ON inv.rowid = il.fk_facture"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as prod ON prod.rowid = t.fk_product"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."projet_task as pt ON pt.rowid = t.fk_task"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = pt.fk_projet"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON t.fk_user = u.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; + // Add table from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - $sql .= ", ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid"; - + $sql .= " WHERE 1 = 1 "; if (empty($projectidforalltimes) && empty($allprojectforuser)) { // Limit on one task $sql .= " AND t.fk_task =".((int) $object->id); @@ -1355,12 +1570,31 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref) { $sql .= natural_search('pt.ref', $search_task_ref); } + if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); + } else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } + } + if ($search_project_ref) { + $sql .= natural_search('p.ref', $search_project_ref); + } + if ($search_project_label) { + $sql .= natural_search('p.title', $search_project_label); + } if ($search_task_label) { $sql .= natural_search('pt.label', $search_task_label); } if ($search_user > 0) { $sql .= natural_search('t.fk_user', $search_user, 2); } + if (!empty($search_product_ref)) { + $sql .= natural_search('prod.ref', $search_product_ref); + } if ($search_valuebilled == '1') { $sql .= ' AND t.invoice_id > 0'; } @@ -1368,6 +1602,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $sql .= ' AND (t.invoice_id = 0 OR t.invoice_id IS NULL)'; } + if ($search_date_start) { + $sql .= " AND t.task_date >= '".$db->idate($search_date_start)."'"; + } + if ($search_date_end) { + $sql .= " AND t.task_date <= '".$db->idate($search_date_end)."'"; + } + $sql .= dolSqlDateFilter('t.task_datehour', $search_day, $search_month, $search_year); // Add where from hooks @@ -1459,6 +1700,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''.$langs->trans("ProgressDeclared").''.$langs->trans("Product").''; print ''; + print $form->select_produits('', 'fk_product', '1', 0, $projectstatic->thirdparty->price_level, 1, 2, '', 0, array(), $projectstatic->thirdparty->id, 'None', 0, 'maxwidth500'); + print '
    '; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { - print ''; - } - print ''; - print $formother->selectyear($search_year, 'search_year', 1, 20, 5); + print ''; + print '
    '; + print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; print '
    '; - if (empty($conf->cache['project'][$task_time->fk_projet])) { - $tmpproject = new Project($db); - $tmpproject->fetch($task_time->fk_projet); - $conf->cache['project'][$task_time->fk_projet] = $tmpproject; - } else { - $tmpproject = $conf->cache['project'][$task_time->fk_projet]; + // Thirdparty + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print ''; + if ($task_time->fk_soc > 0) { + if (empty($conf->cache['thridparty'][$task_time->fk_soc])) { + $tmpsociete = new Societe($db); + $tmpsociete->fetch($task_time->fk_soc); + $conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete; + } else { + $tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc]; + } + print $tmpsociete->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } - print $tmpproject->getNomUrl(1); print ''; + if ($task_time->fk_soc > 0) { + if (empty($conf->cache['thridparty'][$task_time->fk_soc])) { + $tmpsociete = new Societe($db); + $tmpsociete->fetch($task_time->fk_soc); + $conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete; + } else { + $tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc]; + } + print $tmpsociete->name_alias; + } + print ''; + if (empty($conf->cache['project'][$task_time->fk_projet])) { + $tmpproject = new Project($db); + $tmpproject->fetch($task_time->fk_projet); + $conf->cache['project'][$task_time->fk_projet] = $tmpproject; + } else { + $tmpproject = $conf->cache['project'][$task_time->fk_projet]; + } + print $tmpproject->getNomUrl(1); + print ''; + if (empty($conf->cache['project'][$task_time->fk_projet])) { + $tmpproject = new Project($db); + $tmpproject->fetch($task_time->fk_projet); + $conf->cache['project'][$task_time->fk_projet] = $tmpproject; + } else { + $tmpproject = $conf->cache['project'][$task_time->fk_projet]; + } + print $tmpproject->title; + print ''; + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { + $form->select_produits($task_time->fk_product, 'fk_product', '1', 0, $projectstatic->thirdparty->price_level, 1, 2, '', 0, array(), $projectstatic->thirdparty->id, 'None', 0, 'maxwidth500'); + } elseif (!empty($task_time->fk_product)) { + $product = new Product($db); + $resultFetch = $product->fetch($task_time->fk_product); + if ($resultFetch < 0) { + setEventMessages($product->error, $product->errors, 'errors'); + } else { + print $product->getNomUrl(1); + } + } + print '
    '; - print $langs->trans("YourMailUnsubcribeOK", $obj->email)."
    \n"; - print '
    '; - print "\n"; - print "\n"; +if (empty($tag) || ($unsuscrib != '1')) { + print 'Bad parameters'; + exit; } + +/* + * View + */ + +$head = ''; +$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
    ' : '').'
    '; +llxHeader($head, $langs->trans("MailUnsubcribe"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); + +dol_syslog("public/emailing/mailing-unsubscribe.php : Launch unsubscribe requests", LOG_DEBUG); + +$sql = "SELECT mc.rowid, mc.email, mc.statut, m.entity"; +$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."mailing as m"; +$sql .= " WHERE mc.fk_mailing = m.rowid AND mc.tag = '".$db->escape($tag)."'"; + +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); +} + +$obj = $db->fetch_object($resql); + +if (empty($obj)) { + print 'Email tag not found. Operation canceled.'; + llxFooter('', 'private'); + exit; +} +if (empty($obj->email)) { + print 'Email for this tag not valid. Operation canceled.'; + llxFooter('', 'private'); + exit; +} + +if ($obj->statut == 3) { + print 'Email tag already set to unsubscribe. Operation canceled.'; + llxFooter('', 'private'); + exit; +} +// TODO Test that mtid and email match also with the one found from $tag +/* +if ($obj->email != $email) +{ + print 'Email does not match tagnot found. No need to unsubscribe.'; + exit; +} +*/ + +// Update status of mail in recipient mailing list table +$statut = '3'; +$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".((int) $statut)." WHERE tag = '".$db->escape($tag)."'"; + +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); +} + +/* +// Update status communication of thirdparty prospect (old usage) +$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag = '".$db->escape($tag)."' AND source_type='thirdparty' AND source_id is not null)"; + +$resql=$db->query($sql); +if (! $resql) dol_print_error($db); + +// Update status communication of contact prospect (old usage) +$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET no_email=1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag = '".$db->escape($tag)."' AND source_type='contact' AND source_id is not null)"; + +$resql=$db->query($sql); +if (! $resql) dol_print_error($db); +*/ + +// Update status communication of email (new usage) +$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email, unsubscribegroup, ip) VALUES ('".$db->idate(dol_now())."', ".((int) $obj->entity).", '".$db->escape($obj->email)."', '', '".$db->escape(getUserRemoteIP())."')"; + +$resql = $db->query($sql); +//if (! $resql) dol_print_error($db); No test on errors, may fail if already unsubscribed + + +print '
    '; +print $langs->trans("YourMailUnsubcribeOK", $obj->email)."
    \n"; +print '
    '; + + +llxFooter('', 'public'); + $db->close(); diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index 4dabf1f6c91..cb4ba38e628 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -45,6 +45,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -55,6 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; global $dolibarr_main_url_root; @@ -140,7 +142,7 @@ $user->loadDefaultValues(); // Security check if (empty($conf->eventorganization->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Event organization not enabled'); } @@ -228,7 +230,7 @@ if ($reshook < 0) { } // Action called when page is submitted -if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status!=2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { +if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status==2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { $error = 0; $urlback = ''; @@ -258,10 +260,12 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen // Check if attendee already exists (by email and for this event) $confattendee = new ConferenceOrBoothAttendee($db); + $filter = array(); + if ($type == 'global') { $filter = array('t.fk_project'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"'); } - if ($action == 'conf') { + if ($type == 'conf') { $filter = array('t.fk_actioncomm'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"'); } @@ -280,7 +284,39 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $confattendee->fk_actioncomm = $id; $confattendee->note_public = $note_public; - $resultconfattendee = $confattendee->create($user); + $confattendee->ip = getUserRemoteIP(); + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_attendee"; + $sql .= " FROM ".MAIN_DB_PREFIX."eventorganization_conferenceorboothattendee"; + $sql .= " WHERE ip = '".$db->escape($confattendee->ip)."'"; + $sql .= " AND date_creation > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_attendee; + } + } + } + + $resultconforbooth = -1; + + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + $error++; + $errmsg .= $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($confattendee->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + setEventMessage($errmsg, 'errors'); + } else { + $resultconfattendee = $confattendee->create($user); + } if ($resultconfattendee < 0) { $error++; $errmsg .= $confattendee->error; @@ -525,8 +561,11 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id); $labelforproduct = $outputlangs->trans("EventFee", $project->title); - $date_start = $project->date_start; - $date_end = $project->date_end; + if ($project->location) { + $labelforproduct .= ' - '.$project->location; + } + $date_start = $project->date_start_event; + $date_end = $project->date_end_event; // If there is no lines yet, we add one if (empty($facture->lines)) { @@ -651,10 +690,38 @@ print '
    '; // Welcome message -print $langs->trans("EvntOrgWelcomeMessage"); -print '
    '; -print ''.$project->title . ' '. $conference->label.''; +print ''.$langs->trans("EvntOrgWelcomeMessage").''; print '
    '; +print ''.$project->title . ' '. $conference->label.'
    '; +if ($project->date_start_event || $project->date_end_event) { + print ''; +} +if ($project->date_start_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_start_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_start_event, $format); +} +if ($project->date_start_event && $project->date_end_event) { + print ' - '; +} +if ($project->date_end_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_end_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_end_event, $format); +} +if ($project->date_start_event || $project->date_end_event) { + print '
    '; +} +if ($project->location) { + print ''.$project->location.'
    '; +} + $maxattendees = 0; if ($conference->id > 0) { /* date of project is not date of event so commented @@ -699,8 +766,8 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS print ''; print '
    '; - - print '
    ' . $langs->trans("FieldsWithAreMandatory", '*') . '
    '; + print '
    '; + //print '' . $langs->trans("FieldsWithAreMandatory", '*') . '
    '; //print $langs->trans("FieldsWithIsForPublic",'**').'
    '; print dol_get_fiche_head(''); @@ -719,18 +786,22 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS print '' . "\n"; // Email - print '' . "\n"; + print '' . "\n"; // Company - print '' . "\n"; + print 'price_registration)) ? '' : ' required').'>' . "\n"; // Email company for invoice if ($project->price_registration) { @@ -751,7 +822,7 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS print ''; // Country - print '
    ' . $langs->trans("EmailAttendee") . '*'; + print '
    ' . $langs->trans("EmailAttendee") . ''; print img_picto('', 'email', 'class="pictofixedwidth"'); - print '
    ' . $langs->trans("Company"); + print '
    '; if (!empty(floatval($project->price_registration))) { - print '*'; + print ''; } - print ' '; + print $langs->trans("Company"); + if (!empty(floatval($project->price_registration))) { + print ''; + } + print ''; print img_picto('', 'company', 'class="pictofixedwidth"'); - print '
    ' . $langs->trans('Country') . '*'; + print '
    '.$langs->trans('Country').''; print img_picto('', 'country', 'class="pictofixedwidth"'); $country_id = GETPOST('country_id'); if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { @@ -809,8 +880,8 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS } print ''; - print "\n"; + print "
    "; print ''; } diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php index 8acf3daba78..043e0e8d021 100644 --- a/htdocs/public/eventorganization/subscriptionok.php +++ b/htdocs/public/eventorganization/subscriptionok.php @@ -48,11 +48,12 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; } @@ -77,7 +78,7 @@ if ($securekeyreceived != $securekeytocompare) { // Security check if (empty($conf->eventorganization->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Event organization not enabled'); } diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index d3a2a556b07..b37cb15d9c0 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -7,6 +7,7 @@ * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2021 Waël Almoman + * Copyright (C) 2022 Udo Tamm * * 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 @@ -62,12 +63,17 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } + +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Init vars $errmsg = ''; @@ -81,12 +87,11 @@ $langs->loadLangs(array("main", "members", "companies", "install", "other")); // Security check if (empty($conf->adherent->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Membership not enabled'); } if (empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - print $langs->trans("Auto subscription form for public visitors has not been enabled"); - exit; + httponly_accessforbidden("Auto subscription form for public visitors has not been enabled"); } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -195,7 +200,7 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"))."
    \n"; } - $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape(GETPOST('login'))."'"; + $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login = '".$db->escape(GETPOST('login'))."'"; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -255,7 +260,7 @@ if (empty($reshook) && $action == 'add') { $public = GETPOSTISSET('public') ? 1 : 0; if (!$error) { - // email a peu pres correct et le login n'existe pas + // E-mail looks OK and login does not exist $adh = new Adherent($db); $adh->statut = -1; $adh->public = $public; @@ -273,19 +278,50 @@ if (empty($reshook) && $action == 'add') { $adh->pass = GETPOST('pass1'); } $adh->photo = GETPOST('photo'); - $adh->country_id = $conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE ? $conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE : GETPOST('country_id', 'int'); + $adh->country_id = getDolGlobalString("MEMBER_NEWFORM_FORCECOUNTRYCODE", GETPOST('country_id', 'int')); $adh->state_id = GETPOST('state_id', 'int'); - $adh->typeid = $conf->global->MEMBER_NEWFORM_FORCETYPE ? $conf->global->MEMBER_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); + $adh->typeid = getDolGlobalString("MEMBER_NEWFORM_FORCETYPE", GETPOST('typeid', 'int')); $adh->note_private = GETPOST('note_private'); - $adh->morphy = $conf->global->MEMBER_NEWFORM_FORCEMORPHY ? $conf->global->MEMBER_NEWFORM_FORCEMORPHY : GETPOST('morphy'); + $adh->morphy = getDolGlobalString("MEMBER_NEWFORM_FORCEMORPHY", GETPOST('morphy')); $adh->birth = $birthday; + $adh->ip = getUserRemoteIP(); + + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_adh"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent"; + $sql .= " WHERE ip = '".$db->escape($adh->ip)."'"; + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_adh; + } + } + } + // Fill array 'array_options' with data from add form $extrafields->fetch_name_optionals_label($adh->table_element); $ret = $extrafields->setOptionalsFromPost(null, $adh); if ($ret < 0) { $error++; + $errmsg .= $adh->error; + } + + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + $error++; + $errmsg .= $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($adh->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); } if (!$error) { @@ -377,6 +413,16 @@ if (empty($reshook) && $action == 'add') { } } + // Auto-create thirdparty on member creation + if (!empty($conf->global->ADHERENT_DEFAULT_CREATE_THIRDPARTY)) { + $company = new Societe($db); + $result = $company->create_from_member($adh); + if ($result < 0) { + $error++; + $errmsg .= join('
    ', $company->errors); + } + } + if (!empty($backtopage)) { $urlback = $backtopage; } elseif (!empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) { @@ -405,7 +451,14 @@ if (empty($reshook) && $action == 'add') { $urlback .= '&entity='.((int) $entity); } } + } + if (!empty($backtopage)) { + $urlback = $backtopage; + dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback); + } elseif (!empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) { + $urlback = $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; + // TODO Make replacement of __AMOUNT__, etc... dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback); } else { $error++; @@ -421,16 +474,18 @@ if (empty($reshook) && $action == 'add') { exit; } else { $db->rollback(); + $action = "create"; } } // Action called after a submitted was send and member created successfully // If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url. // backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url. + if (empty($reshook) && $action == 'added') { llxHeaderVierge($langs->trans("NewMemberForm")); - // Si on a pas ete redirige + // If we have not been redirected print '

    '; print '
    '; print $langs->trans("NewMemberbyWeb"); @@ -465,7 +520,7 @@ print '
    '; if (!empty($conf->global->MEMBER_NEWFORM_TEXT)) { print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT)."
    \n"; } else { - print $langs->trans("NewSubscriptionDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; + print $langs->trans("NewSubscriptionDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
    \n"; } print '
    '; @@ -476,254 +531,375 @@ dol_htmloutput_events(); print '
    '."\n"; print ''; print ''; -print ''; -print ''; -print '
    '; +if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEWFORM_FORCETYPE) || $action == 'create') { + print ''; + print '
    '; + print '
    '.$langs->trans("FieldsWithAreMandatory", '*').'
    '; + //print $langs->trans("FieldsWithIsForPublic",'**').'
    '; -print '
    '.$langs->trans("FieldsWithAreMandatory", '*').'
    '; -//print $langs->trans("FieldsWithIsForPublic",'**').'
    '; - -print dol_get_fiche_head(''); - -print ''; - - -print ''."\n"; - -// Type -if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { - $listoftype = $adht->liste_array(); - $tmp = array_keys($listoftype); - $defaulttype = ''; - $isempty = 1; - if (count($listoftype) == 1) { - $defaulttype = $tmp[0]; - $isempty = 0; - } - print ''."\n"; -} else { - $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); - print ''; -} - -// Moral/Physic attribute -$morphys["phy"] = $langs->trans("Physical"); -$morphys["mor"] = $langs->trans("Moral"); -if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { - print ''."\n"; -} else { - print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; - print ''; -} - -// Company -print ''."\n"; -// Title -print ''."\n"; -// Lastname -print ''."\n"; -// Firstname -print ''."\n"; -// EMail -print ''."\n"; -// Login -if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''."\n"; - print ''."\n"; - print ''."\n"; -} -// Gender -print ''; -print ''; -// Address -print ''."\n"; -// Zip / Town -print ''; -// Country -print ''; -// State -if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; -} -// Birthday -print ''."\n"; -// Photo -print ''."\n"; -// Public -print ''."\n"; -// Other attributes -$tpl_context = 'public'; // define template context to public -include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; -// Comments -print ''; -print ''; -print ''; -print ''."\n"; - -// Add specific fields used by Dolibarr foundation for example -// TODO Move this into generic feature. -if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { - $arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+'); - print ''."\n"; -} + jQuery(document).ready(function () { + jQuery(document).ready(function () { + function initmorphy() + { + console.log("Call initmorphy"); + if (jQuery("#morphy").val() == \'phy\') { + jQuery("#trcompany").hide(); + } + if (jQuery("#morphy").val() == \'mor\') { + jQuery("#trcompany").show(); + } + }; + initmorphy(); + jQuery("#morphy").change(function() { + initmorphy(); + }); + jQuery("#selectcountry_id").change(function() { + document.newmember.action.value="create"; + document.newmember.submit(); + }); + jQuery("#typeid").change(function() { + document.newmember.action.value="create"; + document.newmember.submit(); + }); + }); + }); + '; -if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { - $amount = 0; - $typeid = $conf->global->MEMBER_NEWFORM_FORCETYPE ? $conf->global->MEMBER_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); - // Set amount for the subscription: - // - First check the amount of the member type. - $amountbytype = $adht->amountByType(1); // Load the array of amount per type - $amount = empty($amountbytype[$typeid]) ? (isset($amount) ? $amount : 0) : $amountbytype[$typeid]; - // - If not found, take the default amount - if (empty($amount) && !empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { - $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; - } - // - If not set, we accept ot have amount defined as parameter (for backward compatibility). - if (empty($amount)) { - $amount = (GETPOST('amount') ? price2num(GETPOST('amount', 'alpha'), 'MT', 2) : ''); - } + print '
    '.$langs->trans("Type").' *'; - print $form->selectarray("typeid", $adht->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); - print '
    '.$langs->trans('MemberNature').' *'."\n"; - print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1); - print '
    '.$langs->trans("Company").''; -print img_picto('', 'company', 'class="pictofixedwidth"'); -print '
    '.$langs->trans('UserTitle').''; -print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'
    '.$langs->trans("Lastname").' *
    '.$langs->trans("Firstname").' *
    '.$langs->trans("Email").($conf->global->ADHERENT_MAIL_REQUIRED ? ' *' : '').''; -//print img_picto('', 'email', 'class="pictofixedwidth"'); -print '
    '.$langs->trans("Login").' *
    '.$langs->trans("Password").' *
    '.$langs->trans("PasswordRetype").' *
    '.$langs->trans("Gender").''; -$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); -print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1); -print '
    '.$langs->trans("Address").''."\n"; -print '
    '.$langs->trans('Zip').' / '.$langs->trans('Town').''; -print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 1, '', 'width75'); -print ' / '; -print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); -print '
    '.$langs->trans('Country').''; -print img_picto('', 'country', 'class="pictofixedwidth"'); -$country_id = GETPOST('country_id', 'int'); -if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { - $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); -} -if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { - $country_code = dol_user_country(); - //print $country_code; - if ($country_code) { - $new_country_id = getCountry($country_code, 3, $db, $langs); - //print 'xxx'.$country_code.' - '.$new_country_id; - if ($new_country_id) { - $country_id = $new_country_id; - } - } -} -$country_code = getCountry($country_id, 2, $db, $langs); -print $form->select_country($country_id, 'country_id'); -print '
    '.$langs->trans('State').''; - if ($country_code) { - print $formcompany->select_state(GETPOST("state_id"), $country_code); - } - print '
    '.$langs->trans("DateOfBirth").''; -print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0); -print '
    '.$langs->trans("URLPhoto").'
    '.$langs->trans("Public").'
    '.$langs->trans("Comments").'
    '.$langs->trans("TurnoverOrBudget").' *'; - print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1); - print ' € or $'; + print dol_get_fiche_head(''); print ''; - print '
    '."\n"; - // Clean the amount - $amount = price2num($amount); - - // $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe' - print ''."\n"; } else { - print ''; - print ''; + $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); + print ''; } - print ' '.$langs->trans("Currency".$conf->currency); + + // Moral/Physic attribute + $morphys["phy"] = $langs->trans("Physical"); + $morphys["mor"] = $langs->trans("Moral"); + if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { + print ''."\n"; + } else { + print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; + print ''; + } + + // Company // TODO : optional hide + print ''."\n"; + + // Title + print ''."\n"; + + // Lastname + print ''."\n"; + + // Firstname + print ''."\n"; + + // EMail + print ''."\n"; + + // Login + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { + print ''."\n"; + print ''."\n"; + print ''."\n"; + } + + // Gender + print ''; + print ''; + + // Address + print ''."\n"; + + // Zip / Town + print ''; + + // Country + print ''; + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print ''; + } + + // Birthday + print ''."\n"; + + // Photo + print ''."\n"; + + // Public + print ''."\n"; + + // Other attributes + $tpl_context = 'public'; // define template context to public + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + // Comments + print ''; + print ''; + print ''; + print ''."\n"; + + // Add specific fields used by Dolibarr foundation for example + // TODO Move this into generic feature. + if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { + $arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+'); + print ''."\n"; + } + + if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { + $typeid = $conf->global->MEMBER_NEWFORM_FORCETYPE ? $conf->global->MEMBER_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); + $adht = new AdherentType($db); + $adht->fetch($typeid); + $caneditamount = $adht->caneditamount; + + // Set amount for the subscription: + // - First check the amount of the member type. + $amountbytype = $adht->amountByType(1); // Load the array of amount per type + $amount = empty($amountbytype[$typeid]) ? (isset($amount) ? $amount : 0) : $amountbytype[$typeid]; + // - If not found, take the default amount only of the user is authorized to edit it + if ($caneditamount && empty($amount) && !empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; + } + // - If not set, we accept ot have amount defined as parameter (for backward compatibility). + if (empty($amount)) { + $amount = (GETPOST('amount') ? price2num(GETPOST('amount', 'alpha'), 'MT', 2) : ''); + } + + // Clean the amount + $amount = price2num($amount); + $showedamount = $amount>0? $amount: 0; + // $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe' + print ''; + } + + print "
    '.$langs->trans("Subscription").''; - if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { - print ''; + // Type + if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { + $listoftype = $adht->liste_array(); + $tmp = array_keys($listoftype); + $defaulttype = ''; + $isempty = 1; + if (count($listoftype) == 1) { + $defaulttype = $tmp[0]; + $isempty = 0; + } + print '
    '.$langs->trans("Type").' *'; + print $form->selectarray("typeid", $adht->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); + print '
    '.$langs->trans('MemberNature').' *'."\n"; + print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1); + print '
    '.$langs->trans("Company").''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print '
    '.$langs->trans('UserTitle').''; + print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'
    '.$langs->trans("Lastname").' *
    '.$langs->trans("Firstname").' *
    '.$langs->trans("Email").(getDolGlobalString("ADHERENT_MAIL_REQUIRED") ? ' *' : '').''; + //print img_picto('', 'email', 'class="pictofixedwidth"'); + print '
    '.$langs->trans("Login").' *
    '.$langs->trans("Password").' *
    '.$langs->trans("PasswordRetype").' *
    '.$langs->trans("Gender").''; + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); + print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
    '.$langs->trans("Address").''."\n"; + print '
    '.$langs->trans('Zip').' / '.$langs->trans('Town').''; + print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 1, '', 'width75'); + print ' / '; + print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); + print '
    '.$langs->trans('Country').''; + print img_picto('', 'country', 'class="pictofixedwidth"'); + $country_id = GETPOST('country_id', 'int'); + if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); + } + if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } + } + $country_code = getCountry($country_id, 2, $db, $langs); + print $form->select_country($country_id, 'country_id'); + print '
    '.$langs->trans('State').''; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } + print '
    '.$langs->trans("DateOfBirth").''; + print $form->selectDate(!empty($birthday) ? $birthday : "", 'birth', 0, 0, 1, "newmember", 1, 0); + print '
    '.$langs->trans("URLPhoto").'
    '.$langs->trans("Public").'
    '.$langs->trans("Comments").'
    '.$langs->trans("TurnoverOrBudget").' *'; + print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1); + print ' € or $'; + + print ''; + print '
    '.$langs->trans("Subscription"); + if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { + print ' - '.$langs->trans("SeeHere").''; + } + print ''; + + if (empty($amount) && !empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; + } + + if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) || $caneditamount) { + print ''; + print ' '.$langs->trans("Currency".$conf->currency).' – '; + print $amount > 0 ? $langs->trans("AnyAmountWithAdvisedAmount", price($amount, 0, $langs, 1, -1, -1, $conf->currency)): $langs->trans("AnyAmountWithoutAdvisedAmount"); + print ''; + } else { + print ''; + print ''; + print ' '.$langs->trans("Currency".$conf->currency); + } + print '
    \n"; + + print dol_get_fiche_end(); + + // Save / Submit + print '
    '; + print ''; + if (!empty($backtopage)) { + print '     '; + } + print '
    '; + + + print "
    \n"; + print "
    "; + print '
    '; +} else { // Show the table of membership types + // Get units + $measuringUnits = new CUnits($db); + $result = $measuringUnits->fetchAll('', '', 0, 0, array('t.active' => 1)); + $units = array(); + foreach ($measuringUnits->records as $lines) + $units[$lines->short_label] = $langs->trans(ucfirst($lines->label)); + + $publiccounters = getDolGlobalString("MEMBER_COUNTERS_ARE_PUBLIC"); + + $sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.amount, d.caneditamount, d.vote, d.note, d.duration, d.statut as status, d.morphy,"; + $sql .= " COUNT(a.rowid) AS membercount"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as a"; + $sql .= " ON d.rowid = a.fk_adherent_type AND a.statut > 0"; + $sql .= " WHERE d.entity IN (".getEntity('member_type').")"; + $sql .= " AND d.statut=1"; + $sql .= " GROUP BY d.rowid, d.libelle, d.subscription, d.amount, d.caneditamount, d.vote, d.note, d.duration, d.statut, d.morphy"; + + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + + print '
    '; + print ''."\n"; + print ''; + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + if ($publiccounters) print ''; + print ''; + print "\n"; + + $i = 0; + while ($i < $num) { + $objp = $db->fetch_object($result); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $membercount = $objp->membercount>0? $objp->membercount: "–"; + if ($publiccounters) print ''; + print ''; + print ""; + $i++; + } + + // If no record found + if ($num == 0) { + $colspan = 8; + print ''; + } + + print "
    '.$langs->trans("Label").''.$langs->trans("MembershipDuration").''.$langs->trans("Amount").''.$langs->trans("MembersNature").''.$langs->trans("VoteAllowed").''.$langs->trans("Members").''.$langs->trans("NewSubscription").'
    '.dol_escape_htmltag($objp->label).''; + $unit = preg_replace("/[^a-zA-Z]+/", "", $objp->duration); + print max(1, intval($objp->duration)).' '.$units[$unit]; + print ''; + $displayedamount = max(intval($objp->amount), intval(getDolGlobalInt("MEMBER_MIN_AMOUNT"))); + $caneditamount = !empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) || $objp->caneditamount; + if ($objp->subscription) { + if ($displayedamount > 0 || !$caneditamount) { + print $displayedamount.' '.strtoupper($conf->currency); + } + if ($caneditamount && $displayedamount>0) { + print $form->textwithpicto('', $langs->transnoentities("CanEditAmountShortForValues"), 1, 'help', '', 0, 3); + } elseif ($caneditamount) { + print $langs->transnoentities("CanEditAmountShort"); + } + } else { + print "–"; // No subscription required + } + print ''; + if ($objp->morphy == 'phy') { + print $langs->trans("Physical"); + } elseif ($objp->morphy == 'mor') { + print $langs->trans("Moral"); + } else { + print $langs->trans("MorAndPhy"); + } + print ''.yn($objp->vote).''.$membercount.'
    '.$langs->trans("NoRecordFound").'
    "; + print '
    '; + + print ''; + } else { + dol_print_error($db); + } } -print "
    \n"; - -print dol_get_fiche_end(); - -// Save -print '
    '; -print ''; -if (!empty($backtopage)) { - print '     '; -} -print '
    '; - - -print "\n"; -print "
    "; -print '
    '; - llxFooterVierge(); diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index d58b6448edb..ffce8730d8f 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -46,6 +46,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; @@ -53,7 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Security check if (empty($conf->adherent->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Memebership no enabled'); } diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 178af5fce11..700c0383516 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -45,11 +45,12 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; // Security check if (empty($conf->adherent->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Membership not enabled'); } diff --git a/htdocs/public/notice.php b/htdocs/public/notice.php index d5ac4070ff0..a682abd78c8 100644 --- a/htdocs/public/notice.php +++ b/htdocs/public/notice.php @@ -40,6 +40,7 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +// Load Dolibarr environment require '../main.inc.php'; diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 5a0031dbcae..f0738f0e420 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -45,6 +45,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; @@ -53,7 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; // Load translation files -$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "members", "paybox", "propal")); +$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "members", "paybox", "propal", "commercial")); // Security check // No check on module enabled. Done later according to $validpaymentmethod @@ -77,17 +78,13 @@ $message = GETPOST('message', 'aZ09'); $suffix = GETPOST("suffix", 'aZ09'); $source = GETPOST("source", 'alpha'); $ref = $REF = GETPOST("ref", 'alpha'); +$urlok = ''; +$urlko = ''; + if (empty($source)) { $source = 'proposal'; } - -if (!$action) { - if ($source && !$ref) { - print $langs->trans('ErrorBadParameters')." - ref missing"; - exit; - } -} if (!empty($refusepropal)) { $action = "refusepropal"; } @@ -123,26 +120,40 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last & $creditor = $mysoc->name; $type = $source; -if ($source == 'proposal') { - require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - $object = new Propal($db); - $result= $object->fetch(0, $ref, '', $entity); -} else { - accessforbidden('Bad value for source'); - exit; -} +if (!$action) { + if ($source && !$ref) { + httponly_accessforbidden($langs->trans('ErrorBadParameters')." - ref missing", 400, 1); + } +} // Check securitykey $securekeyseed = ''; if ($source == 'proposal') { - $securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN; + $securekeyseed = getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} elseif ($source == 'contract') { + $securekeyseed = getDolGlobalString('CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} elseif ($source == 'fichinter') { + $securekeyseed = getDolGlobalString('FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} +if (!dol_verifyHash($securekeyseed.$type.$ref.(isModEnabled('multicompany') ? $entity : ''), $SECUREKEY, '0')) { + httponly_accessforbidden('Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref), 403, 1); } -if (!dol_verifyHash($securekeyseed.$type.$ref.(empty($conf->multicompany->enabled) ? '' : $entity), $SECUREKEY, '0')) { - http_response_code(403); - print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref); - exit(-1); +if ($source == 'proposal') { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + $object = new Propal($db); + $result= $object->fetch(0, $ref, '', $entity); +} elseif ($source == 'contract') { + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + $object = new Contrat($db); + $result= $object->fetch(0, $ref); +} elseif ($source == 'fichinter') { + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; + $object = new Fichinter($db); + $result= $object->fetch(0, $ref); +} else { + httponly_accessforbidden($langs->trans('ErrorBadParameters')." - Bad value for source", 400, 1); } @@ -172,6 +183,7 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') { // Online customer is not a user, so we use the use that validates the documents $user = new User($db); $user->fetch($object->user_valid_id); + $object->context = array('closedfromonlinesignature' => 'closedfromonlinesignature'); $result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user); if ($result < 0) { $error++; @@ -202,7 +214,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
    ' : '').'
    '; llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1); if ($action == 'refusepropal') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1); } // Check link validity for param 'source' to avoid use of the examples as value @@ -281,16 +293,29 @@ if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) { $text = '

    '.$text.'

    '.$langs->trans("WelcomeOnOnlineSignaturePage", $mysoc->name).'
    '.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'


    '.$langs->trans("WelcomeOnOnlineSignaturePageProposal", $mysoc->name).'
    '.$langs->trans("ThisScreenAllowsYouToSignDocFromProposal", $creditor).'


    '.$langs->trans("WelcomeOnOnlineSignaturePageContract", $mysoc->name).'
    '.$langs->trans("ThisScreenAllowsYouToSignDocFromContract", $creditor).'


    '.$langs->trans("WelcomeOnOnlineSignaturePageFichinter", $mysoc->name).'
    '.$langs->trans("ThisScreenAllowsYouToSignDocFromFichinter", $creditor).'

    '; print ''; -print ''."\n"; - +if ($source == 'proposal') { + print ''."\n"; +} elseif ($source == 'contract') { + print ''."\n"; +} elseif ($source == 'fichinter') { + print ''."\n"; +} $found = false; $error = 0; @@ -373,8 +398,106 @@ if ($source == 'proposal') { print ''; print ''; print ''."\n"; -} +} elseif ($source == 'contract') { // Signature on contract + $found = true; + $langs->load("contract"); + $result = $object->fetch_thirdparty($object->socid); + + // Proposer + print ''."\n"; + + // Target + print ''."\n"; + + // Object + $text = ''.$langs->trans("SignatureContractRef", $object->ref).''; + print ''."\n"; +} elseif ($source == 'fichinter') { // Signature on fichinter + $found = true; + $langs->load("fichinter"); + + $result = $object->fetch_thirdparty($object->socid); + // Proposer + print ''."\n"; + + // Target + print ''."\n"; + + // Object + $text = ''.$langs->trans("SignatureFichinterRef", $object->ref).''; + print ''."\n"; +} if (!$found && !$mesg) { @@ -429,6 +552,7 @@ if ($action == "dosign" && empty($cancel)) { dataType: "text", data: { "action" : "importSignature", + "token" : \''.newToken().'\', "signaturebase64" : signature, "ref" : \''.dol_escape_js($REF).'\', "securekey" : \''.dol_escape_js($SECUREKEY).'\', @@ -438,7 +562,7 @@ if ($action == "dosign" && empty($cancel)) { success: function(response) { if(response == "success"){ console.log("Success on saving signature"); - window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:'').'"); + window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&source='.urlencode($source).'&message=signed&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:'').'"); }else{ console.error(response); } @@ -476,6 +600,18 @@ if ($action == "dosign" && empty($cancel)) { print ''; print ''; } + } elseif ($source == 'contract') { + if ($message == 'signed') { + print ''.$langs->trans("ContractSigned").''; + } else { + print ''; + } + } elseif ($source == 'fichinter') { + if ($message == 'signed') { + print ''.$langs->trans("FichinterSigned").''; + } else { + print ''; + } } } print ''."\n"; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index acf1fb01b56..34f8ecd9400 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -35,11 +35,13 @@ if (!defined('NOIPCHECK')) { define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip } +// Load Dolibarr environment 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."/opensurvey/class/opensurveysondage.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/lib/opensurvey.lib.php"; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Init vars @@ -59,7 +61,7 @@ $canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && // Security check if (empty($conf->opensurvey->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Survey not enabled'); } @@ -74,7 +76,7 @@ $listofvoters = explode(',', $_SESSION["savevoter"]); // Add comment if (GETPOST('ajoutcomment', 'alpha')) { if (!$canbemodified) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('ErrorForbidden'); } $error = 0; @@ -96,8 +98,36 @@ if (GETPOST('ajoutcomment', 'alpha')) { $error++; } + $user_ip = getUserRemoteIP(); + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(id_comment) as nb_comments"; + $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_comments"; + $sql .= " WHERE ip = '".$db->escape($user_ip)."'"; + $sql .= " AND date_creation > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_comments; + } + } + } + + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + setEventMessages($langs->trans("AlreadyTooMuchPostOnThisIPAdress"), null, 'errors'); + $error++; + } + if (!$error) { - $resql = $object->addComment($comment, $comment_user); + $resql = $object->addComment($comment, $comment_user, $user_ip); if (!$resql) { dol_print_error($db); @@ -108,22 +138,46 @@ if (GETPOST('ajoutcomment', 'alpha')) { // Add vote if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // boutonp for chrome, boutonp_x for firefox if (!$canbemodified) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('ErrorForbidden'); } //Si le nom est bien entré if (GETPOST('nom', 'alphanohtml')) { $nouveauchoix = ''; for ($i = 0; $i < $nbcolonnes; $i++) { - if (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '1') { + if (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '1') { $nouveauchoix .= "1"; - } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { + } elseif (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '2') { $nouveauchoix .= "2"; } else { $nouveauchoix .= "0"; } } + $user_ip = getUserRemoteIP(); + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(id_users) as nb_records"; + $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; + $sql .= " WHERE ip = '".$db->escape($user_ip)."'"; + $sql .= " AND date_creation > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_records; + } + } + } + + $nom = substr(GETPOST("nom", 'alphanohtml'), 0, 64); // Check if vote already exists @@ -136,12 +190,17 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo } $num_rows = $db->num_rows($resql); + if ($num_rows > 0) { setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors'); $error++; + } elseif ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + setEventMessages($langs->trans("AlreadyTooMuchPostOnThisIPAdress"), null, 'errors'); + $error++; } else { - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses)'; - $sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."','".$db->escape($nouveauchoix)."')"; + $now = dol_now(); + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, ip, date_creation)'; + $sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."','".$db->escape($nouveauchoix)."', '".$db->escape($user_ip)."', '".$db->idate($now)."')"; $resql = $db->query($sql); if ($resql) { @@ -214,7 +273,7 @@ if ($testmodifier) { } if (!$canbemodified) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('ErrorForbidden'); } $idtomodify = GETPOST("idtomodify".$modifier); @@ -232,7 +291,7 @@ if ($testmodifier) { $idcomment = GETPOST('deletecomment', 'int'); if ($idcomment) { if (!$canbemodified) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('ErrorForbidden'); } $resql = $object->deleteComment($idcomment); @@ -266,7 +325,7 @@ $toutsujet = explode(",", $object->sujet); $listofanswers = array(); foreach ($toutsujet as $value) { $tmp = explode('@', $value); - $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); + $listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox')); } $toutsujet = str_replace("°", "'", $toutsujet); @@ -695,7 +754,7 @@ if ($object->allow_spy) { print ''."\n"; print ''."\n"; for ($i = 0; $i < $nbcolonnes; $i++) { - //print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne; + //print 'xx'.(!empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne; if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { print ''."\n"; } else { diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index f6f0efc4fb2..b6444753eb7 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -52,12 +52,14 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Init vars $errmsg = ''; @@ -67,16 +69,15 @@ $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); // Load translation files -$langs->loadLangs(array("main", "members", "companies", "install", "other")); +$langs->loadLangs(array("main", "members", "partnership", "companies", "install", "other")); // Security check if (empty($conf->partnership->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Partnership not enabled'); } if (empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) { - print $langs->trans("Auto subscription form for public visitors has not been enabled"); - exit; + httponly_accessforbidden("Auto subscription form for public visitors has not been enabled"); } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -178,10 +179,14 @@ if (empty($reshook) && $action == 'add') { $db->begin(); - /*if (GETPOST('typeid') <= 0) { + if (GETPOST('partnershiptype', 'int') <= 0) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type"))."
    \n"; - }*/ + } + if (!GETPOST('societe')) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("societe"))."
    \n"; + } if (!GETPOST('lastname')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
    \n"; @@ -190,6 +195,7 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
    \n"; } + if (empty(GETPOST('email'))) { $error++; $errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."
    \n"; @@ -211,17 +217,94 @@ if (empty($reshook) && $action == 'add') { $partnership->fk_soc = 0; } - $partnership->statut = -1; - $partnership->firstname = GETPOST('firstname'); - $partnership->lastname = GETPOST('lastname'); - $partnership->address = GETPOST('address'); - $partnership->zip = GETPOST('zipcode'); - $partnership->town = GETPOST('town'); - $partnership->email = GETPOST('email'); - $partnership->country_id = GETPOST('country_id', 'int'); - $partnership->state_id = GETPOST('state_id', 'int'); - //$partnership->typeid = $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE ? $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); - $partnership->note_private = GETPOST('note_private'); + $partnership->status = 0; + $partnership->note_private = GETPOST('note_private'); + $partnership->date_creation = dol_now(); + $partnership->date_partnership_start = dol_now(); + $partnership->fk_user_creat = 0; + $partnership->fk_type = GETPOST('partnershiptype', 'int'); + //$partnership->typeid = $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE ? $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); + $partnership->ip = getUserRemoteIP(); + + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_partnerships"; + $sql .= " FROM ".MAIN_DB_PREFIX."partnership"; + $sql .= " WHERE ip = '".$db->escape($partnership->ip)."'"; + $sql .= " AND date_creation > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_partnerships; + } + } + } + // test if societe already exist + $company = new Societe($db); + $result = $company->fetch(0, GETPOST('societe')); + if ($result == 0) { // si il ya pas d'entree sur le nom on teste l'email + $result1 = $company->fetch(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, GETPOST('email')); + if ($result1 > 0) { + $error++; + $errmsg = $langs->trans("EmailAlreadyExistsPleaseRewriteYourCompanyName"); + } else { + //create thirdparty + $company = new Societe($db); + + $company->name = GETPOST('societe'); + $company->address = GETPOST('address'); + $company->zip = GETPOST('zipcode'); + $company->town = GETPOST('town'); + $company->email = GETPOST('email'); + $company->country_id = GETPOST('country_id', 'int'); + $company->state_id = GETPOST('state_id', 'int'); + $company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname')); + + $resultat=$company->create($user); + if ($resultat < 0) { + $error++; + $errmsg .= join('
    ', $company->errors); + } + + $partnership->fk_soc = $company->id; + } + } elseif ($result == -2) { + $error++; + $errmsg = $langs->trans("TwoRecordsOfCompanyName"); + } else { + $partnership->fk_soc = $company->id; + // update thirdparty fields + if (empty($company->address)) { + $company->address = GETPOST('address'); + } + if (empty($company->zip)) { + $company->zip = GETPOST('zipcode'); + } + if (empty($company->town)) { + $company->town = GETPOST('town'); + } + if (empty($company->country_id)) { + $company->country_id = GETPOST('country_id', 'int'); + } + if (empty($company->email)) { + $company->email = GETPOST('email'); + } + if (empty($company->state_id)) { + $company->state_id = GETPOST('state_id', 'int'); + } + if (empty($company->name_alias)) { + $company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname')); + } + $company->update(0); + } // Fill array 'array_options' with data from add form $extrafields->fetch_name_optionals_label($partnership->table_element); @@ -230,175 +313,187 @@ if (empty($reshook) && $action == 'add') { $error++; } - $result = $partnership->create($user); - if ($result > 0) { - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $object = $partnership; + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + $error++; + $errmsg = $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($partnership->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + } + if (!$error) { + $result = $partnership->create($user); + if ($result > 0) { + /* + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $object = $partnership; - /* - $partnershipt = new PartnershipType($db); - $partnershipt->fetch($object->typeid); - if ($object->email) { - $subject = ''; - $msg = ''; + $partnershipt = new PartnershipType($db); + $partnershipt->fetch($object->typeid); - // Send subscription email - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - // Set output language - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files required by page - $outputlangs->loadLangs(array("main", "members")); - // Get email content from template - $arraydefaultmessage = null; - $labeltouse = $conf->global->PARTNERSHIP_EMAIL_TEMPLATE_AUTOREGISTER; + if ($object->email) { + $subject = ''; + $msg = ''; - if (!empty($labeltouse)) { - $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + // Send subscription email + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + $labeltouse = $conf->global->PARTNERSHIP_EMAIL_TEMPLATE_AUTOREGISTER; + + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions(dol_concatdesc($msg, $partnershipt->getMailOnValid()), $substitutionarray, $outputlangs); + + if ($subjecttosend && $texttosend) { + $moreinheader = 'X-Dolibarr-Info: send_an_email by public/members/new.php'."\r\n"; + + $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); + } } - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { - $subject = $arraydefaultmessage->topic; - $msg = $arraydefaultmessage->content; - } - $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); - complete_substitutions_array($substitutionarray, $outputlangs, $object); - $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); - $texttosend = make_substitutions(dol_concatdesc($msg, $partnershipt->getMailOnValid()), $substitutionarray, $outputlangs); - - if ($subjecttosend && $texttosend) { - $moreinheader = 'X-Dolibarr-Info: send_an_email by public/members/new.php'."\r\n"; - - $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - } - } - */ - - // Send email to the foundation to say a new member subscribed with autosubscribe form - if (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') && !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT) && - !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL)) { - // Define link to login card - $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; - if (preg_match('/\d\.\d/', $appli)) { - if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) { - $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core + // Send email to the foundation to say a new member subscribed with autosubscribe form + /* + if (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') && !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT) && + !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL)) { + // Define link to login card + $appli = constant('DOL_APPLICATION_TITLE'); + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; + if (preg_match('/\d\.\d/', $appli)) { + if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) { + $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core + } + } else { + $appli .= " ".DOL_VERSION; } } else { $appli .= " ".DOL_VERSION; } + + $to = $partnership->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')); + $from = getDolGlobalString('PARTNERSHIP_MAIL_FROM'); + $mailfile = new CMailFile( + '['.$appli.'] '.getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT', 'Partnership request'), + $to, + $from, + $partnership->makeSubstitution(getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL')), + array(), + array(), + array(), + "", + "", + 0, + -1 + ); + + if (!$mailfile->sendfile()) { + dol_syslog($langs->trans("ErrorFailedToSendMail", $from, $to), LOG_ERR); + } + }*/ + + if (!empty($backtopage)) { + $urlback = $backtopage; + } elseif (!empty($conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION)) { + $urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION; + // TODO Make replacement of __AMOUNT__, etc... } else { - $appli .= " ".DOL_VERSION; + $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); } - $to = $partnership->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')); - $from = getDolGlobalString('PARTNERSHIP_MAIL_FROM'); - $mailfile = new CMailFile( - '['.$appli.'] '.getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT', 'Partnership request'), - $to, - $from, - $partnership->makeSubstitution(getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL')), - array(), - array(), - array(), - "", - "", - 0, - -1 - ); + /* + if (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) && $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE != '-1') { + if ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'all') { + $urlback = DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paybox') { + $urlback = DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paypal') { + $urlback = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'stripe') { + $urlback = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.$partnership->ref; + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); + } else { + $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } + } + } else { + dol_print_error('', "Autosubscribe form is setup to ask an online payment for a not managed online payment"); + exit; + } + }*/ - if (!$mailfile->sendfile()) { - dol_syslog($langs->trans("ErrorFailedToSendMail", $from, $to), LOG_ERR); + if (!empty($entity)) { + $urlback .= '&entity='.$entity; } - } - - if (!empty($backtopage)) { - $urlback = $backtopage; - } elseif (!empty($conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION)) { - $urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION; - // TODO Make replacement of __AMOUNT__, etc... + dol_syslog("partnership ".$partnership->ref." was created, we redirect to ".$urlback); } else { - $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); + $error++; + $errmsg .= join('
    ', $partnership->errors); } - - if (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) && $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE != '-1') { - if ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'all') { - $urlback = DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); - if (price2num(GETPOST('amount', 'alpha'))) { - $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - } - if (GETPOST('email')) { - $urlback .= '&email='.urlencode(GETPOST('email')); - } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); - } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); - } - } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paybox') { - $urlback = DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); - if (price2num(GETPOST('amount', 'alpha'))) { - $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - } - if (GETPOST('email')) { - $urlback .= '&email='.urlencode(GETPOST('email')); - } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); - } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); - } - } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paypal') { - $urlback = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); - if (price2num(GETPOST('amount', 'alpha'))) { - $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - } - if (GETPOST('email')) { - $urlback .= '&email='.urlencode(GETPOST('email')); - } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); - } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); - } - } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'stripe') { - $urlback = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.$partnership->ref; - if (price2num(GETPOST('amount', 'alpha'))) { - $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - } - if (GETPOST('email')) { - $urlback .= '&email='.urlencode(GETPOST('email')); - } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, 2)); - } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); - } - } - } else { - dol_print_error('', "Autosubscribe form is setup to ask an online payment for a not managed online payment"); - exit; - } - } - - if (!empty($entity)) { - $urlback .= '&entity='.$entity; - } - dol_syslog("partnership ".$partnership->ref." was created, we redirect to ".$urlback); } else { - $error++; - $errmsg .= join('
    ', $partnership->errors); + setEventMessage($errmsg, 'errors'); } } @@ -437,7 +532,7 @@ if (empty($reshook) && $action == 'added') { $form = new Form($db); $formcompany = new FormCompany($db); -$extrafields->fetch_name_optionals_label($partnership->table_element); // fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); // fetch optionals attributes and labels llxHeaderVierge($langs->trans("NewPartnershipRequest")); @@ -453,7 +548,7 @@ print '
    '; if (!empty($conf->global->PARTNERSHIP_NEWFORM_TEXT)) { print $langs->trans($conf->global->PARTNERSHIP_NEWFORM_TEXT)."
    \n"; } else { - print $langs->trans("NewPartnershipRequestDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; + print $langs->trans("NewPartnershipRequestDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
    \n"; } print '
    '; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index e9b402b08dd..79104817e77 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -56,6 +56,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; @@ -246,7 +247,7 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last & // Make special controls -if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { +if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; @@ -272,10 +273,10 @@ if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypa return -1; } } -if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { +if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) { // No specific test for the moment } -if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { +if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe')) { require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/stripe-php/init.php, ... } @@ -341,9 +342,9 @@ $creditor = $mysoc->name; $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; if (!empty($conf->global->$paramcreditorlong)) { - $creditor = $conf->global->$paramcreditorlong; + $creditor = $conf->global->$paramcreditorlong; // use label long of the seller to show } elseif (!empty($conf->global->$paramcreditor)) { - $creditor = $conf->global->$paramcreditor; + $creditor = $conf->global->$paramcreditor; // use label short of the seller to show } $mesg = ''; @@ -355,6 +356,8 @@ $mesg = ''; // Action dopayment is called after clicking/choosing the payment mode if ($action == 'dopayment') { + dol_syslog("--- newpayment.php Execute action = ".$action." paymentmethod=".$paymentmethod.' amount='.$amount.' newamount='.GETPOST("newamount", 'alpha'), LOG_DEBUG, 0, '_payment'); + if ($paymentmethod == 'paypal') { $PAYPAL_API_PRICE = price2num(GETPOST("newamount", 'alpha'), 'MT'); $PAYPAL_PAYMENT_TYPE = 'Sale'; @@ -480,7 +483,7 @@ if ($action == 'dopayment') { // Called when choosing Stripe mode. // When using the old Charge API architecture, this code is called after clicking the 'dopayment' with the Charge API architecture. // When using the PaymentIntent API architecture, the Stripe customer was already created when creating PaymentIntent when showing payment page, and the payment is already ok when action=charge. -if ($action == 'charge' && !empty($conf->stripe->enabled)) { +if ($action == 'charge' && isModEnabled('stripe')) { $amountstripe = $amount; // Correct the amount according to unit of currency @@ -490,9 +493,9 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $amountstripe = $amountstripe * 100; } - dol_syslog("--- newpayment.php Execute action = ".$action." STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION'), LOG_DEBUG, 0, '_stripe'); - dol_syslog("GET=".var_export($_GET, true), LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST=".var_export($_POST, true), LOG_DEBUG, 0, '_stripe'); + dol_syslog("--- newpayment.php Execute action = ".$action." STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION'), LOG_DEBUG, 0, '_payment'); + dol_syslog("GET=".var_export($_GET, true), LOG_DEBUG, 0, '_payment'); + dol_syslog("POST=".var_export($_POST, true), LOG_DEBUG, 0, '_payment'); $stripeToken = GETPOST("stripeToken", 'alpha'); $email = GETPOST("email", 'alpha'); @@ -502,10 +505,10 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $vatnumber = GETPOST('vatnumber', 'alpha'); $savesource = GETPOSTISSET('savesource') ? GETPOST('savesource', 'int') : 1; - dol_syslog("POST stripeToken = ".$stripeToken, LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST email = ".$email, LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST thirdparty_id = ".$thirdparty_id, LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST vatnumber = ".$vatnumber, LOG_DEBUG, 0, '_stripe'); + dol_syslog("POST stripeToken = ".$stripeToken, LOG_DEBUG, 0, '_payment'); + dol_syslog("POST email = ".$email, LOG_DEBUG, 0, '_payment'); + dol_syslog("POST thirdparty_id = ".$thirdparty_id, LOG_DEBUG, 0, '_payment'); + dol_syslog("POST vatnumber = ".$vatnumber, LOG_DEBUG, 0, '_payment'); $error = 0; $errormessage = ''; @@ -526,7 +529,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { } if ($thirdparty_id > 0) { - dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_stripe'); + dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_payment'); $service = 'StripeTest'; $servicestatus = 0; @@ -545,7 +548,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 1); if (empty($customer)) { $error++; - dol_syslog('Failed to get/create stripe customer for thirdparty id = '.$thirdparty_id.' and servicestatus = '.$servicestatus.': '.$stripe->error, LOG_ERR, 0, '_stripe'); + dol_syslog('Failed to get/create stripe customer for thirdparty id = '.$thirdparty_id.' and servicestatus = '.$servicestatus.': '.$stripe->error, LOG_ERR, 0, '_payment'); setEventMessages('Failed to get/create stripe customer for thirdparty id = '.$thirdparty_id.' and servicestatus = '.$servicestatus.': '.$stripe->error, null, 'errors'); $action = ''; } @@ -560,7 +563,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { if (empty($card)) { $error++; - dol_syslog('Failed to create card record', LOG_WARNING, 0, '_stripe'); + dol_syslog('Failed to create card record', LOG_WARNING, 0, '_payment'); setEventMessages('Failed to create card record', null, 'errors'); $action = ''; } else { @@ -574,7 +577,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $metadata["dol_type"] = $dol_type; } - dol_syslog("Create charge on card ".$card->id, LOG_DEBUG, 0, '_stripe'); + dol_syslog("Create charge on card ".$card->id, LOG_DEBUG, 0, '_payment'); $charge = \Stripe\Charge::create(array( 'amount' => price2num($amountstripe, 'MU'), 'currency' => $currency, @@ -588,7 +591,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) if (empty($charge)) { $error++; - dol_syslog('Failed to charge card', LOG_WARNING, 0, '_stripe'); + dol_syslog('Failed to charge card', LOG_WARNING, 0, '_payment'); setEventMessages('Failed to charge card', null, 'errors'); $action = ''; } @@ -606,7 +609,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { if (empty($vatcleaned)) $taxinfo=null; */ - dol_syslog("Create anonymous customer card profile", LOG_DEBUG, 0, '_stripe'); + dol_syslog("Create anonymous customer card profile", LOG_DEBUG, 0, '_payment'); $customer = \Stripe\Customer::create(array( 'email' => $email, @@ -618,9 +621,9 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // Create the VAT record in Stripe /* We don't know country of customer, so we can't create tax - if (! empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer + if (!empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer { - if (! empty($vatcleaned)) + if (!empty($vatcleaned)) { $isineec=isInEEC($object); if ($object->country_code && $isineec) @@ -643,7 +646,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // The customer was just created with a source, so we can make a charge // with no card defined, the source just used for customer creation will be used. - dol_syslog("Create charge", LOG_DEBUG, 0, '_stripe'); + dol_syslog("Create charge", LOG_DEBUG, 0, '_payment'); $charge = \Stripe\Charge::create(array( 'customer' => $customer->id, 'amount' => price2num($amountstripe, 'MU'), @@ -656,7 +659,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) if (empty($charge)) { $error++; - dol_syslog('Failed to charge card', LOG_WARNING, 0, '_stripe'); + dol_syslog('Failed to charge card', LOG_WARNING, 0, '_payment'); setEventMessages('Failed to charge card', null, 'errors'); $action = ''; } @@ -675,21 +678,21 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $error++; $errormessage = "ErrorCard ".$e->getMessage()." err=".var_export($err, true); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (\Stripe\Error\RateLimit $e) { // Too many requests made to the API too quickly $error++; $errormessage = "ErrorRateLimit ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (\Stripe\Error\InvalidRequest $e) { // Invalid parameters were supplied to Stripe's API $error++; $errormessage = "ErrorInvalidRequest ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (\Stripe\Error\Authentication $e) { @@ -697,14 +700,14 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // (maybe you changed API keys recently) $error++; $errormessage = "ErrorAuthentication ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (\Stripe\Error\ApiConnection $e) { // Network communication with Stripe failed $error++; $errormessage = "ErrorApiConnection ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (\Stripe\Error\Base $e) { @@ -712,14 +715,14 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { // yourself an email $error++; $errormessage = "ErrorBase ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } catch (Exception $e) { // Something else happened, completely unrelated to Stripe $error++; $errormessage = "ErrorException ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } @@ -754,7 +757,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { } catch (Exception $e) { $error++; $errormessage = "CantRetrievePaymentIntent ".$e->getMessage(); - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($e->getMessage(), null, 'errors'); $action = ''; } @@ -762,13 +765,13 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { if ($paymentintent->status != 'succeeded') { $error++; $errormessage = "StatusOfRetrievedIntent is not succeeded: ".$paymentintent->status; - dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); + dol_syslog($errormessage, LOG_WARNING, 0, '_payment'); setEventMessages($paymentintent->status, null, 'errors'); $action = ''; } else { // TODO We can also record the payment mode into llx_societe_rib with stripe $paymentintent->payment_method // Note that with other old Stripe architecture (using Charge API), the payment mode was not recorded, so it is not mandatory to do it here. - //dol_syslog("Create payment_method for ".$paymentintent->payment_method, LOG_DEBUG, 0, '_stripe'); + //dol_syslog("Create payment_method for ".$paymentintent->payment_method, LOG_DEBUG, 0, '_payment'); // Get here amount and currency used for payment and force value into $amount and $currency so the real amount is saved into session instead // of the amount and currency retreived from the POST. @@ -798,11 +801,13 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $_SESSION['TRANSACTIONID'] = (is_object($charge) ? $charge->id : (is_object($paymentintent) ? $paymentintent->id : '')); $_SESSION['errormessage'] = $errormessage; - dol_syslog("Action charge stripe STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')." ip=".$remoteip, LOG_DEBUG, 0, '_stripe'); - dol_syslog("onlinetoken=".$_SESSION["onlinetoken"]." FinalPaymentAmt=".$_SESSION["FinalPaymentAmt"]." currencyCodeType=".$_SESSION["currencyCodeType"]." payerID=".$_SESSION['payerID']." TRANSACTIONID=".$_SESSION['TRANSACTIONID'], LOG_DEBUG, 0, '_stripe'); - dol_syslog("FULLTAG=".$FULLTAG, LOG_DEBUG, 0, '_stripe'); - dol_syslog("error=".$error." errormessage=".$errormessage, LOG_DEBUG, 0, '_stripe'); - dol_syslog("Now call the redirect to paymentok or paymentko, URL = ".($error ? $urlko : $urlok), LOG_DEBUG, 0, '_stripe'); + dol_syslog("Action charge stripe STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')." ip=".$remoteip, LOG_DEBUG, 0, '_payment'); + dol_syslog("onlinetoken=".$_SESSION["onlinetoken"]." FinalPaymentAmt=".$_SESSION["FinalPaymentAmt"]." currencyCodeType=".$_SESSION["currencyCodeType"]." payerID=".$_SESSION['payerID']." TRANSACTIONID=".$_SESSION['TRANSACTIONID'], LOG_DEBUG, 0, '_payment'); + dol_syslog("FULLTAG=".$FULLTAG, LOG_DEBUG, 0, '_payment'); + dol_syslog("error=".$error." errormessage=".$errormessage, LOG_DEBUG, 0, '_payment'); + dol_syslog("_SERVER[SERVER_NAME] = ".(empty($_SERVER["SERVER_NAME"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_NAME"])), LOG_DEBUG, 0, '_payment'); + dol_syslog("_SERVER[SERVER_ADDR] = ".(empty($_SERVER["SERVER_ADDR"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_ADDR"])), LOG_DEBUG, 0, '_payment'); + dol_syslog("Now call the redirect to paymentok or paymentko, URL = ".($error ? $urlko : $urlok), LOG_DEBUG, 0, '_payment'); if ($error) { header("Location: ".$urlko); @@ -831,6 +836,11 @@ $conf->dol_hide_leftmenu = 1; $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
    ' : '').'
    '; llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); +dol_syslog("--- newpayment.php action = ".$action, LOG_DEBUG, 0, '_payment'); +dol_syslog("newpayment.php show page source=".$source." paymentmethod=".$paymentmethod.' amount='.$amount.' newamount='.GETPOST("newamount", 'alpha')." ref=".$ref, LOG_DEBUG, 0, '_payment'); +dol_syslog("_SERVER[SERVER_NAME] = ".(empty($_SERVER["SERVER_NAME"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_NAME"])), LOG_DEBUG, 0, '_payment'); +dol_syslog("_SERVER[SERVER_ADDR] = ".(empty($_SERVER["SERVER_ADDR"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_ADDR"])), LOG_DEBUG, 0, '_payment'); + // Check link validity if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', 'donation_ref', ''))) { $langs->load("errors"); @@ -843,10 +853,10 @@ if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_r // Show sandbox warning -if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled) && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) { // We can force sand box with param 'forcesandbox' +if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal') && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) { // We can force sand box with param 'forcesandbox' dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Paypal'), '', 'warning'); } -if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) { +if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } @@ -910,15 +920,15 @@ if (!empty($conf->global->MAIN_IMAGE_PUBLIC_PAYMENT)) { print ''."\n"; print ''."\n"; // Additionnal information for each payment system -if (!empty($conf->paypal->enabled)) { - print ''."\n"; - print ''."\n"; +if (isModEnabled('paypal')) { + print ''."\n"; + print ''."\n"; } -if (!empty($conf->paybox->enabled)) { - print ''."\n"; +if (isModEnabled('paybox')) { + print ''."\n"; } -if (!empty($conf->stripe->enabled)) { - print ''."\n"; +if (isModEnabled('stripe')) { + print ''."\n"; } print ''."\n"; print ''."\n"; @@ -1004,7 +1014,7 @@ if (!$source) { } -// Payment on customer order +// Payment on sales order if ($source == 'order') { $found = true; $langs->load("orders"); @@ -1360,10 +1370,6 @@ if ($source == 'contractline') { if ($contractline->description) { $text .= '
    '.dol_htmlentitiesbr($contractline->description); } - //if ($contractline->date_fin_validite) { - // $text.='
    '.$langs->trans("DateEndPlanned").': '; - // $text.=dol_print_date($contractline->date_fin_validite); - //} if ($contractline->date_end) { $text .= '
    '.$langs->trans("ExpiredSince").': '.dol_print_date($contractline->date_end); } @@ -1468,6 +1474,7 @@ if ($source == 'contractline') { if ($source == 'member' || $source == 'membersubscription') { $newsource = 'member'; + $tag=""; $found = true; $langs->load("members"); @@ -1500,7 +1507,7 @@ if ($source == 'member' || $source == 'membersubscription') { $amount = $adht->amount; } - $amount = price2num($amount, 'MT'); + $amount = max(0, price2num($amount, 'MT')); } if (GETPOST('fulltag', 'alpha')) { @@ -1596,7 +1603,7 @@ if ($source == 'member' || $source == 'membersubscription') { print '
    \n"; - } elseif ($action == dopayment) { + } elseif ($action == 'dopayment') { print ''."\n"; @@ -2075,7 +2048,7 @@ if ($action != 'dopayment') { 'paymentmethod' => $paymentmethod ]; $reshook = $hookmanager->executeHooks('doAddButton', $parameters, $object, $action); - if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { + if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) { print '
    '; print '
    '; print ''.$langs->trans("CreditOrDebitCard").''; @@ -2094,7 +2067,7 @@ if ($action != 'dopayment') { '; } - if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { + if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe')) { print '
    '; print ''; print '
    '; @@ -2115,7 +2088,7 @@ if ($action != 'dopayment') { '; } - if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { + if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) { if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) { $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; } @@ -2261,7 +2234,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme // $conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1 = use intent (default value) // $conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 = use payment - //if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || ! empty($paymentintent)) + //if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || !empty($paymentintent)) //{ print '
    '.$langs->trans("ThisIsInformationOnDocumentToSign").' :
    '.$langs->trans("ThisIsInformationOnDocumentToSignProposal").' :
    '.$langs->trans("ThisIsInformationOnDocumentToSignContract").' :
    '.$langs->trans("ThisIsInformationOnDocumentToSignFichinter").' :
    '.$langs->trans("Proposer"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; + print ''; + print '
    '.$langs->trans("ThirdParty"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$object->thirdparty->name.''; + print '
    '.$langs->trans("Designation"); + print ''.$text; + + $last_main_doc_file = $object->last_main_doc; + + if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { + // It seems document has never been generated, or was generated and then deleted. + // So we try to regenerate it with its default template. + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. + $object->generateDocument($defaulttemplate, $langs); + } + + $directdownloadlink = $object->getLastMainDocLink('contract'); + if ($directdownloadlink) { + print '
    '; + print img_mime($object->last_main_doc, ''); + if ($message == "signed") { + print $langs->trans("DownloadSignedDocument").''; + } else { + print $langs->trans("DownloadDocument").''; + } + } + + + print ''; + print ''; + print '
    '.$langs->trans("Proposer"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$creditor.''; + print ''; + print '
    '.$langs->trans("ThirdParty"); + print ''; + print img_picto('', 'company', 'class="pictofixedwidth"'); + print ''.$object->thirdparty->name.''; + print '
    '.$langs->trans("Designation"); + print ''.$text; + + $last_main_doc_file = $object->last_main_doc; + + if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { + // It seems document has never been generated, or was generated and then deleted. + // So we try to regenerate it with its default template. + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. + $object->generateDocument($defaulttemplate, $langs); + } + + $directdownloadlink = $object->getLastMainDocLink('fichinter'); + if ($directdownloadlink) { + print '
    '; + print img_mime($object->last_main_doc, ''); + if ($message == "signed") { + print $langs->trans("DownloadSignedDocument").''; + } else { + print $langs->trans("DownloadDocument").''; + } + } + + + print ''; + print ''; + print '
    '; print $form->selectarray("typeid", $adht->liste_array(1), $member->typeid, 0, 0, 0, 'onchange="window.location.replace(\''.$urlwithroot.'/public/payment/newpayment.php?source='.urlencode($source).'&ref='.urlencode($ref).'&amount='.urlencode($amount).'&typeid=\' + this.value + \'&securekey='.urlencode($SECUREKEY).'\');"', 0, 0, 0, '', '', 1); print "
    '.$langs->trans("NewMemberType"); print ''.dol_escape_htmltag($member->type); print ''; @@ -1611,57 +1618,23 @@ if ($source == 'member' || $source == 'membersubscription') { // Amount print '
    '.$langs->trans("Amount"); - if (empty($amount)) { - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { - print ' ('.$langs->trans("ToComplete"); - } - if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { - print ' - '.$langs->trans("SeeHere").''; - } - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { - print ')'; - } + // This place no longer allows amount edition + if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { + print ' - '.$langs->trans("SeeHere").''; } print ''; - $valtoshow = ''; - if (empty($amount) || !is_numeric($amount)) { - $valtoshow = price2num(GETPOST("newamount", 'alpha'), 'MT'); - // force default subscription amount to value defined into constant... - if (empty($valtoshow)) { - if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { - if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { - $valtoshow = $conf->global->MEMBER_NEWFORM_AMOUNT; - } - } else { - if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { - $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; - } - } - } + if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $amount) { + $amount = max(0, $conf->global->MEMBER_MIN_AMOUNT, $amount); } - if (empty($amount) || !is_numeric($amount)) { - //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { - $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); - } - print ''; - if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { - print ''; - print ''; - } else { - print ''; - } - print ' '.$langs->trans("Currency".$currency).''; - } else { - $valtoshow = $amount; - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { - $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); - $amount = $valtoshow; - } - print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency - print ''; - print ''; + print ''.price($amount, 1, $langs, 1, -1, -1, $currency).''; // Price with currency + $caneditamount = !empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) || $adht->caneditamount; + $minimumamount = empty($conf->global->MEMBER_MIN_AMOUNT)? $adht->amount : max($conf->global->MEMBER_MIN_AMOUNT, $adht->amount > $amount); + if (!$caneditamount && $minimumamount > $amount) { + print ' '. $langs->trans("AmountIsLowerToMinimumNotice", price($adht->amount, 1, $langs, 1, -1, -1, $currency)); } + + print ''; + print ''; print ''; print '
    @@ -2443,7 +2416,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme } elseif (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { ?> // Code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION set to 1 or 2 - + // Create a Stripe client. paypal->enabled)) { +if (isModEnabled('paypal')) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; } $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe")); -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { $PAYPALTOKEN = GETPOST('TOKEN'); if (empty($PAYPALTOKEN)) { $PAYPALTOKEN = GETPOST('token'); @@ -67,9 +68,9 @@ if (!empty($conf->paypal->enabled)) { $PAYPALPAYERID = GETPOST('PayerID'); } } -if (!empty($conf->paybox->enabled)) { +if (isModEnabled('paybox')) { } -if (!empty($conf->stripe->enabled)) { +if (isModEnabled('stripe')) { } $FULLTAG = GETPOST('FULLTAG'); @@ -95,20 +96,20 @@ if (empty($paymentmethod)) { $validpaymentmethod = array(); -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { $validpaymentmethod['paypal'] = 'paypal'; } -if (!empty($conf->paybox->enabled)) { +if (isModEnabled('paybox')) { $validpaymentmethod['paybox'] = 'paybox'; } -if (!empty($conf->stripe->enabled)) { +if (isModEnabled('stripe')) { $validpaymentmethod['stripe'] = 'stripe'; } // Security check if (empty($validpaymentmethod)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('No valid payment mode'); } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 154e4606cd5..6d50d1c8c76 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -50,13 +50,14 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; } @@ -64,7 +65,7 @@ if (!empty($conf->paypal->enabled)) { $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal")); // Clean parameters -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { $PAYPAL_API_USER = ""; if (!empty($conf->global->PAYPAL_API_USER)) { $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; @@ -126,19 +127,19 @@ dol_syslog("***** paymentok.php is called paymentmethod=".$paymentmethod." FULLT $validpaymentmethod = array(); -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { $validpaymentmethod['paypal'] = 'paypal'; } -if (!empty($conf->paybox->enabled)) { +if (isModEnabled('paybox')) { $validpaymentmethod['paybox'] = 'paybox'; } -if (!empty($conf->stripe->enabled)) { +if (isModEnabled('stripe')) { $validpaymentmethod['stripe'] = 'stripe'; } // Security check if (empty($validpaymentmethod)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('No valid payment mode'); } @@ -166,13 +167,20 @@ $error = 0; $now = dol_now(); -dol_syslog("Callback url when a payment was done. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"]) ?dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"]) ?dol_escape_htmltag($_SERVER["SCRIPT_URI"]) : ''), LOG_DEBUG, 0, '_payment'); +dol_syslog("Callback url when a payment was done. query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : dol_escape_htmltag($_SERVER["QUERY_STRING"]))." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : dol_escape_htmltag($_SERVER["SCRIPT_URI"])), LOG_DEBUG, 0, '_payment'); +dol_syslog("_SERVER[SERVER_NAME] = ".(empty($_SERVER["SERVER_NAME"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_NAME"])), LOG_DEBUG, 0, '_payment'); +dol_syslog("_SERVER[SERVER_ADDR] = ".(empty($_SERVER["SERVER_ADDR"]) ? '' : dol_escape_htmltag($_SERVER["SERVER_ADDR"])), LOG_DEBUG, 0, '_payment'); $tracepost = ""; foreach ($_POST as $k => $v) { $tracepost .= "{$k} - {$v}\n"; } dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment'); +$tracesession = ""; +foreach ($_SESSION as $k => $v) { + $tracesession .= "{$k} - {$v}\n"; +} +dol_syslog("SESSION=".$tracesession, LOG_DEBUG, 0, '_payment'); $head = ''; if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { @@ -235,7 +243,7 @@ if (!empty($conf->global->MAIN_IMAGE_PUBLIC_PAYMENT)) { print '


    '; -if (!empty($conf->paypal->enabled)) { +if (isModEnabled('paypal')) { if ($paymentmethod == 'paypal') { // We call this page only if payment is ok on payment system if ($PAYPALTOKEN) { // Get on url call @@ -315,14 +323,14 @@ if (!empty($conf->paypal->enabled)) { } } -if (!empty($conf->paybox->enabled)) { +if (isModEnabled('paybox')) { if ($paymentmethod == 'paybox') { // TODO Add a check to validate that payment is ok. $ispaymentok = true; // We call this page only if payment is ok on payment system } } -if (!empty($conf->stripe->enabled)) { +if (isModEnabled('stripe')) { if ($paymentmethod == 'stripe') { // TODO Add a check to validate that payment is ok. We can request Stripe with payment_intent and payment_intent_client_secret $ispaymentok = true; // We call this page only if payment is ok on payment system @@ -506,9 +514,13 @@ if ($ispaymentok) { $datesubend = dol_time_plus_duree($datesubend, -1, 'd'); } + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $paymentdate = $now; $amount = $FinalPaymentAmt; - $label = 'Online subscription '.dol_print_date($now, 'standard').' using '.$paymentmethod.' from '.$ipaddress.' - Transaction ID = '.$TRANSACTIONID; + $formatteddate = dol_print_date($paymentdate, 'dayhour', 'auto', $outputlangs); + $label = $langs->trans("OnlineSubscriptionPaymentLine", $formatteddate, $paymentmethod, $ipaddress, $TRANSACTIONID); // Payment informations $accountid = 0; @@ -535,11 +547,11 @@ if ($ispaymentok) { $emetteur_banque = ''; // Define default choice for complementary actions $option = ''; - if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) { + if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) { $option = 'bankviainvoice'; - } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) { + } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && isModEnabled("banque")) { $option = 'bankdirect'; - } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) { + } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) { $option = 'invoiceonly'; } if (empty($option)) { @@ -695,9 +707,6 @@ if ($ispaymentok) { // Send subscription email include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); - // Set output language - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template @@ -851,7 +860,7 @@ if ($ispaymentok) { } } - if (!$error && !empty($conf->banque->enabled)) { + if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; @@ -968,7 +977,7 @@ if ($ispaymentok) { } } - if (!$error && !empty($conf->banque->enabled)) { + if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; elseif ($paymentmethod == 'paypal') $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; @@ -1088,7 +1097,7 @@ if ($ispaymentok) { } } - if (!$error && !empty($conf->banque->enabled)) { + if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; @@ -1204,7 +1213,7 @@ if ($ispaymentok) { } } - if (!$error && !empty($conf->banque->enabled)) { + if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; @@ -1264,7 +1273,7 @@ if ($ispaymentok) { $thirdparty = new Societe($db); $resultthirdparty = $thirdparty->fetch($attendeetovalidate->fk_soc); if ($resultthirdparty < 0) { - setEventMessages(null, $attendeetovalidate->errors, "errors"); + setEventMessages($resultthirdparty->error, $resultthirdparty->errors, "errors"); } else { require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; @@ -1291,7 +1300,6 @@ if ($ispaymentok) { $msg = $outputlangs->trans("OrganizationEventPaymentOfRegistrationWasReceived"); } - $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); complete_substitutions_array($substitutionarray, $outputlangs, $object); @@ -1299,6 +1307,13 @@ if ($ispaymentok) { $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $sendto = $attendeetovalidate->email; + $cc = ''; + if ($thirdparty->email) { + $cc = $thirdparty->email; + } + if ($attendeetovalidate->email_company && $attendeetovalidate->email_company != $thirdparty->email) { + $cc = ($cc ? ', ' : '').$attendeetovalidate->email_company; + } $from = $conf->global->MAILING_EMAIL_FROM; $urlback = $_SERVER["REQUEST_URI"]; @@ -1319,7 +1334,7 @@ if ($ispaymentok) { $listofmimes = array(dol_mimetype($file)); } - $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, $listofpaths, $listofmimes, $listofnames, '', '', 0, $ishtml); + $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, $listofpaths, $listofmimes, $listofnames, $cc, '', 0, $ishtml); $result = $mailfile->sendfile(); if ($result) { @@ -1413,7 +1428,7 @@ if ($ispaymentok) { } } - if (!$error && !empty($conf->banque->enabled)) { + if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index e5dfeb59a8e..dfcfde94b17 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -41,6 +41,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; @@ -84,7 +85,7 @@ if ($resultproject < 0) { // Security check if (empty($conf->project->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Project not enabled'); } diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index 5b0c35c10f3..7603c046006 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -50,12 +50,14 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Init vars $errmsg = ''; @@ -82,7 +84,7 @@ $user->loadDefaultValues(); // Security check if (empty($conf->project->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Project not enabled'); } @@ -295,6 +297,28 @@ if (empty($reshook) && $action == 'add') { $proj->opp_status = $defaultoppstatus; $proj->fk_opp_status = $defaultoppstatus; + $proj->ip = getUserRemoteIP(); + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(rowid) as nb_projets"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet"; + $sql .= " WHERE ip = '".$db->escape($proj->ip)."'"; + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_projets; + } + } + } + // Fill array 'array_options' with data from the form $extrafields->fetch_name_optionals_label($proj->table_element); $ret = $extrafields->setOptionalsFromPost(null, $proj); @@ -302,74 +326,83 @@ if (empty($reshook) && $action == 'add') { $error++; } - // Create the project - $result = $proj->create($user); - if ($result > 0) { - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $object = $proj; - - if ($object->email) { - $subject = ''; - $msg = ''; - - // Send subscription email - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - // Set output language - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files required by page - $outputlangs->loadLangs(array("main", "members", "projects")); - // Get email content from template - $arraydefaultmessage = null; - $labeltouse = $conf->global->PROJECT_EMAIL_TEMPLATE_AUTOLEAD; - - if (!empty($labeltouse)) { - $arraydefaultmessage = $formmail->getEMailTemplate($db, 'project', $user, $outputlangs, 0, 1, $labeltouse); - } - - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { - $subject = $arraydefaultmessage->topic; - $msg = $arraydefaultmessage->content; - } - if (empty($labeltosue)) { - $labeltouse = '['.$mysoc->name.'] '.$langs->trans("YourMessage"); - $msg = $langs->trans("YourMessageHasBeenReceived"); - } - - $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); - complete_substitutions_array($substitutionarray, $outputlangs, $object); - $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); - $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); - - if ($subjecttosend && $texttosend) { - $moreinheader = 'X-Dolibarr-Info: send_an_email by public/lead/new.php'."\r\n"; - - $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - } - /*if ($result < 0) { - $error++; - setEventMessages($object->error, $object->errors, 'errors'); - }*/ - } - - if (!empty($backtopage)) { - $urlback = $backtopage; - } elseif (!empty($conf->global->PROJECT_URL_REDIRECT_LEAD)) { - $urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD; - // TODO Make replacement of __AMOUNT__, etc... - } else { - $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); - } - - if (!empty($entity)) { - $urlback .= '&entity='.$entity; - } - - dol_syslog("project lead ".$proj->ref." has been created, we redirect to ".$urlback); - } else { + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { $error++; - $errmsg .= $proj->error.'
    '.join('
    ', $proj->errors); + $errmsg = $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($proj->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + } + // Create the project + if (!$error) { + $result = $proj->create($user); + if ($result > 0) { + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $object = $proj; + + if ($object->email) { + $subject = ''; + $msg = ''; + + // Send subscription email + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members", "projects")); + // Get email content from template + $arraydefaultmessage = null; + $labeltouse = $conf->global->PROJECT_EMAIL_TEMPLATE_AUTOLEAD; + + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'project', $user, $outputlangs, 0, 1, $labeltouse); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + if (empty($labeltosue)) { + $labeltouse = '['.$mysoc->name.'] '.$langs->trans("YourMessage"); + $msg = $langs->trans("YourMessageHasBeenReceived"); + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); + + if ($subjecttosend && $texttosend) { + $moreinheader = 'X-Dolibarr-Info: send_an_email by public/lead/new.php'."\r\n"; + + $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); + } + /*if ($result < 0) { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + }*/ + } + + if (!empty($backtopage)) { + $urlback = $backtopage; + } elseif (!empty($conf->global->PROJECT_URL_REDIRECT_LEAD)) { + $urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD; + // TODO Make replacement of __AMOUNT__, etc... + } else { + $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); + } + + if (!empty($entity)) { + $urlback .= '&entity='.$entity; + } + + dol_syslog("project lead ".$proj->ref." has been created, we redirect to ".$urlback); + } else { + $error++; + $errmsg .= $proj->error.'
    '.join('
    ', $proj->errors); + } + } else { + setEventMessage($errmsg, 'errors'); } } @@ -423,7 +456,7 @@ print '
    '; if (!empty($conf->global->PROJECT_NEWFORM_TEXT)) { print $langs->trans($conf->global->PROJECT_NEWFORM_TEXT)."
    \n"; } else { - print $langs->trans("FormForNewLeadDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."
    \n"; + print $langs->trans("FormForNewLeadDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
    \n"; } print '
    '; diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 52193e4fcd4..68e469b6a00 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -45,6 +45,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -55,6 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; global $dolibarr_main_url_root; @@ -105,7 +107,7 @@ $arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='boot // Security check if (empty($conf->eventorganization->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Event organization not enabled'); } @@ -360,7 +362,41 @@ if (empty($reshook) && $action == 'add') { $conforbooth->datep2 = $dateend; $conforbooth->datec = dol_now(); $conforbooth->tms = dol_now(); - $resultconforbooth = $conforbooth->create($user); + $conforbooth->ip = getUserRemoteIP(); + + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_confs"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm"; + $sql .= " WHERE ip = '".$db->escape($conforbooth->ip)."'"; + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_confs; + } + } + } + + $resultconforbooth = 0; + + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + $error++; + $errmsg .= $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($conforbooth->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + setEventMessage($errmsg, 'errors'); + } else { + $resultconforbooth = $conforbooth->create($user); + } if ($resultconforbooth<=0) { $error++; $errmsg .= $conforbooth->error; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 05cc8e61a82..5590b0bf94c 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -45,6 +45,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -55,6 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; global $dolibarr_main_url_root; @@ -106,7 +108,7 @@ $arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conf // Security check if (empty($conf->eventorganization->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Event organization not enabled'); } @@ -358,7 +360,41 @@ if (empty($reshook) && $action == 'add') { $conforbooth->tms = dol_now(); $conforbooth->firstname = $contact->firstname; $conforbooth->lastname = $contact->lastname; - $resultconforbooth = $conforbooth->create($user); + $conforbooth->ip = getUserRemoteIP(); + + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_confs"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm"; + $sql .= " WHERE ip = '".$db->escape($conforbooth->ip)."'"; + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_confs; + } + } + } + + $resultconforbooth = 0; + + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { + $error++; + $errmsg .= $langs->trans("AlreadyTooMuchPostOnThisIPAdress"); + array_push($conforbooth->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + setEventMessage($errmsg, 'errors'); + } else { + $resultconforbooth = $conforbooth->create($user); + } if ($resultconforbooth<=0) { $error++; $errmsg .= $conforbooth->error; diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 805eb8cfdd1..1d9fc58c810 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -41,6 +41,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; @@ -91,7 +92,7 @@ if ($resultproject < 0) { // Security check if (empty($conf->eventorganization->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Event organization not enabled'); } diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 632a3f57da2..23a180b9a7b 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -34,6 +34,7 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -47,7 +48,10 @@ $langs->loadLangs(array("companies", "other", "recruitment")); // Get parameters $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); +$SECUREKEY = GETPOST("securekey"); +$entity = GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity; $backtopage = ''; +$suffix = ""; // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -77,7 +81,7 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren // Security check if (empty($conf->recruitment->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Recruitment not enabled'); } @@ -167,6 +171,7 @@ if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) { $results = $object->fetchAll($sortfield, $sortorder, 0, 0, array('status' => 1)); +$now = dol_now(); if (is_array($results)) { if (empty($results)) { diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index 2eaa51ac2fe..57cb82d9b08 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -34,6 +34,7 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -77,7 +78,7 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren // Security check if (empty($conf->recruitment->enabled)) { - accessforbidden('', 0, 0, 1); + httponly_accessforbidden('Module Recruitment not enabled'); } @@ -93,7 +94,7 @@ if ($cancel) { $action = 'view'; } -if ($action == "view" || $action == "presend" || $action == "close" || $action == "confirm_public_close" || $action == "add_message") { +if ($action == "view" || $action == "presend" || $action == "dosubmit") { $error = 0; $display_ticket = false; if (!strlen($ref)) { @@ -118,11 +119,11 @@ if ($action == "view" || $action == "presend" || $action == "close" || $action = } /* - if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) + if (!$error && $action == "dosubmit") { - // TODO Add message... - $ret = $object->newMessage($user, $action, 0, 1); + // Test MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS + // TODO Create job application @@ -135,7 +136,7 @@ if ($action == "view" || $action == "presend" || $action == "close" || $action = if ($error || $errors) { setEventMessages($object->error, $object->errors, 'errors'); - if ($action == "add_message") { + if ($action == "dosubmit") { $action = 'presend'; } else { $action = ''; @@ -184,7 +185,7 @@ print ''."\n"; print '
    '."\n"; print '
    '."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 6674ce9c6de..dd5b1db148f 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -34,6 +34,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -49,11 +50,6 @@ require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; -if (empty($conf->stripe->enabled)) { - accessforbidden('', 0, 0, 1); -} - - // You can find your endpoint's secret in your webhook settings if (isset($_GET['connect'])) { if (isset($_GET['test'])) { @@ -77,10 +73,12 @@ if (isset($_GET['connect'])) { } } +if (empty($conf->stripe->enabled)) { + httponly_accessforbidden('Module Stripe not enabled'); +} + if (empty($endpoint_secret)) { - print 'Error: Setup of module Stripe not complete for mode '.$service.'. The WEBHOOK_KEY is not defined.'; - http_response_code(400); // PHP 5.4 or greater - exit(); + httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The WEBHOOK_KEY is not defined.', 400, 1); } if (!empty($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS)) { @@ -89,9 +87,7 @@ if (!empty($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS)) { $user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS); $user->getrights(); } else { - print 'Error: Setup of module Stripe not complete for mode '.$service.'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.'; - http_response_code(400); // PHP 5.4 or greater - exit(); + httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.', 400, 1); } @@ -113,12 +109,9 @@ try { $event = \Stripe\Webhook::constructEvent($payload, $sig_header, $endpoint_secret); } catch (\UnexpectedValueException $e) { // Invalid payload - http_response_code(400); // PHP 5.4 or greater - exit(); + httponly_accessforbidden('Invalid payload', 400); } catch (\Stripe\Error\SignatureVerification $e) { - // Invalid signature - http_response_code(400); // PHP 5.4 or greater - exit(); + httponly_accessforbidden('Invalid signature', 400); } // Do something with $event @@ -126,7 +119,7 @@ try { $langs->load("main"); -if (!empty($conf->multicompany->enabled) && !empty($conf->stripeconnect->enabled) && is_object($mc)) { +if (isModEnabled('multicompany') && !empty($conf->stripeconnect->enabled) && is_object($mc)) { $sql = "SELECT entity"; $sql .= " FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$db->escape($service)."' and tokenstring LIKE '%".$db->escape($event->account)."%'"; @@ -155,6 +148,7 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $societeName = $conf->global->MAIN_APPLICATION_TITLE; } +top_httphead(); dol_syslog("***** Stripe IPN was called with event->type = ".$event->type); @@ -195,11 +189,10 @@ if ($event->type == 'payout.created') { $ret = $mailfile->sendfile(); - http_response_code(200); // PHP 5.4 or greater return 1; } else { $error++; - http_response_code(500); // PHP 5.4 or greater + http_response_code(500); return -1; } } elseif ($event->type == 'payout.paid') { @@ -287,7 +280,6 @@ if ($event->type == 'payout.created') { $ret = $mailfile->sendfile(); - http_response_code(200); return 1; } else { $error++; @@ -396,4 +388,4 @@ if ($event->type == 'payout.created') { // This event is deprecated. } -http_response_code(200); +// End of page. Default return HTTP code will be 200 diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 609ced5f684..693b7eed59d 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -9,12 +9,6 @@ if (!defined('NOREQUIRESOC')) { if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -} -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 @@ -22,6 +16,7 @@ if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) } +// Load Dolibarr environment require '../../main.inc.php'; // Security diff --git a/htdocs/public/test/test_csrf.php b/htdocs/public/test/test_csrf.php index 43372d22f15..6bb9679d404 100644 --- a/htdocs/public/test/test_csrf.php +++ b/htdocs/public/test/test_csrf.php @@ -9,12 +9,6 @@ if (!defined('NOREQUIRESOC')) { if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -} -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 @@ -22,6 +16,7 @@ if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) } +// Load Dolibarr environment require '../../main.inc.php'; // Security diff --git a/htdocs/public/test/test_exec.php b/htdocs/public/test/test_exec.php index ef6f41df132..1c477c31295 100644 --- a/htdocs/public/test/test_exec.php +++ b/htdocs/public/test/test_exec.php @@ -14,12 +14,6 @@ if (!defined('NOREQUIRETRAN')) { if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -} -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 } @@ -41,6 +35,7 @@ if (!defined("NOSESSION")) { define("NOSESSION", '1'); } +// Load Dolibarr environment require '../../main.inc.php'; // Security diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index c5d25e0871e..acc9151798f 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -5,6 +5,7 @@ define("NOCSRFCHECK", 1); // We accept to go on this page from external web site define('NOSESSION', '1'); }*/ +// Load Dolibarr environment require '../../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; diff --git a/htdocs/public/test/test_sessionlock.php b/htdocs/public/test/test_sessionlock.php index 1aea6204b3e..6e022358ba2 100644 --- a/htdocs/public/test/test_sessionlock.php +++ b/htdocs/public/test/test_sessionlock.php @@ -14,12 +14,6 @@ if (!defined('NOREQUIRETRAN')) { if (!defined('NOSTYLECHECK')) { define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -} -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 } @@ -61,6 +55,7 @@ print '
    '; print 'session_status='.session_status().' (before main.inc.php)'; print '
    '; +// Load Dolibarr environment require '../../main.inc.php'; // Security diff --git a/htdocs/public/ticket/ajax/ajax.php b/htdocs/public/ticket/ajax/ajax.php index a75c796539c..2b637ce3647 100644 --- a/htdocs/public/ticket/ajax/ajax.php +++ b/htdocs/public/ticket/ajax/ajax.php @@ -33,9 +33,6 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} // Do not check anti CSRF attack test if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 68edd453aaf..75111725df0 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -52,6 +52,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; @@ -59,6 +60,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -69,6 +71,8 @@ $langs->loadLangs(array('companies', 'other', 'mails', 'ticket')); // Get parameters $id = GETPOST('id', 'int'); $msg_id = GETPOST('msg_id', 'int'); +$socid = GETPOST('socid', 'int'); +$suffix = ""; $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); @@ -88,8 +92,8 @@ if (!empty($conf->global->TICKET_CREATE_THIRD_PARTY_WITH_CONTACT_IF_NOT_EXIST)) $extrafields->fetch_name_optionals_label($object->table_element); -if (empty($conf->ticket->enabled)) { - accessforbidden('', 0, 0, 1); +if (!isModEnabled('ticket')) { + httponly_accessforbidden('Module Ticket not enabled'); } @@ -238,10 +242,38 @@ if (empty($reshook)) { } if (!$error) { - $object->db->begin(); + $object->type_code = GETPOST("type_code", 'aZ09'); + $object->category_code = GETPOST("category_code", 'aZ09'); + $object->severity_code = GETPOST("severity_code", 'aZ09'); + $object->ip = getUserRemoteIP(); + + $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200); + $now = dol_now(); + $minmonthpost = dol_time_plus_duree($now, -1, "m"); + + // Calculate nb of post for IP + $nb_post_ip = 0; + if ($nb_post_max > 0) { // Calculate only if there is a limit to check + $sql = "SELECT COUNT(ref) as nb_tickets"; + $sql .= " FROM ".MAIN_DB_PREFIX."ticket"; + $sql .= " WHERE ip = '".$db->escape($object->ip)."'"; + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $obj = $db->fetch_object($resql); + $nb_post_ip = $obj->nb_tickets; + } + } + } $object->track_id = generate_random_id(16); + $object->db->begin(); + $object->subject = GETPOST("subject", "restricthtml"); $object->message = GETPOST("message", "restricthtml"); $object->origin_email = $origin_email; @@ -291,7 +323,7 @@ if (empty($reshook)) { } } - if (is_array($searched_companies)) { + if (!empty($searched_companies) && is_array($searched_companies)) { $object->fk_soc = $searched_companies[0]->id; } @@ -307,115 +339,82 @@ if (empty($reshook)) { $object->context['disableticketemail'] = 1; // Disable emails sent by ticket trigger when creation is done from this page, emails are already sent later - $id = $object->create($user); - if ($id <= 0) { + if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { $error++; - $errors = ($object->error ? array($object->error) : $object->errors); - array_push($object->errors, $object->error ? array($object->error) : $object->errors); + $errors = array($langs->trans("AlreadyTooMuchPostOnThisIPAdress")); + array_push($object->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress")); $action = 'create_ticket'; } + if (!$error) { + $id = $object->create($user); + if ($id <= 0) { + $error++; + $errors = ($object->error ? array($object->error) : $object->errors); + array_push($object->errors, $object->error ? array($object->error) : $object->errors); + $action = 'create_ticket'; + } + } + if (!$error && $id > 0) { if ($usertoassign > 0) { $object->add_contact($usertoassign, "SUPPORTCLI", 'external', 0); } - } - if (!$error) { - $object->db->commit(); - $action = "infos_success"; - } else { - $object->db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'create_ticket'; - } + if (!$error) { + $object->db->commit(); + $action = "infos_success"; + } else { + $object->db->rollback(); + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create_ticket'; + } - if (!$error) { - $res = $object->fetch($id); - if ($res) { - // Create form object - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $formmail = new FormMail($db); + if (!$error) { + $res = $object->fetch($id); + if ($res) { + // Create form object + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $formmail = new FormMail($db); - // Init to avoid errors - $filepath = array(); - $filename = array(); - $mimetype = array(); + // Init to avoid errors + $filepath = array(); + $filename = array(); + $mimetype = array(); - $attachedfiles = $formmail->get_attached_files(); - $filepath = $attachedfiles['paths']; - $filename = $attachedfiles['names']; - $mimetype = $attachedfiles['mimes']; + $attachedfiles = $formmail->get_attached_files(); + $filepath = $attachedfiles['paths']; + $filename = $attachedfiles['names']; + $mimetype = $attachedfiles['mimes']; - // Send email to customer + // Send email to customer - $subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubject', $object->ref, $object->track_id); - $message = ($conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->transnoentities('TicketNewEmailBody')).'

    '; - $message .= $langs->transnoentities('TicketNewEmailBodyInfosTicket').'
    '; + $subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubject', $object->ref, $object->track_id); + $message = ($conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->transnoentities('TicketNewEmailBody')).'

    '; + $message .= $langs->transnoentities('TicketNewEmailBodyInfosTicket').'
    '; - $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; - $infos_new_ticket = $langs->transnoentities('TicketNewEmailBodyInfosTrackId', ''.$object->track_id.'').'
    '; - $infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl').'

    '; + $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; + $infos_new_ticket = $langs->transnoentities('TicketNewEmailBodyInfosTrackId', ''.$object->track_id.'').'
    '; + $infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl').'

    '; - $message .= $infos_new_ticket; - $message .= getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE', $langs->transnoentities('TicketMessageMailSignatureText', $mysoc->name)); + $message .= $infos_new_ticket; + $message .= getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE', $langs->transnoentities('TicketMessageMailSignatureText', $mysoc->name)); - $sendto = GETPOST('email', 'alpha'); + $sendto = GETPOST('email', 'alpha'); - $from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; - $replyto = $from; - $sendtocc = ''; - $deliveryreceipt = 0; - - if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { - $old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO; - $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; - } - include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket'); - if ($mailfile->error || $mailfile->errors) { - setEventMessages($mailfile->error, $mailfile->errors, 'errors'); - } else { - $result = $mailfile->sendfile(); - } - if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { - $conf->global->MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO; - } - - // Send email to TICKET_NOTIFICATION_EMAIL_TO - $sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; - if ($sendto) { - $subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubjectAdmin', $object->ref, $object->track_id); - $message_admin = $langs->transnoentities('TicketNewEmailBodyAdmin', $object->track_id).'

    '; - $message_admin .= '
    • '.$langs->trans('Title').' : '.$object->subject.'
    • '; - $message_admin .= '
    • '.$langs->trans('Type').' : '.$object->type_label.'
    • '; - $message_admin .= '
    • '.$langs->trans('Category').' : '.$object->category_label.'
    • '; - $message_admin .= '
    • '.$langs->trans('Severity').' : '.$object->severity_label.'
    • '; - $message_admin .= '
    • '.$langs->trans('From').' : '.$object->origin_email.'
    • '; - // Extrafields - $extrafields->fetch_name_optionals_label($object->table_element); - if (is_array($object->array_options) && count($object->array_options) > 0) { - foreach ($object->array_options as $key => $value) { - $key = substr($key, 8); // remove "options_" - $message_admin .= '
    • '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' : '.$extrafields->showOutputField($key, $value, '', $object->table_element).'
    • '; - } - } - $message_admin .= '
    '; - - $message_admin .= '

    '.$langs->trans('Message').' :
    '.$object->message.'

    '; - $message_admin .= '

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

    '; - - $from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; + $from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; $replyto = $from; + $sendtocc = ''; + $deliveryreceipt = 0; if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { $old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO; $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; } include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket'); - if ($mailfile->error || $mailfile->errors) { + $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket'); + if ($mailfile->error || !empty($mailfile->errors)) { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); } else { $result = $mailfile->sendfile(); @@ -423,31 +422,74 @@ if (empty($reshook)) { if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { $conf->global->MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO; } + + // Send email to TICKET_NOTIFICATION_EMAIL_TO + $sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + if ($sendto) { + $subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubjectAdmin', $object->ref, $object->track_id); + $message_admin = $langs->transnoentities('TicketNewEmailBodyAdmin', $object->track_id).'

    '; + $message_admin .= '
    • '.$langs->trans('Title').' : '.$object->subject.'
    • '; + $message_admin .= '
    • '.$langs->trans('Type').' : '.$object->type_label.'
    • '; + $message_admin .= '
    • '.$langs->trans('Category').' : '.$object->category_label.'
    • '; + $message_admin .= '
    • '.$langs->trans('Severity').' : '.$object->severity_label.'
    • '; + $message_admin .= '
    • '.$langs->trans('From').' : '.$object->origin_email.'
    • '; + // Extrafields + $extrafields->fetch_name_optionals_label($object->table_element); + if (is_array($object->array_options) && count($object->array_options) > 0) { + foreach ($object->array_options as $key => $value) { + $key = substr($key, 8); // remove "options_" + $message_admin .= '
    • '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' : '.$extrafields->showOutputField($key, $value, '', $object->table_element).'
    • '; + } + } + $message_admin .= '
    '; + + $message_admin .= '

    '.$langs->trans('Message').' :
    '.$object->message.'

    '; + $message_admin .= '

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

    '; + + $from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; + $replyto = $from; + + if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { + $old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO; + $conf->global->MAIN_MAIL_AUTOCOPY_TO = ''; + } + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket'); + if ($mailfile->error || !empty($mailfile->errors)) { + setEventMessages($mailfile->error, $mailfile->errors, 'errors'); + } else { + $result = $mailfile->sendfile(); + } + if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { + $conf->global->MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO; + } + } } - } - // Copy files into ticket directory - $destdir = $conf->ticket->dir_output.'/'.$object->ref; - if (!dol_is_dir($destdir)) { - dol_mkdir($destdir); - } - foreach ($filename as $i => $val) { - dol_move($filepath[$i], $destdir.'/'.$filename[$i], 0, 1); - $formmail->remove_attached_files($i); - } + // Copy files into ticket directory + $destdir = $conf->ticket->dir_output.'/'.$object->ref; + if (!dol_is_dir($destdir)) { + dol_mkdir($destdir); + } + foreach ($filename as $i => $val) { + dol_move($filepath[$i], $destdir.'/'.$filename[$i], 0, 1); + $formmail->remove_attached_files($i); + } - //setEventMessages($langs->trans('YourTicketSuccessfullySaved'), null, 'mesgs'); + //setEventMessages($langs->trans('YourTicketSuccessfullySaved'), null, 'mesgs'); - // Make a redirect to avoid to have ticket submitted twice if we make back - $messagetoshow = $langs->trans('MesgInfosPublicTicketCreatedWithTrackId', '{s1}', '{s2}'); - $messagetoshow = str_replace(array('{s1}', '{s2}'), array(''.$object->track_id.'', ''.$object->ref.''), $messagetoshow); - setEventMessages($messagetoshow, null, 'warnings'); - setEventMessages($langs->trans('PleaseRememberThisId'), null, 'warnings'); - header("Location: index.php".(!empty($entity) && !empty($conf->multicompany->enabled)?'?entity='.$entity:'')); - exit; + // Make a redirect to avoid to have ticket submitted twice if we make back + $messagetoshow = $langs->trans('MesgInfosPublicTicketCreatedWithTrackId', '{s1}', '{s2}'); + $messagetoshow = str_replace(array('{s1}', '{s2}'), array(''.$object->track_id.'', ''.$object->ref.''), $messagetoshow); + setEventMessages($messagetoshow, null, 'warnings'); + setEventMessages($langs->trans('PleaseRememberThisId'), null, 'warnings'); + + header("Location: index.php".(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'')); + exit; + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); } - } else { - setEventMessages($object->error, $object->errors, 'errors'); } } } diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index ece2b41aff7..84652017b37 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -42,6 +42,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; @@ -56,9 +57,10 @@ $langs->loadLangs(array('companies', 'other', 'ticket', 'errors')); // Get parameters $track_id = GETPOST('track_id', 'alpha'); $action = GETPOST('action', 'aZ09'); +$suffix = ""; -if (empty($conf->ticket->enabled)) { - accessforbidden('', 0, 0, 1); +if (!isModEnabled('ticket')) { + httponly_accessforbidden('Module Ticket not enabled'); } @@ -79,12 +81,14 @@ $arrayofcss = array('/ticket/css/styles.css.php'); llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '
    '; -print '

    '.(!empty($conf->global->TICKET_PUBLIC_TEXT_HOME) ? $conf->global->TICKET_PUBLIC_TEXT_HOME : ''.$langs->trans("TicketPublicDesc")).'

    '; + +print '

    '.(getDolGlobalString("TICKET_PUBLIC_TEXT_HOME", ''.$langs->trans("TicketPublicDesc")).'

    ').'

    '; print '
    '; + print ''; print '
    '; diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index e309e68c029..c929c2486bd 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -43,6 +43,7 @@ if (is_numeric($entity)) { define("DOLENTITY", $entity); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; @@ -61,6 +62,8 @@ $cancel = GETPOST('cancel', 'aZ09'); $track_id = GETPOST('track_id', 'alpha'); $email = strtolower(GETPOST('email', 'alpha')); +$suffix = ""; +$moreforfilter = ""; if (GETPOST('btn_view_ticket_list')) { unset($_SESSION['track_id_customer']); @@ -78,8 +81,8 @@ $object = new Ticket($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('ticketpubliclist', 'globalcard')); -if (empty($conf->ticket->enabled)) { - accessforbidden('', 0, 0, 1); +if (!isModEnabled('ticket')) { + httponly_accessforbidden('Module Ticket not enabled'); } @@ -227,7 +230,7 @@ if ($action == "view_ticketlist") { $filter = array(); $param = '&action=view_ticketlist'; - if (!empty($entity) && !empty($conf->multicompany->enabled)) { + if (!empty($entity) && isModEnabled('multicompany')) { $param .= '&entity='.$entity; } @@ -248,7 +251,7 @@ if ($action == "view_ticketlist") { 't.fk_user_create' => array('label' => $langs->trans("Author"), 'checked' => 1), 't.fk_user_assign' => array('label' => $langs->trans("AssignedTo"), 'checked' => 0), - //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), + //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(isModEnabled('multicompany') && empty($conf->multicompany->transverse_mode))), //'t.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500), //'t.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 2) //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), @@ -363,7 +366,7 @@ if ($action == "view_ticketlist") { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = t.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople sp ON ec.fk_socpeople = sp.rowid"; - if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { + if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."ticket_extrafields as ef on (t.rowid = ef.fk_object)"; } $sql .= " WHERE t.entity IN (".getEntity('ticket').")"; @@ -407,7 +410,7 @@ if ($action == "view_ticketlist") { print_barre_liste($langs->trans('TicketList'), $page, '/public/ticket/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket'); // Search bar - print ''."\n"; + print ''."\n"; print ''; print ''; print ''; @@ -694,7 +697,7 @@ if ($action == "view_ticketlist") { print '
    '; print ''; - print '
    '; - if ($origin == 'supplierorder' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { + if ($origin == 'supplierorder' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order"))) { print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"), 'order').' '.$objectsrc->ref; } - if ($origin == 'propal' && !empty($conf->propal->enabled)) { + if ($origin == 'propal' && isModEnabled("propal")) { print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"), 'propal').' '.$objectsrc->ref; } print '
    '; @@ -1039,10 +1038,10 @@ if ($action == 'create') { print ' / '.$langs->trans("Reset").')'; } print ''.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')'.$langs->trans("batch_number").''.$langs->trans("SellByDate").''; if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Type of product need stock change ? // Show warehouse combo list @@ -1217,7 +1216,7 @@ if ($action == 'create') { print '
    '; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { + if ($typeobject == 'commande' && $object->$typeobject->id && isModEnabled('commande')) { print ''; print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { print ''; print '\n"; print ''; } - if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && isModEnabled("propal")) { print ''; print ''; // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '
    '; print $langs->trans("RefOrder").''; @@ -1436,7 +1426,7 @@ if ($action == 'create') { print "
    '; print $langs->trans("RefProposal").''; @@ -1444,7 +1434,7 @@ if ($action == 'create') { print "
    '; print $langs->trans("SupplierOrder").''; @@ -1628,7 +1618,7 @@ if ($action == 'create') { print '
    '; print ''; @@ -1718,11 +1708,11 @@ if ($action == 'create') { } else { print ''; } - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print ''; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print ''; } } @@ -1738,7 +1728,7 @@ if ($action == 'create') { $var = false; - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $outputlangs = $langs; $newlang = ''; @@ -1813,7 +1803,7 @@ if ($action == 'create') { // Predefined product or service if ($lines[$i]->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($lines[$i]->fk_product); $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $lines[$i]->product->label; @@ -1825,10 +1815,10 @@ if ($action == 'create') { if (!array_key_exists($lines[$i]->fk_commandefourndet, $arrayofpurchaselinealreadyoutput)) { $text = $lines[$i]->product->getNomUrl(1); $text .= ' - '.$label; - $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($lines[$i]->product->description)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->product->description)); print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : 0, !empty($lines[$i]->date_end) ? $lines[$i]->date_end : 0); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($lines[$i]->product->description) && $lines[$i]->description != $lines[$i]->product->description) ? '
    '.dol_htmlentitiesbr($lines[$i]->description) : ''; } } @@ -1889,7 +1879,7 @@ if ($action == 'create') { print ' - '.$receptionline_var['qty']; $htmltext = $langs->trans("DateValidation").' : '.(empty($receptionline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($receptionline_var['date_valid'], 'dayhour')); - if (!empty($conf->stock->enabled) && $receptionline_var['warehouse'] > 0) { + if (isModEnabled('stock') && $receptionline_var['warehouse'] > 0) { $warehousestatic->fetch($receptionline_var['warehouse']); $htmltext .= '
    '.$langs->trans("From").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); } @@ -1904,7 +1894,7 @@ if ($action == 'create') { if ($action == 'editline' && $lines[$i]->id == $line_id) { // edit mode print '
    '; print $langs->trans('IncotermLabel'); @@ -1686,7 +1676,7 @@ if ($action == 'create') { } if ($action == 'editline') { $editColspan = 3; - if (empty($conf->stock->enabled)) { + if (!isModEnabled('stock')) { $editColspan--; } if (empty($conf->productbatch->enabled)) { @@ -1698,10 +1688,10 @@ if ($action == 'create') { } else { print $langs->trans("QtyReceived").' - '; } - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { print $langs->trans("WarehouseSource").' - '; } - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print $langs->trans("Batch"); } print ''.$langs->trans("QtyReceived").''.$langs->trans("WarehouseSource").''.$langs->trans("Batch").''; - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { if ($lines[$i]->fk_product > 0) { print ''; print ''; @@ -1944,7 +1934,7 @@ if ($action == 'create') { print ''; // Warehouse source - if (!empty($conf->stock->enabled)) { + if (isModEnabled('stock')) { if ($lines[$i]->fk_entrepot > 0) { $entrepot = new Entrepot($db); $entrepot->fetch($lines[$i]->fk_entrepot); @@ -1958,7 +1948,7 @@ if ($action == 'create') { } // Batch number managment - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { if (isset($lines[$i]->batch)) { print ''; print '
    '.$lines[$i]->qty.''; @@ -2102,9 +2092,9 @@ if ($action == 'create') { } // Create bill - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && ($object->statut == Reception::STATUS_VALIDATED || $object->statut == Reception::STATUS_CLOSED)) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) && ($object->statut == Reception::STATUS_VALIDATED || $object->statut == Reception::STATUS_CLOSED)) { if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { - // TODO show button only if (! empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) + // TODO show button only if (!empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) // If we do that, we must also make this option official. print ''.$langs->trans("CreateBill").''; } @@ -2116,7 +2106,7 @@ if ($action == 'create') { if ($user->rights->reception->creer && $object->statut > 0 && !$object->billed) { $label = "Close"; $paramaction = 'classifyclosed'; // = Transferred/Received // Label here should be "Close" or "ClassifyBilled" if we decided to make bill on receptions instead of orders - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? $label = "ClassifyBilled"; $paramaction = 'classifybilled'; } diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 303f5a9bf52..8ae9744a8dd 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -11,6 +11,7 @@ * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2016-2022 Ferran Marcet * Copyright (C) 2018 Quentin Vial-Gouteyron + * Copyright (C) 2022 Frédéric 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 @@ -35,10 +36,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT."/core/class/commonobjectline.class.php"; require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; -if (!empty($conf->propal->enabled)) { +if (isModEnabled("propal")) { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; } -if (!empty($conf->commande->enabled)) { +if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } @@ -50,6 +51,11 @@ class Reception extends CommonObject { use CommonIncoterm; + /** + * @var string code + */ + public $code = ""; + /** * @var string element name */ @@ -71,12 +77,6 @@ class Reception extends CommonObject public $socid; public $ref_supplier; - /** - * @var int Ref int - * @deprecated - */ - public $ref_int; - public $brouillon; public $entrepot_id; public $tracking_number; @@ -116,9 +116,16 @@ class Reception extends CommonObject public $meths; public $listmeths; // List of carriers + /** + * @var CommandeFournisseurDispatch[] + */ public $lines = array(); + // detail of lot and qty = array(id in llx_commande_fournisseur_dispatch, batch, qty) + // We can use this to know warehouse planned to be used for each lot. + public $detail_batch; + const STATUS_DRAFT = 0; const STATUS_VALIDATED = 1; const STATUS_CLOSED = 2; @@ -149,11 +156,11 @@ class Reception extends CommonObject $this->statuts[2] = 'StatusReceptionProcessed'; // List of short language codes for status - $this->statutshorts = array(); - $this->statutshorts[-1] = 'StatusReceptionCanceledShort'; - $this->statutshorts[0] = 'StatusReceptionDraftShort'; - $this->statutshorts[1] = 'StatusReceptionValidatedShort'; - $this->statutshorts[2] = 'StatusReceptionProcessedShort'; + $this->statuts_short = array(); + $this->statuts_short[-1] = 'StatusReceptionCanceledShort'; + $this->statuts_short[0] = 'StatusReceptionDraftShort'; + $this->statuts_short[1] = 'StatusReceptionValidatedShort'; + $this->statuts_short[2] = 'StatusReceptionProcessedShort'; } /** @@ -365,13 +372,10 @@ class Reception extends CommonObject * @param int $id Id of object to load * @param string $ref Ref of object * @param string $ref_ext External reference of object - * @param string $notused Internal reference of other object * @return int >0 if OK, 0 if not found, <0 if KO */ - public function fetch($id, $ref = '', $ref_ext = '', $notused = '') + public function fetch($id, $ref = '', $ref_ext = '') { - global $conf; - // Check parameters if (empty($id) && empty($ref) && empty($ref_ext)) { return -1; @@ -398,9 +402,6 @@ class Reception extends CommonObject if ($ref_ext) { $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; } - if ($notused) { - $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; - } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -558,7 +559,7 @@ class Reception extends CommonObject } // If stock increment is done on reception (recommanded choice) - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -836,7 +837,7 @@ class Reception extends CommonObject } $fk_product = 0; - if (!empty($conf->stock->enabled) && !empty($supplierorderline->fk_product)) { + if (isModEnabled('stock') && !empty($supplierorderline->fk_product)) { $fk_product = $supplierorderline->fk_product; if (!($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_RECEPTIONS)) { @@ -849,7 +850,7 @@ class Reception extends CommonObject // Check batch is set $product = new Product($this->db); $product->fetch($fk_product); - if (!empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { $langs->load("errors"); if (!empty($product->status_batch) && empty($batch)) { $this->error = $langs->trans('ErrorProductNeedBatchNumber', $product->ref); @@ -1181,7 +1182,7 @@ class Reception extends CommonObject // TODO Remove or keep this ? $line->fetch_product(); - $sql_commfourndet = 'SELECT qty, ref, label, description, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent'; + $sql_commfourndet = 'SELECT qty, ref, label, description, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent, total_ht, total_ttc, total_tva'; $sql_commfourndet .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet'; $sql_commfourndet .= ' WHERE rowid = '.((int) $line->fk_commandefourndet); $sql_commfourndet .= ' ORDER BY rang'; @@ -1199,6 +1200,9 @@ class Reception extends CommonObject $line->remise_percent = $obj->remise_percent; $line->label = !empty($obj->label) ? $obj->label : $line->product->label; $line->ref_supplier = $obj->ref; + $line->total_ht = $obj->total_ht; + $line->total_ttc = $obj->total_ttc; + $line->total_tva = $obj->total_tva; } else { $line->qty_asked = 0; $line->description = ''; @@ -1213,6 +1217,14 @@ class Reception extends CommonObject $this->total_ttc += $pu_ht + $tva; + if (isModEnabled('productbatch') && !empty($line->batch)) { + $detail_batch = new stdClass(); + $detail_batch->eatby = $line->eatby; + $detail_batch->sellby = $line->sellby; + $detail_batch->batch = $line->batch; + $detail_batch->qty = $line->qty; + $line->detail_batch[] = $detail_batch; + } $this->lines[] = $line; } @@ -1306,7 +1318,7 @@ class Reception extends CommonObject global $langs; $labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]); - $labelStatusShort = $langs->transnoentitiesnoconv($this->statutshorts[$status]); + $labelStatusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]); $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) { @@ -1563,7 +1575,7 @@ class Reception extends CommonObject // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -1650,23 +1662,8 @@ class Reception extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on) - * - * @deprecated - * @see setBilled() - * @return int <0 if ko, >0 if ok - */ - public function set_billed() - { - // phpcs:enable - dol_syslog(get_class($this)."::set_billed is deprecated, use setBilled instead", LOG_NOTICE); - return $this->setBilled(); - } - - /** - * Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on) + * Classify the reception as invoiced (used when WORKFLOW_EXPEDITION_CLASSIFY_CLOSED_INVOICE is on) * * @return int <0 if ko, >0 if ok */ @@ -1728,7 +1725,7 @@ class Reception extends CommonObject $this->billed = 0; // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $numref = $this->ref; $langs->load("agenda"); @@ -1860,7 +1857,7 @@ class Reception extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); if ($this->db->query($sql)) { // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { + if (!$error && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index a27f458d01a..7a8562b706d 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -69,7 +69,7 @@ class ReceptionStats extends Stats $this->where .= " c.fk_statut > 0"; // Not draft and not cancelled //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; - $this->where .= " AND c.entity = ".$conf->entity; + $this->where .= " AND c.entity IN (".getEntity('reception').")"; if (empty($user->rights->societe->client->voir) && !$this->socid) { $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } @@ -128,6 +128,54 @@ class ReceptionStats extends Stats return $this->_getNbByYear($sql); } + /** + * Return the orders amount by month for a year + * + * @param int $year Year to scan + * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month + * @return array Array with amount by month + */ + public function getAmountByMonth($year, $format = 0) + { + global $user; + + $sql = "SELECT date_format(c.date_valid,'%m') as dm, SUM(c.".$this->field.")"; + $sql .= " FROM ".$this->from; + if (empty($user->rights->societe->client->voir) && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } + $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); + + $res = $this->_getAmountByMonth($year, $sql, $format); + return $res; + } + + /** + * Return the orders amount average by month for a year + * + * @param int $year year for stats + * @return array array with number by month + */ + public function getAverageByMonth($year) + { + global $user; + + $sql = "SELECT date_format(c.date_valid,'%m') as dm, AVG(c.".$this->field.")"; + $sql .= " FROM ".$this->from; + if (empty($user->rights->societe->client->voir) && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } + $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); + + return $this->_getAverageByMonth($year, $sql); + } + /** * Return nb, total and average * diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 4e04bdd2926..a03460b1e49 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -23,6 +23,7 @@ * \brief Onglet de gestion des contacts de reception */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; @@ -34,6 +35,8 @@ if (!empty($conf->project->enabled)) { 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.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; $langs->loadLangs(array("orders", "receptions", "companies")); @@ -54,7 +57,7 @@ if ($id > 0 || !empty($ref)) { } // Linked documents - if ($origin == 'order_supplier' && $object->$typeobject->id && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled))) { + if ($origin == 'order_supplier' && $object->$typeobject->id && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order"))) { $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } @@ -74,6 +77,20 @@ if ($origin == 'reception') { } } +if (isModEnabled("reception")) { + $permissiontoread = $user->rights->reception->lire; + $permissiontoadd = $user->rights->reception->creer; + $permissiondellink = $user->rights->reception->creer; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))); + $permissiontodelete = $user->rights->reception->supprimer; +} else { + $permissiontoread = $user->rights->fournisseur->commande->receptionner; + $permissiontoadd = $user->rights->fournisseur->commande->receptionner; + $permissiondellink = $user->rights->fournisseur->commande->receptionner; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande_advance->check))); + $permissiontodelete = $user->rights->fournisseur->commande->receptionner; +} + /* * Actions @@ -145,39 +162,25 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $form->editfieldkey("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; + $morehtmlref .= '
    '; if (0) { // Do not change on reception - 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); + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify' && $permissiontoadd) { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on reception, so we will use the project or source object instead - // TODO Add project on reception - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -190,9 +193,9 @@ if ($id > 0 || !empty($ref)) { //print '
    '; print '
    '; - print ''; + print '
    '; // Linked documents - if ($origin == 'order_supplier' && $object->$typeobject->id && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled))) { + if ($origin == 'order_supplier' && $object->$typeobject->id && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order"))) { print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { + if ($typeobject == 'propal' && $object->$typeobject->id && isModEnabled("propal")) { print ''; print ''; @@ -852,7 +948,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { + if (isModEnabled('stripe') && !empty($conf->stripeconnect->enabled) && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $stripesupplieracc = $stripe->getStripeAccount($service, $object->id); // Get Stripe OAuth connect account (no network access here) // Stripe customer key 'cu_....' stored into llx_societe_account @@ -860,7 +956,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $form->editfieldkey("StripeConnectAccount", 'key_account_supplier', $stripesupplieracc, $object, $permissiontoaddupdatepaymentinformation, 'string', '', 0, 2, 'socid'); print '
    '; $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); @@ -202,7 +205,7 @@ if ($id > 0 || !empty($ref)) { print "
    '; $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); diff --git a/htdocs/reception/document.php b/htdocs/reception/document.php index c349a25fd8b..980b5e50a33 100644 --- a/htdocs/reception/document.php +++ b/htdocs/reception/document.php @@ -26,6 +26,7 @@ * \brief Management page of documents attached to an reception */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -36,6 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; if (!empty($conf->project->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'other')); @@ -64,19 +67,48 @@ if (!$sortfield) { } $object = new Reception($db); - -if ($object->fetch($id, $ref)) { +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); $object->fetch_thirdparty(); + + if (!empty($object->origin)) { + $origin = $object->origin; + + $object->fetch_origin(); + $typeobject = $object->origin; + } + + // Linked documents + if ($origin == 'order_supplier' && $object->$typeobject->id && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order"))) { + $objectsrc = new CommandeFournisseur($db); + $objectsrc->fetch($object->$typeobject->id); + } + $upload_dir = $conf->reception->dir_output."/".dol_sanitizeFileName($object->ref); } +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('receptiondocument')); + // Security check -if ($user->socid) { +if ($user->socid > 0) { $socid = $user->socid; } $result = restrictedArea($user, 'reception', $object->id, ''); -$permissiontoadd = $user->rights->reception->creer; // Used by the include of actions_dellink.inc.php +if (isModEnabled("reception")) { + $permissiontoread = $user->rights->reception->lire; + $permissiontoadd = $user->rights->reception->creer; + $permissiondellink = $user->rights->reception->creer; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))); + $permissiontodelete = $user->rights->reception->supprimer; +} else { + $permissiontoread = $user->rights->fournisseur->commande->receptionner; + $permissiontoadd = $user->rights->fournisseur->commande->receptionner; + $permissiondellink = $user->rights->fournisseur->commande->receptionner; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande_advance->check))); + $permissiontodelete = $user->rights->fournisseur->commande->receptionner; +} /* @@ -116,41 +148,30 @@ if ($id > 0 || !empty($ref)) { $morehtmlref = '
    '; + // Ref customer reception + $morehtmlref .= $form->editfieldkey("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if (0) { // Do not change on shipment - 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); + $morehtmlref .= '
    '; + if (0) { // Do not change on reception + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify' && $permissiontoadd) { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on shipment, so we will use the project or source object instead - // TODO Add project on shipment - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index ed5f3a715d2..62eb42924c1 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -25,6 +25,7 @@ * \brief Home page of reception area. */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 5cdbb201d87..d6e39e64eeb 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -24,6 +24,7 @@ * \brief Page to list all receptions */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; @@ -51,6 +52,22 @@ $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); +$search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int'); +$search_date_delivery_startmonth = GETPOST('search_date_delivery_startmonth', 'int'); +$search_date_delivery_startyear = GETPOST('search_date_delivery_startyear', 'int'); +$search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int'); +$search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int'); +$search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int'); +$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver +$search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); +$search_date_create_startday = GETPOST('search_date_create_startday', 'int'); +$search_date_create_startmonth = GETPOST('search_date_create_startmonth', 'int'); +$search_date_create_startyear = GETPOST('search_date_create_startyear', 'int'); +$search_date_create_endday = GETPOST('search_date_create_endday', 'int'); +$search_date_create_endmonth = GETPOST('search_date_create_endmonth', 'int'); +$search_date_create_endyear = GETPOST('search_date_create_endyear', 'int'); +$search_date_create_start = dol_mktime(0, 0, 0, $search_date_create_startmonth, $search_date_create_startday, $search_date_create_startyear); // Use tzserver +$search_date_create_end = dol_mktime(23, 59, 59, $search_date_create_endmonth, $search_date_create_endday, $search_date_create_endyear); $search_billed = GETPOST("search_billed", 'int'); $sall = GETPOST('sall', 'alphanohtml'); $optioncss = GETPOST('optioncss', 'alpha'); @@ -160,6 +177,22 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_state = ""; $search_country = ''; $search_type_thirdparty = ''; + $search_date_delivery_startday = ''; + $search_date_delivery_startmonth = ''; + $search_date_delivery_startyear = ''; + $search_date_delivery_endday = ''; + $search_date_delivery_endmonth = ''; + $search_date_delivery_endyear = ''; + $search_date_delivery_start = ''; + $search_date_delivery_end = ''; + $search_date_create_startday = ''; + $search_date_create_startmonth = ''; + $search_date_create_startyear = ''; + $search_date_create_endday = ''; + $search_date_create_endmonth = ''; + $search_date_create_endyear = ''; + $search_date_create_start = ''; + $search_date_create_end = ''; $search_billed = ''; $search_status = ''; $search_array_options = array(); @@ -498,6 +531,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; @@ -544,6 +580,18 @@ if ($search_country) { if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; } +if ($search_date_delivery_start) { + $sql .= " AND e.date_delivery >= '".$db->idate($search_date_delivery_start)."'"; +} +if ($search_date_delivery_end) { + $sql .= " AND e.date_delivery <= '".$db->idate($search_date_delivery_end)."'"; +} +if ($search_date_create_start) { + $sql .= " AND e.date_creation >= '".$db->idate($search_date_create_start)."'"; +} +if ($search_date_create_end) { + $sql .= " AND e.date_creation <= '".$db->idate($search_date_create_end)."'"; +} if ($search_ref_rcp) { $sql .= natural_search('e.ref', $search_ref_rcp); } @@ -569,12 +617,29 @@ $sql .= $hookmanager->resPrint; $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } 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; + } + $db->free($resql); } +// Complete request and execute it with limit $sql .= $db->order($sortfield, $sortorder); -$sql .= $db->plimit($limit + 1, $offset); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); +} //print $sql; $resql = $db->query($sql); @@ -632,6 +697,42 @@ if ($search_country) { if ($search_type_thirdparty) { $param .= "&search_type_thirdparty=".urlencode($search_type_thirdparty); } +if ($search_date_delivery_startday) { + $param .= '&search_date_delivery_startday='.urlencode($search_date_delivery_startday); +} +if ($search_date_delivery_startmonth) { + $param .= '&search_date_delivery_startmonth='.urlencode($search_date_delivery_startmonth); +} +if ($search_date_delivery_startyear) { + $param .= '&search_date_delivery_startyear='.urlencode($search_date_delivery_startyear); +} +if ($search_date_delivery_endday) { + $param .= '&search_date_delivery_endday='.urlencode($search_date_delivery_endday); +} +if ($search_date_delivery_endmonth) { + $param .= '&search_date_delivery_endmonth='.urlencode($search_date_delivery_endmonth); +} +if ($search_date_delivery_endyear) { + $param .= '&search_date_delivery_endyear='.urlencode($search_date_delivery_endyear); +} +if ($search_date_create_startday) { + $param .= '&search_date_create_startday='.urlencode($search_date_create_startday); +} +if ($search_date_create_startmonth) { + $param .= '&search_date_create_startmonth='.urlencode($search_date_create_startmonth); +} +if ($search_date_create_startyear) { + $param .= '&search_date_create_startyear='.urlencode($search_date_create_startyear); +} +if ($search_date_create_endday) { + $param .= '&search_date_create_endday='.urlencode($search_date_create_endday); +} +if ($search_date_create_endmonth) { + $param .= '&search_date_create_endmonth='.urlencode($search_date_create_endmonth); +} +if ($search_date_create_endyear) { + $param .= '&search_date_create_endyear='.urlencode($search_date_create_endyear); +} if ($search_ref_supplier) { $param .= "&search_ref_supplier=".urlencode($search_ref_supplier); } @@ -715,7 +816,7 @@ if ($massaction == 'createbills') { print $langs->trans('ValidateInvoices'); print '
    '; - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { + if (isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { print $form->selectyesno('validate_invoices', 0, 1, 1); print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')'; } else { @@ -751,7 +852,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); @@ -761,6 +862,13 @@ print ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} // Ref if (!empty($arrayfields['e.ref']['checked'])) { print ''; + print ''; } if (!empty($arrayfields['l.ref']['checked'])) { // Delivery ref print ''; } // Date modification @@ -839,7 +960,7 @@ if (!empty($arrayfields['e.tms']['checked'])) { // Status if (!empty($arrayfields['e.fk_statut']['checked'])) { print ''; } // Status billed @@ -849,13 +970,18 @@ if (!empty($arrayfields['e.billed']['checked'])) { print ''; } // Action column -print ''; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; +} print "\n"; print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} if (!empty($arrayfields['e.ref']['checked'])) { print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); } @@ -907,7 +1033,9 @@ if (!empty($arrayfields['e.fk_statut']['checked'])) { if (!empty($arrayfields['e.billed']['checked'])) { print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); } -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +} print "\n"; $i = 0; @@ -926,6 +1054,19 @@ while ($i < min($num, $limit)) { print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + } // Ref if (!empty($arrayfields['e.ref']['checked'])) { print ''; if (!$i) { $totalarray['nbfield']++; @@ -1085,16 +1228,18 @@ while ($i < min($num, $limit)) { } // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 46e10002d76..d916099b872 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -24,14 +24,16 @@ * \brief Note card reception */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; -dol_include_once('/fourn/class/fournisseur.commande.class.php'); if (!empty($conf->project->enabled)) { 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.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; $langs->loadLangs(array("receptions", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal')); @@ -45,32 +47,41 @@ if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); if (!empty($object->origin)) { - $typeobject = $object->origin; $origin = $object->origin; + $object->fetch_origin(); + $typeobject = $object->origin; } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { - $objectsrc = new Commande($db); - $objectsrc->fetch($object->$typeobject->id); - } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { - $objectsrc = new Propal($db); + if ($origin == 'order_supplier' && $object->$typeobject->id && (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || isModEnabled("supplier_order"))) { + $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } } -$permissionnote = $user->rights->reception->creer; // Used by the include of actions_setnotes.inc.php +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('receptionnote')); // Security check if ($user->socid > 0) { $socid = $user->socid; } - -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('receptionnote')); +if (isModEnabled("reception")) { + $permissiontoread = $user->rights->reception->lire; + $permissiontoadd = $user->rights->reception->creer; + $permissiondellink = $user->rights->reception->creer; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))); + $permissiontodelete = $user->rights->reception->supprimer; +} else { + $permissiontoread = $user->rights->fournisseur->commande->receptionner; + $permissiontoadd = $user->rights->fournisseur->commande->receptionner; + $permissiondellink = $user->rights->fournisseur->commande->receptionner; // Used by the include of actions_dellink.inc.php + $permissiontovalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande_advance->check))); + $permissiontodelete = $user->rights->fournisseur->commande->receptionner; +} +$permissionnote = $user->rights->reception->creer; // Used by the include of actions_setnotes.inc.php if ($origin == 'reception') { $result = restrictedArea($user, $origin, $object->id); @@ -105,7 +116,7 @@ if (empty($reshook)) { * View */ -llxHeader('', 'Reception'); +llxHeader('', $langs->trans('Reception')); $form = new Form($db); @@ -122,39 +133,25 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= $form->editfieldkey("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("RefSupplier", '', $object->ref_supplier, $object, $user->rights->reception->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; + $morehtmlref .= '
    '; if (0) { // Do not change on reception - 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); + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify' && $permissiontoadd) { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - // We don't have project on reception, so we will use the project or source object instead - // TODO Add project on reception - $morehtmlref .= ' : '; - if (!empty($objectsrc->fk_project)) { + if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { $proj = new Project($db); $proj->fetch($objectsrc->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php index 638b7b0dbfc..df11e2a9cd5 100644 --- a/htdocs/reception/stats/index.php +++ b/htdocs/reception/stats/index.php @@ -24,6 +24,7 @@ * \brief Page with reception statistics */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/receptionstats.class.php'; @@ -35,12 +36,12 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; -$langs->loadLangs(array("reception", "other", "companies")); +$langs->loadLangs(array("receptions", "other", "companies")); // Security check if ($user->socid) { diff --git a/htdocs/reception/stats/month.php b/htdocs/reception/stats/month.php index 806006394df..0b371ecd1f5 100644 --- a/htdocs/reception/stats/month.php +++ b/htdocs/reception/stats/month.php @@ -22,12 +22,15 @@ * \brief Page des stats receptions par mois */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/receptionstats.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $year = GETPOST("year", 'int'); +$socid = GETPOST("socid", 'int'); +$userid = GETPOST("userid", 'int'); // Security check if ($user->socid) { @@ -48,9 +51,8 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mesg = ''; print load_fiche_titre($langs->trans("StatisticsOfReceptions").' '.GETPOST("year", 'int'), $mesg); - -$stats = new ReceptionStats($db); -$data = $stats->getNbReceptionByMonth(GETPOST("year", 'int')); +$stats = new ReceptionStats($db, $socid, '', ($userid > 0 ? $userid : 0)); +$data = $stats->getNbByMonth($year); dol_mkdir($conf->reception->dir_temp); diff --git a/htdocs/recruitment/admin/candidature_extrafields.php b/htdocs/recruitment/admin/candidature_extrafields.php index 73a8398fd80..24cc74b6892 100644 --- a/htdocs/recruitment/admin/candidature_extrafields.php +++ b/htdocs/recruitment/admin/candidature_extrafields.php @@ -21,6 +21,7 @@ * \brief Page to setup extra fields of Candidature */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -78,14 +79,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php index 95918bdd1c1..02e4eb2566d 100644 --- a/htdocs/recruitment/admin/jobposition_extrafields.php +++ b/htdocs/recruitment/admin/jobposition_extrafields.php @@ -21,6 +21,7 @@ * \brief Page to setup extra fields of Candidature */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -78,14 +79,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - - /* * Creation of an optional field */ diff --git a/htdocs/recruitment/admin/public_interface.php b/htdocs/recruitment/admin/public_interface.php index 7212a687442..a9cbf698a10 100644 --- a/htdocs/recruitment/admin/public_interface.php +++ b/htdocs/recruitment/admin/public_interface.php @@ -24,6 +24,7 @@ * \brief File of main public page for open job position */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php'; @@ -144,7 +145,7 @@ if (!empty($conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE)) { print '
    '; //print $langs->trans('FollowingLinksArePublic').'
    '; print img_picto('', 'globe').' '.$langs->trans('BlankSubscriptionForm').'
    '; - if (!empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $entity_qr = '?entity='.$conf->entity; } else { $entity_qr = ''; diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php index c2cd40f6b6d..517bbca5c19 100644 --- a/htdocs/recruitment/admin/setup.php +++ b/htdocs/recruitment/admin/setup.php @@ -93,11 +93,11 @@ if ((float) DOL_VERSION >= 6) { } if ($action == 'updateMask') { - $maskconstorder = GETPOST('maskconstorder', 'alpha'); - $maskorder = GETPOST('maskorder', 'alpha'); + $maskconstjob = GETPOST('maskconstjob', 'alpha'); + $maskjob = GETPOST('maskjob', 'alpha'); - if ($maskconstorder) { - $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconstjob) { + $res = dolibarr_set_const($db, $maskconstjob, $maskjob, 'chaine', 0, '', $conf->entity); } if (!($res > 0)) { diff --git a/htdocs/recruitment/admin/setup_candidatures.php b/htdocs/recruitment/admin/setup_candidatures.php index 1ab24288401..adc12a656f4 100644 --- a/htdocs/recruitment/admin/setup_candidatures.php +++ b/htdocs/recruitment/admin/setup_candidatures.php @@ -93,11 +93,11 @@ if ((float) DOL_VERSION >= 6) { } if ($action == 'updateMask') { - $maskconstorder = GETPOST('maskconstorder', 'alpha'); - $maskorder = GETPOST('maskorder', 'alpha'); + $maskconstcand = GETPOST('maskconstcand', 'alpha'); + $maskcand = GETPOST('maskcand', 'alpha'); - if ($maskconstorder) { - $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconstcand) { + $res = dolibarr_set_const($db, $maskconstcand, $maskcand, 'chaine', 0, '', $conf->entity); } if (!($res > 0)) { diff --git a/htdocs/recruitment/class/api_recruitment.class.php b/htdocs/recruitment/class/api_recruitment.class.php index af2c87dcdb3..cf4fa7a143e 100644 --- a/htdocs/recruitment/class/api_recruitment.class.php +++ b/htdocs/recruitment/class/api_recruitment.class.php @@ -441,7 +441,7 @@ class Recruitment extends DolibarrApi // $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml'); if ($this->jobposition->update(DolibarrApiAccess::$user, false) > 0) { - return $this->get($id); + return $this->getJobPosition($id); } else { throw new RestException(500, $this->jobposition->error); } @@ -484,7 +484,7 @@ class Recruitment extends DolibarrApi // $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml'); if ($this->candidature->update(DolibarrApiAccess::$user, false) > 0) { - return $this->get($id); + return $this->getCandidature($id); } else { throw new RestException(500, $this->candidature->error); } diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 4a4197228b1..2ece5dbe217 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -50,7 +50,7 @@ class RecruitmentCandidature extends CommonObject * @var int Does this object support multicompany module ? * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table */ - public $ismultientitymanaged = 0; + public $ismultientitymanaged = 1; /** * @var int Does object support extrafields ? 0=No, 1=Yes @@ -111,22 +111,23 @@ class RecruitmentCandidature extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of candidature", 'csslist'=>'nowraponall'), - 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth125 tdoverflowmax200'), + 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth100 nowraponall'), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), - 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), - 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2, 'csslist'=>'tdoverflowmax100'), 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), - 'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax200'), + 'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax150'), 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), + 'email_date' => array('type'=>'datetime', 'label'=>'EmailDate', 'visible'=>-2, 'enabled'=>1, 'position'=>541), //'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1), 'remuneration_requested' => array('type'=>'integer', 'label'=>'RequestedRemuneration', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,), 'remuneration_proposed' => array('type'=>'integer', 'label'=>'ProposedRemuneration', 'enabled'=>'1', 'position'=>81, 'notnull'=>0, 'visible'=>-1,), 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'), - 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>1, 'csslist'=>'nowraponall'), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-4, 'csslist'=>'nowraponall'), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), @@ -149,6 +150,7 @@ class RecruitmentCandidature extends CommonObject public $phone; public $date_birth; public $email_msgid; + public $email_date; public $remuneration_requested; public $remuneration_proposed; public $fk_recruitment_origin; @@ -172,7 +174,7 @@ class RecruitmentCandidature extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -494,8 +496,8 @@ class RecruitmentCandidature extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitmentcandidature->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitmentcandidature->recruitmentcandidature_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitmentcandidature->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitmentcandidature->recruitmentcandidature_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -612,8 +614,8 @@ class RecruitmentCandidature extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -636,8 +638,8 @@ class RecruitmentCandidature extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -660,8 +662,8 @@ class RecruitmentCandidature extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -823,6 +825,12 @@ class RecruitmentCandidature extends CommonObject $statusType = 'status'.$status; //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; if ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } + if ($status == self::STATUS_CONTRACT_PROPOSED) { + $statusType = 'status4'; + } + if ($status == self::STATUS_CONTRACT_SIGNED) { $statusType = 'status6'; } if ($status == self::STATUS_REFUSED) { diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 97ec05d6985..7a9d077f910 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2020 Laurent Destailleur +/* Copyright (C) 2022 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 @@ -62,10 +63,24 @@ class RecruitmentJobPosition extends CommonObject */ public $picto = 'recruitmentjobposition'; - + /** + * Draft status + */ const STATUS_DRAFT = 0; + + /** + * Validated + */ const STATUS_VALIDATED = 1; + + /** + * Recruited + */ const STATUS_RECRUITED = 3; + + /** + * Canceled + */ const STATUS_CANCELED = 9; @@ -105,9 +120,9 @@ class RecruitmentJobPosition extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'2', 'autofocusoncreate'=>1), 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp'), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500', 'picto'=>'project'), - 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'), + 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php:status=1', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'), 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail', 'picto'=>'email'), - 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'), + 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php:t.statut = 1', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'), 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'$conf->societe->enabled', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'css'=>'maxwidth500', 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner", 'picto'=>'company'), 'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,), @@ -182,7 +197,7 @@ class RecruitmentJobPosition extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -254,7 +269,7 @@ class RecruitmentJobPosition extends CommonObject // Reset some properties unset($object->id); unset($object->fk_user_creat); - unset($object->import_key); + $object->import_key = null; // Clear fields if (property_exists($object, 'ref')) { @@ -498,8 +513,8 @@ class RecruitmentJobPosition extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitmentjobposition->create)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitmentjobposition->recruitmentjobposition_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitmentjobposition->create)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitmentjobposition->recruitmentjobposition_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -616,8 +631,8 @@ class RecruitmentJobPosition extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -640,8 +655,8 @@ class RecruitmentJobPosition extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -651,7 +666,7 @@ class RecruitmentJobPosition extends CommonObject } /** - * Close the commercial proposal + * Close the recruitment * * @param User $user Object user that close * @param int $status Statut @@ -683,18 +698,12 @@ class RecruitmentJobPosition extends CommonObject if ($status == self::STATUS_RECRUITED) { $triggerName = 'RECRUITMENTJOB_CLOSE_RECRUITED'; $modelpdf = $this->model_pdf; - - if ($result < 0) { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -2; - } } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -757,8 +766,8 @@ class RecruitmentJobPosition extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->recruitment->recruitment_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->recruitment->recruitment_advance->validate)))) { $this->error='Permission denied'; return -1; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php index 8d187807700..cfbf91463e8 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2021 Philippe Grand - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric 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 @@ -22,12 +22,13 @@ */ /** - * \file htdocs/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php + * \file htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php * \ingroup recruitment * \brief File of class to build ODT documents for recruitmentjobpositions */ -dol_include_once('/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -48,9 +49,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * @var string Dolibarr version of the loaded document @@ -234,11 +235,11 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->commande->dir_output) { + if ($conf->recruitment->dir_output) { // If $object is id instead of object if (!is_object($object)) { $id = $object; - $object = new Commande($this->db); + $object = new RecruitmentJobPosition($this->db); $result = $object->fetch($id); if ($result < 0) { dol_print_error($this->db, $object->error); @@ -246,7 +247,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi } } - $dir = $conf->commande->multidir_output[isset($object->entity) ? $object->entity : 1]; + $dir = $conf->recruitment->multidir_output[isset($object->entity) ? $object->entity : 1].'/recruitmentjobposition/'; $objectref = dol_sanitizeFileName($object->ref); if (!preg_match('/specimen/i', $objectref)) { $dir .= "/".$objectref; @@ -286,7 +287,11 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi //print "conf->societe->dir_temp=".$conf->societe->dir_temp; dol_mkdir($conf->recruitment->dir_temp); - + if (!is_writable($conf->recruitment->dir_temp)) { + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->recruitment->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); + return -1; + } // If CUSTOMER contact defined on order, we use it $usecontact = false; @@ -339,7 +344,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $odfHandler = new odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->commande->dir_temp, + 'PATH_TO_TMP' => $conf->recruitment->dir_temp, 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 2e85bfab121..94e93c87baa 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -70,9 +70,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.6 = array(5, 6) + * e.g.: PHP ≥ 7.0 = array(7, 0) */ - public $phpmin = array(5, 6); + public $phpmin = array(7, 0); /** * Dolibarr version of the loaded document @@ -121,10 +121,10 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $this->page_largeur = $formatarray['width']; $this->page_hauteur = $formatarray['height']; $this->format = array($this->page_largeur, $this->page_hauteur); - $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10; - $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10; - $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; - $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; + $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10); + $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10); + $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10); + $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10); $this->option_logo = 1; // Display logo $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION @@ -217,7 +217,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -234,7 +234,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if (!getDolGlobalInt('CAT_HIGH_QUALITY_IMAGES')) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo { if ($obj['photo_vignette']) { @@ -327,7 +327,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$object->label." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php new file mode 100644 index 00000000000..9635eba3e58 --- /dev/null +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -0,0 +1,143 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2019 Frédéric France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/recruitment/mod_recruitmentcandidaturen_advanced.php + * \ingroup recruitment + * \brief File containing class for advanced numbering model of RecruitmentCandidature + */ + +dol_include_once('/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php'); + + +/** + * Class to manage the Advanced numbering rule for Job application + */ +class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandidature +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; + $texte .= '
    '; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; @@ -807,12 +915,19 @@ if (!empty($arrayfields['typent.code']['checked'])) { } // Date delivery planned if (!empty($arrayfields['e.date_delivery']['checked'])) { - print ' '; + print '
    '; + print $form->selectDate($search_date_delivery_start ? $search_date_delivery_start : -1, 'search_date_delivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_date_delivery_end ? $search_date_delivery_end : -1, 'search_date_delivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + print '
    '; - print ''; } if (!empty($arrayfields['l.date_delivery']['checked'])) { @@ -828,7 +943,13 @@ $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // N print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['e.datec']['checked'])) { - print ''; + print ''; + print '
    '; + print $form->selectDate($search_date_create_start ? $search_date_create_start : -1, 'search_date_create_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_date_create_end ? $search_date_create_end : -1, 'search_date_create_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; print '
    '; - print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1); + print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status onrightofpage'); print ''; -$searchpicto = $form->showFilterAndCheckAddButtons(0); -print $searchpicto; -print ''; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + 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 ''; @@ -998,10 +1139,12 @@ while ($i < min($num, $limit)) { // Type ent if (!empty($arrayfields['typent.code']['checked'])) { print ''; - if (count($typenArray) == 0) { + if (!isset($typenArray) || empty($typenArray)) { $typenArray = $formcompany->typent_array(1); } - print $typenArray[$obj->typent_code]; + if (isset($typenArray[$obj->typent_code])) { + print $typenArray[$obj->typent_code]; + } 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; + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + 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 ''; + print '
    '; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("RecruitmentCandidature"), $langs->transnoentities("RecruitmentCandidature")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("RecruitmentCandidature"), $langs->transnoentities("RecruitmentCandidature")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte .= ''; + $texte .= ''; + + $texte .= ''; + + $texte .= ''; + + $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; + $texte .= ''; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $langs, $mysoc; + + $old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc); + $mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type; + + if (!$numExample) { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($object) + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADVANCED_MASK'); + + if (!$mask) { + $this->error = 'NotConfigured'; + return 0; + } + + $date = $object->date; + + $numFinal = get_next_value($db, $mask, 'recruitment_recruitmentcandidature', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php index ce96d1cd67b..4221915eb29 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php @@ -26,7 +26,7 @@ dol_include_once('/recruitment/core/modules/recruitment/modules_recruitmentcandi /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Job application */ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandidature { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index e4a07c63633..4f781a18214 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -30,7 +30,7 @@ dol_include_once('/recruitment/core/modules/recruitment/modules_recruitmentjobpo /** - * Class to manage customer Bom numbering rules advanced + * Class to manage the Advanced numbering rule for Job position */ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosition { @@ -68,7 +68,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi $texte .= '
    '; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition")); @@ -79,7 +79,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -98,20 +98,15 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi */ public function getExample() { - global $conf, $db, $langs, $mysoc; + global $conf, $langs, $mysoc; - $object = new RecruitmentJobPosition($db); - $object->initAsSpecimen(); - - /*$old_code_client = $mysoc->code_client; + $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; - $mysoc->typent_code = 'TTTTTTTTTT';*/ - - $numExample = $this->getNextValue($object); - - /*$mysoc->code_client = $old_code_client; - $mysoc->typent_code = $old_code_type;*/ + $mysoc->typent_code = 'TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc); + $mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type; if (!$numExample) { $numExample = $langs->trans('NotConfigured'); diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php index b2b413ee508..260ee510c5b 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php @@ -26,7 +26,7 @@ dol_include_once('/recruitment/core/modules/recruitment/modules_recruitmentjobpo /** - * Class to manage customer order numbering rules standard + * Class to manage the Standard numbering rule for Job positions */ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosition { diff --git a/htdocs/recruitment/recruitmentindex.php b/htdocs/recruitment/index.php similarity index 96% rename from htdocs/recruitment/recruitmentindex.php rename to htdocs/recruitment/index.php index 83101d6f31e..03b2a9e6431 100644 --- a/htdocs/recruitment/recruitmentindex.php +++ b/htdocs/recruitment/index.php @@ -19,11 +19,12 @@ */ /** - * \file recruitment/recruitmentindex.php + * \file recruitment/index.php * \ingroup recruitment * \brief Home page of recruitment top menu */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; @@ -34,22 +35,19 @@ $langs->loadLangs(array("recruitment", "boxes")); $action = GETPOST('action', 'aZ09'); +$max = 5; +$now = dol_now(); -// Security check -//if (! $user->rights->recruitment->myobject->read) accessforbidden(); $socid = GETPOST('socid', 'int'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } -$max = 5; -$now = dol_now(); - // Security check (enable the most restrictive one) //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -// if (! $user->hasRights('mymodule', 'myobject', 'read')) { +// if (! $user->hasRight('mymodule', 'myobject', 'read')) { // accessforbidden(); // } restrictedArea($user, 'recruitment', 0, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid'); @@ -250,7 +248,7 @@ print '
    '; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (! empty($conf->recruitment->enabled) && $user->rights->recruitment->read) +if (isModEnabled('recruitment') && $user->rights->recruitment->read) { $langs->load("orders"); @@ -335,7 +333,7 @@ $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) { +if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status, COUNT(rc.rowid) as nbapplications"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = s.rowid"; @@ -406,7 +404,7 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme } // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) { +if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) { $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s ON rc.fk_recruitmentjobposition = s.rowid"; diff --git a/htdocs/recruitment/lib/recruitment.lib.php b/htdocs/recruitment/lib/recruitment.lib.php index cb1f0b7e2bc..6fa58cc64f5 100644 --- a/htdocs/recruitment/lib/recruitment.lib.php +++ b/htdocs/recruitment/lib/recruitment.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2022 Frédéric 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,7 +29,11 @@ */ function recruitmentAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('recruitment_recruitmentjobposition'); + $extrafields->fetch_name_optionals_label('recruitment_recruitmentcandidature'); $langs->load("recruitment"); @@ -52,11 +57,19 @@ function recruitmentAdminPrepareHead() $head[$h][0] = dol_buildpath("/recruitment/admin/jobposition_extrafields.php", 1); $head[$h][1] = $langs->trans("ExtrafieldsJobPosition"); + $nbExtrafields = $extrafields->attributes['recruitment_recruitmentjobposition']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'jobposition_extrafields'; $h++; $head[$h][0] = dol_buildpath("/recruitment/admin/candidature_extrafields.php", 1); $head[$h][1] = $langs->trans("ExtrafieldsApplication"); + $nbExtrafields = $extrafields->attributes['recruitment_recruitmentcandidature']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'candidature_extrafields'; $h++; @@ -70,5 +83,7 @@ function recruitmentAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'recruitment'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'recruitment', 'remove'); + return $head; } diff --git a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php index 759e627bf59..c4ad141bca6 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php @@ -41,12 +41,12 @@ function recruitmentCandidaturePrepareHead($object) $head[$h][2] = 'card'; $h++; - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - $head[$h][0] = dol_buildpath("/recruitment/recruitmentrating_card.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Rating"); - $head[$h][2] = 'rating'; - $h++; - } + // if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { + // $head[$h][0] = dol_buildpath("/recruitment/recruitmentrating_card.php", 1).'?id='.$object->id; + // $head[$h][1] = $langs->trans("Rating"); + // $head[$h][2] = 'rating'; + // $h++; + // } if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; diff --git a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php index 28e6128452d..179f26a84c7 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php @@ -42,7 +42,7 @@ function recruitmentjobpositionPrepareHead($object) $h++; $head[$h][0] = dol_buildpath("/recruitment/recruitmentcandidature_list.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Candidatures"); + $head[$h][1] = $langs->trans("RecruitmentCandidatures"); $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature WHERE fk_recruitmentjobposition = ".((int) $object->id); $resql = $db->query($sql); if ($resql) { @@ -143,7 +143,7 @@ function getPublicJobPositionUrl($mode, $ref = '', $localorexternal = 0) }*/ // For multicompany - if (!empty($out) && !empty($conf->multicompany->enabled)) { + if (!empty($out) && isModEnabled('multicompany')) { $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities } diff --git a/htdocs/recruitment/recruitmentcandidature_agenda.php b/htdocs/recruitment/recruitmentcandidature_agenda.php index bfe70deb075..04118f55572 100644 --- a/htdocs/recruitment/recruitmentcandidature_agenda.php +++ b/htdocs/recruitment/recruitmentcandidature_agenda.php @@ -27,8 +27,8 @@ require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/recruitment/class/recruitmentcandidature.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentcandidature.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentcandidature.lib.php'; // Load translation files required by the page @@ -36,10 +36,11 @@ $langs->loadLangs(array("recruitment", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +$socid = GETPOST('socid', 'int'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); @@ -79,7 +80,7 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php @@ -124,12 +125,12 @@ if (empty($reshook)) { $form = new Form($db); if ($object->id > 0) { - $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + $title = $object->ref." - ".$langs->trans('Agenda'); + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = recruitmentCandidaturePrepareHead($object); @@ -150,7 +151,7 @@ if ($object->id > 0) { $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (! empty($conf->project->enabled)) + /*if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; @@ -171,7 +172,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -209,7 +210,8 @@ if ($object->id > 0) { if (get_class($objthirdparty) == 'Societe') { $out .= '&socid='.$objthirdparty->id; } - $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage=1&percentage=-1'; + $backtopageurl = urlencode($_SERVER['PHP_SELF'].'?id='.$objthirdparty->id); + $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage='.$backtopageurl.'&percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); //$out.=""; diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 4deced822f4..2452c9e530b 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -21,26 +21,6 @@ * \brief Page to create/edit/view recruitmentcandidature */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -56,14 +36,14 @@ $langs->loadLangs(array("recruitment", "other", "users")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'recruitmentcandidaturecard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new RecruitmentCandidature($db); @@ -86,7 +66,7 @@ foreach ($object->fields as $key => $val) { } if (empty($action) && empty($id) && empty($ref)) { - $action = 'view'; + $action = 'create'; } // Load object @@ -277,10 +257,15 @@ $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); -$title = $langs->trans("RecruitmentCandidature"); -$help_url = ''; -llxHeader('', $title, $help_url); +if ($action == 'create') { + $title = $langs->trans('NewCandidature'); + $help_url = ''; +} else { + $title = $object->ref." - ".$langs->trans('Card'); + $help_url = ''; +} +llxHeader('', $title, $help_url); // Part to create if ($action == 'create') { @@ -448,7 +433,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project') . ' '; @@ -468,7 +453,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -541,7 +526,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Back to draft if ($object->status == $object::STATUS_VALIDATED) { if ($permissiontoadd) { - print ''.$langs->trans("SetToDraft").''; + print ''.$langs->trans("SetToDraft").''; } } @@ -567,7 +552,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Make offer - Refuse - Decline if ($object->status >= $object::STATUS_VALIDATED && $object->status < $object::STATUS_CONTRACT_PROPOSED) { if ($permissiontoadd) { - print ''.$langs->trans("MakeOffer").' / '.$langs->trans("Decline").''; + print ''.$langs->trans("MakeOffer").' / '.$langs->trans("Decline").''; } } @@ -580,7 +565,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''."\n"; + print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&object=recruitmentcandidature', 'clone', $permissiontoadd); } // Button to convert into a user @@ -607,12 +592,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print ''."\n"; } @@ -669,6 +650,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $defaulttopic = 'InformationMessage'; $diroutput = $conf->recruitment->dir_output; $trackid = 'recruitmentcandidature'.$object->id; + $inreplyto = $object->email_msgid; + + $job = new RecruitmentJobPosition($db); + $job->fetch($object->fk_recruitmentjobposition); + + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + $recruiter = new User($db); + $recruiter->fetch($job->fk_user_recruiter); + + $recruitername = $recruiter->getFullName(''); + $recruitermail = (!empty($job->email_recruiter) ? $job->email_recruiter : $recruiter->email); include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } diff --git a/htdocs/recruitment/recruitmentcandidature_document.php b/htdocs/recruitment/recruitmentcandidature_document.php index b52197fdb4a..3f08c770111 100644 --- a/htdocs/recruitment/recruitmentcandidature_document.php +++ b/htdocs/recruitment/recruitmentcandidature_document.php @@ -28,8 +28,8 @@ 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'; -dol_include_once('/recruitment/class/recruitmentcandidature.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentcandidature.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentcandidature.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "companies", "other", "mails")); @@ -97,9 +97,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $langs->trans("RecruitmentJobPosition").' - '.$langs->trans("Files"); +$title = $object->ref." - ".$langs->trans('Files'); $help_url = ''; -//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); if ($object->id) { @@ -119,7 +118,6 @@ if ($object->id) { } // Object card - // ------------------------------------------------------------ $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; @@ -131,7 +129,7 @@ if ($object->id) { $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (! empty($conf->project->enabled)) + /*if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; @@ -152,7 +150,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -188,6 +186,7 @@ if ($object->id) { $param = '&id='.$object->id; $relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/'; + $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index e8a52730b74..9b860ac54d5 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -21,25 +21,6 @@ * \brief List page for recruitmentcandidature */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//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) -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' - // Load Dolibarr environment require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php'; @@ -50,25 +31,23 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; -// for other modules -//dol_include_once('/othermodule/class/otherobject.class.php'); - // Load translation files required by the page $langs->loadLangs(array("recruitment", "other")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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 +$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') : ((empty($id) && empty($ref)) ? 'recruitmentcandidaturelist' : 'recruitmentjobposition_candidature'); // 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') -$mode = GETPOST('mode', 'aZ'); +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$mode = GETPOST('mode', 'aZ'); +$lineid = GETPOST('lineid', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -309,7 +288,7 @@ foreach ($object->fields as $key => $val) { $sql .= "t.".$db->escape($key).", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } @@ -325,7 +304,7 @@ $sql = preg_replace('/,\s*$/', '', $sql); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); $resql = $db->query($sqlforcount); if ($resql) { $objforcount = $db->fetch_object($resql); @@ -459,7 +438,7 @@ if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { @@ -575,7 +554,7 @@ $newcardbutton = ''; $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); -$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.((int) $id)), '', $permissiontoadd); +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?action=create&fk_recruitmentjobposition='.$id, '', $permissiontoadd); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index c6fedf6fcea..1649ab5ee5e 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -24,17 +24,17 @@ // Load Dolibarr environment require_once '../main.inc.php'; -dol_include_once('/recruitment/class/recruitmentcandidature.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentcandidature.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentcandidature.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "companies")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects @@ -48,7 +48,7 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } $permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php @@ -80,9 +80,9 @@ if (empty($reshook)) { $form = new Form($db); -//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = ''; -llxHeader('', $langs->trans('RecruitmentCandidature'), $help_url); +llxHeader('', $title, $help_url); if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); @@ -104,7 +104,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (! empty($conf->project->enabled)) + /*if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; @@ -125,7 +125,7 @@ if ($id > 0 || !empty($ref)) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -139,7 +139,6 @@ if ($id > 0 || !empty($ref)) { dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
    '; print '
    '; diff --git a/htdocs/recruitment/recruitmentjobposition_agenda.php b/htdocs/recruitment/recruitmentjobposition_agenda.php index 07cecb0070e..f2f4d37484b 100644 --- a/htdocs/recruitment/recruitmentjobposition_agenda.php +++ b/htdocs/recruitment/recruitmentjobposition_agenda.php @@ -27,8 +27,8 @@ require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; // Load translation files required by the page @@ -36,9 +36,9 @@ $langs->loadLangs(array("recruitment", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { @@ -124,12 +124,12 @@ if (empty($reshook)) { $form = new Form($db); if ($object->id > 0) { - $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + $title = $object->ref." - ".$langs->trans('Agenda'); + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = recruitmentjobpositionPrepareHead($object); diff --git a/htdocs/recruitment/recruitmentjobposition_applications.php b/htdocs/recruitment/recruitmentjobposition_applications.php index 16e19066be3..3cdca44c93e 100644 --- a/htdocs/recruitment/recruitmentjobposition_applications.php +++ b/htdocs/recruitment/recruitmentjobposition_applications.php @@ -21,73 +21,24 @@ * \brief Page to see/add applications of a job position */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'recruitmentjobpositioncard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index d7d115b04b0..d1ca4ef2db1 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -21,48 +21,28 @@ * \brief Page to create/edit/view recruitmentjobposition */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'recruitmentjobpositioncard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new RecruitmentJobPosition($db); @@ -85,7 +65,7 @@ foreach ($object->fields as $key => $val) { } if (empty($action) && empty($id) && empty($ref)) { - $action = 'view'; + $action = 'create'; } // Load object @@ -197,7 +177,7 @@ $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); -$title = $langs->trans("PositionToBeFilled"); +$title = $object->ref." - ".$langs->trans('Card'); $help_url = ''; llxHeader('', $title, $help_url); @@ -299,18 +279,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if ($action == 'closeas') { + $text = ""; //Form to close proposal (signed or not) $formquestion = array( array('type' => 'select', 'name' => 'status', 'label' => ''.$langs->trans("CloseAs").'', 'values' => array(3=>$object->LibStatut($object::STATUS_RECRUITED), 9=>$object->LibStatut($object::STATUS_CANCELED))), array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '') // Field to complete private note (not replace) ); - /*if (!empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $formquestion = array_merge($formquestion, array( - array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), + array('type' => 'onecolumn', 'value' => $notify->confirmMessage('RECRUITMENTJOBPOSITION_CLOSE_SIGNED', $object->socid, $object)), )); }*/ @@ -360,7 +341,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { @@ -455,7 +436,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''."\n"; + print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : "").'&action=clone&object=recruitmentjobposition', 'clone', $permissiontoadd); } /* @@ -472,12 +453,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print '
    '."\n"; } diff --git a/htdocs/recruitment/recruitmentjobposition_document.php b/htdocs/recruitment/recruitmentjobposition_document.php index 50a9e7d2b4c..a162f4c3af7 100644 --- a/htdocs/recruitment/recruitmentjobposition_document.php +++ b/htdocs/recruitment/recruitmentjobposition_document.php @@ -28,8 +28,8 @@ 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'; -dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "companies", "other", "mails")); @@ -97,7 +97,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $langs->trans("RecruitmentJobPosition").' - '.$langs->trans("Files"); +$title = $object->ref." - ".$langs->trans('Files'); $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); @@ -148,7 +148,7 @@ if ($object->id) { $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { @@ -186,8 +186,8 @@ if ($object->id) { $permtoedit = $user->rights->recruitment->recruitmentjobposition->write; $param = '&id='.$object->id; - //$relativepathwithnofile='recruitmentjobposition/' . dol_sanitizeFileName($object->id).'/'; $relativepathwithnofile = 'recruitmentjobposition/'.dol_sanitizeFileName($object->ref).'/'; + $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index 54f244efc5b..e6b538b5167 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -21,25 +21,6 @@ * \brief List page for recruitmentjobposition */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//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) -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' - // Load Dolibarr environment require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; @@ -48,9 +29,6 @@ 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.'/recruitment/class/recruitmentjobposition.class.php'; -// for other modules -//dol_include_once('/othermodule/class/otherobject.class.php'); - // Load translation files required by the page $langs->loadLangs(array("recruitment", "other")); @@ -322,7 +300,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { }*/ /* The fast and low memory method to get and count full list converts the sql into a sql count */ /* - $sqlforcount = preg_replace('/^SELECT[a-z0-9\._\s\(\),]+FROM/i', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); print $sqlforcount; $resql = $db->query($sqlforcount); $objforcount = $db->fetch_object($resql); @@ -468,7 +446,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // 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 @@ -478,6 +456,13 @@ print '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -523,10 +508,12 @@ if (!empty($arrayfields['nbapplications']['checked'])) { print ''; } // Action column -print ''; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; +} print ''."\n"; $totalarray = array(); @@ -535,6 +522,10 @@ $totalarray['nbfield'] = 0; // Fields title label // -------------------------------------------------------------------- print ''; +// Action column +if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -562,7 +553,9 @@ if (!empty($arrayfields['nbapplications']['checked'])) { $totalarray['nbfield']++; } // Action column -print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} $totalarray['nbfield']++; print ''."\n"; @@ -608,6 +601,18 @@ while ($i < $imaxinloop) { // Show here line of result $j = 0; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { @@ -664,15 +669,17 @@ while ($i < $imaxinloop) { print ''; } // Action column - print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index c5d8cc29533..5dc4004a361 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -24,17 +24,17 @@ // Load Dolibarr environment require_once '../main.inc.php'; -dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); -dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php'; // Load translation files required by the page $langs->loadLangs(array("recruitment", "companies")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects @@ -53,7 +53,7 @@ $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 if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; + $upload_dir = $conf->recruitment->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id; } $permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php @@ -85,9 +85,9 @@ if (empty($reshook)) { $form = new Form($db); -//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = ''; -llxHeader('', $langs->trans('RecruitmentJobPosition'), $help_url); +llxHeader('', $title, $help_url); if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); @@ -97,7 +97,6 @@ if ($id > 0 || !empty($ref)) { print dol_get_fiche_head($head, 'note', $langs->trans("RecruitmentJobPosition"), -1, $object->picto); // Object card - // ------------------------------------------------------------ $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; @@ -126,7 +125,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php index 8984c9ced72..8fddadcce11 100644 --- a/htdocs/resource/agenda.php +++ b/htdocs/resource/agenda.php @@ -28,6 +28,7 @@ * \brief Page of resource events */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -35,12 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; // Load translation files required by the page -$langs->load("companies"); +$langs->load('companies'); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -52,6 +53,7 @@ if (GETPOST('actioncode', 'array')) { } else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } + $search_agenda_label = GETPOST('search_agenda_label'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -72,7 +74,7 @@ if (!$sortorder) { } // Initialize technical objects -//$object=new MyObject($db); + $extrafields = new ExtraFields($db); $hookmanager->initHooks(array('agendaresource')); @@ -94,7 +96,7 @@ if (!$user->rights->resource->read) { */ $parameters = array('id'=>$id); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$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'); } @@ -126,7 +128,6 @@ if ($object->id > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; - $langs->load("companies"); $picto = 'resource'; $title = $langs->trans("Agenda"); diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 4ffbe1eb0a7..5c588b59c6b 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -22,6 +22,7 @@ */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; @@ -49,7 +50,6 @@ if ($user->socid > 0) { } $object = new Dolresource($db); - $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -62,7 +62,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $result = restrictedArea($user, 'resource', $object->id, 'resource'); $permissiontoadd = $user->rights->resource->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php - +$permissiontodelete = $user->rights->resource->delete; /* @@ -245,7 +245,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) { print '
    '; // Other attributes - $parameters = array('objectsrc' => $objectsrc); + $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)) { @@ -348,12 +348,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) { } } if ($action != "delete" && $action != "create" && $action != "edit") { - // Delete resource - if ($user->rights->resource->delete) { - print '
    '; - print ''.$langs->trans('Delete').''; - print '
    '; - } + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } } print ''; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index da99b2f2e97..515a766263b 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -44,21 +44,39 @@ class Dolresource extends CommonObject */ public $picto = 'resource'; + + /** + * @var int ID + */ + public $fk_code_type_resource; + + public $type_label; + + public $description; + + public $fk_country; + + + // Variable for a link of resource + + /** + * @var int ID + */ public $resource_id; public $resource_type; public $element_id; public $element_type; public $busy; public $mandatory; - /** * @var int ID */ public $fk_user_create; - - public $type_label; public $tms = ''; + /** + * @var array Cache of type of resources. TODO Use $conf->cache['type_of_resources'] instead + */ public $cache_code_type_resource = array(); /** @@ -66,6 +84,7 @@ class Dolresource extends CommonObject */ public $oldcopy; + /** * Constructor * @@ -262,10 +281,9 @@ class Dolresource extends CommonObject $this->country_id = 0; } + // $this->oldcopy should have been set by the caller of update (here properties were already modified) if (empty($this->oldcopy)) { - $org = new self($this->db); - $org->fetch($this->id); - $this->oldcopy = $org; + $this->oldcopy = dol_clone($this); } // Update request @@ -340,10 +358,10 @@ class Dolresource extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load object in memory from database + * Load data of link in memory from database * - * @param int $id id object - * @return int <0 if KO, >0 if OK + * @param int $id Id of link element_resources + * @return int <0 if KO, >0 if OK */ public function fetch_element_resource($id) { @@ -528,7 +546,7 @@ class Dolresource extends CommonObject if ($limit) { $sql .= $this->db->plimit($limit, $offset); } - dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); + dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); $this->lines = array(); $resql = $this->db->query($sql); diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index aca47d49743..3b032fffb94 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -3,8 +3,10 @@ * Copyright (C) 2007-2009 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2016 Gilles Poirier - * + */ + +/** * 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 @@ -22,9 +24,10 @@ /** * \file htdocs/resource/contact.php * \ingroup resource - * \brief Onglet de gestion des contacts des resources + * \brief Contacts management tab for resources */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -32,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; // Load translation files required by the page -$langs->loadLangs(array('resource', 'sendings', 'companies')); +$langs->loadLangs(array('companies', 'resource', 'sendings')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -41,7 +44,7 @@ $action = GETPOST('action', 'aZ09'); $object = new DolResource($db); // Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Security check if ($user->socid) { @@ -55,10 +58,12 @@ if (!$user->rights->resource->read) { } + /* - * Add a new contact + * Actions */ +// Add a new contact if ($action == 'addcontact' && $user->rights->resource->write) { if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); @@ -106,13 +111,9 @@ $userstatic = new User($db); llxHeader('', $langs->trans("Resource")); -// Mode vue et edition +// View and edit mode if ($id > 0 || !empty($ref)) { - $soc = new Societe($db); - $soc->fetch($object->socid); - - $head = resource_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), -1, 'resource'); diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php index 001598d2023..6c5b4496d23 100644 --- a/htdocs/resource/document.php +++ b/htdocs/resource/document.php @@ -28,6 +28,7 @@ * \brief Page des documents joints sur les resources */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index e1a323ffd4a..eedfcc06245 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -25,6 +25,7 @@ */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -33,7 +34,7 @@ if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (isModEnabled('product') || isModEnabled('service')) { +if (isModEnabled("product") || isModEnabled("service")) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; } @@ -323,6 +324,9 @@ if (!$ret) { if (($element_id || $element_ref) && $element == 'action') { require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context + $hookmanager->initHooks(array('actioncard', 'globalcard')); + $act = fetchObjectByElement($element_id, $element, $element_ref); if (is_object($act)) { $head = actions_prepare_head($act); @@ -343,27 +347,44 @@ if (!$ret) { $out .= '
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); $out .= ''.$langs->trans("ViewDay").''; + // Add more views from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action); + if (empty($reshook)) { + $out .= $hookmanager->resPrint; + } elseif ($reshook > 1) { + $out = $hookmanager->resPrint; + } + $linkback .= $out; $morehtmlref = '
    '; // Thirdparty //$morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project + $savobject = $object; + $object = $act; if (isModEnabled('project')) { $langs->load("projects"); - //$morehtmlref.='
    '.$langs->trans('Project') . ' '; - $morehtmlref .= $langs->trans('Project').': '; - if (!empty($act->fk_project)) { - $proj = new Project($db); - $proj->fetch($act->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); - if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + //$morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { - $morehtmlref .= ''; + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= $proj->getNomUrl(1); + if ($proj->title) { + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; + } + } } } + $object = $savobject; $morehtmlref .= '
    '; dol_banner_tab($act, 'element_id', $linkback, ($user->socid ? 0 : 1), 'id', 'ref', $morehtmlref, '&element='.$element, 0, '', ''); diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 1ef64555133..55a9540bfe1 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -23,6 +23,7 @@ * \brief Page to manage resource objects */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; @@ -32,6 +33,7 @@ $langs->loadLangs(array("resource", "companies", "other")); // Get parameters $id = GETPOST('id', 'int'); $action = GETPOST('action', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) $lineid = GETPOST('lineid', 'int'); $element = GETPOST('element', 'alpha'); @@ -168,7 +170,7 @@ if ($search_type != '') { } // Including the previous script generate the correct SQL filter for all the extrafields -// we are playing with the behaviour of the Dolresource::fetch_all() by generating a fake +// we are playing with the behaviour of the Dolresource::fetchAll() by generating a fake // extrafields filter key to make it works $filter['ef.resource'] = $sql; diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 98efb72d55b..d2c02df0481 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -25,6 +25,7 @@ * \brief Fiche d'information sur une resource */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php index 5343d4831ba..c30b6ff3565 100644 --- a/htdocs/salaries/admin/salaries.php +++ b/htdocs/salaries/admin/salaries.php @@ -22,6 +22,7 @@ * \brief Setup page to configure salaries module */ +// Load Dolibarr environment require '../../main.inc.php'; // Class diff --git a/htdocs/salaries/admin/salaries_extrafields.php b/htdocs/salaries/admin/salaries_extrafields.php index 86fc5991757..85b389d0697 100644 --- a/htdocs/salaries/admin/salaries_extrafields.php +++ b/htdocs/salaries/admin/salaries_extrafields.php @@ -23,6 +23,7 @@ * \brief Page to setup extra fields of salaries */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,13 +81,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '

    '; diff --git a/htdocs/salaries/ajax/ajaxsalaries.php b/htdocs/salaries/ajax/ajaxsalaries.php index adea28ee8ce..1cbecf840d2 100644 --- a/htdocs/salaries/ajax/ajaxsalaries.php +++ b/htdocs/salaries/ajax/ajaxsalaries.php @@ -38,10 +38,8 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; @@ -52,6 +50,8 @@ restrictedArea($user, 'salaries'); * View */ +top_httphead('application/json'); + $fk_user = GETPOST('fk_user', 'int'); $return_arr = array(); diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 635ce443683..0b961648115 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -26,6 +26,7 @@ * \brief Page of salaries payments */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; @@ -109,12 +110,13 @@ $permissiontoadd = $user->rights->salaries->write; // Used by the include of act $permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); -/** +/* * Actions */ $parameters = array(); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +// Note that $action and $object may be modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } @@ -122,14 +124,14 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $backurlforlist = dol_buildpath('/salaries/list.php', 1); + $backurlforlist = DOL_URL_ROOT.'/salaries/list.php'; if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/salaries/card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + $backtopage = DOL_URL_ROOT.'/salaries/card.php?id='.($id > 0 ? $id : '__ID__'); } } } @@ -260,7 +262,7 @@ if ($action == 'add' && empty($cancel)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } - if (isModEnabled('banque') && !empty($auto_create_paiement) && !$object->accountid > 0) { + if (isModEnabled("banque") && !empty($auto_create_paiement) && !$object->accountid > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); $error++; } @@ -443,9 +445,10 @@ $form = new Form($db); $formfile = new FormFile($db); if (isModEnabled('project')) $formproject = new FormProjets($db); -$title = $langs->trans('Salary')." - ".$langs->trans('Card'); +$title = $langs->trans('Salary')." - ".$object->ref; $help_url = ""; -llxHeader("", $title, $help_url); + +llxHeader('', $title, $help_url); if ($id > 0) { @@ -457,8 +460,8 @@ if ($id > 0) { } // Create -if ($action == 'create') { - $year_current = strftime("%Y", dol_now()); +if ($action == 'create' && $permissiontoadd) { + $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $pastmonth = strftime("%m", dol_now()) - 1; $pastmonthyear = $year_current; if ($pastmonth == 0) { @@ -479,7 +482,7 @@ if ($action == 'create') { $datesp = dol_get_first_day($pastmonthyear, $pastmonth, false); $dateep = dol_get_last_day($pastmonthyear, $pastmonth, false); } - print '
    '; + print ''; print ''; print ''; if ($backtopage) { @@ -521,7 +524,7 @@ if ($action == 'create') { print ''."\n"; } - print dol_get_fiche_head('', ''); + print dol_get_fiche_head(''); print '
  • '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$obj->nbapplications.''; - 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($object->id, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
    '; @@ -583,7 +586,7 @@ if ($action == 'create') { print ''."\n"; // Date payment // Bank - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; // Number - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { // Number print ''; // Default Bank Account - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire)) - || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { + if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire)) + || (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->lire))) { // Supplier print ''; print ''; } if (!empty($arrayfields['s.import_key']['checked'])) { @@ -1396,27 +1454,36 @@ $totalarray = array(); $totalarray['nbfield'] = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); + $parameters = array('staticdata' => $obj); + // Note that $action and $object may have been modified by hook + // do companystatic fetch in hook if wanted or anything else + $reshook = $hookmanager->executeHooks('loadStaticObject', $parameters, $companystatic, $action); + if (empty($reshook)) { + $companystatic->id = $obj->rowid; + $companystatic->name = $obj->name; + $companystatic->name_alias = $obj->name_alias; + $companystatic->logo = $obj->logo; + $companystatic->barcode = $obj->barcode; + $companystatic->canvas = $obj->canvas; + $companystatic->client = $obj->client; + $companystatic->status = $obj->status; + $companystatic->email = $obj->email; + $companystatic->address = $obj->address; + $companystatic->zip = $obj->zip; + $companystatic->town = $obj->town; + $companystatic->fournisseur = $obj->fournisseur; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + $companystatic->tva_intra = $obj->tva_intra; + $companystatic->country_code = $obj->country_code; - $companystatic->id = $obj->rowid; - $companystatic->name = $obj->name; - $companystatic->name_alias = $obj->name_alias; - $companystatic->logo = $obj->logo; - $companystatic->canvas = $obj->canvas; - $companystatic->client = $obj->client; - $companystatic->status = $obj->status; - $companystatic->email = $obj->email; - $companystatic->fournisseur = $obj->fournisseur; - $companystatic->code_client = $obj->code_client; - $companystatic->code_fournisseur = $obj->code_fournisseur; - $companystatic->tva_intra = $obj->tva_intra; - $companystatic->country_code = $obj->country_code; + $companystatic->code_compta_client = $obj->code_compta; + $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - $companystatic->code_compta_client = $obj->code_compta; - $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - - $companystatic->fk_prospectlevel = $obj->fk_prospectlevel; - $companystatic->fk_parent = $obj->fk_parent; - $companystatic->entity = $obj->entity; + $companystatic->fk_prospectlevel = $obj->fk_prospectlevel; + $companystatic->fk_parent = $obj->fk_parent; + $companystatic->entity = $obj->entity; + } print ''; } print ''; + if (!$i) { + $totalarray['nbfield']++; + } } if (!empty($arrayfields['s.rowid']['checked'])) { print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Customer code if (!empty($arrayfields['s.code_client']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Supplier code if (!empty($arrayfields['s.code_fournisseur']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Account customer code if (!empty($arrayfields['s.code_compta']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Account supplier code if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Address if (!empty($arrayfields['s.address']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Zip if (!empty($arrayfields['s.zip']['checked'])) { - print "\n"; + print "\n"; if (!$i) { $totalarray['nbfield']++; } } // Town if (!empty($arrayfields['s.town']['checked'])) { - print '\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -1537,7 +1607,7 @@ while ($i < min($num, $limit)) { // Country if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; if (!$i) { @@ -1584,13 +1654,13 @@ while ($i < min($num, $limit)) { } } if (!empty($arrayfields['s.phone']['checked'])) { - print '\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } } if (!empty($arrayfields['s.fax']['checked'])) { - print '\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -1639,11 +1709,11 @@ while ($i < min($num, $limit)) { } // VAT if (!empty($arrayfields['s.tva_intra']['checked'])) { - print '\n"; if (!$i) { $totalarray['nbfield']++; @@ -1671,7 +1741,7 @@ while ($i < min($num, $limit)) { if (!empty($arrayfields['s.fk_stcomm']['checked'])) { // Prospect status - print ''; - } - if (!$i) { - $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } print ''."\n"; diff --git a/htdocs/societe/messaging.php b/htdocs/societe/messaging.php new file mode 100644 index 00000000000..c73d6ffe0b1 --- /dev/null +++ b/htdocs/societe/messaging.php @@ -0,0 +1,211 @@ + + * Copyright (C) 2005 Brice Davoleau + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006-2019 Laurent Destailleur + * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2015 Marcos García + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/societe/messaging.php + * \ingroup societe + * \brief Page of third party events + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('agenda', 'bills', 'companies', 'orders', 'propal')); + + +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) { + $actioncode = '0'; + } +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} + +$search_agenda_label = GETPOST('search_agenda_label'); + +// Security check +$socid = GETPOST('socid', 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'societe', $socid, '&societe'); + +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('agendathirdparty')); + + +/* + * Actions + */ + +$parameters = array('id'=>$socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +if (empty($reshook)) { + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + + // 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 + $actioncode = ''; + $search_agenda_label = ''; + } +} + + + +/* + * View + */ + +$form = new Form($db); + +if ($socid > 0) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + + $object = new Societe($db); + $result = $object->fetch($socid); + + $title = $langs->trans("Agenda"); + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$title; + } + llxHeader('', $title); + + if (isModEnabled('notification')) { + $langs->load("mails"); + } + $head = societe_prepare_head($object); + + print dol_get_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, 'company'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + + $object->info($socid); + dol_print_object_info($object, 1); + + print '
    '; + + print dol_get_fiche_end(); + + + + // Actions buttons + + $objthirdparty = $object; + $objcon = new stdClass(); + + $out = ''; + $permok = $user->hasRight('agenda', 'myactions', 'create'); + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { + if (is_object($objthirdparty) && get_class($objthirdparty) == 'Societe') { + $out .= '&originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&socid='.$objthirdparty->id : '').'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objthirdparty->id > 0 ? '?socid='.$objthirdparty->id : '')); + } + $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&percentage=-1'; + $out .= '&datep='.dol_print_date(dol_now(), 'dayhourlog'); + } + + $morehtmlright = ''; + + $messagingUrl = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id; + $morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 2); + $messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; + $morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1); + + // // Show link to send an email (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus); + + // // Show link to add a private message (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus); + + if (isModEnabled('agenda')) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { + $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); + } + } + + if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + print '
    '; + + $param = '&socid='.urlencode($socid); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + + // print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, ''); + print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); + + // List of all actions + $filters = array(); + $filters['search_agenda_label'] = $search_agenda_label; + + // TODO Replace this with same code than into list.php + show_actions_messaging($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index b932fb11595..32ec4bbe567 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -26,21 +26,29 @@ * \ingroup societe */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -$action = GETPOST('action', 'aZ09'); +// Load translation files required by the page $langs->load("companies"); -$id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); +// Get parameters +$id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); + + +// Initialize objects $object = new Societe($db); if ($id > 0) { $object->fetch($id); } -$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php +// Permissions +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartynote', 'globalcard')); @@ -50,6 +58,7 @@ if ($user->socid > 0) { unset($action); $socid = $user->socid; } + $result = restrictedArea($user, 'societe', $object->id, '&societe'); @@ -82,7 +91,7 @@ if ($object->id > 0) { /* * Affichage onglets */ - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 8729ed3b46e..f299ef2ee82 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -24,6 +24,7 @@ * \brief Tab for notifications of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -183,7 +184,7 @@ if ($result > 0) { print ''; } - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { print '
    ';*/ @@ -305,7 +306,7 @@ if ($result > 0) { while ($i < $num) { $obj = $db->fetch_object($resql); - $contactstatic->id = $obj->contact_id; + $contactstatic->id = $obj->contactid; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; diff --git a/htdocs/societe/partnership.php b/htdocs/societe/partnership.php deleted file mode 100644 index d9b3d3127f9..00000000000 --- a/htdocs/societe/partnership.php +++ /dev/null @@ -1,274 +0,0 @@ - - * Copyright (C) 2021 NextGestion - * Copyright (C) 2022 Charlene Benke - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file partnership_card.php - * \ingroup partnership - * \brief Page to create/edit/view partnership - */ - -// Load Dolibarr environment -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; -require_once DOL_DOCUMENT_ROOT.'/partnership/lib/partnership.lib.php'; - -// Load translation files required by the page -$langs->loadLangs(array("companies", "partnership", "other")); - -// Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'partnershipcard'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); - -// Security check -$socid = GETPOST('socid', 'int'); -if (!empty($user->socid)) { - $socid = $user->socid; -} - -if (empty($id) && $socid && (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty') == 'thirdparty')) { - $id = $socid; -} - -$object = new Societe($db); -if ($id > 0) { - $object->fetch($id); -} - -// Initialize technical objects -$object = new Partnership($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('thirdpartypartnership', 'globalcard')); // Note that conf->hooks_modules contains array - -// Fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); - -// Initialize array of search criterias -$search_all = GETPOST("search_all", 'alpha'); -$search = array(); - -foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) { - $search[$key] = GETPOST('search_'.$key, 'alpha'); - } -} - -// Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. - -$permissiontoread = $user->rights->partnership->read; -$permissiontoadd = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->partnership->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); -$permissionnote = $user->rights->partnership->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->partnership->write; // Used by the include of actions_dellink.inc.php -$usercanclose = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1]; - - -if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty') != 'thirdparty') { - accessforbidden('Partnership is not activated for thirdparties'); -} -if (empty($conf->partnership->enabled)) { - accessforbidden(); -} -if (empty($permissiontoread)) { - accessforbidden(); -} -if ($action == 'edit' && empty($permissiontoadd)) { - accessforbidden(); -} - -if (($action == 'update' || $action == 'edit') && $object->status != $object::STATUS_DRAFT && !empty($user->socid)) { - accessforbidden(); -} - - -// Security check -$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); - - -/* - * Actions - */ - -$parameters = array(); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) { - setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -} - -$date_start = dol_mktime(0, 0, 0, GETPOST('date_partnership_startmonth', 'int'), GETPOST('date_partnership_startday', 'int'), GETPOST('date_partnership_startyear', 'int')); -$date_end = dol_mktime(0, 0, 0, GETPOST('date_partnership_endmonth', 'int'), GETPOST('date_partnership_endday', 'int'), GETPOST('date_partnership_endyear', 'int')); - -if (empty($reshook)) { - $error = 0; - - $backtopage = DOL_URL_ROOT.'/partnership/partnership.php?id='.($id > 0 ? $id : '__ID__'); - - // Actions when linking object each other - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; -} - -$object->fields['fk_soc']['visible'] = 0; -if ($object->id > 0 && $object->status == $object::STATUS_REFUSED && empty($action)) { - $object->fields['reason_decline_or_cancel']['visible'] = 1; -} -$object->fields['note_public']['visible'] = 1; - - -/* - * View - */ - -$form = new Form($db); -$formfile = new FormFile($db); - -$title = $langs->trans("Partnership"); -llxHeader('', $title); - -$form = new Form($db); - -if ($id > 0) { - $langs->load("companies"); - - $object = new Societe($db); - $result = $object->fetch($id); - - if (!empty($conf->notification->enabled)) { - $langs->load("mails"); - } - $head = societe_prepare_head($object); - - print dol_get_fiche_head($head, 'partnership', $langs->trans("ThirdParty"), -1, 'company'); - - $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); - - print '
    '; - - print '
    '; - print '
    '; print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).''; print img_picto('', 'bank_account', 'class="paddingrighonly"'); @@ -610,7 +613,7 @@ if ($action == 'create') { print '
    '; print ''; print ''; print ''; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; } print ''; @@ -972,7 +962,7 @@ if ($id) { print '\n"; $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type; print "\n"; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref; diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 8b809ffa1f7..860deaa69f0 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -493,7 +493,7 @@ class PaymentSalary extends CommonObject $error = 0; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); @@ -701,8 +701,7 @@ class PaymentSalary extends CommonObject $link = ''; $linkend = ''; - if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip pictofixedwidth"').$linkend); if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; } diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 59f23208daa..25adb60382c 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -372,12 +372,12 @@ class Salary extends CommonObject $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); return -5; } - /* if (isModEnabled('banque') && (empty($this->accountid) || $this->accountid <= 0)) + /* if (isModEnabled("banque") && (empty($this->accountid) || $this->accountid <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account")); return -6; } - if (isModEnabled('banque') && (empty($this->type_payment) || $this->type_payment <= 0)) + if (isModEnabled("banque") && (empty($this->type_payment) || $this->type_payment <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); return -7; @@ -544,7 +544,7 @@ class Salary 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"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright pictofixedwidth"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip pictofixedwidth"'), 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)) : ''); diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php index eb4c63390a8..2ce7b2e2745 100644 --- a/htdocs/salaries/document.php +++ b/htdocs/salaries/document.php @@ -30,6 +30,7 @@ * \brief Page of linked files onto salaries */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -77,7 +78,9 @@ $childids = $user->getAllChildIds(1); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -$object = new Salary($db); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('salarydoc', 'globalcard')); + if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); @@ -104,7 +107,9 @@ if ($user->socid) { } restrictedArea($user, 'salaries', $object->id, 'salary', ''); +$permissiontoread = $user->rights->salaries->read; $permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles +$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); /* @@ -175,34 +180,26 @@ if ($object->id) { $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1); + $usercancreate = $permissiontoadd; + // Project if (isModEnabled('project')) { - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->salaries->write) { + $langs->load("projects"); + $morehtmlref .= '
    '; + if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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(-1, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); - $morehtmlref .= ''; - $morehtmlref .= ''; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, -1, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/salaries/info.php b/htdocs/salaries/info.php index 7c8962499ce..1085b1175cf 100644 --- a/htdocs/salaries/info.php +++ b/htdocs/salaries/info.php @@ -24,6 +24,7 @@ * \brief Page with info about salaries contribution */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; @@ -57,6 +58,9 @@ $childids = $user->getAllChildIds(1); // fetch optionals attributes and labels $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('salaryinfo', 'globalcard')); + $object = new Salary($db); if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); @@ -76,6 +80,10 @@ if ($id > 0 || !empty($ref)) { restrictedArea($user, 'salaries', $object->id, 'salary', ''); +$permissiontoread = $user->rights->salaries->read; +$permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles +$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); + /* * Actions @@ -106,7 +114,6 @@ $title = $langs->trans('Salary')." - ".$langs->trans('Info'); $help_url = ""; llxHeader("", $title, $help_url); -$object = new Salary($db); $object->fetch($id); $object->info($id); @@ -138,34 +145,26 @@ if ($action != 'editlabel') { $morehtmlref .= '
    '.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1); +$usercancreate = $permissiontoadd; + // Project if (isModEnabled('project')) { - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->salaries->write) { + $langs->load("projects"); + $morehtmlref .= '
    '; + if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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(-1, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); - $morehtmlref .= ''; - $morehtmlref .= ''; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -179,7 +178,7 @@ print '
    '; print '
    '; -print '
    '; print $langs->trans('DefaultBankAccount'); @@ -922,7 +912,7 @@ if ($id) { print '
    '; $nbcols = 3; - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { $nbcols++; } @@ -956,7 +946,7 @@ if ($id) { print '
    '.$langs->trans("RefPayment").''.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans('BankAccount').''.$langs->trans("Amount").''.dol_print_date($db->jdate($objp->dp), 'day')."".$labeltype.' '.$objp->num_payment."
    '; print ''; -if (!empty($conf->expedition->enabled)) { +if (isModEnabled("expedition")) { if (getDolGlobalInt('MAIN_FEATURES_LEVEL') > 0) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal) print ''; print ''; diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php index 1d77831c661..861f4888be0 100644 --- a/htdocs/societe/admin/societe_extrafields.php +++ b/htdocs/societe/admin/societe_extrafields.php @@ -24,6 +24,7 @@ * \brief Page to setup extra fields of third party */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,13 +81,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 89b69bda83c..9e6c10a0ccd 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -27,12 +27,15 @@ * \brief Page of third party events */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->loadLangs(array("companies", "bills", "propal", "orders")); +// Load translation files required by the page +$langs->loadLangs(array('agenda', 'bills', 'companies', 'orders', 'propal')); + if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); @@ -42,6 +45,7 @@ if (GETPOST('actioncode', 'array')) { } else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } + $search_agenda_label = GETPOST('search_agenda_label'); // Security check @@ -117,7 +121,7 @@ if ($socid > 0) { } llxHeader('', $title); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); @@ -156,10 +160,26 @@ if ($socid > 0) { $out .= '&datep='.dol_print_date(dol_now(), 'dayhourlog'); } - $newcardbutton = ''; + $morehtmlright = ''; + + $messagingUrl = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id; + $morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); + $messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; + $morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); + + // // Show link to send an email (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus); + + // // Show link to add a private message (if read and not closed) + // $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage"; + // $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle'; + // $morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus); + if (isModEnabled('agenda')) { if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { - $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); + $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } } @@ -174,8 +194,8 @@ if ($socid > 0) { $param .= '&limit='.urlencode($limit); } - print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, ''); - //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 1); + // print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, ''); + print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); // List of all actions $filters = array(); diff --git a/htdocs/societe/ajax/ajaxcompanies.php b/htdocs/societe/ajax/ajaxcompanies.php index cbbcb14f361..08d914d562a 100644 --- a/htdocs/societe/ajax/ajaxcompanies.php +++ b/htdocs/societe/ajax/ajaxcompanies.php @@ -38,10 +38,8 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -125,7 +123,7 @@ if (GETPOST('newcompany') || GETPOST('socid', 'int') || GETPOST('id_fourn', 'int if ($resql) { while ($row = $db->fetch_array($resql)) { $label = ''; - if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { + if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { if (($row['client']) && (!empty($row['code_client']))) { $label = $row['code_client'].' - '; } diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php index f845c161ab2..7bdfe6e0e34 100644 --- a/htdocs/societe/ajax/company.php +++ b/htdocs/societe/ajax/company.php @@ -37,10 +37,8 @@ if (!defined('NOREQUIREAJAX')) { if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 4ef3d64a424..fc8794aa1a8 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -186,7 +186,7 @@ abstract class ActionsCardCommon $s = $modCodeClient->getToolTip($langs, $this->object, 0); $this->tpl['help_customercode'] = $form->textwithpicto('', $s, 1); - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { $this->tpl['supplier_enabled'] = 1; // Load object modCodeFournisseur @@ -246,7 +246,7 @@ abstract class ActionsCardCommon } // Language - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1); } @@ -306,7 +306,7 @@ abstract class ActionsCardCommon $arr = $formcompany->typent_array(1); $this->tpl['typent'] = $arr[$this->object->typent_code]; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; //$s=picto_from_langcode($this->default_lang); //print ($s?$s.' ':''); @@ -342,7 +342,7 @@ abstract class ActionsCardCommon } // Linked member - if (!empty($conf->adherent->enabled)) { + if (isModEnabled('adherent')) { $langs->load("members"); $adh = new Adherent($this->db); $result = $adh->fetch('', '', $this->object->id); diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php index 2deb1dba8b1..d70277dc58d 100644 --- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php @@ -105,7 +105,7 @@ if (empty($conf) || !is_object($conf)) { barcode->enabled)) { ?> +if (isModEnabled('barcode')) { ?> @@ -189,7 +189,7 @@ for ($i = 1; $i <= 4; $i++) { -global->MAIN_MULTILANGS)) { ?> + diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php index 35e38a10f0e..c432f5a6d95 100644 --- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php @@ -120,7 +120,7 @@ if ($this->control->tpl['fournisseur']) { } } -if (!empty($conf->barcode->enabled)) { ?> +if (isModEnabled('barcode')) { ?> @@ -211,7 +211,7 @@ for ($i = 1; $i <= 4; $i++) { -global->MAIN_MULTILANGS)) { ?> + diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index e57421bf8b5..22c46cb93b5 100644 --- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php @@ -79,7 +79,7 @@ print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company -barcode->enabled)) { ?> + @@ -190,7 +190,7 @@ for ($i = 1; $i <= 4; $i++) { -global->MAIN_MULTILANGS)) { ?> + @@ -247,7 +247,7 @@ for ($i = 1; $i <= 4; $i++) { -adherent->enabled)) { ?> + @@ -263,7 +263,7 @@ for ($i = 1; $i <= 4; $i++) { ">trans("Modify"); ?> -rights->societe->supprimer) { ?> +hasRight('societe', 'supprimer')) { ?> use_javascript_ajax) { ?> trans('Delete'); ?> @@ -283,7 +283,7 @@ for ($i = 1; $i <= 4; $i++) { */ $filedir = $conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$socid; -$genallowed = $user->rights->societe->lire; +$genallowed = $user->hasRight('societe', 'lire'); $delallowed = $user->rights->societe->creer; print $formfile->showdocuments('company', $socid, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $objcanvas->control->object->default_lang); diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index 0010b87ff90..1a574019948 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -113,7 +113,7 @@ if (empty($conf) || !is_object($conf)) { barcode->enabled)) { ?> +if (isModEnabled('barcode')) { ?> @@ -156,7 +156,7 @@ if (!empty($conf->barcode->enabled)) { ?> -global->MAIN_MULTILANGS)) { ?> + diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index 7a43f256b45..adfd1d8363a 100644 --- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php @@ -117,7 +117,7 @@ if ($this->control->tpl['fournisseur']) { } ?> -barcode->enabled)) { ?> + @@ -160,7 +160,7 @@ if ($this->control->tpl['fournisseur']) { -global->MAIN_MULTILANGS)) { ?> + diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 16cd9f1e637..11716519f16 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -74,7 +74,7 @@ if ($this->control->tpl['action_delete']) { -barcode->enabled)) { ?> + @@ -131,7 +131,7 @@ if ($this->control->tpl['action_delete']) { -global->MAIN_MULTILANGS)) { ?> + @@ -174,7 +174,7 @@ if ($this->control->tpl['action_delete']) { -adherent->enabled)) { ?> + @@ -190,7 +190,7 @@ if ($this->control->tpl['action_delete']) { ">trans("Modify"); ?> -rights->societe->supprimer) { ?> +hasRight('societe', 'supprimer')) { ?> use_javascript_ajax) { ?> trans('Delete'); ?> @@ -209,7 +209,7 @@ if ($this->control->tpl['action_delete']) { */ $filedir = $conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$socid; -$genallowed = $user->rights->societe->lire; +$genallowed = $user->hasRight('societe', 'lire'); $delallowed = $user->rights->societe->creer; print $formfile->showdocuments('company', $socid, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $objcanvas->control->object->default_lang); diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8b54c66ad58..e18f6987a33 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2018-2022 Frédéric 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 @@ -34,6 +34,8 @@ * \brief Third party card page */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; @@ -45,49 +47,54 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; } -if (! empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; } +// Load translation files required by the page + $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); -if (!empty($conf->adherent->enabled)) { + +if (isModEnabled('adherent')) { $langs->load("members"); } -if (!empty($conf->categorie->enabled)) { +if (isModEnabled('categorie')) { $langs->load("categories"); } -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load("incoterm"); } -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $langs->load("products"); } $error = 0; $errors = array(); + +// Get parameters $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); if ($user->socid) { @@ -96,6 +103,7 @@ if ($user->socid) { if (empty($socid) && $action == 'view') { $action = 'create'; } + $id = $socid; $object = new Societe($db); @@ -128,12 +136,13 @@ if (!empty($canvas)) { $objcanvas->getCanvas('thirdparty', 'card', $canvas); } -$permissiontoread = $user->rights->societe->lire; -$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->societe->supprimer || ($permissiontoadd && isset($object->status) && $object->status == 0); -$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->societe->creer; // Used by the include of actions_dellink.inc.php -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; +// Permissions +$permissiontoread = $user->hasRight('societe', 'lire'); +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0); +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; // Security check $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); @@ -253,6 +262,7 @@ if (empty($reshook)) { // Update $result = $object->update($object->id, $user, 0, 1, 1, 'merge'); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -332,6 +342,7 @@ if (empty($reshook)) { if (!$error) { //We finally remove the old thirdparty if ($soc_origin->delete($soc_origin->id, $user) < 1) { + setEventMessages($soc_origin->error, $soc_origin->errors, 'errors'); $error++; } } @@ -415,12 +426,12 @@ if (empty($reshook)) { $error++; } - if (!empty($conf->mailing->enabled) && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + if (isModEnabled('mailing') && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); } - if (!empty($conf->mailing->enabled) && GETPOST("private", 'int') == 1 && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); } @@ -454,7 +465,7 @@ if (empty($reshook)) { $object->state_id = GETPOST('state_id', 'int'); $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { + if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); @@ -465,6 +476,7 @@ if (empty($reshook)) { $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); + $object->no_email = GETPOST("no_email", "int"); $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); @@ -525,13 +537,13 @@ if (empty($reshook)) { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); } // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } @@ -600,6 +612,16 @@ if (empty($reshook)) { $result = $object->create($user); + if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email) && $object->no_email == 1) { + // Add mass emailing flag into table mailing_unsubscribe + $result = $object->setNoEmail($object->no_email); + if ($result < 0) { + $error++; + $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); + $action = 'create'; + } + } + if ($result >= 0) { if ($object->particulier) { dol_syslog("We ask to create a contact/address too", LOG_DEBUG); @@ -757,6 +779,23 @@ if (empty($reshook)) { $result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0); + if ($result > 0) { + // Update mass emailing flag into table mailing_unsubscribe + if (GETPOSTISSET('no_email') && $object->email) { + $no_email = GETPOST('no_email', 'int'); + $result = $object->setNoEmail($no_email); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; + } + } + + $action = 'view'; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; + } + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -876,7 +915,7 @@ if (empty($reshook)) { } // Delete third party - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('societe', 'supprimer')) { $object->fetch($socid); $object->oldcopy = clone $object; $result = $object->delete($socid, $user); @@ -899,7 +938,7 @@ if (empty($reshook)) { } // Set incoterm - if ($action == 'set_incoterms' && $user->rights->societe->creer && !empty($conf->incoterm->enabled)) { + if ($action == 'set_incoterms' && $user->rights->societe->creer && isModEnabled('incoterm')) { $object->fetch($socid); $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } @@ -939,7 +978,7 @@ if (empty($reshook)) { // Actions to build doc $id = $socid; $upload_dir = !empty($conf->societe->multidir_output[$object->entity])?$conf->societe->multidir_output[$object->entity]:$conf->societe->dir_output; - $permissiontoadd = $user->rights->societe->creer; + $permissiontoadd = $user->hasRight('societe', 'creer'); include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -952,7 +991,7 @@ $form = new Form($db); $formfile = new FormFile($db); $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } @@ -965,10 +1004,12 @@ if ($socid > 0 && empty($object->id)) { } $title = $langs->trans("ThirdParty"); +if ($action == 'create') { + $title = $langs->trans("NewThirdParty"); +} if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->name." - ".$langs->trans('Card'); } - $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas|DE:Modul_Geschäftspartner'; llxHeader('', $title, $help_url); @@ -1047,7 +1088,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->client = 1; } - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { $object->fournisseur = 1; } @@ -1072,7 +1113,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->state_id = GETPOST('state_id', 'int'); $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { + if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); @@ -1163,7 +1204,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->forme_juridique_code = GETPOST('forme_juridique_code'); // We set multicurrency_code if enabled - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $object->multicurrency_code = GETPOST('multicurrency_code') ? GETPOST('multicurrency_code') : $conf->currency; } /* Show create form */ @@ -1465,8 +1506,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; +print '
    '; dol_print_object_info($object); print '
    '; diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 9af8e61eafe..361107005a6 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -24,6 +24,7 @@ * \brief List of salaries payments */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -402,10 +403,10 @@ print ''; // Ref print ''; // Label -print ''; +print ''; // Date start print ''; // Type print ''; // Bank account -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { print ''; } // Amount print ''; +//Status print ''; // Extra fields @@ -476,7 +478,7 @@ print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "s.datesp,s.rowid", " print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "s.dateep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("DefaultPaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder); -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { print_liste_field_titre("DefaultBankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); } print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder); @@ -545,7 +547,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Label payment - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -563,7 +565,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Employee - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -577,7 +579,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Account - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { print ''; } diff --git a/htdocs/salaries/paiement_salary.php b/htdocs/salaries/paiement_salary.php index 1a3aad72eac..30279ee3538 100644 --- a/htdocs/salaries/paiement_salary.php +++ b/htdocs/salaries/paiement_salary.php @@ -23,6 +23,7 @@ * \brief Page to add payment of a salary */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; @@ -77,7 +78,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $error++; $action = 'create'; } - if (isModEnabled('banque') && !(GETPOST("accountid", 'int') > 0)) { + if (isModEnabled("banque") && !(GETPOST("accountid", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; $action = 'create'; diff --git a/htdocs/salaries/payment_salary/card.php b/htdocs/salaries/payment_salary/card.php index 2538be551f8..c9f0a151901 100644 --- a/htdocs/salaries/payment_salary/card.php +++ b/htdocs/salaries/payment_salary/card.php @@ -26,12 +26,13 @@ * \remarks Fichier presque identique a fournisseur/paiement/card.php */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; -if (isModEnabled('banque')) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'companies', 'salaries')); @@ -152,7 +153,7 @@ print ''; // Bank account -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); @@ -250,9 +251,9 @@ print '
    '; if ($action == '') { if ($user->rights->salaries->delete) { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1); } else { - print ''.$langs->trans('Delete').''; + print dolGetButtonAction($langs->trans("CantRemovePaymentSalaryPaid"), $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0); } } } diff --git a/htdocs/salaries/payments.php b/htdocs/salaries/payments.php index 64bc60b7a63..8fcc7183dae 100644 --- a/htdocs/salaries/payments.php +++ b/htdocs/salaries/payments.php @@ -24,6 +24,7 @@ * \brief List of salaries payments */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; @@ -443,12 +444,12 @@ print ''; -$form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, '', 1); print ''; // Chq number print '
    '; -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { // Bank transaction print '\n"; } else { - $disabled = (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false); + $disabled = (isModEnabled('multicompany') && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false); print ''; print '\n"; print ''; @@ -730,6 +745,22 @@ if ($conf->accounting->enabled) { print "\n"; } +// VAT ID +print ''; +print '\n"; + +if (!empty($conf->global->SOCIETE_VAT_INTRA_UNIQUE)) { + print ''; +} else { + print ''; +} +print ''; +print "\n"; + print "
    '; -print ''; +print ''; print ''; @@ -434,22 +435,23 @@ print ''; -$form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); + print $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth125', 1); print ''; $liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); -print $form->selectarray('search_status', $liststatus, $search_status, 1); +print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'onrightofpage'); print '".dol_trunc($obj->label, 40)."'.dol_escape_htmltag($obj->label)."".$userstatic->getNomUrl(1)."'.$userstatic->getNomUrl(1)."'; if ($obj->fk_account > 0) { //$accountstatic->fetch($obj->fk_bank); @@ -663,7 +665,7 @@ if ($num == 0) { } }*/ $colspan = 9; - if (isModEnabled('banque')) { $colspan++; } + if (isModEnabled("banque")) { $colspan++; } print '
    '.$langs->trans("NoRecordFound").'
    '.$langs->trans('Amount').''.price($object-> print '
    '.$langs->trans('Note').''.nl2br($object->note).'
    '; print ''; @@ -489,7 +490,7 @@ print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pst.code", "", $param, 'class="left"', $sortfield, $sortorder); print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "s.num_payment", "", $param, '', $sortfield, $sortorder, '', 'ChequeOrTransferNumber'); -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { print_liste_field_titre("BankTransactionLine", $_SERVER["PHP_SELF"], "s.fk_bank", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); } @@ -604,7 +605,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Account - if (isModEnabled('banque')) { + if (isModEnabled("banque")) { // Bank transaction print ''; $accountlinestatic->id = $obj->fk_bank; diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php index b3a8fdaa30e..ba5d254f22b 100644 --- a/htdocs/salaries/stats/index.php +++ b/htdocs/salaries/stats/index.php @@ -23,6 +23,7 @@ * \brief Page for statistics of module salaries */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salariesstats.class.php'; @@ -50,7 +51,7 @@ if ($user->socid) { } $result = restrictedArea($user, 'salaries', '', '', ''); -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS))); $endyear = $year; diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index 6b9a872be6c..6f9a24e27fc 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -24,6 +24,7 @@ * \brief Page to setup extra fields of contact */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -80,13 +81,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index c57f1ac00da..d466f1fe9a7 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -25,6 +25,7 @@ * \brief Third party module setup page */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -180,6 +181,20 @@ if ($action == "setaccountancycodecustomerinvoicemandatory") { } } +//Activate Set vat id unique +if ($action == "setvatintraunique") { + $setvatintraunique = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "SOCIETE_VAT_INTRA_UNIQUE", $setvatintraunique, 'yesno', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + //Activate Set ref in list if ($action == "setaddrefinlist") { $setaddrefinlist = GETPOST('value', 'int'); @@ -406,7 +421,7 @@ foreach ($arrayofmodules as $file => $modCodeTiers) { print img_picto($langs->trans("Activated"), 'switch_on'); print "
    '; if (!$disabled) { print ''; @@ -713,7 +728,7 @@ foreach ($profid as $key => $val) { $i++; } -if ($conf->accounting->enabled) { +if (isModEnabled('accounting')) { print '
    '.$langs->trans('CustomerAccountancyCodeShort')."
    '.$langs->trans('VATIntra')."'; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
    \n"; print ''; @@ -853,7 +884,7 @@ if (!empty($conf->global->CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST)) { print '
    '.$langs->trans("AskForPreferredShippingMethod").'
    trans('Gencod'); ?> control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?>
    trans("DefaultLang"); ?> control->tpl['select_lang']; ?>
    trans('Gencod'); ?> control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?>
    trans("DefaultLang"); ?> control->tpl['select_lang']; ?>
    trans('Gencod'); ?> control->tpl['barcode']; ?>control->tpl['effectif']; ?>
    trans("DefaultLang"); ?> control->tpl['default_lang']; ?>control->tpl['sales_representatives']; ?>
    trans("LinkedToDolibarrMember"); ?> control->tpl['linked_member']; ?>
    trans('Gencod'); ?>
    trans("DefaultLang"); ?> control->tpl['select_lang']; ?>
    trans('Gencod'); ?>
    trans("DefaultLang"); ?> control->tpl['select_lang']; ?>
    trans('Gencod'); ?> control->tpl['barcode']; ?>control->tpl['typent']; ?>
    trans("DefaultLang"); ?> control->tpl['default_lang']; ?>control->tpl['sales_representatives']; ?>
    trans("LinkedToDolibarrMember"); ?> control->tpl['linked_member']; ?>
    '; print '
    '.$form->editfieldkey('Vendor', 'fournisseur', '', $object, 0, 'string', '', 1).''; @@ -1483,11 +1524,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print ''; - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { + if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } print ''; - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { + if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) { print ''; // Barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { print ''; print ''; - print 'browser->layout == 'phone') || empty($conf->mailing->enabled) ? ' colspan="3"' : '').'>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' '; - if (!empty($conf->mailing->enabled) && !empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { + print 'browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' '; + if (isModEnabled('mailing') && !empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { if ($conf->browser->layout == 'phone') { print ''; } print ''; - print ''; + print ''; } print ''; print ''; print ''; + // Unsubscribe + if (!empty($conf->mailing->enabled)) { + if ($conf->use_javascript_ajax && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) { + print "\n".''."\n"; + } + if (!GETPOSTISSET("no_email") && !empty($object->email)) { + $result = $object->getNoEmail(); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + print ''; + print ''; + print ''; + print ''; + } + // Social networks - if (!empty($conf->socialnetworks->enabled)) { + if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { print ''; @@ -1729,12 +1799,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Capital print ''; print ''; } else { print ''.$langs->trans("Currency".$conf->currency).''; } - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''; @@ -1742,7 +1812,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print ''; print ''; print ''; print ''."\n"; } else { - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { $statstring = ""; $statstring .= ''; $statstring .= ""; } - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { $statstring .= ""; $statstring .= ''; $statstring .= ""; } $statstring2 = ''; - if (((isModEnabled('fournisseur') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->rights->supplier_order->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { + if (((isModEnabled('fournisseur') && $user->hasRight('fournisseur', 'facture', 'lire') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { $statstring2 = ""; $statstring2 .= ''; $statstring2 .= ""; @@ -193,7 +199,7 @@ $thirdpartygraph .= '
    '; $tmpcode = $object->code_fournisseur; if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { @@ -1508,7 +1549,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).''; print img_picto('', 'barcode', 'class="pictofixedwidth"'); @@ -1576,20 +1617,49 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Email / Web print '
    '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', empty($conf->global->SOCIETE_EMAIL_MANDATORY) ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY).'
    '.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'browser->layout == 'phone') || empty($conf->mailing->enabled) ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'
    '.$form->editfieldkey('Web', 'url', '', $object, 0).''.img_picto('', 'globe', 'class="pictofixedwidth"').'
    '; + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)); + print '
    '.$form->editfieldkey('Capital', 'capital', '', $object, 0).' '; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print ''.$langs->trans("Currency".$object->multicurrency_code).'
    '.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).''."\n"; print img_picto('', 'language', 'class="pictofixedwidth"').$formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); print '
    '.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).''; @@ -1751,7 +1821,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { $langs->load('categories'); // Customer @@ -1768,7 +1838,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Supplier - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { print '
    '.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1); print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0); @@ -1777,7 +1847,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print '
    '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; @@ -1823,7 +1893,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { print ''; - if (! empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { // Accountancy_code_sell print ''; print ''; // Supplier - if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) - || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { + if (((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) + || (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->lire))) { print ''; print ''; print ''; } print ''; @@ -2205,7 +2277,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { print ''; print ''; // EMail / Web - print ''; - print ''; print ''; - print ''; + print ''; + + // EMail + print ''; + print ''; + if (!empty($conf->mailing->enabled)) { + $langs->load("mails"); + print ''; + print ''; + } else { + print ''; + } + print ''; + + // Unsubscribe + if (!empty($conf->mailing->enabled)) { + if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) { + print "\n".''."\n"; + } + if (!GETPOSTISSET("no_email") && !empty($object->email)) { + $result = $object->getNoEmail(); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + print ''; + print ''; + print ''; + print ''; + } // Social network - if (!empty($conf->socialnetworks->enabled)) { + if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { print ''; @@ -2428,14 +2548,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; } else { print '"> '.$langs->trans("Currency".$conf->currency).''; } // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''; @@ -2443,7 +2563,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print ''; print ''; print '"; // Supplier - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { + if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) { print ''; print ''; print ''; print ''; + print ''; + print ''; + } + // Webservices url/key if (!empty($conf->syncsupplierwebservices->enabled)) { print ''; @@ -2551,7 +2681,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print '
    '.$langs->trans("ProductAccountancySellCode").''; @@ -1916,9 +1986,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->town = GETPOST('town', 'alphanohtml'); $object->country_id = GETPOST('country_id') ?GETPOST('country_id', 'int') : $mysoc->country_id; $object->state_id = GETPOST('state_id', 'int'); + $object->parent = GETPOST('parent_company_id', 'int'); $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { + if (isModEnabled('socialnetworks')) { foreach ($socialnetworks as $key => $value) { if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); @@ -1929,6 +2000,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); + $object->no_email = GETPOST("no_email", "int"); $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); $object->capital = GETPOST('capital', 'alphanohtml'); $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); @@ -1971,7 +2043,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } //Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('lcoation_incoterms', 'alpha'); } @@ -1991,7 +2063,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // We set multicurrency_code if enabled - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $object->multicurrency_code = GETPOST('multicurrency_code') ? GETPOST('multicurrency_code') : $object->multicurrency_code; } } @@ -2165,8 +2237,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).''; @@ -2176,7 +2248,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { + if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } print '
    '.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).''; print img_picto('', 'barcode'); @@ -2270,13 +2342,61 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').'
    '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''.img_picto('', 'object_email', 'class="pictofixedwidth"').'
    '.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).''.img_picto('', 'globe', 'class="pictofixedwidth"').'
    '.img_picto('', 'globe', 'class="pictofixedwidth"').'
    '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''; + print img_picto('', 'object_email'); + print ''.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '; + $useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)); + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty); + print '
    '.$form->editfieldkey('Capital', 'capital', '', $object, 0).' '.$langs->trans("Currency".$object->multicurrency_code).'
    '.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).''."\n"; print img_picto('', 'language').$formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1); print '
    '.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).''; @@ -2452,7 +2572,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { // Customer print '
    '.$form->editfieldkey('CustomersCategoriesShort', 'custcats', '', $object, 0).''; @@ -2467,7 +2587,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "
    '.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1); @@ -2483,7 +2603,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print '
    '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; @@ -2495,6 +2615,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + // Parent company + if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { + print '
    '.$langs->trans('ParentCompany').''; + print img_picto('', 'company', 'class="paddingrightonly"'); + print $form->select_company(GETPOST('parent_company_id') ? GETPOST('parent_company_id') : $object->parent, 'parent_company_id', '', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); + print '
    '.$form->editfieldkey('WebServiceURL', 'webservices_url', '', $object, 0).'
    '; - if (! empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { // Accountancy_code_sell print ''; print ''; @@ -2816,7 +2946,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) { + if (isModEnabled('stock') && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) { $langs->load('stocks'); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -2877,7 +3007,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '.$langs->trans("ProductAccountancySellCode").''; @@ -2672,7 +2802,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Supplier code - if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { + if (((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print '
    '; print $langs->trans('SupplierCode').''; print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); @@ -2685,7 +2815,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Barcode - if (!empty($conf->barcode->enabled)) { + if (isModEnabled('barcode')) { print '
    '; print $langs->trans('Gencod').''.showValueWithClipboardCPButton(dol_escape_htmltag($object->barcode)); print ''.$langs->trans('VATIntra').''; if ($object->tva_intra) { $s = ''; - $s .= dol_print_profids($object->tva_intra, 'VATIntra', $object->country_code, 1); + $s .= dol_print_profids($object->tva_intra, 'VAT', $object->country_code, 1); $s .= ''; if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { @@ -2848,7 +2978,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; // Tags / categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { // Customer if ($object->prospect || $object->client || !empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT)) { print ''; @@ -2887,7 +3017,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Supplier - if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { + if (((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print ''; print ''; + // Email + if (!empty($conf->mailing->enabled)) { + $langs->load("mails"); + print ''; + print ''; + } + + // Unsubscribe opt-out + if (!empty($conf->mailing->enabled)) { + $result = $object->getNoEmail(); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + print ''; + } + // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print ''; print ''; print ''; print ''; + // delivery planned date + if ($type_element == 'order' || $type_element == 'supplier_order') { + print ''; + } print ''; print ''; print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, '', $sortfield, $sortorder, 'center '); + // delivery planned date + if ($type_element == 'order' || $type_element == 'supplier_order') { + print_liste_field_titre('DateDeliveryPlanned', $_SERVER['PHP_SELF'], 'delivery_planned_date', '', $param, '', $sortfield, $sortorder, 'center '); + } print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right '); @@ -494,6 +502,10 @@ if ($sql_select) { print $documentstatic->getNomUrl(1); print ''; print ''; + // delivery planned date + if ($type_element == 'order' || $type_element == 'supplier_order') { + print ''; + } // Status print ''; @@ -674,6 +686,10 @@ if ($sql_select) { print ''; print ''; print ''; + // delivery planned date + if ($type_element == 'order' || $type_element == 'supplier_order') { + print ''; + } print ''; print ''; print ''; diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php index 4ecfc2a8cf4..f477935d994 100644 --- a/htdocs/societe/contact.php +++ b/htdocs/societe/contact.php @@ -31,6 +31,7 @@ * \brief Page of contacts of thirdparties */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; @@ -42,35 +43,42 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->adherent->enabled)) { +if (isModEnabled('adherent')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; } +// Load translation files required by the page $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); -if (!empty($conf->categorie->enabled)) { + +if (isModEnabled('categorie')) { $langs->load("categories"); } -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load("incoterm"); } -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); } $mesg = ''; $error = 0; $errors = array(); + +// Get parameters $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'); -$cancel = GETPOST('cancel', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$confirm = GETPOST('confirm'); -$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); +$confirm = GETPOST('confirm'); +$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); + if ($user->socid) { $socid = $user->socid; } + if (empty($socid) && $action == 'view') { $action = 'create'; } +// Initialize objects $object = new Societe($db); $extrafields = new ExtraFields($db); diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 707c573f116..3f6b10c7236 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -26,30 +26,36 @@ * \ingroup societe */ +// Load Dolibarr environment require '../main.inc.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("companies", "other")); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); -$ref = GETPOST('ref', 'alpha'); // Get parameters -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'aZ09comma'); -$sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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; + +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; @@ -65,6 +71,7 @@ if (!$sortfield) { $sortfield = "position_name"; } +// Initialize objects $object = new Societe($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); @@ -76,7 +83,7 @@ if ($id > 0 || !empty($ref)) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartydocument', 'globalcard')); -$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php // Security check if ($user->socid > 0) { @@ -85,7 +92,9 @@ if ($user->socid > 0) { } $result = restrictedArea($user, 'societe', $object->id, '&societe'); -$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles +if (empty($object->id)) { + accessforbidden(); +} /* @@ -108,88 +117,80 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $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 = societe_prepare_head($object); - - $form = new Form($db); - - print dol_get_fiche_head($head, 'document', $langs->trans("ThirdParty"), -1, 'company'); - - - // Build file list - $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']; - } - - $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); - - print '
    '; - - print '
    '; - print '
    '.$langs->trans("CustomersCategoriesShort").'
    '.$langs->trans("SuppliersCategoriesShort").''; print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1); @@ -2899,7 +3029,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Third-Party Type print '
    '; print ''; - if ($action != 'editthirdpartytype' && $user->rights->societe->creer) { + if ($action != 'editthirdpartytype' && $user->hasRight('societe', 'creer')) { print ''; } print '
    '.$langs->trans('ThirdPartyType').'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
    '; @@ -2919,7 +3049,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Capital print '
    '.$langs->trans('Capital').''; if ($object->capital) { - if (!empty($conf->multicurrency->enabled) && !empty($object->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($object->multicurrency_code)) { print price($object->capital, '', $langs, 0, -1, -1, $object->multicurrency_code); } else { print price($object->capital, '', $langs, 0, -1, -1, $conf->currency); @@ -2929,8 +3059,30 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print '
    '.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '.$langs->trans("No_Email").''; + if ($object->email) { + print yn($object->no_email); + } else { + print ''.$langs->trans("EMailNotDefined").''; + } + print '
    '.$langs->trans("DefaultLang").''; //$s=picto_from_langcode($object->default_lang); @@ -2943,10 +3095,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print '
    '; print ''; - if ($action != 'editincoterm' && $user->rights->societe->creer) { + if ($action != 'editincoterm' && $user->hasRight('societe', 'creer')) { print ''; } print '
    '.$langs->trans('IncotermLabel').''.img_edit('', 1).'
    '; @@ -2960,7 +3112,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print '
    '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; @@ -2973,8 +3125,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancySellCode"); print ''; - if (! empty($conf->accounting->enabled)) { - if (! empty($object->accountancy_code_sell)) { + if (isModEnabled('accounting')) { + if (!empty($object->accountancy_code_sell)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->accountancy_code_sell, 1); @@ -2989,8 +3141,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
    '; print $langs->trans("ProductAccountancyBuyCode"); print ''; - if (! empty($conf->accounting->enabled)) { - if (! empty($object->accountancy_code_buy)) { + if (isModEnabled('accounting')) { + if (!empty($object->accountancy_code_buy)) { $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $object->accountancy_code_buy, 1); @@ -3010,7 +3162,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { print '
    '; print ''; - if ($action != 'editparentcompany' && $user->rights->societe->creer) { + if ($action != 'editparentcompany' && $user->hasRight('societe', 'creer')) { print ''; } print '
    '.$langs->trans('ParentCompany').'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
    '; @@ -3024,7 +3176,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php'; // Module Adherent - if (!empty($conf->adherent->enabled)) { + if (isModEnabled('adherent')) { $langs->load("members"); print '
    '.$langs->trans("LinkedToDolibarrMember").''; @@ -3097,7 +3249,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); - if (!empty($conf->adherent->enabled)) { + if (isModEnabled('adherent')) { $adh = new Adherent($db); $result = $adh->fetch('', '', $object->id); if ($result == 0 && ($object->client == 1 || $object->client == 3) && !empty($conf->global->MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS)) { @@ -3107,7 +3259,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dolGetButtonAction($langs->trans('MergeThirdparties'), $langs->trans('Merge'), 'danger', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=merge&token='.newToken(), '', $permissiontodelete); - if ($user->rights->societe->supprimer) { + if ($user->hasRight('societe', 'supprimer')) { $deleteUrl = $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=delete&token='.newToken(); $buttonId = 'action-delete-no-ajax'; if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) { // We can't use preloaded confirm form with jmobile @@ -3137,8 +3289,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { */ $filedir = $conf->societe->multidir_output[$object->entity].'/'.$object->id; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$object->id; - $genallowed = $user->rights->societe->lire; - $delallowed = $user->rights->societe->creer; + $genallowed = $user->hasRight('societe', 'lire'); + $delallowed = $user->hasRight('societe', 'creer'); print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang); } diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index 3e7e1ac2080..e79c39a1955 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -97,6 +97,10 @@ class Contacts extends DolibarrApi $this->contact->fetchRoles(); } + if (isModEnabled('mailing')) { + $this->contact->getNoEmail(); + } + return $this->_cleanObjectDatas($this->contact); } @@ -141,6 +145,10 @@ class Contacts extends DolibarrApi $this->contact->fetchRoles(); } + if (isModEnabled('mailing')) { + $this->contact->getNoEmail(); + } + return $this->_cleanObjectDatas($this->contact); } @@ -250,6 +258,9 @@ class Contacts extends DolibarrApi if ($includeroles) { $contact_static->fetchRoles(); } + if (isModEnabled('mailing')) { + $contact_static->getNoEmail(); + } $obj_ret[] = $this->_cleanObjectDatas($contact_static); } @@ -285,6 +296,9 @@ class Contacts extends DolibarrApi if ($this->contact->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating contact", array_merge(array($this->contact->error), $this->contact->errors)); } + if (isModEnabled('mailing') && !empty($this->contact->email) && isset($this->contact->no_email)) { + $this->contact->setNoEmail($this->contact->no_email); + } return $this->contact->id; } @@ -317,6 +331,10 @@ class Contacts extends DolibarrApi $this->contact->$field = $value; } + if (isModEnabled('mailing') && !empty($this->contact->email) && isset($this->contact->no_email)) { + $this->contact->setNoEmail($this->contact->no_email); + } + if ($this->contact->update($id, DolibarrApiAccess::$user, 1, '', '', 'update')) { return $this->get($id); } diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index aa97b49d8bf..db7eec3096e 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -132,7 +132,7 @@ class Thirdparties extends DolibarrApi { $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -230,6 +230,9 @@ class Thirdparties extends DolibarrApi $obj = $this->db->fetch_object($result); $soc_static = new Societe($this->db); if ($soc_static->fetch($obj->rowid)) { + if (isModEnabled('mailing')) { + $soc_static->getNoEmail(); + } $obj_ret[] = $this->_cleanObjectDatas($soc_static); } $i++; @@ -263,6 +266,9 @@ class Thirdparties extends DolibarrApi if ($this->company->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors)); } + if (isModEnabled('mailing') && !empty($this->company->email) && isset($this->company->no_email)) { + $this->company->setNoEmail($this->company->no_email); + } return $this->company->id; } @@ -296,7 +302,11 @@ class Thirdparties extends DolibarrApi $this->company->$field = $value; } - if ($this->company->update($id, DolibarrApiAccess::$user, 1, '', '', 'update')) { + if (isModEnabled('mailing') && !empty($this->company->email) && isset($this->company->no_email)) { + $this->company->setNoEmail($this->company->no_email); + } + + if ($this->company->update($id, DolibarrApiAccess::$user, 1, '', '', 'update', 1)) { return $this->get($id); } @@ -512,12 +522,12 @@ class Thirdparties extends DolibarrApi /** * Delete thirdparty * - * @param int $id Thirparty ID + * @param int $id Thirdparty ID * @return integer */ public function delete($id) { - if (!DolibarrApiAccess::$user->rights->societe->supprimer) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'supprimer')) { throw new RestException(401); } $result = $this->company->fetch($id); @@ -563,7 +573,7 @@ class Thirdparties extends DolibarrApi { global $conf; - if (empty($conf->societe->enabled)) { + if (!isModEnabled('societe')) { throw new RestException(501, 'Module "Thirdparties" needed for this request'); } @@ -851,7 +861,7 @@ class Thirdparties extends DolibarrApi */ public function getOutStandingProposals($id, $mode = 'customer') { - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -893,7 +903,7 @@ class Thirdparties extends DolibarrApi */ public function getOutStandingOrder($id, $mode = 'customer') { - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -934,7 +944,7 @@ class Thirdparties extends DolibarrApi */ public function getOutStandingInvoices($id, $mode = 'customer') { - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -975,7 +985,7 @@ class Thirdparties extends DolibarrApi */ public function getSalesRepresentatives($id, $mode = 0) { - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -1018,7 +1028,7 @@ class Thirdparties extends DolibarrApi { $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -1368,8 +1378,8 @@ class Thirdparties extends DolibarrApi $outputlangs = $langs; $newlang = ''; - //if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + //if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { if (isset($this->company->thirdparty->default_lang)) { $newlang = $this->company->thirdparty->default_lang; // for proposal, order, invoice, ... } elseif (isset($this->company->default_lang)) { @@ -1441,7 +1451,7 @@ class Thirdparties extends DolibarrApi */ public function getSocieteAccounts($id, $site = null) { - if (!DolibarrApiAccess::$user->rights->societe->lire) { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(401); } @@ -1797,6 +1807,10 @@ class Thirdparties extends DolibarrApi unset($object->particulier); unset($object->prefix_comm); + unset($object->siren); + unset($object->siret); + unset($object->ape); + unset($object->commercial_id); // This property is used in create/update only. It does not exists in read mode because there is several sales representatives. unset($object->total_ht); @@ -1868,8 +1882,8 @@ class Thirdparties extends DolibarrApi { global $conf; - if (!DolibarrApiAccess::$user->rights->societe->lire) { - throw new RestException(401); + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on thirdparties.'); } if ($rowid === 0) { @@ -1882,7 +1896,10 @@ class Thirdparties extends DolibarrApi } if (!DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login.' on this thirdparty'); + } + if (isModEnabled('mailing')) { + $this->company->getNoEmail(); } if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index c4c75078fc3..d81a360e7d2 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -47,6 +47,9 @@ class CompanyBankAccount extends Account public $rum; public $date_rum; + public $stripe_card_ref; // ID of BAN into an external payment system + public $stripe_account; // Account of the external payment system + /** * Date creation record (datec) * @@ -127,7 +130,7 @@ class CompanyBankAccount extends Account // End call triggers if (!$error) { - return 1; + return $this->id; } else { return 0; } @@ -136,7 +139,7 @@ class CompanyBankAccount extends Account } } } else { - print $this->db->error(); + $this->error = $this->db->lasterror(); return 0; } } @@ -150,7 +153,7 @@ class CompanyBankAccount extends Account */ public function update(User $user = null, $notrigger = 0) { - global $conf; + global $conf, $langs; $error = 0; @@ -187,6 +190,8 @@ class CompanyBankAccount extends Account } else { $sql .= ",label = NULL"; } + $sql .= ",stripe_card_ref = '".$this->db->escape($this->stripe_card_ref)."'"; + $sql .= ",stripe_account = '".$this->db->escape($this->stripe_account)."'"; $sql .= " WHERE rowid = ".((int) $this->id); $result = $this->db->query($sql); @@ -207,7 +212,11 @@ class CompanyBankAccount extends Account return 1; } } else { - $this->error = $this->db->lasterror(); + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $this->error = $langs->trans('ErrorDuplicateField'); + } else { + $this->error = $this->db->lasterror(); + } return -1; } } @@ -228,7 +237,8 @@ class CompanyBankAccount extends Account } $sql = "SELECT rowid, type, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; - $sql .= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur, date_rum"; + $sql .= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur, date_rum,"; + $sql .= " stripe_card_ref, stripe_account"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib"; if ($id) { $sql .= " WHERE rowid = ".((int) $id); @@ -269,6 +279,8 @@ class CompanyBankAccount extends Account $this->rum = $obj->rum; $this->frstrecur = $obj->frstrecur; $this->date_rum = $this->db->jdate($obj->date_rum); + $this->stripe_card_ref = $obj->stripe_card_ref; + $this->stripe_account = $obj->stripe_account; } $this->db->free($resql); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 2cce0ccac86..17889026e89 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -235,7 +235,7 @@ class CompanyPaymentMode extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } } @@ -329,7 +329,7 @@ class CompanyPaymentMode extends CommonObject // For backward compatibility $this->iban = $this->iban_prefix; - //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); + //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5876e8aff4a..3643a404863 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -15,8 +15,9 @@ * Copyright (C) 2017 Rui Strecht * Copyright (C) 2018 Philippe Grand * Copyright (C) 2019-2020 Josep Lluís Amador - * Copyright (C) 2019-2021 Frédéric France + * Copyright (C) 2019-2022 Frédéric France * Copyright (C) 2020 Open-Dsi + * Copyright (C) 2022 ButterflyOfFire * * 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 @@ -195,7 +196,7 @@ class Societe extends CommonObject 'fk_stcomm' =>array('type'=>'integer', 'label'=>'CommercialStatus', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>220), 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>225), 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>230), - 'prefix_comm' =>array('type'=>'varchar(5)', 'label'=>'Prefix comm', 'enabled'=>'$conf->global->SOCIETE_USEPREFIX', 'visible'=>-1, 'position'=>235), + 'prefix_comm' =>array('type'=>'varchar(5)', 'label'=>'Prefix comm', 'enabled'=>"getDolGlobalInt('SOCIETE_USEPREFIX')", 'visible'=>-1, 'position'=>235), 'client' =>array('type'=>'tinyint(4)', 'label'=>'Client', 'enabled'=>1, 'visible'=>-1, 'position'=>240), 'fournisseur' =>array('type'=>'tinyint(4)', 'label'=>'Fournisseur', 'enabled'=>1, 'visible'=>-1, 'position'=>245), 'supplier_account' =>array('type'=>'varchar(32)', 'label'=>'Supplier account', 'enabled'=>1, 'visible'=>-1, 'position'=>250), @@ -213,8 +214,8 @@ class Societe extends CommonObject 'mode_reglement_supplier' =>array('type'=>'integer', 'label'=>'Mode reglement supplier', 'enabled'=>1, 'visible'=>-1, 'position'=>305), 'cond_reglement_supplier' =>array('type'=>'integer', 'label'=>'Cond reglement supplier', 'enabled'=>1, 'visible'=>-1, 'position'=>308), 'outstanding_limit' =>array('type'=>'double(24,8)', 'label'=>'OutstandingBill', 'enabled'=>1, 'visible'=>-1, 'position'=>310, 'isameasure'=>1), - 'order_min_amount' =>array('type'=>'double(24,8)', 'label'=>'Order min amount', 'enabled'=>'!empty($conf->commande->enabled) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)', 'visible'=>-1, 'position'=>315, 'isameasure'=>1), - 'supplier_order_min_amount' =>array('type'=>'double(24,8)', 'label'=>'Supplier order min amount', 'enabled'=>'!empty($conf->commande->enabled) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)', 'visible'=>-1, 'position'=>320, 'isameasure'=>1), + 'order_min_amount' =>array('type'=>'double(24,8)', 'label'=>'Order min amount', 'enabled'=>'isModEnabled("commande") && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)', 'visible'=>-1, 'position'=>315, 'isameasure'=>1), + 'supplier_order_min_amount' =>array('type'=>'double(24,8)', 'label'=>'Supplier order min amount', 'enabled'=>'isModEnabled("commande") && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)', 'visible'=>-1, 'position'=>320, 'isameasure'=>1), 'fk_shipping_method' =>array('type'=>'integer', 'label'=>'Fk shipping method', 'enabled'=>1, 'visible'=>-1, 'position'=>330), 'tva_assuj' =>array('type'=>'tinyint(4)', 'label'=>'Tva assuj', 'enabled'=>1, 'visible'=>-1, 'position'=>335), 'localtax1_assuj' =>array('type'=>'tinyint(4)', 'label'=>'Localtax1 assuj', 'enabled'=>1, 'visible'=>-1, 'position'=>340), @@ -231,6 +232,7 @@ class Societe extends CommonObject 'fk_incoterms' =>array('type'=>'integer', 'label'=>'Fk incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>425), 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'Location incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>430), 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>435), + 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270), 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>440), 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>445), 'fk_account' =>array('type'=>'integer', 'label'=>'AccountingAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>450), @@ -698,12 +700,6 @@ class Societe extends CommonObject */ public $ref; - /** - * @var string Internal ref - * @deprecated - */ - public $ref_int; - /** * External user reference. * This is to allow external systems to store their id and make self-developed synchronizing functions easier to build. @@ -800,36 +796,41 @@ class Societe extends CommonObject */ public $bank_account; + + const STATUS_CEASED = 0; + const STATUS_INACTIVITY = 1; + /** - * Third party is no customer + * Third party type is no customer */ const NO_CUSTOMER = 0; /** - * Third party is a customer + * Third party type is a customer */ const CUSTOMER = 1; /** - * Third party is a prospect + * Third party type is a prospect */ const PROSPECT = 2; /** - * Third party is a customer and a prospect + * Third party type is a customer and a prospect */ const CUSTOMER_AND_PROSPECT = 3; /** - * Third party is no supplier + * Third party supplier flag is not supplier */ const NO_SUPPLIER = 0; /** - * Third party is a supplier + * Third party supplier flag is a supplier */ const SUPPLIER = 1; + /** * Constructor * @@ -1095,7 +1096,7 @@ class Societe extends CommonObject } } - if (empty($error) && !empty($conf->mailing->enabled) && !empty($contact->email) && isset($no_email)) { + if (empty($error) && isModEnabled('mailing') && !empty($contact->email) && isset($no_email)) { $result = $contact->setNoEmail($no_email); if ($result < 0) { $this->error = $contact->error; @@ -1175,7 +1176,7 @@ class Societe extends CommonObject } // Check for duplicate or mandatory fields defined into setup - $array_to_check = array('IDPROF1', 'IDPROF2', 'IDPROF3', 'IDPROF4', 'IDPROF5', 'IDPROF6', 'EMAIL'); + $array_to_check = array('IDPROF1', 'IDPROF2', 'IDPROF3', 'IDPROF4', 'IDPROF5', 'IDPROF6', 'EMAIL', 'TVA_INTRA'); foreach ($array_to_check as $key) { $keymin = strtolower($key); $i = (int) preg_replace('/[^0-9]/', '', $key); @@ -1220,6 +1221,14 @@ class Societe extends CommonObject $error++; $this->errors[] = $langs->trans('Email')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; } } + } elseif ($key == 'TVA_INTRA') { + // Check for unicity + if ($vallabel && !empty($conf->global->SOCIETE_VAT_INTRA_UNIQUE)) { + if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { + $langs->load("errors"); + $error++; $this->errors[] = $langs->trans('VATIntra')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; + } + } } } } @@ -1269,7 +1278,6 @@ class Societe extends CommonObject $this->address = $this->address ?trim($this->address) : trim($this->address); $this->zip = $this->zip ?trim($this->zip) : trim($this->zip); $this->town = $this->town ?trim($this->town) : trim($this->town); - $this->setUpperOrLowerCase(); $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0) ? $this->country_id : 0; $this->phone = trim($this->phone); @@ -1278,7 +1286,7 @@ class Societe extends CommonObject $this->fax = trim($this->fax); $this->fax = preg_replace("/\s/", "", $this->fax); $this->fax = preg_replace("/\./", "", $this->fax); - $this->email = trim($this->email); + $this->email = trim($this->email); $this->url = $this->url ?clean_url($this->url, 0) : ''; $this->note_private = trim($this->note_private); $this->note_public = trim($this->note_public); @@ -1411,7 +1419,7 @@ class Societe extends CommonObject } } } - + $this->setUpperOrLowerCase(); if ($result >= 0) { dol_syslog(get_class($this)."::update verify ok or not done"); @@ -1560,7 +1568,7 @@ class Societe extends CommonObject if (!$error && $nbrowsaffected) { // Update information on linked member if it is an update - if (!$nosyncmember && !empty($conf->adherent->enabled)) { + if (!$nosyncmember && isModEnabled('adherent')) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; dol_syslog(get_class($this)."::update update linked member"); @@ -1580,6 +1588,7 @@ class Societe extends CommonObject $lmember->phone = $this->phone; $lmember->state_id = $this->state_id; $lmember->country_id = $this->country_id; + $lmember->default_lang = $this->default_lang; $result = $lmember->update($user, 0, 1, 1, 1); // Use nosync to 1 to avoid cyclic updates if ($result < 0) { @@ -1706,13 +1715,13 @@ class Societe extends CommonObject $sql .= ', s.tms as date_modification, s.fk_user_creat, s.fk_user_modif'; $sql .= ', s.phone, s.fax, s.email'; $sql .= ', s.socialnetworks'; - $sql .= ', s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur'; + $sql .= ', s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; $sql .= ', s.fk_effectif as effectif_id'; $sql .= ', s.fk_forme_juridique as forme_juridique_code'; - $sql .= ', s.webservices_url, s.webservices_key, s.model_pdf'; + $sql .= ', s.webservices_url, s.webservices_key, s.model_pdf, s.last_main_doc'; if (empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) { $sql .= ', s.code_compta, s.code_compta_fournisseur, s.accountancy_code_buy, s.accountancy_code_sell'; } else { @@ -1735,7 +1744,7 @@ class Societe extends CommonObject $sql .= ', st.libelle as stcomm, st.picto as stcomm_picto'; $sql .= ', te.code as typent_code'; $sql .= ', i.libelle as label_incoterms'; - if (empty($conf->multicompany->enabled)) { + if (!isModEnabled('multicompany')) { $sql .= ', s.remise_client, s.remise_supplier'; } else { $sql .= ', sr.remise_client, sr2.remise_supplier'; @@ -1754,7 +1763,7 @@ class Societe extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid'; // With default setup, llx_societe_remise is a history table in default setup and current value is in llx_societe. // We use it for real value when multicompany is on. A better place would be into llx_societe_perentity. - if (!empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity IN ('.getEntity('discount').'))'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise_supplier as sr2 ON sr2.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise_supplier WHERE fk_soc = s.rowid AND entity IN ('.getEntity('discount').'))'; } @@ -1842,7 +1851,7 @@ class Societe extends CommonObject $this->stcomm_picto = $obj->stcomm_picto; // picto statut commercial $this->email = $obj->email; - $this->socialnetworks = (array) json_decode($obj->socialnetworks, true); + $this->socialnetworks = ($obj->socialnetworks ? (array) json_decode($obj->socialnetworks, true) : array()); $this->url = $obj->url; $this->phone = $obj->phone; @@ -1943,7 +1952,10 @@ class Societe extends CommonObject // multicurrency $this->fk_multicurrency = $obj->fk_multicurrency; $this->multicurrency_code = $obj->multicurrency_code; + + // pdf $this->model_pdf = $obj->model_pdf; + $this->last_main_doc = $obj->last_main_doc; $result = 1; @@ -2272,14 +2284,15 @@ class Societe extends CommonObject /** * Add a discount for third party * - * @param float $remise Amount of discount - * @param User $user User adding discount - * @param string $desc Reason of discount - * @param string $vatrate VAT rate (may contain the vat code too). Exemple: '1.23', '1.23 (ABC)', ... - * @param int $discount_type 0 => customer discount, 1 => supplier discount - * @return int <0 if KO, id of discount record if OK + * @param float $remise Amount of discount + * @param User $user User adding discount + * @param string $desc Reason of discount + * @param string $vatrate VAT rate (may contain the vat code too). Exemple: '1.23', '1.23 (ABC)', ... + * @param int $discount_type 0 => customer discount, 1 => supplier discount + * @param string $price_base_type Price base type 'HT' or 'TTC' + * @return int <0 if KO, id of discount record if OK */ - public function set_remise_except($remise, User $user, $desc, $vatrate = '', $discount_type = 0) + public function set_remise_except($remise, User $user, $desc, $vatrate = '', $discount_type = 0, $price_base_type = 'HT') { // phpcs:enable global $langs; @@ -2314,9 +2327,15 @@ class Societe extends CommonObject $discount->discount_type = $discount_type; - $discount->amount_ht = $discount->multicurrency_amount_ht = price2num($remise, 'MT'); - $discount->amount_tva = $discount->multicurrency_amount_tva = price2num($remise * $vatrate / 100, 'MT'); - $discount->amount_ttc = $discount->multicurrency_amount_ttc = price2num($discount->amount_ht + $discount->amount_tva, 'MT'); + if ($price_base_type == 'TTC') { + $discount->amount_ttc = $discount->multicurrency_amount_ttc = price2num($remise, 'MT'); + $discount->amount_ht = $discount->multicurrency_amount_ht = price2num($remise / (1 + $vatrate / 100), 'MT'); + $discount->amount_tva = $discount->multicurrency_amount_tva = price2num($discount->amount_ttc - $discount->amount_ht, 'MT'); + } else { + $discount->amount_ht = $discount->multicurrency_amount_ht = price2num($remise, 'MT'); + $discount->amount_tva = $discount->multicurrency_amount_tva = price2num($remise * $vatrate / 100, 'MT'); + $discount->amount_ttc = $discount->multicurrency_amount_ttc = price2num($discount->amount_ht + $discount->amount_tva, 'MT'); + } $discount->tva_tx = price2num($vatrate); $discount->vat_src_code = $vat_src_code; @@ -2376,7 +2395,7 @@ class Societe extends CommonObject $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut as status, u.entity, u.photo, u.gender"; $sql .= ", u.office_fax, u.user_mobile, u.personal_mobile"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = sc.fk_user"; $sql .= " AND ug.entity = ".$conf->entity.")"; @@ -2656,11 +2675,16 @@ class Societe extends CommonObject if (isset($this->status)) { $label .= ' '.$this->getLibStatut(5); } + if (isset($this->client) && isset($this->fournisseur)) { + $label .= '   '; + $label .= $this->getTypeUrl(1); + } $label .= '
    '.$langs->trans('Name').': '.dol_escape_htmltag($this->name); if (!empty($this->name_alias)) { $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; } + if ($this->email) { $label .= '
    '.img_picto('', 'email', 'class="pictofixedwidth"').$this->email; } @@ -2710,10 +2734,10 @@ class Societe extends CommonObject if (!empty($this->code_fournisseur) && $this->fournisseur) { $label2 .= '
    '.$langs->trans('SupplierCode').': '.$this->code_fournisseur; } - if (!empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3)) { + if (isModEnabled('accounting') && ($this->client == 1 || $this->client == 3)) { $label2 .= '
    '.$langs->trans('CustomerAccountancyCode').': '.($this->code_compta ? $this->code_compta : $this->code_compta_client); } - if (!empty($conf->accounting->enabled) && $this->fournisseur) { + if (isModEnabled('accounting') && $this->fournisseur) { $label2 .= '
    '.$langs->trans('SupplierAccountancyCode').': '.$this->code_compta_fournisseur; } $label .= ($label2 ? '
    '.$label2 : '').''; @@ -2807,7 +2831,7 @@ class Societe extends CommonObject } } if (empty($option) || preg_match('/supplier/', $option)) { - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $this->fournisseur) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $this->fournisseur) { $s .= '<'.$tag.' class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).''; } } @@ -3597,14 +3621,14 @@ class Societe extends CommonObject } //Verify duplicate entries - $sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$this->db->escape($value)."' AND entity IN (".getEntity('societe').")"; + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$this->db->escape($value)."' AND entity IN (".getEntity('societe').")"; if ($socid) { $sql .= " AND rowid <> ".$socid; } $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - $count = $obj->idprof; + $count = $obj->nb; } else { $count = 0; print $this->db->error(); @@ -3791,6 +3815,20 @@ class Societe extends CommonObject } } + //Verify NIF if country is DZ + //Returns: 1 if NIF ok, -1 if NIF bad, 0 if unexpected bad + if ($idprof == 1 && $soc->country_code == 'DZ') { + $string = trim($this->idprof1); + $string = preg_replace('/(\s)/', '', $string); + + //Check NIF + if (preg_match('/(^[0-9]{15}$)/', $string)) { + return 1; + } else { + return -1; + } + } + return $ok; } @@ -3833,6 +3871,9 @@ class Societe extends CommonObject if ($idprof == 1 && $thirdparty->country_code == 'IN') { $url = 'http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber='.$strippedIdProf1.';&searchBy=TIN&backPage=searchByTin_Inter.jsp'; } + if ($idprof == 1 && $thirdparty->country_code == 'DZ') { + $url = 'http://nif.mfdgi.gov.dz/nif.asp?Nif='.$strippedIdProf1; + } if ($idprof == 1 && $thirdparty->country_code == 'PT') { $url = 'http://www.nif.pt/'.$strippedIdProf1; } @@ -3990,6 +4031,111 @@ class Societe extends CommonObject return -1; } + /** + * Return number of mass Emailing received by this contacts with its email + * + * @return int Number of EMailings + */ + public function getNbOfEMailings() + { + $sql = "SELECT count(mc.email) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."mailing as m"; + $sql .= " WHERE mc.fk_mailing=m.rowid AND mc.email = '".$this->db->escape($this->email)."' "; + $sql .= " AND m.entity IN (".getEntity($this->element).") AND mc.statut NOT IN (-1,0)"; // -1 error, 0 not sent, 1 sent with success + + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $nb = $obj->nb; + + $this->db->free($resql); + return $nb; + } else { + $this->error = $this->db->error(); + return -1; + } + } + + /** + * Set "blacklist" mailing status + * + * @param int $no_email 1=Do not send mailing, 0=Ok to recieve mailling + * @return int <0 if KO, >0 if OK + */ + public function setNoEmail($no_email) + { + $error = 0; + + // Update mass emailing flag into table mailing_unsubscribe + if ($this->email) { + $this->db->begin(); + + if ($no_email) { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$this->db->escape($this->email)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $noemail = $obj->nb; + if (empty($noemail)) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$this->db->escape($this->email)."', ".getEntity('mailing', 0).", '".$this->db->idate(dol_now())."')"; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } else { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$this->db->escape($this->email)."' AND entity IN (".getEntity('mailing', 0).")"; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } + + if (empty($error)) { + $this->no_email = $no_email; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return $error * -1; + } + } + + return 0; + } + + /** + * get "blacklist" mailing status + * set no_email attribut to 1 or 0 + * + * @return int <0 if KO, >0 if OK + */ + public function getNoEmail() + { + if ($this->email) { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($this->email)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $this->no_email = $obj->nb; + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + return -1; + } + } + return 0; + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** @@ -4007,12 +4153,25 @@ class Societe extends CommonObject global $conf, $user, $langs; dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); + $fullname = $member->getFullName($langs); - $name = $socname ? $socname : $member->societe; - if (empty($name)) { - $name = $member->getFullName($langs); + if ($member->morphy == 'mor') { + if (empty($socname)) { + $socname = $member->company? $member->company : $member->societe; + } + if (!empty($fullname) && empty($socalias)) { + $socalias = $fullname; + } + } elseif (empty($socname) && $member->morphy == 'phy') { + if (empty($socname)) { + $socname = $fullname; + } + if (!empty($member->company) && empty($socalias)) { + $socalias = $member->company; + } } + $name = $socname; $alias = $socalias ? $socalias : ''; // Positionne parametres @@ -4797,15 +4956,16 @@ class Societe extends CommonObject */ public function setThirdpartyType($typent_id) { + global $user; + + dol_syslog(__METHOD__, LOG_DEBUG); + if ($this->id) { - $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; - $sql .= " SET fk_typent = ".($typent_id > 0 ? $typent_id : "null"); - $sql .= " WHERE rowid = ".((int) $this->id); - dol_syslog(get_class($this).'::setThirdpartyType', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { + $result = $this->setValueFrom('fk_typent', $typent_id, '', null, '', '', $user, 'COMPANY_MODIFY'); + + if ($result > 0) { $this->typent_id = $typent_id; - $this->typent_code = dol_getIdFromCode($this->db, $this->$typent_id, 'c_typent', 'id', 'code'); + $this->typent_code = dol_getIdFromCode($this->db, $this->typent_id, 'c_typent', 'id', 'code'); return 1; } else { return -1; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 62bcbed5ff1..a7f9276897a 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -26,12 +26,18 @@ * \brief Add a tab on thirdparty view to list all products/services bought or sells by thirdparty */ +// Load Dolibarr environment require "../main.inc.php"; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; 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.'/fourn/class/fournisseur.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products")); + + $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist'; // Security check @@ -46,11 +52,11 @@ if ($socid > 0) { } // Sort & Order fields -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'aZ09comma'); -$sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -$optioncss = GETPOST('optioncss', 'alpha'); +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$optioncss = GETPOST('optioncss', 'alpha'); if (empty($page) || $page == -1) { $page = 0; @@ -78,12 +84,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $year = ''; $month = ''; } + // Customer or supplier selected in drop box $thirdTypeSelect = GETPOST("third_select_id", 'az09'); $type_element = GETPOST('type_element') ? GETPOST('type_element') : ''; -// Load translation files required by the page -$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products")); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('consumptionthirdparty', 'globalcard')); @@ -162,21 +167,21 @@ if ($object->client) { $obj = $db->fetch_object($resql); $nbFactsClient = $obj->nb; $thirdTypeArray['customer'] = $langs->trans("customer"); - if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { + if (isModEnabled("propal") && $user->rights->propal->lire) { $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); } - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { + if (isModEnabled('commande') && $user->rights->commande->lire) { $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); } if (isModEnabled('facture') && $user->rights->facture->lire) { $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); } - if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { + if (isModEnabled('contrat') && $user->rights->contrat->lire) { $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); } } -if (!empty($conf->ficheinter->enabled) && !empty($user->rights->ficheinter->lire)) { +if (isModEnabled('ficheinter') && !empty($user->rights->ficheinter->lire)) { $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); } @@ -199,13 +204,13 @@ if ($object->fournisseur) { $obj = $db->fetch_object($resql); $nbCmdsFourn = $obj->nb; $thirdTypeArray['supplier'] = $langs->trans("supplier"); - if ((isModEnabled('fournisseur') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { + if ((isModEnabled('fournisseur') && $user->hasRight('fournisseur', 'facture', 'lire') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))) { $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); } - if ((isModEnabled('fournisseur') && $user->rights->fournisseur->commande->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) { + if ((isModEnabled('fournisseur') && $user->hasRight('fournisseur', 'commande', 'lire') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire'))) { $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); } - if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) { + if (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'lire')) { $elementTypeArray['supplier_proposal'] = $langs->transnoentitiesnoconv('SupplierProposals'); } } @@ -269,8 +274,9 @@ if ($type_element == 'propal') { } if ($type_element == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + $langs->load('sendings'); // delivery planned date $documentstatic = new Commande($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, NULL as paid, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date,'; $tables_from = MAIN_DB_PREFIX."commande as c,".MAIN_DB_PREFIX."commandedet as d"; $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_commande = c.rowid"; @@ -305,8 +311,9 @@ if ($type_element == 'supplier_proposal') { } if ($type_element == 'supplier_order') { // Supplier : Show products from orders. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + $langs->load('sendings'); // delivery planned date $documentstatic = new CommandeFournisseur($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date, '; $tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d"; $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_commande = c.rowid"; @@ -391,15 +398,8 @@ if (empty($elementTypeArray) && !$object->client && !$object->fournisseur) { $typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled, '', 'maxwidth150onsmartphone'); $button = ''; -$param = ''; -$param .= "&sref=".urlencode($sref); -$param .= "&month=".urlencode($month); -$param .= "&year=".urlencode($year); -$param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); -$param .= "&socid=".urlencode($socid); -$param .= "&type_element=".urlencode($type_element); - $total_qty = 0; +$param = ''; if ($sql_select) { $resql = $db->query($sql); @@ -446,6 +446,10 @@ if ($sql_select) { print $formother->select_month($month ? $month : -1, 'month', 1, 0, 'valignmiddle'); print $formother->selectyear($year ? $year : -1, 'year', 1, 20, 1, 0, 0, '', 'valignmiddle maxwidth75imp marginleftonly'); print '
    '; print ''; @@ -465,6 +469,10 @@ if ($sql_select) { print '
    '.dol_print_date($db->jdate($objp->dateprint), 'day').''.dol_print_date($db->jdate($objp->delivery_planned_date), 'day').''; @@ -530,7 +542,7 @@ if ($sql_select) { // Product if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($objp->fk_product); @@ -553,7 +565,7 @@ if ($sql_select) { } $text .= ' - '.(!empty($objp->label) ? $objp->label : $label); - $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($objp->description)); + $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($objp->description)); } if (($objp->info_bits & 2) == 2) { ?> @@ -608,7 +620,7 @@ if ($sql_select) { echo get_date_range($objp->date_start, $objp->date_end); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { print (!empty($objp->description) && $objp->description != $objp->product_label) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } } else { @@ -645,9 +657,9 @@ if ($sql_select) { // Show range $prodreftxt .= get_date_range($objp->date_start, $objp->date_end); // Add description in form - if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) + if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { - $prodreftxt .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'
    '.dol_htmlentitiesbr($objp->description):''; + $prodreftxt .= (!empty($objp->description) && $objp->description!=$objp->product_label)?'
    '.dol_htmlentitiesbr($objp->description):''; } */ print '
    '.$langs->trans('Total').''.$total_qty.''.price($total_ht).''.price(price2num($total_ht / (empty($total_qty) ? 1 : $total_qty), 'MU')).'
    '; - - // Type Prospect/Customer/Supplier - print ''; - - // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field - print ''; - } - - if ($object->client) { - print ''; - } - - if ($object->fournisseur) { - print ''; - } - - // Number of files - print ''; - - // Total size - print ''; - - print '
    '.$langs->trans('NatureOfThirdParty').''; - print $object->getTypeUrl(1); - print '
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '; - print $langs->trans('CustomerCode').''; - print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' ('.$langs->trans("WrongCustomerCode").')'; - } - print '
    '; - print $langs->trans('SupplierCode').''; - print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' ('.$langs->trans("WrongSupplierCode").')'; - } - print '
    '.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
    '.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
    '; - - print ''; - - print dol_get_fiche_end(); - - $modulepart = 'societe'; - $permissiontoadd = $user->rights->societe->creer; - $permtoedit = $user->rights->societe->creer; - $param = '&id='.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} else { - accessforbidden('', 0, 0); +// Show tabs +if (isModEnabled('notification')) { + $langs->load("mails"); } +$head = societe_prepare_head($object); + +print dol_get_fiche_head($head, 'document', $langs->trans("ThirdParty"), -1, 'company'); + + +// Build file list +$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']; +} + +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); + +print '
    '; + +print '
    '; +print ''; + +// Type Prospect/Customer/Supplier +print ''; + +// Prefix +if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field + print ''; +} + +if ($object->client) { + print ''; +} + +if ($object->fournisseur) { + print ''; +} + +// Number of files +print ''; + +// Total size +print ''; + +print '
    '.$langs->trans('NatureOfThirdParty').''; +print $object->getTypeUrl(1); +print '
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '; + print $langs->trans('CustomerCode').''; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); + $tmpcheck = $object->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' ('.$langs->trans("WrongCustomerCode").')'; + } + print '
    '; + print $langs->trans('SupplierCode').''; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' ('.$langs->trans("WrongSupplierCode").')'; + } + print '
    '.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
    '.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
    '; + +print '
    '; + +print dol_get_fiche_end(); + +$modulepart = 'societe'; +$permissiontoadd = $user->hasRight('societe', 'creer'); +$permtoedit = $user->hasRight('societe', 'creer'); +$param = '&id='.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; // End of page llxFooter(); diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index b7b7fc95c6f..a74d4ff3ae0 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -27,16 +27,21 @@ * \brief Home page for third parties area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -$hookmanager = new HookManager($db); + +// Load translation files required by the page +$langs->load("companies"); + // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager = new HookManager($db); $hookmanager->initHooks(array('thirdpartiesindex')); -$langs->load("companies"); + $socid = GETPOST('socid', 'int'); if ($user->socid) { @@ -51,6 +56,7 @@ $thirdparty_static = new Societe($db); if (!isset($form) || !is_object($form)) { $form = new Form($db); } + // Load $resultboxes $resultboxes = FormOther::getBoxesArea($user, "3"); @@ -118,10 +124,10 @@ $result = $db->query($sql); if ($result) { while ($objp = $db->fetch_object($result)) { $found = 0; - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { $found = 1; $third['prospect']++; } - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { $found = 1; $third['customer']++; } if (((isModEnabled('fournisseur') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->rights->supplier_order->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { @@ -144,10 +150,10 @@ $thirdpartygraph .= '
    '.$langs->trans("St if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + (round($third['customer']) ? 1 : 0) + (round($third['supplier']) ? 1 : 0) + (round($third['other']) ? 1 : 0) >= 2)) { $thirdpartygraph .= '
    '; $dataseries = array(); - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { $dataseries[] = array($langs->trans("Prospects"), round($third['prospect'])); } - if (isModEnabled('societe') && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { + if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { $dataseries[] = array($langs->trans("Customers"), round($third['customer'])); } if (((isModEnabled('fournisseur') && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->rights->supplier_order->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { @@ -167,18 +173,18 @@ if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + $thirdpartygraph .= $dolgraph->show(); $thirdpartygraph .= '
    '.$langs->trans("Prospects").''.round($third['prospect']).'
    '.$langs->trans("Customers").''.round($third['customer']).'
    '.$langs->trans("Suppliers").''.round($third['supplier']).'
    '; $thirdpartygraph .= ''; $thirdpartycateggraph = ''; -if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { +if (isModEnabled('categorie') && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe'; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 413137ec0b0..84a8d355c1a 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -34,6 +34,8 @@ * \brief Page to show list of third parties */ + +// Load Dolibarr environment require_once '../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -42,20 +44,27 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; + +// Load translation files required by the page $langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories", "cashdesk")); -$action = GETPOST('action', 'aZ09'); + +// Get parameters +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); -$confirm = GETPOST('confirm', 'alpha'); -$toselect = GETPOST('toselect', 'array'); +$confirm = GETPOST('confirm', 'alpha'); +$toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist'; -$optioncss = GETPOST('optioncss', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); + if ($contextpage == 'poslist') { $optioncss = 'print'; } + $mode = GETPOST("mode", 'alpha'); +// search fields $search_all = trim(GETPOST('search_all', 'alphanohtml') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars @@ -69,8 +78,8 @@ $search_supplier_code = trim(GETPOST('search_supplier_code', 'alpha')); $search_account_customer_code = trim(GETPOST('search_account_customer_code', 'alpha')); $search_account_supplier_code = trim(GETPOST('search_account_supplier_code', 'alpha')); $search_address = trim(GETPOST('search_address', 'alpha')); -$search_town = trim(GETPOST("search_town", 'alpha')); $search_zip = trim(GETPOST("search_zip", 'alpha')); +$search_town = trim(GETPOST("search_town", 'alpha')); $search_state = trim(GETPOST("search_state", 'alpha')); $search_region = trim(GETPOST("search_region", 'alpha')); $search_email = trim(GETPOST('search_email', 'alpha')); @@ -98,6 +107,7 @@ $search_stcomm = GETPOST('search_stcomm', 'int'); $search_import_key = trim(GETPOST("search_import_key", "alpha")); $search_parent_name = trim(GETPOST('search_parent_name', 'alpha')); + $type = GETPOST('type', 'alpha'); $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant @@ -187,7 +197,7 @@ if (($tmp = $langs->transnoentities("ProfId5".$mysoc->country_code)) && $tmp != if (($tmp = $langs->transnoentities("ProfId6".$mysoc->country_code)) && $tmp != "ProfId6".$mysoc->country_code && $tmp != '-') { $fieldstosearchall['s.idprof6'] = 'ProfId6'; } -if (!empty($conf->barcode->enabled)) { +if (isModEnabled('barcode')) { $fieldstosearchall['s.barcode'] = 'Gencod'; } // Personalized search criterias. Example: $conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS = 's.nom=ThirdPartyName;s.name_alias=AliasNameShort;s.code_client=CustomerCode' @@ -217,11 +227,11 @@ $arrayfields = array( 's.rowid'=>array('label'=>"TechnicalID", 'position'=>1, 'checked'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)), 'enabled'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID))), 's.nom'=>array('label'=>"ThirdPartyName", 'position'=>2, 'checked'=>1), 's.name_alias'=>array('label'=>"AliasNameShort", 'position'=>3, 'checked'=>1), - 's.barcode'=>array('label'=>"Gencod", 'position'=>5, 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled))), + 's.barcode'=>array('label'=>"Gencod", 'position'=>5, 'checked'=>1, 'enabled'=>(isModEnabled('barcode'))), 's.code_client'=>array('label'=>"CustomerCodeShort", 'position'=>10, 'checked'=>$checkedcustomercode), - 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))), 's.code_compta'=>array('label'=>"CustomerAccountancyCodeShort", 'position'=>13, 'checked'=>$checkedcustomeraccountcode), - 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))), 's.address'=>array('label'=>"Address", 'position'=>19, 'checked'=>0), 's.zip'=>array('label'=>"Zip", 'position'=>20, 'checked'=>1), 's.town'=>array('label'=>"Town", 'position'=>21, 'checked'=>0), @@ -311,7 +321,8 @@ if ($action == "change") { // Change customer for TakePOS } if (GETPOST('cancel', 'alpha')) { - $action = 'list'; $massaction = ''; + $action = 'list'; + $massaction = ''; } if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; @@ -341,8 +352,8 @@ if (empty($reshook)) { $search_account_customer_code = ''; $search_account_supplier_code = ''; $search_address = ''; - $search_town = ""; $search_zip = ""; + $search_town = ""; $search_state = ""; $search_region = ""; $search_country = ''; @@ -373,9 +384,9 @@ if (empty($reshook)) { // Mass actions $objectclass = 'Societe'; $objectlabel = 'ThirdParty'; - $permissiontoread = $user->rights->societe->lire; - $permissiontodelete = $user->rights->societe->supprimer; - $permissiontoadd = $user->rights->societe->creer; + $permissiontoread = $user->hasRight('societe', 'lire'); + $permissiontodelete = $user->hasRight('societe', 'supprimer'); + $permissiontoadd = $user->hasRight("societe", "creer"); $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -432,6 +443,9 @@ if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) { $title = $langs->trans("Suppliers"); } +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + // Select every potentiels, and note each potentiels which fit in search parameters $tab_level = array(); $sql = "SELECT code, label, sortorder"; @@ -468,13 +482,6 @@ $sql .= " region.code_region as region_code, region.nom as region_name"; if ($search_sale && $search_sale != '-1') { $sql .= ", sc.fk_soc, sc.fk_user"; } -// We'll need these fields in order to filter by categ -if ($search_categ_cus && $search_categ_cus != -1) { - $sql .= ", cc.fk_categorie, cc.fk_soc"; -} -if ($search_categ_sup && $search_categ_sup != -1) { - $sql .= ", cs.fk_categorie, cs.fk_soc"; -} // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -485,6 +492,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +$sqlfields = $sql; // $sql fields to remove for count total + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s2 ON s.parent = s2.rowid"; if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { @@ -495,13 +505,6 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_ty $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_effectif as staff on (staff.id = s.fk_effectif)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region.code_region = state.fk_region)"; -// We'll need this table joined to the select in order to filter by categ -if (!empty($search_categ_cus) && $search_categ_cus != '-1') { - $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 -} -if (!empty($search_categ_sup) && $search_categ_sup != '-1') { - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; // We'll need this table joined to the select in order to filter by categ -} $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."c_stcomm as st ON s.fk_stcomm = st.id"; // We'll need this table joined to the select in order to filter by sale if ($search_sale == -2) { @@ -530,34 +533,85 @@ if ($search_sale == -2) { } elseif ($search_sale > 0) { $sql .= " AND sc.fk_user = ".((int) $search_sale); } -if ($search_categ_cus > 0) { - $sql .= " AND cc.fk_categorie = ".((int) $search_categ_cus); +$searchCategoryCustomerList = $search_categ_cus ? array($search_categ_cus) : array();; +$searchCategoryCustomerOperator = 0; +// Search for tag/category ($searchCategoryCustomerList is an array of ID) +if (!empty($searchCategoryCustomerList)) { + $searchCategoryCustomerSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryCustomerList as $searchCategoryCustomer) { + if (intval($searchCategoryCustomer) == -2) { + $searchCategoryCustomerSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc)"; + } elseif (intval($searchCategoryCustomer) > 0) { + if ($searchCategoryCustomerOperator == 0) { + $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategoryCustomer).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); + } + } + } + if ($listofcategoryid) { + $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryCustomerOperator == 1) { + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryCustomerSqlList).")"; + } + } else { + if (!empty($searchCategoryCustomerSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryCustomerSqlList).")"; + } + } } -if ($search_categ_sup > 0) { - $sql .= " AND cs.fk_categorie = ".((int) $search_categ_sup); +$searchCategorySupplierList = $search_categ_sup ? array($search_categ_sup) : array(); +$searchCategorySupplierOperator = 0; +// Search for tag/category ($searchCategorySupplierList is an array of ID) +if (!empty($searchCategorySupplierList)) { + $searchCategorySupplierSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategorySupplierList as $searchCategorySupplier) { + if (intval($searchCategorySupplier) == -2) { + $searchCategorySupplierSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc)"; + } elseif (intval($searchCategorySupplier) > 0) { + if ($searchCategorySupplierOperator == 0) { + $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategorySupplier).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier); + } + } + } + if ($listofcategoryid) { + $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategorySupplierOperator == 1) { + if (!empty($searchCategorySupplierSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategorySupplierSqlList).")"; + } + } else { + if (!empty($searchCategorySupplierSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategorySupplierSqlList).")"; + } + } } -if ($search_categ_cus == -2) { - $sql .= " AND cc.fk_categorie IS NULL"; -} -if ($search_categ_sup == -2) { - $sql .= " AND cs.fk_categorie IS NULL"; -} - if ($search_all) { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } if (strlen($search_cti)) { $sql .= natural_search('s.phone', $search_cti); } - if ($search_id > 0) { $sql .= natural_search("s.rowid", $search_id, 1); } -if ($search_nom) { - $sql .= natural_search("s.nom", $search_nom); -} -if ($search_alias) { - $sql .= natural_search("s.name_alias", $search_alias); +if (empty($arrayfields['s.name_alias']['checked']) && $search_nom) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_nom); +} else { + if ($search_nom) { + $sql .= natural_search("s.nom", $search_nom); + } + + if ($search_alias) { + $sql .= natural_search("s.name_alias", $search_alias); + } } if ($search_nom_only) { $sql .= natural_search("s.nom", $search_nom_only); @@ -577,12 +631,12 @@ if ($search_account_supplier_code) { if ($search_address) { $sql .= natural_search('s.address', $search_address); } -if ($search_town) { - $sql .= natural_search("s.town", $search_town); -} if (strlen($search_zip)) { $sql .= natural_search("s.zip", $search_zip); } +if ($search_town) { + $sql .= natural_search("s.town", $search_town); +} if ($search_state) { $sql .= natural_search("state.nom", $search_state); } @@ -638,7 +692,7 @@ if ($search_type == '0') { if ($search_status != '' && $search_status >= 0) { $sql .= natural_search("s.status", $search_status, 2); } -if (!empty($conf->barcode->enabled) && $search_barcode) { +if (isModEnabled('barcode') && $search_barcode) { $sql .= natural_search("s.barcode", $search_barcode); } if ($search_price_level && $search_price_level != '-1') { @@ -681,9 +735,13 @@ $sql .= $hookmanager->resPrint; // Count total nb of records with no order and no limits $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); + $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); + $resql = $db->query($sqlforcount); if ($resql) { - $nbtotalofrecords = $db->num_rows($resql); + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; } else { dol_print_error($db); } @@ -716,7 +774,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ( $obj = $db->fetch_object($resql); $id = $obj->rowid; if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) { - if ($obj->client > 0) { + if ($companystatic->client > 0) { header("Location: ".DOL_URL_ROOT.'/comm/card.php?socid='.$id); exit; } @@ -731,7 +789,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ( } $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $langs->trans("ThirdParty"), $help_url); +llxHeader('', $title, $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { @@ -764,12 +822,12 @@ if ($search_alias != '') { if ($search_address != '') { $param .= '&search_address='.urlencode($search_address); } -if ($search_town != '') { - $param .= "&search_town=".urlencode($search_town); -} if ($search_zip != '') { $param .= "&search_zip=".urlencode($search_zip); } +if ($search_town != '') { + $param .= "&search_town=".urlencode($search_town); +} if ($search_phone != '') { $param .= "&search_phone=".urlencode($search_phone); } @@ -873,22 +931,22 @@ $arrayofmassactions = array( //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); -if (isModEnabled('category') && $user->rights->societe->creer) { +if (isModEnabled('category') && $user->hasRight("societe", "creer")) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } -if ($user->rights->societe->creer) { - $arrayofmassactions['preenable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToEnabled"); +if ($user->hasRight("societe", "creer")) { + $arrayofmassactions['preenable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToStatus", $object->LibStatut($object::STATUS_INACTIVITY)); } -if ($user->rights->societe->creer) { - $arrayofmassactions['predisable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToDisabled"); +if ($user->hasRight("societe", "creer")) { + $arrayofmassactions['predisable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToStatus", $object->LibStatut($object::STATUS_CEASED)); } -if ($user->rights->societe->creer) { +if ($user->hasRight("societe", "creer")) { $arrayofmassactions['presetcommercial'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("AllocateCommercial"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'preenable', 'preclose'))) { $arrayofmassactions = array(); } -if ($user->rights->societe->supprimer) { +if ($user->hasRight('societe', 'supprimer')) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); @@ -920,8 +978,8 @@ if ($contextpage != 'poslist') { if (!empty($socid)) { $url .= '&socid='.$socid; } - $newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer); -} elseif ($user->rights->societe->creer) { + $newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight("societe", "creer")); +} elseif ($user->hasRight("societe", "creer")) { $url = DOL_URL_ROOT.'/societe/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.$place); $label = 'MenuNewCustomer'; $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url); @@ -969,7 +1027,7 @@ if ($search_all) { // Filter on categories $moreforfilter = ''; if (empty($type) || $type == 'c' || $type == 'p') { - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + if (isModEnabled('categorie') && $user->hasRight("categorie", "lire")) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('Categories'); @@ -980,7 +1038,7 @@ if (empty($type) || $type == 'c' || $type == 'p') { } if (empty($type) || $type == 'f') { - if (!empty($conf->fournisseur->enabled) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + if (isModEnabled("fournisseur") && isModEnabled('categorie') && $user->hasRight("categorie", "lire")) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('Categories'); @@ -991,7 +1049,7 @@ if (empty($type) || $type == 'f') { } // If the user can view prospects other than his' -if ($user->rights->societe->client->voir || $socid) { +if ($user->hasRight("societe", "client", "voir") || $socid) { $moreforfilter .= '
    '; $tmptitle = $langs->trans('SalesRepresentatives'); $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"'); @@ -1250,7 +1308,7 @@ if (!empty($arrayfields['s.tms']['checked'])) { // Status if (!empty($arrayfields['s.status']['checked'])) { print '
    '; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status minwidth75 maxwidth125 onrightofpage', 1); print '
    '; @@ -1447,7 +1517,7 @@ while ($i < min($num, $limit)) { if (!empty($arrayfields['s.nom']['checked'])) { print 'global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">'; if ($contextpage == 'poslist') { - print dol_escape_htmltag($obj->name); + print dol_escape_htmltag($companystatic->name); } else { print $companystatic->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } @@ -1466,56 +1536,56 @@ while ($i < min($num, $limit)) { } // Barcode if (!empty($arrayfields['s.barcode']['checked'])) { - print ''.dol_escape_htmltag($obj->barcode).''.dol_escape_htmltag($companystatic->barcode).''.dol_escape_htmltag($obj->code_client).''.dol_escape_htmltag($companystatic->code_client).''.dol_escape_htmltag($obj->code_fournisseur).''.dol_escape_htmltag($companystatic->code_fournisseur).''.dol_escape_htmltag($obj->code_compta).''.dol_escape_htmltag($companystatic->code_compta_client).''.dol_escape_htmltag($obj->code_compta_fournisseur).''.dol_escape_htmltag($companystatic->code_compta_fournisseur).''.dol_escape_htmltag($obj->address).''.dol_escape_htmltag($companystatic->address).'".dol_escape_htmltag($obj->zip)."".dol_escape_htmltag($companystatic->zip)."'.dol_escape_htmltag($obj->town)."'.dol_escape_htmltag($companystatic->town)."'; - $labelcountry = ($obj->country_code && ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)) ? $langs->trans("Country".$obj->country_code) : $obj->country_label; + $labelcountry = ($companystatic->country_code && ($langs->trans("Country".$companystatic->country_code) != "Country".$companystatic->country_code)) ? $langs->trans("Country".$companystatic->country_code) : $obj->country_label; print $labelcountry; print ''.dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."'.dol_print_phone($obj->phone, $companystatic->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."'.dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."'.dol_print_phone($obj->fax, $companystatic->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."'; - if ($obj->tva_intra && !isValidVATID($companystatic)) { + print ''; + if ($companystatic->tva_intra && !isValidVATID($companystatic)) { print img_warning("BadVATNumber", '', 'pictofixedwidth'); } - print $obj->tva_intra; + print $companystatic->tva_intra; print "
    '; + print '
    '; print '
    '; print $companystatic->LibProspCommStatut($obj->stcomm_id, 2, $prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto); print '
    -
    '; @@ -1752,9 +1822,9 @@ while ($i < min($num, $limit)) { print ''; } print '
    '; print $langs->trans('SupplierCode').''; print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); @@ -201,7 +202,7 @@ if ($result > 0) { $tmparray = $notify->getNotificationsArray('', $object->id, null, 0, array('thirdparty')); foreach($tmparray as $tmpkey => $tmpval) { - if (! empty($tmpkey)) $nbofrecipientemails++; + if (!empty($tmpkey)) $nbofrecipientemails++; } print $nbofrecipientemails; print '
    '; - - if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field - print ''; - } - - if ($object->client) { - print ''; - } - - if ($object->fournisseur) { - print ''; - print ''; - } - - print '
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '; - print $langs->trans('CustomerCode').''; - print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' ('.$langs->trans("WrongCustomerCode").')'; - } - print '
    '; - print $langs->trans('SupplierCode').''; - print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' ('.$langs->trans("WrongSupplierCode").')'; - } - print '
    '; - - print ''; - - print dol_get_fiche_end(); -} else { - dol_print_error('', 'Parameter id not defined'); -} - -// Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - // Buttons for actions - - if ($action != 'presend') { - 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)) { - // Show - if ($permissiontoadd) { - print dolGetButtonAction($langs->trans('AddPartnership'), '', 'default', DOL_URL_ROOT.'/partnership/partnership_card.php?action=create&fk_soc='.$object->id.'&backtopage='.urlencode(DOL_URL_ROOT.'/societe/partnership.php?id='.$object->id), '', $permissiontoadd); - } - } - print '
    '."\n"; - } - - - //$morehtmlright = 'partnership/partnership_card.php?action=create&backtopage=%2Fdolibarr%2Fhtdocs%2Fpartnership%2Fpartnership_list.php'; - $morehtmlright = ''; - - print load_fiche_titre($langs->trans("PartnershipDedicatedToThisThirdParty", $langs->transnoentitiesnoconv("Partnership")), $morehtmlright, ''); - - $socid = $object->id; - - - // TODO Replace this card with a table of list of all partnerships. - - $object = new Partnership($db); - $partnershipid = $object->fetch(0, '', 0, $socid); - - if ($partnershipid > 0) { - print '
    '; - print '
    '; - print '
    '; - print ''."\n"; - - // Common attributes - unset($object->fields['fk_soc']); // Hide field already shown in banner - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; - $forcefieldid = 'socid'; - $forceobjectid = $object->fk_soc; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - - print '
    '; - print '
    '; - } -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index f460b60f2d2..ae39569a36e 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -29,6 +29,8 @@ * \brief Tab of payment modes for the customer */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; @@ -40,8 +42,11 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; + +// Load translation files required by the page $langs->loadLangs(array("companies", "commercial", "banks", "bills", 'paypal', 'stripe', 'withdrawals')); + // Security check $socid = GETPOST("socid", "int"); if ($user->socid) { @@ -49,12 +54,15 @@ if ($user->socid) { } $result = restrictedArea($user, 'societe', '', ''); + +// Get parameters $id = GETPOST("id", "int"); $source = GETPOST("source", "alpha"); // source can be a source or a paymentmode $ribid = GETPOST("ribid", "int"); $action = GETPOST("action", 'alpha', 3); $cancel = GETPOST('cancel', 'alpha'); +// Initialize objects $object = new Societe($db); $object->fetch($socid); @@ -70,12 +78,13 @@ $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('thirdpartybancard', 'globalcard')); -$permissiontoread = $user->rights->societe->lire; -$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_builddoc.inc.php +// Permissions +$permissiontoread = $user->hasRight('societe', 'lire'); +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_builddoc.inc.php $permissiontoaddupdatepaymentinformation = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $permissiontoadd) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->societe->thirdparty_paymentinformation_advance->write))); -if (!empty($conf->stripe->enabled)) { +if (isModEnabled('stripe')) { $service = 'StripeTest'; $servicestatus = 0; if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { @@ -102,6 +111,7 @@ if ($cancel) { $action = ''; } +$morehtmlright = ''; $parameters = array('id'=>$socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -166,6 +176,12 @@ if (empty($reshook)) { $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); } + if (GETPOST('stripe_card_ref', 'alpha') && GETPOST('stripe_card_ref', 'alpha') != $companypaymentmode->stripe_card_ref) { + // If we set a stripe value that is different than previous one, we also set the stripe account + $companypaymentmode->stripe_account = $stripecu.'@'.$site_account; + } + $companybankaccount->stripe_card_ref = GETPOST('stripe_card_ref', 'alpha'); + $result = $companybankaccount->update($user); if (!$result) { setEventMessages($companybankaccount->error, $companybankaccount->errors, 'errors'); @@ -407,6 +423,7 @@ if (empty($reshook)) { if ($action == 'confirm_deletecard' && GETPOST('confirm', 'alpha') == 'yes') { $companypaymentmode = new CompanyPaymentMode($db); if ($companypaymentmode->fetch($ribid ? $ribid : $id)) { + // TODO This is currently done at bottom of page instead of asking confirm /*if ($companypaymentmode->stripe_card_ref && preg_match('/pm_/', $companypaymentmode->stripe_card_ref)) { $payment_method = \Stripe\PaymentMethod::retrieve($companypaymentmode->stripe_card_ref); @@ -419,6 +436,7 @@ if (empty($reshook)) { $result = $companypaymentmode->delete($user); if ($result > 0) { $url = $_SERVER['PHP_SELF']."?socid=".$object->id; + header('Location: '.$url); exit; } else { @@ -431,9 +449,21 @@ if (empty($reshook)) { if ($action == 'confirm_delete' && GETPOST('confirm', 'alpha') == 'yes') { $companybankaccount = new CompanyBankAccount($db); if ($companybankaccount->fetch($ribid ? $ribid : $id)) { + // TODO This is currently done at bottom of page instead of asking confirm + /*if ($companypaymentmode->stripe_card_ref && preg_match('/pm_/', $companypaymentmode->stripe_card_ref)) + { + $payment_method = \Stripe\PaymentMethod::retrieve($companypaymentmode->stripe_card_ref); + if ($payment_method) + { + $payment_method->detach(); + } + }*/ + $result = $companybankaccount->delete($user); + if ($result > 0) { $url = $_SERVER['PHP_SELF']."?socid=".$object->id; + header('Location: '.$url); exit; } else { @@ -464,7 +494,7 @@ if (empty($reshook)) { $id = $savid; // Action for stripe - if (!empty($conf->stripe->enabled) && class_exists('Stripe')) { + if (isModEnabled('stripe') && class_exists('Stripe')) { if ($action == 'synccustomertostripe') { if ($object->client == 0) { $error++; @@ -496,7 +526,7 @@ if (empty($reshook)) { } if (!$error) { - // Creation of Stripe card + update of societe_account + // Creation of Stripe card + update of llx_societe_rib // Note that with the new Stripe API, option to create a card is no more available, instead an error message will be returned to // ask to create the crdit card from Stripe backoffice. $card = $stripe->cardStripe($cu, $companypaymentmode, $stripeacc, $servicestatus, 1); @@ -507,6 +537,35 @@ if (empty($reshook)) { } } } + if ($action == 'syncsepatostripe') { + $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib + $companypaymentmode->fetch($id); + + if ($companypaymentmode->type != 'ban') { + $error++; + $langs->load("errors"); + setEventMessages('ThisPaymentModeIsNotABan', null, 'errors'); + } else { + // Get the Stripe customer + $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); + // print json_encode($cu); + if (empty($cu)) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorStripeCustomerNotFoundCreateFirst"), null, 'errors'); + } + if (!$error) { + // Creation of Stripe SEPA + update of llx_societe_rib + $card = $stripe->sepaStripe($cu, $companypaymentmode, $stripeacc, $servicestatus, 1); + if (!$card) { + $error++; + setEventMessages($stripe->error, $stripe->errors, 'errors'); + } else { + setEventMessages("", array("Bank Account on Stripe", "BAN is now linked to the Stripe customer account !")); + } + } + } + } if ($action == 'setkey_account') { $error = 0; @@ -623,7 +682,7 @@ if (empty($reshook)) { } elseif ($action == 'setassourcedefault') { // Set as default when payment mode defined remotely only try { $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if (preg_match('/pm_/', $source)) { + if (preg_match('/pm_|src_/', $source)) { $cu->invoice_settings->default_payment_method = (string) $source; // New } else { $cu->default_source = (string) $source; // Old @@ -651,6 +710,41 @@ if (empty($reshook)) { // $card->detach(); Does not work with card_, only with src_ if (method_exists($card, 'detach')) { $card->detach(); + $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib as sr "; + $sql .= " SET stripe_card_ref = null"; + $sql .= " WHERE sr.stripe_card_ref = '".$db->escape($source)."'"; + $resql = $db->query($sql); + } else { + $card->delete(); + } + } + } + + $url = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; + header('Location: '.$url); + exit; + } catch (Exception $e) { + $error++; + setEventMessages($e->getMessage(), null, 'errors'); + } + } elseif ($action == 'delete' && $source) { + try { + if (preg_match('/pm_/', $source)) { + $payment_method = \Stripe\PaymentMethod::retrieve($source, array("stripe_account" => $stripeacc)); + if ($payment_method) { + $payment_method->detach(); + } + } else { + $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); + $card = $cu->sources->retrieve("$source"); + if ($card) { + // $card->detach(); Does not work with card_, only with src_ + if (method_exists($card, 'detach')) { + $card->detach(); + $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib as sr "; + $sql .= " SET stripe_card_ref = null"; + $sql .= " WHERE sr.stripe_card_ref = '".$db->escape($source)."'"; + $resql = $db->query($sql); } else { $card->delete(); } @@ -682,17 +776,18 @@ $title = $langs->trans("ThirdParty"); if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->name." - ".$langs->trans('PaymentInformation'); } +$help_url = ''; -llxHeader(); +llxHeader('', $title, $help_url); $head = societe_prepare_head($object); // Show sandbox warning -/*if (! empty($conf->paypal->enabled) && (! empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox','alpha'))) // We can force sand box with param 'forcesandbox' +/*if (isModEnabled('paypal') && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox','alpha'))) // We can force sand box with param 'forcesandbox' { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Paypal'),'','warning'); }*/ -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { +if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } @@ -778,26 +873,26 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $obj = $db->fetch_object($resql); $nbFactsClient = $obj->nb; $thirdTypeArray['customer'] = $langs->trans("customer"); - if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { + if (isModEnabled("propal") && $user->rights->propal->lire) { $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); } - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { + if (isModEnabled('commande') && $user->rights->commande->lire) { $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); } if (isModEnabled('facture') && $user->rights->facture->lire) { $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); } - if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { + if (isModEnabled('contrat') && $user->rights->contrat->lire) { $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); } - if (!empty($conf->stripe->enabled)) { + if (isModEnabled('stripe')) { // Stripe customer key 'cu_....' stored into llx_societe_account print '
    '; print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontoaddupdatepaymentinformation, 'string', '', 0, 2, 'socid'); print ''; print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontoaddupdatepaymentinformation, 'string', '', null, null, '', 2, '', 'socid'); - if (!empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') { + if (isModEnabled('stripe') && $stripecu && $action != 'editkey_account') { $connect = ''; if (!empty($stripeacc)) { $connect = $stripeacc.'/'; @@ -814,7 +909,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print ''; print ''; - print ''; + print img_picto($langs->trans("CreateCustomerOnStripe"), 'stripe'); + print ''; print ''; } print '
    '; print $form->editfieldval("StripeConnectAccount", 'key_account_supplier', $stripesupplieracc, $object, $permissiontoaddupdatepaymentinformation, 'string', '', null, null, '', 2, '', 'socid'); - if (!empty($conf->stripe->enabled) && $stripesupplieracc && $action != 'editkey_account_supplier') { + if (isModEnabled('stripe') && $stripesupplieracc && $action != 'editkey_account_supplier') { $connect = ''; $url = 'https://dashboard.stripe.com/test/connect/accounts/'.$stripesupplieracc; @@ -889,70 +985,75 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '
    '; - // List of Stripe payment modes - if (!(empty($conf->stripe->enabled)) && $object->client) { + $showcardpaymentmode = 0; + if (isModEnabled('stripe')) { + $showcardpaymentmode++; + } + + // Get list of remote payment modes + $listofsources = array(); + + if (is_object($stripe)) { + try { + $customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus); + if (!empty($customerstripe->id)) { + // When using the Charge API architecture + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { + $listofsources = $customerstripe->sources->data; + } else { + $service = 'StripeTest'; + $servicestatus = 0; + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { + $service = 'StripeLive'; + $servicestatus = 1; + } + + // Force to use the correct API key + global $stripearrayofkeysbyenv; + \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$servicestatus]['secret_key']); + + try { + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card")); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit")); + } else { + $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card"), array("stripe_account" => $stripeacc)); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit"), array("stripe_account" => $stripeacc)); + } + + if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) { + $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data); + } elseif ($paymentmethodobjsB->data != null) { + $listofsources = $paymentmethodobjsB->data; + } else { + $listofsources = $paymentmethodobjsA->data; + } + } catch (Exception $e) { + $error++; + setEventMessages($e->getMessage(), null, 'errors'); + } + } + } + } catch (Exception $e) { + dol_syslog("Error when searching/loading Stripe customer for thirdparty id =".$object->id); + } + } + + + // List of Card payment modes + if ($showcardpaymentmode && $object->client) { $morehtmlright = ''; if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { $morehtmlright .= dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=createcard'); } - print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc ? ' (Stripe connection with StripeConnect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'stripe-s'); + print load_fiche_titre($langs->trans('CreditCard').($stripeacc ? ' (Stripe connection with StripeConnect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'fa-credit-card'); - $listofsources = array(); - if (is_object($stripe)) { - try { - $customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if (!empty($customerstripe->id)) { - // When using the Charge API architecture - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { - $listofsources = $customerstripe->sources->data; - } else { - $service = 'StripeTest'; - $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { - $service = 'StripeLive'; - $servicestatus = 1; - } - - // Force to use the correct API key - global $stripearrayofkeysbyenv; - \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$servicestatus]['secret_key']); - - try { - if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card")); - $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit")); - } else { - $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card"), array("stripe_account" => $stripeacc)); - $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit"), array("stripe_account" => $stripeacc)); - } - - if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) { - $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data); - } elseif ($paymentmethodobjsB->data != null) { - $listofsources = $paymentmethodobjsB->data; - } else { - $listofsources = $paymentmethodobjsA->data; - } - } catch (Exception $e) { - $error++; - setEventMessages($e->getMessage(), null, 'errors'); - } - } - } - } catch (Exception $e) { - dol_syslog("Error when searching/loading Stripe customer for thirdparty id =".$object->id); - } - } - - print ''."\n"; + print ''."\n"; print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''."\n"; print ''; - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { - print ''; - } print ''; - print ''; + print ''; // external system ID print ''; print ''; print ''; @@ -969,7 +1070,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $nbremote = 0; $nblocal = 0; - $arrayofstripecard = array(); + $arrayofremotecard = array(); // Show local sources if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { @@ -993,18 +1094,16 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if ($obj) { $companypaymentmodetemp->fetch($obj->rowid); - $arrayofstripecard[$companypaymentmodetemp->stripe_card_ref] = $companypaymentmodetemp->stripe_card_ref; + $arrayofremotecard[$companypaymentmodetemp->stripe_card_ref] = $companypaymentmodetemp->stripe_card_ref; - print ''; - print ''; + print ''; + // Label print ''; - print ''; + // Type print ''; + // Information (Owner, ...) print ''; - // Local ID - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { - print ''; + $imgline = ''; + if ($src->object == 'card') { + $imgline = img_credit_card($src->brand); + } elseif ($src->object == 'source' && $src->type == 'card') { + $imgline = img_credit_card($src->card->brand); + } elseif ($src->object == 'payment_method' && $src->type == 'card') { + $imgline = img_credit_card($src->card->brand); + } elseif ($src->object == 'source' && $src->type == 'sepa_debit') { + continue; + } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { + continue; } + + print ''; print ''; // Src ID - print ''; - // Img of credit card + // Img print ''; // Information print ''; + print ''; + // Fields from hook $parameters = array('arrayfields'=>array(), 'stripesource'=>$src, 'linetype'=>'stripecardremoteonly'); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; + // Action column print ''; // Type of container @@ -4405,7 +4679,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = // Categories - Tags print ''; - $param = '?action=replacesiteconfirm'; + $param = '?mode=replacesite'; $param .= '&websiteid='.$website->id; $param .= '&optioncontent='.GETPOST('optioncontent', 'aZ09'); $param .= '&optionmeta='.GETPOST('optionmeta', 'aZ09'); @@ -4468,7 +4742,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = } print ''.img_picto($langs->trans("EditHTMLSource"), 'edit').''; - print ''.ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled', array(), 'valignmiddle'); + print ''; + print ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled', array(), 'valignmiddle'); print ''; @@ -4507,7 +4782,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = } print ''; - $param = '?action=replacesiteconfirm'; + $param = '?mode=replacesite'; $param .= '&websiteid='.$website->id; $param .= '&optioncontent='.GETPOST('optioncontent', 'aZ09'); $param .= '&optionmeta='.GETPOST('optionmeta', 'aZ09'); @@ -4606,7 +4881,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print ''; } -if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') { +if ((empty($action) || $action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') && !in_array($mode, array('replacesite'))) { if ($pageid > 0 && $atleastonepage) { // $filejs // $filecss @@ -4736,7 +5011,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa print $out; /*file_put_contents($filetpl, $out); - if (! empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) @chmod($filetpl, octdec($conf->global->MAIN_UMASK)); // Output file on browser diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 249398c322e..a9fabffba3c 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -32,9 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/website/lib/websiteaccount.lib.php'; $langs->loadLangs(array("website", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -43,7 +43,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $object = new SocieteAccount($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->website->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('websiteaccountcard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('websiteaccountcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -63,18 +63,22 @@ if (empty($action) && empty($id) && empty($ref)) { $action = 'view'; } +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'website', $id); +if (empty($user->rights->websiteaccount->read)) { + accessforbidden('NotAllowed'); +} -$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php - -// Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. - +// Permissions +$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->websiteaccount->delete; /* @@ -222,7 +226,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project - if (! empty($conf->project->enabled)) + if (!empty($conf->project->enabled)) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -244,7 +248,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } } else { - if (! empty($object->fk_project)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref.=''; @@ -319,8 +323,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } */ - if ($user->rights->website->delete) { - print ''."\n"; + if ($permissiontodelete) { + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } } print ''."\n"; diff --git a/htdocs/workstation/lib/workstation.lib.php b/htdocs/workstation/lib/workstation.lib.php index 92ea28d8bfb..8250a85adda 100644 --- a/htdocs/workstation/lib/workstation.lib.php +++ b/htdocs/workstation/lib/workstation.lib.php @@ -61,5 +61,7 @@ function workstationAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'workstation'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'workstation', 'remove'); + return $head; } diff --git a/htdocs/workstation/workstation_agenda.php b/htdocs/workstation/workstation_agenda.php index ff30d062f38..777da58f92c 100644 --- a/htdocs/workstation/workstation_agenda.php +++ b/htdocs/workstation/workstation_agenda.php @@ -1,4 +1,5 @@ * Copyright (C) 2020 Gauthier VERDOL * @@ -17,7 +18,7 @@ */ /** - * \file workstation_agenda.php + * \file htdocs/workstation/workstation_agenda.php * \ingroup workstation * \brief Tab of events on Workstation */ @@ -32,12 +33,12 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php // Load translation files required by the page -$langs->loadLangs(array("workstation", "other")); +$langs->loadLangs(array('workstation', 'other')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -49,8 +50,10 @@ if (GETPOST('actioncode', 'array')) { } else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } + $search_agenda_label = GETPOST('search_agenda_label'); +// Load variables for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -73,6 +76,7 @@ $object = new Workstation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('workstationagenda', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -82,6 +86,7 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->workstation->multidir_output[$object->entity]."/".$object->id; } +// Permissions $permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php // Security check @@ -127,7 +132,7 @@ if ($object->id > 0) { $help_url = 'EN:Module_Workstation'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = workstationPrepareHead($object); diff --git a/htdocs/workstation/workstation_card.php b/htdocs/workstation/workstation_card.php index 9e859dcc2d0..87ee470dce7 100644 --- a/htdocs/workstation/workstation_card.php +++ b/htdocs/workstation/workstation_card.php @@ -1,4 +1,5 @@ * * This program is free software; you can redistribute it and/or modify @@ -16,7 +17,7 @@ */ /** - * \file workstation_card.php + * \file htdocs/workstation/workstation_card.php * \ingroup workstation * \brief Page to create/edit/view workstation */ @@ -24,32 +25,33 @@ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; -require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationusergroup.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("workstation", "other")); +$langs->loadLangs(array('workstation', 'other')); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'workstationcard'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'workstationcard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -$groups = GETPOST('groups', 'array:int'); +$groups = GETPOST('groups', 'array:int'); $resources = GETPOST('resources', 'array:int'); //$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new Workstation($db); + //$extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('workstationcard', 'globalcard')); // Note that conf->hooks_modules contains array @@ -75,11 +77,13 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. -$permissiontoread = $user->rights->workstation->workstation->read; -$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->workstation->workstation->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); -$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->workstation->workstation->write; // Used by the include of actions_dellink.inc.php +// Permissions +$permissiontoread = $user->rights->workstation->workstation->read; +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->workstation->workstation->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->workstation->workstation->write; // Used by the include of actions_dellink.inc.php + $upload_dir = $conf->workstation->multidir_output[isset($object->entity) ? $object->entity : 1]; // Security check @@ -92,7 +96,7 @@ restrictedArea($user, $object->element, $object->id, $object->table_element, 'wo */ $parameters = array(); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$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'); } @@ -112,7 +116,7 @@ if (empty($reshook)) { } } - $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record + $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; @@ -142,7 +146,6 @@ if (empty($reshook)) { - /* * View * @@ -448,10 +451,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if ($permissiontoadd) { - print ''.$langs->trans("ToClone").''."\n"; + print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=workstation', 'clone', $permissiontoadd); } - + // Disable / Enable if ($permissiontoadd) { if ($object->status == $object::STATUS_ENABLED) { print ''.$langs->trans("Disable").''."\n"; @@ -460,13 +463,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete) { - print ''.$langs->trans('Delete').''."\n"; - } else { - print ''.$langs->trans('Delete').''."\n"; - } + // Delete + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); } print ''."\n"; } diff --git a/htdocs/workstation/workstation_document.php b/htdocs/workstation/workstation_document.php index 92cf4dfde15..2ccf1936615 100644 --- a/htdocs/workstation/workstation_document.php +++ b/htdocs/workstation/workstation_document.php @@ -1,4 +1,5 @@ * Copyright (C) 2020 Gauthier VERDOL * @@ -17,22 +18,22 @@ */ /** - * \file workstation_document.php + * \file htdocs/workstation/workstation_document.php * \ingroup workstation * \brief Tab for documents linked to Workstation */ // Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.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'; require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("workstation", "companies", "other", "mails")); +$langs->loadLangs(array('companies', 'mails', 'other', 'workstation')); $action = GETPOST('action', 'aZ09'); @@ -64,6 +65,7 @@ $object = new Workstation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('workstationdocument', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php index 540f6bc9c6b..d4ea81e769f 100644 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -1,4 +1,5 @@ * Copyright (C) 2020 Gauthier VERDOL * @@ -17,7 +18,7 @@ */ /** - * \file workstation_list.php + * \file htdocs/workstation/workstation_list.php * \ingroup workstation * \brief List page for workstation */ @@ -25,24 +26,24 @@ // 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.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; // Load translation files required by the page -$langs->loadLangs(array("workstation", "other")); +$langs->loadLangs(array('workstation', 'other')); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'workstationlist'; // 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') -$mode = GETPOST('mode', 'aZ'); +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'workstationlist'; // 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') +$mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); @@ -63,7 +64,7 @@ $pagenext = $page + 1; $object = new Workstation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index dc230dd38ff..d5eb05737f0 100644 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -1,4 +1,5 @@ * Copyright (C) 2020 Gauthier VERDOL * @@ -17,7 +18,7 @@ */ /** - * \file workstation_note.php + * \file htdocs/workstation/workstation_note.php * \ingroup workstation * \brief Tab for notes on Workstation */ @@ -29,12 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("workstation", "companies")); +$langs->loadLangs(array('workstation', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -42,18 +43,19 @@ $backtopage = GETPOST('backtopage', 'alpha'); $object = new Workstation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals if ($id > 0 || !empty($ref)) { $upload_dir = $conf->workstation->multidir_output[$object->entity]."/".$object->id; } -$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php -$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php +$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php // Security check $isdraft = 0; @@ -63,7 +65,8 @@ restrictedArea($user, $object->element, $object->id, $object->table_element, 'wo /* * Actions */ -$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks + +$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } diff --git a/htdocs/zapier/admin/about.php b/htdocs/zapier/admin/about.php index b7e2936fc41..71120a384a2 100644 --- a/htdocs/zapier/admin/about.php +++ b/htdocs/zapier/admin/about.php @@ -21,9 +21,9 @@ */ /** - * \file zapier/admin/about.php - * \ingroup zapier - * \brief About page of module Zapier. + * \file htdocs/zapier/admin/about.php + * \ingroup zapier + * \brief About page of module Zapier. */ // Load Dolibarr environment @@ -35,19 +35,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once '../lib/zapier.lib.php'; // Translations -$langs->loadLangs(array("errors", "admin", "zapier")); +$langs->loadLangs(array('admin', 'errors', 'zapier')); // Access control if (!$user->admin) { accessforbidden(); } +if (empty($conf->zapier->enabled)) accessforbidden(); +if (empty($user->admin)) accessforbidden(); + + // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); -if (empty($conf->zapier->enabled)) accessforbidden(); -if (empty($user->admin)) accessforbidden(); /* diff --git a/htdocs/zapier/admin/setup.php b/htdocs/zapier/admin/setup.php index 0d3cf64c54f..6737d23354f 100644 --- a/htdocs/zapier/admin/setup.php +++ b/htdocs/zapier/admin/setup.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -26,11 +26,11 @@ require '../../main.inc.php'; // Libraries -require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/zapier/lib/zapier.lib.php'; // Translations -$langs->loadLangs(array("admin", "zapier")); +$langs->loadLangs(array('admin', 'zapier')); // Access control if (!$user->admin) { @@ -63,7 +63,7 @@ if ((float) DOL_VERSION >= 6) { * View */ -$page_name = "ZapierForDolibarrSetup"; +$page_name = 'ZapierForDolibarrSetup'; $help_url = 'EN:Module_Zapier'; llxHeader('', $langs->trans($page_name), $help_url); diff --git a/htdocs/zapier/class/api_zapier.class.php b/htdocs/zapier/class/api_zapier.class.php index 5bcab883238..56ab923435d 100644 --- a/htdocs/zapier/class/api_zapier.class.php +++ b/htdocs/zapier/class/api_zapier.class.php @@ -13,26 +13,27 @@ * 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 . + * along with this program. If not, see . */ -use Luracast\Restler\RestException; - -require_once DOL_DOCUMENT_ROOT.'/zapier/class/hook.class.php'; - /** * \file htdocs/zapier/class/api_zapier.class.php * \ingroup zapier * \brief File for API management of hook. */ +use Luracast\Restler\RestException; + +require_once DOL_DOCUMENT_ROOT.'/zapier/class/hook.class.php'; + + /** * API class for zapier hook * * @access protected * @class DolibarrApiAccess {@requires user,external} */ -class ZapierApi extends DolibarrApi +class Zapier extends DolibarrApi { /** * @var array $FIELDS Mandatory fields, checked when create and update object diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 64259f5a592..9b5b7335559 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -263,7 +263,7 @@ class Hook extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } diff --git a/htdocs/zapier/lib/zapier.lib.php b/htdocs/zapier/lib/zapier.lib.php index a92f2879b4d..5b6a3bd335a 100644 --- a/htdocs/zapier/lib/zapier.lib.php +++ b/htdocs/zapier/lib/zapier.lib.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -52,7 +52,9 @@ function zapierAdminPrepareHead() //$this->tabs = array( // 'entity:-tabname:Title:@zapier:/zapier/mypage.php?id=__ID__' //); // to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'zapier'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'zapier'); + + complete_head_from_modules($conf, $langs, null, $head, $h, 'zapier', 'remove'); return $head; } diff --git a/htdocs/zapier/lib/zapier_hook.lib.php b/htdocs/zapier/lib/zapier_hook.lib.php deleted file mode 100644 index 3d4228325e2..00000000000 --- a/htdocs/zapier/lib/zapier_hook.lib.php +++ /dev/null @@ -1,90 +0,0 @@ -. - */ - -/** - * \file htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php - * \ingroup mymodule - * \brief Library files with common functions for MyObject - */ - -/** - * Prepare array of tabs for MyObject - * - * @param MyObject $object MyObject - * @return array Array of tabs - */ -function myobjectPrepareHead($object) -{ - global $db, $langs, $conf; - - $langs->load("mymodule@mymodule"); - - $h = 0; - $head = array(); - - $head[$h][0] = dol_buildpath("/mymodule/myobject_card.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Card"); - $head[$h][2] = 'card'; - $h++; - - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { - $nbNote = 0; - if (!empty($object->note_private)) { - $nbNote++; - } - if (!empty($object->note_public)) { - $nbNote++; - } - $head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id; - $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) { - $head[$h][1] .= ''.$nbNote.''; - } - $head[$h][2] = 'note'; - $h++; - } - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->mymodule->dir_output."/myobject/".dol_sanitizeFileName($object->ref); - $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) { - $head[$h][1] .= ''.($nbFiles + $nbLinks).''; - } - $head[$h][2] = 'document'; - $h++; - - $head[$h][0] = dol_buildpath("/mymodule/myobject_agenda.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Events"); - $head[$h][2] = 'agenda'; - $h++; - - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - //$this->tabs = array( - // 'entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__' - //); // to add new tab - //$this->tabs = array( - // 'entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__' - //); // to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'myobject@mymodule'); - - return $head; -} diff --git a/phpstan.neon b/phpstan.neon index 02e47e753d7..129ca462921 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -103,6 +103,7 @@ parameters: - %currentWorkingDirectory%/htdocs/core/lib/donation.lib.php - %currentWorkingDirectory%/htdocs/core/lib/ecm.lib.php - %currentWorkingDirectory%/htdocs/core/lib/emailing.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/eventorganization.lib.php - %currentWorkingDirectory%/htdocs/core/lib/expedition.lib.php - %currentWorkingDirectory%/htdocs/core/lib/expensereport.lib.php - %currentWorkingDirectory%/htdocs/core/lib/fichinter.lib.php @@ -110,13 +111,17 @@ parameters: - %currentWorkingDirectory%/htdocs/core/lib/fiscalyear.lib.php #- %currentWorkingDirectory%/htdocs/core/lib/format_cards.lib.php - %currentWorkingDirectory%/htdocs/core/lib/fourn.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/ftp.lib.php - %currentWorkingDirectory%/htdocs/core/lib/functions.lib.php - %currentWorkingDirectory%/htdocs/core/lib/functions2.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/functions_ch.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/functionsnumtoword.lib.php - %currentWorkingDirectory%/htdocs/core/lib/geturl.lib.php - %currentWorkingDirectory%/htdocs/core/lib/holiday.lib.php - %currentWorkingDirectory%/htdocs/core/lib/hrm.lib.php - %currentWorkingDirectory%/htdocs/core/lib/images.lib.php - %currentWorkingDirectory%/htdocs/core/lib/import.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/intracommreport.lib.php - %currentWorkingDirectory%/htdocs/core/lib/invoice.lib.php - %currentWorkingDirectory%/htdocs/core/lib/invoice2.lib.php - %currentWorkingDirectory%/htdocs/core/lib/json.lib.php @@ -132,11 +137,13 @@ parameters: - %currentWorkingDirectory%/htdocs/core/lib/parsemd.lib.php - %currentWorkingDirectory%/htdocs/core/lib/payments.lib.php - %currentWorkingDirectory%/htdocs/core/lib/pdf.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/phpsessionindb.lib.php - %currentWorkingDirectory%/htdocs/core/lib/prelevement.lib.php - %currentWorkingDirectory%/htdocs/core/lib/price.lib.php - %currentWorkingDirectory%/htdocs/core/lib/product.lib.php - %currentWorkingDirectory%/htdocs/core/lib/project.lib.php - %currentWorkingDirectory%/htdocs/core/lib/propal.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/receiptprinter.lib.php - %currentWorkingDirectory%/htdocs/core/lib/reception.lib.php - %currentWorkingDirectory%/htdocs/core/lib/report.lib.php - %currentWorkingDirectory%/htdocs/core/lib/resource.lib.php @@ -155,6 +162,7 @@ parameters: - %currentWorkingDirectory%/htdocs/core/lib/usergroups.lib.php - %currentWorkingDirectory%/htdocs/core/lib/vat.lib.php - %currentWorkingDirectory%/htdocs/core/lib/website.lib.php + #- %currentWorkingDirectory%/htdocs/core/lib/website2.lib.php - %currentWorkingDirectory%/htdocs/core/lib/ws.lib.php - %currentWorkingDirectory%/htdocs/core/lib/xcal.lib.php featureToggles: diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index a8a4363ba5c..d7793c3ced1 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -45,7 +45,7 @@ if (!$user->admin) { // Date range $year = GETPOST("year"); if (empty($year)) { - $year_current = strftime("%Y", dol_now()); + $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $month_current = strftime("%m", dol_now()); $year_start = $year_current; } else { diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 6899a90c905..c7a9d19fb5c 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -92,7 +92,7 @@ $hookmanager->initHooks(array('cli')); $now = dol_now(); @set_time_limit(0); -print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." ***** userlogin=".$userlogin." ***** ".dol_print_date($now, 'dayhourrfc')." *****\n"; +print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." - userlogin=".$userlogin." - ".dol_print_date($now, 'dayhourrfc')." *****\n"; // Check module cron is activated if (empty($conf->cron->enabled)) { @@ -164,6 +164,10 @@ $user->getrights(); if (isset($argv[3]) && $argv[3]) { $id = $argv[3]; } +$forcequalified = 0; +if (isset($argv[4]) && $argv[4] == '--force') { + $forcequalified = 1; +} // create a jobs object $object = new Cronjob($db); @@ -242,7 +246,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) { } //If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database - if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now)) { + if ($forcequalified || (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now))) { echo " - qualified"; dol_syslog("cron_run_jobs.php line->datenextrun:".dol_print_date($line->datenextrun, 'dayhourrfc')." line->datestart:".dol_print_date($line->datestart, 'dayhourrfc')." line->dateend:".dol_print_date($line->dateend, 'dayhourrfc')." now:".dol_print_date($now, 'dayhourrfc')); @@ -309,7 +313,7 @@ exit(0); */ function usage($path, $script_file) { - print "Usage: ".$script_file." securitykey userlogin|'firstadmin' [cronjobid]\n"; + print "Usage: ".$script_file." securitykey userlogin|'firstadmin' [cronjobid] [--force]\n"; print "The script return 0 when everything worked successfully.\n"; print "\n"; print "On Linux system, you can have cron jobs ran automatically by adding an entry into cron.\n"; @@ -317,4 +321,6 @@ function usage($path, $script_file) print "30 3 * * * ".$path.$script_file." securitykey userlogin > ".DOL_DATA_ROOT."/".$script_file.".log\n"; print "For example, to run pending tasks every 5mn, you can add this line:\n"; print "*/5 * * * * ".$path.$script_file." securitykey userlogin > ".DOL_DATA_ROOT."/".$script_file.".log\n"; + print "\n"; + print "The option --force allow to bypass the check on date of execution so job will be executed even if date is not yet reached.\n"; } diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 4dcb9e58c97..ec1fbd293d6 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -307,7 +307,8 @@ if ($resql) { } // Fabrication du mail $trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid; - $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing'); + $upload_dir_tmp = $upload_dir; + $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp); if ($mail->error) { $res = 0; diff --git a/scripts/user/migrate_picture_path.php b/scripts/user/migrate_picture_path.php index dd395dc0629..d64c843767f 100755 --- a/scripts/user/migrate_picture_path.php +++ b/scripts/user/migrate_picture_path.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index 52efe3a0147..97b067ff454 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -78,12 +78,12 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (empty($conf->accounting->enabled)) { + if (!isModEnabled('accounting')) { print __METHOD__." module accouting must be enabled.\n"; exit(-1); } @@ -95,7 +95,7 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index b739b387a74..2499841d671 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -78,7 +78,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -95,7 +95,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 0e4956e3a12..a3e55063cd4 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -80,19 +80,19 @@ class AdherentTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { + if (!empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n"; die(1); } - if (! empty($conf->global->MAIN_MODULE_LDAP)) { + if (!empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(1); } - if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { + if (!empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(1); } @@ -104,7 +104,7 @@ class AdherentTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -117,7 +117,7 @@ class AdherentTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -132,7 +132,7 @@ class AdherentTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 9ce135da263..6649aa19798 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -78,7 +78,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -165,6 +165,9 @@ class AdminLibTest extends PHPUnit\Framework\TestCase require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php'; print "Enable module modExpenseReport"; $moduledescriptor=new modExpenseReport($db); + + $result = $moduledescriptor->remove(); + $result = $moduledescriptor->init(); print __METHOD__." result=".$result."\n"; $this->assertEquals(1, $result); @@ -173,6 +176,9 @@ class AdminLibTest extends PHPUnit\Framework\TestCase require_once dirname(__FILE__).'/../../htdocs/core/modules/modApi.class.php'; print "Enable module modAPI"; $moduledescriptor=new modApi($db); + + $result = $moduledescriptor->remove(); + $result = $moduledescriptor->init(); print __METHOD__." result=".$result."\n"; $this->assertEquals(1, $result); diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 5979adabcec..12223b17d1c 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -41,11 +41,11 @@ if (empty($conf->adherent->enabled)) { print "Error: Module member must be enabled to have significant results.\n"; exit(1); } -if (! empty($conf->ldap->enabled)) { +if (!empty($conf->ldap->enabled)) { print "Error: LDAP module should not be enabled.\n"; exit(1); } -if (! empty($conf->google->enabled)) { +if (!empty($conf->google->enabled)) { print "Warning: Google module should not be enabled.\n"; } if (empty($user->id)) { diff --git a/test/phpunit/BOMTest.php b/test/phpunit/BOMTest.php index 1d8a6cfbfd2..c56afb7efa8 100644 --- a/test/phpunit/BOMTest.php +++ b/test/phpunit/BOMTest.php @@ -79,7 +79,7 @@ class BOMTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class BOMTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class BOMTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class BOMTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 4ce31e8bd60..8f1169b6cbd 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -81,7 +81,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -94,7 +94,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -107,7 +107,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -123,7 +123,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/BarcodeTest.php b/test/phpunit/BarcodeTest.php index 132ba8c1126..67cc013c50b 100644 --- a/test/phpunit/BarcodeTest.php +++ b/test/phpunit/BarcodeTest.php @@ -81,7 +81,7 @@ class BarcodeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -94,7 +94,7 @@ class BarcodeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -107,7 +107,7 @@ class BarcodeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -123,7 +123,7 @@ class BarcodeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/BonPrelevementTest.php b/test/phpunit/BonPrelevementTest.php index 314640aefda..ce5a4ae1bd8 100644 --- a/test/phpunit/BonPrelevementTest.php +++ b/test/phpunit/BonPrelevementTest.php @@ -80,7 +80,7 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -93,7 +93,7 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 81b05486c72..bf61ba38fbd 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -108,7 +108,7 @@ class BuildDocTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -144,7 +144,7 @@ class BuildDocTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -157,7 +157,7 @@ class BuildDocTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -172,7 +172,7 @@ class BuildDocTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php index 7e4b5dbacb7..729aa4b4c7f 100644 --- a/test/phpunit/CMailFileTest.php +++ b/test/phpunit/CMailFileTest.php @@ -78,7 +78,7 @@ class CMailFileTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class CMailFileTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class CMailFileTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class CMailFileTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index 67e7f937267..3bd870914e3 100644 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -79,7 +79,7 @@ class CategorieTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class CategorieTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class CategorieTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class CategorieTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 705d21ed95d..14a9fabc9ae 100644 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -78,7 +78,7 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index bff78d47b94..e0f36279437 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -110,7 +110,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -123,7 +123,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -136,7 +136,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -152,7 +152,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -178,6 +178,9 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase if (preg_match('/\/htdocs\/includes\//', $file['fullname'])) { continue; } + if (preg_match('/\/htdocs\/install\/doctemplates\/websites\//', $file['fullname'])) { + continue; + } if (preg_match('/\/htdocs\/custom\//', $file['fullname'])) { continue; } @@ -198,7 +201,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase || preg_match('/boxes\/box_/', $file['relativename']) || preg_match('/modules\/.*\/doc\/(doc|pdf)_/', $file['relativename']) || preg_match('/modules\/(import|mailings|printing)\//', $file['relativename']) - || in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) { + || in_array($file['name'], array('modules_boxes.php', 'TraceableDB.php'))) { // Check into Class files if (! in_array($file['name'], array( 'api.class.php', @@ -247,6 +250,20 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase } } + // Check we don't miss top_httphead() into any ajax pages + if (preg_match('/ajax\//', $file['relativename'])) { + print "Analyze ajax page ".$file['relativename']."\n"; + $ok=true; + $matches=array(); + preg_match_all('/top_httphead/', $filecontent, $matches, PREG_SET_ORDER); + if (count($matches) == 0) { + $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Did not find top_httphead into the ajax page '.$file['relativename']); + //exit; + } + // Check if a var_dump has been forgotten if (!preg_match('/test\/phpunit/', $file['fullname'])) { $ok=true; @@ -329,7 +346,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase //if ($reg[0] != 'db') $ok=false; } //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found a forged SQL string that mix on same line the use of \' for PHP string and PHP variables into file '.$file['relativename'].' Use " to forge PHP string like this: $sql = "SELET ".$myvar...'); + $this->assertTrue($ok, 'Found a forged SQL string that mix on same line the use of \' for PHP string and PHP variables into file '.$file['relativename'].' Use " to forge PHP string like this: $sql = "SELECT ".$myvar...'); //exit; // Check that forged sql string is using ' instead of " as string PHP quotes @@ -463,8 +480,10 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase foreach ($matches as $key => $val) { //var_dump($val); if (!in_array($val[1], array( - "'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'", - "'search_status'", '"mysqldump"', '"postgresqldump"', "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", '"MAIN_MAIL_SMTPS_PW"'))) { + "'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'", "'WEBSITE_LICENSE'", + '"mysqldump"', '"postgresqldump"', + "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", + '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"'))) { $ok=false; break; } @@ -513,7 +532,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase $this->assertTrue($ok, 'Found a forbidden string sequence into '.$file['relativename'].' : name="token" value="\'.$_SESSION[..., you must use a newToken() instead of $_SESSION[\'newtoken\'].'); - // Test we don't have @var array( + // Test we don't have preg_grep with a param without preg_quote $ok=true; $matches=array(); preg_match_all('/preg_grep\(.*\$/', $filecontent, $matches, PREG_SET_ORDER); @@ -526,6 +545,26 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase $this->assertTrue($ok, 'Found a preg_grep with a param that is a $var but without preg_quote in file '.$file['relativename'].'.'); + // Test we don't have empty($user->hasRight + $ok=true; + $matches=array(); + preg_match_all('/empty\(\$user->hasRight/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + $this->assertTrue($ok, 'Found code empty($user->hasRight in file '.$file['relativename'].'. empty() must not be used with hasRight.'); + + // Test we don't have empty(DolibarrApiAccess::$user->hasRight + $ok=true; + $matches=array(); + preg_match_all('/empty\(DolibarrApiAccess::\$user->hasRight/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + $this->assertTrue($ok, 'Found code empty(DolibarrApiAccess::$user->hasRight in file '.$file['relativename'].'. empty() must not be used with hasRight.'); + // Test we don't have @var array( $ok=true; $matches=array(); diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index 9a1490caeb2..00c7a5aebae 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -110,7 +110,7 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -123,7 +123,7 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -136,7 +136,7 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -152,7 +152,7 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 5240083512b..7d00f464665 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -80,7 +80,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -93,7 +93,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index 064c205c0e9..cb439fe2c84 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -78,7 +78,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -95,7 +95,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index f4cfaefb809..1aed7c4326b 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -78,7 +78,7 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index 7a01f750eef..97711832291 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -79,7 +79,7 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 8b78712209f..afdc040493e 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -78,7 +78,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CompanyLibTest.php b/test/phpunit/CompanyLibTest.php index a2a83ee70a7..39b8109b3a3 100644 --- a/test/phpunit/CompanyLibTest.php +++ b/test/phpunit/CompanyLibTest.php @@ -78,7 +78,7 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 1f8977f6919..e3f76ad57d0 100644 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -85,7 +85,7 @@ class ContactTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -99,7 +99,7 @@ class ContactTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -112,7 +112,7 @@ class ContactTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -127,7 +127,7 @@ class ContactTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index cd21427eba7..e834255ab9a 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -78,7 +78,7 @@ class ContratTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class ContratTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class ContratTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class ContratTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 87f3a3940f4..8ac448fa15e 100644 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -101,7 +101,7 @@ class CoreTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -114,7 +114,7 @@ class CoreTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -127,7 +127,7 @@ class CoreTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -142,7 +142,7 @@ class CoreTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 983ad2af489..6f50e5b3085 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -85,7 +85,7 @@ class DateLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -98,7 +98,7 @@ class DateLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -111,7 +111,7 @@ class DateLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -126,7 +126,7 @@ class DateLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -362,6 +362,12 @@ class DateLibTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date('1970-01-01', '%Y-%m-%d %H:%M:%S', true); // A case for compatibility check + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1970-01-01 00:00:00', $result); + + // Check %Y-%m-%d %H:%M:%S format $result=dol_print_date(0, '%Y-%m-%d %H:%M:%S', true); print __METHOD__." result=".$result."\n"; diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 0db809be2f7..b855b240648 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -78,7 +78,7 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -99,7 +99,7 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -112,7 +112,7 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -127,7 +127,7 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 5841ba59c37..ec761a14316 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -78,7 +78,7 @@ class DiscountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class DiscountTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class DiscountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class DiscountTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/EmailCollectorTest.php b/test/phpunit/EmailCollectorTest.php index da77825b3b9..08652ffd2be 100644 --- a/test/phpunit/EmailCollectorTest.php +++ b/test/phpunit/EmailCollectorTest.php @@ -80,7 +80,7 @@ class EmailCollectorTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -93,7 +93,7 @@ class EmailCollectorTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class EmailCollectorTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class EmailCollectorTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php index 691b3039744..8ee0c537f8a 100644 --- a/test/phpunit/EntrepotTest.php +++ b/test/phpunit/EntrepotTest.php @@ -78,7 +78,7 @@ class EntrepotTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -96,7 +96,7 @@ class EntrepotTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -109,7 +109,7 @@ class EntrepotTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class EntrepotTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/EvalMathTest.php b/test/phpunit/EvalMathTest.php index 1346538668c..885b80233c7 100644 --- a/test/phpunit/EvalMathTest.php +++ b/test/phpunit/EvalMathTest.php @@ -77,7 +77,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -91,7 +91,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index 247a9dd1012..6b2bb319385 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -79,7 +79,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 6f4928362ea..cf2f0520908 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -103,7 +103,7 @@ class ExportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -116,7 +116,7 @@ class ExportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -129,7 +129,7 @@ class ExportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -144,7 +144,7 @@ class ExportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 06d28a03067..e6ec6683253 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -79,7 +79,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 1fb62ecfd0e..5d7c99813e2 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -79,7 +79,7 @@ class FactureRecTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class FactureRecTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class FactureRecTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class FactureRecTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index e40ed6aa2e7..5f12eacdd60 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -79,14 +79,14 @@ class FactureTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; if (!isModEnabled('facture')) { print __METHOD__." module customer invoice must be enabled.\n"; die(1); } - if (! empty($conf->ecotaxdeee->enabled)) { + if (!empty($conf->ecotaxdeee->enabled)) { print __METHOD__." ecotaxdeee module must not be enabled.\n"; die(1); } @@ -100,7 +100,7 @@ class FactureTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -113,7 +113,7 @@ class FactureTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -129,7 +129,7 @@ class FactureTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 7c225167e35..822311cb0e9 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -78,7 +78,7 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index fb8cdd0b12e..58c750c7b86 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -78,7 +78,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 8c819c6de64..e702f7482ce 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -79,7 +79,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FormAdminTest.php b/test/phpunit/FormAdminTest.php index 7217f3b57e2..7b492a4d8ec 100644 --- a/test/phpunit/FormAdminTest.php +++ b/test/phpunit/FormAdminTest.php @@ -78,7 +78,7 @@ class FormAdminTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class FormAdminTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class FormAdminTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class FormAdminTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FormTest.php b/test/phpunit/FormTest.php index 3345c7ddd1e..41f79ffb749 100644 --- a/test/phpunit/FormTest.php +++ b/test/phpunit/FormTest.php @@ -78,7 +78,7 @@ class FormTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class FormTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class FormTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class FormTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index db131fee67c..69ccdc45866 100644 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -102,7 +102,7 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -115,7 +115,7 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -128,7 +128,7 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -143,7 +143,7 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 47de2cbebcc..12c8683bb8f 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -29,6 +29,7 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php'; if (! defined('NOREQUIREUSER')) { define('NOREQUIREUSER', '1'); @@ -107,7 +108,7 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -132,7 +133,7 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -145,7 +146,7 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -161,11 +162,37 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } + /** + * testDolClone + * + * @return void + */ + public function testDolClone() + { + $newproduct1 = new Product($this->savdb); + + print __METHOD__." this->savdb has type ".(is_resource($this->savdb->db) ? get_resource_type($this->savdb->db) : (is_object($this->savdb->db) ? 'object' : 'unknown'))."\n"; + print __METHOD__." newproduct1->db->db has type ".(is_resource($newproduct1->db->db) ? get_resource_type($newproduct1->db->db) : (is_object($newproduct1->db->db) ? 'object' : 'unknown'))."\n"; + $this->assertEquals($this->savdb->connected, 1, 'Savdb is connected'); + $this->assertNotNull($newproduct1->db->db, 'newproduct1->db is not null'); + + $newproductcloned1 = dol_clone($newproduct1); + + print __METHOD__." this->savdb has type ".(is_resource($this->savdb->db) ? get_resource_type($this->savdb->db) : (is_object($this->savdb->db) ? 'object' : 'unknown'))."\n"; + print __METHOD__." newproduct1->db->db has type ".(is_resource($newproduct1->db->db) ? get_resource_type($newproduct1->db->db) : (is_object($newproduct1->db->db) ? 'object' : 'unknown'))."\n"; + $this->assertEquals($this->savdb->connected, 1, 'Savdb is connected'); + $this->assertNotNull($newproduct1->db->db, 'newproduct1->db is not null'); + + $newproductcloned2 = dol_clone($newproduct1, 2); + var_dump($newproductcloned2); + //print __METHOD__." newproductcloned1->db must be null\n"; + //$this->assertNull($newproductcloned1->db, 'newproductcloned1->db is null'); + } /** * testNum2Alpha diff --git a/test/phpunit/GetUrlLibTest.php b/test/phpunit/GetUrlLibTest.php index 97878ef9589..b8e3c50363f 100644 --- a/test/phpunit/GetUrlLibTest.php +++ b/test/phpunit/GetUrlLibTest.php @@ -79,7 +79,7 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index 4fbd57c212b..8e2e8aaaf8b 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -80,7 +80,7 @@ class HolidayTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -94,7 +94,7 @@ class HolidayTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -107,7 +107,7 @@ class HolidayTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class HolidayTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php index 960dd56c4b5..b8288aa25e6 100644 --- a/test/phpunit/ImagesLibTest.php +++ b/test/phpunit/ImagesLibTest.php @@ -80,7 +80,7 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -93,7 +93,7 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index ed285608690..d64c82cc4e8 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -101,7 +101,7 @@ class ImportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -114,7 +114,7 @@ class ImportTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -127,7 +127,7 @@ class ImportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -142,7 +142,7 @@ class ImportTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/InventoryTest.php b/test/phpunit/InventoryTest.php index ad2b19aebd3..a879c91b70e 100644 --- a/test/phpunit/InventoryTest.php +++ b/test/phpunit/InventoryTest.php @@ -79,7 +79,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -93,7 +93,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class InventoryTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index a8619ae08c5..341cf51583f 100644 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -101,7 +101,7 @@ class JsonLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -114,7 +114,7 @@ class JsonLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -127,7 +127,7 @@ class JsonLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -142,7 +142,7 @@ class JsonLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/KnowledgeRecordTest.php b/test/phpunit/KnowledgeRecordTest.php index 5e4d9a0d301..ad306ed04b2 100644 --- a/test/phpunit/KnowledgeRecordTest.php +++ b/test/phpunit/KnowledgeRecordTest.php @@ -81,7 +81,7 @@ class KnowledgeRecordTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf, $user, $langs, $db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -96,7 +96,7 @@ class KnowledgeRecordTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf, $user, $langs, $db; $conf = $this->savconf; @@ -112,7 +112,7 @@ class KnowledgeRecordTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -122,7 +122,7 @@ class KnowledgeRecordTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf, $user, $langs, $db; $db->rollback(); @@ -175,13 +175,63 @@ class KnowledgeRecordTest extends PHPUnit\Framework\TestCase return $result; } + /** + * testKnowledgeRecordFetch + * + * @param int $id Id order + * @return KnowledgeRecord + * + * @depends testKnowledgeRecordCreate + * The depends says test is run only if previous is ok + */ + public function testKnowledgeRecordFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new KnowledgeRecord($this->savdb); + $result=$localobject->fetch($id); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } + + /** + * testKnowledgeRecordUpdate + * @param KnowledgeRecord $localobject KnowledgeRecord + * @return int + * + * @depends testKnowledgeRecordFetch + * The depends says test is run only if previous is ok + */ + public function testKnowledgeRecordUpdate($localobject) + { + global $conf, $user, $langs, $db; + $conf = $this->savconf; + $user = $this->savuser; + $langs = $this->savlangs; + $db = $this->savdb; + + $localobject->note_private='New note private after update'; + $result = $localobject->update($user); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + + return $result; + } + /** * testKnowledgeRecordDelete * * @param int $id Id of object * @return int * - * @depends testKnowledgeRecordCreate + * @depends testKnowledgeRecordUpdate * The depends says test is run only if previous is ok */ public function testKnowledgeRecordDelete($id) diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index e0eaded97de..18fa1c2d4db 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -110,7 +110,7 @@ class LangTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -123,7 +123,7 @@ class LangTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -136,7 +136,7 @@ class LangTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -152,7 +152,7 @@ class LangTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/LesscTest.php b/test/phpunit/LesscTest.php index 691d413d020..6bf90b4a105 100644 --- a/test/phpunit/LesscTest.php +++ b/test/phpunit/LesscTest.php @@ -110,7 +110,7 @@ class LesscTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -123,7 +123,7 @@ class LesscTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -136,7 +136,7 @@ class LesscTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -152,7 +152,7 @@ class LesscTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 3dba569c4e9..58f4b6f0041 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -78,7 +78,7 @@ class LoanTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class LoanTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class LoanTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class LoanTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index 1c7553eb76f..0b5aa0cfb5e 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -78,7 +78,7 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 8fd67576a7e..5ef22cddd88 100644 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -77,7 +77,7 @@ class ModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -90,7 +90,7 @@ class ModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -103,7 +103,7 @@ class ModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -118,7 +118,7 @@ class ModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index 749f94ab20f..a781ea78e12 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -80,7 +80,7 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -93,7 +93,7 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index ceab1948732..b2b6285f9e3 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -77,7 +77,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -91,7 +91,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 61027d02710..378c703684b 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -79,7 +79,7 @@ class PaypalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -97,7 +97,7 @@ class PaypalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -110,7 +110,7 @@ class PaypalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -126,7 +126,7 @@ class PaypalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index 35350c3bdae..595930225c9 100644 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -81,7 +81,7 @@ class PdfDocTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -94,7 +94,7 @@ class PdfDocTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -107,7 +107,7 @@ class PdfDocTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class PdfDocTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/PgsqlTest.php b/test/phpunit/PgsqlTest.php index 044d4576067..17c4c82714e 100644 --- a/test/phpunit/PgsqlTest.php +++ b/test/phpunit/PgsqlTest.php @@ -80,7 +80,7 @@ class PgsqlTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -94,7 +94,7 @@ class PgsqlTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -107,7 +107,7 @@ class PgsqlTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -122,7 +122,7 @@ class PgsqlTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index 1845bf05149..5378407c2b4 100644 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -38,7 +38,7 @@ if (empty($user->id)) { } $conf->global->MAIN_DISABLE_ALL_MAILS=1; -if (! empty($conf->global->MAIN_ROUNDING_RULE_TOT)) { +if (!empty($conf->global->MAIN_ROUNDING_RULE_TOT)) { print "Parameter MAIN_ROUNDING_RULE_TOT must be set to 0 or not set.\n"; exit(1); } @@ -84,7 +84,7 @@ class PricesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -97,7 +97,7 @@ class PricesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; //$db->rollback(); @@ -110,7 +110,7 @@ class PricesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -126,7 +126,7 @@ class PricesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ProductTest.php b/test/phpunit/ProductTest.php index 90dfab3fe04..d23d2562f22 100644 --- a/test/phpunit/ProductTest.php +++ b/test/phpunit/ProductTest.php @@ -78,7 +78,7 @@ class ProductTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -96,7 +96,7 @@ class ProductTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -109,7 +109,7 @@ class ProductTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class ProductTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 0a5812036d3..f49fd5857e2 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -79,7 +79,7 @@ class ProjectTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class ProjectTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class ProjectTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class ProjectTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 235cc81e10c..493d99257a6 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -78,7 +78,7 @@ class PropalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class PropalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class PropalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class PropalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/RestAPIDocumentTest.php b/test/phpunit/RestAPIDocumentTest.php index c71ef7bcf63..1992e56d815 100644 --- a/test/phpunit/RestAPIDocumentTest.php +++ b/test/phpunit/RestAPIDocumentTest.php @@ -81,7 +81,7 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -94,7 +94,7 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -106,7 +106,7 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase * Init phpunit tests. * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf = $this->savconf; @@ -138,7 +138,7 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase * End phpunit tests. * @return void */ - protected function tearDown() + protected function tearDown(): void { echo __METHOD__."\n"; } diff --git a/test/phpunit/RestAPIUserTest.php b/test/phpunit/RestAPIUserTest.php index c908b631df8..a1214c1a047 100644 --- a/test/phpunit/RestAPIUserTest.php +++ b/test/phpunit/RestAPIUserTest.php @@ -87,7 +87,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -100,7 +100,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -113,7 +113,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -146,7 +146,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index fa0a4a9d72b..6132cd7837a 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -110,7 +110,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -123,7 +123,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -136,7 +136,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -152,7 +152,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 4f7a78790f1..4a0b65333ff 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -106,7 +106,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -119,7 +119,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -132,7 +132,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -148,7 +148,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -221,6 +221,10 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=testSqlAndScriptInject($test, 1); $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2a. Should find an attack on GET param and did not.'); + $test = "delete\nfrom"; + $result=testSqlAndScriptInject($test, 1); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2b. Should find an attack on GET param and did not.'); + $test = 'action=update& ... set ... ='; $result=testSqlAndScriptInject($test, 1); $this->assertEquals(0, $result, 'Error on testSqlAndScriptInject for SQL2b. Should not find an attack on GET param and did.'); @@ -332,7 +336,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase $test="Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)"; $result=testSqlAndScriptInject($test, 0); // result must be 0 - $this->assertEquals(0, $result, 'Error on testSqlAndScriptInject mmm'); + $this->assertEquals(0, $result, 'Error on testSqlAndScriptInject mmm, result should be 0 and is not'); + + $test ='XSS'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject nnn, result should be >= 1 and is not'); $test="/dolibarr/htdocs/index.php/".chr('246')."abc"; // Add the char %F6 into the variable $result=testSqlAndScriptInject($test, 2); @@ -382,9 +390,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase $_POST["param13b"]='n n > < " XSS'; $_POST["param14"]="Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)"; $_POST["param15"]=" src=>0xbeefed"; - //$_POST["param13"]='javascript%26colon%26%23x3B%3Balert(1)'; - //$_POST["param14"]='javascripT&javascript#x3a alert(1)'; - + $_POST["param16"]='abc'; + $_POST["param17"]='abc'; + $_POST["param18"]='abc'; + $_POST["param19"]='XSS'; + //$_POST["param19"]='XSS'; $result=GETPOST('id', 'int'); // Must return nothing print __METHOD__." result=".$result."\n"; @@ -504,7 +514,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals(trim($_POST["param11"]), $result, 'Test an email string with alphawithlgt'); - // Test with restricthtml we must remove html open/close tag and content but not htmlentities (we can decode html entities for ascii chars like n) + // Test with restricthtml: we must remove html open/close tag and content but not htmlentities (we can decode html entities for ascii chars like n) $result=GETPOST("param6", 'restricthtml'); print __METHOD__." result param6=".$result."\n"; @@ -534,16 +544,24 @@ class SecurityTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals("Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)", $result, 'Test 14'); - $result=GETPOST("param15", 'restricthtml'); // src=>0xbeefed + $result=GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string print __METHOD__." result=".$result."\n"; $this->assertEquals("0xbeefed", $result, 'Test 15'); // The GETPOST return a harmull string - // Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad atrributes + $result=GETPOST("param19", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('XSS', $result, 'Test 19'); + + + // Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML to test disabling of bad atrributes $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1; - $result=GETPOST("param15", 'restricthtml'); + + $result=GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string print __METHOD__." result=".$result."\n"; $this->assertEquals('InvalidHTMLString', $result, 'Test 15b'); + //$this->assertEquals(' src=>0xbeefed', $result, 'Test 15b'); + unset($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML); @@ -552,7 +570,19 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=GETPOST("param15", 'restricthtml'); print __METHOD__." result=".$result."\n"; - $this->assertEquals('0xbeefed', $result, 'Test 15b'); + $this->assertEquals('0xbeefed', $result, 'Test 15c'); + + $result=GETPOST('param16', 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc', $result, 'Test tag a with forbidden attribute z-index'); + + $result=GETPOST('param17', 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc', $result, 'Test anytag with a forbidden value for attribute'); + + $result=GETPOST('param18', 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc', $result, 'Test anytag with a forbidden value for attribute'); unset($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES); @@ -589,6 +619,13 @@ class SecurityTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals('x3aalert(1)', $result, 'Test for backtopage param'); + + $conf->global->MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT = 3; + $_POST["pagecontentwithlinks"]=''; + $result=GETPOST("pagecontentwithlinks", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('TooManyLinksIntoHTMLString', $result, 'Test on limit on GETPOST fails'); + return $result; } @@ -814,6 +851,36 @@ class SecurityTest extends PHPUnit\Framework\TestCase $this->assertEquals('google.com', $result, 'Test on dol_sanitizeUrl C'); } + /** + * testDolSanitizeEmail + * + * @return void + */ + public function testDolSanitizeEmail() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $test = 'aaa@mycompany.com , bbb@mycompany.com '; + $result=dol_sanitizeEmail($test); + $this->assertEquals($test, $result, 'Test on dol_sanitizeEmail A'); + + $test = "aaa@mycompany.com ,\nbbb@mycompany.com "; + $result=dol_sanitizeEmail($test); + $this->assertEquals('aaa@mycompany.com ,bbb@mycompany.com ', $result, 'Test on dol_sanitizeEmail B'); + + $test = 'aaa@mycompany.com ,\nbbb@mycompany.com '; + $result=dol_sanitizeEmail($test); + $this->assertEquals('aaa@mycompany.com ,nbbb@mycompany.com ', $result, 'Test on dol_sanitizeEmail C'); + + $test = 'aaa@mycompany.com , "bcc:bbb"@mycompany.com '; + $result=dol_sanitizeEmail($test); + $this->assertEquals('aaa@mycompany.com , bccbbb@mycompany.com ', $result, 'Test on dol_sanitizeEmail D'); + } + /** * testDolSanitizeFileName * diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 73363140acd..ff24614e090 100644 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -79,7 +79,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -87,7 +87,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase print "\n".__METHOD__." third party ref checker must be setup to 'mod_codeclient_monkey' not to '".$conf->global->SOCIETE_CODECLIENT_ADDON."'.\n"; die(1); } - if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) { + if (!empty($conf->global->MAIN_DISABLEPROFIDRULES)) { print "\n".__METHOD__." constant MAIN_DISABLEPROFIDRULES must be empty (if a module set it, disable module).\n"; die(1); } @@ -105,7 +105,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -118,7 +118,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -134,7 +134,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/StripeTest.php b/test/phpunit/StripeTest.php index bb769e83e80..08eb585b7f7 100644 --- a/test/phpunit/StripeTest.php +++ b/test/phpunit/StripeTest.php @@ -79,7 +79,7 @@ class StripeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -97,7 +97,7 @@ class StripeTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -110,7 +110,7 @@ class StripeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -126,7 +126,7 @@ class StripeTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/SupplierProposalTest.php b/test/phpunit/SupplierProposalTest.php index ebcf30c29e6..11bd6c1e598 100644 --- a/test/phpunit/SupplierProposalTest.php +++ b/test/phpunit/SupplierProposalTest.php @@ -81,7 +81,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -98,7 +98,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -111,7 +111,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -132,7 +132,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/TicketTest.php b/test/phpunit/TicketTest.php index 60aea4b8098..09745d86e8e 100644 --- a/test/phpunit/TicketTest.php +++ b/test/phpunit/TicketTest.php @@ -79,7 +79,7 @@ class TicketTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -92,7 +92,7 @@ class TicketTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class TicketTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class TicketTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index 46eb3917001..b20bccb9b24 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -78,7 +78,7 @@ class UserGroupTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class UserGroupTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class UserGroupTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -120,7 +120,7 @@ class UserGroupTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index ea7090f2b54..f318ae4cbac 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -78,11 +78,11 @@ class UserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; - if (! empty($conf->global->MAIN_MODULE_LDAP)) { + if (!empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(1); } @@ -96,7 +96,7 @@ class UserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -109,7 +109,7 @@ class UserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -125,7 +125,7 @@ class UserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index 91ba85a7656..94679546350 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -78,7 +78,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -92,7 +92,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -105,7 +105,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -121,7 +121,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/WebservicesInvoicesTest.php b/test/phpunit/WebservicesInvoicesTest.php index a077b34e208..dccf1516993 100644 --- a/test/phpunit/WebservicesInvoicesTest.php +++ b/test/phpunit/WebservicesInvoicesTest.php @@ -99,7 +99,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; @@ -151,7 +151,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -164,7 +164,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -180,7 +180,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -261,7 +261,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $this->soapclient->error_str; print "\n
    \n"; @@ -316,7 +316,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { print $this->soapclient->error_str; print "\n
    \n"; print $this->soapclient->request; @@ -413,7 +413,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { print 'Error: '.$this->soapclient->error_str; print "\n
    \n"; print $this->soapclient->request; diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index 45d0bdcccbe..f790ac15902 100644 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -82,7 +82,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -95,7 +95,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -124,7 +124,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -173,7 +173,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print 'Error: '.$soapclient->error_str; print "\n
    \n"; diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index df1e0fa76a1..5f5a6e833b1 100644 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -82,7 +82,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -95,7 +95,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -124,7 +124,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -174,7 +174,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! empty($result['faultstring'])) { + if (!empty($result['faultstring'])) { print $result['faultstring']."\n"; $result=0; } @@ -202,7 +202,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $soapclient->error_str; print "\n
    \n"; diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index c12323dbec7..f79bdc6313c 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -88,7 +88,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -101,7 +101,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -114,7 +114,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -130,7 +130,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -194,7 +194,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { + if (! $result || !empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { //var_dump($soapclient); print $soapclient->error_str; print "\n
    \n"; @@ -257,7 +257,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $soapclient->error_str; print "\n
    \n"; @@ -320,7 +320,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { + if (! $result || !empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { //var_dump($soapclient); print 'Error: '.$soapclient->error_str; print "\n
    \n"; diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php index 285b8456ffb..7d8fb7aab8e 100644 --- a/test/phpunit/WebservicesThirdpartyTest.php +++ b/test/phpunit/WebservicesThirdpartyTest.php @@ -98,7 +98,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -111,7 +111,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -124,7 +124,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -140,7 +140,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -217,7 +217,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $this->soapclient->error_str; print "\n
    \n"; @@ -271,7 +271,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $this->soapclient->error_str; print "\n
    \n"; @@ -334,7 +334,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase $result=0; } print $this->soapclient->response; - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $this->soapclient->error_str; print "\n
    \n"; @@ -393,7 +393,7 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { print 'Error: '.$this->soapclient->error_str; print "\n
    \n"; print $this->soapclient->request; diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index 8b9ae2739a6..6eba28dfde8 100644 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -82,7 +82,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -95,7 +95,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -108,7 +108,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -124,7 +124,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } @@ -176,7 +176,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! empty($result['faultstring'])) { + if (!empty($result['faultstring'])) { print $result['faultstring']."\n"; $result=0; } @@ -203,7 +203,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase echo $exception; $result=0; } - if (! $result || ! empty($result['faultstring'])) { + if (! $result || !empty($result['faultstring'])) { //var_dump($soapclient); print $soapclient->error_str; print "\n
    \n"; diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index 9c81c25c46e..dc4550fc84f 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -78,7 +78,7 @@ class XCalLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. @@ -91,7 +91,7 @@ class XCalLibTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { global $conf,$user,$langs,$db; $db->rollback(); @@ -104,7 +104,7 @@ class XCalLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -119,7 +119,7 @@ class XCalLibTest extends PHPUnit\Framework\TestCase * * @return void */ - protected function tearDown() + protected function tearDown(): void { print __METHOD__."\n"; } diff --git a/test/phpunit/functional/InstallTest.php b/test/phpunit/functional/InstallTest.php index 394a8c626b7..f1ecdc60914 100644 --- a/test/phpunit/functional/InstallTest.php +++ b/test/phpunit/functional/InstallTest.php @@ -1,5 +1,4 @@ * * Install functional test using PHPUnit's Selenium @@ -47,7 +46,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // Make sure we backup and remove the configuration file to force new install. @rename('htdocs/conf/conf.php', sys_get_temp_dir() . '/conf.php'); @@ -75,7 +74,7 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // Remove the generated configuration and restore the backed up file. @unlink('htdocs/conf/conf.php'); diff --git a/test/phpunit/functional/TakePosFunctionalTest.php b/test/phpunit/functional/TakePosFunctionalTest.php index 5b9d03dcfef..3cb46a04fdf 100644 --- a/test/phpunit/functional/TakePosFunctionalTest.php +++ b/test/phpunit/functional/TakePosFunctionalTest.php @@ -103,7 +103,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase * * @return void */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { } @@ -314,7 +314,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase * * @return void */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { } }
    '.$langs->trans('LocalID').''.$langs->trans('Label').''.$langs->trans('StripeID').''.$langs->trans('StripeID').''.$langs->trans('Type').''.$langs->trans('Informations').'
    '; - print $companypaymentmodetemp->id; - print '
    '; print dol_escape_htmltag($companypaymentmodetemp->label); print ''; - print $companypaymentmodetemp->stripe_card_ref; - if ($companypaymentmodetemp->stripe_card_ref) { + // External card ID + print ''; + if (!empty($companypaymentmodetemp->stripe_card_ref)) { $connect = ''; if (!empty($stripeacc)) { $connect = $stripeacc.'/'; @@ -1013,12 +1112,15 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if ($servicestatus) { $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$companypaymentmodetemp->stripe_card_ref; } - print ' '.img_picto($langs->trans('ShowInStripe').' - Customer and Publishable key = '.$companypaymentmodetemp->stripe_account, 'globe').''; + print ''.img_picto($langs->trans('ShowInStripe').' - Customer and Publishable key = '.$companypaymentmodetemp->stripe_account, 'globe').' '; } + print $companypaymentmodetemp->stripe_card_ref; print ''; print img_credit_card($companypaymentmodetemp->type); print ''; if ($companypaymentmodetemp->proprio) { print ''.$companypaymentmodetemp->proprio.'
    '; @@ -1072,7 +1174,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print img_picto($langs->trans("Modify"), 'edit'); print ''; - print ' '; print ''; // source='.$companypaymentmodetemp->stripe_card_ref.'& print img_picto($langs->trans("Delete"), 'delete'); print ''; @@ -1091,24 +1192,31 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // Show remote sources (not already shown as local source) if (is_array($listofsources) && count($listofsources)) { foreach ($listofsources as $src) { - if (!empty($arrayofstripecard[$src->id])) { + if (!empty($arrayofremotecard[$src->id])) { continue; // Already in previous list } $nbremote++; - print '
    '; - print '
    '; print ''; + print ''; $connect = ''; - print $src->id; if (!empty($stripeacc)) { $connect = $stripeacc.'/'; } @@ -1118,21 +1226,12 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' //$url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$src->id; } - print " ".img_picto($langs->trans('ShowInStripe'), 'globe').""; + print "".img_picto($langs->trans('ShowInStripe'), 'globe')." "; + print $src->id; print ''; - if ($src->object == 'card') { - print img_credit_card($src->brand); - } elseif ($src->object == 'source' && $src->type == 'card') { - print img_credit_card($src->card->brand); - } elseif ($src->object == 'source' && $src->type == 'sepa_debit') { - print ''; - } elseif ($src->object == 'payment_method' && $src->type == 'card') { - print img_credit_card($src->card->brand); - } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { - print ''; - } + print $imgline; print''; @@ -1207,18 +1306,20 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $langs->trans("Remote"); //if ($src->cvc_check == 'fail') print ' - CVC check fail'; print ''; //var_dump($src); - print ''; print ''; if ($permissiontoaddupdatepaymentinformation) { - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; } @@ -1237,8 +1338,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '
    '; } - // List of Stripe payment modes - if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && !empty($stripesupplieracc)) { + // List of Stripe connect accounts + if (isModEnabled('stripe') && !empty($conf->stripeconnect->enabled) && !empty($stripesupplieracc)) { print load_fiche_titre($langs->trans('StripeBalance').($stripesupplieracc ? ' (Stripe connection with StripeConnect account '.$stripesupplieracc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'stripe-s'); $balance = \Stripe\Balance::retrieve(array("stripe_account" => $stripesupplieracc)); print ''."\n"; @@ -1290,13 +1391,18 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print load_fiche_titre($langs->trans("BankAccounts"), $morehtmlright, 'bank'); + $nblocal = 0; $nbremote = 0; + $arrayofremoteban = array(); + $rib_list = $object->get_all_rib(); + if (is_array($rib_list)) { print '
    '; // You can use div-table-responsive-no-min if you don't need reserved height for your table print '
    '; print ''; - print_liste_field_titre("LabelRIB"); + print_liste_field_titre("Label"); + print_liste_field_titre("StripeID"); // external system ID print_liste_field_titre("Bank"); print_liste_field_titre("RIB"); print_liste_field_titre("IBAN"); @@ -1306,17 +1412,43 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print_liste_field_titre("DateRUM"); print_liste_field_titre("WithdrawMode"); } - print_liste_field_titre("DefaultRIB", '', '', '', '', '', '', '', 'center '); + print_liste_field_titre("Default", '', '', '', '', '', '', '', 'center '); print_liste_field_titre('', '', '', '', '', '', '', '', 'center '); + // Fields from hook + $parameters = array('arrayfields'=>array(), 'linetype'=>'stripebantitle'); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch '); print "\n"; + // List of local BAN foreach ($rib_list as $rib) { + $arrayofremoteban[$rib->stripe_card_ref] = $rib->stripe_card_ref; + + $nblocal++; + print ''; // Label - print ''; + print ''; + // Stripe ID + print ''; // Bank name - print ''; + print ''; // Account number print ''; // IBAN - print ''; - print ''; + print ''; print ''; @@ -1417,7 +1549,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $allowgenifempty = 0; // Language code (if multilang) - if ($conf->global->MAIN_MULTILANGS) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; $formadmin = new FormAdmin($db); $defaultlang = $langs->getDefaultLang(); @@ -1450,14 +1582,26 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $out; print ''; + // Fields from hook + $parameters = array('arrayfields'=>array(), 'stripe_card_ref'=>$rib->stripe_card_ref, 'stripe_account'=>$rib->stripe_account, 'linetype'=>'stripeban'); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Edit/Delete print ''; } - if (count($rib_list) == 0) { - $colspan = 9; + + // List of remote BAN (if not already added as local) + foreach ($listofsources as $src) { + if (!empty($arrayofremoteban[$src->id])) { + continue; // Already in previous list + } + + $imgline = ''; + if ($src->object == 'source' && $src->type == 'sepa_debit') { + $imgline = ''; + } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { + $imgline = ''; + } else { + continue; + } + + $nbremote++; + + print ''; + print ''; + // Src ID + print ''; + // Bank + print ''; + // Account number + print ''; + // IBAN + print ''; + // BIC + print ''; + if (!empty($conf->prelevement->enabled)) { - $colspan += 2; + // RUM + print ''; + // Date + print ''; + // Mode mandate + print ''; + } + + // Default + print ''; + /* + print ''; + */ + + print ''; + + // Fields from hook + $parameters = array('arrayfields'=>array(), 'stripe_card_ref'=>$rib->stripe_card_ref, 'stripe_account'=>$rib->stripe_account, 'linetype'=>'stripebanremoteonly'); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + // Action column + print ''; + + print ''; + } + + if ($nbremote == 0 && $nblocal == 0) { + $colspan = 10; + if (isModEnabled('prelevement')) { + $colspan += 3; } print ''; } @@ -1549,10 +1797,12 @@ if ($socid && $action == 'edit' && $permissiontoaddupdatepaymentinformation) { print '
    '; + print '
    '; + print '
    '; print '
    '.$rib->label.''.dol_escape_htmltag($rib->label).''; + if ($rib->stripe_card_ref) { + $connect = ''; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } + //$url='https://dashboard.stripe.com/'.$connect.'test/sources/'.$src->id; + $url = 'https://dashboard.stripe.com/'.$connect.'test/search?query='.$rib->stripe_card_ref; + if ($servicestatus) { + //$url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; + $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$rib->stripe_card_ref; + } + print "".img_picto($langs->trans('ShowInStripe'), 'globe')." "; + } + print $rib->stripe_card_ref; + print ''.$rib->bank.''.dol_escape_htmltag($rib->bank).''; $string = ''; @@ -1348,7 +1480,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $string; print ''.$rib->iban; + print ''.dol_escape_htmltag($rib->iban); if (!empty($rib->iban)) { if (!checkIbanForAccount($rib)) { print ' '.img_picto($langs->trans("IbanNotValid"), 'warning'); @@ -1367,7 +1499,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (!empty($conf->prelevement->enabled)) { // RUM //print ''.$prelevement->buildRumNumber($object->code_client, $rib->datec, $rib->id).''.$rib->rum.''.dol_escape_htmltag($rib->rum).''.dol_print_date($rib->date_rum, 'day').''; if ($permissiontoaddupdatepaymentinformation) { - print ''; + if (empty($rib->stripe_card_ref)) { + // Add link to create BAN on Stripe + print ''; + print img_picto($langs->trans("CreateBANOnStripe"), 'stripe'); + print ''; + } + + print ''; print img_picto($langs->trans("Modify"), 'edit'); print ''; - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; } @@ -1466,10 +1610,114 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '
    '; + print ''; + $connect = ''; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } + //$url='https://dashboard.stripe.com/'.$connect.'test/sources/'.$src->id; + $url = 'https://dashboard.stripe.com/'.$connect.'test/search?query='.$src->id; + if ($servicestatus) { + //$url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; + $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$src->id; + } + print "".img_picto($langs->trans('ShowInStripe'), 'globe')." "; + print $src->id; + print ''; + print''; + print ''; + //var_dump($src); + print ''; + //var_dump($src); + print ''; + //var_dump($src); + print ''; + //var_dump($src); + print ''; + //var_dump($src); + print ''; + if ((empty($customerstripe->invoice_settings) && $customerstripe->default_source != $src->id) || + (!empty($customerstripe->invoice_settings) && $customerstripe->invoice_settings->default_payment_method != $src->id)) { + print ''; + print img_picto($langs->trans("Default"), 'off'); + print ''; + } else { + print img_picto($langs->trans("Default"), 'on'); + } + print ''; + print $langs->trans("Remote"); + //if ($src->cvc_check == 'fail') print ' - CVC check fail'; + print ''; + print ''; + if ($permissiontoaddupdatepaymentinformation) { + print ''; + print img_picto($langs->trans("Delete"), 'delete'); + print ''; + } + print '
    '.$langs->trans("NoBANRecord").'
    '; - print ''; + print ''; print ''; print ''; @@ -1648,6 +1898,9 @@ if ($socid && $action == 'edit' && $permissiontoaddupdatepaymentinformation) { print $form->selectarray("frstrecur", $tblArraychoice, dol_escape_htmltag(GETPOST('frstrecur', 'alpha') ?GETPOST('frstrecur', 'alpha') : $companybankaccount->frstrecur), 0); print ''; + print '"; + print ''; + print '
    '.$langs->trans("LabelRIB").'
    '.$langs->trans("Label").'
    '.$langs->trans("BankName").'
    '.$langs->trans("StripeID")." ('src_....')
    '; print ''; } @@ -1666,9 +1919,12 @@ if ($socid && $action == 'editcard' && $permissiontoaddupdatepaymentinformation) dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); - print '
    '; + print '
    '; print '
    '; + + print '
    '; + print ''; print ''; @@ -1712,13 +1968,16 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print '
    '; print '
    '; + + print '
    '; + print '
    '.$langs->trans("Label").'
    '; - print ''; - print ''; + print ''; + print ''; print ''; - print ''; + print ''; // Show fields of bank account foreach ($companybankaccount->getFieldsToShow(1) as $val) { @@ -1804,6 +2063,9 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print $form->selectarray("frstrecur", $tblArraychoice, (GETPOSTISSET('frstrecur') ? GETPOST('frstrecur') : 'FRST'), 0); print ''; + print '"; + print ''; + print '
    '.$langs->trans("LabelRIB").'
    '.$langs->trans("Label").'
    '.$langs->trans("Bank").'
    '.$langs->trans("StripeID")." ('src_....')
    '; } @@ -1811,7 +2073,7 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print dol_get_fiche_end(); - dol_set_focus('#label'); + dol_set_focus('#bank'); print $form->buttonsSaveCancel("Add"); } @@ -1827,6 +2089,9 @@ if ($socid && $action == 'createcard' && $permissiontoaddupdatepaymentinformatio print '
    '; print '
    '; + + print '
    '; + print ''; print ''; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 314fb663631..b4e60cf0051 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -26,6 +26,8 @@ * \brief Page to show product prices by customer */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -38,13 +40,17 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $prodcustprice = new Productcustomerprice($db); } + +// Load translation files required by the page $langs->loadLangs(array("products", "companies", "bills")); -$action = GETPOST('action', 'aZ09'); -$search_prod = GETPOST('search_prod', 'alpha'); -$cancel = GETPOST('cancel', 'alpha'); -$search_label = GETPOST('search_label', 'alpha'); -$search_price = GETPOST('search_price'); + +// Get parameters +$action = GETPOST('action', 'aZ09'); +$search_prod = GETPOST('search_prod', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); +$search_label = GETPOST('search_label', 'alpha'); +$search_price = GETPOST('search_price'); $search_price_ttc = GETPOST('search_price_ttc'); // Security check @@ -54,6 +60,7 @@ if ($user->socid) { } $result = restrictedArea($user, 'societe', $socid, '&societe'); +// Initialize objects $object = new Societe($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -151,7 +158,7 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'mesgs'); } else { - setEventMessages($langs->trans('Delete'), null, 'errors'); + setEventMessages($langs->trans('RecordDeleted'), null, 'errors'); } $action = ''; } @@ -192,7 +199,7 @@ $object = new Societe($db); $result = $object->fetch($socid); llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer')); -if (!empty($conf->notification->enabled)) { +if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); @@ -525,10 +532,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $nbtotalofrecords = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $nbtotalofrecords = $prodcustprice->fetchAll('', '', 0, 0, $filter); } - $result = $prodcustprice->fetch_all($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); + $result = $prodcustprice->fetchAll($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index ef68a03ab78..5a8ba6a46b2 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -28,11 +28,14 @@ * \brief Page of third party projects */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->loadLangs(array("companies", "projects")); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'projects')); // Security check $socid = GETPOST('socid', 'int'); @@ -81,7 +84,7 @@ if ($socid) { } llxHeader('', $title); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = societe_prepare_head($object); diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index df10c0d4bf9..1767973a001 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -26,14 +26,18 @@ * \brief Onglet de gestion des contacts additionnel d'une société */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -$langs->loadLangs(array("orders", "companies")); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'orders')); +// Get parameters $id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -62,6 +66,8 @@ if ($user->socid) { } $result = restrictedArea($user, 'societe', $id, ''); + +// Initialize objects $object = new Societe($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -128,17 +134,10 @@ $contactstatic = new Contact($db); $userstatic = new User($db); -/* *************************************************************************** */ -/* */ -/* Mode vue et edition */ -/* */ -/* *************************************************************************** */ +// View and edit if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { - $soc = new Societe($db); - $soc->fetch($object->socid); - $head = societe_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("ThirdParty"), -1, 'company'); @@ -206,7 +205,7 @@ if ($id > 0 || !empty($ref)) { } // additionnal list with adherents of company - if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire) { + if (isModEnabled('adherent') && $user->rights->adherent->lire) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 125264e14d7..c8d11c9be3b 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -28,7 +28,7 @@ print ''; print '
    '.$langs->trans("Label").'
    '; print ''; -if ($action != 'editsalesrepresentatives' && $user->rights->societe->creer) { +if ($action != 'editsalesrepresentatives' && $user->hasRight('societe', 'creer')) { print ''; diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 2d346282c4c..9ca58ab0bf4 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -28,6 +28,8 @@ * \brief Page of web sites accounts */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -35,13 +37,17 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + +// Load translation files required by the page $langs->loadLangs(array("companies", "website")); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... -$show_files = GETPOST('show_files', 'int'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // 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') + +// Get parameters +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$show_files = GETPOST('show_files', 'int'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // 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') // Security check $id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); @@ -155,8 +161,8 @@ if (empty($reshook)) { // Mass actions $objectclass = 'WebsiteAccount'; $objectlabel = 'WebsiteAccount'; - $permissiontoread = $user->rights->societe->lire; - $permissiontodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->hasRight('societe', 'lire'); + $permissiontodelete = $user->hasRight('societe', 'supprimer'); $uploaddir = $conf->societe->multidir_output[$object->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -243,8 +249,8 @@ print ''; print dol_get_fiche_end(); $newcardbutton = ''; -if (!empty($conf->website->enabled)) { - if (!empty($user->rights->societe->lire)) { +if (isModEnabled('website')) { + if ($user->hasRight('societe', 'lire')) { $newcardbutton .= dolGetButtonTitle($langs->trans("AddWebsiteAccount"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/website/websiteaccount_card.php?action=create&fk_soc='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id)); } else { $newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/website/websiteaccount_card.php?action=create&fk_soc='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', 0); @@ -305,7 +311,7 @@ foreach($objectwebsiteaccount->fields as $key => $val) $sql .= "t.".$key.", "; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); // Add where from hooks $parameters=array(); diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index dd8b875a0a0..6cbefc14185 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -2,7 +2,7 @@ /* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Olivier Geffroy * Copyright (C) 2017 Saasprov - * Copyright (C) 2018-2021 Thibault FOUCART + * Copyright (C) 2018-2022 Thibault FOUCART * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -25,6 +25,7 @@ * \brief Page to setup stripe module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -104,6 +105,12 @@ if ($action == 'setvalue' && $user->admin) { if (!($result > 0)) { $error++; } + if (GETPOSTISSET('STRIPE_LOCATION')) { + $result = dolibarr_set_const($db, "STRIPE_LOCATION", GETPOST('STRIPE_LOCATION', 'alpha'), 'chaine', 0, '', $conf->entity); + if (!$result > 0) { + $error++; + } + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; @@ -286,7 +293,7 @@ if (empty($conf->stripeconnect->enabled)) { print ''; print '
    '; } - print ''; + print ''; $out = img_picto('', 'globe', 'class="pictofixedwidth"').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php', 3); $out .= ''; @@ -364,6 +371,62 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // What is this for ? print '
    '; } +// Card Present for Stripe Terminal +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code + print ''; +} + +// Locations for Stripe Terminal +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code + print ''; +} + // Activate Payment Request API if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code print '\n"; + try { + if ($stripeacc) { + $list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc)); + } else { + $list = \Stripe\Charge::all($option); + } + + $num = count($list->data); + + + //if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + $param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id; + //$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id; + } catch (Exception $e) { + print ''; + } + //print $list; $i = 0; - foreach ($list->data as $charge) { - if ($i >= $limit) { - break; - } + if (!empty($list)) { + foreach ($list->data as $charge) { + if ($i >= $limit) { + break; + } - if ($charge->refunded == '1') { - $status = img_picto($langs->trans("refunded"), 'statut6'); - } elseif ($charge->paid == '1') { - $status = img_picto($langs->trans((string) $charge->status), 'statut4'); - } else { - $label = $langs->trans("Message").": ".$charge->failure_message."
    "; - $label .= $langs->trans("Network").": ".$charge->outcome->network_status."
    "; - $label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message); - $status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1); - } + if ($charge->refunded == '1') { + $status = img_picto($langs->trans("refunded"), 'statut6'); + } elseif ($charge->paid == '1') { + $status = img_picto($langs->trans((string) $charge->status), 'statut4'); + } else { + $label = $langs->trans("Message").": ".$charge->failure_message."
    "; + $label .= $langs->trans("Network").": ".$charge->outcome->network_status."
    "; + $label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message); + $status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1); + } - if (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'card') { - $type = $langs->trans("card"); - } elseif (isset($charge->source->type) && $charge->source->type == 'card') { - $type = $langs->trans("card"); - } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'three_d_secure') { - $type = $langs->trans("card3DS"); - } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'sepa_debit') { - $type = $langs->trans("sepadebit"); - } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'ideal') { - $type = $langs->trans("iDEAL"); - } + if (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'card') { + $type = $langs->trans("card"); + } elseif (isset($charge->source->type) && $charge->source->type == 'card') { + $type = $langs->trans("card"); + } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'three_d_secure') { + $type = $langs->trans("card3DS"); + } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'sepa_debit') { + $type = $langs->trans("sepadebit"); + } elseif (isset($charge->payment_method_details->type) && $charge->payment_method_details->type == 'ideal') { + $type = $langs->trans("iDEAL"); + } - // Why this ? - /*if (! empty($charge->payment_intent)) { - if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); - } else { - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc)); - } - }*/ + // Why this ? + /*if (!empty($charge->payment_intent)) { + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); + } else { + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc)); + } + }*/ - // The metadata FULLTAG is defined by the online payment page - $FULLTAG = $charge->metadata->FULLTAG; + // The metadata FULLTAG is defined by the online payment page + $FULLTAG = $charge->metadata->FULLTAG; - // Save into $tmparray all metadata - $tmparray = dolExplodeIntoArray($FULLTAG, '.', '='); - // Load origin object according to metadata - if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) { - $societestatic->fetch($tmparray['CUS']); - } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) { - $societestatic->fetch($charge->metadata->dol_thirdparty_id); - } else { - $societestatic->id = 0; - } - if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) { - $memberstatic->fetch($tmparray['MEM']); - } else { - $memberstatic->id = 0; - } + // Save into $tmparray all metadata + $tmparray = dolExplodeIntoArray($FULLTAG, '.', '='); + // Load origin object according to metadata + if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) { + $societestatic->fetch($tmparray['CUS']); + } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) { + $societestatic->fetch($charge->metadata->dol_thirdparty_id); + } else { + $societestatic->id = 0; + } + if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) { + $memberstatic->fetch($tmparray['MEM']); + } else { + $memberstatic->id = 0; + } - print ''; + print ''; - if (!empty($stripeacc)) { - $connect = $stripeacc.'/'; - } else { - $connect = ''; - } + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } else { + $connect = ''; + } - // Ref - $url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; - if ($servicestatus) { - $url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; - } - print "\n"; + // Ref + $url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; + if ($servicestatus) { + $url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; + } + print "\n"; - // Stripe customer - print "\n"; + // Stripe customer + print "\n"; - // Link - print "\n"; + // Link + print "\n"; - // Origin - print "\n"; + + // Date payment + print '\n"; + // Type + print ''; + // Amount + print '"; + // Status + print '\n"; + + print "\n"; + + $i++; } - print "\n"; - - // Date payment - print '\n"; - // Type - print ''; - // Amount - print '"; - // Status - print '\n"; - - print "\n"; - - $i++; } print '
    '; print $langs->trans('SalesRepresentatives'); print ''; print 'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).''; print '
    '; + print $langs->trans("STRIPE_CARD_PRESENT").''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_CARD_PRESENT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_CARD_PRESENT", $arrval, $conf->global->STRIPE_CARD_PRESENT); + } + print '
    '; + print $langs->trans("TERMINAL_LOCATION").''; + $service = 'StripeTest'; + $servicestatus = 0; + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { + $service = 'StripeLive'; + $servicestatus = 1; + } + global $stripearrayofkeysbyenv; + $site_account = $stripearrayofkeysbyenv[$servicestatus]['secret_key']; + if (!empty($site_account)) { + \Stripe\Stripe::setApiKey($site_account); + } + if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { + $service = 'StripeTest'; + $servicestatus = '0'; + dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); + } else { + $service = 'StripeLive'; + $servicestatus = '1'; + } + $stripe = new Stripe($db); + if (!empty($site_account)) { + // If $site_account not defined, then key not set and no way to call API Location + $stripeacc = $stripe->getStripeAccount($service); + if ($stripeacc) { + $locations = \Stripe\Terminal\Location::all('', array("stripe_account" => $stripeacc)); + } else { + $locations = \Stripe\Terminal\Location::all(); + } + } + + $location = array(); + $location[""] = $langs->trans("NotDefined"); + foreach ($locations as $locations) { + $location[$locations->id] = $locations->display_name; + } + print $form->selectarray("STRIPE_LOCATION", $location, getDolGlobalString('STRIPE_LOCATION')); + print '
    '; diff --git a/htdocs/stripe/ajax/ajax.php b/htdocs/stripe/ajax/ajax.php new file mode 100644 index 00000000000..5fa4da88ae7 --- /dev/null +++ b/htdocs/stripe/ajax/ajax.php @@ -0,0 +1,124 @@ + + * + * 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/stripe/ajax/ajax.php + * \brief Ajax action for Stipe ie: Terminal + */ + +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('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} + +// Load Dolibarr environment +require '../../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; +require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + +$action = GETPOST('action', 'aZ09'); +$location = GETPOST('location', 'alphanohtml'); +$stripeacc = GETPOST('stripeacc', 'alphanohtml'); +$servicestatus = GETPOST('servicestatus', 'int'); +$amount = GETPOST('amount', 'int'); + +if (empty($user->rights->takepos->run)) { + accessforbidden(); +} + + +/* + * View + */ + +top_httphead('application/json'); + +if ($action == 'getConnexionToken') { + try { + // Be sure to authenticate the endpoint for creating connection tokens. + // Force to use the correct API key + global $stripearrayofkeysbyenv; + \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$servicestatus]['secret_key']); + // The ConnectionToken's secret lets you connect to any Stripe Terminal reader + // and take payments with your Stripe account. + $array = array(); + if (isset($location) && !empty($location)) $array['location'] = $location; + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $connectionToken = \Stripe\Terminal\ConnectionToken::create($array); + } else { + $connectionToken = \Stripe\Terminal\ConnectionToken::create($array, array("stripe_account" => $stripeacc)); + } + echo json_encode(array('secret' => $connectionToken->secret)); + } catch (Error $e) { + http_response_code(500); + echo json_encode(['error' => $e->getMessage()]); + } +} elseif ($action == 'createPaymentIntent') { + try { + $json_str = file_get_contents('php://input'); + $json_obj = json_decode($json_str); + + // For Terminal payments, the 'payment_method_types' parameter must include + // 'card_present' and the 'capture_method' must be set to 'manual' + $object = new Facture($db); + $object->fetch($json_obj->invoiceid); + $object->fetch_thirdparty(); + + $fulltag='INV='.$object->id.'.CUS='.$object->thirdparty->id; + $tag=null; + $fulltag=dol_string_unaccent($fulltag); + + $stripe = new Stripe($db); + $customer = $stripe->customerStripe($object->thirdparty, $stripeacc, $servicestatus, 1); + + $intent = $stripe->getPaymentIntent($json_obj->amount, $object->multicurrency_code, null, 'Stripe payment: '.$fulltag.(is_object($object)?' ref='.$object->ref:''), $object, $customer, $stripeacc, $servicestatus, 1, 'terminal', false, null, 0, 1); + + echo json_encode(array('client_secret' => $intent->client_secret)); + } catch (Error $e) { + http_response_code(500); + echo json_encode(['error' => $e->getMessage()]); + } +} elseif ($action == 'capturePaymentIntent') { + try { + // retrieve JSON from POST body + $json_str = file_get_contents('php://input'); + $json_obj = json_decode($json_str); + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $intent = \Stripe\PaymentIntent::retrieve($json_obj->id); + } else { + $intent = \Stripe\PaymentIntent::retrieve($json_obj->id, array("stripe_account" => $stripeacc)); + } + $intent = $intent->capture(); + + echo json_encode($intent); + } catch (Error $e) { + http_response_code(500); + echo json_encode(['error' => $e->getMessage()]); + } +} diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 7f17d51800d..0aee0c11e30 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -18,6 +18,7 @@ // Put here all includes required by your class file +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -26,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -67,7 +68,7 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripeChargeList")); -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { +if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); @@ -86,38 +87,18 @@ if (!$rowid) { $option = array('limit' => $limit + 1); $num = 0; + $param = ''; + $totalnboflines = ''; + $moreforfilter = ''; + $list = null; if (GETPOSTISSET('starting_after_'.$page)) { $option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml'); } - - try { - if ($stripeacc) { - $list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc)); - } else { - $list = \Stripe\Charge::all($option); - } - - $num = count($list->data); - - $totalnboflines = ''; - - $param = ''; - //if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.urlencode($limit); - } - $param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id; - //$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id; - - $moreforfilter = ''; - } catch (Exception $e) { - print $e->getMessage(); - } - print '
    '; if ($optioncss != '') { print ''; } + print ''; print ''; print ''; @@ -144,146 +125,168 @@ if (!$rowid) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); print "
    '.$e->getMessage().'
    "; - print "".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id.""; - if ($charge->payment_intent) { - print '
    '.$charge->payment_intent.''; - } - print "
    "; + print "".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id.""; + if ($charge->payment_intent) { + print '
    '.$charge->payment_intent.''; + } + print "
    "; - if (!empty($conf->stripe->enabled) && !empty($stripeacc)) { - $connect = $stripeacc.'/'; - } - $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer; - if ($servicestatus) { - $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; - } - if (!empty($charge->customer)) { - print ''.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.''; - } - print ""; + if (isModEnabled('stripe') && !empty($stripeacc)) { + $connect = $stripeacc.'/'; + } + $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer; + if ($servicestatus) { + $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; + } + if (!empty($charge->customer)) { + print ''.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.''; + } + print ""; - if ($societestatic->id > 0) { - print $societestatic->getNomUrl(1); - } elseif ($memberstatic->id > 0) { - print $memberstatic->getNomUrl(1); - } - print ""; + if ($societestatic->id > 0) { + print $societestatic->getNomUrl(1); + } elseif ($memberstatic->id > 0) { + print $memberstatic->getNomUrl(1); + } + print ""; - if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") { - $object = new Commande($db); - $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'order')." ".$object->ref.""; + // Origin + print ""; + if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") { + $object = new Commande($db); + $object->fetch($charge->metadata->dol_id); + if ($object->id > 0) { + print "".img_picto('', 'order')." ".$object->ref.""; + } else { + print $FULLTAG; + } + } elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") { + $object = new Facture($db); + $object->fetch($charge->metadata->dol_id); + if ($object->id > 0) { + print "".img_picto('', 'bill')." ".$object->ref.""; + } else { + print $FULLTAG; + } } else { print $FULLTAG; } - } elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") { - $object = new Facture($db); - $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'bill')." ".$object->ref.""; - } else { - print $FULLTAG; - } - } else { - print $FULLTAG; + print "'.dol_print_date($charge->created, 'dayhour')."'; + print $type; + print ''.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."'; + print $status; + print "
    '.dol_print_date($charge->created, 'dayhour')."'; - print $type; - print ''.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."'; - print $status; - print "
    '; diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php index 0d8b5e03435..8e5cd833a71 100644 --- a/htdocs/stripe/class/actions_stripe.class.php +++ b/htdocs/stripe/class/actions_stripe.class.php @@ -71,7 +71,7 @@ class ActionsStripeconnect { global $db, $conf, $user, $langs, $form; - if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { + if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 36e67d2827c..43f940acdee 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -115,7 +115,7 @@ class Stripe extends CommonObject $tokenstring = $obj->tokenstring; $tmparray = json_decode($tokenstring); - $key = $tmparray->stripe_user_id; + $key = empty($tmparray->stripe_user_id) ? '' : $tmparray->stripe_user_id; } else { $tokenstring = ''; } @@ -290,6 +290,34 @@ class Stripe extends CommonObject return $stripepaymentmethod; } + /** + * Get the Stripe reader Object from its ID + * + * @param string $reader Reader ID + * @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect + * @param int $status Status (0=test, 1=live) + * @return \Stripe\Terminal\Reader|null Stripe Reader or null if not found + */ + public function getSelectedReader($reader, $key = '', $status = 0) + { + $selectedreader = null; + + try { + // Force to use the correct API key + global $stripearrayofkeysbyenv; + \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']); + if (empty($key)) { // If the Stripe connect account not set, we use common API usage + $selectedreader = \Stripe\Terminal\Reader::retrieve(''.$reader.''); + } else { + $stripepaymentmethod = \Stripe\Terminal\Reader::retrieve(''.$reader.'', array("stripe_account" => $key)); + } + } catch (Exception $e) { + $this->error = $e->getMessage(); + } + + return $selectedreader; + } + /** * Get the Stripe payment intent. Create it with confirmnow=false * Warning. If a payment was tried and failed, a payment intent was created. @@ -350,7 +378,7 @@ class Stripe extends CommonObject $paymentintent = null; - if (is_object($object) && !empty($conf->global->STRIPE_REUSE_EXISTING_INTENT_IF_FOUND)) { + if (is_object($object) && !empty($conf->global->STRIPE_REUSE_EXISTING_INTENT_IF_FOUND) && empty($conf->global->STRIPE_CARD_PRESENT)) { // Warning. If a payment was tried and failed, a payment intent was created. // But if we change something on object to pay (amount or other that does not change the idempotency key), reusing same payment intent is not allowed by Stripe. // Recommended solution is to recreate a new payment intent each time we need one (old one will be automatically closed by Stripe after a delay), Stripe will @@ -358,7 +386,7 @@ class Stripe extends CommonObject // That's why we can comment the part of code to retrieve a payment intent with object id (never mind if we cumulate payment intent with old ones that will not be used) $sql = "SELECT pi.ext_payment_id, pi.entity, pi.fk_facture, pi.sourcetype, pi.ext_payment_site"; - $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pi"; + $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_demande as pi"; $sql .= " WHERE pi.fk_facture = ".((int) $object->id); $sql .= " AND pi.sourcetype = '".$this->db->escape($object->element)."'"; $sql .= " AND pi.entity IN (".getEntity('societe').")"; @@ -406,8 +434,10 @@ class Stripe extends CommonObject // list of payment method types $paymentmethodtypes = array("card"); + $descriptor = dol_trunc($tag, 10, 'right', 'UTF-8', 1); if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) { $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC()) + //$descriptor = preg_replace('/ref=[^:=]+/', '', $descriptor); // Clean ref } if (!empty($conf->global->STRIPE_KLARNA)) { $paymentmethodtypes[] = "klarna"; @@ -424,6 +454,9 @@ class Stripe extends CommonObject if (!empty($conf->global->STRIPE_SOFORT)) { $paymentmethodtypes[] = "sofort"; } + if (!empty($conf->global->STRIPE_CARD_PRESENT) && $mode == 'terminal') { + $paymentmethodtypes = array("card_present"); + } $dataforintent = array( "confirm" => $confirmnow, // Do not confirm immediatly during creation of intent @@ -432,7 +465,8 @@ class Stripe extends CommonObject "currency" => $currency_code, "payment_method_types" => $paymentmethodtypes, "description" => $description, - "statement_descriptor_suffix" => dol_trunc($tag, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) + "statement_descriptor_suffix" => $descriptor, // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix) + "statement_descriptor" => $descriptor, // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix //"save_payment_method" => true, "setup_future_usage" => "on_session", "metadata" => $metadata @@ -456,6 +490,11 @@ class Stripe extends CommonObject if (!empty($conf->global->STRIPE_KLARNA)) { unset($dataforintent['setup_future_usage']); } + if (!empty($conf->global->STRIPE_CARD_PRESENT) && $mode == 'terminal') { + unset($dataforintent['setup_future_usage']); + $dataforintent["capture_method"] = "manual"; + $dataforintent["confirmation_method"] = "manual"; + } if (!is_null($payment_method)) { $dataforintent["payment_method"] = $payment_method; $description .= ' - '.$payment_method; @@ -491,12 +530,12 @@ class Stripe extends CommonObject $paymentintentalreadyexists = 0; // Check that payment intent $paymentintent->id is not already recorded. $sql = "SELECT pi.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pi"; + $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_demande as pi"; $sql .= " WHERE pi.entity IN (".getEntity('societe').")"; $sql .= " AND pi.ext_payment_site = '".$this->db->escape($service)."'"; $sql .= " AND pi.ext_payment_id = '".$this->db->escape($paymentintent->id)."'"; - dol_syslog(get_class($this)."::getPaymentIntent search if payment intent already in prelevement_facture_demande", LOG_DEBUG); + dol_syslog(get_class($this)."::getPaymentIntent search if payment intent already in prelevement_demande", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); @@ -513,7 +552,7 @@ class Stripe extends CommonObject // If not, we create it. if (!$paymentintentalreadyexists) { $now = dol_now(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture_demande (date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site, amount)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_demande (date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site, amount)"; $sql .= " VALUES ('".$this->db->idate($now)."', ".((int) $user->id).", '".$this->db->escape($paymentintent->id)."', ".((int) $object->id).", '".$this->db->escape($object->element)."', ".((int) $conf->entity).", '".$this->db->escape($service)."', ".((float) $amount).")"; $resql = $this->db->query($sql); if (!$resql) { @@ -553,7 +592,6 @@ class Stripe extends CommonObject } } - /** * Get the Stripe payment intent. Create it with confirmnow=false * Warning. If a payment was tried and failed, a payment intent was created. @@ -658,12 +696,12 @@ class Stripe extends CommonObject $setupintentalreadyexists = 0; // Check that payment intent $setupintent->id is not already recorded. $sql = "SELECT pi.rowid"; - $sql.= " FROM " . MAIN_DB_PREFIX . "prelevement_facture_demande as pi"; + $sql.= " FROM " . MAIN_DB_PREFIX . "prelevement_demande as pi"; $sql.= " WHERE pi.entity IN (".getEntity('societe').")"; $sql.= " AND pi.ext_payment_site = '" . $this->db->escape($service) . "'"; $sql.= " AND pi.ext_payment_id = '".$this->db->escape($setupintent->id)."'"; - dol_syslog(get_class($this) . "::getPaymentIntent search if payment intent already in prelevement_facture_demande", LOG_DEBUG); + dol_syslog(get_class($this) . "::getPaymentIntent search if payment intent already in prelevement_demande", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); @@ -679,7 +717,7 @@ class Stripe extends CommonObject if (! $setupintentalreadyexists) { $now=dol_now(); - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "prelevement_facture_demande (date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site)"; + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "prelevement_demande (date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site)"; $sql .= " VALUES ('".$this->db->idate($now)."', ".((int) $user->id).", '".$this->db->escape($setupintent->id)."', ".((int) $object->id).", '".$this->db->escape($object->element)."', " . ((int) $conf->entity) . ", '" . $this->db->escape($service) . "', ".((float) $amount).")"; $resql = $this->db->query($sql); if (! $resql) @@ -736,7 +774,7 @@ class Stripe extends CommonObject $sql .= " WHERE sa.rowid = ".((int) $object->id); // We get record from ID, no need for filter on entity $sql .= " AND sa.type = 'card'"; - dol_syslog(get_class($this)."::fetch search stripe card id for paymentmode id=".$object->id.", stripeacc=".$stripeacc.", status=".$status.", createifnotlinkedtostripe=".$createifnotlinkedtostripe, LOG_DEBUG); + dol_syslog(get_class($this)."::cardStripe search stripe card id for paymentmode id=".$object->id.", stripeacc=".$stripeacc.", status=".$status.", createifnotlinkedtostripe=".$createifnotlinkedtostripe, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); @@ -852,6 +890,127 @@ class Stripe extends CommonObject return $card; } + + /** + * Get the Stripe SEPA of a company payment mode + * + * @param \Stripe\StripeCustomer $cu Object stripe customer. + * @param CompanyPaymentMode $object Object companypaymentmode to check, or create on stripe (create on stripe also update the societe_rib table for current entity) + * @param string $stripeacc ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect + * @param int $status Status (0=test, 1=live) + * @param int $createifnotlinkedtostripe 1=Create the stripe sepa and the link if the sepa is not yet linked to a stripe sepa. Deprecated with new Stripe API and SCA. + * @return \Stripe\PaymentMethod|null Stripe SEPA or null if not found + */ + public function sepaStripe($cu, CompanyPaymentMode $object, $stripeacc = '', $status = 0, $createifnotlinkedtostripe = 0) + { + global $conf, $user, $langs; + $sepa = null; + + $sql = "SELECT sa.stripe_card_ref, sa.proprio, sa.iban_prefix"; // stripe_card_ref is src_ for sepa + $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as sa"; + $sql .= " WHERE sa.rowid = ".((int) $object->id); // We get record from ID, no need for filter on entity + $sql .= " AND sa.type = 'ban'"; //type ban to get normal bank account of customer (prelevement) + + $soc = new Societe($this->db); + $soc->fetch($object->fk_soc); + + dol_syslog(get_class($this)."::sepaStripe search stripe ban id for paymentmode id=".$object->id.", stripeacc=".$stripeacc.", status=".$status.", createifnotlinkedtostripe=".$createifnotlinkedtostripe, LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + if ($num) { + $obj = $this->db->fetch_object($resql); + $cardref = $obj->stripe_card_ref; + dol_syslog(get_class($this)."::sepaStripe cardref=".$cardref); + if ($cardref) { + try { + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) { + $sepa = $cu->sources->retrieve($cardref); + } else { + $sepa = \Stripe\PaymentMethod::retrieve($cardref); + } + } else { + if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) { + //$sepa = $cu->sources->retrieve($cardref, array("stripe_account" => $stripeacc)); // this API fails when array stripe_account is provided + $sepa = $cu->sources->retrieve($cardref); + } else { + //$sepa = \Stripe\PaymentMethod::retrieve($cardref, array("stripe_account" => $stripeacc)); // Don't know if this works + $sepa = \Stripe\PaymentMethod::retrieve($cardref); + } + } + } catch (Exception $e) { + $this->error = $e->getMessage(); + dol_syslog($this->error, LOG_WARNING); + } + } elseif ($createifnotlinkedtostripe) { + $iban = $obj->iban_prefix; //prefix ? + $ipaddress = getUserRemoteIP(); + + $dataforcard = array( + 'type'=>'sepa_debit', + "sepa_debit" => array('iban' => $iban), + 'currency' => 'eur', + 'usage' => 'reusable', + 'owner' => array( + 'name' => $soc->name, + ), + "metadata" => array('dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress) + ); + + //$a = \Stripe\Stripe::getApiKey(); + //var_dump($a);var_dump($stripeacc);exit; + try { + dol_syslog("Try to create sepa_debit 0"); + + $service = 'StripeTest'; + $servicestatus = 0; + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { + $service = 'StripeLive'; + $servicestatus = 1; + } + // Force to use the correct API key + global $stripearrayofkeysbyenv; + $stripeacc = $stripearrayofkeysbyenv[$servicestatus]['secret_key']; + + dol_syslog("Try to create sepa_debit with data = ".json_encode($dataforcard)); + $s = new \Stripe\StripeClient($stripeacc); + $sepa = $s->sources->create($dataforcard); + if (!$sepa) { + $this->error = 'Creation of sepa_debit on Stripe has failed'; + } else { + // association du client avec cette source de paimeent + $cs = $cu->createSource($cu->id, array('source' => $sepa->id)); + if (!$cs) { + $this->error = 'Link SEPA <-> Customer failed'; + } else { + dol_syslog("Try to create sepa_debit 3"); + // print json_encode($sepa); + + $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib"; + $sql .= " SET stripe_card_ref = '".$this->db->escape($sepa->id)."', card_type = 'sepa_debit',"; + $sql .= " stripe_account= '" . $this->db->escape($cu->id . "@" . $stripeacc) . "'"; + $sql .= " WHERE rowid = ".((int) $object->id); + $sql .= " AND type = 'ban'"; + $resql = $this->db->query($sql); + if (!$resql) { + $this->error = $this->db->lasterror(); + } + } + } + } catch (Exception $e) { + $this->error = $e->getMessage(); + dol_syslog($this->error, LOG_WARNING); + } + } + } + } else { + dol_print_error($this->db); + } + + return $sepa; + } + /** * Create charge. * This is called by page htdocs/stripe/payment.php and may be deprecated. diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index 8631b4ecd5f..1965c8ab73d 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -18,6 +18,7 @@ // Put here all includes required by your class file +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -26,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -51,6 +52,10 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; +$optioncss = GETPOST('optioncss', 'alpha'); +$param = ""; +$num = 0; +$totalnboflines = 0; $result = restrictedArea($user, 'banque'); @@ -67,7 +72,7 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripePayoutList")); -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { +if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); @@ -95,12 +100,12 @@ if (!$rowid) { print ''; $title = $langs->trans("StripePayoutList"); - $title .= ($stripeaccount ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); + $title .= ($stripeacc ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); print '
    '; - print ''."\n"; + print '
    '."\n"; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); @@ -133,7 +138,7 @@ if (!$rowid) { // Save into $tmparray all metadata $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); // Load origin object according to metadata - if (! empty($tmparray['CUS'])) + if (!empty($tmparray['CUS'])) { $societestatic->fetch($tmparray['CUS']); } @@ -141,7 +146,7 @@ if (!$rowid) { { $societestatic->id = 0; } - if (! empty($tmparray['MEM'])) + if (!empty($tmparray['MEM'])) { $memberstatic->fetch($tmparray['MEM']); } diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 92092ca2ebb..29eec246af8 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -18,6 +18,7 @@ // Put here all includes required by your class file +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -26,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; } @@ -52,7 +53,9 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; $optioncss = GETPOST('optioncss', 'alpha'); - +$param = ""; +$num = 0; +$totalnboflines = 0; $result = restrictedArea($user, 'banque'); @@ -68,7 +71,7 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripeTransactionList")); -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { +if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); @@ -95,12 +98,12 @@ if (!$rowid) { print ''; $title = $langs->trans("StripeTransactionList"); - $title .= ($stripeaccount ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); + $title .= (!empty($stripeacc) ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); print '
    '; - print '
    '."\n"; + print '
    '."\n"; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); @@ -113,6 +116,7 @@ if (!$rowid) { print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); print "\n"; + $connect = ""; try { if ($stripeacc) { @@ -131,7 +135,7 @@ if (!$rowid) { // Save into $tmparray all metadata $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); // Load origin object according to metadata - if (! empty($tmparray['CUS'])) + if (!empty($tmparray['CUS'])) { $societestatic->fetch($tmparray['CUS']); } @@ -139,14 +143,14 @@ if (!$rowid) { { $societestatic->id = 0; } - if (! empty($tmparray['MEM'])) + if (!empty($tmparray['MEM'])) { $memberstatic->fetch($tmparray['MEM']); } else { $memberstatic->id = 0; - }*/ + } $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; @@ -155,7 +159,7 @@ if (!$rowid) { $societestatic->admin = $obj->admin; $societestatic->login = $obj->login; $societestatic->email = $obj->email; - $societestatic->societe_id = $obj->fk_soc; + $societestatic->societe_id = $obj->fk_soc;*/ print ''; diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index e77a72ea6c4..4d69ad5d8ae 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -75,13 +76,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print "
    "; diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index 304cbbd1e3a..be89df64755 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -21,6 +21,7 @@ * along with this program. If not, see . */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -81,13 +82,6 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); -// Buttons -if ($action != 'create' && $action != 'edit') { - print '
    '; - print ''.$langs->trans("NewAttribute").''; - print "
    "; -} - // Creation of an optional field if ($action == 'create') { print '
    '; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 399d1271037..71d9668dc92 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -34,6 +34,7 @@ * \brief Card supplier proposal */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -51,7 +52,7 @@ if (!empty($conf->project->enabled)) { // Load translation files required by the page $langs->loadLangs(array('companies', 'supplier_proposal', 'compta', 'bills', 'propal', 'orders', 'products', 'deliveries', 'sendings')); -if (!empty($conf->margin->enabled)) { +if (isModEnabled('margin')) { $langs->load('margins'); } @@ -61,13 +62,13 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel'); +$cancel = GETPOST('cancel', 'alpha'); $origin = GETPOST('origin', 'alpha'); $originid = GETPOST('originid', 'int'); $confirm = GETPOST('confirm', 'alpha'); -$projectid = GETPOST('projectid', 'int'); $lineid = GETPOST('lineid', 'int'); $contactid = GETPOST('contactid', 'int'); +$projectid = GETPOST('projectid', 'int'); $rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1; // PDF @@ -78,12 +79,6 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($con // Nombre de ligne pour choix de produit/service predefinis $NBLINES = 4; -// Security check -if (!empty($user->socid)) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'supplier_proposal', $id); - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('supplier_proposalcard', 'globalcard')); @@ -99,8 +94,9 @@ if ($id > 0 || !empty($ref)) { if ($ret > 0) { $ret = $object->fetch_thirdparty(); } - if ($ret < 0) { - dol_print_error('', $object->error); + if ($ret <= 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = ''; } } @@ -123,6 +119,12 @@ $permissiondellink = $usercancreate; // Used by the include of actions_dellink.i $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php $permissiontoadd = $usercancreate; +// Security check +if (!empty($user->socid)) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'supplier_proposal', $object->id); + /* * Actions @@ -165,7 +167,7 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes') { + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { @@ -194,19 +196,25 @@ if (empty($reshook)) { // Remove line $result = $object->deleteline($lineid); // reorder lines - if ($result) { + if ($result > 0) { $object->line_order(true); + } else { + $langs->load("errors"); + setEventMessages($object->error, $object->errors, 'errors'); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } @@ -217,25 +225,25 @@ if (empty($reshook)) { $result = $object->valid($user); if ($result >= 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { - $newlang = GETPOST('lang_id', 'aZ09'); - } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { - $newlang = $object->thirdparty->default_lang; - } - if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model = $object->model_pdf; - $ret = $object->fetch($id); // Reload to get new records - - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + $outputlangs = $langs; + $newlang = ''; + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); } + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model = $object->model_pdf; + $ret = $object->fetch($id); // Reload to get new records + if ($ret > 0) { + $object->fetch_thirdparty(); + } + + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else { $langs->load("errors"); @@ -307,7 +315,7 @@ if (empty($reshook)) { $object->origin_id = GETPOST('originid'); // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } @@ -321,6 +329,7 @@ if (empty($reshook)) { if (!$error) { if ($origin && $originid) { + // Parse element/subelement (ex: project_task) $element = $subelement = $origin; if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { $element = $regs[1]; @@ -335,6 +344,15 @@ if (empty($reshook)) { $element = 'comm/propal'; $subelement = 'propal'; } + if ($element == 'contract') { + $element = $subelement = 'contrat'; + } + if ($element == 'inter') { + $element = $subelement = 'ficheinter'; + } + if ($element == 'shipping') { + $element = $subelement = 'expedition'; + } $object->origin = $origin; $object->origin_id = $originid; @@ -448,10 +466,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -526,12 +544,15 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } elseif ($action == "setabsolutediscount" && $usercancreate) { @@ -546,7 +567,16 @@ if (empty($reshook)) { } // Add a product line - if ($action == 'addline' && $usercancreate) { + if ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha') && $usercancreate) { + // Define vat_rate + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); + } + } elseif ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; @@ -558,11 +588,13 @@ if (empty($reshook)) { $ref_supplier = GETPOST('fourn_ref', 'alpha'); - $prod_entry_mode = GETPOST('prod_entry_mode'); - if ($prod_entry_mode == 'free') { + $prod_entry_mode = GETPOST('prod_entry_mode', 'aZ09'); + if ($prod_entry_mode == 'free') { $idprod = 0; + $tva_tx = (GETPOST('tva_tx', 'alpha') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx', 'alpha'))) : 0); } else { $idprod = GETPOST('idprod', 'int'); + $tva_tx = ''; } $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' @@ -571,7 +603,8 @@ if (empty($reshook)) { $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); $price_ttc = price2num(GETPOST('price_ttc'), 'MU', 2); $price_ttc_devise = price2num(GETPOST('multicurrency_price_ttc'), 'CU', 2); - $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); if (empty($remise_percent)) { @@ -649,7 +682,7 @@ if (empty($reshook)) { $label = $productsupplier->label; // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { @@ -842,10 +875,10 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { + if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -854,6 +887,9 @@ if (empty($reshook)) { } $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records + if ($ret > 0) { + $object->fetch_thirdparty(); + } $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) { @@ -907,7 +943,7 @@ if (empty($reshook)) { } } } elseif ($action == 'updateline' && $usercancreate && GETPOST('save') == $langs->trans("Save")) { - // Mise a jour d'une ligne dans la demande de prix + // Update a line within proposal $vat_rate = (GETPOST('tva_tx') ?GETPOST('tva_tx') : 0); // Define info_bits @@ -936,7 +972,7 @@ if (empty($reshook)) { } $ttc = price2num(GETPOST('price_ttc'), '', 2); - $ht = $ttc / (1 + ($vatratecleaned / 100)); + $ht = (float) $ttc / (1 + ((float) $vatratecleaned / 100)); $price_base_type = 'HT'; } @@ -1030,7 +1066,7 @@ if (empty($reshook)) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $object->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -1123,7 +1159,10 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("SupplierProposalNew"); +} $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); @@ -1142,7 +1181,7 @@ $now = dol_now(); if ($action == 'create') { $currency_code = $conf->currency; - print load_fiche_titre($langs->trans("NewAskPrice"), '', 'supplier_proposal'); + print load_fiche_titre($langs->trans("SupplierProposalNew"), '', 'supplier_proposal'); $soc = new Societe($db); if ($socid > 0) { @@ -1188,7 +1227,7 @@ if ($action == 'create') { $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!empty($objectsrc->multicurrency_code)) { $currency_code = $objectsrc->multicurrency_code; } @@ -1199,7 +1238,7 @@ if ($action == 'create') { } else { $cond_reglement_id = $soc->cond_reglement_supplier_id; $mode_reglement_id = $soc->mode_reglement_supplier_id; - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($soc->multicurrency_code)) { $currency_code = $soc->multicurrency_code; } } @@ -1265,7 +1304,7 @@ if ($action == 'create') { // Terms of payment print '
    '; // Mode of payment @@ -1274,14 +1313,14 @@ if ($action == 'create') { print ''; // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && isModEnabled("banque")) { print ''; } // Shipping Method - if (!empty($conf->expedition->enabled)) { + if (isModEnabled("expedition")) { print ''; @@ -1332,7 +1371,7 @@ if ($action == 'create') { } // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print ''; print ''; print '"; - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { print ''; print '"; print '"; @@ -1390,7 +1429,7 @@ if ($action == 'create') { /* - * Combobox pour la fonction de copie + * Combobox for copy function */ if (empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) { @@ -1412,7 +1451,7 @@ if ($action == 'create') { $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal p"; $sql .= ", ".MAIN_DB_PREFIX."societe s"; $sql .= " WHERE s.rowid = p.fk_soc"; - $sql .= " AND p.entity = ".$conf->entity; + $sql .= " AND p.entityy IN (".getEntity('supplier_proposal').")"; $sql .= " AND p.fk_statut <> ".SupplierProposal::STATUS_DRAFT; $sql .= " ORDER BY Id"; @@ -1422,8 +1461,8 @@ if ($action == 'create') { $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); - $askPriceSupplierRefAndSocName = $row [1]." - ".$row [2]; - $liste_ask [$row [0]] = $askPriceSupplierRefAndSocName; + $askPriceSupplierRefAndSocName = $row[1]." - ".$row[2]; + $liste_ask[$row[0]] = $askPriceSupplierRefAndSocName; $i++; } print $form->selectarray("copie_supplier_proposal", $liste_ask, 0); @@ -1517,7 +1556,7 @@ if ($action == 'create') { } $text = $langs->trans('ConfirmValidateAsk', $numref); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -1551,39 +1590,28 @@ if ($action == 'create') { //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreateorder, 'string', '', 0, 1); //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreateorder, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'supplier'); + $morehtmlref .= $object->thirdparty->getNomUrl(1, 'supplier'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { $morehtmlref .= ' ('.$langs->trans("OtherProposals").')'; } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; + $morehtmlref .= '
    '; if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } @@ -1597,7 +1625,7 @@ if ($action == 'create') { print '
    '; print '
    '; - print '
    '.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); + print $form->getSelectConditionsPaiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); print '
    '.$langs->trans('BankAccount').''; $form->select_comptes(GETPOST('fk_account') > 0 ? GETPOST('fk_account', 'int') : $fk_account, 'fk_account', 0, '', 1); print '
    '.$langs->trans('SendingMethod').''; print $form->selectShippingMethod(GETPOST('shipping_method_id') > 0 ? GETPOST('shipping_method_id', 'int') : "", 'shipping_method_id', '', 1); print '
    '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; @@ -1356,7 +1395,7 @@ if ($action == 'create') { // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva $objectsrc->remise_absolue = $remise_absolue; $objectsrc->remise_percent = $remise_percent; - $objectsrc->update_price(1, - 1, 1); + $objectsrc->update_price(1, 'auto', 1); } print "\n"; @@ -1379,7 +1418,7 @@ if ($action == 'create') { } print '
    '.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc)."
    '.$langs->trans('MulticurrencyAmountHT').''.price($objectsrc->multicurrency_total_ht).'
    '.$langs->trans('MulticurrencyAmountVAT').''.price($objectsrc->multicurrency_total_tva)."
    '.$langs->trans('MulticurrencyAmountTTC').''.price($objectsrc->multicurrency_total_ttc)."
    '; + print '
    '; // Relative and absolute discounts if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -1683,7 +1711,7 @@ if ($action == 'create') { print ''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { // Multicurrency code print ''; print ''; }*/ - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && isModEnabled("banque")) { // Bank Account print '
    '; @@ -1745,7 +1773,7 @@ if ($action == 'create') { print '
    '; print '< print ''; $nbofentries = (count($data) - 1); print ''; +print ''; if ($nbofentries > 0) { print '< print ''; $nbofentries = (count($data) - 1); print ''; +print ''; if ($nbofentries > 0) { print '< print ''; $nbofentries = (count($data) - 1); print ''; +print ''; if ($nbofentries > 0) { print '\n"; -if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { +if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "browser" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
    '; @@ -189,7 +121,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; print '
    \n"; print ''; // Customer information @@ -253,7 +185,7 @@ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && filter_v print "\n"; } -if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) { +if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) { print '\n"; -if (!empty($conf->global->TAKEPOS_PRINT_WITHOUT_DETAILS)) { +if (getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS')) { print '\n"; // Services -if (isModEnabled('service')) { +if (isModEnabled("service")) { print ''; print ''; print "\n"; +print ''; +print ''; + print ''; print ''; $atleastonefound = 0; -if (isModEnabled('banque')) { +if (isModEnabled("banque")) { print ''; print ''; + + if (isModEnabled('stripe') && !empty($conf->global->STRIPE_CARD_PRESENT)) { + print ''; // Force Stripe Terminal + print ''; + } + if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) { print ''; print ''; print ''; // Numbering module @@ -404,7 +455,7 @@ print ''; print '
    '; @@ -1776,7 +1804,7 @@ if ($action == 'create') { print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { + if (isModEnabled("multicurrency") && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -1823,7 +1851,7 @@ if ($action == 'create') { print '
    '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '; // Margin Infos - /*if (! empty($conf->margin->enabled)) { + /*if (!empty($conf->margin->enabled)) { $formmargin->displayMarginInfos($object); }*/ @@ -1851,7 +1879,7 @@ if ($action == 'create') { // Show object lines $result = $object->getLinesArray(); - print '
    + print ' @@ -1966,7 +1994,7 @@ if ($action == 'create') { } // Create an order - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $object->statut == SupplierProposal::STATUS_SIGNED) { + if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && $object->statut == SupplierProposal::STATUS_SIGNED) { if ($usercancreateorder) { print ''; } @@ -1990,10 +2018,7 @@ if ($action == 'create') { } // Delete - if (($object->statut == SupplierProposal::STATUS_DRAFT && $usercancreate) || $usercandelete) { - print ''; - } + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', ($object->statut == SupplierProposal::STATUS_DRAFT && $usercancreate) || $usercandelete); } } diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 018676dec0d..1f95e3de5fd 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -452,49 +452,49 @@ class SupplierProposal extends CommonObject if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) { // Check quantity is enough dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_fournprice=".$fk_fournprice." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db); - if ($prod->fetch($fk_product) > 0) { - $product_type = $prod->type; - $label = $prod->label; + $productsupplier = new ProductFournisseur($this->db); + if ($productsupplier->fetch($fk_product) > 0) { + $product_type = $productsupplier->type; + $label = $productsupplier->label; $fk_prod_fourn_price = $fk_fournprice; // We use 'none' instead of $ref_supplier, because fourn_ref may not exists anymore. So we will take the first supplier price ok. // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. - $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc + $result = $productsupplier->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc if ($result > 0) { - $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice - $ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice + $pu = $productsupplier->fourn_pu; // Unit price supplier price set by get_buyprice + $ref_supplier = $productsupplier->ref_supplier; // Ref supplier price set by get_buyprice // is remise percent not keyed but present for the product we add it - if ($remise_percent == 0 && $prod->remise_percent != 0) { - $remise_percent = $prod->remise_percent; + if ($remise_percent == 0 && $productsupplier->remise_percent != 0) { + $remise_percent = $productsupplier->remise_percent; } } if ($result == 0) { // If result == 0, we failed to found the supplier reference price $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->error = "Ref ".$productsupplier->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); $this->db->rollback(); dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price"); - //$pu = $prod->fourn_pu; // We do not overwrite unit price - //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price + //$pu = $productsupplier->fourn_pu; // We do not overwrite unit price + //$ref = $productsupplier_fourn; // We do not overwrite ref supplier price return -1; } if ($result == -1) { $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->error = "Ref ".$productsupplier->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); return -1; } if ($result < -1) { - $this->error = $prod->error; - $this->errors = $prod->errors; + $this->error = $productsupplier->error; + $this->errors = $productsupplier->errors; $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); return -1; } } else { - $this->error = $prod->error; - $this->errors = $prod->errors; + $this->error = $productsupplier->error; + $this->errors = $productsupplier->errors; $this->db->rollback(); return -1; } @@ -518,7 +518,7 @@ class SupplierProposal extends CommonObject $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) { + if (isModEnabled("multicurrency") && $pu_ht_devise > 0) { $pu = 0; } @@ -720,7 +720,7 @@ class SupplierProposal extends CommonObject $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) { + if (isModEnabled("multicurrency") && $pu_ht_devise > 0) { $pu = 0; } @@ -1149,8 +1149,10 @@ class SupplierProposal extends CommonObject } // Clear fields - $this->user_author = $user->id; - $this->user_valid = ''; + $this->user_author = $user->id; // deprecated + $this->user_author_id = $user->id; + $this->user_valid = 0; // deprecated + $this->user_valid_id = 0; $this->date = $now; // Set ref @@ -1255,11 +1257,13 @@ class SupplierProposal extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->statut = (int) $obj->fk_statut; + $this->status = (int) $obj->fk_statut; $this->statut_libelle = $obj->statut_label; $this->datec = $this->db->jdate($obj->datec); // TODO deprecated $this->datev = $this->db->jdate($obj->datev); // TODO deprecated - $this->date_creation = $this->db->jdate($obj->datec); //Creation date - $this->date_validation = $this->db->jdate($obj->datev); //Validation date + $this->date_creation = $this->db->jdate($obj->datec); // Creation date + $this->date = $this->date_creation; + $this->date_validation = $this->db->jdate($obj->datev); // Validation date $this->date_livraison = $this->db->jdate($obj->delivery_date); // deprecated $this->delivery_date = $this->db->jdate($obj->delivery_date); $this->shipping_method_id = ($obj->fk_shipping_method > 0) ? $obj->fk_shipping_method : null; @@ -1718,7 +1722,7 @@ class SupplierProposal extends CommonObject if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (getDolGlobalInt('MAIN_MULTILANGS')) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -1777,7 +1781,7 @@ class SupplierProposal extends CommonObject if (empty($ref_fourn)) { $ref_fourn = $product->ref_supplier; } - if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($product->multicurrency_code)) { list($fk_multicurrency, $multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $product->multicurrency_code); } $productsupplier->id = $product->fk_product; @@ -1840,7 +1844,7 @@ class SupplierProposal extends CommonObject $product->tva_tx, $user->id ); - if (!empty($conf->multicurrency->enabled)) { + if (isModEnabled("multicurrency")) { if (!empty($product->multicurrency_code)) { include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; $multicurrency = new MultiCurrency($this->db); //need to fetch because empty fk_multicurrency and rate @@ -1861,7 +1865,7 @@ class SupplierProposal extends CommonObject $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_fournisseur_price '; $sql .= '(datec, fk_product, fk_soc, ref_fourn, price, quantity, unitprice, tva_tx, fk_user'; - if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) { + if (isModEnabled("multicurrency") && !empty($product->multicurrency_code)) { $sql .= ',fk_multicurrency, multicurrency_code, multicurrency_unitprice, multicurrency_price, multicurrency_tx'; } $sql .= ') VALUES ('.implode(',', $values).')'; @@ -2190,7 +2194,7 @@ class SupplierProposal extends CommonObject $this->labelStatus[self::STATUS_NOTSIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusNotSigned"); $this->labelStatus[self::STATUS_CLOSE] = $langs->transnoentitiesnoconv("SupplierProposalStatusClosed"); $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv("SupplierProposalStatusDraftShort"); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv("Opened"); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv("SupplierProposalStatusValidatedShort"); $this->labelStatusShort[self::STATUS_SIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusSignedShort"); $this->labelStatusShort[self::STATUS_NOTSIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusNotSignedShort"); $this->labelStatusShort[self::STATUS_CLOSE] = $langs->transnoentitiesnoconv("SupplierProposalStatusClosedShort"); @@ -3059,14 +3063,14 @@ class SupplierProposalLine extends CommonObjectLine $sql .= ' ref_fourn,'; $sql .= ' fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc, fk_unit)'; $sql .= " VALUES (".$this->fk_supplier_proposal.","; - $sql .= " ".($this->fk_parent_line > 0 ? ((int) $this->db->escape($this->fk_parent_line)) : "null").","; + $sql .= " ".($this->fk_parent_line > 0 ? ((int) $this->fk_parent_line) : "null").","; $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; $sql .= " '".$this->db->escape($this->desc)."',"; $sql .= " ".($this->fk_product ? ((int) $this->fk_product) : "null").","; $sql .= " '".$this->db->escape($this->product_type)."',"; $sql .= " ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : "null").","; $sql .= " ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null").","; - $sql .= " ".($this->fk_remise_except ? ((int) $this->db->escape($this->fk_remise_except)) : "null").","; + $sql .= " ".($this->fk_remise_except ? ((int) $this->fk_remise_except) : "null").","; $sql .= " ".price2num($this->qty, 'MS').","; $sql .= " ".price2num($this->tva_tx).","; $sql .= " ".price2num($this->localtax1_tx).","; diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index bc5e555fa99..8db19cfb2a7 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -24,12 +24,15 @@ * \brief Tab to manage contact of a supplier proposal */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; // Load translation files required by the page $langs->loadLangs(array("propal", "supplier_proposal", "facture", "orders", "sendings", "companies")); @@ -98,10 +101,6 @@ if ($action == 'addcontact' && $permissiontoedit) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('ContactsAddresses'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -120,6 +119,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; + llxHeader('', $title, $help_url); + $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CommRequest"), -1, 'supplier_proposal'); @@ -129,40 +132,28 @@ if ($id > 0 || !empty($ref)) { $morehtmlref = '
    '; // Ref supplier - $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); + //$morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); + //$morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($permissiontoedit) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { - $morehtmlref .= ' - '.$proj->title; + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index af2353c4d8f..c1829fd61d6 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -26,6 +26,7 @@ * \brief Management page of documents attached to a business proposal */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; @@ -76,6 +77,7 @@ if ($object->id > 0) { } $permissiontoadd = $user->rights->supplier_proposal->creer; +$usercancreate = $permissiontoadd; /* * Actions @@ -90,7 +92,7 @@ if ($object->id > 0) { * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); @@ -119,37 +121,25 @@ if ($object->id > 0) { //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { $morehtmlref .= ' - '.$proj->title; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index f151651d186..40cca19a8b1 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -24,6 +24,7 @@ * \brief Home page of vendor proposal area */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; @@ -89,7 +90,7 @@ if ($resql) { $dataseries = array(); $colorseries = array(); $vals = array(); - // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) + // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for sales orders), 3=Closed (Sent/Received, billed or not) while ($i < $num) { $row = $db->fetch_row($resql); if ($row) { @@ -162,7 +163,7 @@ if ($resql) { /* * Draft askprice */ -if (!empty($conf->supplier_proposal->enabled)) { +if (isModEnabled('supplier_proposal')) { $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; @@ -297,7 +298,7 @@ if ($resql) { /* * Opened askprice */ -if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { +if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) { $langs->load("supplier_proposal"); $now = dol_now(); diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index 7bb6d4f7682..0b2af861163 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -24,6 +24,7 @@ * \brief Page d'affichage des infos d'une proposition commerciale */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; @@ -48,19 +49,16 @@ $result = restrictedArea($user, 'supplier_proposal', $id); /* * View */ - $form = new Form($db); - -$title = $langs->trans('CommRequest')." - ".$langs->trans('Info'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $object = new SupplierProposal($db); $object->fetch($id); $object->fetch_thirdparty(); - $object->info($object->id); +$title = $object->ref." - ".$langs->trans('Info'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; +llxHeader('', $title, $help_url); + $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'info', $langs->trans('CommRequest'), -1, 'supplier_proposal'); @@ -74,32 +72,22 @@ $morehtmlref = '
    '; //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); // Thirdparty -$morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); +$morehtmlref .= $object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) { + $morehtmlref .= '
    '; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { $morehtmlref .= ' - '.$proj->title; } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 4f68d7cc173..add084e91ab 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -33,6 +33,7 @@ * \brief Page of supplier proposals card and list */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -61,6 +62,7 @@ $search_user = GETPOST('search_user', 'int'); $search_sale = GETPOST('search_sale', 'int'); $search_ref = GETPOST('sf_ref') ?GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); +$search_societe_alias = GETPOST('search_societe_alias', 'alpha'); $search_login = GETPOST('search_login', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); @@ -92,6 +94,7 @@ $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'a $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_status = GETPOST('search_status', 'int'); +$search_product_category = GETPOST('search_product_category', 'int'); $object_statut = $db->escape(GETPOST('supplier_proposal_statut')); $search_btn = GETPOST('button_search', 'alpha'); @@ -168,21 +171,22 @@ $checkedtypetiers = 0; $arrayfields = array( 'sp.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), 's.nom'=>array('label'=>$langs->trans("Supplier"), 'checked'=>1), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>0), 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'sp.date_valid'=>array('label'=>$langs->trans("Date"), 'checked'=>1), + 'sp.date_valid'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1), 'sp.date_livraison'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1), 'sp.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), 'sp.total_tva'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), 'sp.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'sp.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'sp.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'sp.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'sp.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'sp.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), + 'sp.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'sp.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'sp.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'sp.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), + 'sp.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), 'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10), 'sp.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'sp.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), @@ -213,8 +217,6 @@ if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } -$search_product_category = 0; - include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on purge search criteria ? @@ -224,6 +226,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_sale = ''; $search_ref = ''; $search_societe = ''; + $search_societe_alias = ''; $search_montant_ht = ''; $search_montant_vat = ''; $search_montant_ttc = ''; @@ -285,14 +288,19 @@ $formpropal = new FormPropal($db); $companystatic = new Societe($db); $formcompany = new FormCompany($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + +$title = $langs->trans('ListOfSupplierProposals'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -//llxHeader('',$langs->trans('CommRequest'),$help_url); + +llxHeader('', $title, $help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) { +if ($sall || $search_user > 0) { $sql = 'SELECT DISTINCT'; } -$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= ' sp.rowid, sp.note_public, sp.note_private, sp.total_ht, sp.total_tva, sp.total_ttc, sp.localtax1, sp.localtax2, sp.ref, sp.fk_statut as status, sp.fk_user_author, sp.date_valid, sp.date_livraison as dp,'; @@ -321,12 +329,9 @@ $sql .= ', '.MAIN_DB_PREFIX.'supplier_proposal as sp'; if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (sp.rowid = ef.fk_object)"; } -if ($sall || $search_product_category > 0) { +if ($sall) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'supplier_proposaldet as pd ON sp.rowid=pd.fk_supplier_proposal'; } -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 sp.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = sp.fk_projet"; // We'll need this table joined to the select in order to filter by sale @@ -360,8 +365,15 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { if ($search_ref) { $sql .= natural_search('sp.ref', $search_ref); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_login) { $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login); @@ -417,6 +429,36 @@ if ($search_sale > 0) { if ($search_user > 0) { $sql .= " AND c.fk_c_type_contact = tc.rowid AND tc.element='supplier_proposal' AND tc.source='internal' AND c.element_id = sp.rowid AND c.fk_socpeople = ".((int) $search_user); } +// Search for tag/category ($searchCategoryProductList is an array of ID) +$searchCategoryProductOperator = -1; +$searchCategoryProductList = array($search_product_category); +if (!empty($searchCategoryProductList)) { + $searchCategoryProductSqlList = array(); + $listofcategoryid = ''; + foreach ($searchCategoryProductList as $searchCategoryProduct) { + if (intval($searchCategoryProduct) == -2) { + $searchCategoryProductSqlList[] = "NOT EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product)"; + } elseif (intval($searchCategoryProduct) > 0) { + if ($searchCategoryProductOperator == 0) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; + } else { + $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); + } + } + } + if ($listofcategoryid) { + $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid)."))"; + } + if ($searchCategoryProductOperator == 1) { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' OR ', $searchCategoryProductSqlList).")"; + } + } else { + if (!empty($searchCategoryProductSqlList)) { + $sql .= " AND (".implode(' AND ', $searchCategoryProductSqlList).")"; + } + } +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -467,8 +509,6 @@ if ($resql) { exit; } - llxHeader('', $langs->trans('CommRequest'), $help_url); - $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); @@ -521,6 +561,9 @@ if ($resql) { if ($search_societe) { $param .= '&search_societe='.urlencode($search_societe); } + if ($search_societe_alias) { + $param .= '&search_societe_alias='.urlencode($search_societe_alias); + } if ($search_user > 0) { $param .= '&search_user='.urlencode($search_user); } @@ -635,7 +678,7 @@ if ($resql) { $moreforfilter .= '
    '; } // If the user can view products - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { + if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $tmptitle = $langs->trans('IncludingProductWithTag'); @@ -658,7 +701,7 @@ if ($resql) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields if ($massactionbutton) { $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); } @@ -667,6 +710,13 @@ if ($resql) { print ''."\n"; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['sp.ref']['checked'])) { print ''; } + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + } if (!empty($arrayfields['s.town']['checked'])) { print ''; } @@ -797,25 +852,33 @@ if ($resql) { // Status if (!empty($arrayfields['sp.fk_statut']['checked'])) { print ''; } // Action column - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print "\n"; // Fields title print ''; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + } if (!empty($arrayfields['sp.ref']['checked'])) { print_liste_field_titre($arrayfields['sp.ref']['label'], $_SERVER["PHP_SELF"], 'sp.ref', '', $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.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $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); } @@ -879,7 +942,9 @@ if ($resql) { if (!empty($arrayfields['sp.fk_statut']['checked'])) { print_liste_field_titre($arrayfields['sp.fk_statut']['label'], $_SERVER["PHP_SELF"], "sp.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); } - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + } print ''."\n"; $now = dol_now(); @@ -904,11 +969,23 @@ if ($resql) { // Company $companystatic->id = $obj->socid; $companystatic->name = $obj->name; + $companystatic->name_alias = $obj->alias; $companystatic->client = $obj->client; $companystatic->code_client = $obj->code_client; print ''; - + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (!empty($arrayfields['sp.ref']['checked'])) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; if (!$i) { $totalarray['nbfield']++; @@ -987,7 +1074,7 @@ if ($resql) { // Type ent if (!empty($arrayfields['typent.code']['checked'])) { print ''; } - print ''; if (!$i) { $totalarray['nbfield']++; } @@ -1172,6 +1261,17 @@ if ($resql) { // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // 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); diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 4ef46594e0e..aa0ccc5276a 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -21,11 +21,12 @@ */ /** - * \file htdocs/comm/propal/note.php + * \file htdocs/supplier_proposal/note.php * \ingroup propal - * \brief Fiche d'information sur une proposition commerciale + * \brief Page to show notes of a supplier proposal request */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; @@ -52,6 +53,8 @@ $result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal'); $object = new SupplierProposal($db); +$usercancreate = $user->hasRight("supplier_propal", "write"); + /* @@ -72,10 +75,6 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Notes'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $form = new Form($db); if ($id > 0 || !empty($ref)) { @@ -88,6 +87,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('Notes'); + $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; + llxHeader('', $title, $help_url); + $societe = new Societe($db); if ($societe->fetch($object->socid)) { $head = supplier_proposal_prepare_head($object); @@ -103,37 +106,25 @@ if ($id > 0 || !empty($ref)) { //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project if (!empty($conf->project->enabled)) { $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) { + $morehtmlref .= '
    '; + if ($usercancreate) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); 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); + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, ($action == 'classify' ? 1 : 0), 0, 1, ''); } else { if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(1); + $morehtmlref .= $proj->getNomUrl(1); if ($proj->title) { $morehtmlref .= ' - '.$proj->title; } - } else { - $morehtmlref .= ''; } } } diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index e6f2afd504d..3f372e97c1e 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -235,6 +235,8 @@ function pHeader($soutitre, $next, $action = 'none') // On force contenu dans format sortie header("Content-type: text/html; charset=".$conf->file->character_set_client); + + // Security options header("X-Content-Type-Options: nosniff"); header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks) diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index 135a3b2a9e7..54ed2f642a2 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -23,6 +23,7 @@ * \brief Setup page for TakePos module */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; @@ -114,9 +115,52 @@ print '\n"; +// D'ont display category +print '\n"; + +// Hide stock on line +print '\n"; + +// Only the products in stock +print '\n"; + +// View description of the categories +print '\n"; + +// View reference of products +print '\n"; + +// Use price excl. taxes (HT) and not price incl. taxes (TTC) +print '\n"; + + print '
    '; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; print ''; @@ -677,6 +727,11 @@ if ($resql) { print ''; print ''; + print ''; + print ''; - $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'supplier', 'search_status', 'minwidth75imp'); + $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'supplier', 'search_status', 'minwidth75imp onrightofpage'); print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - 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 ''; @@ -942,7 +1019,17 @@ if ($resql) { // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { print ''; - print $companystatic->getNomUrl(1, 'supplier'); + print $companystatic->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); + print ''; + print $companystatic->name_alias; print ''; - if (count($typenArray) == 0) { + if (empty($typenArray) || !is_array($typenArray) || count($typenArray) == 0) { $typenArray = $formcompany->typent_array(1); } print $typenArray[$obj->typent_code]; @@ -1092,7 +1179,7 @@ if ($resql) { $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; - $userstatic->status = $obj->status; + $userstatic->status = $obj->ustatus; $userstatic->lastname = $obj->name; $userstatic->firstname = $obj->firstname; $userstatic->photo = $obj->photo; @@ -1148,15 +1235,17 @@ if ($resql) { } // Action column - 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; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + 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 ''; + print '
    '.$langs->trans("NoRecordFound").'
    '; print $langs->trans("NumberOfLinesToShow"); print ''; $array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6"); -print $form->selectarray('TAKEPOS_LINES_TO_SHOW', $array, (empty($conf->global->TAKEPOS_LINES_TO_SHOW) ? '2' : $conf->global->TAKEPOS_LINES_TO_SHOW), 0); +print $form->selectarray('TAKEPOS_LINES_TO_SHOW', $array, getDolGlobalInt('TAKEPOS_LINES_TO_SHOW', 2), 0); print "
    '; +print $langs->trans('HideCategories'); +print ''; +print ajax_constantonoff("TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; +print $langs->trans('HideStockOnLine'); +print ''; +print ajax_constantonoff("TAKEPOS_HIDE_STOCK_ON_LINE", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; +print $langs->trans('ShowOnlyProductInStock'); +print ''; +print ajax_constantonoff("TAKEPOS_PRODUCT_IN_STOCK", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; +print $langs->trans('ShowCategoryDescription'); +print ''; +print ajax_constantonoff("TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; +print $langs->trans('ShowProductReference'); +print ''; +print ajax_constantonoff("TAKEPOS_SHOW_PRODUCT_REFERENCE", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; +print $langs->trans('UsePriceHT'); +print ''; +print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0); +print "
    '; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 2f37de1a1b0..77a7a68b1c3 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -23,6 +23,7 @@ * \brief Setup page for TakePos module - Bar Restaurant features */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; diff --git a/htdocs/takepos/admin/orderprinters.php b/htdocs/takepos/admin/orderprinters.php index cddf839375a..d2fadf94c81 100644 --- a/htdocs/takepos/admin/orderprinters.php +++ b/htdocs/takepos/admin/orderprinters.php @@ -26,6 +26,7 @@ * \brief Home page of category area */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; @@ -174,6 +175,7 @@ print '
    '.$langs->trans("Printer").' 1
    '; print ''; @@ -183,7 +185,7 @@ if ($nbofentries > 0) { } else { $checked = ''; } - if ($row["fk_menu"] == 0) { + if ($row["fk_menu"] >= 0) { print ''.$row["label"].'
    '; } } @@ -207,6 +209,7 @@ print '
    '.$langs->trans("Printer").' 2
    '; print ''; @@ -216,7 +219,7 @@ if ($nbofentries > 0) { } else { $checked = ''; } - if ($row["fk_menu"] == 0) { + if ($row["fk_menu"] >= 0) { print ''.$row["label"].'
    '; } } @@ -240,6 +243,7 @@ print '
    '.$langs->trans("Printer").' 3
    '; print ''; @@ -249,7 +253,7 @@ if ($nbofentries > 0) { } else { $checked = ''; } - if ($row["fk_menu"] == 0) { + if ($row["fk_menu"] >= 0) { print ''.$row["label"].'
    '; } } diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php index 6200fce8768..7f07b214085 100644 --- a/htdocs/takepos/admin/other.php +++ b/htdocs/takepos/admin/other.php @@ -82,7 +82,6 @@ print ''; print ''; print ''; - print '
    '; // Marketplace diff --git a/htdocs/takepos/admin/printqr.php b/htdocs/takepos/admin/printqr.php index 87f742fe544..b5fe118e847 100644 --- a/htdocs/takepos/admin/printqr.php +++ b/htdocs/takepos/admin/printqr.php @@ -21,6 +21,7 @@ * \brief Print QR Menu */ +// Load Dolibarr environment require '../../main.inc.php'; // Security check diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index 7cc5da97f64..1cfe141478d 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -16,7 +16,7 @@ * 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 . + * along with this program. If not, see . */ /** @@ -25,6 +25,7 @@ * \brief Setup page for TakePos module */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; @@ -38,6 +39,7 @@ if (!$user->admin) { $langs->loadLangs(array("admin", "cashdesk", "commercial")); + /* * Actions */ @@ -67,7 +69,7 @@ if (GETPOST('action', 'alpha') == 'set') { } elseif (GETPOST('action', 'alpha') == 'setmethod') { dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity); // TakePOS connector require ReceiptPrinter module - if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && !isModEnabled('receiptprinter')) { + if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && !isModEnabled('receiptprinter')) { activateModule("modReceiptPrinter"); } } @@ -91,75 +93,6 @@ print ''; print ''; -print load_fiche_titre($langs->trans("PrintMethod"), '', ''); - -print '
    '; -print ''; -print ''; -print ''; -print "\n"; - -// Browser method -print '\n"; - -// Receipt printer module -print '\n"; - -// TakePOS Connector -print '\n"; -print '
    '.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status").'
    '; -print $langs->trans('Browser'); -print ''; -print $langs->trans('BrowserMethodDescription'); -print ''; -if ($conf->global->TAKEPOS_PRINT_METHOD == "browser") { - print img_picto($langs->trans("Activated"), 'switch_on'); -} else { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; -} -print "
    '; -print $langs->trans('DolibarrReceiptPrinter'); -print ''; -print $langs->trans('ReceiptPrinterMethodDescription'); -if (isModEnabled('receiptprinter')) { - if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") { - print '
    '; - print img_picto('', 'printer', 'class="paddingright"').''.$langs->trans("Setup").''; - } -} -print '
    '; -if (isModEnabled('receiptprinter')) { - if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") { - print img_picto($langs->trans("Activated"), 'switch_on'); - } else { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; - } -} else { - print ''; - print $langs->trans("ModuleReceiptPrinterMustBeEnabled"); - print ''; -} -print "
    '; -print "TakePOS Connector"; -print ''; -print $langs->trans('TakeposConnectorMethodDescription'); - -if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { - print '
    '; - print $langs->trans("URL")." / ".$langs->trans("IPAddress").' ('.$langs->trans("TakeposConnectorNecesary").')'; - print ' '; -} - -print '
    '; -if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { - print img_picto($langs->trans("Activated"), 'switch_on'); -} else { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; -} -print "
    '; -print '
    '; - - print load_fiche_titre($langs->trans("Receipt"), '', ''); print '
    '; @@ -173,10 +106,9 @@ print '
    '; print $langs->trans('TicketVatGrouped'); print ''; print ajax_constantonoff("TAKEPOS_TICKET_VAT_GROUPPED", array(), $conf->entity, 0, 0, 1, 0); -//print $form->selectyesno("TAKEPOS_TICKET_VAT_GROUPPED", $conf->global->TAKEPOS_TICKET_VAT_GROUPPED, 1); print "
    '; $variablename = 'TAKEPOS_HEADER'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { + if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -202,7 +134,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; print '
    '; $variablename = 'TAKEPOS_FOOTER'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { + if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -212,7 +144,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P print "
    '; - print ''; + print ''; print '
    '; print $langs->trans('CustomerDisplay'); print ''; @@ -267,7 +199,7 @@ print $langs->trans('PrintWithoutDetailsButton'); print ''; print ajax_constantonoff('TAKEPOS_PRINT_WITHOUT_DETAILS', array(), $conf->entity, 0, 0, 1, 0); print "
    '; print $langs->trans('PrintWithoutDetailsLabelDefault'); print ''; @@ -284,6 +216,13 @@ print $form->buttonsSaveCancel("Save", ''); print "\n"; +print load_fiche_titre($langs->trans("Preview"), '', ''); +print '
    '; +print '
    '; +print ''; +print '
    '; +print '
    '; + print '
    '; llxFooter(); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index df71ea4f358..38cd6d1275d 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -24,6 +24,7 @@ * \brief Setup page for TakePos module */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; @@ -264,7 +265,7 @@ print '
    '; print $langs->trans("CashdeskShowServices"); print ''; diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index b2d2b87ced0..fe03139c8a3 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -1,7 +1,8 @@ - * Copyright (C) 2011-2017 Juanjo Menent - * Copyright (C) 2022 Alexandre Spangaro +/* Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2011-2017 Juanjo Menent + * Copyright (C) 2021 Thibault FOUCART + * Copyright (C) 2022 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 @@ -23,12 +24,14 @@ * \brief Setup page for TakePos module */ +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; +require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; $terminal = GETPOST('terminal', 'int'); // If socid provided by ajax company selector @@ -69,11 +72,16 @@ $terminaltouse = $terminal; if (GETPOST('action', 'alpha') == 'set') { $db->begin(); + $res = dolibarr_set_const($db, "TAKEPOS_TERMINAL_NAME_".$terminaltouse, (!empty(GETPOST('terminalname'.$terminaltouse, 'restricthtml')) ? GETPOST('terminalname'.$terminaltouse, 'restricthtml') : $langs->trans("TerminalName", $terminaltouse)), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY".$terminaltouse, (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CHEQUE".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CB".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); + if (isModEnabled('stripe') && !empty($conf->global->STRIPE_CARD_PRESENT)) { + $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_STRIPETERMINAL".$terminaltouse, GETPOST('CASHDESK_ID_BANKACCOUNT_STRIPETERMINAL'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); + } if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) { $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_SUMUP".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); } @@ -144,13 +152,18 @@ print '
    '.$langs->trans("Parameters").''.$langs->trans("Value").'
    '.$langs->trans("TerminalNameDesc").''; +print 'trans("TerminalName", $terminal)).'" >'; +print '
    '.$langs->trans("CashDeskThirdPartyForSell").''; print $form->select_company(getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$terminaltouse), 'socid', '(s.client IN (1, 3) AND s.status = 1)', 1, 0, 0, array(), 0); print '
    '.$langs->trans("CashDeskBankAccountForSell").''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); @@ -175,6 +188,44 @@ if (isModEnabled('banque')) { $atleastonefound++; } print '
    '.$langs->trans("CashDeskBankAccountForStripeTerminal").''; + $service = 'StripeTest'; + $servicestatus = 0; + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { + $service = 'StripeLive'; + $servicestatus = 1; + } + global $stripearrayofkeysbyenv; + $site_account = $stripearrayofkeysbyenv[$servicestatus]['secret_key']; + \Stripe\Stripe::setApiKey($site_account); + if (isModEnabled('stripe') && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { + $service = 'StripeTest'; + $servicestatus = '0'; + dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); + } else { + $service = 'StripeLive'; + $servicestatus = '1'; + } + $stripe = new Stripe($db); + $stripeacc = $stripe->getStripeAccount($service); + if ($stripeacc) { + $readers = \Stripe\Terminal\Reader::all('', array("location" => $conf->global->STRIPE_LOCATION, "stripe_account" => $stripeacc)); + } else { + $readers = \Stripe\Terminal\Reader::all('', array("location" => $conf->global->STRIPE_LOCATION)); + } + + $reader = array(); + $reader[""] = $langs->trans("NoReader"); + foreach ($readers as $readers) { + $reader[$reader->id] = $readers->label.' ('.$readers->status.')'; + } + print $form->selectarray('CASHDESK_ID_BANKACCOUNT_STRIPETERMINAL'.$terminaltouse, $reader, $conf->global->{'CASHDESK_ID_BANKACCOUNT_STRIPETERMINAL'.$terminaltouse}); + print '
    '.$langs->trans("CashDeskBankAccountForSumup").''; @@ -287,7 +338,7 @@ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlob print '
    '.$langs->trans('CashDeskReaderKeyCodeForEnter').''; -print ''; +print ''; print '
    '; print ''; -if ($atleastonefound == 0 && isModEnabled('banque')) { +if ($atleastonefound == 0 && isModEnabled("banque")) { print info_admin($langs->trans("AtLeastOneDefaultBankAccountMandatory"), 0, 0, 'error'); } diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 6f84fccb9c8..db6b224466c 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -21,9 +21,6 @@ * \brief Ajax search component for TakePos. It search products of a category. */ -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', '1'); -} if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', '1'); } @@ -40,6 +37,7 @@ if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php"; @@ -58,11 +56,14 @@ if (empty($user->rights->takepos->run)) { // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks $hookmanager->initHooks(array('takeposproductsearch')); // new context for product search hooks + /* * View */ if ($action == 'getProducts') { + top_httphead('application/json'); + $object = new Categorie($db); if ($category == "supplements") { $category = getDolGlobalInt('TAKEPOS_SUPPLEMENTS_CATEGORY'); @@ -83,14 +84,20 @@ if ($action == 'getProducts') { } unset($prod->fields); unset($prod->db); + + $prod->price_formated = price(price2num($prod->price, 'MT'), 1, $langs, 1, -1, -1, $conf->currency); + $prod->price_ttc_formated = price(price2num($prod->price_ttc, 'MT'), 1, $langs, 1, -1, -1, $conf->currency); + $res[] = $prod; } } echo json_encode($res); } else { - echo 'Failed to load category with id='.$category; + echo 'Failed to load category with id='.dol_escape_htmltag($category); } } elseif ($action == 'search' && $term != '') { + top_httphead('application/json'); + // Change thirdparty with barcode require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -154,7 +161,7 @@ if ($action == 'getProducts') { if (isset($barcode_value_list['ref'])) { // search product from reference - $sql = "SELECT rowid, ref, label, tosell, tobuy, barcode, price"; + $sql = "SELECT rowid, ref, label, tosell, tobuy, barcode, price, price_ttc"; $sql .= " FROM " . $db->prefix() . "product as p"; $sql .= " WHERE entity IN (" . getEntity('product') . ")"; $sql .= " AND ref = '" . $db->escape($barcode_value_list['ref']) . "'"; @@ -203,6 +210,7 @@ if ($action == 'getProducts') { 'tobuy' => $obj->tobuy, 'barcode' => $obj->barcode, 'price' => $obj->price, + 'price_ttc' => $obj->price_ttc, 'object' => 'product', 'img' => $ig, 'qty' => $qty, @@ -219,7 +227,7 @@ if ($action == 'getProducts') { } } - $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price' ; + $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price, p.price_ttc' ; if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) { $sql .= ', ps.reel'; } @@ -295,10 +303,12 @@ if ($action == 'getProducts') { 'tobuy' => $obj->tobuy, 'barcode' => $obj->barcode, 'price' => $obj->price, + 'price_ttc' => $obj->price_ttc, 'object' => 'product', 'img' => $ig, 'qty' => 1, - //'price_formated' => price(price2num($obj->price, 'MU'), 1, $langs, 1, -1, -1, $conf->currency) + 'price_formated' => price(price2num($obj->price, 'MT'), 1, $langs, 1, -1, -1, $conf->currency), + 'price_ttc_formated' => price(price2num($obj->price_ttc, 'MT'), 1, $langs, 1, -1, -1, $conf->currency) ); // Add entries to row from hooks $parameters=array(); @@ -329,8 +339,8 @@ if ($action == 'getProducts') { require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; $printer = new dolReceiptPrinter($db); // check printer for terminal - if ($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term} > 0) { - $printer->initPrinter($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); + if (getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) { + $printer->initPrinter(getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term)); // open cashdrawer $printer->pulse(); $printer->close(); @@ -340,12 +350,14 @@ if ($action == 'getProducts') { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $printer = new dolReceiptPrinter($db); // check printer for terminal - if (($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term} > 0 || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") && $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term} > 0) { + if ((getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0 || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && getDolGlobalInt('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term) > 0) { $object = new Facture($db); $object->fetch($id); - $ret = $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); + $ret = $printer->sendToPrinter($object, getDolGlobalString('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term), getDolGlobalString('TAKEPOS_PRINTER_TO_USE'.$term)); } } elseif ($action == 'getInvoice') { + top_httphead('application/json'); + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object = new Facture($db); @@ -359,5 +371,5 @@ if ($action == 'getProducts') { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; $printer = new dolReceiptPrinter($db); - $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); + $printer->sendToPrinter($object, getDolGlobalString('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term), getDolGlobalString('TAKEPOS_PRINTER_TO_USE'.$term)); } diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index acb195af15c..921ec1bea40 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -31,9 +31,6 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations -if (!defined('NOCSRFCHECK')) { - define('NOCSRFCHECK', 1); -} if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', 1); } @@ -340,7 +337,18 @@ div.paymentbordline width: 100%; height: 100%; margin: 0 auto; - overflow: visible; + + overflow-x: hidden; + overfloy-y: scroll; + + overflow: visible; + box-sizing: border-box; } @@ -367,6 +375,7 @@ div.paymentbordline margin: 0 auto; width: 100%; height: 55%; + overflow: hidden; } .div1{ @@ -480,7 +489,7 @@ p.description_content{ div.description_content { display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: global->TAKEPOS_LINES_TO_SHOW; ?>; + -webkit-line-clamp: ; overflow: hidden; padding-left: 2px; padding-right: 2px; @@ -557,6 +566,7 @@ div.description_content { padding: 7px 4px 7px 4px; margin: 8px; margin-left: 4px; + border-radius: 3px; } .topnav-left a:hover, .topnav .login_block_other a:hover { background-color: #ddd; @@ -583,6 +593,14 @@ div#moreinfo, div#infowarehouse { padding: 0 8px 0 8px; } +.basketselected { + font-weight: bold; + /* text-decoration: underline; */ +} +.basketnotselected { + opacity: 0.8; +} + .productprice { position: absolute; top: 5px; @@ -590,11 +608,11 @@ div#moreinfo, div#infowarehouse { background: var(--colorbackhmenu1); color: var(--colortextbackhmenu); font-size: 2em; - padding: 5px; + padding: 4px; border-radius: 2px; opacity: 0.9; - padding-left: 8px; - padding-right: 8px; + padding-left: 6px; + padding-right: 6px; } @@ -708,9 +726,12 @@ div#moreinfo, div#infowarehouse { } button.actionbutton { - min-height: 60px; + display: inline-flex; + align-items: center; + justify-content: center; padding-left: 4px; padding-right: 4px; + min-height: 30px; } } @@ -828,3 +849,226 @@ div#moreinfo, div#infowarehouse { display: table; clear: both; } + +.div5 .imgadd { + display: none; +} + + +@media screen and (max-width: 767px) { + .div4 { + height: auto; + width: 100%; + float: left; + box-sizing: border-box; + font-size: 6px; + padding-top: 10px; + padding-bottom: 2px; + margin-left: 2px; + } + + .div4 .wrapper.divempty, .div4 img, .div4 .wrapper:nth-last-child(1), .div4 .wrapper:nth-last-child(2), #prodiv22, #prodiv23, .catwatermark { + display: none!important; + } + + .tab-category { + float: left; + position: relative; + width: 25%; + height: 33%; + margin: 0; + padding: 1px; + border: 2px solid #EEE; + text-align: center; + box-sizing: border-box; + background-color: #fff; + } + + .div4 .wrapper, .tab-category { + width: auto; + height: auto; + padding: 6px; + text-align: center; + cursor: pointer; + border: 1px solid #FFF!important; + border-top: 3px solid #FFF!important; + } + + .div4 .tab-category.active { + border-right: 1px solid #CCC !important; + border-left: 1px solid #CCC !important; + border-top: 3px solid var(--colorbackhmenu1) !important; + } + + .div5 { + height: 100%; + width: 100%; + padding-top: 0px; + } + + div.description { + position: initial; + width: auto; + background-color: black; + opacity: 1; + text-align: center; + padding-top: 0px; + background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1)); + } + + .div5 .description .description_content { + font-weight: bold; + font-size: 14px; + padding-left: 10px; + } + + .div5 .wrapper2 { + width: 100%; + display: inline-flex; + align-items: center; + padding: 10px; + } + + .div5 .wrapper2.divempty { + display: none; + } + + div.wrapper2 { + float: none; + } + + .div5 .arrow { + width: auto; + height: auto; + display: none!important; + } + + .div5 .arrow .centerinmiddle { + transform: translate(0, 0); + } + + .div5 .imgadd { + display: flex; + } + + div.wrapper2{ + height:10%; + } +} + + + + +.arrows { + display: none; +} + + +.indicator { + background: #00000042; + padding: 15px 5px; + cursor: pointer; + position:absolute; +} + +.indicator.left { + left:0; +} + +.indicator.right { + right:0; +} + +.indicator:hover { + background: #000000; +} + +.indicator i { + color: white; +} + +.topnav-left { + margin-left: 20px; +} + +.topnav-right { + margin-right: 20px; +} + +/* For Header Scroll */ +html { + scroll-behavior: smooth; +} + +.topnav { + scroll-behavior: smooth; +} + +.header { + height: unset; +} + +.topnav { + width: 100%; + white-space: nowrap; + overflow-x: scroll; + display: inline-flex; +} + +.topnav-left { + white-space: nowrap; + float: none; + margin-right: auto; + align-items: center; +} + +.topnav-right { + display: flex; + white-space: nowrap; + float: none; + align-items: center; +} + +.topnav-left #shoppingcart { + display:inline-flex; +} + +.topnav-right .login_block_other { + display: flex; + white-space: nowrap; +} + +::-webkit-scrollbar { + width: 8px; +} + + +::-webkit-scrollbar-track { + background: #f1f1f1; +} + + +::-webkit-scrollbar-thumb { + background: #888; +} + +.topnav::-webkit-scrollbar-track{ + background: #eeeeee; +} + +.topnav::-webkit-scrollbar{ + width: 1px; + background: #F5F5F5; +} + +.topnav::-webkit-scrollbar-thumb{ + background: #f9171700; +} + +.topnav.overflow .arrows { + display: flex; +} + + diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 9dc4f843b5b..85aab47528f 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -25,12 +25,6 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //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'); } @@ -41,6 +35,7 @@ if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); } +// Load Dolibarr environment require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -81,6 +76,8 @@ if ($action == "getTables") { } $rows[] = $row; } + + top_httphead('application/json'); echo json_encode($rows); exit; } @@ -119,13 +116,18 @@ if ($action == "add") { */ // Title +$head = ''; $title = 'TakePOS - Dolibarr '.DOL_VERSION; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; } -top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); +$arrayofcss = array('/takepos/css/pos.css.php?a=xxx'); + +top_htmlhead($head, $title, 0, 0, '', $arrayofcss); + ?> - + + '; + $parameters = array(); $reshook = $hookmanager->executeHooks('insertExtraFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index df6894947b7..44b7fda1e05 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -25,6 +25,7 @@ * \brief Onglet vcard d'un user */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php index ade64ea6a7b..6f7ec6b202c 100644 --- a/htdocs/variants/admin/admin.php +++ b/htdocs/variants/admin/admin.php @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -25,7 +26,7 @@ $langs->loadLangs(array("admin", "products")); $action = GETPOST('action', 'alphanohtml'); // Security check -if (!$user->admin || empty($conf->variants->enabled)) { +if (!$user->admin || !isModEnabled('variants')) { accessforbidden(); } diff --git a/htdocs/variants/ajax/getCombinations.php b/htdocs/variants/ajax/getCombinations.php index 2559ed6169c..dd1b49414c8 100644 --- a/htdocs/variants/ajax/getCombinations.php +++ b/htdocs/variants/ajax/getCombinations.php @@ -1,5 +1,4 @@ * Copyright (C) 2022 Open-Dsi * @@ -33,12 +32,13 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user diff --git a/htdocs/variants/ajax/get_attribute_values.php b/htdocs/variants/ajax/get_attribute_values.php index 827f9513220..1867eb368de 100644 --- a/htdocs/variants/ajax/get_attribute_values.php +++ b/htdocs/variants/ajax/get_attribute_values.php @@ -32,13 +32,14 @@ if (!defined('NOREQUIRESOC')) { define('NOREQUIRESOC', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php'; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user diff --git a/htdocs/variants/ajax/orderAttribute.php b/htdocs/variants/ajax/orderAttribute.php index 9be6e69d852..2065bc27bdf 100644 --- a/htdocs/variants/ajax/orderAttribute.php +++ b/htdocs/variants/ajax/orderAttribute.php @@ -1,5 +1,4 @@ * Copyright (C) 2022 Open-Dsi * @@ -36,11 +35,12 @@ if (!defined('NOREQUIRETRAN')) { define('NOREQUIRETRAN', '1'); } +// Load Dolibarr environment require '../../main.inc.php'; require DOL_DOCUMENT_ROOT . '/variants/class/ProductAttribute.class.php'; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 68bb8d60998..634290ca187 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -23,6 +23,7 @@ * \brief Page to show product attribute */ +// Load Dolibarr environment require '../main.inc.php'; require 'class/ProductAttribute.class.php'; require 'class/ProductAttributeValue.class.php'; @@ -42,7 +43,7 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $lineid = GETPOST('lineid', 'alpha'); // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user @@ -213,6 +214,9 @@ if ($action == 'create') { // Common attributes include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
    '; print dol_get_fiche_end(); @@ -323,24 +327,11 @@ if ($action == 'create') { print '
    '; if (!empty($object->lines) || ($permissiontoedit && $action != 'selectlines' && $action != 'editline')) { - print ''; - } - - // Form to add new line - if ($permissiontoedit && $action != 'selectlines') { - if ($action != 'editline') { - // Add products/services form - - $parameters = array(); - $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) - $object->formAddObjectLine(1, $mysoc, $soc); - } + print '
    '; } if (!empty($object->lines)) { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/variants/tpl', ($permissiontoedit ? 1 : 0)); } if (!empty($object->lines) || ($permissiontoedit && $action != 'selectlines' && $action != 'editline')) { diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 3b315101cc8..ae82873d8bd 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -1,5 +1,4 @@ * Copyright (C) 2022 Open-Dsi * @@ -136,7 +135,7 @@ class ProductAttribute extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -1273,11 +1272,13 @@ class ProductAttribute extends CommonObject * @param int $selected Object line selected * @param int $dateSelector 1=Show also date range input fields * @param string $defaulttpldir Directory where to find the template + * @param int $addcreateline 1=Add create line * @return void */ - public function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0, $defaulttpldir = '/variants/tpl') + public function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0, $defaulttpldir = '/variants/tpl', $addcreateline = 0) { global $conf, $hookmanager, $langs, $user, $form, $object; + global $mysoc; // TODO We should not use global var for this global $disableedit, $disablemove, $disableremove; @@ -1307,9 +1308,25 @@ class ProductAttribute extends CommonObject } } + + if ($addcreateline) { + // Form to add new line + if ($action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $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)) + $object->formAddObjectLine(1, $mysoc, $buyer); + } + } + } + $i = 0; - print "\n"; + print "\n"; foreach ($this->lines as $line) { if (is_object($hookmanager)) { // Old code is commented on preceding line. $parameters = array('line' => $line, 'num' => $num, 'i' => $i, 'selected' => $selected, 'table_element_line' => $line->table_element); @@ -1321,7 +1338,7 @@ class ProductAttribute extends CommonObject $i++; } - print "\n"; + print "\n"; } /** diff --git a/htdocs/variants/class/ProductAttributeValue.class.php b/htdocs/variants/class/ProductAttributeValue.class.php index 24ddda92293..734e82b7c27 100644 --- a/htdocs/variants/class/ProductAttributeValue.class.php +++ b/htdocs/variants/class/ProductAttributeValue.class.php @@ -1,5 +1,4 @@ * Copyright (C) 2022 Open-Dsi * @@ -106,7 +105,7 @@ class ProductAttributeValue extends CommonObjectLine if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -260,10 +259,10 @@ class ProductAttributeValue extends CommonObjectLine /** * Returns all product attribute values of a product attribute * - * @param int $prodattr_id Product attribute id - * @param bool $only_used Fetch only used attribute values + * @param int $prodattr_id Product attribute id + * @param bool $only_used Fetch only used attribute values * @param int $returnonlydata 0: return object, 1: return only data - * @return ProductAttributeValue[] + * @return ProductAttributeValue[] Array of object */ public function fetchAllByProductAttribute($prodattr_id, $only_used = false, $returnonlydata = 0) { diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 0e8f69958dc..cc767449e75 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -1,5 +1,4 @@ * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2022 Open-Dsi @@ -281,7 +280,9 @@ class ProductCombination { global $conf; - $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".((int) $fk_product_parent)." AND entity IN (".getEntity('product').")"; + $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_ref_ext, variation_weight"; + $sql.= " FROM ".MAIN_DB_PREFIX."product_attribute_combination"; + $sql.= " WHERE fk_product_parent = ".((int) $fk_product_parent)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -489,10 +490,10 @@ class ProductCombination $child->price_autogen = $parent->price_autogen; $child->weight = $parent->weight; // Only when Parent Status are updated - if ($parent->oldcopy && ($parent->status != $parent->oldcopy->status)) { + if (!empty($parent->oldcopy) && ($parent->status != $parent->oldcopy->status)) { $child->status = $parent->status; } - if ($parent->oldcopy && ($parent->status_buy != $parent->oldcopy->status_buy)) { + if (!empty($parent->oldcopy) && ($parent->status_buy != $parent->oldcopy->status_buy)) { $child->status_buy = $parent->status_buy; } diff --git a/htdocs/variants/class/ProductCombination2ValuePair.class.php b/htdocs/variants/class/ProductCombination2ValuePair.class.php index 27406cdfc75..dee18dc99e1 100644 --- a/htdocs/variants/class/ProductCombination2ValuePair.class.php +++ b/htdocs/variants/class/ProductCombination2ValuePair.class.php @@ -1,5 +1,4 @@ * Copyright (C) 2022 Open-Dsi * diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 9115ec585d8..2d706699447 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -70,9 +71,9 @@ if ($id > 0 || $ref) { } $selectedvariant = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array(); - +$selected = ""; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user @@ -139,7 +140,7 @@ $productCombination2ValuePairs1 = array(); if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST('selectvariant', 'alpha') && empty($subaction)) { // We click on Create all defined combinations //$features = GETPOST('features', 'array'); - $features = $_SESSION['addvariant_'.$object->id]; + $features = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array(); if (!$features) { if ($action == 'create') { @@ -154,7 +155,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $price_impact = price2num($price_impact); // for conf PRODUIT_MULTIPRICES - if ($conf->global->PRODUIT_MULTIPRICES) { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { $level_price_impact = array_map('price2num', $level_price_impact); } else { $level_price_impact = array(1 => $price_impact); @@ -279,7 +280,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $prodcomb->variation_weight = price2num($weight_impact); // for conf PRODUIT_MULTIPRICES - if ($conf->global->PRODUIT_MULTIPRICES) { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { $level_price_impact = array_map('price2num', $level_price_impact); $prodcomb->variation_price = $level_price_impact[1]; @@ -292,7 +293,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $prodcomb->variation_price_percentage = $price_impact_percent; } - if ($conf->global->PRODUIT_MULTIPRICES) { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { $prodcomb->combination_price_levels = array(); for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $productCombinationLevel = new ProductCombinationLevel($db); @@ -370,9 +371,12 @@ if ($action === 'confirm_deletecombination') { $form = new Form($db); -if (!empty($id) || !empty($ref)) { - llxHeader("", "", $langs->trans("CardProduct".$object->type)); +$title = $langs->trans("Variant"); +llxHeader("", $title); + + +if (!empty($id) || !empty($ref)) { $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; @@ -395,7 +399,7 @@ if (!empty($id) || !empty($ref)) { print '
    '; // Type - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { + if (isModEnabled("product") && isModEnabled("service")) { $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); print ' diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index a185ab0704f..d676f8a6ee9 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -138,10 +138,10 @@ $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity; // Security check if (empty($modulepart) && empty($hashp)) { - accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); + httponly_accessforbidden('Bad link. Bad value for parameter modulepart', 400); } if (empty($original_file) && empty($hashp) && $modulepart != 'barcode') { - accessforbidden('Bad link. Missing identification to find file (param file or hashp)', 0, 0, 1); + httponly_accessforbidden('Bad link. Missing identification to find file (param file or hashp)', 400); } if ($modulepart == 'fckeditor') { $modulepart = 'medias'; // For backward compatibility @@ -192,7 +192,7 @@ if (!empty($hashp)) { $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir //var_dump($original_file); exit; } else { - accessforbidden('Bad link. File is from another module part.', 0, 0, 1); + httponly_accessforbidden('Bad link. File is from another module part.', 403); } } else { $modulepart = $moduleparttocheck; @@ -200,7 +200,7 @@ if (!empty($hashp)) { } } else { $langs->load("errors"); - accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 0, 0, 1); + httponly_accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 403, 1); } } @@ -214,11 +214,11 @@ if (GETPOST('type', 'alpha')) { // Security: This wrapper is for images. We do not allow type/html if (preg_match('/html/i', $type)) { - accessforbidden('Error: Using the image wrapper to output a file with a mime type HTML is not possible.', 0, 0, 1); + httponly_accessforbidden('Error: Using the image wrapper to output a file with a mime type HTML is not possible.'); } // Security: This wrapper is for images. We do not allow files ending with .noexe if (preg_match('/\.noexe$/i', $original_file)) { - accessforbidden('Error: Using the image wrapper to output a file ending with .noexe is not allowed.', 0, 0, 1); + httponly_accessforbidden('Error: Using the image wrapper to output a file ending with .noexe is not allowed.'); } // Security: Delete string ../ or ..\ into $original_file @@ -235,12 +235,12 @@ if ($refname == 'thumbs') { // Check that file is allowed for view with viewimage.php if (!empty($original_file) && !dolIsAllowedForPreview($original_file)) { - accessforbidden('This file is not qualified for preview', 0, 0, 1); + httponly_accessforbidden('This file is not qualified for preview', 403); } // Security check if (empty($modulepart)) { - accessforbidden('Bad value for parameter modulepart', 0, 0, 1); + httponly_accessforbidden('Bad value for parameter modulepart', 400); } // When logged in a different entity, medias cannot be accessed because $conf->$module->multidir_output diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index 17df9e672dc..ba33f2b8995 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -74,7 +74,7 @@ class Target extends CommonObject * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * 'label' the translation key. * 'picto' is code of a picto to show before value in forms - * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or 'isModEnabled("multicurrency")' ...) * 'position' is the sort order of field. * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) @@ -105,6 +105,8 @@ class Target extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'index'=>1, 'searchall'=>1, 'validate'=>'1', 'comment'=>"Reference of object"), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>"Help text", 'showoncombobox'=>'2', 'validate'=>'1',), + 'url' => array('type'=>'varchar(255)', 'label'=>'Url', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,), + 'trigger_codes' => array('type'=>'text', 'label'=>'TriggerCodes', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'help'=>"TriggerCodeInfo",), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',), @@ -113,9 +115,7 @@ class Target extends CommonObject 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), - 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>3, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validé', '9'=>'Annulé'), 'validate'=>'1',), - 'url' => array('type'=>'varchar(255)', 'label'=>'Url', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,), - 'trigger_codes' => array('type'=>'text', 'label'=>'TriggerCodes', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1, 'help'=>"TriggerCodeInfo",), + 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'), 'validate'=>'1',), ); public $rowid; public $ref; @@ -184,7 +184,7 @@ class Target extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { $this->fields['rowid']['visible'] = 0; } - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { $this->fields['entity']['enabled'] = 0; } @@ -507,8 +507,8 @@ class Target extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->target->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->target->target_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->target->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->target->target_advance->validate)))) { $this->error='NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); @@ -625,8 +625,8 @@ class Target extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->webhook_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->webhook_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -649,8 +649,8 @@ class Target extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->webhook_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->webhook_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -673,8 +673,8 @@ class Target extends CommonObject return 0; } - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->webhook->webhook_advance->validate)))) + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->webhook->webhook_advance->validate)))) { $this->error='Permission denied'; return -1; @@ -833,7 +833,7 @@ class Target extends CommonObject // phpcs:enable if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - //$langs->load("webhook@webhook"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); @@ -928,7 +928,6 @@ class Target extends CommonObject public function getNextNumRef() { global $langs, $conf; - $langs->load("webhook@webhook"); if (empty($conf->global->WEBHOOK_TARGET_ADDON)) { $conf->global->WEBHOOK_TARGET_ADDON = 'mod_target_standard'; @@ -993,8 +992,6 @@ class Target extends CommonObject $result = 0; $includedocgeneration = 0; - $langs->load("webhook@webhook"); - if (!dol_strlen($modele)) { $modele = 'standard_target'; diff --git a/htdocs/webhook/lib/webhook.lib.php b/htdocs/webhook/lib/webhook.lib.php index 6c511180b6e..6c48eccfdf8 100644 --- a/htdocs/webhook/lib/webhook.lib.php +++ b/htdocs/webhook/lib/webhook.lib.php @@ -1,5 +1,5 @@ +/* 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 @@ -30,8 +30,6 @@ function webhookAdminPrepareHead() { global $langs, $conf; - $langs->load("webhook@webhook"); - $h = 0; $head = array(); $head[$h][0] = dol_buildpath("/admin/webhook.php", 1); diff --git a/htdocs/webhook/lib/webhook_target.lib.php b/htdocs/webhook/lib/webhook_target.lib.php index fb01a8f95aa..da342da0065 100644 --- a/htdocs/webhook/lib/webhook_target.lib.php +++ b/htdocs/webhook/lib/webhook_target.lib.php @@ -1,5 +1,5 @@ * * 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 @@ -30,8 +30,6 @@ function targetPrepareHead($object) { global $db, $langs, $conf; - $langs->load("webhook@webhook"); - $h = 0; $head = array(); @@ -40,49 +38,6 @@ function targetPrepareHead($object) $head[$h][2] = 'card'; $h++; - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { - $nbNote = 0; - if (!empty($object->note_private)) { - $nbNote++; - } - if (!empty($object->note_public)) { - $nbNote++; - } - $head[$h][0] = dol_buildpath('/webhook/target_note.php', 1).'?id='.$object->id; - $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) { - $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.$nbNote.'' : ''); - } - $head[$h][2] = 'note'; - $h++; - } - - /*require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->webhook->dir_output."/target/".dol_sanitizeFileName($object->ref); - $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = dol_buildpath("/webhook/target_document.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) { - $head[$h][1] .= ''.($nbFiles + $nbLinks).''; - } - $head[$h][2] = 'document'; - $h++;*/ - - /*$head[$h][0] = dol_buildpath("/webhook/target_agenda.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Events"); - $head[$h][2] = 'agenda'; - $h++;*/ - - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - //$this->tabs = array( - // 'entity:+tabname:Title:@webhook:/webhook/mypage.php?id=__ID__' - //); // to add new tab - //$this->tabs = array( - // 'entity:-tabname:Title:@webhook:/webhook/mypage.php?id=__ID__' - //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'target@webhook'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'target@webhook', 'remove'); diff --git a/htdocs/webhook/target_agenda.php b/htdocs/webhook/target_agenda.php index 12b6e67c57b..17b9842c238 100644 --- a/htdocs/webhook/target_agenda.php +++ b/htdocs/webhook/target_agenda.php @@ -1,6 +1,5 @@ - * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,72 +16,22 @@ */ /** - * \file target_agenda.php - * \ingroup webhook - * \brief Tab of events on Target + * \file htdocs/webhook/target_agenda.php + * \ingroup webhook + * \brief Tab of events on Target */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/webhook/class/target.class.php'); -dol_include_once('/webhook/lib/webhook_target.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/webhook/class/target.class.php'; +require_once DOL_DOCUMENT_ROOT.'/webhook/lib/webhook_target.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("webhook@webhook", "other")); +$langs->loadLangs(array('other')); // Get parameters $id = GETPOST('id', 'int'); @@ -99,6 +48,7 @@ if (GETPOST('actioncode', 'array')) { } else { $actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } + $search_agenda_label = GETPOST('search_agenda_label'); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -106,8 +56,9 @@ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { + // If $page is not defined, or '' or -1 $page = 0; -} // If $page is not defined, or '' or -1 +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -123,6 +74,7 @@ $object = new Target($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('targetagenda', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -148,8 +100,9 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->webhook->enabled)) accessforbidden(); -if (!$permissiontoread) accessforbidden(); +if (!isModEnabled('webhook') || !$permissiontoread) { + accessforbidden(); +} /* @@ -186,11 +139,11 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) { + if (isModEnabled('notification')) { $langs->load("mails"); } $head = targetPrepareHead($object); @@ -210,7 +163,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) { + if (isModEnabled('projet')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -230,7 +183,7 @@ if ($object->id > 0) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -279,7 +232,7 @@ if ($object->id > 0) { print '
    '; - if (!empty($conf->agenda->enabled)) { + if (isModEnabled('agenda')) { if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print ''.$langs->trans("AddAction").''; } else { @@ -289,7 +242,7 @@ if ($object->id > 0) { print '
    '; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); diff --git a/htdocs/webhook/target_card.php b/htdocs/webhook/target_card.php index 1e1f6522ea1..83f2008703f 100644 --- a/htdocs/webhook/target_card.php +++ b/htdocs/webhook/target_card.php @@ -1,6 +1,5 @@ - * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,64 +16,13 @@ */ /** - * \file target_card.php - * \ingroup webhook - * \brief Page to create/edit/view target + * \file target_card.php + * \ingroup webhook + * \brief Page to create/edit/view target */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification -//if (! defined('NOSESSION')) define('NOSESSION', '1'); // Disable session - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -82,7 +30,7 @@ dol_include_once('/webhook/class/target.class.php'); dol_include_once('/webhook/lib/webhook_target.lib.php'); // Load translation files required by the page -$langs->loadLangs(array("webhook@webhook", "other")); +$langs->loadLangs(array('other')); // Get parameters $id = GETPOST('id', 'int'); @@ -122,6 +70,7 @@ if (empty($action) && empty($id) && empty($ref)) { // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +// Permissions // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks $enablepermissioncheck = 0; @@ -211,8 +160,6 @@ if (empty($reshook)) { /* * View - * - * Put here all code to build page */ $form = new Form($db); @@ -242,7 +189,7 @@ llxHeader('', $title, $help_url); // Part to create if ($action == 'create') { if (empty($permissiontoadd)) { - accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); + accessforbidden('NotEnoughPermissions', 0, 1); exit; } @@ -344,7 +291,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation of action xxxx (You can use it for xxx = 'close', xxx = 'reopen', ...) if ($action == 'xxx') { $text = $langs->trans('ConfirmActionTarget', $object->ref); - /*if (! empty($conf->notification->enabled)) + /*if (isModEnabled('notification')) { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); @@ -391,7 +338,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) { + if (isModEnabled('projet')) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { @@ -409,7 +356,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); @@ -510,25 +457,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { // Send - if (empty($user->socid)) { - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); - } + /*if (empty($user->socid)) { + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); + }*/ - // Back to draft + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); + + // Disable if ($object->status == $object::STATUS_VALIDATED) { - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); + print dolGetButtonAction('', $langs->trans('Disable'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); } - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); - - // Validate + // Enable if ($object->status == $object::STATUS_DRAFT) { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { - print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); - } else { - $langs->load("errors"); - print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0); - } + print dolGetButtonAction('', $langs->trans('Enable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd); } // Clone @@ -552,65 +494,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ // Delete (need delete permission, or if draft, just need create/modify permission) - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete); } print ''."\n"; } - - - // Select mail models is same action as presend - if (GETPOST('modelselected')) { - $action = 'presend'; - } - - if ($action != 'presend') { - print '
    '; - print ''; // ancre - - $includedocgeneration = 0; - - // Documents - if ($includedocgeneration) { - $objref = dol_sanitizeFileName($object->ref); - $relativepath = $objref.'/'.$objref.'.pdf'; - $filedir = $conf->webhook->dir_output.'/'.$object->element.'/'.$objref; - $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content - $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('webhook:Target', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); - } - - // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('target')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - - - print '
    '; - - $MAXEVENT = 10; - - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', dol_buildpath('/webhook/target_agenda.php', 1).'?id='.$object->id); - - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); - - print '
    '; - } - - //Select mail models is same action as presend - if (GETPOST('modelselected')) { - $action = 'presend'; - } - - // Presend form - $modelmail = 'target'; - $defaulttopic = 'InformationMessage'; - $diroutput = $conf->webhook->dir_output; - $trackid = 'target'.$object->id; - - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } // End of page diff --git a/htdocs/webhook/target_contact.php b/htdocs/webhook/target_contact.php index 94c906969aa..8b6160becbb 100644 --- a/htdocs/webhook/target_contact.php +++ b/htdocs/webhook/target_contact.php @@ -1,6 +1,5 @@ - * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,54 +16,25 @@ */ /** - * \file target_contact.php - * \ingroup webhook - * \brief Tab for contacts linked to Target + * \file htdocs/webhook/target_contact.php + * \ingroup webhook + * \brief Tab for contacts linked to Target */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -dol_include_once('/webhook/class/target.class.php'); -dol_include_once('/webhook/lib/webhook_target.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/webhook/class/target.class.php'; +require_once DOL_DOCUMENT_ROOT.'/webhook/lib/webhook_target.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("webhook@webhook", "companies", "other", "mails")); +$langs->loadLangs(array('companies', 'other', 'mails')); -$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility -$ref = GETPOST('ref', 'alpha'); +$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); -$socid = GETPOST('socid', 'int'); +$socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'aZ09'); // Initialize technical objects @@ -72,12 +42,14 @@ $object = new Target($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('targetcontact', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $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 +// Permissions // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks $enablepermissioncheck = 0; @@ -94,8 +66,9 @@ if ($enablepermissioncheck) { //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->webhook->enabled)) accessforbidden(); -if (!$permissiontoread) accessforbidden(); +if (!isModEnabled('webhook') || !$permissiontoread) { + accessforbidden(); +} /* @@ -173,7 +146,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) + if (isModEnabled('projet')) { $langs->load("projects"); $morehtmlref.='
    '.$langs->trans('Project') . ' '; @@ -194,7 +167,7 @@ if ($object->id) { $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)) { + if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); $morehtmlref .= ': '.$proj->getNomUrl(); diff --git a/htdocs/webhook/target_list.php b/htdocs/webhook/target_list.php index e62969e62ea..1db73639103 100644 --- a/htdocs/webhook/target_list.php +++ b/htdocs/webhook/target_list.php @@ -17,89 +17,42 @@ */ /** - * \file target_list.php - * \ingroup webhook - * \brief List page for target + * \file htdocs/webhook/target_list.php + * \ingroup webhook + * \brief List page for target */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//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). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification -//if (! defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions - // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +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'; // load webhook libraries -require_once __DIR__.'/class/target.class.php'; +require_once DOL_DOCUMENT_ROOT.'/webhook/class/target.class.php'; // for other modules //dol_include_once('/othermodule/class/otherobject.class.php'); // Load translation files required by the page -$langs->loadLangs(array("webhook@webhook", "other")); +$langs->loadLangs(array('other')); -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'targetlist'; // 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') -$mode = GETPOST('mode', 'aZ'); +// Get Parameters +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : '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') : 'targetlist'; // 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') +$mode = GETPOST('mode', 'aZ'); +if (empty($mode)) { + $mode = 'modulesetup'; +} -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -171,6 +124,7 @@ foreach ($object->fields as $key => $val) { ); } } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -178,6 +132,7 @@ $object->fields = dol_sort_array($object->fields, 'position'); //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Permissions // There is several ways to check permission. // Set $enablepermissioncheck to 1 to enable a minimum low level of checks $enablepermissioncheck = 0; @@ -259,6 +214,7 @@ $now = dol_now(); //$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target"; $help_url = ''; $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets")); + $morejs = array(); $morecss = array(); @@ -374,7 +330,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { } }*/ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); $resql = $db->query($sqlforcount); $objforcount = $db->fetch_object($resql); $nbtotalofrecords = $objforcount->nbtotalofrecords; diff --git a/htdocs/webhook/webhookindex.php b/htdocs/webhook/webhookindex.php index e62c5e3ddae..47f6b42e776 100644 --- a/htdocs/webhook/webhookindex.php +++ b/htdocs/webhook/webhookindex.php @@ -25,44 +25,12 @@ */ // Load Dolibarr environment -$res = 0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { - $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -} -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { - $i--; $j--; -} -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { - $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -} -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { - $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; -} -// Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) { - $res = @include "../main.inc.php"; -} -if (!$res && file_exists("../../main.inc.php")) { - $res = @include "../../main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { - die("Include of main fails"); -} - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -// Load translation files required by the page -$langs->loadLangs(array("webhook@webhook")); - +// Parameters $action = GETPOST('action', 'aZ09'); - // Security check // if (! $user->rights->webhook->myobject->read) { // accessforbidden(); @@ -100,8 +68,7 @@ print '
    '; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (! empty($conf->webhook->enabled) && $user->rights->webhook->read) -{ +if (!empty($conf->webhook->enabled) && $user->rights->webhook->read) { $langs->load("orders"); $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; @@ -181,7 +148,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject -if (! empty($conf->webhook->enabled) && $user->rights->webhook->read) +if (!empty($conf->webhook->enabled) && $user->rights->webhook->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."webhook_myobject as s"; diff --git a/htdocs/webservices/admin/index.php b/htdocs/webservices/admin/index.php index 14af2e88b3f..30a7c0fb7ce 100644 --- a/htdocs/webservices/admin/index.php +++ b/htdocs/webservices/admin/index.php @@ -24,6 +24,7 @@ * \brief Page to setup webservices module */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -100,15 +101,15 @@ print '

    '; // Webservices list $webservices = array( 'user' => '', - 'thirdparty' => '!empty($conf->societe->enabled)', - 'contact' => '!empty($conf->societe->enabled)', - 'productorservice' => '(!empty($conf->product->enabled) || !empty($conf->service->enabled))', - 'order' => '!empty($conf->commande->enabled)', - 'invoice' => '!empty($conf->facture->enabled)', - 'supplier_invoice' => '!empty($conf->fournisseur->enabled)', - 'actioncomm' => '!empty($conf->agenda->enabled)', - 'category' => '!empty($conf->categorie->enabled)', - 'project' => '!empty($conf->project->enabled)', + 'thirdparty' => 'isModEnabled("societe")', + 'contact' => 'isModEnabled("societe")', + 'productorservice' => '(isModEnabled("product") || isModEnabled("service"))', + 'order' => 'isModEnabled("commande")', + 'invoice' => 'isModEnabled("facture")', + 'supplier_invoice' => 'isModEnabled("fournisseur")', + 'actioncomm' => 'isModEnabled("agenda")', + 'category' => 'isModEnabled("categorie")', + 'project' => 'isModEnabled("project")', 'other' => '' ); @@ -140,21 +141,10 @@ print '
    '; print '
    '; print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php'); -if (!empty($conf->use_javascript_ajax)) { - print "\n".''; -} +$constname = 'WEBSERVICES_KEY'; + +print dolJSToSetRandomPassword($constname); + // End of page llxFooter(); diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index 73769d43cec..65357174019 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -183,7 +183,6 @@ $order_fields = array( 'ref' => array('name'=>'ref', 'type'=>'xsd:string'), 'ref_client' => array('name'=>'ref_client', 'type'=>'xsd:string'), 'ref_ext' => array('name'=>'ref_ext', 'type'=>'xsd:string'), - 'ref_int' => array('name'=>'ref_int', 'type'=>'xsd:string'), 'thirdparty_id' => array('name'=>'thirdparty_id', 'type'=>'xsd:int'), 'status' => array('name'=>'status', 'type'=>'xsd:int'), 'billed' => array('name'=>'billed', 'type'=>'xsd:string'), @@ -438,7 +437,6 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') 'ref' => $order->ref, 'ref_client' => $order->ref_client, 'ref_ext' => $order->ref_ext, - 'ref_int' => $order->ref_int, 'thirdparty_id' => $order->socid, 'status' => $order->statut, @@ -593,7 +591,6 @@ function getOrdersForThirdParty($authentication, $idthirdparty) 'ref' => $order->ref, 'ref_client' => $order->ref_client, 'ref_ext' => $order->ref_ext, - 'ref_int' => $order->ref_int, 'socid' => $order->socid, 'status' => $order->statut, diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index d512b0d27bc..9672fa1b4fc 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -398,7 +398,7 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') */ function getListOfGroups($authentication) { - global $db, $conf; + global $db, $conf, $user; dol_syslog("Function: getListOfGroups login=".$authentication['login']); @@ -418,7 +418,7 @@ function getListOfGroups($authentication) $sql = "SELECT g.rowid, g.nom as name, g.entity, g.datec, COUNT(DISTINCT ugu.fk_user) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; - if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($fuser->admin && !$fuser->entity))) { + if (isModEnabled('multicompany') && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { $sql .= " WHERE g.entity IS NOT NULL"; } else { $sql .= " WHERE g.entity IN (0,".$conf->entity.")"; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index c7687b8101f..9cc470a5954 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -30,6 +30,7 @@ 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 Website */ @@ -50,6 +51,10 @@ class Website extends CommonObject */ public $ismultientitymanaged = 1; + + protected $childtablesoncascade = array(); + + /** * @var string String with name of icon for website. Must be the part after the 'object_' into object_myobject.png */ @@ -146,10 +151,10 @@ class Website extends CommonObject /** * Create object into database * - * @param User $user User that creates - * @param bool $notrigger false=launch triggers after, true=disable triggers + * @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 + * @return int <0 if KO, 0 if already exists, ID of created object if OK */ public function create(User $user, $notrigger = false) { @@ -277,8 +282,11 @@ class Website extends CommonObject // Commit or rollback if ($error) { $this->db->rollback(); - - return -1 * $error; + if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + return 0; + } else { + return -1 * $error; + } } else { $this->db->commit(); @@ -580,8 +588,8 @@ class Website extends CommonObject /** * Delete object in database * - * @param User $user User that deletes - * @param bool $notrigger false=launch triggers after, true=disable triggers + * @param User $user User that deletes + * @param bool $notrigger false=launch triggers, true=disable triggers * * @return int <0 if KO, >0 if OK */ @@ -596,20 +604,8 @@ class Website extends CommonObject $this->db->begin(); if (!$error) { - if (!$notrigger) { - // Uncomment this and change WEBSITE to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('WEBSITE_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - } - } - - if (!$error) { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.((int) $this->id); + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'website_page'; + $sql .= ' WHERE fk_website = '.((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -619,6 +615,12 @@ class Website extends CommonObject } } + // Delete common code. This include execution of trigger. + $result = $this->deleteCommon($user, $notrigger); + if ($result <= 0) { + $error++; + } + if (!$error && !empty($this->ref)) { $pathofwebsite = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/'.$this->ref; @@ -876,10 +878,10 @@ class Website extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online'); } $statusType = 'status5'; @@ -977,8 +979,16 @@ class Website extends CommonObject $srcdir = $conf->website->dir_output.'/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/containers'; - dol_syslog("Copy content from ".$srcdir." into ".$destdir); - dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2); + dol_syslog("Copy pages from ".$srcdir." into ".$destdir); + dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2, array('old', 'back')); + + // Copy file README.md and LICENSE from directory containers into directory root + if (dol_is_file($conf->website->dir_temp.'/'.$website->ref.'/containers/README.md')) { + dol_copy($conf->website->dir_temp.'/'.$website->ref.'/containers/README.md', $conf->website->dir_temp.'/'.$website->ref.'/README.md'); + } + if (dol_is_file($conf->website->dir_temp.'/'.$website->ref.'/containers/LICENSE')) { + dol_copy($conf->website->dir_temp.'/'.$website->ref.'/containers/LICENSE', $conf->website->dir_temp.'/'.$website->ref.'/LICENSE'); + } // Copy files into medias/image $srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref; @@ -996,10 +1006,14 @@ class Website extends CommonObject // Make some replacement into some files $cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php'; - dolReplaceInFile($cssindestdir, $arrayreplacementincss); + if (dol_is_file($cssindestdir)) { + dolReplaceInFile($cssindestdir, $arrayreplacementincss); + } $htmldeaderindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/htmlheader.html'; - dolReplaceInFile($htmldeaderindestdir, $arrayreplacementincss); + if (dol_is_file($htmldeaderindestdir)) { + dolReplaceInFile($htmldeaderindestdir, $arrayreplacementincss); + } // Build sql file $filesql = $conf->website->dir_temp.'/'.$website->ref.'/website_pages.sql'; @@ -1035,7 +1049,10 @@ class Website extends CommonObject $allaliases = $objectpageold->pageurl; $allaliases .= ($objectpageold->aliasalt ? ','.$objectpageold->aliasalt : ''); - $line = '-- Page ID '.$objectpageold->id.' -> '.$objectpageold->newid.'__+MAX_llx_website_page__ - Aliases '.$allaliases.' --;'; // newid start at 1, 2... + $line = '-- File generated by Dolibarr '.DOL_VERSION.' -- '.dol_print_date(dol_now('gmt'), 'standard', 'gmt').' UTC --;'; + $line .= "\n"; + + $line .= '-- Page ID '.$objectpageold->id.' -> '.$objectpageold->newid.'__+MAX_llx_website_page__ - Aliases '.$allaliases.' --;'; // newid start at 1, 2... $line .= "\n"; fputs($fp, $line); @@ -1060,29 +1077,35 @@ class Website extends CommonObject $line .= "'".$this->db->escape($objectpageold->grabbed_from)."', "; $line .= "'".$this->db->escape($objectpageold->type_container)."', "; + // Make substitution with a generic path into htmlheader content $stringtoexport = $objectpageold->htmlheader; $stringtoexport = str_replace(array("\r\n", "\r", "\n"), "__N__", $stringtoexport); $stringtoexport = str_replace('file=image/'.$website->ref.'/', "file=image/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('file=js/'.$website->ref.'/', "file=js/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('medias/image/'.$website->ref.'/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('medias/js/'.$website->ref.'/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); + $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo_small, "file=logos%2Fthumbs%2F__LOGO_SMALL_KEY__", $stringtoexport); $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo_mini, "file=logos%2Fthumbs%2F__LOGO_MINI_KEY__", $stringtoexport); $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo, "file=logos%2Fthumbs%2F__LOGO_KEY__", $stringtoexport); $line .= "'".$this->db->escape(str_replace(array("\r\n", "\r", "\n"), "__N__", $stringtoexport))."', "; // Replace \r \n to have record on 1 line + // Make substitution with a generic path into page content $stringtoexport = $objectpageold->content; $stringtoexport = str_replace(array("\r\n", "\r", "\n"), "__N__", $stringtoexport); $stringtoexport = str_replace('file=image/'.$website->ref.'/', "file=image/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('file=js/'.$website->ref.'/', "file=js/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('medias/image/'.$website->ref.'/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); $stringtoexport = str_replace('medias/js/'.$website->ref.'/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); + $stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content + $stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content + $stringtoexport = str_replace('"js/'.$website->ref.'/', '"js/__WEBSITE_KEY__/', $stringtoexport); + $stringtoexport = str_replace('"/js/'.$website->ref.'/', '"/js/__WEBSITE_KEY__/', $stringtoexport); + $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo_small, "file=logos%2Fthumbs%2F__LOGO_SMALL_KEY__", $stringtoexport); $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo_mini, "file=logos%2Fthumbs%2F__LOGO_MINI_KEY__", $stringtoexport); $stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo, "file=logos%2Fthumbs%2F__LOGO_KEY__", $stringtoexport); - // When we have a link src="image/websiteref/file.png" into html content - $stringtoexport = str_replace('="image/'.$website->ref.'/', '="image/__WEBSITE_KEY__/', $stringtoexport); $line .= "'".$this->db->escape($stringtoexport)."', "; // Replace \r \n to have record on 1 line $line .= "'".$this->db->escape($objectpageold->author_alias)."', "; @@ -1134,7 +1157,7 @@ class Website extends CommonObject /** * Open a zip with all data of web site and load it into database. * - * @param string $pathtofile Path of zip file + * @param string $pathtofile Full path of zip file * @return int <0 if KO, Id of new website if OK */ public function importWebSite($pathtofile) @@ -1143,6 +1166,8 @@ class Website extends CommonObject $error = 0; + $pathtofile = dol_sanitizePathName($pathtofile); + $object = $this; if (empty($object->ref)) { $this->error = 'Function importWebSite called on object not loaded (object->ref is empty)'; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 51ea6998d59..d04608387cb 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -838,10 +838,10 @@ class WebsitePage extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Disabled'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Offline'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Online'); } $statusType = 'status5'; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 65a4bdc92a6..6e4d96880fb 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2016-2022 Laurent Destailleur * Copyright (C) 2020 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -30,6 +30,7 @@ if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); //header('X-XSS-Protection:0'); // Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated. +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -45,8 +46,10 @@ require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +// Load translation files required by the page $langs->loadLangs(array("admin", "other", "website", "errors")); +// Security check if (!$user->rights->website->read) { accessforbidden(); } @@ -77,6 +80,7 @@ $type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha'); $section_dir = GETPOST('section_dir', 'alpha'); $file_manager = GETPOST('file_manager', 'alpha'); $replacesite = GETPOST('replacesite', 'alpha'); +$mode = GETPOST('mode', 'alpha'); if (GETPOST('deletesite', 'alpha')) { $action = 'deletesite'; @@ -127,7 +131,7 @@ if (empty($action) && $file_manager) { $action = 'file_manager'; } if (empty($action) && $replacesite) { - $action = 'replacesite'; + $mode = 'replacesite'; } if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x')) { $pageid = 0; @@ -240,6 +244,7 @@ $fileindex = $pathofwebsite.'/index.php'; $filewrapper = $pathofwebsite.'/wrapper.php'; $filemanifestjson = $pathofwebsite.'/manifest.json.php'; $filereadme = $pathofwebsite.'/README.md'; +$filelicense = $pathofwebsite.'/LICENSE'; $filemaster = $pathofwebsite.'/master.inc.php'; // Define $urlwithroot @@ -248,7 +253,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current -$permtouploadfile = $user->rights->website->write; +$permtouploadfile = $user->hasRight('website', 'write'); $diroutput = $conf->medias->multidir_output[$conf->entity]; $relativepath = $section_dir; @@ -259,9 +264,6 @@ $htmlheadercontentdefault .= 'setStatut($website::STATUS_VALIDATED, null, '', 'WEBSITE_MODIFY', 'status'); + + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('websitepage', 'int')); + exit; +} +if ($action == 'setwebsiteoffline') { + $result = $website->setStatut($website::STATUS_DRAFT, null, '', 'WEBSITE_MODIFY', 'status'); + + header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('websitepage', 'int')); + exit; +} if ($action == 'seteditinline') { dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1); setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'warnings'); @@ -442,10 +457,39 @@ if ($action == 'unsetshowsubcontainers') { } if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && !$searchkey) { - $action = 'replacesite'; + $mode = 'replacesite'; $massaction = ''; } +if ($action == 'deletetemplate') { + $dirthemes = array('/doctemplates/websites'); + if (!empty($conf->modules_parts['websitetemplates'])) { // Using this feature slow down application + foreach ($conf->modules_parts['websitetemplates'] as $reldir) { + $dirthemes = array_merge($dirthemes, (array) ($reldir.'doctemplates/websites')); + } + } + $dirthemes = array_unique($dirthemes); + + + // Delete template files and dir + $mode = 'importsite'; + $action = 'importsite'; + + if (count($dirthemes)) { + $i = 0; + foreach ($dirthemes as $dir) { + //print $dirroot.$dir;exit; + $dirtheme = DOL_DATA_ROOT.$dir; // This include loop on $conf->file->dol_document_root + if (is_dir($dirtheme)) { + $templateuserfile = GETPOST('templateuserfile'); + $imguserfile = preg_replace('/\.zip$/', '', $templateuserfile).'.jpg'; + dol_delete_file($dirtheme.'/'.$templateuserfile); + dol_delete_file($dirtheme.'/'.$imguserfile); + } + } + } +} + // Set category if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { $error = 0; @@ -453,7 +497,7 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us $db->begin(); - $categoryid = GETPOST('setcategory', 'restricthtml'); + $categoryid = GETPOST('setcategory', 'int'); if ($categoryid > 0) { $tmpwebsitepage = new WebsitePage($db); $category = new Categorie($db); @@ -485,11 +529,66 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1); } +// Del category +if ($massaction == 'delcategory' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { + $error = 0; + $nbupdate = 0; + + $db->begin(); + + $categoryid = GETPOST('setcategory', 'int'); + if ($categoryid > 0) { + $tmpwebsitepage = new WebsitePage($db); + $category = new Categorie($db); + $category->fetch($categoryid); + + foreach ($toselect as $tmpid) { + $tmpwebsitepage->id = $tmpid; + $result = $category->del_type($tmpwebsitepage, 'website_page'); + if ($result < 0 && $result != -3) { + $error++; + setEventMessages($category->error, $category->errors, 'errors'); + break; + } else { + $nbupdate++; + } + } + } + + if ($error) { + $db->rollback(); + } else { + if ($nbupdate) { + setEventMessages($langs->trans("RecordsModified", $nbupdate), null, 'mesgs'); + } + + $db->commit(); + } + // Now we reload list + $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1); +} + // Replacement of string into pages if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { $replacestring = GETPOST('replacestring', 'none'); - if (empty($user->rights->website->writephp)) { + $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); + $allowimportsite = true; + if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) { + $allowimportsite = false; + } + + if (!$allowimportsite) { + // Blocked by installmodules.lock + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean corporate message + $message = $langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'); + } else { + // Show technical generic message + $message = $langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'); + } + setEventMessages($message, null, 'errors'); + } elseif (empty($user->rights->website->writephp)) { setEventMessages("NotAllowedToAddDynamicContent", null, 'errors'); } elseif (!$replacestring) { setEventMessages("ErrorReplaceStringEmpty", null, 'errors'); @@ -587,7 +686,7 @@ if ($action == 'addsite' && $usercanedit) { if (!$error && !GETPOST('WEBSITE_REF', 'alpha')) { $error++; $langs->load("errors"); - setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("WebsiteName")), null, 'errors'); } if (!$error && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST('WEBSITE_REF', 'alpha'))) { $error++; @@ -611,7 +710,10 @@ if ($action == 'addsite' && $usercanedit) { $tmpobject->virtualhost = GETPOST('virtualhost', 'alpha'); $result = $tmpobject->create($user); - if ($result <= 0) { + if ($result == 0) { + $error++; + setEventMessages($langs->trans("ErrorLabelAlreadyExists"), null, 'errors'); + } elseif ($result < 0) { $error++; setEventMessages($tmpobject->error, $tmpobject->errors, 'errors'); } @@ -748,7 +850,6 @@ if ($action == 'addcontainer' && $usercanedit) { $objectpage->content = preg_replace('/^.*]*)*>/ims', '', $objectpage->content); $objectpage->content = preg_replace('/<\/body(\s[^>]*)*>.*$/ims', '', $objectpage->content); - $absoluteurlinaction = $urltograbdirwithoutslash; // TODO Replace 'action="$urltograbdirwithoutslash' into action="/" // TODO Replace 'action="$urltograbdirwithoutslash..."' into action="..." // TODO Replace 'a href="$urltograbdirwithoutslash' into a href="/" @@ -828,7 +929,7 @@ if ($action == 'addcontainer' && $usercanedit) { $fp = fopen($filetosave, "w"); fputs($fp, $tmpgeturl['content']); fclose($fp); - if (! empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); } */ @@ -897,7 +998,7 @@ if ($action == 'addcontainer' && $usercanedit) { //$fp = fopen($filetosave, "w"); //fputs($fp, $tmpgeturl['content']); //fclose($fp); - //if (! empty($conf->global->MAIN_UMASK)) + //if (!empty($conf->global->MAIN_UMASK)) // @chmod($file, octdec($conf->global->MAIN_UMASK)); // $filename = 'image/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $linkwithoutdomain)?'':'/').$linkwithoutdomain; @@ -905,7 +1006,7 @@ if ($action == 'addcontainer' && $usercanedit) { getAllImages($object, $objectpage, $urltograbbis, $tmpgeturl['content'], $action, 1, $grabimages, $grabimagesinto); - // We try to convert the CSS we got by adding a prefix .bodywebsite with lessc to avoid conflicit with CSS of Dolibarr. + // We try to convert the CSS we got by adding a prefix .bodywebsite with lessc to avoid conflict with CSS of Dolibarr. include_once DOL_DOCUMENT_ROOT.'/core/class/lessc.class.php'; $lesscobj = new Lessc(); try { @@ -1189,6 +1290,11 @@ if ($action == 'addcontainer' && $usercanedit) { $result = dolSaveReadme($filereadme, $readmecontent); } + if (!dol_is_file($filelicense)) { + $licensecontent = "MIT License"; + $result = dolSaveLicense($filelicense, $licensecontent); + } + $action = 'preview'; } } @@ -1230,7 +1336,7 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete) exit; } else { $db->rollback(); - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1308,7 +1414,7 @@ if (!GETPOSTISSET('pageid')) { } if ($action == 'delete') { - $action = 'replacesiteconfirm'; + $mode = 'replacesite'; $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; $langcode = GETPOST('optionlanguage', 'aZ09'); @@ -1667,6 +1773,43 @@ if ($action == 'updatecss' && $usercanedit) { $error++; } + $dataposted = trim(GETPOST('WEBSITE_LICENSE', 'restricthtml')); + $dataposted = str_replace('\n";*/ + + $licensecontent .= $dataposted."\n"; + + /*$readmecontent.= '"."\n";*/ + + $result = dolSaveLicense($filelicense, $licensecontent); + if (!$result) { + $error++; + setEventMessages('Failed to write file '.$filelicense, null, 'errors'); + } + } else { + $error++; + } // Save wrapper.php $result = dolSaveIndexPage($pathofwebsite, '', '', $filewrapper, $object); @@ -2250,76 +2393,101 @@ if ($action == 'regeneratesite' && $usercanedit) { // Import site if ($action == 'importsiteconfirm' && $usercanedit) { - if (empty($_FILES) && !GETPOSTISSET('templateuserfile')) { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); - $action = 'importsite'; - } else { - if (!empty($_FILES) || GETPOSTISSET('templateuserfile')) { - // Check symlink to medias and restore it if ko. Recreate also dir of website if not found. - $pathtomedias = DOL_DATA_ROOT.'/medias'; - $pathtomediasinwebsite = $pathofwebsite.'/medias'; - if (!is_link(dol_osencode($pathtomediasinwebsite))) { - dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); - dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists - $result = symlink($pathtomedias, $pathtomediasinwebsite); - if (!$result) { - setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); - $action = 'importsite'; - } - } + $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); + $allowimportsite = true; + if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) { + $allowimportsite = false; + } - $fileofzip = ''; - if (GETPOSTISSET('templateuserfile')) { - $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); - } elseif (!empty($_FILES)) { - if (is_array($_FILES['userfile']['tmp_name'])) { - $userfiles = $_FILES['userfile']['tmp_name']; - } else { - $userfiles = array($_FILES['userfile']['tmp_name']); + if ($allowimportsite) { + if (empty($_FILES) && !GETPOSTISSET('templateuserfile')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); + $action = 'importsite'; + } else { + if (!empty($_FILES) || GETPOSTISSET('templateuserfile')) { + // Check symlink to medias and restore it if ko. Recreate also dir of website if not found. + $pathtomedias = DOL_DATA_ROOT.'/medias'; + $pathtomediasinwebsite = $pathofwebsite.'/medias'; + if (!is_link(dol_osencode($pathtomediasinwebsite))) { + dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); + dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists + $result = symlink($pathtomedias, $pathtomediasinwebsite); + if (!$result) { + setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); + $action = 'importsite'; + } } - foreach ($userfiles as $key => $userfile) { - if (empty($_FILES['userfile']['tmp_name'][$key])) { - $error++; - if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { - setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); - $action = 'importsite'; - } else { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); - $action = 'importsite'; + $fileofzip = ''; + if (GETPOSTISSET('templateuserfile')) { + // Case we selected one template + $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() + } elseif (!empty($_FILES)) { + // Case we upload a new template + if (is_array($_FILES['userfile']['tmp_name'])) { + $userfiles = $_FILES['userfile']['tmp_name']; + } else { + $userfiles = array($_FILES['userfile']['tmp_name']); + } + + // Check if $_FILES is ok + foreach ($userfiles as $key => $userfile) { + if (empty($_FILES['userfile']['tmp_name'][$key])) { + $error++; + if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { + setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); + $action = 'importsite'; + } else { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); + $action = 'importsite'; + } } } - } - if (!$error) { - $upload_dir = $conf->website->dir_temp; - $result = dol_add_file_process($upload_dir, 1, -1, 'userfile', ''); - } - - // Get name of file (take last one if several name provided) - $fileofzip = $upload_dir.'/unknown'; - foreach ($_FILES as $key => $ifile) { - foreach ($ifile['name'] as $key2 => $ifile2) { - $fileofzip = $upload_dir.'/'.$ifile2; + if (!$error) { + //$upload_dir = $conf->website->dir_temp; + $upload_dir = DOL_DATA_ROOT.'/doctemplates/websites/'; + $result = dol_add_file_process($upload_dir, 1, -1, 'userfile', ''); } - } - } - if (!$error) { - $result = $object->importWebSite($fileofzip); + // Get name of file (take last one if several name provided) + /* + $fileofzip = $upload_dir.'/unknown'; + foreach ($_FILES as $key => $ifile) { + foreach ($ifile['name'] as $key2 => $ifile2) { + $fileofzip = $upload_dir.'/'.$ifile2; + } + } + */ - if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); $action = 'importsite'; - } else { - // Force mode dynamic on - dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1, 'chaine', 0, '', $conf->entity); + } - header("Location: ".$_SERVER["PHP_SELF"].'?website='.$object->ref); - exit(); + if (!$error && GETPOSTISSET('templateuserfile')) { + $result = $object->importWebSite($fileofzip); + + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'importsite'; + } else { + // Force mode dynamic on + dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1, 'chaine', 0, '', $conf->entity); + + header("Location: ".$_SERVER["PHP_SELF"].'?website='.$object->ref); + exit(); + } } } } + } else { + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean corporate message + $message = $langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'); + } else { + // Show technical generic message + $message = $langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'); + } + setEventMessages($message, null, 'errors'); } } @@ -2555,7 +2723,7 @@ $moreheadjs .= ''."\n"; -llxHeader($moreheadcss.$moreheadjs, $langs->trans("WebsiteSetup"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss, '', '', ''."\n".'
    '); +llxHeader($moreheadcss.$moreheadjs, $langs->trans("Website").(empty($website->ref) ? '' : ' - '.$website->ref), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss, '', '', ''."\n".'
    '); print "\n"; print ''."\n"; @@ -2597,11 +2765,8 @@ if ($action == 'importsite') { if ($action == 'file_manager') { print ''; } -if ($action == 'replacesite') { - print ''; -} -if ($action == 'replacesiteconfirm') { - print ''; +if ($mode) { + print ''; } print '
    '; @@ -2641,6 +2806,11 @@ if (!GETPOST('hide_websitemenu')) { } $atleastonepage = (is_array($array) && count($array) > 0); + $websitepage = new WebSitePage($db); + if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')) { + $websitepage->fetch($pageid); + } + //var_dump($objectpage);exit; print '
    '; @@ -2649,30 +2819,27 @@ if (!GETPOST('hide_websitemenu')) { // Toolbar for websites // - print ''; + print ''; if ($action != 'file_manager') { - print ''; + print '
    '; print $langs->trans("Website").': '; + print '
    '; + + // Button Add new website + $urltocreatenewwebsite = $_SERVER["PHP_SELF"].'?action=createsite'; + print ''; + print ''; print ''; - $urltocreatenewwebsite = $_SERVER["PHP_SELF"].'?action=createsite'; - if (empty($conf->use_javascript_ajax)) { - print ''; - print ''; - print ''; - } - // List of website - print ''; + print ''; + $out = ''; $out .= ''; + print ''; + + // Switch offline/onine + if (!empty($conf->use_javascript_ajax)) { + print ''; + // Do not use ajax, we need a refresh of full page when we change status of a website + //print '
    '; + //print ajax_object_onoff($object, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle', 'statuswebsite'); + //print '
    '; + if ($website->status == $website::STATUS_DRAFT) { + $text_off = 'Offline'; + print 'ref).'&websitepage='.((int) $websitepage->id).'">'.img_picto($langs->trans($text_off), 'switch_off').''; + } else { + $text_off = 'Online'; + print 'ref).'&websitepage='.((int) $websitepage->id).'">'.img_picto($langs->trans($text_off), 'switch_on').''; + } + print '
    '; } + // Refresh / Reload web site (for non javascript browers) + if (empty($conf->use_javascript_ajax)) { + print ''; + print ''; + print ''; + } + + + print ''; + if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { - print '   '; - - //print ''; - print ''.dol_escape_htmltag($langs->trans("EditCss")).''; + // Edit website properties + print ''.dol_escape_htmltag($langs->trans("EditCss")).''; + // Import web site $importlabel = $langs->trans("ImportSite"); $exportlabel = $langs->trans("ExportSite"); if (!empty($conf->dol_optimize_smallscreen)) { @@ -2736,17 +2927,23 @@ if (!GETPOST('hide_websitemenu')) { print ''; } - //print ''; + // Export web site print ''; + // Clone web site print ''; // Delete website if ($website->status == $website::STATUS_VALIDATED) { - print ''; + $disabled = ' disabled="disabled"'; + $title = $langs->trans("WebsiteMustBeDisabled", $langs->transnoentitiesnoconv($website->LibStatut(0, 0))); + $url = '#'; } else { - print ''; + $disabled = ''; + $title = $langs->trans("Delete"); + $url = $_SERVER["PHP_SELF"].'?action=deletesite&token='.newToken().'&website='.urlencode($website->ref); } + print ''.img_picto('', 'delete', 'class=""').''.$langs->trans("Delete").''; // Regenerate all pages print 'ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'">'; @@ -2754,7 +2951,8 @@ if (!GETPOST('hide_websitemenu')) { // Generate site map print 'ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'">'; - print 'ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; + // Find / replace tool + print 'ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; } print ''; @@ -2764,7 +2962,7 @@ if (!GETPOST('hide_websitemenu')) { print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '', '/website/index.php?action=file_manager&website='.urlencode($website->ref).'§ion_dir='.urlencode('image/'.$website->ref.'/'), $disabled); - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { //print ''; print dolButtonToOpenUrlInDialogPopup('categories', $langs->transnoentitiesnoconv("Categories"), '', '/categories/index.php?leftmenu=website&nosearch=1&type=website_page&website='.urlencode($website->ref), $disabled); } @@ -2834,7 +3032,7 @@ if (!GETPOST('hide_websitemenu')) { print '
    '; } - if (in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm'))) { + if (in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesiteconfirm')) || in_array($mode, array('replacesite'))) { if ($action == 'editcss') { print ''; } @@ -2855,59 +3053,69 @@ if (!GETPOST('hide_websitemenu')) { // Toolbar for pages // - if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm')) && !$file_manager) { + if ($websitekey && $websitekey != '-1' && (!in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesiteconfirm'))) && (!in_array($mode, array('replacesite'))) && !$file_manager) { print '
    '; // Close current websitebar to open a new one - print ''; + print ''; print '
    '; - print ''; + print '
    '; print $langs->trans("PageContainer").': '; + print '
    '; + + // Button Add new web page + print ''; + print 'ref).'" class=""'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'">'; print ''; - print ''; - print 'ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'">'; - print ''; - //print ''; + $out = ''; - if ($action != 'addcontainer') { - $out = ''; + $s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'minwidth100 maxwidth200onsmartphone'); - $s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); + $out .= ''; + $out .= $s; + $out .= ''; - if ($formwebsite->num > 0) { - $out .= ''; - $out .= $s; - $out .= ''; + $urltocreatenewpage = $_SERVER["PHP_SELF"].'?action=createcontainer&token='.newToken().'&website='.urlencode($website->ref); - $urltocreatenewpage = $_SERVER["PHP_SELF"].'?action=createcontainer&token='.newToken().'&website='.urlencode($website->ref); - - if (!empty($conf->use_javascript_ajax)) { - $out .= ''; - } - } - - print $out; - } else { - print $langs->trans("New"); + if (!empty($conf->use_javascript_ajax)) { + $out .= ''; } + print $out; + + if (!empty($conf->use_javascript_ajax)) { + print ''; + //print '
    '; + if ($object->status == $object::STATUS_DRAFT) { // website is off, we do not allow to change status of page + $text_off = 'SetWebsiteOnlineBefore'; + if ($websitepage->status == $websitepage::STATUS_DRAFT) { // page is off + print ''.img_picto($langs->trans($text_off), 'switch_off').''; + } else { + print ''.img_picto($langs->trans($text_off), 'switch_on').''; + } + } else { + print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage'); + } + //print '
    '; + print '
    '; + } print ''; - print ''; + print ''; // Print nav arrows $pagepreviousid = 0; @@ -2936,23 +3144,18 @@ if (!GETPOST('hide_websitemenu')) { } if ($pagepreviousid) { - print ''.img_previous($langs->trans("PreviousContainer")).''; + print ''.img_previous($langs->trans("PreviousContainer")).''; } else { - print ''.img_previous($langs->trans("Previous")).''; + print ''.img_previous($langs->trans("PreviousContainer")).''; } if ($pagenextid) { - print ''.img_next($langs->trans("NextContainer")).''; + print ''.img_next($langs->trans("NextContainer")).''; } else { - print ''.img_next($langs->trans("Next")).''; + print ''.img_next($langs->trans("NextContainer")).''; } print ''; - $websitepage = new WebSitePage($db); - if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')) { - $websitepage->fetch($pageid); - } - if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite') { $disabled = ''; if (empty($user->rights->website->write)) { @@ -2969,7 +3172,12 @@ if (!GETPOST('hide_websitemenu')) { //array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)) ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWebsite'), '', 'confirm_deletesite', $formquestion, 0, 1, 200); + if ($atleastonepage) { + $langs->load("errors"); + $formquestion[] = array('type' => 'onecolumn', 'value' => '
    '.$langs->trans("WarningPagesWillBeDeleted").'
    '); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWebsite'), '', 'confirm_deletesite', $formquestion, 0, 1, 210 + ($atleastonepage ? 70 : 0), 580); print $formconfirm; } @@ -3025,15 +3233,15 @@ if (!GETPOST('hide_websitemenu')) { print ''; - print '   '; - - //print ''; + // Edit web page properties print ''.dol_escape_htmltag($langs->trans("EditPageMeta")).''; - //print ''; + // Edit HTML content print ''.dol_escape_htmltag($langs->trans($conf->dol_optimize_smallscreen ? "HTML" : "EditHTMLSource")).''; print ''; + + // Switch include dynamic content / edit inline print ''."\n"; print '
    '; @@ -3126,7 +3334,19 @@ if (!GETPOST('hide_websitemenu')) { print 'ref).'&pageid='.((int) $pageid).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'">'; } print ''; - print ''; + + // Delete + //print ''; + if ($websitepage->status == $websitepage::STATUS_DRAFT || !$atleastonepage) { + $disabled = ' disabled="disabled"'; + $title = $langs->trans("WebpageMustBeDisabled", $langs->transnoentitiesnoconv($websitepage->LibStatut(0, 0))); + $url = '#'; + } else { + $disabled = ''; + $title = ''; + $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&website='.urlencode($website->ref); + } + print ''.img_picto('', 'delete', 'class=""').''.$langs->trans("Delete").''; } } @@ -3170,7 +3390,7 @@ if (!GETPOST('hide_websitemenu')) { // TODO Add js to save alias like we save virtual host name and use dynamic virtual host for url of id=previewpageext } - if (!in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm', 'createsite', 'createcontainer', 'createfromclone', 'createpagefromclone', 'deletesite'))) { + if (!in_array($mode, array('replacesite')) && !in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesiteconfirm', 'createsite', 'createcontainer', 'createfromclone', 'createpagefromclone', 'deletesite'))) { if ($action == 'editsource' || $action == 'editmeta') { print ''; } @@ -3358,6 +3578,17 @@ if ($action == 'editcss') { //$readmecontent.=""; } + if (!GETPOSTISSET('WEBSITE_LICENSE')) { + $licensecontent = @file_get_contents($filelicense); + // Clean the readme file to remove php code and get only html part + $licensecontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $licensecontent); + } else { + $licensecontent = GETPOST('WEBSITE_LICENSE', 'none'); + } + if (!trim($licensecontent)) { + //$readmecontent.=""; + } + print dol_get_fiche_head(); print ''."\n"; @@ -3371,19 +3602,23 @@ if ($action == 'editcss') { print ''; // Status of web site - print ''."\n"; - print '
    '; + if ($action != 'createcontainer') { + if (empty($conf->use_javascript_ajax)) { + print ''."\n"; + print ''; + } + } // Main language print ''; print ''; @@ -3393,6 +3628,7 @@ if ($action == 'editcss') { $htmltext = $langs->trans("Example").': fr,de,sv,it,pt'; print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2); print ''; print ''; @@ -3400,13 +3636,7 @@ if ($action == 'editcss') { // VirtualHost print ''; + // LICENSE + print ''; + // RSS print ''; + if (empty($conf->use_javascript_ajax)) { + print ''."\n"; + print ''; + } } // Type of container @@ -3809,6 +4072,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties $formwebsite->selectTypeOfContainer('WEBSITE_TYPE_CONTAINER', (GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha') ? GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha') : $type_container), 0, '', 1); print ''; + // Example/templates of page if ($action == 'createcontainer') { print ''; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { $langs->load('categories'); if (!GETPOSTISSET('categories')) { @@ -4043,6 +4307,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties print ''; print '
    '; print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); @@ -470,7 +474,7 @@ if (!empty($id) || !empty($ref)) { if ($action == 'add') { $title = $langs->trans('NewProductCombination'); // print dol_get_fiche_head(); - $features = $_SESSION['addvariant_'.$object->id]; + $features = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array(); //First, sanitize $listofvariantselected = '
    '; if (!empty($features)) { @@ -931,9 +935,6 @@ if (!empty($id) || !empty($ref)) { print '
    '; print ''; } -} else { - llxHeader(); - // not found } // End of page diff --git a/htdocs/variants/lib/variants.lib.php b/htdocs/variants/lib/variants.lib.php index e04d6fc15fe..609ea6cb1a1 100644 --- a/htdocs/variants/lib/variants.lib.php +++ b/htdocs/variants/lib/variants.lib.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 33e3055e084..c2f2b3e9a15 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -22,6 +22,7 @@ * \brief List page for product attribute */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; @@ -136,7 +137,7 @@ $permissiontoadd = $user->rights->variants->write; $permissiontodelete = $user->rights->variants->delete; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } $socid = 0; diff --git a/htdocs/variants/tpl/productattributevalueline_create.tpl.php b/htdocs/variants/tpl/productattributevalueline_create.tpl.php index cc16302a68d..f23e7175f58 100644 --- a/htdocs/variants/tpl/productattributevalueline_create.tpl.php +++ b/htdocs/variants/tpl/productattributevalueline_create.tpl.php @@ -84,7 +84,7 @@ if ($nolinesbefore) {
    - +
    '; - print $langs->trans('Status'); - print ''; - print ajax_object_onoff($object, 'status', 'status', 'Enabled', 'Disabled'); - //print dol_print_date($pagedatecreation, 'dayhour'); - print '
    '; + print $langs->trans('Status'); + print ''; + print $form->selectyesno('status', $object->status); + print '
    '; $htmltext = ''; print $form->textwithpicto($langs->trans('MainLanguage'), $htmltext, 1, 'help', '', 0, 2, 'WEBSITE_LANG'); print ''; + print img_picto('', 'language', 'class="picotfixedwidth"'); print $formadmin->select_language((GETPOSTISSET('WEBSITE_LANG') ? GETPOST('WEBSITE_LANG', 'aZ09comma') : ($object->lang ? $object->lang : '0')), 'WEBSITE_LANG', 0, null, 1, 0, 0, 'minwidth300', 2, 0, 0, array(), 1); print '
    '; + print img_picto('', 'language', 'class="picotfixedwidth"'); print ''; print '
    '; - $htmltext = $langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/{s1}'.$websitekey.'{s2}'); - $htmltext = str_replace(array('{s1}', '{s2}'), array('', ''), $htmltext); - $htmltext .= '
    '; - $htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); - $htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website
    '.DOL_DATA_ROOT.'/medias', $htmltext); - + $htmltext = $langs->trans("VirtualhostDesc"); print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); print '
    '; print ''; @@ -3492,7 +3722,7 @@ if ($action == 'editcss') { // Manifest.json print '
    '; $htmlhelp = $langs->trans("Example").' :
    '; - $htmlhelp .= dol_htmlentitiesbr($manifestjsoncontentdefault); + $htmlhelp .= ''.dol_htmlentitiesbr($manifestjsoncontentdefault).''; print $form->textwithpicto($langs->trans('WEBSITE_MANIFEST_JSON'), $htmlhelp, 1, 'help', '', 0, 2, 'manifestjsontooltip'); print '
    '; print $langs->trans("UseManifest").': '.$form->selectyesno('use_manifest', $website->use_manifest, 1).'
    '; @@ -3504,8 +3734,8 @@ if ($action == 'editcss') { // README.md print '
    '; - $htmlhelp = $langs->trans("EnterHereLicenseInformation"); - print $form->textwithpicto($langs->trans('WEBSITE_README'), $htmlhelp, 1, 'help', '', 0, 2, 'readmetooltip'); + $htmlhelp = $langs->trans("EnterHereReadmeInformation"); + print $form->textwithpicto($langs->trans("File").' README.md', $htmlhelp, 1, 'help', '', 0, 2, 'readmetooltip'); print ''; $poscursor = array('x'=>GETPOST('WEBSITE_README_x'), 'y'=>GETPOST('WEBSITE_README_y')); @@ -3514,6 +3744,18 @@ if ($action == 'editcss') { print '
    '; + $htmlhelp = $langs->trans("EnterHereLicenseInformation"); + print $form->textwithpicto($langs->trans("File").' LICENSE', $htmlhelp, 1, 'help', '', 0, 2, 'licensetooltip'); + print ''; + + $poscursor = array('x'=>GETPOST('WEBSITE_LICENSE_x'), 'y'=>GETPOST('WEBSITE_LICENSE_y')); + $doleditor = new DolEditor('WEBSITE_LICENSE', $licensecontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + print $doleditor->Create(1, '', true, $langs->trans("File").' LICENSE', 'text'); + + print '
    '; $htmlhelp = $langs->trans('RSSFeedDesc'); @@ -3552,7 +3794,7 @@ if ($action == 'createsite') { } print ''."\n"; - //print '
    '; + print '
    '; print ''; @@ -3571,7 +3813,7 @@ if ($action == 'createsite') { } print ''; @@ -3580,9 +3822,18 @@ if ($action == 'createsite') { print $langs->trans('MainLanguage'); print ''; + print ''; + print ''; print ''; - print ''; - print '
    '; - print $form->textwithpicto($langs->trans('WebSite'), $langs->trans("Example").': www.mywebsite.com, myportal, ...'); + print $form->textwithpicto($langs->trans('WebsiteName'), $langs->trans("Example").': MyPortal, www.mywebsite.com, ...'); print ''; print ''; print '
    '; $shortlangcode = preg_replace('/[_-].*$/', '', trim($langs->defaultlang)); + print img_picto('', 'language', 'class="pictofixedwidth"'); print $formadmin->select_language((GETPOSTISSET('WEBSITE_LANG') ? GETPOST('WEBSITE_LANG', 'aZ09comma') : $shortlangcode), 'WEBSITE_LANG', 0, null, 1, 0, 0, 'minwidth300', 2, 0, 0, array(), 1); print '
    '; + $htmltext = $langs->trans("Example").': fr,de,sv,it,pt'; + print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2); + print ''; + print img_picto('', 'language', 'class="pictofixedwidth"'); + print ''; + print '
    '; print $langs->trans('Description'); print ''; @@ -3590,28 +3841,22 @@ if ($action == 'createsite') { print '
    '; - $htmltext = $langs->trans("Example").': fr,de,sv,it,pt'; - print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2); - print ''; - print ''; - print '
    '; - - $htmltext = $langs->trans("SetHereVirtualHost", '{s1}'); - $htmltext = str_replace('{s1}', DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/websiteref', $htmltext); + $htmltext = $langs->trans("VirtualhostDesc"); + /*$htmltext = str_replace('{s1}', DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/websiteref', $htmltext); $htmltext .= '
    '; $htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); $htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); - $htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website
    '.DOL_DATA_ROOT.'/medias', $htmltext); + $htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website
    '.DOL_DATA_ROOT.'/medias', $htmltext);*/ - print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); + + print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, ''); print '
    '; print ''; print '
    '; + print '
    '; if ($action == 'createsite') { print '
    '; @@ -3643,16 +3888,33 @@ if ($action == 'importsite') { print ''.$langs->trans("ZipOfWebsitePackageToImport").'

    '; - $maxfilesizearray = getMaxFileSizeArray(); - $maxmin = $maxfilesizearray['maxmin']; - if ($maxmin > 0) { - print ''; // MAX_FILE_SIZE must precede the field type=file - } - print ''; - print ''; - print ''; - print '


    '; + $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); + $allowimportsite = true; + if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) { + $allowimportsite = false; + } + + if ($allowimportsite) { + $maxfilesizearray = getMaxFileSizeArray(); + $maxmin = $maxfilesizearray['maxmin']; + if ($maxmin > 0) { + print ''; // MAX_FILE_SIZE must precede the field type=file + } + print ''; + print ''; + print ''; + print '


    '; + } else { + if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) { + // Show clean corporate message + $message = $langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'); + } else { + // Show technical generic message + $message = $langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'); + } + print info_admin($message).'

    '; + } print ''.$langs->trans("ZipOfWebsitePackageToLoad").'

    '; @@ -3745,7 +4007,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties $pageusermodifid = $objectpage->fk_user_modif; $pageauthoralias = $objectpage->author_alias; $pagestatus = $objectpage->status; - } else { + } else { // $action = 'createcontainer' $type_container = 'page'; $pageurl = ''; $pagealiasalt = ''; @@ -3792,13 +4054,14 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties } if ($action != 'createcontainer') { - print ''."\n"; - print '
    '; - print $langs->trans('Status'); - print ''; - print ajax_object_onoff($objectpage, 'status', 'status', 'Enabled', 'Disabled'); - //print dol_print_date($pagedatecreation, 'dayhour'); - print '
    '; + print $langs->trans('Status'); + print ''; + print $form->selectyesno('status', $objectpage->status); + print '
    '; print $langs->trans('WEBSITE_PAGE_EXAMPLE'); @@ -3951,7 +4215,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties print '
    '; + if ($action == 'createcontainer') { print '
    '; @@ -4071,7 +4336,10 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties $arraygrabimagesinto = array('root'=>$langs->trans("WebsiteRootOfImages"), 'subpage'=>$langs->trans("SubdirOfPage")); print $form->selectarray('grabimagesinto', $arraygrabimagesinto, GETPOSTISSET('grabimagesinto') ? GETPOST('grabimagesinto') : 'root', 0, 0, 0, '', 0, 0, 0, '', '', 1); print '
    '; - print ''; + + print ''; + print ''; + print '
    '; } @@ -4211,10 +4479,11 @@ print "
    \n"; print "\n"; -if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction == 'replace') { +if ($mode == 'replacesite' || $massaction == 'replace') { print '
    '; print ''; print ''; + print ''; print ''; @@ -4273,7 +4542,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '
    '; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { print '
    '; print '
    '; print $langs->trans("Category"); @@ -4292,7 +4561,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '
    '; - if ($action == 'replacesiteconfirm') { + if ($mode == 'replacesite') { print ''."\n"; print '
    '; @@ -4304,18 +4573,21 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $param = ''; $nbtotalofrecords = count($listofpages['list']); $num = $limit; - $permissiontodelete = $user->rights->website->delete; + $permissiontodelete = $user->hasRight('website', 'delete'); // List of mass actions available $arrayofmassactions = array(); - if ($user->rights->website->writephp && $searchkey) { - $arrayofmassactions['replace'] = $langs->trans("Replace"); + if ($user->hasRight('website', 'writephp') && $searchkey) { + $arrayofmassactions['replace'] = img_picto('', 'replacement', 'class="pictofixedwidth"').$langs->trans("Replace"); } - if ($user->rights->website->write) { - $arrayofmassactions['setcategory'] = $langs->trans("ClassifyInCategory"); + if ($user->hasRight('website', 'write')) { + $arrayofmassactions['setcategory'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("ClassifyInCategory"); + } + if ($user->hasRight('website', 'write')) { + $arrayofmassactions['delcategory'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("RemoveCategory"); } if ($permissiontodelete) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); @@ -4326,16 +4598,18 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $massactionbutton .= $langs->trans("ReplaceString"); $massactionbutton .= ' '; $massactionbutton .= '
    '; - $massactionbutton .= '
    '; - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { // Get current categories $existing = $c->containing($answerrecord->id, Categorie::TYPE_WEBSITE_PAGE, 'object'); if (is_array($existing)) { @@ -4419,7 +4693,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '